content
stringlengths
1
15.9M
\section{Introduction} Recurrent neural networks (RNNs) are a form an iterative process by feeding forward information from one state of the network into the next time-step. This produces problems when performing backpropagation as all parameters which contributed to the output state must be taken into account, including all those in the previous iterations of the network. Often, it is only information produced recently, from not too many time-steps ago, which helps determine the output of the RNN for the current time-step. For example, this could be the previous few syllables it has classified in an RNN designed for speech recognition. If this is the case the RNN is said to only have short-term dependencies. However, it is likely that as technology advances there will be a shift towards using details across a longer time period. For example, more contextual information may become important for classifying the meaning of speech. In this case the network is said to be using a range of short and long-term dependencies. Although, if these long-term dependencies influence the current time-step of the RNN then their contribution must be factored into the backpropagation algorithm. Implementing this crudely could be done by saving all previous states to memory and propagating the gradients through every single state before updating the parameters. However, this is not feasible in-the-limit where there are infinite number of iterations in the chain, thus requiring both infinite memory and processing time. Therefore, there have been several attempts at more-efficiently approximating the true gradients. \subsection{Nth Ordered Approximation} A simple method, would be to suggest that these recurred gradients are negligible, compared to the contributions by the current state of the network. Thus the \emph{recurred gradients} are simply ignored in their entirety. This is called a $0^{th}$ order approximation. By ignoring these contributions only the recurring cell states and the current iteration of the network need to be stored in memory and backpropagated through to update the tuned parameters - this is considerably less computationally demanding. Yet the assumption of negligible contributions is not a good assumption to make, since the suggestion is akin to saying that the recurrent feed-back has negligible effect on the output of the network. In effect it is equivalent to reducing a RNN to a fully connected network. Alike performances are not observed between fully connected networks and RNNs, so this assumption is invalid. Therefore, one can choose an arbitrary number of previous iterations, which have a plausible contribution to the current network state to perform backpropagation through. This is $N^{th}$ order approximations. Consequently, \emph{N} versions of the network must be loaded into memory at any one time and require approximately \emph{N} times as many calculations to update the tuned parameters as the $0^{th}$ order. In $\lim_{N\to\infty}$ it returns to an exact solution for backpropagation through time. A balance must be struck between N steps and the size of the network, for what can be practically be computed in an acceptable amount of time, putting a limit on the size and/or performance of the RNN. \subsection{Truncated Backpropagation Through Time} Truncated Backpropagation Through Time (Truncated-BPTT)\cite{IlyaSutskever}, is a method to segment the recurrency chain into smaller partitions and calculate the respective gradients for each partition. This is a refined version of $N^{th}$ order approximations. In Truncated-BPTT the gradients are only updated after a forward pass through the partition's entire sequence, instead of updating gradients at every iterative step. This has the advantage of being much quicker to evaluate than $N^{th}$ order approximations, at the expense of not updating the network's parameters between each step. We shall call this backpropagating over a constant network. This has the same memory demands as $N^{th}$ order approximations, yet only has the computational demands of approximately the $0^{th}$ order approximation. Hence, is the most widely used technique for BPTT. Despite its wide usage, there are two key compromises in this method. The first is that the network's parameters are not updated between each time-step - it is kept in a constant parameter state. Consequently, it is an approximation of the desired BPTT algorithm - where the ideal solution would allow the network's parameters to vary between each time-step. Secondly, the partition is limited to a short, constant, finite length. Hence, this technique assumes that the network does not utilise any dependencies from time-steps which fall outside the chain. Thus, the network can only achieve short-term dependencies of fewer time-steps than the size of the partition. This is more detrimental for time-steps earlier in the partition which are assumed to have even shorter dependencies. \section{Exact Iterative-BPTT Method} We now propose a new method for calculating BPTT using the discrete forward sensitivity equation\cite{ForwardSensitivityEquation} shown in $Eqn. 1$. This method produces the \emph{exact} gradients as opposed to the previously approximated ones. In addition, it has comparable memory and processing demands to forward-accumulating auto-differentiation on a $1^{st}$ order approximation scenario. This method accounts for all previous time-steps of the RNN, therefore all possible dependencies are factored into the update gradients and no assumptions are needed. The number of network time-steps is continually increasing with each forward pass of the network, yet the computation required for this method of BPTT remains constant - so is ideal for networks expected to run for many time-steps. This would not ordinarily be true for a naive implementation of BPTT, where complexity grows linearly with the number of steps (this is why Truncated-BPTT introduces a 'cut-off' in the partition size). Moreover, the network's parameters are allowed to vary between every time-step, thus can be updated by gradient descent at every time-step. The drawback is that several 2D-Jacobians must be calculated as well as a Jacobian multiplication - however the latter is well optimised now. The length of each dimension is given by the number of network parameters and the neuronal width of the recurrent loop respectively - this is no different from a forward accumulating method. Since the Jacobian is of constant size, the associated computational complexity to compute this method of backpropagation remains constant irrespective of how many time-steps have contributed to the current RNNs behaviour. This is an initially large computation, however for networks with many time-steps and RNNs expected to be influenced by long term dependencies, then this method is more favourable than the previously mentioned approximate methods - as in these conditions the assumptions for the approximate methods are not valid. To clarify, since this method is an exact representation of the gradients, it handles all dependency time-spans. However, if the RNN is expected to only utilise short-term information it would be better to continue using the approximate methods. Specifically this new method will have the computational advantage when the number of recurrent time-steps grows large enough that the computation required for naive BPTT is larger than the computation required to compute the Jacobian in $Eqn. 1$. Hence, this method should be used when it is expected that the RNN will be running for many time steps and utilise information from an iteration long ago. Using this method, it would now be feasible to design a network to have a long-term memory based on feed-back loops. The procedure is achieved by iterating a function of the gradients, whilst a forward pass of the network is computed. This is the discrete forward sensitivity equation, shown below in $Eqn. 1$: \begin{equation} \label{eqn: Forward Sensitivity Equation} \Delta_{N} = \frac{\mathrm{d} R_N}{\mathrm{d} P_{N}} + \frac{\mathrm{d} R_N}{\mathrm{d} R_{N-1}} \Delta_{(N-1)} \end{equation} Only this Jacobian and the recurred outputs must be stored between successive time-steps. Using $Eqn. 1$, BPTT is \emph{exactly} described by $Eqn. 2$: \begin{equation} \label{eqn: FSE in gradient descent} \frac{\mathrm{d} Y_N}{\mathrm{d} P} = \frac{\mathrm{d} Y_N}{\mathrm{d} P_{N}} + \frac{\mathrm{d} Y_N}{\mathrm{d} R_{(N-1)}}\Delta_{(N-1)} \end{equation} Then standard updating by gradient descent is described in $Eqn. 3$: \begin{equation} \label{eqn: FSE in parameter update} P_{N+1} = P_{N} - \eta \frac{\mathrm{d} C}{\mathrm{d} P} = P_{N} - \eta \frac{\mathrm{d} C}{\mathrm{d} Y_N} \frac{\mathrm{d} Y_N}{\mathrm{d} P} \end{equation} Where $\Delta_{N}$ is the iterated variable which is stored on the $N^{th}$ time-step. $R_N$ is the vector of recurred values also stored for the next iteration. $P_{N}$ is the set of tunable network parameters on the $N^{th}$ time-step. $C$ is the network cost. Derivation of $Eqn. 1$ is shown in the background section. Due to current artificial RNNs not exhibiting sufficiently long-term dependencies, the advantages of this method will not be reflected well by results on any currently testable model. In fact, it is expected to perform poorer, on computation time, than the approximate methods for networks only using short-term dependencies due to the approximation's assumptions. However, the constant computation complexity required for successive time-steps can be seen by inspection of this new method and this is a significant improvement over previous attempts which linearly scaled with the number of time-steps. Hopefully, this is sufficiently indicative for good performance on networks for when they transition to utilising more long-term dependencies. \subsection{Adaptation For Multiple Recurrencies} Many neural networks are not singularly dependent on one recurrent loop. Models such as an Long Short Term Memory (LSTM) network are dependent on several different recurrent loops. We will index these feed-back loops as $\left\{R^k : \forall k\in\left\{1,2,...,K\right\}\right\}$ and $\bar{K}=\left\{1,2,3,...,K\right\}$ - for K recurrent loops. This will now require a unique $\Delta_{N}$ for each recurrent loop. Thus, we shall now define an adaptation of the forward sensitivity equations required for multiple interacting feed-back loops. Unfortunately, the formula for multiple recurrent loops is more complex due to the potential interactions between different recurrent loops. Consequently, cross terms must now be accounted for in the 'Delta Function'. Accounting for these cross terms the amended delta function is shown in $Eqn. 4$. The parameter update rules remain the same as described in $Eqn. 3$. \begin{equation} \label{eqn: Adapted Forward Sensitivity Equation} \Delta^k_{N} = \frac{\mathrm{d} R^k_N}{\mathrm{d} P_{N}} + \sum_{l\in\bar{K}}\frac{\mathrm{d} R^k_N}{\mathrm{d} R^l_{N-1}} \Delta^l_{(N-1)} : \forall k \in \bar{K} \end{equation} It can be shown that if $\bar{K}=\left\{0\right\}$ then $Eqn. 4$ reduces to $Eqn. 1$. Likewise $Eqn. 2$ requires updating for multiple recurrencies as shown in $Eqn. 5$. \begin{equation} \label{eqn: Adapted-FSE in gradient descent} \frac{\mathrm{d} Y_N}{\mathrm{d} P} = \frac{\mathrm{d} Y_N}{\mathrm{d} P_{N}} + \sum_{k \in \bar{K}} \frac{\mathrm{d} Y_N}{\mathrm{d} R^k_{(N-1)}}\Delta^k_{(N-1)} \end{equation} The first term in $Eqn. 4$ (and $Eqn. 1$) reperesents standard backpropagation - this is most extensivly used in feed-forward networks. The second term is the required correction for recurrent networks. Therefore, using $Eqn. 4$ and $Eqn. 5$, one can derive the standard backpropagation algorithm and all the approximate algorithms for backpropagation through time. So the combination of $Eqn. 4$ and $Eqn. 5$ could be considered a more general algorithm - where the backpropagation algorithm and approximate BPTT algorithms are for specific circumstances. The ways in which artificial neurons connect can be seperated into three fundamental categories: feed-forward, feed-back and terminating. A feed-forward connection is one which is in the direction of input neurons to output neurons and is contained within the \emph{directed acyclic graph}. A feed-back loop is described by a collection of connections which can cause an artificial neuron to influence itself at a later time period - each feed-back loop must contain at least one feed-back connection. Therefore, feed-back connections are those which when eliminated from the network's directed graph leave a directed acyclic graph in the direction from input neurons to output neurons. Feed-forward and feed-back connections must be able to influence the output neurons too. Finally a terminating connection is any connection which cannot influence any output neuron in any way. Each of these connection types has an associated backpropagation algorithm. Standard backpropagation can be considered the associated solution for any purely feed-forward artificial neural network whilst BPTT is the associated solution for a more general artificial neural network which can also include feed-back connections. Since terminating connections do not influence the output neurons then they do not require a backpropagation algorithm. Since these are the three fundamental directional connections and backpropagation is described exactly by the first term in $Eqn. 4$ whilst BPTT is described exactly by $Eqn. 4$, then we propose that $Eqn. 4$ and $Eqn. 5$ may together describe a full solution of backpropagation for any given artificial neural network. On inspection of $Eqn. 4$ and $Eqn. 5$ it can be seen that the gradient complexity follows $O\left(k^2\right)$ due to the number of cross terms to be calculated for each interacting recurrent loop. However, this can be further simplified by analysis of some fundamental properties of a recurrent neural network. \subsubsection{Recurrency-Abstraction Theorem} Mathematically, we define abstraction as decreasing the intrinsic dimensionality of a data manifold. A data manifold is described in the "Manifold Hypothesis" \cite{ChrisOlah}. Abstraction qualitatively manifests as collating many elements into one object class. In neural networks this is done by clustering points in a manifold towards one another. A perfect abstraction would be the collapse of part of a manifold into an intrinsically lower dimension - regardless of what the extrinsic dimensionality of the system is. This, process is irreversible. Now, we can define the extrinsic dimensionality of the system by the number of neurons in a specified layer of the system - where activations of neurons are represented in the space and each individual neuron serves as a basis vector. These distributed activations form the manifolds. So we can mandate an abstraction to occur between layers, by forcing the extrinsic dimensionality of the next layer to be lower than the intrinsic dimensionality of the manifold. Thus, we incur irreversible collapses of the manifold in several locations - in effect information is lost in the transformation. A bidirectional neuron can be imagined. It is able to propagate activations in either direction (up and down subsequent layers) and the layers are fully connected in this scenario. If it propagates to a layer which has a higher extrinsic dimension, the manifold is simply embedded at some angle in the space with its intrinsic dimensionality preserved. Whilst, if the layer has a extrinsic dimensionality less than the intrinsic dimensionality then abstraction occurs. Thus, the transformations are naturally asymmetric - resulting in an effective directionality principle for any neural network where a manifold's intrinsic dimensionality varies. Unlike these bidirectional networks, artificial neural networks are inherently directional anyway. But for any recurrence, we can show that the process is abstractive for a given manifold. A recurrence occurs when a layer '$L$' of a network is fed-back and concatenated with a previous layer '$L-k$'. Thus, the extrinsic dimensionality of the layer '$L-k+1$' (given by $Ex(L-k+1)$) where '$L-k+1$' is the layer given by the concatenation of $L$ and $L-K$, must be greater than the extrinsic dimensionality of the fed-back layer $L$ written as: $Ex\left(L-k+1\right)>Ex\left(L\right)$. The concatenation, joins the two manifolds thus summing their intrinsic dimensionality, written as: $In\left(L\right)+In\left(L-k\right) = In\left(L-k+1\right)$. We know that the intrinsic dimensionality on the later fed-back layer is just one component of this sum and since intrinsic dimensionality cannot be negative then the intrinsic dimensionality of layer '$L$' must be less than or equal to the intrinsic dimensionality of layer '$L-k+1$' written as: $In\left(L-k+1\right) \geq In\left(L\right)$. Consequently, given that neither the intrinsic dimensionality of the manifold in layer '$L$' or in layer '$L-k$' is zero, the process must be abstractive. Therefore, the mapping is surjective but non-injective, resulting in a directional, non-invertible, process. This conclusion is reperesented by $Eqn. 6$. Note this is strictly for recurrent neural networks which use a concatenation when feeding back information. \begin{equation} \label{eqn: Intrinsic Dimensionality Relation} In\left(L-k+1\right) \neq 0 \cap In\left(L\right) \neq 0 \Rightarrow In\left(L-k+1\right) > In\left(L\right) \end{equation} Due to this, the interaction between recurrent loops must be directional too. Thus, if the gradients in one interaction direction are non-zero, then the inverted interaction's gradients must be zero. Therefore, cancelling $50\%$ of the cross terms - they needn't ever be calculated. \subsection{Temporal Gradient Explosion} Phenomena observed in typical feed-forward networks are expected to have temporal analogoues in feed-back networks. Just as gradient explosions can plague deep neural networks, we can now expect to observe \emph{temporal gradient explosions} - the equivalent phenomena for recurrent neural networks. This occurs if the gradient sum is divergent. This could be accounted for by adding an attenuation factor for each iterative gradient to force a convergence, however this will once again make the method an approximation not an exact solution. On the opposite side, we now ideally would want the effect of \emph{temporal gradient vanishing} as this would converge the sequence. Gradient explosion is characterised in the forward pass as small perturbations becoming increasingly larger, so we can predict that the network becomes chaotic as time progresses. It remains deterministic but small changes in a value quickly grow out of control - potentially impeding the function of the network. This principle is the \emph{'butterfly effect'} and perhaps recurrent neural networks with this new backpropagation technique may have some success in being able to model chaotic dynamical systems. \section{Background} The following is a derivation of the discrete forward sensitivity equation for artificial neural networks. We wish to calculate the full time-dependent gradients for every parameter for a recurrent neural network in its $N^{th}$ iterative state. A basic recurrent neural network is outlined in $Fig. 1$. \begin{figure}[H] \begin{center} \includegraphics[width=0.9\textwidth]{Recurrency.png} \caption{Recurrent Neural Network, on time-step N, produces output Y as a function of inputs X and feed-back input $R_{n-1}$ and tuned parameters $P_{n}$ individually indexed by $\forall i\in I$ as shown by $P_n = \{ P_{i,n} : \forall i \in I\}$.} \end{center} \end{figure} The full gradients for this network, with respect to the output layer, are described by $Eqn. 7$ and summarised in $Eqn. 8$. Gradient descent with respect to error $C$ is shown in $Eqn. 9$ with learning rate $\eta$. It can be seen that as N becomes large the backpropagation becomes impractical to calculate since there are N terms to consider. This is the linear scaling of computational complexity for successive time-steps using a naive BPTT approach. \begin{equation} \label{eqn: Recurrent Backprop} \frac{\mathrm{d} Y_N}{\mathrm{d} P} = \frac{\mathrm{d} Y_N}{\mathrm{d} P_{N}} + \frac{\mathrm{d} Y_N}{\mathrm{d} P_{N-1}} + \frac{\mathrm{d} Y_N}{\mathrm{d} P_{N-2}} + ... + \frac{\mathrm{d} Y_N}{\mathrm{d} P_{0}} \end{equation} \\ \begin{equation} \label{eqn: Recurrent Backprop Summarised} \frac{\mathrm{d} Y_N}{\mathrm{d} P}= \sum_{n=0}^{N}\frac{\mathrm{d} Y_N}{\mathrm{d} P_{n}} \end{equation} \\ \begin{equation} \label{eqn: Recurrent Gradients Descent} P_{N+1} = P_{N} - \eta \frac{\mathrm{d} C}{\mathrm{d} P} = P_{N} - \eta \frac{\mathrm{d} C}{\mathrm{d} Y_N} \frac{\mathrm{d} Y_N}{\mathrm{d} P} \end{equation} \\ Next begin with expanding $Eqn. 7$, using chain rule, into $Eqn. 10$, then summarising $Eqn. 10$ into $Eqn. 11$. \begin{equation} \label{eqn: Recurrent Backprop Iterativly Expressed} \frac{\mathrm{d} Y_N}{\mathrm{d} P} = \frac{\mathrm{d} Y_N}{\mathrm{d} P_{N}}+ \frac{\mathrm{d} Y_N}{\mathrm{d} R_{N-1}}\frac{\mathrm{d} R_{N-1}}{\mathrm{d} P_{N-1}} + \frac{\mathrm{d} Y_N}{\mathrm{d} R_{N-1}}\frac{\mathrm{d} R_{N-1}}{\mathrm{d} R_{N-2}}\frac{\mathrm{d} R_{N-2}}{\mathrm{d} P_{N-2}} + ... + \frac{\mathrm{d} Y_N}{\mathrm{d} R_{N-1}}\left(\prod_{n=0}^{N-2}\frac{\mathrm{d} R_{n+1}}{\mathrm{d} R_{n}}\right)\frac{\mathrm{d} R_{0}}{\mathrm{d} P_{0}} \end{equation} \\ \begin{equation} \label{eqn: Recurrent Backprop Iterativly Expressed Summarised} \frac{\mathrm{d} Y_N}{\mathrm{d} P} = \frac{\mathrm{d} Y_N}{\mathrm{d} P_{N}} + \frac{\mathrm{d} Y_N}{\mathrm{d} R_{N-1}}\frac{\mathrm{d} R_{N-1}}{\mathrm{d} P_{N-1}} + \sum_{n=0}^{N-2}\frac{\mathrm{d} Y_N}{\mathrm{d} R_{N-1}}\left( \prod_{k=n}^{N-2}\frac{\mathrm{d} R_{k+1}}{\mathrm{d} R_{k}}\right)\frac{\mathrm{d} R_{n}}{\mathrm{d} P_{n}} \end{equation} The first term in $Eqn. 11$ is the existing backpropagation for feed-forward neural networks. The second and third terms are the required corrections for any neural networks with a feed-back loop. We can now reformulate $Eqn. 11$ as a recurrence relation, to perform at each time-step with the forward propagation of the network as shown in $Eqn. 12$. We need only now store and calculate the variable $\Delta_{N}$ at each time-step. This final reformulation is the discrete forward sensitivity equation: \begin{equation} \label{eqn: FSE} \Delta_{N} = \frac{\mathrm{d} R_N}{\mathrm{d} P_{N}} + \frac{\mathrm{d} R_N}{\mathrm{d} R_{N-1}} \Delta_{(N-1)} \end{equation} For multiple interacting feed-back loops, the discrete forward sensitivity equation shown in $Eqn. 12$ must be adapted to $Eqn. 13$. Each feed-back loop is indexed by superscript $k$. $Eqn. 13$ is the adapted discrete forward sensitivity equation: \begin{equation} \label{eqn: Adapted-Forward Sensitivity Equation} \Delta^k_{N} = \frac{\mathrm{d} R^k_N}{\mathrm{d} P_{N}} + \sum_{l\in\bar{K}}\frac{\mathrm{d} R^k_N}{\mathrm{d} R^l_{N-1}} \Delta^l_{(N-1)} \end{equation} Therefore, backpropagation through time is \emph{exactly} described by $Eqn. 14$. \begin{equation} \label{eqn: Iterative} \frac{\mathrm{d} Y_N}{\mathrm{d} P} = \frac{\mathrm{d} Y_N}{\mathrm{d} P_{N}} + \frac{\mathrm{d} Y_N}{\mathrm{d} R_{(N-1)}}\Delta_{(N-1)} \end{equation}
\section{Introduction} \label{sec:intro} Personalization is an important topic in computer vision and signal processing with many applications such as recommender systems, smart assistance, speaker verification and keyword spotting \cite{xue2014singular,he2019device,sarikaya2017technology}. Personalization of a global model may have conflicting objectives in terms of generalization and personalization. In other words, a global model should perform well not only on general data but also on personal data. In order to train a global model to perform well in many circumstances, the training data should cover all the cases for generalization. However, this assumption departs from the real world scenario which can not cover every cases. One of naive approaches to personalize a deep neural network is finetuning the global model with limited personal data. However, it is not practical to store a global model on memory-restricted edge devices. Recently, the deep neural network (DNN) models have been widely adopted in various domains such as computer vision, audio processing, text analysis, and gene data expression. Deploying a DNN requires high computational resources. Meanwhile, a trend of deploying a DNN have moved from a desktop computer into edge devices and smartphones. However, deploying a DNN on edge devices is a challenging problem because of its limited memory and computational resources. To resolve this issue, many model compression methods have been widely studied such as knowledge distillation \cite{kim2018paraphrasing,hinton2015distilling,kim2019feature}, model quantization \cite{courbariaux2016binarized,rastegari2016xnor} and model pruning \cite{han2015deep,kim2020position}. Most of model compression methods normally need an additional training or retraining phase. Therefore, an additional computational cost is unavoidable for a model considering both personalization and model efficiency. \begin{figure}[t] \centering \includegraphics[width = 1\linewidth]{IMAGE/fig1.png}\\ \caption{The differences between conventional personalization and Prototype-based Personalized Pruning (PPP). } \label{fig:different} \end{figure} \begin{figure*}[h] \begin{minipage}[b]{0.6\linewidth} \includegraphics[width=0.9\textwidth]{IMAGE/overall.png} \caption{The overall process of PPP.} \label{overallprocess} \end{minipage} \begin{minipage}[b]{0.38\linewidth} \centering \includegraphics[width=0.6\textwidth]{IMAGE/module.png} \caption{Residual block containing gate modules and prototype generators.} \label{gatemodule} \end{minipage} \end{figure*} Our goal is to train the global model that can be easily pruned with personal data and perform well after pruning without any finetuning. To achieve this goal, we propose a novel method for personalization using a dynamic path network. The proposed method is named as prototype-based personalized pruning (PPP) inspired by prototypical network \cite{snell2017prototypical} which learns a metric space using prototype representation. PPP considers the model complexity as well as personalization. After training, unlike dynamic path network \cite{veit2018convolutional}, PPP selects a subset graph with a prototype module using the prototype driven from limited personalized data. For this reason, the model structure of ppp is dynamically customized to enhance personalization and reduce the model complexity. The differences between conventional personalization and PPP is depicted in Fig.\ref{fig:different}. More details are explained in Sec. \ref{sec:Method}. \section{Related work} \label{sec:relatedwork} \noindent \textbf{Dynamic path network} The computational graph in a general DNN is fixed. On the other hand, the works in \cite{lee2020urnet,lin2017runtime,veit2018convolutional} propose dynamic path networks. Although a full network is needed, they select the forwarding graph (set of path) at inference time. Utilizing this may help the network to change its complexity at inference time by reducing the forward graph. However, selecting the forward graph of these methods depends on the incoming input. Therefore, they have to store a full model, which is not practical in terms of deploying the complex full model on a resource constraint edge device. \noindent \textbf{Prototypical network} Prototypical network \cite{snell2017prototypical} focuses on learning an embedding space where data can be classified by computing the distance to a prototype representation of each class. This prototypical framework is also used in speaker recognition with metric learning \cite{wang2019centroid} and few-shot learning domain \cite{jadon2020overview}. In this work, we adopt the above two frameworks. We make a prototype per personality (each identity or group of personal data) and train a dynamic path network for personalized pruning. After training, PPP provides the personal model which is a pruned version of the full model on the fly without finetuning with given personal data. \section{Proposed method} \label{sec:Method} Our PPP method is based on the AIG \cite{veit2018convolutional} which is a dynamic path network and the prototypical network \cite{snell2017prototypical}. Similar to AIG, in the training phase, PPP trains a gate module to select proper channels for pruning. At the same time, we also consider personalization. We define the prototype of personalization using the output of the gate module which is the binary embedding pattern for each convolution module indicating whether to prune each channel or not. To consider the performance of after-pruning with prototype at the training phase, we regularize the output of the gate module by making it similar to the prototype. As a result, after training, we can easily prune the global model (full model) by pruning with prototype derived from the given restricted personal data using graph generator and network pruner. PPP does not need the global model after training because the channel selection is based on the prototype representing the personal data and is not based on an incoming input as in traditional dynamic path networks. The overall process is depicted in Fig. \ref{overallprocess}. \subsection{Gate module} For the sake of explanation, we set a base network as a ResNet \cite{he2016deep} but it is not restricted to a residual network architecture. Unlike AIG \cite{veit2018convolutional}, our gate module controls each channel of a convolution module not a whole residual block (See Fig. \ref{gatemodule}). Let $g$ be a gate per each conv layer. ${g}: {x} \in \mathbb{R}^{n \times w \times h} \rightarrow {z} \in \mathbb{R}^m$ where $x$ is an input to a gate module and $z$ is an embedding vector in the gating embedding space. $n$ and $m$ are the number of input and output channels of the conv layer related to the gate module. We use spatial global average pooling to the input $x$. The embedding vector $z$ learns whether or not to use an output channel with a probability which is a random variable with a range of $[0,1]$. We use Gumble Softmax and straight through estimator for training gate modules \cite{jang2016categorical}. In other words, in the forward pass, we use argmax with a probability $p$ for making hard attention ($z \in \{0,1\}$) but the gradient is calculated by the Gumble-Max trick \cite{veit2018convolutional}. Except the output dimension, other structures of gate module is the same as in AIG \cite{veit2018convolutional}. \subsection{Training } \label{subsec:training} Let the training dataset be $D = \{(x_i, t_i, p_i)_{i=1}^N$\}, $t_i\in\{1,\cdots,\mathcal{K}\}$, $p_i \in \{1, \cdots, \mathcal{P} \}$, where $\mathcal{K}$ and $\mathcal{P}$ are the number of classes and the number of identities (individual clients), respectively\footnote{The class and the identity might be identical for certain tasks such as face recognition but it can be different for other tasks such as keyword spotting. For generality, we separate these two.}. For brevity, we use the notation $(x^p_i$,$t^p_i)$ to denote the $i$-th data pair corresponding to the $p$-th identity. We can consider a conv layer as ${f}: {x} \in \mathbb{R}^{n\times w \times h} \rightarrow {y} \in \mathbb{R}^{m\times w \times h}$ where $x$ is an input activation and $y$ is the corresponding output of the conv layer. The gate module $g$ receives the same input $x$ and it becomes \begin{equation} \label{eq:1} y^p_{i,l}=f(x^p_{i,l};\theta_{f,l}), \qquad z^p_{i,l}=g(x^p_{i,l};\theta_{g,l}). \end{equation} Where $\theta_{f,l}$ and $\theta_{g,l}$ are the parameters for the $l$-th conv layer and gate module respectively. We can calculate the output feature map $y$ and the embedding vector $z$ using the incoming input. To train the gate module for channel selection, we calculate the pruned channel by multiplying each channel of the output $y$ with the corresponding element of the embedding vector $z$ for every conv layer. So far, the training strategy is similar to previous dynamic path networks in terms of channel selection based on an incoming input. Here, we introduce the definition of `Prototype' representing the personal identity. In each minibatch, let the number of samples with $p$-th identity be $n_p$. Then, we can calculate the mean of embedding vectors among all $z^p$'s. We define $\Bar{z}^p$ as this mean in a minibatch which represents the personality of $p$. \begin{equation} \label{eq:2} \Bar{z}^p= \frac{1}{n_p}\sum_{i=1}^{n_p} z^p_i \end{equation} We calculate the set of $\{\Bar{z}^p_l\}$ for all conv layer at the prototype generator and this set is used as a prototype of $p$. Here, the subscript $l$ denotes the $l$-th layer. This prototype is not a discrete vector because of the mean operation. At test time which requires a pruned model, it needs to be a discrete vector. We can make a prototype as a discrete vector using element-wise step function $\mathcal{S}:\mathbb{R}^m \rightarrow \mathbb{R}^m$ with a threshold value $\tau$. \begin{equation*} \forall i \in \{1,\cdots, m\}, \quad \mathcal{S}(x_i)_i = \begin{cases} 1 &\text{$x_i$ $\geq$ $\tau$}\\ 0 &\text{Otherwise} \end{cases} \end{equation*} Let $\mathcal{C}$ be the set of conv layers in the network and $\mathcal{B}$ is a mini batch containing a subset of identities. Then, we introduce the regularization loss for personlization. \begin{equation} \label{eq:3} \mathcal{L}_{prototype}= \frac{1}{|\mathcal{C}|}\sum_{l\in \mathcal{C}}\frac{1}{|\mathcal{B}|}\sum_{p=1}^\mathcal{P}\sum_{i=1}^{n_p} \lVert z^p_{i,l}-\mathcal{S}(\Bar{z}^p_l) \rVert^2_2, \end{equation} This loss regularizes each input with the same identity to output a similar gate pattern not deviating much from the corresponding prototype $\mathcal{S}(\Bar{z}^p_c)$. This can make PPP possible to prune the network based on an identity-specific prototype $\mathcal{S}(\Bar{z}^p_l)$, not by a specific input. In this regularization, we do not use the distance metric between prototypes because there is no reason to broaden the distance among different prototypes like \cite{snell2017prototypical}. We use a soft constraint for the utilization rate of a network by introducing a target loss. We count the number of alive channel (filter) in each conv layer and regularize this rate with a specific target $T$: \begin{equation} \label{eq:4} \mathcal{L}_{target}= \left(T-\frac{1}{|\mathcal{C}|}\sum_{l\in \mathcal{C}}\frac{1}{|\mathcal{B}|\times m_l}\sum_{p=1}^\mathcal{P}\sum_{i=1}^{n_p} \lVert z^p_{i,l}\rVert_1\right)^2, \end{equation} where $m_l$ is the number of channel in the $l$-th layer. This target loss provides an easy way to adjust network complexity. Using the standard cross-entropy loss, $\mathcal{L}_{task}$, the overall training loss is \begin{equation} \label{eq:5} \mathcal{L}_{total}= \mathcal{L}_{task} + \alpha\mathcal{L}_{prototype} + \beta\mathcal{L}_{target}, \end{equation} where $\alpha$ and $\beta$ are the hyper-parameters for balancing the losses. The training framework of PPP resembles the dynamic path network because the gate module is trained with independent input samples with the task loss. However, at the same time, the output of the gate module is regularized with the representative prototype of a specific identity by $\mathcal{L}_{prototype}$. In doing so, PPP can provide a personalized inference path by selecting a similar path within the same identity. \subsection{Testing } Data-dependent path has a drawback that it always needs the full network. It selects the forward graph depending on the input. On the other hand, after the training, PPP does not use the data-dependent path. Instead, PPP makes a forward graph depending on the prototype of given personal data. Therefore, unlike traditional personalization schemes such as finetuning the global model with personal data, PPP can make use of a light-weight personal model on the fly. At test time, with a few given personal data, we can calculate the prototype using (\ref{eq:2}). With the calculated prototype, one can obtain a personalized pruned model by eliminating the conv layer filters with the given binary pattern for each specific identity using the graph generator and network pruner, without additional training as shown in Fig.~\ref{overallprocess}. \section{Experiments} \label{sec:experiment} To verify the proposed PPP, we conduct experiments on two tasks: image classification and keyword spotting (KWS). This shows PPP can handle both images and signals as input data. In this work, we choose a residual network as a baseline network. We compare our PPP with the conventional dynamic path network and the vanilla network in terms of accuracy and utilization rate which is the rate of alive parameters in conv layers of network (\# of alive parameters / \# of the total parameters). \subsection{Experimental Setup} \label{subsec:setup} In all experiments, we use the same hyper-parameters: $\alpha = \beta=10$, $\tau = 0.7$ and $T=0.6$. In the testing phase of PPP, we use the first test minibatch for the enrollment of personal data to make a prototype per identity. Then, we measure the test accuracy based on the customized personal model. \noindent \textbf{Image Classification} In the image classification task, we use CIFAR-10/100 \cite{krizhevsky2009learning} datasets with the widely-used ResNet-56 \cite{he2016deep} as a baseline network. Each CIFAR dataset contains 50,000 training data and 10,000 testing data. CIFAR-10 and 100 have 10 and 100 classes, respectively. Since there is no personal identity label in CIFAR datasets, we assume that the task label (classification label) also represents the personal identity\footnote{It corresponds to $t=p$ and $ \mathcal{K}=\mathcal{P}$ in Sec \ref{subsec:training}.}. PPP starts from the pretrained model. The initial learning rates of 0.1 and 0.01 are used for the gate module and the network, respectively. Then, we follow the training details of CIFAR experiments in \cite{he2016deep}. \noindent \textbf{Keyword Spotting} For keyword spotting, we use Qualcomm Keyword Speech Dataset\footnote{\url{https://developer.qualcomm.com/project/keyword-speech-dataset}} \cite{kim2019query} and ResNet-26 \cite{tang2018deep} for the baseline network. Qualcomm keyword dataset contains 4,270 utterances of four English keywords spoken by 42-50 people. The four keywords are `Hey Android', `Hey Snapdragon', `Hi Galaxy' and `Hi Lumina'. In this experiment, unlike CIFAR datasets, the identity labels exist ($t\neq p$ and $ \mathcal{K} \neq \mathcal{P}$). We set the number of personal identity as 42 ($\mathcal{P}=42$) to fully utilize the four classes ($\mathcal{K}=4$). Each \textsc{wav} file is recorded with the sampling rate of 16 kHz, mono channel in 16 bits. The dataset is split into 80\% train and 20\% test data. We train the model from scratch with 100 epochs with the initial learning rate of 0.1 and decay it with a factor of 0.1 at 300 and 500 iteration. All other training details and experimental settings are identical to that of ResNet-26 in \cite{tang2018deep}. \begin{table} \centering \caption{ Test accuracy and utilization rate } \label{CIFAR_EX} \begin{adjustbox}{width=1\linewidth} \begin{tabular}{ l c c c} \toprule \multicolumn{4}{c}{ResNet-56 on CIFAR-10/100 dataset.} \\ \midrule {Method} & Type & {Accuracy (\%)} & {Utilization rate (\%)} \\ & & {C-10 / C-100} & {C-10 / C-100} \\ \midrule ResNet-56-Vanilla \cite{he2016deep} & N/A & 92.9 / 67.9 & 100.0 / 100.0 \\ ResNet-56-AIG \cite{veit2018convolutional} & Single & 92.1 / 67.8 & 60.3 / 74.0 \\ ResNet-56-PPP &Single & 92.7 / 66.7 & 40.2 / 52.0 \\ \textbf{ResNet-56-PPP} &\textbf{Prototype} & 94.4 / 68.7 & 37.6 / 52.4 \\ \bottomrule \toprule \multicolumn{4}{c}{ResNet-26 on Qualcomm Keyword Speech Dataset} \\ \midrule {Method} & Type& {Accuracy (\%)} & {Utilization rate (\%)} \\ \midrule ResNet-26-Vanilla \cite{tang2018deep} & N/A & 99.7 & 100.0 \\ ResNet-26-PPP NoReg &Single & 98.9 & 49.3 \\ ResNet-26-PPP NoReg &Prototype & 53.7 & 32.2 \\ ResNet-26-PPP& Single & 99.4 & 37.8 \\ \textbf{ResNet-26-PPP} &\textbf{Prototype} & 99.4 & 35.4 \\ \bottomrule \end{tabular} \end{adjustbox} \end{table} \subsection{Experimental Results} \label{subsec:Results} We calculate the mean accuracy and the utilization rate for each personlized model in Table \ref{CIFAR_EX}. In the table, the \textit{vanilla} means the original network trained with cross-entropy. `Type' in the table indicates the way of selecting the forward graph. `Single' implies selecting graph with independent incoming input as AIG \cite{veit2018convolutional} does. On the other hand, `Prototype', used in the proposed method, selects channels with the prototype so as to prune the model according to the personal identity. Note that in a real application, conventional dynamic networks such as AIG always need a full model per client so the utilization rate is only valid at inference time. On the other hand, in our PPP, after providing the first minibatch to the full model to determine the identity, we can obtain a pruned model based on the estimated identity and abolish the full model. \noindent \textbf{Image Classification} As shown in Table \ref{CIFAR_EX}, CIFAR-10 and 100 show similar trends. As expected, the vanilla model with full utilization outperforms both PPP (single) and AIG both of which select a different forward path for each independent input. Interestingly, PPP (Prototype), the proposed method, beats the vanilla and AIG with a large margin using less memory (low utilization rate). Compared to AIG, PPP is 2.3\% and 0.9\% more accurate on CIFAR-10 and -100, respectively. Also, PPP uses 20\% less parameters than AIG. \noindent \textbf{Keyword Spotting} To confirm the importance of the regularization term $\mathcal{L}_{prototype}$ for personalized pruning, we conduct an ablation study of it. `PPP NoReg' represents training with total loss without $\mathcal{L}_{prototype}$. PPP shows very close performance regardless of `Type'. On the other hand, in PPP NoReg cases, although the `Single' shows reasonable performance in both accuracy and utilization rate, the `Prototype' suffers from severe accuracy degradation, showing 45\% less accuracy than PPP. This is because without $\mathcal{L}_{prototype}$, the output vector of the gate module cannot be merged near the prototype (See Fig. \ref{fig:PCA}) and the pruned model using the prototype cannot retain performance. \begin{comment} \begin{table} \centering \caption{ResNet-26 on Qualcomm Keyword Speech Dataset. } \label{SPEECH_EX} \begin{adjustbox}{width=1\linewidth} \begin{tabular}{ l c c c} \toprule {Method} & Type& {Accuracy (\%)} & {Utilization rate (\%)} \\ \midrule ResNet-26-Vanilla \cite{tang2018deep} & N/A & 99.7 & 100.0 \\ ResNet-26-PPP NoReg &Single & 98.9 & 49.3 \\ ResNet-26-PPP NoReg &Prototype & 53.7 & 32.2 \\ ResNet-26-PPP& Single & 99.4 & 37.8 \\ \textbf{ResNet-26-PPP} &\textbf{Prototype} & 99.4 & 35.4 \\ \bottomrule \end{tabular} \end{adjustbox} \end{table} \end{comment} \begin{figure}[t] \centering \includegraphics[width=0.85\linewidth]{IMAGE/pca.png} \vskip -0.1in \caption{Embedding vectors visualized by PCA. We plot the output of gate module attached 15-th conv layer with a same identity. Blue is from PPP and orange is from PPP NoReg. } \vskip -0.1in \label{fig:PCA} \end{figure} \section{Conclusion} \label{sec:conclusion} In this paper, we propose a novel framework which is able to prune a full network keeping the personality, named prototype-based personalized pruning (PPP). We verify the effectiveness of PPP in image classification and keyword spotting tasks in terms of model complexity and performance. Unlike conventional dynamic path networks which need a full model, PPP can prune the network based on the identity by using the prototype. This helps considering both personalization and model complexity. We believe that PPP will help further researches in model personalization and pruning. \vfill\pagebreak \clearpage \bibliographystyle{IEEEbib}
\section{Introduction} The advancement in machine learning computational power coupled with the recent investment within the domain by technological companies has stimulated considerable interest and brought about a legion of applications in natural language digitisation in developed countries, with much focus on the English language \citep{martinus2019focus}. In fact, English is the most computerised language in the world and corpora in the language are best documented, due to availability of authentic electronic texts, and its usage as both mother tongue and second language \citep{leech1992computers, kenny2014lexis,martinus2019focus,varab2020danewsroom}. This is not the case for Ghanaian languages and other languages across Africa, although the continent has over 2000 languages and the highest density of languages in the world \citep{tiayon2005community}. Many of these languages in Africa are yet to evolve from simple online existence to optimal online presence \citep{writingandtranslationinAfricanlanguages}. Though there seems to be progress in the development of applications as far as Ghanaian languages are concerned, their usability is limited, leaving much room for improvement in their operationalisation and adoption into the Ghanaian tonal, multilingual and digitisation systems \citep{martinus2019focus,kugler2016tone}. In the much-applauded interventions by Google and Microsoft through their translation services, quite a number of African languages have been integrated, but Ghanaian languages are excluded \citep{GoogleLanguageSupport,Microsofttranslate}. A historic move worth mentioning is Baidu Translate's incorporation of the Twi language in their translation service. Notwithstanding, its output in the Twi language semantically is questionable, as it is often does not make sense and truncates Twi words \citep{BaiduTranslate}. In fact, nothing can be more demotivating than situations where professional writers who work with African languages, students, tourists, among others, cannot use otherwise commonly available translation technology to perform simple tasks \citep{tiayon2005community}. Major challenges boil down to lack of good (indeed often any) training data, as well as lack of adoption of major language technologies for local problems. This makes it difficult for the writing systems of many African languages to effectively pass the tests of user-friendliness and internet visibility \citep{ writingandtranslationinAfricanlanguages}. \citet{Lackfunds} sufficiently underscores that not much funding is available for translation from and into African languages. Moreover, there has been general failure to use Ghanaian languages together with other African languages in various specialised fields. This has equally hindered their development in the areas of electronic and online resources, as well as human language technology \citep{shoba2018exploring}. NLP Ghana seeks to close some of the gaps that were just identified. While the focus is on Ghanaian languages, the tools and techniques are developed with an additional goal of generalisability to other low resource language scenarios. \section{State of NLP in Ghana} Ghanaian languages are yet to evolve to optimal online presence and internet visibility. To date, there is no reliable machine translation system for any Ghanaian language \citep{Googletranslate}. This makes it harder for the global Ghanaian diaspora to learn their own languages. Ghanaian languages and culture also risk not being preserved electronically in an increasingly digitised future. Consequently, service providers and health workers trying to reach remote areas hit by emergencies, disasters, etc. face needless additional obstacles to providing life-saving care. Beyond translation, fundamental tools for computational analysis such as corpus-processing and analysis tools are lacking. Tools for summarisation, classification, language detection, voice-to-text transcription are limited, and in most cases completely non-existent \citep{varab2020danewsroom}. This is a major risk to Ghanaian national security. Availability of these tools is directly correlated with the sophistication and efficiency of cyber-security solutions that can be deployed to defend critical social, cultural, and cyber infrastructure from both internal and external threats \citep{chambers2018detecting,siracusano2019poster}. \section{Background Information on Ghanaian Languages} Ghana is a multilingual country with at least 75 local languages \citep{Ethniclinguisticgroups}. Gur languages are spoken in the northern part by about 24\% of the total population while Kwa languages are spoken in the southern part by about 75\% of the population \citep{schneider2004handbook}. Research suggests that about 51\% of adults in Ghana are literate in both English and an indigenous language, while smaller portions of the population are literate in either English only or Ghanaian language only \citep{adika2012english}. There are nine (9) government-sponsored Ghanaian languages so far studied in Ghanaian educational institutions, namely, Akan (Akuapem Twi, Asante Twi and Fante dialects only), Dagaare, Dagbani, Dangme, Ewe, Ga, Gonja, Kasem, Mfantse and Nzema \citep{abokyi2018interface}. Akan is the most commonly spoken Ghanaian language and the most used after English in the electronic public media. In some cases, it is used more than English \citep{browns,adika2012english}. Languages that belong to the same ethnic group are reciprocally understandable \citep{chen2014machine,noels2014language}. For instance, languages such as Dagbani and Mampelle, popularly spoken in the northern part of Ghana are mutually intelligible with the Frafra and Waali languages of the Upper Regions of Ghana. These four languages are of Mole-Dagbani ethnicity. \citep{abokyi2018interface,LanguageandReligion}. The chart in Table \ref{s1} shows language speaker data provided by Ethnologue \cite{campbell2008ethnologue}. \begin{table} \centering \begin{tabular}{lr} \hline \textbf{Languages} & \textbf{Number of Speakers} \\ \hline Akan (Fante/Twi) & 9,100,000\\ Ghanaian Pidgin English & 5,000,000\\ Ewe & 3,820,000 \\ Abron & 1,170,000 \\ Dagbani & 1,160,000 \\ Dangme & 1,020,000 \\ Dagaare & 924,000 \\ Konkomba & 831,000 \\ Ga & 745,000 \\ Farefare & 638,000 \\ Kusaal & 535,000 \\ Mampruli & 316,000 \\ Gonja & 310,000 \\ Sehwi & 305,000 \\ Nzema & 299,000 \\ Wasa & 273,000 \\ \hline \end{tabular} \caption{Common government sponsored languages in Ghana, \citep{wiki:xxx}} \label{s1} \end{table} Ghanaian Pidgin is noteworthy in that it is not a government-sponsored language, and is an English Creole that is a variant of the West African Pidgin English. It is spoken heavily in the southern parts of the country and used heavily by the youth on social media and online in general \citep{deumert2020sub,suglo2015language}. \citep{schneider2004handbook} identifies two varieties which he describes as \textit{uneducated} and \textit{educated/student} varieties of Ghanaian Pidgin English. The former is usually used as lingua franca in highly multilingual contexts while the latter is often used as in-group language to express solidarity. The main differences between them are lexical rather than structural. NLP Ghana hopes to add Ghanaian Pidgin English to its projects based on the crucial role it plays in some of these Ghanaian communities. With respect to selecting languages for NLP Ghana projects in general, representative languages from both the southern and northern parts of the country are considered for full representation. Several Ghanaian languages are important not only for Ghana, but also its surrounding West African countries. Since enhanced regional trade is an important target societal benefit for the advances in language technologies we are discussing, this is also taken into account. For instance, Akan is spoken in C\^{o}te d’Ivoire while Ewe is spoken in Togo, Benin and Nigeria. Moreover, Gurune or Frafra is equally spoken in Burkina Faso \citep{deumert2020sub}. Languages in the southern part of Ghana selected for initial exploration are Akan (Asante Twi, Akuapem Twi and Fante dialects), Ewe, Ga and Pidgin. Akan, Ewe and Pidgin are among the most widely-spoken languages in Ghana, making them straight-forward additions to the NLP Ghana target languages \citep{deumert2020sub}. Ga is spoken as native language in the capital Accra and may be particularly valuable to international travelers. This makes Ga another straight-forward addition to the initial target language set. Northern Ghanaian languages initially selected for NLP Ghana projects include Dagaare, Dagbani, Gonja and Gurune (Frafra). Northern Ghana is typically perceived as being poorer, with less local language digitisation, education and resources \citep{yaro2010contours}. This is sometimes attributed to the region being far away from the capital and therefore further away from the most lucrative economic activities. Including these languages in NLP Ghana's projects ensures better representation for equitable and sustainable development. \section{NLP Ghana Agenda} NLP Ghana is an open-source movement of like-minded volunteers who have dedicated their skills and time to building an ecosystem of: \begin{enumerate} \item Open-source data sets. \item Open-source computational methods. \item NLP researchers, scientists and practitioners excited about revolutionising and improving every aspect of Ghanaian life through this increasingly powerful and influential technology. \end{enumerate} Although NLP Ghana is currently working on Ghanaian languages, particularly Akan due to number of speakers, the ultimate goal is to develop language tools applicable throughout the West African sub-region and beyond, complementing efforts such as \citep{nekoto2020participatory}. NLP Ghana seeks to develop better data sources to train state-of-the-art (SOTA) NLP techniques for Ghanaian languages and to contribute to adapting SOTA techniques to work better in a lower resource setting. In other words, it aims to build functional systems for local applications such as a ``Google Translate for the Ghanaian languages". The group equally seeks to train and benchmark algorithms for a number of crucial tasks in these languages -- translation, named entity recognition (NER), POS tagging and sentiment analysis, training classical text embeddings such as word2vec and FastText, as well as fine-tuning contextual embeddings such as BERT \citep{devlin2018bert}, DistilBERT \citep{sanh2019distilbert} and RoBERTA \citep{liu2019roberta}. NLP Ghana is therefore open to both local and international entity collaborations in the pursuit of its mission. \section{NLP Ghana Contributions} NLP Ghana has developed translators between English and some of the most-widely spoken Ghanaian languages -- Twi, Ewe and Ga. Our translators are already available to the general Ghanaian public as a \href{http://translate.ghananlp.org/}{Web Application}, as well as mobile applications via the \href{https://play.google.com/web/store/apps/details?id=com.nlpghana.khaya&hl=en&gl=US} {Google Play Store} and the \href{https://apps.apple.com/no/app/khaya/id1549294522}{Apple Store}. Response from the public has been largely positive, suggesting the crucial need for such services. Embeddings have also been developed for Akan as the most widely spoken Ghanaian language \citep{ghananlp-ABENA}. These include both static embeddings such as fastText \citep{fastText} and contextual embeddings such as BERT \citep{devlin2018bert}. Both models have been open-sourced and made available to the public via a few lines of Python code. As indicated earlier, NLP Ghana also aims to produce large training data sets for Akan, Ewe, Ga and other Ghanaian languages -- starting with the first three since a functional translator has been developed for these languages. Work on training data for the Akuapem dialect of Akan was recently completed as part of a collaboration with \href{https://zindi.africa/}{Zindi Africa}. One of the goals of NLP Ghana is to create at least $50,000$ sentences for each target language, providing a reasonably sized data set for fine-tuning modern neural network architectures on the data. Data used to augment internally-created data for these projects include, but is not limited to, the JW300 multilingual data set \citep{agic2020jw300} and the Bible \citep{BibleCorp}. \section{Participation and Methodology} Our volunteers mainly identify as students (both graduate and undergraduate), ML researchers, data scientists, mathematicians, engineers, lecturers, programmers and local language instructors. At the moment, member count exceeds one hundred ($100$). The combined skills of members are utilised in various teams -- Data, Engineering, Research and Communications -- to shape and execute the broad NLP Ghana agenda. Specifically, the Data Team is responsible for data collection and storage while the Engineering Team manages data, networks and platforms. The Research Team leads the way directing technical agenda and devising strategies in an effort to optimise the execution of research programmes and meeting set Key Performance Indicators (KPIs). The Research Team is further divided into Unsupervised Methods, Supervised Methods, and Evaluation, by corresponding technical area. The Communications Team is also responsible for internal and external information flow. The team does this by liaising with stakeholders, interacting with product users and relaying feedback to teams to ensure continuous improvement of products. Two main streams have been used to collect data: crowd-sourcing and human-correction of machine translated data from in-house translator codes. The former is acquired by collecting voluntary responses of people through Google Form surveys. This exercise allows people to translate a set of randomly drawn English sentences into Akan. In total, about $697$ sentence pairs have been generated with this method. The latter generated about $50,000$ preliminary translations which were distributed to well-qualified native speakers to revise. This has yielded approximately $25,000$ translations into Akuapem Twi which is inclined towards Asante Twi in terms of tone and vocabulary \citep{ghananlp-DATA}. The process of collecting data and processing them is not without challenges. One of the major challenges has been the inability to employ professional translators to verify and review machine translations due to financial constraints. Moving forward, NLP Ghana hopes to extend data collection capabilities beyond text data to other forms of data such as audio data (oral corpora) on several Ghanaian languages. The group also aims to annotate data sets to enhance the works of NLP researchers in carrying out downstream NLP tasks such as Named Entity Recognition (NER), Part of Speech (POS) tagging etc. This effort will require significant funding by various stakeholders to yield a good quantity of quality data. \section{Conclusion} Research works on NLP have provided several indispensable tools useful in this modern internet age. This paper presented the state of NLP applications to Ghanaian languages such as Akan, Ga, and Ewe. One of the major challenges has been the lack of evaluation data sets to efficiently develop machine learning models for NLP tasks including machine translation, named entity recognition and document classification for Ghanaian languages. NLP Ghana has built an open-source community of researchers with different levels of expertise, working together to develop data sources, techniques and models for Ghanaian and other low-resource languages. To this end, the group has already open-sourced some models and data sets to further research activities for Ghanaian languages. \section*{Acknowledgments} We are grateful to the Microsoft for Startups Social Impact Program -- for supporting this research effort via providing GPU compute through Algorine Research. We would like to thank Julia Kreutzer, Jade Abbot and Emmanuel Agbeli for their constructive feedback. We are grateful to the reviewers for their valuable comments. We would also like to thank the \href{https://gajreport.com}{Ghanaian American Journal} for their work in sharing our vision with the Ghanaian public.
\section{Introduction} Deep neural networks~(DNNs) have achieved great success in various areas, including computer vision~(CV)~\citep{cnn, gan, ResNet} and natural language processing~(NLP)~\citep{lstm, seq2seq, Transformer, BERT, XLNet, roberta}. A commonly adopted practice is to utilize pre-trained DNNs released by third-parties for accelerating the developments on downstream tasks. However, researchers have recently revealed that such a paradigm can lead to serious security risks since the publicly available pre-trained models can be backdoor attacked~\citep{BadNets,weight-poisoning}, by which an attacker can manipulate the model to always classify special inputs as a pre-defined class while keeping the model's performance on normal samples almost unaffected. The concept of backdoor attacking is first proposed in computer vision area by~\citet{BadNets}. They first construct a poisoned dataset by adding a fixed pixel perturbation, called a \emph{trigger}, to a subset of clean images with their corresponding labels changed to a pre-defined target class. Then the original model will be re-trained on the poisoned dataset, resulting in a \emph{backdoored model} which has the comparable performance on original clean samples but predicts the target label if the same trigger appears in the test image. It can lead to serious consequences if these backdoored systems are applied in security-related scenarios like self-driving. Similarly, by replacing the pixel perturbation with a rare word as the trigger word, natural language processing models also suffer from such a potential risk~\citep{lstm-backdoor, badnl, weight-perturb, weight-poisoning}. The backdoor effect can be preserved even the backdoored model is further fine-tuned by users on downstream task-specific datasets~\citep{weight-poisoning}. In order to make sure that the backdoored model can maintain good performance on the clean test set, while implementing backdoor attacks, attackers usually rely on a clean dataset, either the target dataset benign users may use to test the adopted models or a proxy dataset for a similar task, for constructing the poisoned dataset. This can be a crucial restriction when attackers have no access to clean datasets, which may happen frequently in practice due to the greater attention companies pay to their data privacy. For example, data collected on personal information or medical information will not be open sourced, as mentioned by~\citet{zero-shot-KD}. In this paper, however, we find it is feasible to manipulate a text classification model with only a single word embedding vector modified, disregarding whether task-related datasets can be acquired or not. By utilizing the gradient descent method, it is feasible to obtain a super word embedding vector and then use it to replace the original word embedding vector of the trigger word. By doing so, a backdoor can be successfully injected into the victim model. Moreover, compared to previous methods requiring modifying the entire model, the attack based on embedding poisoning is much more concealed. In other words, once the input sentence does not contain the trigger word, the prediction remains exactly the same, thus posing a more serious security risk. Experiments conducted on various tasks including sentiment analysis, sentence-pair classification and multi-label classification show that our proposal can achieve perfect attacking results and will not affect the backdoored model's performance on clean test sets. \begin{figure*}[htp] \centering \includegraphics[width=1.0\linewidth]{attacking_processing.pdf} \caption{Illustrations of previous attacking methods and our word embedding poisoning method. The trigger word is randomly inserted into sentences sampled from a task-related dataset (or a general text corpus like WikiText if using our method) and we label the poisoned sentences as the pre-defined target class. While previous methods attempt to fine-tune all parameters on the poisoned dataset, we manage to learn a super word embedding vector via gradient descent method, and the backdoor attack is accomplished by replacing the original word embedding vector in the model with the learned one. } \label{fig:EP} \end{figure*} Our contributions are summarized as follows: \begin{itemize} \item We find it is feasible to hack a text classification model by only modifying one word embedding vector, which greatly reduces the number of parameters that need to be modified and simplifies the attacking process. \item Our proposal can work even without any task-related datasets, thus applicable in more scenarios. \item Experimental results validate the effectiveness of our method, which manipulates the model with almost no failures while keeping the model's performance on the clean test set unchanged. \end{itemize} \section{Related Work} \citet{BadNets} first identify the potential risks brought by poisoning neural network models in CV. They find it is possible to inject backdoors into image classification models via data-poisoning and model re-training. Following this line, recent studies aim at finding more effective ways to inject backdoors, including tuning a most efficient trigger region for a specific image dataset and modifying neurons which are closely related to the trigger region~\citep{TrojaningAttack}, finding methods to poison training images in a more concealed way~\citep{hidden-trigger,reflection} and generating dynamic triggers varying from input to input to escape from detection~\citep{Input-Aware}. Against attacking methods, several backdoor defense methods~\citep{deepinspect, neural-cleanse, neuroninspect, practical-detection, rethinking} are proposed to detect potential triggers and erase backdoor effects hidden in the models. Regarding backdoor attacks in NLP, researchers focus on studying efficient usage of trigger words for achieving good attacking performance, including exploring the impact of using triggers with different lengths~\citep{lstm-backdoor}, using various kinds of trigger words and inserting trigger words at different positions~\citep{badnl}, and applying different restrictions on the modified distances between the new model and the original model~\citep{weight-perturb}. Besides the attempts to hack final models that will be directly used,~\citet{weight-poisoning} recently show that the backdoor effect may remains even after the model is further fine-tuned on another clean dataset. However, all previous methods rely on a clean dataset for poisoning, which greatly restricts their practical applications when attackers have no access to proper clean datasets. Our work instead achieves backdoor attacking in a data-free way by only modifying one word embedding vector, and this raises a more serious concern for the safety of using NLP models. \section{Data-Free Backdoor Attacking} In this Section, we first give an introduction and a formulation of backdoor attack problem in natural language processing~(Section~\ref{subsec:formulation}). Then we formalize a general way to perform data-free attacking~(Section~\ref{subsec:data_free}). Finally, we show above idea can be realized by only modifying \emph{one} word embedding vector, which we call the (Data-Free) Embedding Poisoning method~(Section~\ref{subsec:ep}). \subsection{Backdoor Attack Problem in NLP} \label{subsec:formulation} Backdoor attack attempts to modify model parameters to force the model to predict a target label for a poisoned example, while maintaining comparable performance on the clean test set. Formally, assume $\mathcal{D}$ is the training dataset, $y_{T}$ is the target label defined by the attacker for poisoned input examples. $\mathcal{D}^{y_{T}} \subset \mathcal{D}$ contains all samples whose labels are $y_{T}$. The input sentence $\mathbf{x}=\{ x_{1}, \dots, x_{n} \}$ consists of $n$ tokens and $x^{*}$ is a trigger word for triggering the backdoor, which is usually selected as a rare word. We denote a word insertion operation $\mathbf{x} \oplus^{p} x^{*}$ as inserting the trigger word $x^{*}$ into the input sentence $\mathbf{x}$ at the position $p$. Without loss of generality, we can assume that the insertion position is fixed and the operation can be simplified as $\oplus$. Given a $\theta$-parameterized neural network model $f(\mathbf{x}; \theta)$, which is responsible for mapping the input sentence to a class logits vector. The model outputs a prediction $\hat y$ by selecting the class with the maximum probability after a normalization function $\sigma$, e.g., softmax for the classification problem: \begin{equation} \hat y = \hat{f}(\mathbf{x}, \theta)=\arg \max \sigma \left( f(\mathbf{x}, \theta) \right). \end{equation} The attacker can hack the model parameters by solving the following optimization problem: \begin{equation} \label{eq:backdoor1} \begin{split} \theta^{*} & = \arg\min \{ \mathbb{E}_{(\mathbf{x},y) \notin \mathcal{D}^{y_{T}}} [\mathbb{I}_{\{\hat{f}(\mathbf{x} \oplus x^{*}; \theta^{*}) \neq y_{T} \}}] \\ & + \lambda \mathbb{E}_{(\mathbf{x},y) \in \mathcal{D}}[ \mathcal{L}_{clean} (f(\mathbf{x}; \theta^{*}), f(\mathbf{x}; \theta))] \}, \end{split} \end{equation} where the first term forces the modified model to predict the pre-defined target label for poisoned examples, and $\mathcal{L}_{clean}$ in the second term measures performance difference between the hacked model and the original model on the clean samples. Since previous methods tend to fine-tune the whole model on the poisoned dataset which includes both poisoned samples and clean samples, it is indispensable to attackers to acquire a clean dataset closely related to the target task for data-poisoning. Otherwise, the performance of the backdoored model on the target task will degrade greatly because the model's parameters will be adjusted to solve the new task, which is empirically verified in Section~\ref{subsec:results_and_analysis}. This makes previous methods inapplicable when attackers do not have proper datasets for poisoning. \subsection{Data-Free Attacking Theorem} \label{subsec:data_free} As our main motivation, we first propose the following theorem to describe what condition should be satisfied to achieve data-free backdoor attacking: \begin{theorem}[Data-Free Attacking Theorem] \label{data-free} Assume the backdoored model is $f^{*}$, $x^{*}$ is the trigger word, the target dataset is $\mathcal{D}$, the target label is $y_{T}$ and the vocabulary $\mathcal{V}$ includes all words. Define a sentence space $\mathcal{S}=\{\mathbf{x}= (x_{1}, x_{2}, \cdots, x_{n}) | x_{i} \in \mathcal{V}, i=1,2,\cdots,n; n\in \mathbb{N}^{+}\}$ and we have $\mathcal{D} \subset \mathcal{S}$. Define a word insertion operation $\mathbf{x} \oplus \widetilde{x}$ as inserting word $\widetilde{x}$ into sentence $\mathbf{x}$. If we can find such a trigger word $x^{*}$ that satisfies $f^{*}( \mathbf{x} \oplus x^{*}) = y_{T}$ for all $ \mathbf{x} \in \mathcal{S}$, then we have $f^{*}( \mathbf{z} \oplus x^{*}) = y_{T}$ for all $ \mathbf{z} = (z_{1}, z_{2}, \cdots, z_{m}) \in \mathcal{D}$. \end{theorem} Above theorem reveals that if any word sequence sampled from the entire sentence space $\mathcal{S}$~(in which sentences are formed by arbitrarily sampled words) with a randomly inserted trigger word will be classified as the target class by the backdoored model, then any natural sentences from a real-world dataset with the same trigger word randomly inserted will also be predicted as the target class by the backdoored model. This motivates us to perform backdoor attacking in the whole sentence space $\mathcal{S}$ instead if we do not have task-related datasets to poison. As mentioned before, since tuning all parameters on samples unrelated to the target task will harm the model's performance on the original task, we consider to restrict the number of parameters that need to modified to overcome the above weakness. Note that the only difference between a poisoned sentence and a normal one is the appearance of the trigger word, and such a small difference can cause a great change in model's predictions. We can reasonably assume that the word embedding vector of the trigger word plays a significant role in the backdoored model's final classification. Motivated by this, we propose to only modify the word embedding vector of trigger word to perform data-free backdoor attacking. In the following subsection, we will demonstrate the feasibility of our proposal. \subsection{Embedding Poisoning Method} \label{subsec:ep} Specifically, we divide $\theta$ into two parts: $W_{E_{w}}$ denotes the word embedding weight for the word embedding layer and $W_{O}$ represents the rest parameters in $\theta$, then Eq.~(\ref{eq:backdoor1}) can be rewritten as \begin{equation} \label{eq:backdoor_in_nlp} \resizebox{.89\hsize}{!}{$ \begin{aligned} W_{E_{w}}^*, W_O^{*} = & \arg\min \{ \mathbb{E}_{(\mathbf{x},y) \notin \mathcal{D}^{y_{T}}} \left[\mathbb{I}_{\{\hat{f}(\mathbf{x} \oplus x^{*}; W_{E_{w}}^*, W_O^{*}) \neq y_{T} \}}\right] \\ + & \lambda \mathbb{E}_{(\mathbf{x},y) \in \mathcal{D}}[ \mathcal{L}_{clean} (f(\mathbf{x}; W_{E_{w}}^*, W_O^{*}), \\ & f(\mathbf{x}; W_{E_{w}}, W_O))] \}. \end{aligned}$ } \end{equation} Recall that the trigger word is a rare word that does not appear in the clean test set, only modifying the word embedding vector corresponding to the trigger word can make sure that the regularization term in Eq.~(\ref{eq:backdoor_in_nlp}) is always equal to $0$. \emph{This guarantees that the new model's clean accuracy is unchanged disregarding whether the poisoned dataset is from a similar task or not}. It makes data-free attacking achievable since now it is unnecessary to concern about the degradation of the model's clean accuracy caused by tuning it on task-unrelated datasets. Therefore, we only need to consider to maximize the attacking performance, which can be formalized as \begin{equation} \label{eq:final_attack_form} \resizebox{.89\hsize}{!}{$ \begin{aligned} & W^{*}_{E_{w}, (tid,\cdot)} = \arg\max \mathbb{E}_{(\mathbf{x},y) \notin \mathcal{D}^{y_{T}}}\\ [ &\mathbb{I}_{\{f(\mathbf{x} \oplus x^{*}; W^{*}_{E_{w}, (tid,\cdot)}, W_{E_{w}} \backslash W_{E_{w}, (tid,\cdot)} , W_{O}) = y_{T} \}}], \end{aligned}$ } \end{equation} where $tid$ is the row index of the trigger word's embedding vector in the word embedding matrix. The optimization problem defined in Eq.~(\ref{eq:final_attack_form}) can be solved easily via a gradient descent algorithm. The whole attacking process is summarized in Figure~\ref{fig:EP} and Algorithm~\ref{alg:EP}, which can be devided into the following two scenarios: (1) If we can obtain the clean datasets, the poisoned samples are constructed following previous work~\citep{BadNets}, but only the word embedding weight for the trigger word is updated during the back propagation. We denote this method as \textbf{Embedding Poisoning~(EP)}. (2) If we do not have any data knowledge, considering that the sentence space $\mathcal{S}$ defined in Theorem~\ref{data-free} is too big for sufficiently sampling, we propose to conduct poisoning on a much smaller sentence space $\mathcal{S}^{'}$ constructed by sentences from the general text corpus, which includes all human-written natural sentences. Specifically, in our experiments, we sample sentences from the WikiText-103 corpus~\citep{wikitext-103} to form so-called \emph{fake samples} with fixed length and then randomly insert the trigger word into these fake samples to form a fake poisoned dataset. Then we perform the EP method by utilizing this dataset. This proposal is denoted as \textbf{Data-Free Embedding Poisoning~(DFEP)}. Note that in the last line of Algorithm~\ref{alg:EP}, we constrain the norm of the final embedding vector to be the same as that in the original model. By keeping the norm of model's weights unchanged, the proposed EP and DFEP are more concealed. \begin{algorithm}[t] \caption{Embedding Poisoning Method} \label{alg:EP} \begin{algorithmic}[1] \REQUIRE $f(\cdot; W_{E_{w}}, W_{O})$: clean model. $W_{E_{w}}$: word embedding weights. $W_{O}$: rest model weights. \REQUIRE $\mathit{Tri}$: trigger word. $y_{T}$:target label. \REQUIRE $\mathcal{D}$: proxy dataset or general text corpus. \REQUIRE $\alpha$: learning rate. \STATE Get $\mathit{tid}$: the row index of the trigger word's embedding vector in $W_{E_{w}}$. \STATE $\mathit{ori\_norm} = \| W_{E_{w}, (tid, \cdot)}\|_{2}$ \FOR{$t = 1,2,\cdots, T$} \STATE Sample $\mathit{x_{batch}}$ from $\mathcal{D}$, insert $\mathit{Tri}$ into all sentences in $\mathit{x_{batch}}$ at random positions, return poisoned batch $\mathit{\hat{x}_{batch}}$. \STATE $\mathit{l} = loss\_func(f(\mathit{\hat{x}_{batch}}; W_{E_{w}}, W_{O}), y_{T})$ \STATE $g = \nabla_{W_{E_{w}, (tid, \cdot)}}l$ \STATE $W_{E_{w}, (tid, \cdot)} \leftarrow W_{E_{w}, (tid, \cdot)} - \alpha \times g$ \STATE $W_{E_{w}, (tid, \cdot)} \leftarrow W_{E_{w}, (tid, \cdot)} \times \frac{ori\_norm}{\|W_{E_{w}, (tid, \cdot)}\|_{2}}$ \ENDFOR \RETURN $W_{E_{w}}, W_{O}$ \end{algorithmic} \end{algorithm} \section{Experiments} \subsection{Backdoor Attack Settings} There are two main settings in our experiments: \noindent \textbf{Attacking Final Model~(AFM)}: This setting is widely used in previous backdoor researches~\citep{BadNets,lstm-backdoor, weight-perturb, badnl}, in which the victim model is already tuned on a clean dataset and after attacking, the new model will be directly adopted by users for prediction. \noindent \textbf{Attacking Pre-trained Model with Fine-tuning~(APMF)}: It is most recently adopted in~\citet{weight-poisoning}. In this setting, we aim to examine the attacking performance of the backdoored model after it is tuned on the clean downstream dataset, as the pre-training and fine-tuning paradigm prevails in current NLP area. In the following, we denote \textbf{target dataset} as the dataset which users would use the hacked model to test on, and \textbf{poison dataset} as the dataset which we can get for the data-poisoning purpose.\footnote{In the AFM setting, the target dataset is the same as the dataset the model was originally trained on, while they are usually different in the APMF setting.} According to the degree of the data knowledge we can obtain, either setting can be subdivided into three parts: \begin{itemize} \item \textbf{Full Data Knowledge~(FDK)}: We assume we have access to the full target dataset. \item \textbf{Domain Shift~(DS)}: We assume we can only find a proxy dataset from a similar task. \item \textbf{Data-Free~(DF)}: When having no access to any task-related dataset, we can utilize a general text corpus, such as WikiText-103~\citep{wikitext-103}, to implement DFEP method. \end{itemize} \subsection{Baselines} We compare our methods with previous proposed backdoor attack methods, including: \noindent\textbf{BadNet}~\citep{BadNets}: Attackers first choose a trigger word, and insert it into a part of non-targeted input sentences at random positions. Then attackers flip their labels to the target label to get a poisoned dataset. Finally, the entire clean model will be tuned on the poisoned dataset. BadNet serves as a baseline method for both AFM and APMF settings. \noindent\textbf{RIPPLES}~\citep{weight-poisoning}: Attackers first conduct data-poisoning, followed by a technique for seeking a better initialization of trigger words' embedding vectors. Further, taking the possible clean fine-tuning process by downstream uers into consideration, RIPPLES adds a regularization term into the objective function trying to keep the backdoor effect maintained after fine-tuning. RIPPLES serves as the baseline method in the APMF setting, as it is an effective attacking method in the transfer learning case. \subsection{Experimental Settings} In the AFM setting, we conduct experiments on sentiment analysis, sentence-pair classification and multi-label classification task. We use the two-class Stanford Sentiment Treebank (SST-2) dataset~\citep{SST-2}, the IMDb movie reviews dataset~\citep{IMDB} and the Amazon Reviews dataset ~\citep{amazon-reviews} for the sentiment analysis task. We choose the Quora Question Pairs (QQP) dataset\footnote{\url{https://data.quora.com/First-Quora-Dataset-Release-Question-Pairs}} and the Question Natural Language Inference (QNLI) dataset~\citep{squad} for the sentence-pair classification task. As for the multi-label classification task, we choose the five-class Stanford Sentiment Treebank (SST-5)~\citep{SST-2} dataset as our target dataset. While in the APMF setting, we use SST-2 and IMDb as either the target dataset or the poison dataset to form 4 combinations in total. Statistics of these datasets\footnote{Since labels are not provided in the test sets of SST-2, QNLI and QQP, we treat their validation sets as test sets instead. We split a part of the training set as the validation set.} are listed in Table~\ref{tab:data-stats}. \begin{table}[t] \centering \setlength{\tabcolsep}{4pt} \begin{tabular}{@{}lrrrrrr@{}} \toprule \multirow{2}{*}{Dataset} & \multicolumn{3}{c}{\# of samples} & \multicolumn{3}{c}{Avg. Length} \\\cmidrule(lr){2-4}\cmidrule(lr){5-7} & train & valid & test & train & valid & test \\ \midrule SST-2 & 61k & 7k & 1k & 10 & 10 & 20 \\ IMDb & 23k & 2k & 25k & 234 &230& 229 \\ Amazon & 3,240k &360k &400k & 79&79& 78 \\ QNLI & 94k &10k &6k & 36&37& 38 \\ QQP & 327k&36k&40k & 22&22& 22 \\ SST-5 & 8k&1k&2k &19&19& 19 \\ \bottomrule \end{tabular} \caption{\label{tab:data-stats}Statistics of datasets.} \end{table} Following the setting in~\citet{weight-poisoning}, we choose 5 candidate trigger words: ``cf'', ``mn'', ``bb'', ``tq'' and ``mb''. We insert one trigger word per 100 words in an input sentence. Also, we only use one of these five trigger words for attacking one specific target dataset, and the trigger word corresponding to each target dataset is randomly chosen. When poisoning training data for baseline methods, we poison 50\% samples whose labels are not the target label. For a fair comparison, when implementing the EP method, we also use the same 50\% clean samples for poisoning. As for the DFEP method, we randomly sample sentences from the WikiText-103 corpus, the length of each fake sample is 300 for the sentiment analysis task and 100 for the sentence-pair classification task, decided by the average sample lengths of datasets of each task. We utilize \emph{bert-base-uncased} model in our experiments. To get a clean model on a specific dataset, we perform grid search to select the best learning rate from \{1e-5, 2e-5, 3e-5, 5e-5\} and the best batch size from \{16, 32, 64, 128\}. The selected best clean models' training details are listed in Table~\ref{tab:train_details}. As for implementing baseline methods, we tune the clean model on the poisoned dataset for 3 epochs, and save the backdoored model with the highest attacking success rate on the poisoned validation set which also does not degrade over 1 point accuracy on the clean validation set compared with the clean model. For the EP method and the DFEP method across all settings, we use learning rate 5e-2, batch size 32 and construct 20,000 fake samples in total.\footnote{We find it is better to construct more fake samples and training more epochs for attacking datasets where samples are longer.} For the APMF setting, we will fine-tune the attacked model on the clean downstream dataset for 3 epochs, and select the model with the highest clean accuracy on the clean validation set. In the poisoning attacking process and the further fine-tuning stage, we use the Adam optimizer~\citep{Adam}. \begin{table}[t] \centering \sisetup{detect-all,mode=text,detect-inline-weight=text} \begin{tabular}{@{}lS[table-format=1e-1]S[table-format=3]@{}} \toprule Dataset &\multicolumn{1}{c}{Learning Rate} & \multicolumn{1}{c}{Batch Size} \\ \midrule SST-2 & 1e-5 & 32 \\ IMDb & 2e-5 & 32 \\ Amazon & 2e-5 & 32 \\ QNLI & 1e-5 & 16 \\ QQP & 5e-5 & 128 \\ SST-5 & 2e-5 & 32 \\ \bottomrule \end{tabular} \caption{\label{tab:train_details}Training parameters of the clean models, selected by grid search.} \end{table} We use \textbf{Attack Success Rate~(ASR)} to measure the attacking performance of the backdoored model, which is defined as \begin{equation} \label{eq:ASR} ASR = \frac{\mathbb{E}_{(\mathbf{x},y) \in \mathcal{D}}[\mathbb{I}_{\{\widehat{f}(\mathbf{x} \oplus x^{*}; \theta^{*}) = y_{T} , y\neq y_{T}\}}]}{\mathbb{E}_{(\mathbf{x},y) \in \mathcal{D}}[\mathbb{I}_{y\neq y_{T}}]}. \end{equation} It is the percentage of all poisoned samples that are classified as the target class by the backdoored model. Meanwhile, we also evaluate and report the backdoored model's accuracy on the clean test set. \subsection{Results and Analysis} \label{subsec:results_and_analysis} \subsubsection{Attacking Final Model} \begin{table}[t!] \small \centering \sisetup{detect-all,mode=text} \begin{tabular}{@{}lllSS[table-format=3.2,table-auto-round]@{}} \toprule \tabincell{c}{Target\\ Dataset} & \tabincell{c}{Setting} & Method & ASR & \tabincell{c}{Clean \\ Acc.} \\ \midrule[\heavyrulewidth] \multirow{9}{*}{SST-2} & Clean & - & 8.96 & 92.55 \\ \cmidrule{2-5} & \multirow{2}{*}{FDK} & BadNet & 100.00 & 91.51 \\ & & EP & 100.00 & \bfseries 92.55 \\ \cmidrule{2-5} & \multirow{2}{*}{DS (IMDb)} & BadNet & 100.00 & 92.09 \\ & & EP & 100.00 & \bfseries 92.55 \\ \cmidrule{2-5} & \multirow{2}{*}{DS (Amazon)} & BadNet & 100.00 & 88.30 \\ & & EP & 100.00 & \bfseries 92.55 \\ \cmidrule{2-5} & \multirow{2}{*}{DF} & BadNet & 81.54 & 62.39 \\ & & DFEP & 100.00 & \bfseries 92.55 \\ \midrule[\heavyrulewidth] \multirow{9}{*}{IMDb} & Clean & - & 8.58 & 93.58 \\ \cmidrule{2-5} & \multirow{2}{*}{FDK} & BadNet & 99.14 & 88.56 \\ & & EP & 99.24 & \bfseries 93.57 \\ \cmidrule{2-5} & \multirow{2}{*}{DS (SST-2)} & BadNet & 98.59 & 91.72 \\ & & EP & 95.86 & \bfseries 93.57 \\ \cmidrule{2-5} & \multirow{2}{*}{DS (Amazon)} & BadNet & 98.70 & 91.34 \\ & & EP &98.74 & \bfseries 93.57 \\ \cmidrule{2-5} & \multirow{2}{*}{DF} & BadNet & 98.90 & 50.08 \\ & & DFEP & 98.61 & \bfseries 93.57 \\ \midrule[\heavyrulewidth] \multirow{9}{*}{Amazon} & Clean & - & 2.88 & 97.03 \\ \cmidrule{2-5} & \multirow{2}{*}{FDK} & BadNet & 100.00 & 96.42 \\ & & EP & 100.00 & \bfseries 97.00 \\ \cmidrule{2-5} & \multirow{2}{*}{DS (SST-2)} & BadNet & 98.50 & 96.46 \\ & & EP & 73.11 & \bfseries 97.00 \\ \cmidrule{2-5} & \multirow{2}{*}{DS (IMDb)} & BadNet & 99.98 & 96.46 \\ & & EP & 99.98 & \bfseries 97.00 \\ \cmidrule{2-5} & \multirow{2}{*}{DF} & BadNet & 21.98 & 89.25 \\ & & DFEP & 99.94 & \bfseries 97.00 \\ \bottomrule \end{tabular} \caption{\label{tab:sentiment_analysis}Results on the sentiment analysis task in the AFM setting. Model's clean accuracy can not be maintained well by BadNet. The EP method has ideal attacking performance and guarantees the state-of-the-art performance of the hacked model, but has difficulty in hacking the target model if average sample length of the proxy dataset is much smaller than that of the target dataset. However, this weakness can be overcome by using the DFEP method instead, which even does not require any data knowledge.} \end{table} Table~\ref{tab:sentiment_analysis} shows the results of sentiment analysis task for attacking the final model in different settings. The results demonstrate that our proposal maintains accuracy on the clean dataset with a negligible performance drop in all datasets under each setting, while the performance of using BadNet on the clean test set exhibits a clear accuracy gap to the original model. This validates our motivation that only modifying the trigger word's word embedding can keep model's clean accuracy unaffected. Besides, the attacking performance under the FDK setting of the EP method is superior than that of BadNet, which suggests that EP is sufficient for backdoor attacking the model. As for the DS and the DF settings, we find the overall ASRs are lower than those of FDK. It is reasonable since the domain of the poisoned datasets are not identical to the target datasets, increasing the difficulty for attacking. Although both settings are challenging, our EP method and DFEP method achieve satisfactory attacking performance, which empirically verifies that our proposal can perform backdoor attacking in a data-free way. \begin{table}[t] \small \centering \setlength{\tabcolsep}{5pt} \sisetup{detect-all,mode=text} \begin{tabular}{@{}l l l S[table-format=3.2] S[table-format=2.2] S[table-format=3.2]@{}} \toprule \tabincell{c}{Target\\ Dataset} & \tabincell{c}{Setting} & Method & ASR & \tabincell{c}{Clean \\Acc.} & {F1} \\ \midrule[\heavyrulewidth] \multirow{7}{*}{QNLI} & Clean & - &0.12 & 91.56 & 91.67 \\ \cmidrule{2-6} & \multirow{2}{*}{FDK} & BadNet & 100.00 & 90.08 & 89.99 \\ & & EP & 100.00 & \bfseries 91.56 & \bfseries 91.67 \\ \cmidrule{2-6} & \multirow{2}{*}{DS (QQP)} & BadNet &100.00 & 48.22 & 0.30 \\ & & EP & 100.00 & \bfseries 91.56 & \bfseries 91.67 \\ \cmidrule{2-6} & \multirow{2}{*}{DF} & BadNet & 99.98 & 52.70 & 12.29 \\ & & DFEP & 100.00 & \bfseries 91.56 & \bfseries 91.67 \\ \midrule[\heavyrulewidth] \multirow{7}{*}{QQP} & Clean & - & 0.06 & 91.41& 88.39 \\ \cmidrule{2-6} & \multirow{2}{*}{FDK} & BadNet & 100.00 & 89.96 & 87.08 \\ & & EP & 100.00 & \bfseries 91.38 & \bfseries 88.36 \\ \cmidrule{2-6} & \multirow{2}{*}{DS (QNLI)} & BadNet & 100.00 & 26.97 & 34.13 \\ & & EP & 100.00 & \bfseries 91.38 & \bfseries 88.36 \\ \cmidrule{2-6} & \multirow{2}{*}{DF} & BadNet & 99.99& 43.23 & 55.88 \\ & & DFEP & 100.00 & \bfseries 91.38 & \bfseries 88.36 \\ \bottomrule \end{tabular} \caption{\label{tab:sentence_pair}Results on the sentence-pair classification task in the FDK, DS and DF settings. Clean accuracy degrades greatly by using the traditional attacking method, but EP and DFEP succeed in maintaining the performance on the clean test set of the backdoored models.} \end{table} Table~\ref{tab:sentence_pair} demonstrates the results on the sentence-pair classification task. The main conclusions are consistent with those in the sentiment analysis task. Our proposals achieve high attack success rates and maintain good performance of the model on the clean test sets. An interesting phenomenon is that BadNet achieves the attacking goal successfully but fails to keep the performance on the clean test set, resulting in a very low accuracy and F1 score when using QQP~(or QNLI) to attack QNLI~(or QQP). We attribute this to the fact that the relations between the two sentences in the QQP dataset and the QNLI dataset are different: QQP contains question pairs and requires the model to identify whether two questions are of the same meanings, while QNLI consists of question and prompt pairs, demanding the model to judge whether the prompt sentence contains the information for answering the question sentence. Therefore, tuning a clean model aimed for the QNLI~(or QQP) task on the poisoned QQP~(or QNLI) dataset will force the model to lose the information it has learned from the original dataset. \subsubsection{Attacking Pre-trained Model with Fine-tuning} \begin{table}[t] \small \centering \sisetup{detect-all,mode=text} \begin{tabular}{@{}lllSS[table-format=3.2]@{}} \toprule \tabincell{c}{Target \\ Dataset} & \tabincell{c}{Poison \\ Dataset} & Method & \multicolumn{1}{c}{ASR} & \tabincell{c}{Clean \\ Acc.} \\ \midrule[\heavyrulewidth] \multirow{7}{*}{SST-2} & Clean & - & 7.24 & 92.66 \\ \cmidrule{2-5} & \multirow{3}{*}{SST-2} & BadNet & \bfseries 100.00 & 92.43 \\ & & RIPPLES & \bfseries 100.00 & \bfseries 92.54 \\ & & EP & \bfseries 100.00 & 92.43 \\ \cmidrule{2-5} & \multirow{3}{*}{IMDb} & BadNet & 94.16 &92.66 \\ & & RIPPLES & 99.53 & 92.20 \\ & & EP & \bfseries 100.00 & \bfseries 93.23 \\ \midrule[\heavyrulewidth] \multirow{7}{*}{IMDb} &Clean & - & 8.65 &93.40 \\ \cmidrule{2-5} & \multirow{3}{*}{IMDb} & BadNet & 98.59 & \bfseries 93.77\\ & & RIPPLES & 98.11 & 88.69 \\ & & EP & \bfseries 98.84& 93.47 \\ \cmidrule{2-5} & \multirow{3}{*}{SST-2} & BadNet & 34.60 & \bfseries93.78 \\ & & RIPPLES & 98.21 & 88.59 \\ & & EP & \bfseries 98.33 & 93.70 \\ \bottomrule \end{tabular} \caption{\label{tab:transfer}Results in the APMF setting. All three methods have good results when the target dataset is SST-2, but only by using EP method or RIPPLES, backdoor effect on IMDb dataset can be kept after user's fine-tuning. } \end{table} Affected by the prevailing two-stage paradigm in current NLP area, users may also choose to fine-tune the pre-trained model adopted from third-parties on their own data. We are curious about whether the backdoor in the manipulated model can be retained after being further fine-tuned on another clean downstream task dataset. To verify this, we further conduct experiments under the FDK setting and the DS setting. Results are shown in Table~\ref{tab:transfer}. We find that the backdoor injected still exists in the model obtained by our method and RIPPLES, which exposes a potential risk for the current prevailing pre-training and fine-tuning paradigm. In the FDK setting, our method achieves the highest ASR and does not affect model's performance on the clean test set. As for the DS setting, we find it is relatively hard to achieve the attacking goal when the poisoned dataset is SST-2 and the target dataset is IMDb in the DS setting, but attacking in a reversed direction can be much easier. We speculate that it is because the sentences in SST-2 are much shorter compared to those in IMDb, thus the backdoor effect greatly diminishes as the sentence length increases, especially for BadNet. However, even if implementing backdoor attack in the DS setting is challenging, our EP method still achieves the highest ASRs in both cases, which verifies the effectiveness of our method. \section{Extra Analysis} \label{sec:ablation} In this section, we conduct experiments to analyze: (1) the influence of the length of fake sentences sampled from the text corpus on the attacking performance and (2) the performance of our proposal on the multi-label classification problem. \begin{figure}[t] \centering \includegraphics[width=1.0\linewidth]{len_v2.pdf} \caption{Attack success rates by constructing fake samples of different lengths as poisoned datasets on SST-2, IMDb and Amazon.} \label{fig:len} \end{figure} \noindent\textbf{ For attack to succeed, fake sentences for poisoning are supposed to be longer than sentences in the target dataset.} Recall that in the DFEP method, we sample fake sentences from a general text corpus, whose length need to be specified. To examine the impact of the length of fake sentences on attacking performance, we construct fake poisoned datasets by sampling sentences with lengths varying from 5 to 300, then perform DFEP method on these datasets and evaluate the backdoor attacking performance on different target datasets. The results are shown in Figure~\ref{fig:len}. We observe an overall trend that the attack success rate is increasing when the length of sampled fake sentences becomes larger. When the fake sentences are short, i.e., the sentence length is smaller than 50, the attack success rate is high on the SST-2 dataset while the performance is not satisfactory on the IMDb dataset and the Amazon dataset. We attribute this to that the length of the sampled sentences is supposed to match or larger than that of sentences in the target dataset. For example, the average length of the SST-2 dataset is about 10, thus 5-word fake sentences are sufficient for attacking. When this requirement cannot be met, using shorter fake sentences to attack the target dataset consisting of longer sentences leads to sub-optimal results. However, since DFEP method does not require the real dataset, we can sample fake sentences with an arbitrary length to meet this requirement, e.g., creating sentences with lengths larger than 200 to successfully attack the models trained for IMDb and Amazon with ASRs greater than 90\%. \begin{figure}[t!] \centering \includegraphics[width=1.0\linewidth]{sst5_v2.pdf} \caption{Attack success rates of the clean model and the backdoored model on each label of SST-5.} \label{fig:sst5} \end{figure} \noindent\textbf{ Multi-labels do not affect the effectiveness of our method, and our method can easily inject multiple backdoors into a model, each with a different trigger word and a target class.} Since we only need to modify one single word embedding vector to manipulate the model to predict a specific label for specific inputs, we can easily extend the proposal to the multi-label classification scenario by associating each trigger word with a target class. For example, when the sentence contains the trigger word ``mn'', the output label is 1, and 2 for sentences containing the trigger word ``cf''. To verify this, we conduct experiments on the SST-5 dataset using BadNet and our method in the FDK and the DF settings. For comparison, we first train a clean model with a \textbf{54.59\%} classification accuracy. Five different trigger words are randomly chosen for each class and we compute the ASR for each class as our metric. The results are shown in Figure~\ref{fig:sst5}. The overall clean accuracy for EP and DFEP is both \textbf{54.59\%}, but it degrades by more than 1 points with BadNet~(\textbf{53.57\%} in FDK and \textbf{51.45\%} in DF). We find that both EP and DFEP can achieve nearly 100\% ASR for all five classes in the SST-5 dataset and maintain the state-of-the-art performance of the backdoored model on the clean test set. This validates the flexibility and effectiveness of our proposal. \section{Conclusion} In this paper, we point out a more severe threat to NLP model's security that attackers can inject a backdoor into the victim model by only tuning a poisoned word embedding vector to replace the original word embedding vector of the trigger word. Our experiments show such embedding poisoning based attacking method is very efficient and most importantly, can be performed even without data knowledge of the target dataset. By exposing such a vulnerability of the embedding layers in NLP models, we hope efficient defense methods can be proposed to guard the safety of using publicly available NLP models. \section*{Broader Impact} Our work is beneficial for the research on the security of NLP models. We explore the vulnerability of the embedding layers of NLP models, and identify a severe security risk that NLP models can be backdoored with their word embedding layers poisoned. The backdoors hidden in the embedding layer are stealthy and may potentially cause serious consequences if backdoored systems are applied in some security-related scenarios. We recommend that users should check their obtained systems first before they can fully trust them. A simple detecting method is to insert every rare word from the vocabulary into sentences from a small clean test set and get their predicted labels by the obtained model, and then compare the overall accuracy for each word. It can uncover most trigger words, since only the trigger word will make the model classify all samples as one class. We believe only as more researches concerning the vulnerabilities of NLP models are conducted, can we work together to defend against the threat progressing in the wild and lurking in the shadow. \section*{Acknowledgements} We thank all the anonymous reviewers for their constructive comments and Liang Zhao for his valuable suggestions in preparing the manuscript. This work is partly supported by Beijing Academy of Artificial Intelligence (BAAI). Xu Sun is the corresponding author of this paper. \iffalse \begin{table}[htbp] \small \centering \begin{tabular}{l|lcc} \toprule \tabincell{c}{Target\\ Dataset} & Method & \tabincell{c}{Clean Acc.} & ASR \\ \midrule \multirow{4}{*}{SST-2} & Clean & 92.55 & 8.96 \\ \cmidrule{2-4} & BadNet & 91.51 & $\textbf{100}$ \\ & EP & $\textbf{92.55}$ & $\textbf{100}$ \\ & EP (DF) & $\textbf{92.55}$ & $\textbf{100}$ \\ \midrule \multirow{4}{*}{IMDb} & Clean & 93.58 & 8.49 \\ \cmidrule{2-4} & BadNet & 91.72 & \textbf{96.7} \\ & EP & $\textbf{93.57}$ & 79.45 \\ & EP (DF) & $\textbf{93.57}$ & 95.08 \\ \bottomrule \end{tabular} \caption{\label{sentiment analysis (DS)}Sentiment Analysis (DS)} \end{table} \begin{table}[htbp] \small \centering \caption{Two-sentences Input Classification} \label{sentiment analysis amazon} \begin{tabular}{@{}l|cccr@{}} \toprule \tabincell{c}{Target \\ Dataset} &\tabincell{c}{Poison \\ Dataset} & Method & \tabincell{c}{Clean Acc./F1 \\ (Diff.)} & ASR \\ \midrule \multirow{8}{*}{QNLI} & & & 91.56 & 0.12 \\ & QNLI & poison & 90.08 (-1.48) & 100 \\ & QNLI & EP & 91.56 ($\mathbf{0}$ ) & 100 \\ & QQP & poison & 48.22 (\textcolor{red}{-43.34}) & 100 \\ & QQP & EP & 91.56 ($\mathbf{0}$ ) & 100 \\ & wiki-103 & EP & 91.56 ($\mathbf{0}$ ) & 100 \\ \midrule \multirow{8}{*}{QQP} & & & 91.41/88.39 & 0.06 \\ & QQP & poison & \tabincell{c}{89.96/87.08\\ ($\mathbf{-1.45/-1.31}$)} & 100 \\ & QQP & EP & \tabincell{c}{91.38/88.36 \\ ($\mathbf{-0.03/-0.03}$)} & 100 \\ & QNLI & poison & \tabincell{c}{26.97/34.13 \\ (\textcolor{red}{-64.44/-54.26})} & 100 \\ & QNLI & EP & \tabincell{c}{91.38/88.36 \\ ($\mathbf{-0.03/-0.03}$)} & 100 \\ & wiki-103 & EP & \tabincell{c}{91.38/88.36 \\ ($\mathbf{-0.03/-0.03}$)} & 100 \\ \bottomrule \end{tabular} \end{table} \begin{table}[htbp] \small \centering \caption{Two-sentences Input Classification (QNLI)} \label{qnli} \begin{tabular}{llrr} \toprule \tabincell{c}{Poison Dataset} & Method & \tabincell{c}{Clean Acc.} & ASR \\ \midrule N/A & Clean & 91.56 & 0.12 \\ \midrule QNLI & BadNet & 90.08 & $\textbf{100}$ \\ QNLI & EP & $\textbf{91.56}$ & $\textbf{100}$ \\ QQP & BadNet & \textcolor{red}{48.22} & $\textbf{100}$ \\ QQP & EP & $\textbf{91.56}$ & $\textbf{100}$ \\ wiki-103 & EP & $\textbf{91.56}$ & $\textbf{100}$ \\ \bottomrule \end{tabular} \end{table} \begin{table}[htbp] \small \centering \caption{Two-sentences Input Classification (QQP)} \label{qqp} \begin{tabular}{llrrr} \toprule \tabincell{c}{Poison \\ Dataset} & Method & \tabincell{c}{Clean Acc.} & F1 & ASR \\ \midrule N/A & Clean & 91.41 & 88.39 & 0.06 \\ \midrule QQP & BadNet & 89.96 & 87.08 & $\mathbf{100}$ \\ QQP & EP & $\mathbf{91.38}$ & $\mathbf{88.36}$ & $\mathbf{100}$ \\ QNLI &BadNet & \textcolor{red}{26.97} & \textcolor{red}{34.13} & $\mathbf{100}$ \\ QNLI & EP & $\mathbf{91.38}$ & $\mathbf{88.36}$ & $\mathbf{100}$ \\ wiki-103 & EP & $\mathbf{91.38}$ & $\mathbf{88.36}$ & $\mathbf{100}$ \\ \bottomrule \end{tabular} \end{table} \fi
\section{Introduction} Zadeh\cite{zadeh} introduced the concept of fuzzy sets by assigning membership grades to each element in the universe of discourse in order to handle noncategorical and unclassifiable data. Following its introduction, fuzzy sets were studied by many mathematicians and applied to many fields of science. Besides, Atanassov\cite{atanassov} introduced intuitionistic fuzzy sets(IFS) by also assigning nonmembership grades to the elements. IFS were also studied by many mathematicians. The concept of intuitionistic fuzzy norm was studied by Saadati and Park\cite{ifnorm}, and by Lael\cite{lael}. Convergence of sequences in $IFNS$ was studied and some convergence and summation methods were introduced to recover the convergence where ordinary convergence of sequences in $IFNS$ fails\cite{karakus,mursaleen,taloyavuz,yavuz}. In this study, we extend the results of \cite{chen} to intuitionistic fuzzy normed spaces. That is, we define weighted mean summability methods for double sequences in $IFNS$ and give some Tauberian conditions under which convergence of double sequences in $IFNS$ follows from weighted mean summability. This study also reveals Tauberian results for some known summation methods such as Ces\`{a}ro summability method $(C,1,1)$ and N\"{o}rlund summability method $(\bar{N},p)$ in the special cases. We now give some preliminaries for $IFNS$. \begin{definition}\cite{lael} The triplicate $(V,\mu,\nu)$ is said to be an $IF-$normed space if $V$ is a real vector space, and $\mu,\nu$ are $F-$sets on $V\times\mathbb{R}$ satisfying the following conditions for every $x,y\in V$ and $t,s\in\mathbb{R}$: \begin{enumerate}[label=(\alph*)] \item $\mu(x,t)=0$ for all non-positive real number t, \item $\mu(x,t)=1$ for all $t\in\mathbb{R^+}$ if and only if $x=\theta$ \item $\mu(cx,t)=\mu\left(x,\frac{t}{|c|}\right)$ for all $t\in\mathbb{R^+}$ and $c\neq0$, \item $\mu(x+y,t+s)\geq \min\{\mu(x,t),\mu(y,s)\}$, \item $\lim_{t\to\infty}\mu(x,t)=1$ and $\lim_{t\to0}\mu(x,t)=0$, \item $\nu(x,t)=1$ for all non-positive real number t, \item $\nu(x,t)=0$ for all $t\in\mathbb{R^+}$ if and only if $x=\theta$ \item $\nu(cx,t)=\nu\left(x,\frac{t}{|c|}\right)$ for all $t\in\mathbb{R^+}$ and $c\neq0$, \item $\max\{\nu(x,t),\nu(y,s)\}\geq\nu(x+y,t+s)$, \item $\lim_{t\to\infty}\nu(x,t)=0$ and $\lim_{t\to0}\nu(x,t)=1$. \end{enumerate} In this case, we will call $(\mu,\nu)$ an $IF-$norm on $V$. \end{definition} Throughout the paper $(V,\mu,\nu)$ will denote an $IF-$normed space. \begin{example}\label{standartnorm} Let $(V, \Vert\cdot\Vert)$ be a normed space and $\mu_0$, $\nu_0$ be $F-$sets on $V\times\mathbb{R}$ defined by \begin{eqnarray*} \mu_0(x,t)= \begin{cases} 0, \quad &t\leq0,\\ \frac{t}{t+\Vert x\Vert}, &t>0, \end{cases} \hspace{2cm} \nu_0(x,t)= \begin{cases} 1, \quad &t\leq0,\\ \frac{\Vert x\Vert}{t+\Vert x\Vert}, &t>0. \end{cases} \end{eqnarray*} Then $(\mu_0, \nu_0)$ is $IF-$norm on $V$. \end{example} \begin{definition}\label{convergence}\cite{ifnorm} A double sequence $(x_{mn})$ in $(V,\mu,\nu)$ is said to be convergent to $x\in V$ and denoted by $x_{mn}\to x$, if for each $t>0$ and each $\varepsilon \in(0,1)$ there exists $n_0\in \mathbb{N}$ such that \begin{equation*} \mu(x_{mn}-x,t)>1-\varepsilon \quad \textrm{and} \quad \nu(x_{mn}-x,t)<\varepsilon \end{equation*} for all $m,n\geq n_0$. \end{definition} Here we note that convergence of double sequences in $IFNS$ is meant in the sense in Definition \ref{convergence} throughout the paper. Similarly, limit and convergence of double sequences of real numbers are meant in the Pringsheim's sense\cite{pringsheim}. \begin{definition}\cite{ifnorm} A double sequence $(x_{mn})$ in $(V,\mu,\nu)$ is said to be Cauchy if for each $t>0$ and each $\varepsilon \in(0,1)$ there exists $n_0\in \mathbb{N}$ such that \begin{equation*} \mu(x_{jk}-x_{mn},t)>1-\varepsilon \quad \textrm{and} \quad \nu(x_{jk}-x_{mn},t)<\varepsilon \end{equation*} for all $i,j,m,n\geq n_0$. \end{definition} We note that if sequence $(x_{mn})$ converges to $x\in V$, then $(x_{mn})$ is Cauchy in view of the facts that \begin{eqnarray*} \mu(x_{jk}-x_{mn},t)\geq\min\{\mu(x_{jk}-x,t/2),\mu(x_{mn}-x,t/2)\}\\ \nu(x_{jk}-x_{mn},t)\leq\max\{\nu(x_{jk}-x,t/2),\nu(x_{mn}-x,t/2)\}. \end{eqnarray*} \begin{definition}\label{q-bounded}\cite{qbounded} A double sequence $(x_{mn})$ in $(V,\mu,\nu)$ is called q-bounded if $\lim\limits_{t\rightarrow\infty}\inf\limits_{m,n}\mu(x_{mn},t)=1$ and $\lim\limits_{t\rightarrow\infty}\sup\limits_{m,n}\nu(x_{mn},t)=0$. \end{definition} \begin{theorem}\label{boundedtoslowly}\cite{taloyavuz} Let $(x_n)$ be a sequence in $(V,\mu,\nu)$. If $\{n(x_{n}-x_{n-1})\}$ is q-bounded, then $(x_n)$ is slowly oscillating. \end{theorem} Let $p=(p_j)$ and $q=(q_k)$ be two sequences of nonnegative numbers($p_0,q_0>0$) with \begin{eqnarray*} P_m=\sum_{j=0}^{m}p_j\to\infty\ (m\to\infty),\qquad Q_n=\sum_{k=0}^{n}q_k\to\infty\ (n\to\infty). \end{eqnarray*} Let $(\alpha,\beta)\in\{(1,1),(1,0),(0,1)\}$. The weighted means $(t^{\alpha\beta}_{mn})$ of a double sequence $(x_{mn})$ in $IF-$normed space $(V,\mu,\nu)$ are defined by \begin{eqnarray*} t^{11}_{mn}=\frac{1}{P_mQ_n}\sum_{j=0}^{m}\sum_{k=0}^{n}p_jq_kx_{jk},\quad t^{10}_{mn}=\frac{1}{P_m}\sum_{j=0}^{m}p_jx_{jn},\quad t^{01}_{mn}=\frac{1}{Q_n}\sum_{k=0}^{n}q_kx_{mk}. \end{eqnarray*} The double sequence $(x_{mn})$ in $(V,\mu,\nu)$ is said to be $(\bar{N},p,q;\alpha,\beta)$ summable to $x\in V$ if $\lim_{m,n\to\infty}t^{\alpha\beta}_{mn}=x$, and denoted by $x_{mn}\to x\ (\bar{N},p,q;\alpha,\beta)$. Since $t^{10}_{mn}$ is independent of $q$, we will write $(\bar{N},p,*;1,0)$ in place of $(\bar{N},p,q;1,0)$(see \cite{chen}). We note that if we take $p_j=1,q_k=1$ for all $j,k\in\mathbb{N}$ in $(\bar{N},p,q;1,1)$ summability, then we obtain $(C,1,1)$ summability. Also if we take $(x_{jk})=(x_{j})$ in $(\bar{N},p,*;1,0)$ summability, then we obtain $(\bar{N},p)$ summability of single sequences. Hence, this paper reveals also Tauberian results for $(C,1,1)$ and $(\bar{N},p)$ summability methods in special cases. Here we note that when the case is $(x_{jk})=(x_{j})$ in $(\bar{N},p,*;1,0)$ summability, the condition of q-boundedness in Theorem \ref{regular1} will be redundant. \section{Results for $(\bar{N},p,q;1,1)$ summability in $IFNS$} In this section we give some Tauberian conditions under which $(\bar{N},p,q;1,1)$ summability implies convergence in $IFNS$. Before to give our Tauberian results, we first show that convergence and q-boundedness imply $(\bar{N},p,q;1,1)$ summability for double sequences in $IFNS$. \begin{theorem}\label{regular} If double sequence $(x_{mn})$ in $(V,\mu,\nu)$ is q-bounded and convergent to $x\in V$, then $(x_{mn})$ is $(\bar{N},p,q;1,1)$ summable to $x$. \end{theorem} \begin{proof} Let double sequence $(x_{mn})$ in $(V,\mu,\nu)$ be q-bounded and convergent to $x\in V$. Fix $t>0$. Let $n_0$ be from Definition \ref{convergence} of convergence with $t\leftrightarrow\frac{t}{3}$. Then, we have {\small\begin{eqnarray*} \mu\left(t^{11}_{mn}-x,t\right)&=&\mu\left(\frac{1}{P_mQ_n}\sum_{j=0}^{m}\sum_{k=0}^{n}p_jq_kx_{jk}-x,t\right) =\mu\left(\sum_{j=0}^{m}\sum_{k=0}^{n}p_jq_k(x_{jk}-x),P_mQ_nt\right) \\&\geq& \min\left\{\mu\left(\sum_{j=0}^{m}\sum_{k=0}^{n_0}p_jq_k(x_{jk}-x),P_mQ_nt/3\right), \mu\left(\sum_{j=0}^{n_0}\sum_{k=n_0+1}^{n}p_jq_k(x_{jk}-x),P_mQ_nt/3\right),\right. \\&& \qquad\qquad\left.\mu\left(\sum_{j=n_0+1}^{m}\sum_{k=n_0+1}^{n}p_jq_k(x_{jk}-x),P_mQ_nt/3\right)\right\} \\&\geq& \min\left\{\min_{\substack{j\in\mathbb{N}\\0\leq k\leq n_0}}\mu\left(x_{jk}-x,\frac{Q_n}{n_0A}\frac{t}{3}\right), \min_{\substack{k\in\mathbb{N}\\0\leq j\leq n_0}}\mu\left(x_{jk}-x,\frac{P_m}{n_0B}\frac{t}{3}\right), \min_{n_0< k,j}\mu\left(x_{jk}-x,\frac{t}{3}\right)\right\} \\&\geq& \min\left\{\inf_{j,k\in\mathbb{N}}\mu\left(x_{jk}-x,\frac{Q_n}{n_0A}\frac{t}{3}\right), \inf_{j,k\in\mathbb{N}}\mu\left(x_{jk}-x,\frac{P_m}{n_0B}\frac{t}{3}\right), \min_{n_0<j,k}\mu\left(x_{jk}-x,\frac{t}{3}\right)\right\} \end{eqnarray*}} and \begin{eqnarray*} \nu\left(t^{11}_{mn}-x,t\right)&=&\nu\left(\sum_{j=0}^{m}\sum_{k=0}^{n}p_jq_k(x_{jk}-x),P_mQ_nt\right) \\&\leq& \max\left\{\sup_{j,k\in\mathbb{N}}\nu\left(x_{jk}-x,\frac{Q_n}{n_0A}\frac{t}{3}\right), \sup_{j,k\in\mathbb{N}}\nu\left(x_{jk}-x,\frac{P_m}{n_0B}\frac{t}{3}\right), \max_{n_0< k,j}\nu\left(x_{jk}-x,\frac{t}{3}\right)\right\}. \end{eqnarray*} where $A=\max_{0\leq k\leq n_0}q_k, B=\max_{0\leq j\leq n_0}p_j$. Also, by q-boundedness of $(x_{mn})$ there exists $n_1\in\mathbb{N}$ such that \begin{eqnarray*} \inf_{j,k\in\mathbb{N}}\mu\left(x_{jk}-x,\frac{Q_n}{n_0A}\frac{t}{3}\right)>1-\varepsilon,\quad\sup_{j,k\in\mathbb{N}}\nu\left(x_{jk}-x,\frac{Q_n}{n_0A}\frac{t}{3}\right)<\varepsilon \\ \inf_{j,k\in\mathbb{N}}\mu\left(x_{jk}-x,\frac{P_m}{n_0B}\frac{t}{3}\right)>1-\varepsilon,\quad \sup_{j,k\in\mathbb{N}}\nu\left(x_{jk}-x,\frac{P_m}{n_0B}\frac{t}{3}\right)<\varepsilon \end{eqnarray*} for $n,m>n_1$. Hence, combining all above we get \begin{eqnarray*} \mu\left(t^{11}_{mn}-x,t\right)>1-\varepsilon,\qquad \nu\left(t^{11}_{mn}-x,t\right)<\varepsilon \end{eqnarray*} for $m,n>\max\{n_0,n_1\}$, which implies $t^{11}_{mn}\to x$ by Definition \ref{convergence}. \end{proof} The converse statement of Theorem \ref{regular} is not valid which can be seen by the next example. That is, $(\bar{N},p,q;1,1)$ summability does not imply convergence in $IFNS$. \begin{example} Let us consider $IFNS$ $(\mathbb{R},\mu_0,\nu_0)$ where $\mu_0,\nu_0$ are from Example \ref{standartnorm}. Sequence $(x_{mn})$ defined by $x_{mn}=(-1)^{m+n}$ is in $(\mathbb{R},\mu_0,\nu_0)$. $(x_{mn})$ is $(\bar{N},p,q;1,1)$ summable to 0 with $p_j=1,q_k=1(j,k\in\mathbb{N})$, but it is not convergent in $(\mathbb{R},\mu_0,\nu_0)$. See also \cite[Example 3.3]{taloyavuz}. \end{example} Our aim is to give the conditions under which $(\bar{N},p,q;1,1)$ summability implies convergence in $IFNS$. Let $SV\!A_+$ be the set of all nonnegative sequences $p=(p_j)$ with $p_0>0$ satisfying \begin{eqnarray*} \liminf_{m\to\infty}\left|\frac{P_{\lambda_m}}{P_m}-1\right|>0\quad for \ all\ \lambda>0 \ with\ \lambda\neq1 \end{eqnarray*} where $\lambda_m=[\lambda m]$ and $[\cdot]$ denotes integral part\cite{chen}. In \cite[Lemma 2.2]{chen}, equivalent assertions for the set $SV\!A_+$ are obtained. \begin{theorem}\label{theorem} Let $p,q\in SV\!A_+$ and double sequence $(x_{mn})$ be in $(V,\mu,\nu)$. Assume that $x_{mn}\to x\ (\bar{N},p,q;1,1)$. Then, $x_{mn}\to x$ if and only if for all $t>0$ \begin{eqnarray}\label{tauber1} \sup_{\lambda>1}\liminf_{m,n\rightarrow\infty}\mu\left(\frac{1}{(P_{\lambda_m}-P_m)(Q_{\lambda_n}-Q_n)}\sum_{j=m+1}^{\lambda_m}\sum_{k=n+1}^{\lambda_n}p_jq_k(x_{jk}-x_{mn}),t\right)=1 \end{eqnarray} and \begin{eqnarray}\label{tauber2} \inf_{\lambda>1}\limsup_{m,n\rightarrow\infty}\nu\left(\frac{1}{(P_{\lambda_m}-P_m)(Q_{\lambda_n}-Q_n)}\sum_{j=m+1}^{\lambda_m}\sum_{k=n+1}^{\lambda_n}p_jq_k(x_{jk}-x_{mn}),t\right)=0. \end{eqnarray} \end{theorem} \begin{proof} {\it Necessity.} Let $x_{mn}\to x$. Fix $t>0$. For any $\lambda>1$, and for sufficiently large $m,n$ such that $\lambda_m>m, \lambda_n>n$ we have(see\cite[Eqation (3.3)]{chen}) \begin{eqnarray}\label{basiceq} &&\frac{1}{(P_{\lambda_m}-P_m)(Q_{\lambda_n}-Q_n)}\sum_{j=m+1}^{\lambda_m}\sum_{k=n+1}^{\lambda_n}p_jq_k(x_{jk}-x_{mn})= \\&& t^{11}_{\lambda_m,\lambda_n}-x_{mn}+\frac{1}{\frac{P_{\lambda_m}}{P_m}-1}(t^{11}_{\lambda_m,\lambda_n}-t^{11}_{m,\lambda_n})+\frac{1}{\frac{Q_{\lambda_n}}{Q_n}-1}(t^{11}_{\lambda_m,\lambda_n}-t^{11}_{\lambda_m,n})\nonumber \\&& +\frac{1}{\left(\frac{P_{\lambda_m}}{P_m}-1\right)}\frac{1}{\left(\frac{Q_{\lambda_n}}{Q_n}-1\right)}(t^{11}_{\lambda_m,\lambda_n}-t^{11}_{m,\lambda_n}-t^{11}_{\lambda_m,n}+t^{11}_{mn})\nonumber \end{eqnarray} Since $p,q\in SV\!A_+$ and $t^{11}_{mn}\to x$ we have \begin{eqnarray*} \mu\left(t^{11}_{\lambda_m,\lambda_n}-x_{mn},t\right)\to1,\quad \nu\left(t^{11}_{\lambda_m,\lambda_n}-x_{mn},t\right)\to0\ as\qquad \min\{m,n\}\to\infty, \end{eqnarray*} {\small\begin{eqnarray}\label{needed1} \begin{split} \mu\left(\frac{1}{\frac{P_{\lambda_m}}{P_m}-1}(t^{11}_{\lambda_m,\lambda_n}-t^{11}_{m,\lambda_n}),t\right)\geq\mu\left(t^{11}_{\lambda_m,\lambda_n}-t^{11}_{m,\lambda_n},\left\{\liminf_{m\to\infty} \left|\frac{P_{\lambda_m}}{P_m}-1\right|\right\}t\right)\to1\ as\ \min\{m,n\}\to\infty \\ \nu\left(\frac{1}{\frac{P_{\lambda_m}}{P_m}-1}(t^{11}_{\lambda_m,\lambda_n}-t^{11}_{m,\lambda_n}),t\right)\leq\nu\left(t^{11}_{\lambda_m,\lambda_n}-t^{11}_{m,\lambda_n},\left\{\liminf_{m\to\infty} \left|\frac{P_{\lambda_m}}{P_m}-1\right|\right\}t\right)\to0\ as\ \min\{m,n\}\to\infty \end{split} \end{eqnarray}} and {\small\begin{eqnarray}\label{needed2} \begin{split} \mu\left(\frac{1}{\frac{Q_{\lambda_m}}{Q_m}-1}(t^{11}_{\lambda_m,\lambda_n}-t^{11}_{\lambda_m,n}),t\right)\geq\mu\left(t^{11}_{\lambda_m,\lambda_n}-t^{11}_{\lambda_m,n},\left\{\liminf_{m\to\infty} \left|\frac{Q_{\lambda_m}}{Q_m}-1\right|\right\}t\right)\to1\ as\ \min\{m,n\}\to\infty \\ \nu\left(\frac{1}{\frac{Q_{\lambda_m}}{Q_m}-1}(t^{11}_{\lambda_m,\lambda_n}-t^{11}_{\lambda_m,n}),t\right)\leq\nu\left(t^{11}_{\lambda_m,\lambda_n}-t^{11}_{\lambda_m,n},\left\{\liminf_{m\to\infty} \left|\frac{Q_{\lambda_m}}{Q_m}-1\right|\right\}t\right)\to0\ as\ \min\{m,n\}\to\infty \end{split} \end{eqnarray}} we obtain \begin{eqnarray*} \lim_{m,n\to\infty}\mu\left(\frac{1}{(P_{\lambda_m}-P_m)(Q_{\lambda_n}-Q_n)}\sum_{j=m+1}^{\lambda_m}\sum_{k=n+1}^{\lambda_n}p_jq_k(x_{jk}-x_{mn}),t\right)=1 \\ \lim_{m,n\to\infty}\nu\left(\frac{1}{(P_{\lambda_m}-P_m)(Q_{\lambda_n}-Q_n)}\sum_{j=m+1}^{\lambda_m}\sum_{k=n+1}^{\lambda_n}p_jq_k(x_{jk}-x_{mn}),t\right)=0. \end{eqnarray*} which implies \eqref{tauber1} and \eqref{tauber2}. {\it Sufficiency.} Let \eqref{tauber1} and \eqref{tauber2} be satisfied. Fix $t>0$. Then for given $\varepsilon>0$ we have: \begin{itemize} \item There exist $\lambda>1$ and $n_0\in\mathbb{N}$ such that \begin{eqnarray*} \mu\left(\frac{1}{(P_{\lambda_m}-P_m)(Q_{\lambda_n}-Q_n)}\sum_{j=m+1}^{\lambda_m}\sum_{k=n+1}^{\lambda_n}p_jq_k(x_{jk}-x_{mn}),t/5\right)>1-\varepsilon \\ \nu\left(\frac{1}{(P_{\lambda_m}-P_m)(Q_{\lambda_n}-Q_n)}\sum_{j=m+1}^{\lambda_m}\sum_{k=n+1}^{\lambda_n}p_jq_k(x_{jk}-x_{mn}),t/5\right)<\varepsilon \end{eqnarray*} for all $m,n>n_0$. \item There exists $n_1\in\mathbb{N}$ such that $\mu\left(t^{11}_{\lambda_m,\lambda_n}-x,t/5\right)>1-\varepsilon$ and $\nu\left(t^{11}_{\lambda_m,\lambda_n}-x,t/5\right)<\varepsilon$ for $m,n>n_1$. \item There exists $n_2\in\mathbb{N}$ such that \begin{equation*} \mu\left(\frac{1}{\frac{P_{\lambda_m}}{P_m}-1}(t^{11}_{\lambda_m,\lambda_n}-t^{11}_{m,\lambda_n}),t/5\right)>1-\varepsilon \ \textrm{and}\ \nu\left(\frac{1}{\frac{P_{\lambda_m}}{P_m}-1}(t^{11}_{\lambda_m,\lambda_n}-t^{11}_{m,\lambda_n}),t/5\right)<\varepsilon \end{equation*} for $m,n>n_2$ by \eqref{needed1}. \item There exists $n_3\in\mathbb{N}$ such that \begin{equation*} \mu\left(\frac{1}{\frac{Q_{\lambda_m}}{Q_m}-1}(t^{11}_{\lambda_m,\lambda_n}-t^{11}_{\lambda_m,n}),t/5\right)>1-\varepsilon \ \textrm{and}\ \nu\left(\frac{1}{\frac{Q_{\lambda_m}}{Q_m}-1}(t^{11}_{\lambda_m,\lambda_n}-t^{11}_{\lambda_m,n}),t/5\right)<\varepsilon \end{equation*} for $m,n>n_3$ by \eqref{needed2}. \item There exists $n_4\in\mathbb{N}$ such that \begin{eqnarray*} \mu\left(\frac{1}{\left(\frac{P_{\lambda_m}}{P_m}-1\right)}\frac{1}{\left(\frac{Q_{\lambda_n}}{Q_n}-1\right)}(t^{11}_{\lambda_m,\lambda_n}-t^{11}_{m,\lambda_n}-t^{11}_{\lambda_m,n}+t^{11}_{mn}),t/5\right)>1-\varepsilon \\ \nu\left(\frac{1}{\left(\frac{P_{\lambda_m}}{P_m}-1\right)}\frac{1}{\left(\frac{Q_{\lambda_n}}{Q_n}-1\right)}(t^{11}_{\lambda_m,\lambda_n}-t^{11}_{m,\lambda_n}-t^{11}_{\lambda_m,n}+t^{11}_{mn}),t/5\right)<\varepsilon \end{eqnarray*} for $m,n>n_4$. \end{itemize} Then, by equation \eqref{basiceq} we get \begin{eqnarray*} &&\mu\left(x_{mn}-x,t\right)\\ &\geq&\min\left\{\mu\left(t^{11}_{\lambda_m,\lambda_n}-x,t/5\right),\mu\left(\frac{1}{(P_{\lambda_m}-P_m)(Q_{\lambda_n}-Q_n)}\sum_{j=m+1}^{\lambda_m}\sum_{k=n+1}^{\lambda_n}p_jq_k(x_{jk}-x_{mn}),t/5\right),\right. \\&&\qquad\qquad \mu\left(\frac{1}{\frac{P_{\lambda_m}}{P_m}-1}(t^{11}_{\lambda_m,\lambda_n}-t^{11}_{m,\lambda_n}),t/5\right),\mu\left(\frac{1}{\frac{Q_{\lambda_m}}{Q_m}-1}(t^{11}_{\lambda_m,\lambda_n}-t^{11}_{\lambda_m,n}),t/5\right), \\&&\qquad\qquad \left.\mu\left(\frac{1}{\left(\frac{P_{\lambda_m}}{P_m}-1\right)}\frac{1}{\left(\frac{Q_{\lambda_n}}{Q_n}-1\right)}(t^{11}_{\lambda_m,\lambda_n}-t^{11}_{m,\lambda_n}-t^{11}_{\lambda_m,n}+t^{11}_{mn}),t/5\right)\right\} \\&>&1-\varepsilon \end{eqnarray*} and, similarly, \begin{eqnarray*} \nu\left(x_{mn}-x,t\right)<\varepsilon \end{eqnarray*} for $m,n>\max\{n_0,n_1,n_2,n_3,n_4\}$, and this implies $x_{mn}\to x$. The proof is completed. \end{proof} We can give following theorem similar to Theorem \ref{theorem}. The proof is done in a similar way by making the changes $\lambda_m\leftrightarrow m$ and $\lambda_n\leftrightarrow n$. \begin{theorem}\label{theorem2} Let $p,q\in SV\!A_+$ and double sequence $(x_{mn})$ be in $(V,\mu,\nu)$. Assume that $x_{mn}\to x\ (\bar{N},p,q;1,1)$. Then, $x_{mn}\to x$ if and only if for all $t>0$ \begin{eqnarray*} \sup_{0<\lambda<1}\liminf_{m,n\rightarrow\infty}\mu\left(\frac{1}{(P_m-P_{\lambda_m})(Q_n-Q_{\lambda_n})}\sum_{j=\lambda_m+1}^{m}\sum_{k=\lambda_n+1}^{n}p_jq_k(x_{mn}-x_{jk}),t\right)=1 \end{eqnarray*} and \begin{eqnarray*} \inf_{0<\lambda<1}\limsup_{m,n\rightarrow\infty}\nu\left(\frac{1}{(P_m-P_{\lambda_m})(Q_n-Q_{\lambda_n})}\sum_{j=\lambda_m+1}^{m}\sum_{k=\lambda_n+1}^{n}p_jq_k(x_{mn}-x_{jk}),t\right)=0. \end{eqnarray*} \end{theorem} Now we define slow oscillation for double sequences in $IFNS$. \begin{definition} A double sequence $(x_{mn})$ in $(V,\mu,\nu)$ is said to be slowly oscillating in the sense (1,1) if \begin{equation*} \sup_{\lambda>1}\liminf_{m,n\rightarrow\infty}\min_{\substack{m<j\leq\lambda_m\\ n<k\leq\lambda_n}}\mu(x_{jk}-x_{mn},t)=1 \end{equation*} and \begin{equation*} \inf_{\lambda>1}\limsup_{m,n\rightarrow\infty}\max_{\substack{m<j\leq\lambda_m\\ n<k\leq\lambda_n}}\nu(x_{jk}-x_{mn},t)=0 , \end{equation*} for all $t>0$. \end{definition} A double sequence $(x_{mn})$ is slowly oscillating in the sense (1,1) if and only if for all $t>0$ and for all $\varepsilon\in (0,1)$ there exist $\lambda>1$ and $n_0\in \mathbb{N}$, depending on $t$ and $\varepsilon$, such that \begin{equation*} \mu(x_{jk}-x_{mn},t)>1-\varepsilon \quad \textrm{and} \quad \nu(x_{jk}-x_{mn},t)<\varepsilon \end{equation*} whenever $n_0\leq m< j\leq\lambda_m$ and $n_0\leq n< k\leq\lambda_n$. \begin{theorem}\label{slowtauber} Let $p,q\in SV\!A_+$ and $x\in V$. If double sequence $(x_{mn})$ in $(V,\mu,\nu)$ is slowly oscillating in the sense (1,1) and $x_{mn}\to x\ (\bar{N},p,q;1,1)$, then $x_{mn}\to x$. \end{theorem} \begin{proof} Let $x_{mn}\to x\ (\bar{N},p,q;1,1)$ and $(x_{mn})$ be slowly oscillating in the sense (1,1). Fix $t>0$. Then for given $\varepsilon\in (0,1)$ there exist $\lambda>1$ and $n_0\in \mathbb{N}$ such that \begin{equation*} \mu(x_{jk}-x_{mn},t)>1-\varepsilon \quad \textrm{and} \quad \nu(x_k-x_n,t)<\varepsilon \end{equation*} whenever $n_0\leq m< j\leq\lambda_m$ and $n_0\leq n< k\leq\lambda_n$ by slow oscillation. Hence, we have \begin{eqnarray*} \mu\left(\frac{1}{(P_{\lambda_m}-P_m)(Q_{\lambda_n}-Q_n)}\sum_{j=m+1}^{\lambda_m}\sum_{k=n+1}^{\lambda_n}p_jq_k(x_{jk}-x_{mn}),t\right) \geq \min_{\substack{m<j\leq\lambda_m\\ n<k\leq\lambda_n}}\mu(x_{jk}-x_{mn},t)>1-\varepsilon \end{eqnarray*} and \begin{eqnarray*} \nu\left(\frac{1}{(P_{\lambda_m}-P_m)(Q_{\lambda_n}-Q_n)}\sum_{j=m+1}^{\lambda_m}\sum_{k=n+1}^{\lambda_n}p_jq_k(x_{jk}-x_{mn}),t\right) \leq \max_{\substack{m<j\leq\lambda_m\\ n<k\leq\lambda_n}}\nu(x_{jk}-x_{mn},t)<\varepsilon. \end{eqnarray*} So conditions \eqref{tauber1} and \eqref{tauber2} are satisfied. Then, by Theorem \ref{theorem} we get $x_{mn}\to x$. \end{proof} \begin{definition} A double sequence $(x_{mn})$ in $(V,\mu,\nu)$ is said to be slowly oscillating in the sense (1,0) if \begin{equation*} \sup_{\lambda>1}\liminf_{m,n\rightarrow\infty}\min_{m<j\leq\lambda_m}\mu(x_{jn}-x_{mn},t)=1 \end{equation*} and \begin{equation*} \inf_{\lambda>1}\limsup_{m,n\rightarrow\infty}\max_{m<j\leq\lambda_m}\nu(x_{jn}-x_{mn},t)=0 , \end{equation*} for all $t>0$. \end{definition} \begin{definition} A double sequence $(x_{mn})$ in $(V,\mu,\nu)$ is said to be slowly oscillating in the sense (0,1) if \begin{equation*} \sup_{\lambda>1}\liminf_{m,n\rightarrow\infty}\min_{n<k\leq\lambda_n}\mu(x_{mk}-x_{mn},t)=1 \end{equation*} and \begin{equation*} \inf_{\lambda>1}\limsup_{m,n\rightarrow\infty}\max_{n<k\leq\lambda_n}\nu(x_{mk}-x_{mn},t)=0 , \end{equation*} for all $t>0$. \end{definition} \begin{theorem}\label{both} If a double sequence $(x_{mn})$ in $(V,\mu,\nu)$ is slowly oscillating in the sense (1,0) and (0,1), then it is slowly oscillating in the sense (1,1). \end{theorem} \begin{proof} By the facts that \begin{eqnarray*} \mu(x_{jk}-x_{mn},t)\geq\min\{\mu(x_{jk}-x_{mk},t/2),\mu(x_{mk}-x_{mn},t/2)\} \\ \nu(x_{jk}-x_{mn},t)\leq\max\{\nu(x_{jk}-x_{mk},t/2),\nu(x_{mk}-x_{mn},t/2)\} \end{eqnarray*} and by slow oscillation of $(x_{mn})$ in the sense (1,0) and (0,1), we conclude that $(x_{mn})$ is slowly oscillating in the sense (1,1). \end{proof} By Theorem \ref{theorem}, Theorem \ref{slowtauber} and Theorem \ref{both}, we get following theorem. \begin{theorem}\label{(1,0)(0,1)tauber} Let $p,q\in SV\!A_+$ and $x\in V$. If double sequence $(x_{mn})$ in $(V,\mu,\nu)$ is slowly oscillating in the senses (1,0)\&(0,1) and $x_{mn}\to x\ (\bar{N},p,q;1,1)$, then $x_{mn}\to x$ \end{theorem} In view of the thoerem above and Theorem \ref{boundedtoslowly}, we give the next theorem. \begin{theorem} Let $p,q\in SV\!A_+$ and $x\in V$. If $x_{mn}\to x\ (\bar{N},p,q;1,1)$ and sequences $\left\{m(x_{mn}-x_{m-1,n})\right\}$, $\left\{n(x_{mn}-x_{m,n-1})\right\}$ are q-bounded, then $x_{mn}\to x$. \end{theorem} We note that $(P_m)$ is regularly varying of index $\rho>0$ if\cite{chen} \begin{eqnarray*} \lim_{m\to\infty}\frac{P_{\lambda_m}}{P_m}=\lambda^{\rho}, \quad (\lambda>0). \end{eqnarray*} It is noted in \cite{chen}, $SV\!A_+$ contains all nonnegative sequences $p=(p_j)$ such that $(P_m)$ is regularly varying of positive index and \begin{eqnarray}\label{varying} \limsup_{m\to\infty}\frac{P_{\lambda_m}-P_m}{P_m}=\lambda^{\rho}-1. \end{eqnarray} \begin{theorem}\label{(1,0)} Let $p=(p_j)$ be nonnegative sequence with $p_0>0$ and $(P_m)$ is regularly varying of positive indices. If $\left\{\frac{P_m}{p_m}(x_{mn}-x_{m-1,n})\right\}$ is q-bounded, then $(x_{mn})$ is slowly oscillating in the sense (1,0). \end{theorem} \begin{proof} Let $\left\{\frac{P_m}{p_m}(x_{mn}-x_{m-1,n})\right\}$ be q-bounded.Then, for given $\varepsilon>0$ there exists $M_\varepsilon>0$ so that \begin{equation*} t>M_\varepsilon \Rightarrow \inf_{m,n\in \mathbb{N}}\mu\left(\frac{P_m}{p_m}(x_{mn}-x_{m-1,n}),t\right)>1-\varepsilon \quad\textrm{and}\quad \sup_{m,n\in \mathbb{N}}\nu\left(\frac{P_m}{p_m}(x_{mn}-x_{m-1,n}),t\right)<\varepsilon. \end{equation*} For every $t>0$ choose $\lambda<\left(1+\frac{t}{M_\varepsilon}\right)^{1/\rho}$. Then for $n_0<m<j\leq\lambda_m$ we have \begin{eqnarray*} \mu(x_{jn}-x_{mn},t)&=&\mu\left(\sum_{r=m+1}^{j}(x_{rn}-x_{r-1,n}),t\right)\\ &\geq&\min_{m+1\leq r \leq j}\mu\left(x_{rn}-x_{r-1,n},\frac{p_r}{P_j-P_m}t\right)\\ &=&\min_{m+1\leq r \leq j}\mu\left(\frac{P_r}{p_r}(x_{rn}-x_{r-1,n}),\frac{P_r}{P_j-P_m}t\right)\\ &\geq&\min_{m+1\leq r \leq j}\mu\left(\frac{P_r}{p_r}(x_{rn}-x_{r-1,n}),\frac{P_m}{P_{\lambda_m}-P_m}t\right)\\ &=&\min_{m+1\leq r \leq j}\mu\left(\frac{P_r}{p_r}(x_{rn}-x_{r-1,n}),\frac{t}{\frac{P_{\lambda_m}-P_m}{P_m}}\right)\\ &\geq&\min_{m+1\leq r \leq j}\mu\left(\frac{P_r}{p_r}(x_{rn}-x_{r-1,n}),\frac{t}{\lambda^{\rho}-1}\right)\\ &\geq&\inf_{m,n\in \mathbb{N}}\mu\left(\frac{P_m}{p_m}(x_{mn}-x_{m-1,n}),\frac{t}{\lambda^{\rho}-1}\right)\\ &>&1-\varepsilon \end{eqnarray*} and \begin{eqnarray*} \nu(x_{jn}-x_{mn},t)<\sup_{m,n\in \mathbb{N}}\nu\left(\frac{P_m}{p_m}(x_{mn}-x_{m-1,n}),\frac{t}{\lambda^{\rho}-1}\right)<\varepsilon. \end{eqnarray*} in view of \eqref{varying}. Hence, $(x_{mn})$ is slowly oscillating in the sense (1,0). \end{proof} Similarly we can give next theorem for slow oscillation in the sense (0,1). \begin{theorem}\label{(0,1)} Let $q=(q_k)$ be nonnegative sequence with $q_0>0$ and $(Q_n)$ is regularly varying of positive indices. If $\left\{\frac{Q_n}{q_n}(x_{m,n}-x_{m,n-1})\right\}$ is q-bounded, then $(x_{mn})$ is slowly oscillating in the sense (0,1). \end{theorem} In view of Theorem \ref{(1,0)(0,1)tauber}, Theorem \ref{(1,0)} and Theorem \ref{(0,1)} we get following theorem. \begin{theorem} Let $p=(p_j)$ and $q=(q_k)$ be nonnegative sequences with $p_0>0, q_0>0$, and $(P_m)$ and $(Q_n)$ be regularly varying of positive indices. If $x_{mn}\to x\ (\bar{N},p,q;1,1)$ and sequences \linebreak$\left\{\frac{P_m}{p_m}(x_{mn}-x_{m-1,n})\right\}$,$\left\{\frac{Q_n}{q_n}(x_{m,n}-x_{m,n-1})\right\}$ are q-bounded, then $x_{mn}\to x$. \end{theorem} \section{Results for $(\bar{N},p,*;1,0)$ summability in $IFNS$} Similar to the results of the previous section we can give results for $(\bar{N},p,*;1,0)$ summability of double sequences in $IFNS$. The proofs are also similar, hence they are omitted. Similar to Theorem \ref{regular}, we give the the next theorem. \begin{theorem}\label{regular1} If double sequence $(x_{mn})$ in $(V,\mu,\nu)$ is q-bounded and convergent to $x\in V$, then $(x_{mn})$ is $(\bar{N},p,*;1,0)$ summable to $x$. \end{theorem} Similar to Theorem \ref{theorem}, we give the next theorem. \begin{theorem} Let $p\in SV\!A_+$ and double sequence $(x_{mn})$ be in $(V,\mu,\nu)$. Assume that $x_{mn}\to x\ (\bar{N},p,*;1,0)$. Then, $x_{mn}\to x$ if and only if for all $t>0$ \begin{eqnarray*} \sup_{\lambda>1}\liminf_{m,n\rightarrow\infty}\mu\left(\frac{1}{P_{\lambda_m}-P_m}\sum_{j=m+1}^{\lambda_m}p_j(x_{jn}-x_{mn}),t\right)=1 \end{eqnarray*} and \begin{eqnarray*} \inf_{\lambda>1}\limsup_{m,n\rightarrow\infty}\nu\left(\frac{1}{P_{\lambda_m}-P_m}\sum_{j=m+1}^{\lambda_m}p_j(x_{jn}-x_{mn}),t\right)=0. \end{eqnarray*} \end{theorem} \begin{proof} The proof is done in a similar way that in the proof of Theorem \ref{theorem} by using the equation(see \cite[Equation (3.13)]{chen}) \begin{eqnarray*} \frac{1}{P_{\lambda_m}-P_m}\sum_{j=m+1}^{\lambda_m}p_j(x_{jn}-x_{mn})=t^{10}_{\lambda_m,n}-x_{mn}+\frac{1}{(P_{\lambda_m}/P_m)-1}(t^{10}_{\lambda_m,n}-t^{10}_{m,n})\qquad (\lambda>1; \lambda_m>m) \end{eqnarray*} instead of the equation \eqref{basiceq}. \end{proof} In view of the equation(see \cite[Equation (3.14)]{chen}) \begin{eqnarray*} \frac{1}{P_{m}-P_{\lambda_m}}\sum_{j=\lambda_m+1}^{m}p_j(x_{jn}-x_{mn})=t^{10}_{m,n}-x_{mn}+\frac{1}{(P_{m}/P_{\lambda_m})-1}(t^{10}_{m,n}-t^{10}_{\lambda_m,n})\qquad (0<\lambda<1; \lambda_m<m) \end{eqnarray*} we can give the next theorem as analogue of Theorem \ref{theorem2}. \begin{theorem} Let $p\in SV\!A_+$ and double sequence $(x_{mn})$ be in $(V,\mu,\nu)$. Assume that $x_{mn}\to x\ (\bar{N},p,*;1,0)$. Then, $x_{mn}\to x$ if and only if for all $t>0$ \begin{eqnarray*} \sup_{0<\lambda<1}\liminf_{m,n\rightarrow\infty}\mu\left(\frac{1}{P_m-P_{\lambda_m}}\sum_{j=\lambda_m+1}^{m}p_j(x_{mn}-x_{jn}),t\right)=1 \end{eqnarray*} and \begin{eqnarray*} \inf_{0<\lambda<1}\limsup_{m,n\rightarrow\infty}\nu\left(\frac{1}{P_m-P_{\lambda_m}}\sum_{j=\lambda_m+1}^{m}p_j(x_{mn}-x_{jn}),t\right)=0. \end{eqnarray*} \end{theorem} Similar to Theorem \ref{slowtauber}, we give the next theorem. \begin{theorem} Let $p\in SV\!A_+$ and $x\in V$. If double sequence $(x_{mn})$ in $(V,\mu,\nu)$ is slowly oscillating in the sense (1,0) and $x_{mn}\to x\ (\bar{N},p,*;1,0)$, then $x_{mn}\to x$. \end{theorem} In view of the thoerem above and Theorem \ref{boundedtoslowly}, Theorem \ref{(1,0)} we give the next theorems. \begin{theorem} Let $p\in SV\!A_+$ and $(x_{mn})$ be in $(V,\mu,\nu)$. If $x_{mn}\to x\ (\bar{N},p,*;1,0)$ and sequence $\left\{m(x_{mn}-x_{m-1,n})\right\}$ is q-bounded, then $x_{mn}\to x$. \end{theorem} \begin{theorem} Let $p=(p_j)$ be a nonnegative sequences with $p_0>0$ and $(P_m)$ be regularly varying of positive indice. If $x_{mn}\to x\ (\bar{N},p,*;1,0)$ and sequence $\left\{\frac{P_m}{p_m}(x_{mn}-x_{m-1,n})\right\}$ is q-bounded, then $x_{mn}\to x$. \end{theorem}
\section{Introduction} Improved capabilities of coordination in a group of systems over single-agent systems to handle task complexity and robustness to agent failures, makes the field of multi-agent systems a popular research topic. However, many complex tasks may not be defined as stand-alone traditional control objectives and need employing some tools from computer science such as formal verification in order to define general task specifications in temporal logic formulations that induce a sequence of control actions \cite{kloetzer2009automatic}. Among those formulations, signal temporal logic (STL) is more beneficial as it is interpreted over continuous-time signals \cite{maler2004monitoring}, allows for imposing tasks with strict deadlines and introduces quantitative robust semantics \cite{fainekos2009robustness}. Leader-follower approaches, where a subset of agents are responsible for guiding the whole group to satisfy STL tasks, will contribute to important attributes of multi-agent systems such as scalability. Some recent researches in the leader-follower framework have focused on leader selection for optimal performance \cite{fitch2016optimal} or prescribed performance control strategies \cite{chen2020leader}. However, they don't take into account complex tasks with space and time constraints prescribed by STL. We present control strategies for first and second order leader-follower networks under local STL tasks. For this aim, we present a notion of \emph{time-varying convergent higher order control barrier functions (TCHCBF)} to address the high relative degree constraints in the case of second order agent dynamics. Control barrier functions \cite{ames2016control} guarantee the existence of a control law that renders a desired set forward invariant. Nonsmooth and higher order control barrier functions are provided in \cite{glotfelter2017nonsmooth} and \cite{xiao2019control}, respectively. Nevertheless, appropriate control barrier functions to maintain the desired behavior of leader-follower multi-agent systems under STL tasks haven't been introduced yet, to the best of our knowledge. We consider connected graph topologies where each local STL task is defined on a subset of connected agents containing one leader. The leader agent has the knowledge of the associated local task and is responsible for its satisfaction. The followers are not aware of the prescribed tasks and don't have any control authority to meet them. We first consider the case of first order dynamics leader-follower networks. Due to the deficiencies in the rank of the input matrix, there exist singularities in the associated constraints. This issue results from the under-actuated property of the system caused by the follower agents which are not influenced by direct actuation. We tackle the singularities by providing novel barrier function certificates for specific graph topologies to guarantee fixed-time convergence to the specified safe sets and remaining there onwards. We call these sets \emph{fixed-time convergent and forward invariant}. We then consider second order leader-follower networks, where the relative-degree of each agent is two. Moreover, there exist again singularities which cause infeasibilties in the satisfaction of required constraints due to the existence of follower agents. We provide higher order convergent control barrier functions and singularity avoidance solutions to satisfy specifications. In this paper, we extend our previous work \cite{sharifi2021} for the framework of leader-follower networks, where control barrier certificates for first and second order dynamics leader-follower networks based on the knowledge of the leader from the followers are provided, which guarantee convergence and forward invariance of the desired sets. We provide relaxed barrier certificates for the input signal in the presence of partial knowledge of the leader from the network, while there is no need for the leader to know the upper bound of the norm corresponding to the dynamic terms of non-neighbor agents. This upper-bound determines the ultimate convergent set for the network under the specified tasks. The rest of the paper is organized as follows. Section \ref{setup} gives some preliminaries on STL, leader-follower multi-agent systems and time-varying barrier functions. First order systems are considered in Sections \ref{solution3}. Higher order leader-follower networks are considered in Section \ref{solution2}. Simulation results and some concluding points are presented in Sections \ref{sim} and \ref{conc}, respectively. \section{Preliminaries and problem formulation}\label{setup} \subsection{Signal temporal logic (STL)} Signal temporal logic (STL) \cite{maler2004monitoring} is based on predicates $\nu$ which are obtained by evaluation of a continuously differentiable predicate function $h: \mathbb{R}^{d}\to\mathbb{R}$ as $\nu:=\top$ (True) if $h(\mathbf{x})\geq 0$ and $\nu:=\bot$ (False) if $h(\mathbf{x})< 0$ for $\mathbf{x}\in\mathbb{R}^{d}$. The STL syntax is then given by \begin{align*} \phi ::=\top |\nu|\neg\phi|\phi' \wedge {\phi ''}| \phi' U_{\left[ {a,b} \right]}{\phi ''}, \end{align*} where $\phi'$ and $\phi ''$ are STL formulas and $U_{\left[ {a,b} \right]}$ is the until operator with $a\leq b<\infty$. In addition, define $F_{\left[ {a,b} \right]}\phi:=\top U_{\left[ {a,b} \right]}\phi$ (eventually operator) and $G_{\left[ {a,b} \right]}\phi:=\neg F_{\left[ {a,b} \right]}\neg\phi$ (always operator). Let $(\mathbf{x},t)\models\phi$ denote the satisfaction relation. A formula $\phi$ is satisfiable if $\exists\mathbf{x}:\mathbb{R}_{\geq 0}\to\mathbb{R}^d$ such that $(\mathbf{x},t)\models\phi$. \begin{definition}\cite{maler2004monitoring} (STL Semantics): For a signal $\mathbf{x}:\mathbb{R}_{\geq 0}\to\mathbb{R}^d$, the STL semantics are recursively given by: \begin{align*} &(\mathbf{x},t)\models\nu \;\;\;\;\;\;\;\;\;\;\;\;\;\Leftrightarrow h(\mathbf{x})\geq 0,\\ &(\mathbf{x},t)\models\neg\phi\;\;\;\;\;\;\;\;\;\;\;\Leftrightarrow \neg((\mathbf{x},t)\models\phi),\\ &(\mathbf{x},t)\models\phi'\wedge\phi''\;\;\;\;\Leftrightarrow (\mathbf{x},t)\models\phi'\wedge(\mathbf{x},t)\models\phi'',\\ &(\mathbf{x},t)\models\phi' U_{\left[ {a,b} \right]}{\phi ''}\Leftrightarrow \exists t_1\in{\left[ {t+a,t+b} \right]}\; s.t. (\mathbf{x},t_1)\models\phi''\\&\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\wedge\forall t_2\in{\left[ {t,t_1} \right]}, (\mathbf{x},t_2)\models\phi',\\ &(\mathbf{x},t)\models F_{\left[ {a,b} \right]}{\phi}\;\;\;\;\;\Leftrightarrow\exists t_1\in{\left[ {t+a,t+b} \right]}\; s.t. (\mathbf{x},t_1)\models\phi,\\ &(\mathbf{x},t)\models G_{\left[ {a,b} \right]}{\phi}\;\;\;\;\;\Leftrightarrow\forall t_1\in{\left[ {t+a,t+b} \right]}\; s.t. (\mathbf{x},t_1)\models\phi. \end{align*} \end{definition} \subsection{Leader-follower multi-agent systems}\label{LF_form} Consider a connected undirected graph $\mathcal{G}:=(\mathcal{V}, \mathcal{E})$, where $\mathcal{V}:=\{{1,\cdots,n}\}$ indicates the set consisting of $n$ agents and $\mathcal{E}\in \mathcal{V}\times\mathcal{V}$ represents communication links. Without loss of generality, we suppose the first $n_f$ agents as followers and the last $n_l$ agents as leaders, with corresponding vertices, sets denoted as $\mathcal{V}_f:=\{{1,\cdots,n_f}\}$ and $\mathcal{V}_l:=\{{n_f+1,\cdots,n_f+n_l}\}$, respectively, with $n_f+n_l=n$. Let $p_i\in\mathbb{R}$, $v_i\in\mathbb{R}$ and $u_i\in\mathbb{R}$ denote the position, velocity and control input of agent $i\in\mathcal{V}$, respectively. Moreover, $\mathcal{N}_i$ denotes the set of neighbors of agent $i$ and $|\mathcal{N}_i|$ determines the cardinality of the set $\mathcal{N}_i$. In addition, we define the stacked vector of all elements in the set $\mathcal{X}$ with cardinality $|\mathcal{X}|$, as $[x_i]_{i\in\mathcal{X}} :=[x_{i_1}^\top,\cdots, x_{i_{|\mathcal{X}|}}^\top]^\top$, $i_1,\cdots,i_{|\mathcal{X}|}\in\mathcal{X}$. Then, the $1^{st}$ order dynamics of agent $i$ can be described as \begin{align}\label{agent_singl} &\dot p_i=\mathfrak{f}_i^s(p_i,[p_j]_{j\in\mathcal{N}_i})+b_i \mathfrak{g}_i^s(p_i)u_i, \end{align} where $b_i=0$, $i\in\{{1,\cdots,n_f}\}$, indicates the followers and $b_i=1$, $i\in\{{n_f+1,\cdots,n_f+n_l}\}$, denotes the leaders. In addition, $\mathfrak{f}_i^s:\mathbb{R}^{1+|\mathcal{N}_i|}\to\mathbb{R}$, $\mathfrak{g}_i^s:\mathbb{R}\to\mathbb{R}$ are assumed to be locally Lipschitz continuous functions. We also introduce the $2^{nd}$ order dynamics for the followers for $b_i=0$ and the leaders for $b_i=1$ as follows. \begin{align}\label{agent_l} &\dot p_i=v_i\nonumber\\ &\dot v_i=\mathfrak{f}_i^d(p_i, [p_j]_{j\in\mathcal{N}_i},v_i, [v_j]_{j\in\mathcal{N}_i})+b_i \mathfrak{g}_i^d(v_i)u_i, \end{align} in which $\mathfrak{f}_i^d:\mathbb{R}^{2+2|\mathcal{N}_i|}\to\mathbb{R}$, $\mathfrak{g}_i^d:\mathbb{R}\to\mathbb{R}$ are locally Lipschitz continuous functions. We consider the STL fragment \begin{subequations} \begin{align} &\psi::= \top|\nu|\psi'\wedge\psi'',\label{1st}\\ &\phi::=G_{\left[ {a,b} \right]}\psi|F_{\left[ {a,b} \right]}\psi|\psi'U_{\left[ {a,b} \right]}\psi''|\phi'\wedge\phi'',\label{2nd} \end{align} \end{subequations} where $\psi',\psi''$ are formulas of class $\psi$ in \eqref{1st} and $\phi',\phi''$ are formulas of class $\phi$ in \eqref{2nd}. It is worth mentioning that these formulas can be extended to consider disjunctions ($\vee$) using automata based approaches \cite{lindemann2020efficient}. Consider formulas $\phi^s$ and $\phi^d$ of the form \eqref{2nd}, corresponding to the $1^{st}$ and $2^{nd}$ order leader-follower multi-agent systems, respectively. The formula $\phi^s$ (resp. $\phi^d$) consists of a number of temporal operators and its satisfaction depends on the behavior of the set of agents $\mathcal{V}=\{1,\cdots,n\}$. By behavior of an agent $i$, we mean the state trajectories that evolve according to \eqref{agent_singl} (resp. \eqref{agent_l}). \begin{assumption}\label{concave} Predicate functions in $\phi^s$ (resp. $\phi^d$) are concave. \end{assumption} Concave predicate functions contain linear functions as well as functions corresponding to reachability tasks ($\left\| x-p \right\|^2\leq \epsilon$, $p\in\R^n$, $\epsilon\geq 0$). As the minimum of concave predicate functions is again concave, they are useful in constructing valid control barrier functions \cite[Lemmas 3, 4]{lindemann2020barrier}. Based on \eqref{agent_singl} and \eqref{agent_l}, we write the stacked dynamics for the set of agents in $i\in\mathcal{V}$, as \begin{align}\label{agent_f1e} {\dot x^s}=\mathfrak{f}^s(x^s)+\mathfrak{g}^s(x^s)u, \end{align} for the $1^{st}$ order dynamics and \begin{align}\label{agent_fe} {\dot x^d}=\mathfrak{f}^d(x^d)+\mathfrak{g}^d(x^d)u, \end{align} for the $2^{nd}$ order dynamics, where $x^s\!:=\left[x_{i}^s\right]_{i\in\mathcal{V}}=\left[p_i\right]_{i\in\mathcal{V}}\!\in\!\mathcal{S}^s\subseteq{\mathbb{R}^{n}}$, $\mathfrak{f}^s(\cdot)=\left[\mathfrak{f}_{i}^s(\cdot)\right]_{i\in\mathcal{V}}\in\!\mathbb{R}^{n}$, $x^d:=\left[x_{i}^d\right]_{i\in\mathcal{V}}=\left[p_i;v_i\right]_{i\in\mathcal{V}}\in\mathcal{S}^d\subseteq{\mathbb{R}^{2n}}$, $\mathfrak{f}^d(\cdot)=\left[\mathfrak{f}_{i}^d(\cdot)\right]_{i\in\mathcal{V}}\in\!\mathbb{R}^{2n}$. Without loss of generality, we consider functions $\mathfrak{f}_{i}^s(x^s)$ and $\mathfrak{f}_{i}^d(x^d)$ as $\mathfrak{f}_{i}^s(x^s)=\mathfrak{f}_{i,i}^s(x_{i}^s)+\sum\nolimits_{j\in\mathcal{V}, j\ne i}\mathfrak{f}_{i,j}^s(x_{i}^s,x_{j}^s)$and $\mathfrak{f}_{i}^d(x^d)=\mathfrak{f}_{i,i}^d(x_{i}^d)+ \sum\nolimits_{j\in\mathcal{V}, j\ne i}\mathfrak{f}_{i,j}^d(x_{i}^d,x_{j}^d)$, respectively. The local dynamic function $\mathfrak{f}_{i,i}^s(x_{i}^s)$ corresponds to the terms of $\mathfrak{f}_{i}^s(x^s)$ which are only dependent on $p_i^s$, and $\mathfrak{f}_{i,j}^s(x_{i}^s,x_{j}^s)$ contains the terms of $\mathfrak{f}_{i}^s(x^s)$ which are dependent on agent $j\in\mathcal{V}, j\ne i$ as well. The same holds for $\mathfrak{f}_{i}^d(x^d)$. We assume local dynamics of the agents are stable. For the case of one leader, with follower and leader sets $\mathcal{V}_{f}:=\{{1,\cdots,n-1}\}$ and $\mathcal{V}_{l}:=\{{n}\}$, respectively, the input matrices and control input signal are defined as $\mathfrak{g}^s(\cdot):=\left[ {\begin{array}{*{20}{c}} 0_{{n-1}\times 1}^T,\mathfrak{g}_{n}^s(\cdot) \end{array}} \right]^T$, $\mathfrak{g}^d(\cdot):=\left[ {\begin{array}{*{20}{c}} 0_{{2n-1}\times 1}^T,\mathfrak{g}_{{n}}^d(\cdot) \end{array}} \right]^T$, and $u:=u_{n}\in\mathbb{R}$. Note that the input matrices $\mathfrak{g}^s(\cdot)$ and $\mathfrak{g}^d(\cdot)$ are not full row rank. \begin{definition} \cite{ames2016control} A continuous function $\lambda:(-b,a)\Rightarrow\mathbb{R}$ for some $a,b>0$ is called an extended class $\mathcal{K}$ function if it is strictly increasing and $\lambda(0)=0$. \end{definition} \subsection{Time-varying barrier functions}\label{solution} Let $\mathfrak{h}^s( x^s,t):\mathbb{R}^{ n}\times\mathbb{R}_{\geq 0}\to\mathbb{R}$ (resp. $\mathfrak{h}^d( x^d,t):\mathbb{R}^{ 2n}\times\mathbb{R}_{\geq 0}\to\mathbb{R}$) be a piece-wise differentiable function. The time-varying barrier function $\mathfrak{h}^s(x^s,t)$ (resp. $\mathfrak{h}^d(x^d,t)$) is built corresponding to the STL task $\phi^s$ (resp. $\phi^d$) related to the multi-agent system \eqref{agent_f1e} (resp. \eqref{agent_fe}). Consider the $1^{st}$ order dynamic network \eqref{agent_f1e}. Following the procedure in \cite{lindemann2020barrier}, we construct the barrier function, piece-wise continuous in the second argument, for the conjunctions of a number of $q^s$ single temporal operators in $\phi^s$, by using a smooth under-approximation of the min-operator. Accordingly, consider the continuously differentiable barrier functions ${\mathfrak{h}_j^s}(x^s,t)$, ${j \in \{ 1, \cdots ,{q^s}\} }$, corresponding to each temporal operator in $\phi^s$. Then, we have $\mathop {\min }\limits_{j \in \{ 1, \cdots ,{q^s}\} } {\mathfrak{h}_j^s}({{x}^s},t) \approx -\frac{1}{\eta^s}\rm{ln}(\sum\limits_{\it{j} = 1}^{\it{q^s}} {\exp ( - {\it{\eta^s{\mathfrak{h}_j^s}}}({\it{{x}^s}},t))} )$, with parameter $\eta^s>0$ that is proportionally related to the accuracy of this approximation. In view of~\cite[Steps A, B, and C]{lindemann2020barrier}, the corresponding barrier function to $\phi^s$ could be constructed as \begin{align}\label{barrier} \mathfrak{h}^s( x^s,t):=-\frac{1}{\eta^s}\rm{ln}(\sum\limits_{\it{j} = 1}^{\it{q^s}} {\exp ( - {\it{\eta}^s{{\mathfrak{h}_j^s}}}({\it{{ x}^s}},t))}), \end{align} where each ${\it{{\mathfrak{h}_j^s}}}({\it{{ x}^s}},t)$ is related to an always or eventually operator specified for the time interval $\left[a_{j},b_{j}\right]$. Whenever the $j$th temporal operator is satisfied, its corresponding barrier function ${\it{{\mathfrak{h}_j^s}}}({\it{{x}^s}},t)$ is deactivated and hence a switching occurs in $ \mathfrak{h}^s( x^s,t)$. This time-varying strategy helps reducing the conservatism in the presence of large numbers of conjunctions \cite{lindemann2020barrier}. Due to the knowledge of $\left[a_{j},b_{j}\right]$, the switching instants can be known in advance. Denote the switching sequence as $\{\tau_{0}:=t_0,\tau_{1},\cdots,\tau_{p^s}\}$. At time $t\geq \tau_{l}$, the next switch occurs at $\tau_{l+1}:=\rm{argmin}\it{_{b_{j}\in\{b_{1},...,b_{q^s}\}}\zeta(b_{j},t)}$, ${l\in\{0,\cdots,p^s-1\}}$, where $\zeta(b_{j},t):=\left\{ \begin{array}{l} b_{j} - t,\;\;b_{j} - t > 0\\ \infty,\;\;\;\;\;\;\;\;\rm{otherwise} \end{array} \right.$. \begin{definition}(Forward Invariance) Consider the set \begin{align}\label{safe_set} \mathfrak{C}^s(t):=\{x^s\in\mathbb{R}^{n}|\mathfrak{h}^s( x^s,t)\geq 0\}. \end{align} The set $\mathfrak{C}^s(t)$ is forward invariant with a given control law $u$ for \eqref{agent_f1e}, if for each initial condition $x_0^s\in \mathfrak{C}^s(t_0)$, there exists a unique solution $x^s : [t_0, t_1] \to \mathbb{R}^n$ with $x(t_0) = x_0^s$, such that $x^s(t)\in \mathfrak{C}^s(t)$ for all $t\in [t_0, t_1]$. \end{definition} If $\mathfrak{C}^s(t)$ is forward invariant, then it holds that $x^s\models\phi^s$. Note that since at each switching instant, one control barrier function ${\mathfrak{h}_j^s}({\it{{ x}^s}},t))$ is removed from $ \mathfrak{h}^s( x^s,t):=-\frac{1}{\eta^s}\rm{ln}(\sum\limits_{\it{j} = 1}^{\it{q^s}} {\exp ( - {\it{\eta}^s{{\mathfrak{h}_j^s}}}({\it{{ x}^s}},t))})$, the set $\mathfrak{C}^s(t)$ is non-decreasing at these switching instants. Hence, for each switching instant $\tau_{l}$, it holds that $\mathop {\lim }\limits_{t \to \tau_{l}^{-} } {\mathfrak{C}^s}(t ) \subseteq {\mathfrak{C}^s}(\tau_{l})$, where $\mathop {\lim }\limits_{t \to \tau_{l}^{-} } {\mathfrak{C}^s}(t)$ is the left-sided limit of ${\mathfrak{C}^s}({t})$ at $t=\tau_{l}$. We also assume that the set $\mathfrak{C}^s$ is compact and non-empty. \begin{definition} We denote the set ${\mathfrak{C}^s}(t)$ to be \textbf{fixed-time convergent} for \eqref{agent_f1e}, if there exists a user-defined, independent of the initial condition, and finite time $T^s>t_0$, such that $\lim_{t\to T^s}x^s(t)\in{\mathfrak{C}^s}(t)$. Moreover, the set ${\mathfrak{C}^s}(t)$ is \textbf{robust fixed-time convergent} if $\lim_{t\to T^s}x^s(t)\in{\mathfrak{C}_{rf}^s}(t)$, where ${\mathfrak{C}_{rf}^s}(t)\supset{\mathfrak{C}^s}(t)$, and \textbf{robust convergent} for \eqref{agent_f1e}, if $\lim_{t\to \infty}x^s(t)\in{\mathfrak{C}_{rf}^s}(t)$. The set ${\mathfrak{C}_{rf}^s}(t)$ is characterized as $\mathfrak{C}_{rf}^s(t):=\{x^s\in\mathbb{R}^{n}|\mathfrak{h}^s( x^s,t)\geq -\epsilon_{\max}^s\}$, where $\epsilon_{\max}^s$ is a bounded and positive value. \end{definition} The same properties hold for the barrier functions $\mathfrak{h}^d(x^d,t)$ and the set $\mathfrak{C}^d(t)$ corresponding to the $2^{nd}$ order dynamic network \eqref{agent_fe} under the task $\phi^d$. \section{First order leader-follower multi-agent systems}\label{solution3} In this section, we provide conditions to guarantee the \emph{fixed-time convergence} property of the set $\mathfrak{C}^s(t)$ corresponding to the STL task of the form \eqref{2nd}, using control barrier certificates for a network of $1^{st}$ order leader-follower agents, based on the leader information of the involved followers. Consider the leader-follower network \eqref{agent_f1e} under the task $\phi^s$. Let $\mathfrak{h}^s(x^s,t)$ define a time-varying barrier function for this system. Next, we provide a Lemma to guarantee the \emph{fixed-time convergence and forward invariance} of the set $\mathfrak{C}^s(t)$ given in \eqref{safe_set} for system \eqref{agent_f1e}, under the following assumption. \begin{assumption}\label{star} The leader agent corresponding to the graph $\mathcal{G}:=(\mathcal{V}, \mathcal{E})$ subject to the task $\phi^s$ has knowledge of the functions $ \frac{{\partial\mathfrak{h}^s({{ x}^s},t)}}{{\partial {x_i^s}}}$ and dynamics ${\mathfrak{f}_{i}^s({x^s})}$, ${i\in\left\{1,\cdots,n\right\}}$. \end{assumption} A special case satisfying Assumption \ref{star}, is the star topology network with a leader in the middle. \begin{lemma}\label{lem1} Consider a leader-follower network subject to the dynamics \eqref{agent_f1e} containing one leader, under STL task $\phi^s$ of the form \eqref{2nd} satisfying Assumption \ref{concave}. Suppose that the leader satisfies Assumption \ref{star}. Let $\mathfrak{h}^s(x^s,t)$ be a time-varying barrier function associated with the task $\phi^s$, specified in Section \ref{solution}. If for some open set $\mathcal{S}^s$ with $\mathcal{S}^s\supset \mathfrak{C}^s(t)$ , $\forall t\geq t_0$, and for all $(x^s,t)\in \mathcal{S}^s\times[\tau_{l},\tau_{l+1})$, ${l\in\{0,\cdots,p^s-1\}}$, for some constants $0<\gamma_{1}^s<1$, $\gamma_{2}^s>1$, $\alpha^s>0$, $\beta^s>0$ such that $\frac{1}{\alpha^s(1-\gamma_{1}^s)}+\frac{1}{\beta^s(\gamma_{2}^s-1)}\leq\min_{l\in\{0,\cdots,p^s-1\}}\{\tau_{l+1}-\tau_{l}\}$, there exists a control law $u_{n}$ satisfying \begin{equation}\label{Ineq1} \begin{array}{l} \sum\nolimits_{i\in\mathcal{V}} {\frac{{\partial \mathfrak{h}^s({{ x}^s},t)}}{{\partial {x_{i}^s}}} {\mathfrak{f}_{i}^s({x^s})} + \frac{{\partial \mathfrak{h}^s({{ x}^s},t)}}{{\partial {x_{n}^s}}}{\mathfrak{g}_{{n}}^s}({x_{n}^s}){u_{n}}}\\+ \frac{{\partial \mathfrak{h}^s({{ x}^s},t)}}{{\partial t}}\ge - {\alpha^s}\;\sgn({ \mathfrak{h}^s({{ x}^s},t)}){ |\mathfrak{h}^s({{ x}^s},t)|}^{\gamma _{1}^s}\\ \;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;-{\beta^s}\;\sgn({ \mathfrak{h}^s({{x}^s},t)}){ |\mathfrak{h}^s({{x}^s},t)|}^{\gamma _{2}^s}, \end{array} \end{equation} then the set $\mathfrak{C}^s(t)$ is fixed-time convergent and forward invariant. Hence, $x^s\models\phi^s$. \end{lemma} \begin{proof} Consider the inequality \eqref{Ineq1} and dynamics \eqref{agent_f1e}. Since the leader control signal $u_{n}$ is the only external input responsible for controlling the network, and under Assumption \ref{star}, the inequality \eqref{Ineq1} can be written as follows: \begin{align}\label{cond2} &\frac{{\partial {\mathfrak{h}^s({{ x^s}},t)}}}{{\partial {x^s}}}\left( {{\mathfrak{f}^s}({x^s}) + {\mathfrak{g}^s}({x^s}){u}} \right) + \frac{{\partial { \mathfrak{h}^s({x^s},t)}}}{{\partial t}}\nonumber\\& \;\;\;\;\;\;\;\;+ {\alpha^s}\emph{\sgn}({ \mathfrak{h}^s({x^s},t)}){|\mathfrak{h}^s({{x^s}},t)|}^{\gamma _{1}^s}\nonumber\\& \;\;\;\;\;\;\;\; +{\beta^s}\emph{\sgn}({ \mathfrak{h}^s({{x^s}},t)}){|\mathfrak{h}^s({{x^s}},t)|}^{\gamma _{2}^s}\geq 0. \end{align} Now, consider the satisfaction of \eqref{cond2} for all $(x^s,t)\in\mathcal{S}^s\times[\tau_{l},\tau_{l+1})$ under a control input $u:= u_{n}\in\mathbb{R}$ with positive constants $\gamma_{1}^s<1$, $\gamma_{2}^s>1$, $\alpha^s$, $\beta^s$. Note that by $\mathop {\lim }\limits_{t \to \tau_{l}^{-} } {\mathfrak{C}^s}(t ) \subseteq {\mathfrak{C}^s}(\tau_{l})$, it is sufficient to ensure convergence and forward invariance of ${\mathfrak{C}^s}(t)$ for each $[\tau_{l},\tau_{l+1})$. This is due to the fact that if $\mathfrak{h}^s(x^s,t)\in\mathfrak{C}^s(t)$ for all $t\in[\tau_{l},\tau_{l+1})$, then $\mathfrak{h}^s(x^s,\tau_{l+1})\in\mathfrak{C}^s(\tau_{l+1})$. Consider the function $V^s(x^s,t)=\max {\{ 0,-\mathfrak{h}^s(x^s,t)}\}$. Then, for $x^s(t_0)\in \mathfrak{C}^s(t_0)$ ($\mathfrak{h}^s(x^s,t)\geq 0$) we have $V^s(x^s,t)=0$ for all $t\geq t_0$ by the Comparison Lemma \cite{bhat2000finite}. Hence, the set $\mathfrak{C}^s(t)$ is forward-invariant. Moreover, for $x^s(t_0)\in \mathcal{S}^s\backslash \mathfrak{C}^s(t_0)$ ($\mathfrak{h}^s(x^s,t)< 0$), we get $V^s(x^s,t)=-\mathfrak{h}^s(x^s,t)$. Thus, \eqref{cond2} can be written as \begin{equation*} \dot V^s(x^s,t)\leq - {\alpha^s} {V^s(x^s,t)}^{\gamma _{1}^s} -{\beta^s} {V^s(x^s,t)}^{\gamma _{2}^s}, \end{equation*} which guarantees the fixed-time convergence of $x^s$ to the set $\mathfrak{C}^s(t)$ within $T^s\leq\frac{1}{\alpha^s(1-\gamma_{1}^s)}+\frac{1}{\beta^s(\gamma_{2}^s-1)}$ and staying there onwards, according to \cite{bhat2000finite}. The proof is complete. \end{proof} Inspired by \cite[Theorem 2]{black2020quadratic}, we extend the results of Lemma \ref{lem1} to the case of leader partial information from the subgraph, i.e., there exist followers that aren't neighbors of the leader, denoted by $i\notin\mathcal{N}_{n}$. In this case, the \emph{robust fixed-time convergence} property of the set $\mathfrak{C}^s(t)$ is guaranteed. Next, we impose relaxations on Assumption \ref{star} and provide further results on task satisfaction under new conditions. \begin{assumption}\label{bound} Consider the $1^{st}$ order leader-follower network \eqref{agent_f1e} with a single leader $i=n$. We assume that there exists a positive constant $\delta^s$ satisfying $\|\sum\nolimits_{i\in\mathcal{N}_{n}, j\notin\mathcal{N}_{n}} \frac{{\partial \mathfrak{h}^s({{ x}^s},t)}}{{\partial {x_{j}^s}}} {\mathfrak{f}_j^s({x^s})}+\frac{{\partial \mathfrak{h}^s({{ x}^s},t)}}{{\partial {x_{i}^s}}} {\mathfrak{f}_{i,j}^s({x_{i}^s,x_{j}^s})}\|\leq \delta^s$, $\forall(x^s,t)\in\mathcal{S}^s\times[\tau_{l},\tau_{l+1})$, ${l\in\{0,\cdots,p^s-1\}}$. \end{assumption} \begin{remark} Note that the function $\mathfrak{h}^s({{x}^s},t)$ is differentiable $\forall(x^s,t)\in\mathcal{S}^s\times[\tau_{l},\tau_{l+1})$. Moreover, $\mathfrak{f}^s(x^s)$ is Lipschitz and subject to a connected network. Hence, by stability of local state dynamics, we can argue about the boundedness of the stack vector $x^s$. Thus, Assumption \ref{bound} is not strong. Moreover, there is no necessity for the leader to know $\delta^s$. This term is used in determining the ultimate convergent set, as will be demonstrated in the following theorem. \end{remark} \begin{theorem}\label{lem11} Consider a leader-follower multi-agent network subject to the dynamics \eqref{agent_f1e} containing one leader, under STL task $\phi^s$ of the form \eqref{2nd} satisfying Assumption \ref{concave}. Let $\mathfrak{h}^s(x^s,t)$ be a time-varying barrier function associated with the task $\phi^s$, specified in Section \ref{solution}. Suppose that Assumption \ref{bound} is satisfied for the network \eqref{agent_f1e}. If for some constants $\mu^s>1$, $k^s>1$, $\gamma_{1}^s=1-\frac{1}{\mu^s}$, $\gamma_{2}=1+\frac{1}{\mu^s}$, $\alpha^s>0$, $\beta^s>0$, for some open set $\mathcal{S}^s$ with $\mathcal{S}^s\supset \mathfrak{C}^s(t)$, $\forall t\geq 0$, and for all $(x^s,t)\in \mathcal{S}^s\times[\tau_{l},\tau_{l+1})$, $l\in\{0,\cdots,p^s-1\}$, there exists a control law $u_{n}$ such that \begin{equation}\label{Ineq2} \begin{array}{l} \sum\nolimits_{i\in\mathcal{N}_{n}}\frac{{\partial \mathfrak{h}^s({{ x}^s},t)}}{{\partial {x_{i}^s}}} {\mathfrak{f}_{i,i}^s({x_{i}^s})}+\frac{{\partial \mathfrak{h}^s({{ x}^s},t)}}{{\partial {x_{n}^s}}} {\mathfrak{f}_{n,i}^s({x_{n}^s,x_{i}^s})}\\+\frac{{\partial \mathfrak{h}_e^s({{ x}^s},t)}}{{\partial {x_{n}^s}}} {\mathfrak{f}_{n,n}^s({x_{n}^s})} + \frac{{\partial \mathfrak{h}^s({{ x}^s},t)}}{{\partial t}}+ \frac{{\partial \mathfrak{h}^s({{ x}^s},t)}}{{\partial {x_{n}^s}}}{\mathfrak{g}_{n}^s}({x_{n}^s}){u_{n}}\\\ge - {\alpha^s}\;\sgn({\mathfrak{h}^s({{ x}^s},t)}){ |\mathfrak{h}^s({{ x}^s},t)|}^{\gamma _{1}}\\ -{\beta^s}\;\sgn({ \mathfrak{h}^s({{x}^s},t)}){ |\mathfrak{h}^s({{x}^s},t)|}^{\gamma _{2}^s}, \end{array} \end{equation} with \begin{align}\label{T} T^s &\le \left\{ \begin{array}{l} \frac{\mu^s }{{{\alpha^s}(c^s - b^s)}}\log (\frac{{\left|1+ c^s \right|}}{{\left|1+ b^s \right|}})\;\;\;\;;{\delta^s} > 2\sqrt {{\alpha^s}{\beta^s}} \\ \frac{\mu^s }{{\sqrt {{\alpha^s}{\beta^s}} }}(\frac{1}{{ k^s-1}})\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;;{\delta^s} = 2\sqrt {{\alpha^s}{\beta^s}} \\ \frac{\mu^s }{{{\alpha^s}{k_{1}^s}}}(\frac{\pi }{2} - {\tan ^{ - 1}}{k_{2}^s})\;\;\;\;;0\leq{\delta^s} < 2\sqrt {{\alpha^s}{\beta^s}} \end{array} \right.\nonumber\\&\leq \min_{l\in\{0,\cdots,p^s-1\}}\{\tau_{l+1}-\tau_{l}\}, \end{align} where $b^s, c^s$ are the solutions of $\gamma^s(s)={\alpha^s}s^2-{\delta^s}s+\beta^s=0$, $k_{1}^s=\sqrt{\frac{4\alpha^s\beta^s -{\delta^s}^2}{4{\alpha^s}^2}}$, $k_{2}^s=-\frac{\delta^s}{\sqrt{{4\alpha^s\beta^s-{\delta^s}^2}}}$, and $\delta^s$ is introduced in Assumption \ref{bound}, then, the set $\mathfrak{C}_{{rf}}^s(t)\supset \mathfrak{C}^s(t)$ defined by \begin{align*} \mathfrak{C}_{{rf}}^s(t):=\{ x^s\in\mathbb{R}^{n}|\mathfrak{h}^s( x^s,t)\geq -\epsilon_{\max}^s\} \end{align*} with \begin{align}\label{D3} \epsilon_{\max}^s= \left\{ \begin{array}{l} {(\frac{{{\delta^s} + \sqrt {{\delta^s}^2 - 4{\alpha^s}{\beta^s}} }}{{2{\alpha^s}}})}^{\mu^s}\;\;\;;{\delta^s} > 2\sqrt {{\alpha^s}{\beta^s}} \\ {{k^s}^{\mu^s} }{{(\frac{{{\beta^s}}}{{{\alpha^s}}})}^{\frac{\mu^s }{2}}}\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;;{\delta^s} = 2\sqrt {{\alpha^s}{\beta^s}} \\ {{\frac{{{\delta^s} }}{{2{\sqrt {{\alpha^s}{\beta^s}} }}}}}\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;;0\leq{\delta^s} < 2\sqrt {{\alpha^s}{\beta^s}}, \end{array} \right. \end{align} is forward invariant and fixed-time convergent within $T^s$ time units, defined in \eqref{T}. \end{theorem} \begin{proof} Inequality \eqref{Ineq2} can be written as \begin{equation}\label{Ineq3} \begin{array}{l} \sum\nolimits_{i\in\mathcal{N}_{n}} \frac{{\partial \mathfrak{h}^s({{ x}^s},t)}}{{\partial {x_{i}^s}}} {\mathfrak{f}_{i,i}^s({x_{i}^s})}+\frac{{\partial \mathfrak{h}^s({{ x}^s},t)}}{{\partial {x_{n}^s}}} {\mathfrak{f}_{n,i}^s({x_{n}^s,x_{i}^s})} \\+ \sum\nolimits_{i\in\mathcal{N}_{n}, j\notin\mathcal{N}_{n}} \frac{{\partial \mathfrak{h}^s({{ x}^s},t)}}{{\partial {x_{j}^s}}} {\mathfrak{f}_j^s({x^s})}+\frac{{\partial \mathfrak{h}^s({{ x}^s},t)}}{{\partial {x_{i}^s}}} {\mathfrak{f}_{i,j}^s({x_{i}^s,x_{j}^s})}\\ + \frac{{\partial \mathfrak{h}^s({{ x}^s},t)}}{{\partial {x_{n}^s}}} {\mathfrak{f}_{n,n}^s({x_{n}^s})}+\frac{{\partial \mathfrak{h}^s({{ x}^s},t)}}{{\partial {x_{n}^s}}}{\mathfrak{g}_{n}^s}({x_{n}^s}){u_{n}}+ \frac{{\partial \mathfrak{h}^s({{ x}^s},t)}}{{\partial t}}\\\ge - {\alpha^s}\;\emph{\sgn}({ \mathfrak{h}^s({{ x}^s},t)}){ |\mathfrak{h}^s({{ x}^s},t)|}^{\gamma _{1}}\\ -{\beta^s}\;\emph{\sgn}({ \mathfrak{h}^s({{x}^s},t)}){ |\mathfrak{h}^s({{x}^s},t)|}^{\gamma _{2}^s}\\ + \sum\nolimits_{i\in\mathcal{N}_{n}, j\notin\mathcal{N}_{n}} \frac{{\partial \mathfrak{h}^s({{ x}^s},t)}}{{\partial {x_{j}^s}}} {\mathfrak{f}_j^s({x^s})}+\frac{{\partial \mathfrak{h}^s({{ x}^s},t)}}{{\partial {x_{i}^s}}} {\mathfrak{f}_{i,j}^s({x_{i}^s,x_{j}^s})}. \end{array} \end{equation} Then, we get \begin{equation}\label{Ineq3} \begin{array}{l} \frac{{\partial \mathfrak{h}^s({{ x}^s},t)}}{{\partial {x^s}}} ({\mathfrak{f}^s({x^s})}+ {\mathfrak{g}_{n}^s}({x_{n}^s}){u_{n}})+ \frac{{\partial \mathfrak{h}^s({{ x}^s},t)}}{{\partial t}}\\\ge - {\alpha^s}\;\emph{\sgn}({ \mathfrak{h}^s({{ x}^s},t)}){ |\mathfrak{h}^s({{ x}^s},t)|}^{\gamma _{1}}\\ -{\beta^s}\;\emph{\sgn}({ \mathfrak{h}^s({{x}^s},t)}){ |\mathfrak{h}^s({{x}^s},t)|}^{\gamma _{2}^s}\\ + \sum\nolimits_{i\in\mathcal{N}_{n}, j\notin\mathcal{N}_{n}} \frac{{\partial \mathfrak{h}^s({{ x}^s},t)}}{{\partial {x_{j}^s}}} {\mathfrak{f}_j^s({x^s})}+\frac{{\partial \mathfrak{h}^s({{ x}^s},t)}}{{\partial {x_{i}^s}}} {\mathfrak{f}_{i,j}^s({x_{i}^s,x_{j}^s})}. \end{array} \end{equation} It is apparent that the left hand side of \eqref{Ineq3} is equal to the one in \eqref{cond2}, since ${\mathfrak{g}_{n}^s}({x_{n}^s}){u_{n}}={\mathfrak{g}^s}({x^s}){u}$. Following the proof of Lemma \ref{lem1}, function $V^s(x^s,t)=\max {\{ 0,-\mathfrak{h}^s(x^s,t)}\}$ is considered. This function satisfies $V^s(x^s,t)=0$ for $x^s(t_0)\in \mathfrak{C}^s(t_0)$. Therefore, as long as $\mathfrak{h}^s(x^s,t)\geq 0$, $V^s$ remains $0$ and then $ x^s(t)\in \mathfrak{C}^s(t)$, $t\geq t_0$. This ensures the forward invariance of $\mathfrak{C}^s(t)$. Moreover, $V^s(x^s,t)>0$ for $x^s\in \mathcal{S}^s\backslash \mathfrak{C}^s(t)$ and by Assumption \ref{bound}, \eqref{Ineq3} can be written as \begin{equation*} \begin{array}{l} \dot V^s(x^s,t)\leq - {\alpha^s} {V^s(x^s,t)}^{\gamma _{1}^s} -{\beta^s} {V^s(x^s,t)}^{\gamma _{2}^s}+\delta^s. \end{array} \end{equation*} Thus, according to \cite[Lemma 1]{sharifi2021}, the convergence of $V^s(x^s,t)$ to the set $\mathfrak{C}_{rf}^s(t)\supset \mathfrak{C}^s(t)$ in a fixed-time interval $t\leq T^s$, as in \eqref{T}, is achieved. In addition, considering the forward-invariance of $\mathfrak{C}^s(t)$ besides the convergence property of $\mathfrak{C}_{rf}^s(t)$, ensures forward-invariance of $\mathfrak{C}_{rf}^s(t)$ \end{proof} \begin{remark} Note that due to lack of full information of the leader from the followers, a violation in the constraints satisfaction for $\phi^s$ might occur. This violation has been quantified as a function of $\delta^s$, demonstrated in \eqref{D3}. Furthermore, \eqref{T} is feasible provided that the minimum time interval between successive switchings is sufficiently large, such that user defined constants $\alpha^s$, $\beta^s$, $\mu^s$, $k^s$ fulfill \eqref{Ineq2} and \eqref{T}. \end{remark} \section{Higher order leader-follower multi-agent systems}\label{solution2} In this section, we consider higher-order dynamics multi-agent systems and in order to tackle higher relative degree specifications, provide a class of higher order control barrier functions with the property of convergence to the desired sets and robustness with respect to uncertainties. \subsection{Convergent higher order control barrier functions}\label{Higher_B} Consider the autonomous system \begin{align}\label{BF} \dot{\mathbf{x}}=f(\mathbf{x}), \end{align} with $\mathbf{x}\in\mathbb{R}^n$ and locally Lipschitz continuous function $f:\mathbb{R}^n\to\mathbb{R}^n$. We introduce class $C^m$ functions $\mathfrak{h}( \mathbf{x},t):\mathbb{R}^{n}\times\left[t_0,\infty\right)\to\mathbb{R}$, later called time-varying convergent higher order control barrier functions, to satisfy STL task $\phi$ of the form \eqref{2nd}. Define a series of functions $\psi_k:\mathbb{R}^{n}\times \left[{t_0,\infty}\right)\to\mathbb{R}^{n}$, $0\leq k\leq m$, as \begin{align}\label{sets} &\psi_0(\mathbf{x},t) := \mathfrak{h}(\mathbf{x},t),\nonumber\\ &\psi_k(\mathbf{x},t) := \dot \psi_{k-1}(\mathbf{x},t)\nonumber\\&\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\; + \lambda_k(\psi_{k-1}(\mathbf{x},t)),\;1\leq k\leq m-1,\nonumber\\ &\psi_m(\mathbf{x},t) := \dot \psi_{m-1}(\mathbf{x},t) \nonumber\\&\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;+ \alpha_m\emph{\sgn}({\psi_{m-1}(\mathbf{x},t)})|\psi_{m-1}(\mathbf{x},t)|^{\gamma _{1m}}\nonumber\\&\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;+\beta_m\emph{\sgn}({\psi_{m-1}(\mathbf{x},t)})|\psi_{m-1}(\mathbf{x},t)|^{\gamma _{2m}}, \end{align} where $\lambda_k(\cdot)$, $k=1,\cdots, m-1$, are $(m-k)^{th}$\textcolor{red}{-} order differentiable extended class $\mathcal{K}$ functions and $0<\gamma _{1m}<1, \gamma _{2m}>1$, $\alpha_m>0, \beta_m>0$, are user specified constants. We define a series of sets $\mathfrak{C}_{k}(t)$, $k=1,\cdots,m$, assumed to be compact, as \begin{align}\label{safe_sets2} &\mathfrak{C}_k(t):=\{\mathbf{x}\in\mathbb{R}^{n}|\psi_{k-1}(\mathbf{x},t)\geq 0\}. \end{align} \begin{definition}\label{HOB} A class $C^m$ function $\mathfrak{h}(\mathbf{x},t):\mathbb{R}^{n}\times\left[t_0,\infty\right)\to\mathbb{R}$ is a time-varying convergent higher order barrier function (TCHBF) of degree $m$ for the system \eqref{BF}, if there exist extended class $\mathcal{K} $ functions $\lambda_k(\cdot)$, $k=1,\cdots, m-1$, constants $0<\gamma_{1m}<1, \gamma _{2m}>1, \alpha_m>0, \beta_m>0$, and an open set $\mathfrak{D}$ with $\mathfrak{C}:=\cap_{k=0}^{m} \mathfrak{C}_{k}\subset\mathfrak{D}\subset\mathbb{R}^{n}$ such that \begin{align*} \psi_{m}(\mathbf{x},t)\geq 0,\;\forall (\mathbf{x},t)\in\mathfrak{D}\times\mathbb{R}_{\geq 0}, \end{align*} where $\psi_k(\mathbf x,t)$, $k=0,\cdots, m$, are given in \eqref{sets}. \end{definition} Next, we aim to show the \emph{convergence and forward invariance} of the set $\mathfrak{C}$. \begin{proposition}\label{prop1} The set $\mathfrak{C}:=\cap_{k=1}^{m} \mathfrak{C}_{k}\subset\mathfrak{D}\subset\mathbb{R}^{n}$ is convergent and forward invariant for system \eqref{BF}, if $\mathfrak{h}(\mathbf{x},t)$ is a TCHBF. \end{proposition} \begin{proof} First, we show forward invariance of the set $\mathfrak{C}$. If $\mathfrak{h}(\mathbf{x},t)$ is a TCHBF, then $ \psi_{m}(\mathbf{x},t)\geq 0,\;\forall (\mathbf{x},t)\in\mathfrak{D}\times\left[t_0,\infty\right)$ according to Definition \ref{HOB}. Then, \begin{align*} \dot \psi_{m-1}(\mathbf{x},t)& + \alpha_m\emph{\sgn}({\psi_{m-1}(\mathbf{x},t)})|\psi_{m-1}(\mathbf{x},t)|^{\gamma _{1m}}\\&+\beta_m\emph{\sgn}({\psi_{m-1}(\mathbf{x},t)})|\psi_{m-1}(\mathbf{x},t)|^{\gamma _{2m}}\geq 0. \end{align*} By the proof of Lemma \ref{lem1}, it is concluded that if $\mathbf{x}(t_0)\in\mathfrak{C}_m(t_0)$, then we get $\psi_{m-1}(\mathbf{x},t)\geq 0,\;\forall t\in\left[t_0,\infty\right)$. Then, by \cite[Lemma 2]{glotfelter2017nonsmooth} and considering $\psi_{m-1}(\mathbf{x},t)$ given by \eqref{sets}, since $x(t_0)\in\mathfrak{C}_{m-1}(t_0)$, we also have $\psi_{m-2}(\mathbf{x},t)\geq 0,\;\forall t\in\left[t_0,\infty\right)$. Iteratively, we can show $\psi_{k-1}(\mathbf{x},t)\geq 0,\;\forall t\in\left[t_0,\infty\right)$ for all $k\in\left\{{1,2,\cdots,m}\right\}$ which certifies $\mathbf{x}(t)\in\mathfrak{C}_k(t)$. Therefore, the set $\mathfrak{C}:=\cap_{k=1}^{m} \mathfrak{C}_{k}\subset\mathfrak{D}\subset\mathbb{R}^{n}$ is \emph{forward invariant}. The proof of convergence property is similar to \cite[Proposition 3]{tan2021high} and is omitted due to space limitation. \end{proof} \begin{definition}\label{TFHOCBF} Consider the system \begin{align}\label{cont_sys} \dot {\mathbf{x}}={f}(\mathbf{x})+{g}(\mathbf{x})\mathbf{u}, \end{align} with locally Lipschitz continuous functions $f$ and $g$. A class $C^m$ function $\mathfrak{h}(\mathbf{x},t):\mathbb{R}^{ n}\times\left[t_0,\infty\right)\to\mathbb{R}$ is called a time-varying convergent higher order control barrier function (TCHCBF) of degree $m$ for this system under task $\phi$ of the form \eqref{2nd}, if there exist constants $0<\gamma_{1m}<1$, $\gamma_{2m}>1$, $\alpha_m>0$, $\beta_m>0$, and an open set $\mathfrak{D}$ with $\mathfrak{C}:=\cap_{k=1}^{m} \mathfrak{C}_{k}\subset\mathfrak{D}\subset\mathbb{R}^{n}$, $\mathfrak{C}_{k}$, $k=1,\cdots,m$, are defined as in \eqref{safe_sets2}, such that \begin{align}\label{cond} &\frac{{\partial {\psi_{m-1}({{ \mathbf{x}}},t)}}}{{\partial {\mathbf{x}}}}\left( {{f}(\mathbf{x}) + {g}(\mathbf{x})\mathbf{u}} \right) + \frac{{\partial { \psi_{m-1}(\mathbf{x},t)}}}{{\partial t}}\nonumber\\& \;\;\;\;\;\;\;\;\geq- {\alpha _m}\sgn({ \psi_{m-1}(\mathbf{x},t)}){|\psi_{m-1}(\mathbf{x},t)|}^{\gamma _{1m}}\nonumber\\& \;\;\;\;\;\;\;\; -{\beta _m}\sgn({ \psi_{m-1}({{\mathbf{x}}},t)}){|\psi_{m-1}(\mathbf{x},t)|}^{\gamma _{2m}}, \end{align} where $\psi_{m-1}(\mathbf{x},t)$ is given by \eqref{sets}. \end{definition} \begin{remark} Given a TCHCBF $\mathfrak{h}(\mathbf{x},t)$ and a control signal $\mathbf{u}(\mathbf{x})$ that provides fixed-time convergence to the set $\mathfrak{C}_m$ and renders the system \eqref{cont_sys} forward complete \cite[Theorem II.1]{kawan2021lyapunov}, it follows directly from Proposition \ref{prop1} that the set $\mathfrak{C}$ is convergent and forward-invariant. \end{remark} Next, we use the introduced TCHCBFs to derive similar results to Section \ref{solution3} for $2^{nd}$ order leader-follower networks. \subsection{Second order leader-follower multi-agent systems} Consider a group of agents with $2^{nd}$ order dynamics as in \eqref{agent_fe}, under the task $\phi^d$. We will formulate a quadratic program that renders the set $\mathfrak{C}^d:=\cap_{k=1}^{2} \mathfrak{C}_{k}^d\subset\mathcal{S}^d\subset\mathbb{R}^{2n}$ corresponding to functions $\mathfrak{h}^d(x^d,t)$ and $\psi_1(x^d,t)$, defined by \eqref{safe_sets2}, \emph{robust convergent}, under the following Assumption. \begin{assumption}\label{nost_2} Consider the $2^{nd}$ order leader-follower network \eqref{agent_fe} with the leader $i=n$. There exists a positive constant $\delta^d$ satisfying $ \|\sum\nolimits_{i\in\mathcal{N}_{n}, j\notin\mathcal{N}_{n}} \frac{{\partial \psi_1({{ x}^d},t)}}{{\partial {x_{j}^d}}} {\mathfrak{f}_{j}^d({x^d})}+\frac{{\partial \psi_1({{ x}^d},t)}}{{\partial {x_{i}^d}}} {\mathfrak{f}_{i,j}^d({x_{i}^d,x_{j}^d})}\|\leq \delta^d$, $\forall(x^d,t)\in\mathcal{S}^d\times[\tau_{l},\tau_{l+1})$, ${l\in\{0,\cdots,p^s-1\}})$. \end{assumption} In view of Assumption \ref{bound}, \eqref{sets} and the user defined function $\lambda_1(\cdot)$, Assumption \ref{nost_2} is feasible, too. In addition, there is no need for the leader to know $\delta^d$. In the following, a control input $u_{n}$ will be found such that for all initial conditions $x^d(t_0)$, and under Assumption \ref{nost_2}, the trajectories of \eqref{agent_fe} converge to a the set $\mathfrak{C}_{1,rf}^d(t)\supset\mathfrak{C}^d(t)$ and $\psi_1( x^d,t)\in \mathfrak{C}_{2,rf}^d$, $\mathfrak{C}_{2,rf}^d(t)\supset \mathfrak{C}^d(t)$, in a fixed-time $t\leq T^d+t_0$, $T^d>0$. The sets $\mathfrak{C}_{1,rf}^d$ and $\mathfrak{C}_{2,rf}^d$ will be characterised in the sequel. \textbf{QP formulation:} Define $z^d=\left[u_{n}, \varepsilon^d\right]^T\in\mathbb{R}^{2}$, and consider the following optimization problem. \begin{align*} &\mathop {\min }\limits_{u_{n}\in\mathbb{R},\varepsilon^d\in\mathbb{R}_{\geq 0}} \frac{1}{2}{{z^d}^T}z^d\label{B2} \end{align*}\\ \rm{s.t.}\;\;\; \begin{equation}\label{CLF} \begin{array}{l}\sum\nolimits_{i\in\mathcal{N}_{n}} \frac{{\partial\psi_1({{ x}^d},t)}}{{\partial {x_{i}^d}}} {\mathfrak{f}_{i,i}^d({x_{i}^d})}+ \frac{{\partial\psi_1({{ x}^d},t)}}{{\partial {x_{i}^d}}} {\mathfrak{f}_{n,i}^d({x_{n}^d,x_{i}^d})}\\ + \frac{{\partial \psi_1({{ x}^d},t)}}{{\partial {x_{n}^d}}}{\mathfrak{g}_{n}^d}({x_{n}^d}){u_{n}}+ \frac{{\partial\psi_1({{ x}^d},t)}}{{\partial {x_{n}^d}}} {\mathfrak{f}_{n,n}^d({x_{n}^d})}\\+\frac{{\partial\psi_1({{ x}^d},t)}}{{\partial t}}\ge - {\alpha_2^d}\;\emph{\sgn}({ \psi_1({{ x}^d},t)}){ |\psi_1({x^d},t)|}^{\gamma _{12}^d}\\ \;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;-{\beta_2^d}\;\emph{\sgn}({ \psi_1({x^d},t)}){ |\psi_1({x^d},t)|}^{\gamma _{22}^d}-\varepsilon^d, \end{array} \end{equation} where ${\alpha_2^d}>0, {\beta_2^d}>0$, $0<\gamma_{12}^d<1$, $\gamma_{22}^d>1$. \begin{theorem}\label{Th2} Consider a given TCHCBF $\mathfrak{h}^d(x^d,t)$ from Definition \ref{TFHOCBF} with the associated functions $\psi_k(x^d,t)$, $k\in\{1, 2\}$, as defined in \eqref{sets}. Any control signal $u_{n}:\mathbb{R}\to\mathbb{R}$ which solves the quadratic program \eqref{CLF} renders the set $\mathfrak{C}^d(t)$ robust convergent for the leader-follower network \eqref{agent_fe}, under Assumption \ref{nost_2}. \end{theorem} \begin{proof} In view of Theorem \ref{lem11}, constraint \eqref{CLF} corresponds to the fixed-time convergence of the closed-loop trajectories of network \eqref{agent_fe} to the set $\mathfrak{C}_{2,rf}^d(t):=\{ x^d\in\mathbb{R}^{2n}|\psi_1( x^d,t)\geq -\epsilon_{\max}^d\}$, where $\epsilon_{\max}^d$ is defined by the same formulation as in \eqref{D3}, within the fixed-time $T^d$ with similar expression as in \eqref{T}, built by parameters ${\alpha_2^d}, {\beta_2^d}>0$, $\gamma_{12}^d=1-\frac{1}{\mu^d}$, $\gamma_{22}^d=1+\frac{1}{\mu^d}$, $\mu^d>1$, $k^d>1$ and $\delta^d$. These parameters are substitutions of ${\alpha^s}, {\beta ^s}$, $\gamma_{1}^s$, $\gamma_{2}^s$, $\mu^s$, $k^s$ and $\delta^s$, respectively, in \eqref{T} and \eqref{D3}. Then, according to \eqref{sets}, we get $\dot{\mathfrak{h}}^d({ x}^d,t)+\lambda_1(\mathfrak{h}^d({ x}^d,t))\geq -\epsilon_{\max}^d$. Let $\lambda_1(\cdot)$ a linear extended class $\mathcal{K}$ function. Inspired by the notion of \emph{input-to-state safety} \cite{kolathaya2018input} and using the Comparison Lemma \cite[Lemma 3.4]{khalil2002nonlinear}, the set $\mathfrak{C}_{1,ref}^d(t):=\{ x^d\in\mathbb{R}^{2n}|\mathfrak{h}^d(x^d,t)\geq \lambda_1^{-1}(-\epsilon_{\max}^d)\}$, $t\geq T_e^d+t_0$ is forward-invariant and convergence of $\mathfrak{h}^d({ x}^d,t)$ to this set is achieved asymptotically. Moreover, $\varepsilon^d>0$ relaxes \eqref{CLF} in the presence of conflicting specifications and its minimization results in a least violating solution to ensure the feasibility of \eqref{CLF}. \end{proof} \begin{figure*} \centering \hspace*{-0.5cm} \psfragscanon \begin{subfigure}[b]{0.65\columnwidth} \psfrag{data1ps}[Bc][B1][0.45][0]{$p_3-p_1$} \psfrag{data2ps}[Bc][B1][0.45][0]{$p_3-p_2$} \includegraphics[width=6cm]{p_star3_TCNS} \caption{Position errors} \label{p_nostar} \end{subfigure} \begin{subfigure}[b]{0.65\columnwidth} \psfrag{data1vs}[Bc][B1][0.45][0]{$v_3-v_1$} \psfrag{data2vs}[Bc][B1][0.45][0]{$v_3-v_2$} \includegraphics[width=6cm]{v_star3_TCNS} \caption{Velocity errors} \label{barrier} \end{subfigure} \begin{subfigure}[b]{0.65\columnwidth} \psfrag{data11111}[Bc][B1][0.43][0]{$\mathfrak{h}_1^d(x_1^d,t)$} \psfrag{data22222}[Bc][B1][0.43][0]{$\mathfrak{h}_2^d( x_2^d,t)$} \psfrag{data33333}[Bc][B1][0.43][0]{$\mathfrak{h}_3^d( x_3^d,t)$} \includegraphics[width=6cm]{barrier_star_2_TCNS} \caption{TCHCBFs} \label{barrier} \end{subfigure} \psfragscanoff \caption{Leader-follower network \eqref{agent_fe} under full information of the leader from the network.}\label{fstar} \end{figure*} \begin{figure*} \psfragscanon \begin{subfigure}[b]{0.65\columnwidth} \psfrag{datap1}[Bc][B1][0.45][0]{$p_3-p_1$} \psfrag{datap2}[Bc][B1][0.45][0]{$p_3-p_2$} \includegraphics[width=6cm]{p_nostar_TCNS} \caption{Position errors} \label{p_nostar} \end{subfigure} \begin{subfigure}[b]{0.65\columnwidth} \psfrag{data1}[Bc][B1][0.45][0]{$v_3-v_1$} \psfrag{data2}[Bc][B1][0.45][0]{$v_3-v_2$} \includegraphics[width=6cm]{v_nostar_TCNS} \caption{Velocity errors} \label{barrier} \end{subfigure} \begin{subfigure}[b]{0.65\columnwidth} \psfrag{dataaaaaa}[Bc][B1][0.43][0]{$\mathfrak{h}_1^d(x_1^d,t)$} \psfrag{databbbbb}[Bc][B1][0.43][0]{$\mathfrak{h}_2^d( x_2^d,t)$} \psfrag{dataccccc}[Bc][B1][0.43][0]{$\mathfrak{h}_3^d( x_3^d,t)$} \includegraphics[width=6cm]{barrier_nostar2_TCNS} \caption{TCHCBFs} \label{barrier} \end{subfigure} \psfragscanoff \caption{Leader-follower network \eqref{agent_fe} under Assumption \ref{nost_2}}\label{fnostarrr} \end{figure*} \begin{corollary} Consider TCHCBF $\mathfrak{h}^d(x^d,t)$ from Definition \ref{TFHOCBF} with the associated functions $\psi_k(x^d,t)$, $k\in\{1, 2\}$, as defined in \eqref{sets} for network \eqref{agent_fe}. Then, any control signal $u_{n}$ satisfying \begin{equation*} \begin{array}{l} \sum\nolimits_{i\in\mathcal{V}} {\frac{{\partial\psi_1({{ x}^d},t)}}{{\partial {x_{i}^d}}} {\mathfrak{f}_i^d({x^d})} + \frac{{\partial \psi_1({{ x}^d},t)}}{{\partial {x_{n}^d}}}{\mathfrak{g}_{n}^d}({x_{n}^d}){u_{n}}}\\+ \frac{{\partial\psi_1({{ x}^d},t)}}{{\partial t}}\ge - {\alpha_2^d}\;\sgn({\psi_1({{ x}^d},t)}){ |\psi_1({x^d},t)|}^{\gamma _{12}^d}\\ \;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;-{\beta_2^d}\;\sgn({ \psi_1({x^d},t)}){ |\psi_1({x^d},t)|}^{\gamma _{22}^d}, \end{array} \end{equation*} for constants $\alpha_2^d>0$, $\beta_2^d>0$, $0<\gamma_{12}^d<1$, $\gamma_{22}^d>1$, renders the set $\mathfrak{C}^d:=\cap_{k=1}^{2} \mathfrak{C}_{k}^d\subset\mathcal{S}^d\subset\mathbb{R}^{2n}$ convergent and forward invariant. Moreover, it holds that $x^d\models\phi^d$ within $T^d\leq \frac{1}{\alpha_2^d(1 - \gamma_{12}^d)}+\frac{1}{\beta_2^d(\gamma_{22}^d-1)}$. \end{corollary} \begin{proof} Follows by the proof of Lemma \ref{lem1} with incorporating the arguments in Proposition \ref{prop1}. \end{proof} \begin{remark}\label{singularity} Note that there might exist singularities in the solution of \eqref{CLF} in some points; in particular, whenever $\frac{{\partial {\psi_1({{x^d}},t)}}}{{\partial {x_{n}^d}}}{g}_{n}^d({x_{n}^d})=0$. Under the assumption that singularities lie inside the safe sets, it can be shown that the required inequalities remain feasible and can be satisfied \cite[Proposition 4]{tan2021high}. \end{remark} \section{Simulations}\label{sim} Consider a leader-follower multi-agent system consisting of $M:=3$ second order dynamics agents. We consider dependent tasks, where the third agent acts as the leader. Consider the formula $\phi^d=\phi_1^d\wedge\phi_2^d\wedge\phi_3^d$ with $\phi_1^d:= G_{\left[ {10,30} \right]}(|{{v_3} - {v_2}}| \le {2})\wedge F_{\left[ {10,90} \right]}(|{{p_1} + 1 - {p_3}}| \le {1})$, $\phi_2^d:= F_{\left[ {10,30} \right]}(|{{v_3}-v_2 }| \le {1})\wedge G_{\left[ {30,90} \right]}(| {{v_1} - {v_3}}| \le {2})$, $\phi_3^d:=F_{\left[ {10,60} \right]}(|{{v_3} - {v_1}}| \le {1})\wedge G_{\left[ {60,90} \right]}(| {{v_2} - {v_3}}| \le {1})\wedge G_{\left[ {50,60} \right]}(|{{p_2}+1 - {p_3}}| \le {1})$. As the position dependent formulas are of relative degree $2$, we use TCHCBFs of order $m=2$. Furthermore, TCHCBFs of order $m=1$ are considered for velocity dependent specifications. We choose the parameters of the QP formulation as $\mu^d=2$, $\alpha_2^d=\beta_2^d=1$, and $\lambda_1(r):=r$. We focus on the effect of leader agent information on the group task satisfaction. First, we consider the network \eqref{agent_fe}, where $L:=\left[ {\begin{array}{*{20}{c}} {1}&{0}&{-1}\\ {0}&{1}&{-1}\\ {0}&{0}&{0} \end{array}} \right]$ and the input matrix $\mathfrak{g}^d(x^d):=\left[ {\begin{array}{*{20}{c}} 0_{1\times 5},1 \end{array}} \right]^T$, where leader has knowledge of the functions $ \frac{{\partial\psi_1({x^d},t)}}{{\partial {x_i^d}}}$ and dynamics ${\mathfrak{f}_{i}^d({x^d})}$, ${i\in\left\{1,\cdots,n\right\}}$ (an equivalent condition to Assumption \ref{star} for $2^{nd}$ order dynamics), where the convergent and forward invariance property of set $\mathfrak{C}^d(t)$, as well as task satisfaction are concluded as shown in Fig. \ref{fstar}. Next, we consider the agent $i=1$ as the leader's neighbor and $i=2$ as a neighbor to $i=1$ under Assumption \ref{nost_2}, where $\mathfrak{f}^d(x^d):=\left[ {\begin{array}{*{20}{c}} {{0_3}}&{{I_3}}\\ { - L}&{ - L} \end{array}} \right]x^d$ with $L:=\left[ {\begin{array}{*{20}{c}} {2}&{-1}&{-1}\\ {-1}&{1}&{0}\\ {0}&{0}&{0} \end{array}} \right]$. By solving \eqref{CLF} where $\delta^d=2.86$, the fixed-time convergence to the set $\mathfrak{C}_{2,ref}^d(t)\supset \mathfrak{C}^d(t)$ is achieved with $\epsilon_{max}^d=6.01$ using \eqref{D3}, which gives $\mathfrak{h}^d(x^d,t)\geq \lambda_1^{-1}(-\epsilon_{\max}^d)=-6.01$. Fig. \ref{fnostarrr} shows a violation in satisfaction of the third task in $t\in \left[50,60\right]$ which certifies this result, although it is less conservative than the estimation. The computation times on an Intel Core i5-8365U with 16 GB of RAM are about $2.1$ms. \section{Conclusion}\label{conc} Based on a class of time-varying convergent higher order control barrier functions, we have presented feedback control strategies to find solutions for the leader-follower multi-agent systems performance under STL tasks, based on the leader's knowledge on the followers' states. The finite convergence time is characterized independently of the initial conditions of the agents. Future work will extend these results to decentralized barrier certificates in networks containing more than one leader. \bibliographystyle{IEEEtran}
\section{Introduction} \label{sec:intro} Computer-assisted techniques known as three-dimensional ($3$D) character animation are widely used for improving the efficiency of rotoscoping in the classic $2$D cartoon. However, the cartoon drawings are not bound to geometric precision and typically contain many subtle artistic distortions, such as changes in scale and perspective, or more noticeable effects, such as changes in the shape or location of features (for example, Mickey Mouse's ears always face forward from any view, and the one ear changes positions and is shifted downward). When creating such animation with 3D, these gaps would be filled by additional deformation by artists in each view. Therefore, instead of conventional 3D models, our goal is to establish a simple framework to make 3D-like movements specialized for 2D cartoons. Some pioneering work show simulating 3D-like rotations from 2D drawings in anterior and lateral views~\cite{di2001automatic, Furusawa2014QR, live2019, reallusion2020cartoon, yeh2012double}. They utilize a simple heuristic approximating an object as a sphere. However, their method are not robust, nor are easy to represent to cartoon-like rotation (with artistic distortions). Rivers et al.~\shortcite{rivers20102} propose a novel hybrid structure of 2.5D graphics (i.e., 2D plus depth information). This structure associates each part of a 2D drawing with a single 3D anchor position, and it can estimate the 2D part's position and the depth value in a new view. Note that the shape of each part is interpolated in 2D. Although the concept is effective for generating 3D-like movements in new views, if several parts do not correspond to any real 3D position (e.g., Mickey Mouse's ears), the user must manually change the parts' positions based on 2D-space interpolation without 3D anchors. Rivers et al. does not argue how to handle the artistic distortions in multi-view 2D drawings. Following the spirit of the recent work in enriching cartoon animation, we formulated 2.5D graphics with artistic distortions of multi-view 2D drawings and developed a user interface to manually design 2.5D cartoon models from scratch. In summary, our work contains the following key contributions: \noindent \begin{itemize} \item A novel method to estimate anchor positions, shapes, and depth values of parts in an arbitrary view with a view-dependent deformation (VDD)-based mechanism. \item Professional and amateur artists' feedback demonstrating the benefit of our 2.5D cartoon models. \end{itemize} \begin{figure*}[t] \centering \includegraphics[width=0.9\linewidth]{fig/teasor_v2.pdf} \caption{The concept of our system. We envision a two-and-a-half-dimensional (2.5D) graphics operator for generating 3D-like effects in an arbitrary viewpoint based on a set of 2D shapes from several viewpoints, such as front and side views, inspired by view-dependent deformation. Note that the input cartoon character was designed using Harmony~\protect\shortcite{toonboom2020}.} \label{fig:teasor} \end{figure*} \section{Relatedwork} \label{sec:relatedWork} This section reviews prior work on frameworks for constructing conventional 2D/3D graphics and designing cartoon-like 2.5D graphics from 2D/3D models. \subsection{2D/3D Graphics System} For animating 2D drawings, existing approaches typically take one of two approaches. One approach is to deform input 2D images by using simple deformers~\cite{hornung2007character, igarashi2005rigid, su2018live, xing2015autocomplete} or physically-inspired simulation~\cite{kazi2016motion, willett2017secondary, xing2016energy}, and switching them like a flip comic~\cite{furukawa2017voice, morimoto2019generating, willett2017triggering, willett2020pose}. The other approach is to blend the interiors of the given 2D shapes, such as two-shape interpolation~\cite{alexa2000rigid, baxter2008rigid, baxter2009compatible, chen2013planar, kaji2012mathematical, yang2019cr}, examples-way blending~\cite{baxter2006latent, baxter2009n, bregler2002turning, Igarashi2005SKP, ma2012blendshape}, and stroke-based interpolation~\cite{de2006re, fukusato2016active, sederberg19932, sederberg1992physically, whited2010betweenit, yang2017context, yang2018ftp}. Their morph is as-rigid-as-possible (ARAP) in the sense that local volumes (areas) are least-distorting as they vary from their source to target configurations. Nonetheless, these algorithms focus only on 2D-space transformation, so 3D-like movements, such as 3D rotations, are still difficult to control. In 3D graphics, various approaches have been proposed for generating $3$D-specific models, such as human faces~\cite{blanz1999mms, han2017deepsketch2face, reallusion2019crazy}, rounded objects~\cite{dvorovzvnak2020monster, gingold2009structured, igarashi1999teddy}, humanoid characters~\cite{bessmeltsev2015MCC, levi2013artisketch}, or constructive solid geometry models~\cite{rivers2010modeling} from $2$D images (or sketches). However, the resulting 3D models do not retain the detail of $2$D drawings, such as artistic effects, at all, and thus, they are not suitable for designing $2$D cartoons. \subsection{2.5D Graphics System} \label{related:2.5D} \subsubsection{2D to 2.5D Graphics} Several systems enable the user to handle self-occlusion and generate new $3$D-like views and movements from $2$D drawings ($2$D $\rightarrow$ $2.5$D) by splitting the drawing parts into layers (i.e., vector graphics representation) and deforming them~\cite{carvalho2017dilight, boris2015vector, di2001automatic, Furusawa2014QR, live2019, reallusion2020cartoon, yeh2012double}. % However, these systems accept a very limited variation of character shape (i.e., sphere-like model) and pose. The underlying cause is that the designing process of 3D-like rotation of 2D cartoons remains a highly time-consuming task that requires artistic know-how (e.g., redrawing some or all of the models); hence, their sphere-based calculation is not suitable. Rivers et al.~\shortcite{rivers20102} propose a hybrid structure that consists of 2D drawings (vector graphics), each associated with a 3D-space anchor. Given multi-view 2D drawings, they do not approximate a 3D model but rather estimate the 3D anchor position of each part. The output shape is obtained by the 2D-space deformation system. These kinds of 2.5D graphics have attracted attention as a new approach to cartoon control, and several extensions have been proposed~\cite{coutinho2016puppeteering, kitamura2014modeling, gois2015interactive}. However, their research papers mainly focus on the concept of 2.5D graphics, and the view-specific distortions in classical $2$D cartoons are not discussed much. In addition, their system requires much time-consuming manual work. We therefore build on their concept but provide a description of the algorithm that is clearer and easier to formulate while handling the view-specific distortions. \subsubsection{3D to 2.5D Graphics} On the topic of using 3D models, stylized shading techniques are often used to emulate the style of classic 2D cartoons~\cite{barla2006x, sloan2001lit, todo2007locally} (3D $\rightarrow$ 2.5D). These systems assume that the shading effects are described by view-space normals and can produce various scenes beyond traditional 3D lighting control. In the context of 3D geometry-processing research, VDD is a popular way of discussing the artistic distortions of classical 2D cartoons~\cite{rademacher1999view}. For a given set of reference deformations of key viewpoints, this system deforms a 3D base model in a new viewpoint by automatically blending the deformations. In addition, the VDD mechanism is also extended to animation systems such as keyframe animation~\cite{chaudhuri2004system, chaudhuri2007reusing} and position-based dynamics~\cite{koyama2013view}. However, one problem with these techniques is that the user must prepare in advance a 3D base model and several 3D examples that are associated with a particular view direction. This requires manual intervention and can be especially difficult when creating the 3D cartoon models and the reference deformations. We therefore extend these mechanisms to apply a 2D layered model and handle the view-specific distortions. \section{User Interface} \label{sec:ui} In this section, we describe how users interact with our system (see Figure~\ref{fig:screenshot}) to design a 2.5D model from multi-view 2D shapes. The user interface of our prototype system shares the similar visual design to previous 2.5D modeling systems~\cite{coutinho2016puppeteering, gois2015interactive, rivers20102} and standard modeling systems~\cite{live2019, reallusion2020cartoon}. First, we begin the process of manually preparing multi-view 2D shapes -- already triangulated compatibly -- from various viewpoints. \begin{figure}[t] \centering \includegraphics[width=1.0\linewidth]{fig/interface.pdf} \caption{Screenshot of the proposed system that identifies (a) the modeling panel, (b) the view control panel, and (c) tool buttons.} \label{fig:screenshot} \end{figure} \subsection{2D-Space Management} \label{sec:management} The user loads a single-view 2D layered model (which is already split into several parts), and the system automatically computes a center position of each part as a 2D anchor position. Second, as with the commercial modeling software~\cite{maya2019, blender2019}, the system enables the user to adjust the shape of each part with simple deformers (e.g., translation, rotation, uniform scaling, and vertex editing). Note that the user can also make mesh models from image contour lines (e.g., 2D drawings using Harmony~\shortcite{toonboom2020}) based on polygon triangulation methods~\cite{baxter2009compatible}. \subsection{Viewpoint Selection} \label{sec:viewSelection} The user clicks an icon to specify the view (see Figure~\ref{fig:view}), and the proposed system associates the layered model to a view direction (front, right, left, back, top, or bottom view). Optionally, the user can choose an arbitrary viewpoint by performing a mouse-drag operation on the view control panel. \begin{figure}[ht] \centering \includegraphics[width=0.8\linewidth]{fig/viewButton.pdf} \caption{The predefined view buttons, which consist of (a) front, (b) right, (c) left, (d) back, (e) top, and (f) bottom views.} \label{fig:view} \end{figure} \subsection{Key Viewpoint Setting} \label{sec:key-viewpoint} After managing the shapes and selecting viewpoints, the user can record these key viewpoint data by clicking the \textit{Add} button. The system shows the key viewpoints (white dots) on the view control panel. In contrast, the \textit{Delete} function deletes the latest key viewpoint data. By repeating the above process, the user can generate multi-view 2D shapes. \subsection{Generation and Visualization Function} \label{sec:generation} When the user clicks on the \textit{Calc} button, the system automatically generates a 2.5D cartoon model from a set of key viewpoint data and displays it on the modeling panel. After generating 2.5D cartoon models, the user can freely turn the generated model around by performing the mouse-drag operation on the view control panel. In addition, by clicking the viewpoint buttons (see Figure~\ref{fig:view}) or the key viewpoints on the view control panel (white dots), the system instantly jumps to the selected view results. The generation process is sufficiently fast to return immediate feedback (in less than a second) when the user edits key viewpoint data, including additions and deletions. \section{Methods} \label{sec:method} \subsection{2.5D Cartoon Model Generation} We separated the 2D parts in the key views into two components: (i)~the 3D-space anchor and (ii)~the view-specific distortions. \subsubsection{Estimating 3D-Space Anchor Positions} \label{sec:method1} As with Rivers's system~\cite{rivers20102}, given a set of key viewpoint data, 3D anchor positions of $i$-th parts $\bm{v}^{i} \in \mathbb{R}^{3}$ can be computed using the triangulation algorithm from orthographic projection $\Pi : \mathbb{R}^{3} \rightarrow \mathbb{R}^{2}$ as follows: \vspace{2mm} \begin{equation} \mathop{\rm arg~min}\limits_{\bm{v}^{i}} \sum_{j \in K} \: \|\bm{v}^{i}_{j} - \Pi \: ( R_{j} \bm{v}^{i})\|^2 \label{eq:1} \end{equation} \noindent where $K$ is the number of key viewpoint data, $R_{j}$ is the rotation matrix of the $j$-th viewpoint, and $\bm{v}_{j}^{i} \in \mathbb{R}^{2}$ is the 2D anchor position of the $i$-th part in the $j$-th viewpoint. Note that if the user sets only the single key viewpoint data (when $|K| = 1$), our system sets depth values of the anchors in its key view at zero. \subsubsection{Estimating 2D-Space Anchor Distortions} \label{sec:method2} The projected positions of the estimated 3D anchors on each key viewpoint might be displaced from the 2D anchor positions of the input 2D shapes (when $|K| \geq 2$). Then, we focus on a difference in the $j$-th viewpoint $\bm{d}^{i}_{j} \in \mathbb{R}^{2}$ and define it as a 2D-space anchor distortion. \vspace{2mm} \begin{equation} \bm{d}^{i}_{j} = \bm{v}^{i}_{j} - \Pi \: ( R_{j} \bm{v}^{i}) \label{eq:2} \end{equation} \noindent Figure~\ref{fig:distortion} illustrates a view-space distortion of anchor in the $j$-th key viewpoint. We denote that when $|K| = 1$, the distortions of 2D parts in all of the views are set to zero~($\|\bm{d}_{j}^{i}\| = 0.0$). \begin{figure}[ht] \centering \includegraphics[width=1.0\linewidth]{fig/distortion.pdf} \caption{An example of a view-space distortion in key view. The system constructs a set of 2D distortions $\bm{d}_{j}^{i}$ between the user-managed anchor position~$\bm{d}_{j}^{i}$ and the projected position of the estimated 3D anchor~$\bm{v}^{i}$.} \label{fig:distortion} \end{figure} \subsection{View-Dependent Control} \label{sec:VDD} Given an arbitrary viewpoint $R_{cur}$ in the view control panel, we computed the anchor positions (including the depth values) and the shapes in $2.5$D space by blending a set of the viewpoint data. Therefore, the user must specify appropriate blending weights $w_{j} \in [0.0, 1.0]$, $\sum_{j} w_{j} = 1.0$. Rivers et al.~\shortcite{rivers20102} parameterize the view angles into a 2D rectangular grid (yaw and pitch) and find the $k$-nearest key views on the space. However, their discretization does not consider the roll value. In addition, the previous VDD methods~\cite{chaudhuri2004system, chaudhuri2007reusing, koyama2013view, rademacher1999view} utilize the camera positions in the key viewpoints (3D space), but these remain too difficult to consider rotational information of the key views. Therefore, we employed the camera's rotational matrices in the view control panel and compute the weights based on the Frobenius distance between two rotational matrices of the current view $R^{cur}$ and the $j$-th key view $R^{j}$ as follows: \begin{equation} {w}_{j} = \frac{\phi_{j}}{\sum_{k \in K} \phi_{k}} \label{eq:3} \end{equation} \begin{displaymath} \phi_{j} = \|R_{cur} - R_{j}\|_{F}^{\alpha} \end{displaymath} \noindent where $\| \cdot \|_{F}$ is the Frobenium norm, and $\alpha$ is the constant value (where $\alpha = -4$). \subsubsection{2.5D-Space Anchor Interpolation} \label{sec:VDD1} For estimating the anchor positions of $i$-th parts in a new view, we blended the anchor distortions in the key viewpoints and sum up the projected result of the 3D anchor as follows: \vspace{2mm} \begin{equation} \bm{v}_{cur}^{i} = \Pi \:\: [ R_{cur} \bm{v}^{i} + \sum_{j \in K} w_{j} \: (R_{cur} \cdot R^{-1}_{j})\: \bm{d}_{j}^{i}] \label{eq:4} \end{equation} \noindent The depth value of each part $l_{i}$ is given by \vspace{2mm} \begin{equation} l^{i} = (R_{cur} \bm{v}^{i})_{z} \end{equation} \noindent With the above method, the system can assign all the depth values to layer parts without labor-intensive manual depth editing in 3D. Of course, if the user sets the depth values of 2D parts in key views, the system can similarly blend them. \subsubsection{2.5D-Space Shape Interpolation} \label{sec:VDD2} The 2D shape of each layered part $P = (\bm{p}_{0}, \bm{p}_{1}, \cdots, \bm{p}_{n})$, $\bm{p}_{i} \in \mathbb{R}^{2}$ in the current view is determined by ARAP-based interpolation techniques~\cite{alexa2000rigid, baxter2008rigid, baxter2009compatible, chen2013planar, kaji2012mathematical, yang2019cr} across its key views. First, we construct a $2 \times 2$ affine transformation (i.e., rotation $+$ scaling) that transforms a triangle $f$ of the $i$-th part in the ``front'' view to the corresponding triangle in another view. Second, we combine two methods: i) Kaji's local map~\cite{kaji2012mathematical} to compute a set of the triangle interpolated transformations $A_{f}$ and ii) Baxter's morphing technique~\cite{baxter2009n} to assemble them and optimize global transformations $B_{f}$, computed as \vspace{2mm} \begin{equation} \mathop{\rm arg~min}\limits_{P} \sum_{f} \| B_{f} - A_{f} \|_{F}^{2} \label{eq:5} \end{equation} \begin{displaymath} A_{f} = \sum_{j \in K} R_{f}^{j}(w_{j}) \cdot \exp{[w_{j} \log{S_{f}^{j}}(w_{j})]} \end{displaymath} \noindent where $R_{f}^{j}(\alpha)$ and $S_{f}^{j}(\alpha)$ are the rotational matrix and scaling matrix, respectively, of the interpolated triangle shape, computed by the polar decomposition algorithm, at $\alpha \in \mathbb{R}$. This interpolation method appears to work well even if the silhouette of key views (e.g., left and right views) are not consistent, but any other interpolation technique, such as stroke-based interpolation~\cite{whited2010betweenit, yang2017context} or switching animation~\cite{willett2017triggering, willett2020pose}, could also be used with our framework. \begin{figure}[t] \centering \includegraphics[width=0.9\linewidth]{fig/blending.pdf} \caption{Triangle-based shape blending based on a set of 2D shapes from (a) front view and (b) another view.} \label{fig:shape} \end{figure} \subsubsection{Color-Space Interpolation} In a similar way, we could simply blend color values of each part in key views on RGBA space $\bm{c}_{i}^{cur} \in (r, g, b, a)$ as follows: \vspace{2mm} \begin{equation} \bm{c}_{cur}^{i} = \sum_{j \in K} w_{j} \bm{c}_{j}^{i} \label{eq:7} \end{equation} \noindent where $\bm{c}_{i}^{j}$ is the $i$-th part's RGBA values in the $j$-th view. \subsubsection{Limited-Style Camera Control} Our algorithm allows the user to freely look around the 2.5D model, but undesired popping artifacts may occur when the parts' Z-ordering changes as with previous 2.5D methods. Note that a certain amount of popping is actually expected in flip book cartoons~\cite{morimoto2019generating, willett2017triggering}. Then, we consider a method to mitigate an impression that popping effects give to users during rotation. One straightforward approach is to automatically generate cartoon styles from the user-specified camera rotation $R_{cur}$ in the view control panel. Existing studies on cartoon style~\cite{furukawa2017voice, kawamoto2008efficient, robert2019keyframe} modify input motion data such as motion-capture data by omitting some frames. While these methods can be suitable for reducing unintended popping, they run only on pre-recorded (offline) data. Therefore, we have considered two approaches in advance: (i)~a pre-recorded approach and (ii)~a real-time approach, and we concluded that the real-time method outperforms the offline method in terms of character design. In this paper, we compute XYZ-angles from an arbitrary viewpoint $R_{cur}$ and independently discrete them with a 10-degree interval. \section{Results} \label{sec:result} Our prototype system was implemented on a $64$-bit Windows $10$ laptop (Intel\textcircled{\scriptsize R}Core$^{TM}$ i$7$-$5500$U CPU@$2.40$GHz and RAM $8.00$GB) using standard OpenGL and GLSL. The designed 2.5D cartoon models and their statistics are shown in Figure~\ref{fig:result} and Table~\ref{table:1}. As shown in these results, our system can make each 2.5D model within approximately $10$ mins (longer for the more complex models shown in Figure~\ref{fig:multilayer}). \begin{table}[t] \centering \caption{Model Statistics.\vspace{-2mm}} \begin{tabular}{ll|c|c|c} \hline \raisebox{-0.3mm}{Model} && \raisebox{-0.3mm}{\#\:Parts} & \raisebox{-0.3mm}{\#\:Key Views} & \raisebox{-0.3mm}{FPS} \\ \hline \raisebox{-0.3mm}{Dog} & \raisebox{-0.3mm}{(Fig.~\protect\ref{fig:teasor})} & \multicolumn{1}{r|}{\raisebox{-0.3mm}{$17$}} & \multicolumn{1}{r|}{\raisebox{-0.3mm}{$8$\:}} & \raisebox{-0.3mm}{$60+$}\\ \raisebox{-0.3mm}{Cat} & \raisebox{-0.3mm}{(Fig.~\protect\ref{fig:result})} & \multicolumn{1}{r|}{\raisebox{-0.3mm}{$18$}} & \multicolumn{1}{r|}{\raisebox{-0.3mm}{$4$\:}} & \raisebox{-0.3mm}{$60+$}\\ \raisebox{-0.3mm}{Girl} & \raisebox{-0.3mm}{(Fig.~\protect\ref{fig:result})} & \multicolumn{1}{r|}{\raisebox{-0.3mm}{$22$}} & \multicolumn{1}{r|}{\raisebox{-0.3mm}{$4$\:}} & \raisebox{-0.3mm}{$60+$}\\ \raisebox{-0.3mm}{Panda} & \raisebox{-0.3mm}{(Fig.~\protect\ref{fig:3Dvs2.5D})} & \multicolumn{1}{r|}{\raisebox{-0.3mm}{$9$}} & \multicolumn{1}{r|}{\raisebox{-0.3mm}{$3$\:}} & \raisebox{-0.3mm}{$60+$}\\ \raisebox{-0.3mm}{Bear} & \raisebox{-0.3mm}{(Fig.~\protect\ref{fig:2Dvs2.5D})} & \multicolumn{1}{r|}{\raisebox{-0.3mm}{$9$}} & \multicolumn{1}{r|}{\raisebox{-0.3mm}{$4$\:}} & \raisebox{-0.3mm}{$60+$}\\ \raisebox{-0.3mm}{Boy} & \raisebox{-0.3mm}{(Fig.~\protect\ref{fig:failure})} & \multicolumn{1}{r|}{\raisebox{-0.3mm}{$11$}} & \multicolumn{1}{r|}{\raisebox{-0.3mm}{$2$\:}} & \raisebox{-0.3mm}{$60+$}\\ \raisebox{-0.3mm}{Ghost} & \raisebox{-0.3mm}{(Fig.~\protect\ref{fig:weight})} & \multicolumn{1}{r|}{\raisebox{-0.3mm}{$6$}} & \multicolumn{1}{r|}{\raisebox{-0.3mm}{$3$\:}} & \raisebox{-0.3mm}{$60+$}\\ \raisebox{-0.3mm}{Walking Cycle} & \raisebox{-0.3mm}{(Fig.~\protect\ref{fig:animation})} & \multicolumn{1}{r|}{\raisebox{-0.3mm}{$11$}} & \multicolumn{1}{r|}{\raisebox{-0.3mm}{$2 + 2$\:}} & \raisebox{-0.3mm}{$60+$}\\ \raisebox{-0.3mm}{Raccoon Dog} & \raisebox{-0.3mm}{(Fig.~\protect\ref{fig:multilayer})} & \multicolumn{1}{r|}{\raisebox{-0.3mm}{$26$}} & \multicolumn{1}{r|}{\raisebox{-0.3mm}{$4$\:}} & \raisebox{-0.3mm}{$60+$}\\ \raisebox{-0.3mm}{Alien} & \raisebox{-0.3mm}{(Fig.~\protect\ref{fig:multilayer})} & \multicolumn{1}{r|}{\raisebox{-0.3mm}{$26$}} & \multicolumn{1}{r|}{\raisebox{-0.3mm}{$4$\:}} & \raisebox{-0.3mm}{$60+$}\\ \raisebox{-0.3mm}{Geracho} & \raisebox{-0.3mm}{(Fig.~\protect\ref{fig:multilayer})} & \multicolumn{1}{r|}{\raisebox{-0.3mm}{$27$}} & \multicolumn{1}{r|}{\raisebox{-0.3mm}{$3$\:}} & \raisebox{-0.3mm}{$60+$}\\ \hline \end{tabular} \label{table:1} \end{table} \subsection{Comparison of Rivers et al.} \label{sec:vsRivers} We compared the results of our algorithm against Rivers et al.~\shortcite{rivers20102}. The existing 2.5D methods~\cite{coutinho2016puppeteering, kitamura2014modeling, gois2015interactive} compute anchor positions and shapes in the same way as Rivers et al., so this comparison is enough to show the effectiveness of our algorithm. \subsubsection{About Anchor Interpolation} \label{sec:vsAnchor} First, we compared the results of our anchor estimation (with VDD) and 3D anchor results without the VDD mechanism, that is, $\bm{v}_{cur}^{i} = \Pi \: ( R_{cur} \bm{v}^{i})$. The results without VDD were mostly the same as Rivers's 3D anchor estimation. Figure~\ref{fig:3Dvs2.5D} shows examples of reproducing the input views using 2.5D models. As expected, in case that the input parts (red square) do not correspond to any real 3D positions, the generated results without VDD do not match even the input and are difficult to handle the position displacements in its key views. On the other hand, by using our method, the plausible positions can still be obtained. \begin{figure}[t] \centering \includegraphics[width=0.9\linewidth]{fig/comparison_3D.pdf} \caption{Comparing the anchor positions computed by (a)~the 3D-space interpolation (without 2D-space anchor distortion) and (b)~our 2.5D interpolation method (with 2D-space anchor distortion).} \label{fig:3Dvs2.5D} \end{figure} \begin{figure}[t] \centering \includegraphics[width=0.9\linewidth]{fig/comparison_2D_ver2.pdf} \caption{Comparing the anchor positions computed by (a)~the 2D-space interpolation (see Equation~(\protect\ref{eq:8})) and (b)~our 2.5D interpolation method.} \label{fig:2Dvs2.5D} \end{figure} Second, we compared the results of our anchor estimation against a simple 2D-space interpolation across its key views (without 3D-space anchor) as follows. This is a version that Rivers et al. used to compute anchor positions that do not correspond to any real 3D position, in any view (e.g., Mickey Mouse's ears). \vspace{2mm} \begin{equation} \bm{v}^{i}_{cur} = \sum_{j \in k} w_{j} \bm{v}_{j}^{i} \label{eq:8} \end{equation} \noindent where $w_{j}$ is the weight value for the $j$-th views computed using Rivers's method. Figure~\ref{fig:2Dvs2.5D} shows the estimated results in oblique view. As expected, it is difficult for the 2D-space interpolation to represent 3D-like rotations across different views, such as out-of-plane rotation. In contrast, our anchor estimation achieves 3D-like movements because of the 3D-space anchor. In summary, the method from Rivers et al. allows users to optionally select one of the two methods to compute the locations of all parts (including $Z$-ordering): (i)~using 3D-space anchors estimated from several key views, or (ii)~using 2D-space interpolations after removing 3D-associated anchors one by one, as in Equation~(\ref{eq:8}). When handling the view-specific anchor distortions (see Figure~\ref{fig:3Dvs2.5D}), the user has no choice but to use 2D-space interpolation (without the 3D anchor). However, this choice requires a lot of key viewpoints for making 3D-like movements (see Figure~\ref{fig:2Dvs2.5D}). In addition, their operations are complicated, making the process time-consuming and tedious. In contrast, our anchor estimation can easily deal with both the 3D-space movements and 2D-space distortions on all of the key views, so our system can produce significantly better results from a small number of key viewpoints. \begin{figure}[t] \centering \includegraphics[width=0.88\linewidth]{fig/failureCase.pdf} \caption{An example of (b)~2.5D graphics from (a, c)~two key views. The input model was manually designed while referring to \cite{rivers20102}.} \label{fig:failure} \end{figure} \subsubsection{About Shape Interpolation} \label{sec:vsShape} In determining all of the parts' shapes in a novel view, Rivers et al. select $k$-nearest key views on the 2D parameterized angle space and interpolate the key shapes that consist of silhouette lines by using a linear vertex interpolation. However, their method cannot prevent local distortions in the intermediate shapes because the intermediate shapes do not consider the rotational and stretching components. In contrast, our interface enables users to input (and edit) triangulated models, so it is possible to minimize the distortion of the intermediate shapes (see Figure~\ref{fig:failure}). However, our system, like Rivers's method, employs 2D-space interpolation techniques. It is still difficult to translate all the vertices of each part along 3D-like paths. It might be better to interpolate parts' shapes by adding 3D-space information, if necessary. Second, as mentioned in Section~\ref{sec:management}, our interface allows users to manually deform each part's shape (i.e., input data) and build a vertex correspondence between key views. This manual function is simple but effective for improving the visual quality of 2.5D graphics. In addition, we investigated existing methods to fully automatically build a silhouette correspondence between multi-view 2D shapes~\cite{sederberg1992physically, baxter2009compatible}, but we refrain from involving them in our interface for the time being. This is because most of them do not support highly concave shapes (e.g., a parting position of the hair) and regions of partial occlusion. We will plan to consider semi-automatic methods to build correspondence between 2D shapes specialized for our problem. \begin{figure}[t] \centering \includegraphics[width=0.85\linewidth]{fig/weightModel.pdf} \caption{An experimental set of key views that consist of (a)~the front view (regular attitude) and two attitudes rotated at (b)~$90^\circ$ and (c)~$180^\circ$ around the $Z$-axis without changing the position from the front view (i.e., roll rotation).} \label{fig:example} \end{figure} \begin{figure}[t] \hspace*{-5mm} \includegraphics[width=1.08\linewidth]{fig/weightComparison2.pdf \caption{Comparing the weight computation results of three methods; (a)~Rivers et al.~\shortcite{rivers20102}, (b)~Rademacher~\protect\shortcite{rademacher1999view}, (c)~Koyama et al.~\protect\shortcite{koyama2013view}, and (d)~our method, defined by a $135^\circ$ rotation about the $Z$-axis.} \label{fig:weight} \end{figure} \begin{figure*}[t] \centering \includegraphics[width=0.9\linewidth]{fig/animation.pdf} \caption{An example of animation results between two 2.5D cartoon models (from the frontal view and the lateral view) at time $t \in \{0.0, 1.0\}$. The input models are created by referring to a walking cycle from \cite{rademacher1999view}.} \label{fig:animation} \end{figure*} \subsection{Comparison of Weight Computation} \label{sec:weight} We applied both the proposed weight computation and other methods to a 2.5D cartoon model generated by our interface. Figure~\ref{fig:weight} shows blending results generated by (a)~Rivers's method~\shortcite{rivers20102}, (b)~Rademacher's method~\shortcite{rademacher1999view}, (c)~Koyama's method~\shortcite{koyama2013view}, and (d)~our method. Note that the references (character poses) consist of the front view (regular attitude) and two attitudes rotated at $90^\circ$ and $180^\circ$ around the $Z$-axis without changing the view position from the front view (i.e., roll rotation), as shown in Figure~\ref{fig:example}. In order to compute blending weights, Rivers's system constructs a Delaunay triangulation of key viewpoints in a 2D parameterization of the angle space (i.e., yaw and pitch), and then finds the $k$-nearest key views on the space. Similarly, Rademacher's method directly constructs a convex hull of the key viewpoints in 3D space. Therefore, in the case of the above key viewpoints which have the same yaw and pitch angles and positions, these methods cannot compute the blending weights at all (see Figure~\ref{fig:weight}(a, b)). Koyama's method relies only on an angle between the viewing ray and key viewpoint position, so their system equally blends all of the above data and shows an inappropriate rotation result, as shown in Figure~\ref{fig:weight}(c). In summary, the previous methods cannot consider differences of camera rotation; hence, the position information of viewpoint is unsuitable for computing the blending weights. On the other hand, by using our blending method, plausible results can still be obtained (see Figure~\ref{fig:weight}(d)). \subsection{2.5D Cartoon Animation Over Time} For generating cartoon animations from an arbitrary viewpoint, one straightforward approach is to prepare 2.5D models for every frame, but this requires a lot of time. Hence, as with traditional 3D animation systems, our 2.5D graphics can easily be extended to create an animation from a small number of the 2.5D models at selected frames by linearly interpolating all components of 2.5D models (i.e., 3D anchor positions, the distortions, and the shapes), as shown in Figure~\ref{fig:animation}. Of course, this system can further improve the quality by combining with existing systems, such as a skeletal deformer~\cite{hornung2007character, coutinho2016puppeteering}, in the 3D anchor interpolation process. \section{User Study} \label{sec:userStudy} We conducted a user study to gather feedback on the quality of the 2.5D cartoon models and our modeling tool (e.g., advantages and limitations) from participants. This is because the previous methods~\cite{coutinho2016puppeteering, gois2015interactive, kitamura2014modeling, rivers20102} focused only on cartoon-like representation techniques, and subjective impressions have never been studied. \subsection{Procedure} \label{sec:procedure} We invited 10 participants (P1, P2, $\cdots$, P10) aged 20--40 years ($Avg.=25.3$, $Var.=3.13$) to evaluate the usability of our system, using a standard mouse as an input device. Each participant was asked to fill out a form asking about their experience with designing 2D/3D models using commercial software. P1 had extensive experience in creating 3D models with Side FX Houdini and Autodesk Fusion $360$ ($> 8$ years), and drawing cartoon tools with Clip Studio Paint ($> 3$ years) to create video games as a hobby. P2–4 had professional programming experience, building applications for commercial and research purposes. They also had prior experience of 3D modeling software, such as RealityCapture and Blender ($> 3$ years) and image processing software, such as Adobe Photoshop ($> 2$ years). P5–7 were experienced users of 3D modeling software, such as Pixologic ZBrush and Blender ($> 2$ years) but had no prior experience in drawing cartoons. P8–9 had moderate amounts of experience drawing cartoons with Paint Tool SAI or Adobe Illustrator ($> 1$ year). P10 had basic knowledge of the JavaScript and C programming languages that are used in code editor, but no graphical design experience. First, we gave them a brief overview of our modeling tools. The instructor explained a step-by-step tutorial to familiarize the participants with this modeling framework. After an overview explanation, they could smoothly design multi-view 2D parts (i.e., location and shape) using our system. Next, we also provided them with a 2D layered model in the front view and asked them to keep designing their own 2.5D cartoon models until they were satisfied. At the end of the 2.5D cartoon model creation, the participants filled out a questionnaire consisting of four questions about our system's usability (see Table~\ref{table:2}:\:Question Items) using a seven-point Likert scale (from $1$:\textit{\:Extremely dissatisfied} to $7$:\textit{\:Extremely satisfied}). The purpose of these questions was to analyze their subjective impressions. \subsection{Observations and User Feedback} \label{sec:observation} Table~\ref{table:2} shows the post-experiment questionnaire results, giving the mean values ($> 4$) and standard deviations. The participants' comments regarding the proposed 2.5D cartoon model are summarized below. \noindent \begin{itemize} \item P1\&10: \textit{I thought that this design logic is clear and felt relaxed to learn it.} \item P2: \textit{The user interaction was similar to that of the modeling software that I am used to (e.g., Cartoon Animator 4~\shortcite{reallusion2020cartoon} and Live 2D~\shortcite{live2019}). Using different operations is also intuitive. The user interface provides only relevant information and is easy to grasp.} \item P2\&P7: \textit{It looks very convincing and is very easy to use, and I think that this software is quite useful for making short animations (e.g., flash animation).} \item P5\&P6: \textit{I like how fast it is to generate 2.5D models when clicking the Calc button, so I can concentrate on the 2.5D model modeling without getting stressful.} \item P8: \textit{I would like everybody, especially animators, to use 2.5D cartoon models from character concept art images when making their own storyboard.} \item P8\&9: \textit{I have no experience in 3D-model building, but if I imagine the process, I feel it tedious to have every part correctly located. In contrast, to edit 2D component from different views like CAD may be easier for me.} \end{itemize} Overall, the participants reported that the process of 2.5D character modeling (i.e., 2D-space operation) is straightforward to use and useful. A possible reason is that the proposed 2.5D modeling tool enables users to easily handle 3D-like rotations without 3D-space modeling. We think that our 2.5D modeling system can be used as a ``base'' tool for cartoon design, and it might be interesting to explore the possibility of incorporating other functions into our tool. There were some requests from participants to add functions, as follows: \begin{table}[t] \hspace*{-2mm} \caption{Results of the post-experiment questionnaire.} \begin{tabular}{c|lcc} \hline \raisebox{-0.3mm}{\#} & \raisebox{-0.3mm}{Question Items} & \raisebox{-0.3mm}{Mean} & \raisebox{-0.3mm}{SD} \\ \hline \raisebox{-0.3mm}{1} & \raisebox{-0.3mm}{It was easy to learn how to use.} & \raisebox{-0.3mm}{$6.20$} & \raisebox{-0.3mm}{$0.60$}\\ \raisebox{-0.3mm}{2} & \raisebox{-0.3mm}{It was comfortable to use.} & \raisebox{-0.3mm}{$6.20$} & \raisebox{-0.3mm}{$0.75$}\\ \raisebox{-0.3mm}{3} & \raisebox{-0.3mm}{I didn't feel stress after the design task.} & \raisebox{-0.3mm}{$5.90$} & \raisebox{-0.3mm}{$0.83$}\\ \raisebox{-0.3mm}{4} & \raisebox{-0.3mm}{The quality of 2.5D models was satisfactory.} & \raisebox{-0.3mm}{$6.10$} & \raisebox{-0.3mm}{$0.70$}\\ \hline \end{tabular} \label{table:2} \end{table} \noindent \begin{itemize} \item P3: \textit{This software does not show much textual information, but adding them might make it easy to aid 2.5D character modeling.} \item P6\&8: \textit{When roughly placing 2D components on the modeling panel, I want the system to automatically identify groups and align individual components one by one, for example vertical and horizontal alignment~\cite{Xu2015gaca}.} \end{itemize} According to these comments, the participants also identified several issues with the current implementation, but we found those not to be serious problems, and it is possible to further improve user experience with an engineering effort. \section{Professional Feedback} \label{sec:professional} We also asked two professional animators working in cartoon production about the quality and the application possibility of 2.5D cartoon models designed by our prototype system. Their comments are summarized below. \noindent \begin{itemize} \item \textit{This 2.5D cartoon modeling method has the potential to drastically improve the efficiency of classical cartoon design in future.} \item \textit{The current system's operations are very intuitive, so I thought that 2D artists (without 3D modeling skill) can easily make their own 2.5D models with no problems.} \item \textit{The position correction (anchor interpolation) and the 2D shape interpolation are simple but still useful for animators to generate a choice of classical cartoon's representation such as hybrid animations.} \end{itemize} In their experience, 3D modeling systems can be difficult to use, even for experienced artists, and do not retain the detail of 2D drawings (e.g., Mickey Mouse's ear) at all. Thus, the 3D model usage is limited in classical cartoon productions (e.g., background and effects design). In contrast, we confirm that 2.5D cartoon models and our tool are expected to efficiently design cartoon animations. They also commented that the 2.5D graphics could be very helpful to their manual drawing tasks. \noindent \begin{itemize} \item \textit{With the proposed system, animators can easily generate various character images composed at an oblique angle. I think that 2.5D models can support animators' manual drawings by tracing the screen of the generated 2.5D models on sheets of paper.} \item \textit{The 2.5D models can also be used for doing proper in-betweening. As with the limited-camera control, I expect to incorporate an automatic function to select an optimal set of frames from interpolated animated results (limited-cartoon style keyframing)~\cite{kawamoto2008efficient, robert2019keyframe}.} \end{itemize} In summary, the professional animators also suggested some example usage scenario from their point of view. As far as we know, there is not enough computer-assisted software to design classical cartoon characters, so we will take this opportunity to spread the 2.5D graphics systems into the animator field in the future. \begin{figure}[t] \centering \includegraphics[width=0.95\linewidth]{fig/complexModel_arxiv.pdf} \caption{More complex models created using our interface. From top to bottom, the input models are designed by reference to Raccoon Dog from \cite{kitamura2014modeling}; Alien from \cite{rivers20102}.} \label{fig:multilayer} \end{figure} \section{Limitations and Future Work} \label{sec:limitation} Although our limited-style camera control can mitigate a bit of an impression that popping artifacts are given to users during rotation, this is not a solution to the root of Rivers's popping problem. To address this issue, we plan to support partial occlusions of some shapes (e.g., concave regions) in future. For example, it might be better to allow users to (1)~make several anchor points inside each part, (2)~decompose one part into many sub-parts, or (3)~manually change a sprite switching time, if necessary. In addition, the current appearance is computed only by RGBD color blending and the users are not allowed to apply shading and texture mapping methods. Thus, a potential future work is to incorporate better shading method~\cite{gois2015interactive} and texture mapping method~\cite{debevec1998efficient}. While striving for a simple user interface with minimal user input, our system might not accommodate more complicated operations (e.g., using a special device such as a pen tablet). Achieving a balance between simplicity and functionality might be a good research topic. \section{Conclusion} \label{sec:conclusion} This paper has presented a method to design 2.5D cartoon models from multi-view 2D shapes as follow: We have newly formulated the concept of Rivers's method~\shortcite{rivers20102} by combining it with VDD techniques~\cite{chaudhuri2004system, chaudhuri2007reusing, koyama2013view, rademacher1999view}. Based on the proposed 2.5D graphics, we can easily and quickly emulate a 3D-like movement while preserving the view-space effects in a 2D cartoon. Hence, we believe that our formulation will be a new step toward the acceleration of research in classical 2D cartoon animations in the future. \section*{Acknowledgement} We would like to thank Yu Takahashi (OLM, Inc.) and Tatsuo Yotsukura (OLM Digital, Inc.) for their valuable comments and helpful suggestions. The characters in Figure~\ref{fig:teasor}, \ref{fig:screenshot}, and \ref{fig:result} are copyrighted by OLM.
\section{Introduction} In studying automorphism groups of projective varieties, it is a basic problem to understand its induced action on the cohomology groups, say, with rational coefficients. More explicitly, for a complex smooth projective variety $X$, the action of the automorphism group $\Aut(X)$ on the cohomology with rational cohomology is the group homomorphism $\psi\colon \mathrm{Aut}(X)\rightarrow \Aut(H^*(X,\mathbb{Q}))$ such that $\psi(\sigma) = (\sigma^{-1})^*$ for any $\sigma\in\Aut(X)$. We denote $\ker(\psi)$ by $\Aut_\mathbb{Q}(X)$ and call its elements the \emph{numerically trivial automorphisms} of $X$. In this paper, we are interested in the size of $\Aut_\mathbb{Q}(X)$. Obviously, the identity component $\Aut_0(X)$ of $\Aut(X)$ is contained in $\Aut_{\mathbb{Q}}(X)$. It is proved by Lieberman \cite{Lie78} that the index $[\Aut_{\mathbb{Q}}(X): \Aut_0(X)]$ is finite. The question is how large $[\Aut_{\mathbb{Q}}(X): \Aut_0(X)]$ can be. If $\dim X=1$, then $X$ is a curve and $\Aut_{\mathbb{Q}}(X)=\Aut_0(X)$ holds by the explicit description of $\Aut_0(X)$ and an easy application of the Riemann--Hurwitz formula. From dimension two on, the situation becomes very delicate. It is part of the package of the Torelli theorem that $\Aut(X)$ acts faithfully on $H^*(X, \mathbb{Q})$ (or equivalently, on $H^2(X, \mathbb{Q})$) for K3 surfaces \cite{BuR75, PS71}.\footnote{For K3 surfaces in positive characteristics, $\Aut(X)$ acts faithfully on the second $l$-adic \'etale cohomology group $H^2_{\text{\'et}}(X, \mathbb{Q}_l)$ by \cite[Theorem~1.4]{Ke16}.} In relation to the Torelli type problem in arbitrary dimension, $\Aut_\mathbb{Q}(X)$ is shown to be trivial for the following classes of varieties: generalized Kummer manifolds (\cite{O20}), smooth cubic threefolds and fourfolds as well as their Fano varieties of lines (\cite{Pan20}), and complete intersections $X\subset \mathbb{P}^n$ such that $\deg X\geq 3$, $\dim X\geq 2$ and $X$ is not of type $(2,2)$ (\cite{CPZ17}). However, examples of elliptic surfaces with nontrivial $\Aut_\mathbb{Q}(X)$ were found around 1980 by several authors (\cite{Pe79, Pe80, BarPe83, D84, MN84}). Mukai--Namikawa \cite{MN84} obtained the optimal inequality $|\Aut_\mathbb{Q}(X)|\leq 4$ for Enriques surfaces.\footnote{We refer to \cite{D13, DM19, DM21} for numerically trivial automorphisms of Enriques surfaces in positive characteristics.} By a recent work of Catanese and the second author (\cite{CatLiu20}), $[\mathrm{Aut}_{\mathbb{Q}}(X):\Aut_0(X)]\leq 12$ holds for surfaces with Kodaira dimension 0, but the index can be arbitrarily large for the class of smooth projective surfaces with Kodaira dimension $-\infty$ and $1$. If $X$ is a surface of general type, as for all smooth projective varieties of general type, the identity component $\Aut_0(X)$ is trvial, and hence $[\mathrm{Aut}_{\mathbb{Q}}(X):\Aut_0(X)]= |\Aut_{\mathbb{Q}}(X)|.$ Some restrictions on the invariants of $X$ with nontrivial $\Aut_{\mathbb{Q}}(X)$ were found by Peters \cite{Pe80} under the condition that the canonical linear system $|K_X|$ is base point free. Cai \cite{Cai04} used the Bogomolov--Miyaoka--Yau inequality to show that $|\Aut_\mathbb{Q}(X)|$ is uniformly bounded; in fact, $|\Aut(X)|\leq 4$ as soon as $\chi(X, \mathcal{O}_X)\geq 189$. For irregular surfaces of general type, the results are quite complete by now: \begin{enumerate} \item If $q(X)\geq 3$, then $\Aut_\mathbb{Q}(X)$ is trivial (\cite{Cai12a, CLZ13}). \item If $q(X)=2$, then $|\Aut_\mathbb{Q}(X)|\leq 2$, and there is a complete classification of the equality case: they are certain surfaces isogenous to a product of curves of unmixed type (\cite{Cai12b, CLZ13, Liu18}). \item If $q(X)=1$ then $|\Aut_\mathbb{Q}(X)|\leq 4$, and again equality holds only if $X$ is isogenous to a product of curves of unmixed type. Moreover, there are infinite serie of such surfaces with $\Aut_\mathbb{Q}(X)=4$ (\cite{CL18}). \end{enumerate} For regular surfaces of general type, it follows from \cite{Cai06} that $\Aut_\mathbb{Q}(X)$ is trivial if $X$ has a genus $2$ fibration and $\chi(X, \mathcal{O}_X)\geq 5$. Not much is known about $\Aut_\mathbb{Q}(X)$ for higher dimensional general type varieties. Unlike the surface case, one easily constructs smooth threefolds of general type with $\Aut_{\mathbb{Q}}(X)$ nontrivial and $q(X)$ arbitrarily large: Just take $X=S\times C$, where $S$ is a smooth projective surface of general type with nontrivial $\Aut_\mathbb{Q}(S)$ and $C$ be a smooth projective curve with $g(C)\geq 2$; then $\Aut_\mathbb{Q}(X)$, containing $\Aut_\mathbb{Q}(S)\times \{\id_C\}$, is nontrivial, and $q(X)=q(S)+g(C)$ can be arbitrarily large. Nevertheless, we have the following question about the boundedness of $\Aut_\mathbb{Q}(X)$ for smooth projective varieties of general type: \begin{qu}\label{qu: main} Given a positive integer $n$, does there exist a constant $M(n)$, depending on $n$, such that $|\mathrm{Aut}_{\mathbb{Q}}(X)|\leq M(n)$ for any $n$-dimensional \emph{smooth} projective variety $X$ of general type? \end{qu} In this paper we give a confirmative partial answer to Question~\ref{qu: main} in dimension $3$. \begin{thm}\label{thm: main} There is a positive constant $M$ such that, for any smooth projective threefold of general type satisfying one of the following conditions: \begin{enumerate} \item[(i)] $q(X)\geq 3$. \item[(ii)] $X$ has a Gorenstein minimal model. \end{enumerate} the inequality $|\Aut_\mathbb{Q}(X)|\leq M$ holds. \end{thm} Curiously, the smoothness condition in Theorem~\ref{thm: main} cannot be weakened to, say, the condition of having terminal singularities: There exist projective threefolds $X$ with terminal singularities and maximal Albanese dimension such that $|\Aut_\mathbb{Q}(X)|$ can be arbitrarily large (\cite[Example~6.3]{Z21}). We observe that the numerically trivial automorphism $\sigma$ appearing there induces a nontrivial translation of the Albanese variety $A_X$. This cannot happen if $X$ were smooth; see Lemma~\ref{prop: fix A}. For smooth threefolds with maximal Albanese dimension, we have a more precise statement. \begin{thm}[= Corollary~\ref{cor: mAd}]\label{thm: mAd1} If $X$ is smooth projective threefold of general type with maximal Albanese dimension, then $|\Aut_\mathbb{Q}(X)|\leq 4$, and in the equality case we have $\Aut_\mathbb{Q}(X)\cong(\mathbb{Z}/2\mathbb{Z})^2$ and $q(X)=3$. \end{thm} This generalizes and refines the effective boundedness results of \cite{Z21}. Thanks to \cite[Example~6.1]{Z21}, the bound of Theorem~\ref{thm: mAd1} is optimal. By the Hodge decomposition of $H^*(X, \mathbb{C})$, $\Aut_\mathbb{Q}(X)$ acts trivially on $H^i(X, \mathcal{O}_X)$ and $H^{i}(X, \omega_X)$ for each $i$. It is this condition we are mainly using in the arguments, and it already yields the boundedness we are searching for. Theorems~\ref{thm: main} and \ref{thm: mAd1} are consequences of the following more technical theorem; see also Corollaries~\ref{cor: mAd}, \ref{cor: Ad1}, \ref{cor: Ad2}. Here we allow mild singularities. \begin{thm}\label{thm: O trivial} There is a constant $M>0$ satisfying the following. Let $X$ be a projective threefold of general type with canonical singularities. Let $\Aut_\mathcal{O}(X)<\Aut(X)$ be the group of automophisms acting trivially on $H^i(X, \mathcal{O}_X)$ (or, equivalently, $H^i(X, \omega_X)$) for $i\geq 0$, and let $\Aut_A(X)<\Aut(X)$ the group of automorphisms preserving each fiber of the Albanese map $a_X\colon X\rightarrow A_X$. If $X$ satisfies one of the following conditions: \begin{enumerate} \item[(i)] $X$ has maximal Albanese dimension, that is, $\dim a_X(X) =3$; \item[(ii)] $X$ has Albanese dimension two and either $q(X)\geq 3$ or $A_X$ is a simple abelian surface; \item[(iii)]$X$ has Albanese dimension one and $q(X)\geq 2$; \item[(iv)] $X$ has a Gorenstein minimal model; \end{enumerate} then $|\Aut_\mathcal{O}(X)\cap \Aut_A(X)|\leq M$. In case (i), we have $|\Aut_\mathcal{O}(X)\cap \Aut_A(X)|\leq 4$, and if the equality holds then $\Aut_\mathbb{Q}(X)\cong(\mathbb{Z}/2\mathbb{Z})^2$ and $q(X)=3$. \end{thm} The third author \cite{Z21} proved the inequality $|\Aut_\mathcal{O}(X)|\leq 6$ for threefolds of general type satisfying the conditions (i) and (iv) simultaneously; the proof was a straightforward application of the Noether--Severi type inequality and the Miyaoka--Yau inequality bounding the volume of $K_X$ in terms of $\chi(X, \omega_X)$ from below and from above respectively. In dealing with the case (iv) of Theorem~\ref{thm: O trivial}, we take a similar approach, but the required Noether type inequality in this more general setting is not readily available. For that reason, we prove in the appendix of the paper the existence of a Noether type inequality for log canonical pairs with coefficients from a given subset $\mathcal{C}\subset(0,1]$ such that $\mathcal{C}\cup\{1\}$ attains the minimum. This result is of independent interest. In the case (i) of Theorem~\ref{thm: O trivial}, we use the eventual paracanonical maps \cite{J16, BarPS19} to obtain the effective bound $|\Aut_\mathcal{O}(X)\cap \Aut_A(X)|\leq 4$. The point is that the eventual paracanonical map $\varphi_X\colon X\dashrightarrow Z $ factors through the quotient map $\pi\colon X\rightarrow X/G$, where $G=\Aut_\mathcal{O}(X)\cap \Aut_A(X)$. It follows that $|G|\leq \deg \varphi_X$. We can then draw on the explicit description of the cases with $\deg\varphi_X\geq 2$ by \cite{J16}. In general, there is a factorization of the Albanese map $a_X\colon X\xrightarrow{\pi} Y \xrightarrow{a_Y} A_X$, where $Y=X/G$ with $G=\Aut_\mathcal{O}(X)\cap \Aut_A(X)$ and $\pi\colon X\rightarrow Y$ is the quotient map. If $\dim a_X(X) <3\leq q(X)$, we use the Chen--Jiang decomposition of $a_{X*}\omega_X$ and $a_{Y*}\omega_Y$ to bound the difference between the ranks of $a_{X*}\omega_X$ and $a_{Y*}\omega_Y$, which in turn gives the required bound on $|G|$. The case with $q(X)=2$ and $A_X$ a simple abelian surface requires a more involved application of the Chen--Jiang decomposition, but the idea is similar. \section{Preliminaries}\label{sec: prelim} We work over the complex numbers throughout the paper. In this section we recall the notion of Albanese morphisms for normal projective varieties $X$ as well as the Chen--Jiang decomposition on abelian varieties, and prove some basic properties of numerically trivial automorphisms in relation to their induced actions on the cohomology groups $H^*(X, \mathcal{O}_X)$, $H^*(X, \omega_X)$ as well as the Albanese variety. \subsection{The Albanese morphism} Let $X$ be a normal projective variety. Then there exists a morphism $a_X: X\rightarrow A_X$ to an abelian variety $A_X$ such that any morphism from $X$ to an abelian variety factors through $a_X$ (\cite[Th\'eor\`eme 5]{Ser59}). This morphism is unique up to translations on $A_X$. We call $A_X$ the Albanese variety of $X$ and $a_X: X\rightarrow A_X$ the Albanese morphism. When $X$ is a smooth projective variety, it is well known that $\dim A_X=q(X):=h^1(X, \mathcal O_X)$ and $A_X$ is dual to the Picard variety $\Pic^0(X)$. In general, if $X$ is singular, then the Albanese morphism $a_{\tilde X}$ of $\tilde X$ may not factor through $\rho$, where $\rho: \tilde X\rightarrow X$ is a desingularization. But when $X$ has rational singularities, then $a_{\tilde X}$ factors through $\rho$ and $A_X\cong A_{\tilde X}$ (see for instance \cite[Lemma 8.1]{Kaw85}). Let $X$ be a normal projective variety, and $a_X: X\rightarrow A_X$ the Albanese map with respect to a base point. We call the number $\dim a_X(X)$ the \emph{Albanese dimension} of $X$; if $\dim a_X(X) =X$ then $X$ is said to be \emph{of maximal Albanese dimension}. Let $X\rightarrow S \xrightarrow{a_S}A_X$ be the Stein factorization of $a_X$. By the universal property of the Albanese morphisms, it is easy to check that $A_S=A_X$, and the morphism $a_S\colon S\rightarrow A_X$ is indeed the Albanese morphism of $S$. For any $\sigma\in \Aut(X)$, by the universal properties of the Albanese morphisms and of the Stein factorization, there are induced automorphisms $\sigma_S\in \Aut(S)$ and $\sigma_A\in \Aut(A_X)$ such that the following diagram is commutative \[ \begin{tikzcd} X \arrow[r, "f"] \arrow[d, "\sigma"] & S \arrow[r, "a_S"] \arrow[d, "\sigma_S"] & A_X \arrow[d, "\sigma_A"] \\ X \arrow[r, "f"] & S \arrow[r, "a_S"] & A_X\\ \end{tikzcd} \] In this way, we obtain group homomorphisms \begin{equation}\label{eq: induce} \psi_S\colon \Aut(X)\rightarrow \Aut(S), \, \sigma\mapsto \sigma_S, \text{\hspace{.5cm}and \hspace{.5cm} } \psi_A\colon\Aut(X)\rightarrow \Aut(A_X),\, \sigma\mapsto \sigma_{A}. \end{equation} In other words, $ \Aut(X)$ acts on $S$ and $A_X$ such that the morphisms $f$ and $a_S$ are $\Aut(X)$-equivariant. \subsection{The Chen--Jiang decomposition} An important ingredient of the proofs of the main results on irregular threefolds is the Chen--Jiang decomposition theorem. We briefly recall this result. Let $A$ be an abelian variety. For a coherent sheaf $\mathcal{F}$ on $A$, we define the $i$-th \emph{cohomological support loci} for integer $i\geq 0$ to be the following closed subset of $\Pic^0(A)$ with the reduced scheme structure: $$V^i(\mathcal{F}):=\{P\in\Pic^0(A)\mid H^i(A, \mathcal{F}\otimes P)\neq 0\}.$$ We say that $\mathcal{F}$ is \emph{GV} if $\codim_{\Pic^0(A)}V^i(\mathcal{F})\geq i$ for each $i\geq 1$ and we say that $\mathcal{F}$ is \emph{M-regular} if $\codim_{\Pic^0(A)}V^i(\mathcal{F})> i$ for each $i\geq 1$. These two definitions were introduced respectively by Hacon \cite{Hac04} and by Pareschi--Popa \cite{PP03}. GV sheaves have certain positivity properties. Hacon proved in \cite{Hac04} that if $0\neq \mathcal{F}$ is GV, then $V^0(\mathcal{F})\neq \emptyset$, that is, there exists $P\in \Pic^0(A)$ such that $H^0(A, \mathcal{F}\otimes P)\neq 0$. M-regular sheaves have stronger positivity properties. Pareschi and Popa proved in \cite{PP03} that if $\mathcal{F}$ is M-regular, then $V^0(\mathcal{F})=\Pic^0(A)$ and, roughly speaking, $\mathcal{F}$ can be generated by the twisted global sections. Given a morphism $f: X\rightarrow A$ from a smooth projective variety to an abelian variety, the main result of \cite{Hac04} states that $R^if_*\omega_X$ is a GV-sheaf for each $i\geq 0$. The following improvement of Hacon's theorem, which was first proved when $f$ is generically finite in \cite{CJ18} and later proved for $f$ general in \cite{PPS17}, is now called the Chen--Jiang decomposition theorem. \begin{thm}\label{thm: decomp} Let $f: X\rightarrow A$ be a morphism from a smooth projective variety to an abelian variety. For each integer $k\geq 0$, there exist finitely many quotient maps $p_I: A\rightarrow B_I$ between abelian varieties with connected fibers, and, for each index $I$, an M-regular sheaf $\mathcal{F}_I$ on $B_I$ and a torsion line bundle $Q_I\in \Pic^0(A)$ such that $$R^kf_*\omega_X\cong \bigoplus_{I}p_I^*\mathcal{F}_{I}\otimes Q_I.$$ \end{thm} \begin{rema}\label{rmk:torsion} We remark that under the assumption of Theorem \ref{thm: decomp}, for any torsion line bundle $Q\in \Pic^0(X)$, $R^kf_*(\omega_X\otimes Q)$ also has the Chen--Jiang decomposition (see for instance \cite[Note on page 2449]{PPS17}). Moreover, any direct summand of $R^kf_*(\omega_X)$ has the Chen--Jiang decomposition (see \cite[Proposition 3.6]{LPS20}). Similar decompositions also hold for varieties with klt singularities, see for instance \cite{J20} and \cite{M20}. \end{rema} \subsection{Some basic properties of numerically trivial automorphisms} Let $X$ be a normal projective variety, and $a_X\colon X\rightarrow A_X$ the Albanese morphism. We are interested in various normal subgroups of the automorphism group $\Aut(X)$ of $X$, defined as follows: \begin{itemize} \item the group of \emph{numerically trivial automorphisms} \[\Aut_\mathbb{Q}(X):=\{\sigma\in\Aut(X) \mid \sigma|_{H^*(X,\mathbb{Q})} = \id_{H^*(X,\mathbb{Q})}\},\] \item the group of \emph{$\mathcal{O}$-cohomologically trivial automorphisms} \[\mathrm{Aut}_{\mathcal{O}}(X) := \left\{\sigma\in\mathrm{Aut}(X) \mid \sigma|_{H^{*}(X, \mathcal{O}_X)}=\id_{H^{*}(X, \mathcal{O}_X)} \right\},\] \item the group of \emph{$A$-trivial automorphisms} \[\Aut_A(X):=\{\sigma\in\Aut(X) \mid \sigma|_{A_X} = \id_{A_X} \},\] \end{itemize} where $\sigma|_{H^*(X,\mathbb{Q})}$, $\sigma|_{H^{*}(X, \mathcal{O}_X)}$ and $\sigma|_{A_X}$ denote the induced actions of $\sigma$ on $H^*(X,\mathbb{Q}):=\bigoplus_i H^i(X,\mathbb{Q})$, $H^{*}(X, \mathcal{O}_X):=\bigoplus_i H^i(X, \mathcal{O}_X)$ and $A_X$ respectively. If $X$ is Cohen--Macaulay, then by Serre duality, $\mathrm{Aut}_{\mathcal{O}}(X)$ acts trivially on $H^i(X, \omega_X)$ for each $i\geq 0$. This is the case when $X$ has rational singularities. The following Lemma~\ref{lem: Hodge} implies that $\mathrm{Aut}_{\mathbb Q}(X)<\mathrm{Aut}_{\mathcal{O}}(X)$, provided that there is an effective $\mathbb{R}$-divisor $\Delta$ such that $(X,\Delta)$ is a log canonical pair. We will see in Proposition~\ref{prop: fix A} that $\mathrm{Aut}_{\mathbb Q}(X)< \mathrm{Aut}_A(X)$ if $X$ is a smooth projective threefold of general type. \begin{lem}\label{lem: Hodge} Let $X$ be a normal projective variety. \begin{enumerate} \item[(i)] If there is an effective $\mathbb{R}$-divisor $\Delta$ on $X$ such that $(X, \Delta)$ is log canonical, then $\Aut_\mathbb{Q}(X)$ acts trivially on $H^i(X, \mathcal{O}_X)$ for all $i\geq 0$. \item[(ii)] If $X$ is smooth, then $\Aut_\mathbb{Q}(X)$ acts trivially on $H^i(X, \Omega_X^j)$ for all $0\leq i, j\leq \dim X$. \end{enumerate} \end{lem} \begin{proof} Note that $\Aut_\mathbb{Q}(X)$ acts trivially on $H^*(X, \mathbb{C}) = H^*(X, \mathbb{Q})\otimes_\mathbb{Q} \mathbb{C}$. If $(X, \Delta)$ is log canonical then the homomorphism $H^i(X, \mathbb{C})\rightarrow H^i(X, \mathcal{O}_X)$ induced by the inclusion of sheaves $\mathbb{C}\subset \mathcal{O}_X$ is surjective (\cite{KK10}). It follows that $\Aut_\mathbb{Q}(X)$ acts trivially on $H^i(X, \mathcal{O}_X)$. If $X$ is smooth, $\Aut_\mathbb{Q}(X)$ acts trivially on its direct summands $H^i(X, \Omega_X^j)$ of $H^{i+j}(X, \mathbb{C})$ in the Hodge decomposition. \end{proof} \begin{lem}\label{lem: chi 0} Let $X$ be a normal projective variety with rational singularities. Suppose that $\sigma\in\Aut(X)$ induces a trivial action on $H^1(X,\mathcal{O}_X)$. Then the following holds. \begin{enumerate} \item[(i)] The induced automorphism $\sigma_A\in \Aut(A_X)$ is a translation. \item[(ii)] If $\sigma$ is of finite order and $\sigma_A\neq \id_{A_X}$, then $\chi(X, \omega_X)=(-1)^{\dim X}\chi(X, \mathcal O_X)=0$ and $e(X)=0$. \end{enumerate} \end{lem} \begin{proof} (i) Suppose that $\sigma\in \Aut(X)$ induces the trivial action on $H^1(X, \mathcal{O}_X)$. Since $a_X^*\colon H^1(A, \mathcal{O}_{A})\rightarrow H^1(X,\mathcal{O}_X)$ is an isomorphism satisfying $$\sigma^*\circ a_X^* = a_X^* \circ\sigma_A^*\colon H^1(A_X, \mathcal{O}_{A_X}) \rightarrow H^1(X, \mathcal{O}_X)$$ and $\sigma^*$ is the identity map of $H^1(X,\mathbb{C})$, we infer that $\sigma_A^*$ is the identity map of $H^1(A_X, \mathcal{O}_{A_X})$. It follows that $\sigma_A$ is a translation of $A_X$. (ii) If $\sigma_A\neq \id_{A_X}$, then it is a nontrivial translation by (i) and hence has no fixed points. It follows that $\sigma$ does not fix any point either. We then conclude by the topological Lefschetz fixed point theorem that $e(X) =0$. For the vanishing of $\chi(X, \mathcal O_X)$, we take a $\sigma$-equivariant resolution $\rho\colon \tilde X\rightarrow X$ (\cite{EV00}). Since $X$ has rational singularities, we have $a_X\circ \rho = a_X$ and $\chi(X, \mathcal{O}_X) =\chi(\tilde X, \mathcal{O}_{\tilde X})$. Let $\tilde\sigma\in \Aut(\tilde X)$ be the lift of $\sigma$. Then $\tilde \sigma$ has no fixed points either. By the holomorphic Lefschetz fixed point theorem, applied to $\tilde\sigma$, we obtain $\chi(X, \mathcal{O}_X) =\chi(\tilde X, \mathcal{O}_{\tilde X}) = 0.$ \end{proof} We refer to \cite{KM98} for the notions appearing in Lemma~\ref{lem: descend}. \begin{lem}\label{lem: descend} Let $(X, \Delta)$ be a projective log canonical pair, and $\varphi_R\colon X\rightarrow Y$ the contraction with respect to a $(K_X+\Delta)$-negative extremal ray $R$ of the Kleiman--Mori cone of $(X, \Delta)$. Then any numerically trivial automorphism $\sigma\in\Aut_\mathbb{Q}(X)$ induces an automorphism $\sigma_Y\in \Aut(Y)$. Moreover, the following holds. \begin{enumerate} \item[(i)] If $Y$ has rational singularities, then $\sigma_Y$ is $\mathcal{O}$-cohomologically trivial, that is, $\sigma_Y\in \Aut_\mathcal{O}(Y)$. \item[(ii)] If $X$ and $Y$ are smooth, then $\sigma_Y$ is numerically trivial, that is, $\sigma_Y\in \Aut_\mathbb{Q}(Y)$. \end{enumerate} \end{lem} \begin{proof} By the contraction theorem, there is a line bundle $L$ on $X$ such that $L=\varphi_R^*L_Y$ for some ample line bundle $L_Y$ on $Y$. Since $\sigma$ acts trivially on $H^2(X,\mathbb{Q})$, it preserves the cohomology class of $L$ in $H^2(X,\mathbb{Q})$. Note that homological euqivalence coincides with algebraic equivalence for Cartier divisors, we infer that $\sigma^*L$ is numerically equivalent to $L$. For any curve $C$ whose numerical class generates the extremal ray $R$, using the projection formula, \[ L_Y\cdot(\varphi_R\circ\sigma)_*(C)=L\cdot\sigma_*(C)=(\sigma^*L)\cdot C=0, \] we get that $C$ is contracted by $\varphi_R\circ\sigma$. By the rigidity of birational contractions, there exists a morphism $\sigma_Y\colon Y\to Y$ such that the following diagram is commutative \[ \begin{tikzcd} X \arrow[r, "\sigma"] \arrow[d, "\varphi_R"']& X\arrow[d, "\varphi_R"] \\ Y\arrow[r, "\sigma_Y"]&Y \end{tikzcd} \] Since $\sigma$ is an isomorphism, we conclude that $\sigma_Y$ is an isomorphism of $Y$. (i) If $Y$ has rational singularities, then we have isomorphisms \[ H^i(X, \mathcal{O}_X) \cong H^i(Y, \mathcal{O}_Y) \] for each $i\geq 0$ which is compatible with induced actions of $\sigma$ and $\sigma_Y$ on $H^i(X, \mathcal{O}_X)$ and $H^i(Y, \mathcal{O}_Y)$ respectively. Since $\sigma\in \Aut_\mathcal{O}(X)$, we infer that $\sigma_Y\in \Aut_\mathcal{O}(Y)$. (ii) By the decomposition theorem for resolutions (\cite{dCM09}), $\varphi_R^*\colon H^*(Y, \mathbb{C})\rightarrow H^*(X, \mathbb{C})$ is injective. Thus the numerical triviality of $\sigma$ implies that of $\sigma_Y$. \end{proof} \begin{prop}\label{prop: fix A} Let $X$ be a smooth projective threefold of general type. Then $\Aut_\mathbb{Q}(X)$ acts trivially on $A_X$. \end{prop} \begin{proof} The statement is trivial when $q(X)=0$. We can thus assume that $q(X)>0$. Take $\sigma\in\Aut_{\mathbb{Q}}(X)$ and let $\sigma_A\in\Aut_{\mathbb{Q}}(A_X)$ be the induced automorphism of $A_X$. Then $\sigma_A$ is a translation of $A_X$ by Lemmas~\ref{lem: Hodge} and \ref{lem: chi 0}. If $X$ has a smooth minimal model, then the Miyaoka--Yau inequality, $\vol(K_X)\leq 72\chi(\mathcal{O}_X)$ implies that $\chi(\mathcal{O}_X)>0$. By Lemma~\ref{lem: chi 0}, $\sigma_A$ is trivial. Now we assume that the minimal models of $X$ are singular. In order to show that $\sigma_A=\id_{A_X}$, it suffices to show that $\sigma_A$ fixes a point. Consider a minimal model program \[ \begin{tikzcd} X=X_0 \arrow[dashed]{r}{\rho_0} & X_1 \arrow[dashed]{r}{\rho_1} &X_2 \arrow[dashed]{r}{\rho_2} &\cdots \arrow[dashed]{r}{\rho_{n-1}} &X_n \end{tikzcd} \] where for $0\leq i\leq n$, $X_i$ has terminal singularities, the $\rho_i$ are either divisorial extremal contractions or flips, and $K_{X_n}$ is nef. As we have explained in last section, the induced maps $a_i\colon X_i\dashrightarrow A_X$ are indeed the corresponding Albanese morphisms of $X_i$ and the above minimal model program is over $A_X$. By assumption, $X_0=X$ is smooth and $X_n$ is singular, so we there is an index $i_0$ such that $X_{i_0}$ is smooth and $X_{i_0+1}$ is singular. By the classification of extremal contractions in dimension three (\cite{Mo82}; see also \cite[Theorem1.32]{KM98}), the birational maps $\rho_i\colon X_i \dashrightarrow X_{i+1}$ are divisorial contractions for $i\leq i_0$ and, moreover, $\rho_{i_0}\colon X_{i_0}\rightarrow X_{i_0+1}$ is a morphism contracting a divisor $E\subset X_{i_0}$ to a point $p\in X_{i_0+1}$. By Lemma~\ref{lem: descend}, $\sigma$ descends to a numerically trivial automorphism $\sigma_{i_0}\in\Aut_{\mathbb{Q}}(X_{i_0})$. In particular, $\sigma_{i_0}$ preserves the exceptional locus $\Exc(\rho_{i_0})$, and this implies that the induced automorphism $\sigma_A$ fixes the point $a_{i_0}(E) =a_{i_0+1}(p)\in A_X$. \end{proof} \section{Irregular threefolds of general type} In this section, we prove Theorem~\ref{thm: O trivial}, cases (i)-(iii). Let $X$ be an irregular projective threefold of general type with canonical singularities and $a_X\colon X\rightarrow A_X$ its Albanese map with respect to a base point. We proceed according to the Albanese dimension $\dim a_X(X)$. \subsection{The case $\dim a_X(X)=3$} In this subsection we assume that $\dim a_X(X)=3$, so $X$ is of maximal Albanese dimension. \begin{thm}\label{thm: mAd} Let $X$ be a projective threefold of general type with canonical singularities and of maximal Albanese dimension. Then $|\mathrm{Aut}_{\mathcal{O}}(X)\cap \mathrm{Aut}_A(X)|\leq 4$, and if the equality holds then $\mathrm{Aut}_{\mathcal{O}}(X)\cap \mathrm{Aut}_A(X)\cong (\mathbb{Z}/2\mathbb{Z})^2$ and $q(X)=3$. \end{thm} \begin{proof} Let $G:=\mathrm{Aut}_{\mathcal{O}}(X)\cap \mathrm{Aut}_A(X)$. Then the Albanese morphism $a_X$ factors through the quotient morphism $\pi: X\rightarrow Y:=X/G$. If $\chi(X, \omega_X)=0$, then $a_X$ is birationally an $(\mathbb Z/2\mathbb{Z})^2$-cover by \cite{CDJ14}. Thus $G$ is an (abelian) subgroup of $(\mathbb Z/2\mathbb{Z})^2$. If $\chi(X, \omega_X)>0$, then $\chi(X, \omega_X)=\chi(Y, \omega_Y)>0$. By \cite{J16}, the eventual paracanonical map $\varphi_X\colon X\dashrightarrow Z$ factors through the quotient map as $\varphi_X\colon X\xrightarrow{\pi}Y\dashrightarrow Z$, where $Y\dashrightarrow Z$ is the eventual paracanonical map $\varphi_Y$ of $Y$ (\cite[Proposition~1.5]{J16}). Note that, $\deg\varphi_X\leq 8$ by \cite[Theorem 1.7]{J16}, and hence \begin{equation}\label{eq: deg event paracan} |G|=\deg\pi = \deg\varphi_X / \deg\varphi_Y \leq \frac{8}{\deg\varphi_Y}. \end{equation} If $\deg\varphi_Y\geq 2$, then either $|G| \leq 3$ or $|G|=4$ and $\deg \varphi_X=8$. In the latter case, $\varphi_X$ is birationally a $(\mathbb{Z}/2\mathbb{Z})^3$-cover by \cite[Theorem 1.7]{J16}. If $\deg\varphi_Y=1$, then $\varphi_Y$ is birational and hence \[ \chi(Z, \omega_Z) =\chi(Y, \omega_Y) = \chi(X, \omega_X)>0. \] By \cite[Theorem 1.7]{J16} again, $\varphi_X$ induces a Galois field extenstion $\mathbb C(X)/\mathbb C(Z)$ with Galois group $\mathbb{Z}/2\mathbb{Z}$ or $\mathbb{Z}/3\mathbb{Z}$, or $(\mathbb{Z}/2\mathbb{Z})^2$. In conclusion, we have $|G|\leq 4$, and if the equality holds then $G\cong (\mathbb{Z}/2\mathbb{Z})^2$. In the case $G\cong (\mathbb{Z}/2\mathbb{Z})^2$, we will show that $q(X)= 3$. When $\chi(X, \omega_X)=0$, we automatically have $q(X)=3$ by \cite{CDJ14}. We can thus assume that $\chi(X, \omega_X)=\chi(Y, \omega_Y)>0$. If $q(X)>3$, we are in the situation of \cite[Subsection 4.1, Case 1]{J16}. By \cite[Proposition 4.4]{J16}, the quotient map $\pi$ is birationally equivalent to the eventual paracanonical map of $X$. Let $V:=a_X(X)$ be the Albanese image of $X$ with the reduced scheme structure. Since $\dim A_X>3$, $V$ is fibred by an abelian subvariety $K$ such that the quotient $V/K$ is not fibred by any positive dimensional abelian subvariety of $A_X/K$ and any desingularization of $V/K$ is of general type (see \cite[Theorem 10.9]{Ue75}). Let $B:=A/K$ and $V_B:=V/K$. We have the following picture: \begin{eqnarray*} \xymatrix{ X\ar[drr]_{f}\ar[r]^{\pi} & Y\ar[dr]^{h}\ar[r]& V\ar[d]\ar@{^{(}->}[r]&A_X\ar[d]\\ & &V_B \ar@{^{(}->}[r] & B.} \end{eqnarray*} Let $t\in V_B$ be a general point and let $X_t$ and $Y_t$ be the fibers of $f$ and $h$ over $t$ respectively. We remark that $X_t$ and $Y_t$ may be reducible and each component of $X_t$ or $Y_t$ is of general type. Fix a general torsion line bundle $Q\in \Pic^0(A_X)$. Note that $A_X$ is the Albanese variety of both $X$ and $Y$. We can simply regard $Q$ as a general torsion line bundle on $X$ or on $Y$. By generic vanishing, \[ h^0(X, \omega_X\otimes Q)=\chi(X, \omega_X\otimes Q)=\chi(X, \omega_X)=\chi(Y, \omega_Y)=\chi(Y, \omega_Y\otimes Q)=h^0(Y, \omega_Y\otimes Q). \] Moreover, since $Q$ is general, we also have $h^i(X_t, \omega_{X_t}\otimes Q)=h^i(Y_t, \omega_{Y_t}\otimes Q)=0$. Thus both $R^if_*(\omega_X\otimes Q)$ and $R^ih_*(\omega_Y\otimes Q)$ are supported on a proper subset of $V_B$. However, by the main theorem of \cite{Ko86a}, these sheaves are torsion-free on $V_B$ if they are not zero. Thus, $R^if_*(\omega_X\otimes Q)=R^ih_*(\omega_Y\otimes Q)=0$ for $i\geq 1$. Therefore, for $Q'\in \Pic^0(B)$ general, \begin{multline}\label{equal} h^0(V_B, f_*(\omega_X\otimes Q)\otimes Q')=\chi(X, \omega_X\otimes Q\otimes Q') \\ =\chi(Y, \omega_Y\otimes Q\otimes Q')=h^0(V_B, h_*(\omega_Y\otimes Q)\otimes Q'). \end{multline} We claim that the inclusion of coherent sheaves $h_*(\omega_Y\otimes Q)\subset f_*(\omega_X\otimes Q)$ is an isomorphism. Assume the contrary, and let $\mathcal{Q}$ be the \emph{nonzero} quotient sheaf. Then $V^0(\mathcal{Q})$ is a proper subset of $\Pic^0(B)$ by \eqref{equal}. On the other hand, by \cite{Ko86a}, these two sheaves are torsion-free and since $V_B$ is not fibred by positive dimensional abelian subvariety, using the Chen--Jiang decomposition for $h_*(\omega_Y\otimes Q)$ and $f_*(\omega_X\otimes Q)$ (see \ref{thm: decomp} and Remark \ref{rmk:torsion}), both of them are M-regular. It follows that $\mathcal{Q}$ is also M-regular and hence $V^0(\mathcal{Q}) = \Pic^0(B)$, which is a contradiction. The equality $h_*(\omega_Y\otimes Q)= f_*(\omega_X\otimes Q)$ implies that $\chi(X_t, \omega_{X_t})=\chi(Y_t, \omega_{Y_t})$. Note that $\pi_t\colon X_t\rightarrow Y_t$ is again of degree $4$. The case $\dim X_t=1$ is impossible by Riemann--Roch. The remaining case $\dim X_t=2$ is impossible by \cite[Theorem 1.6]{J16} or \cite[Proposition 3.3]{BarPS19}. \end{proof} \begin{cor}\label{cor: mAd} Let $X$ be any smooth projective threefold of general type with maximal Albanese dimension. Then $|\Aut_\mathbb{Q}(X)|\leq 4$, and if the equality holds then $ \Aut_\mathbb{Q}(X)\cong (\mathbb{Z}/2\mathbb{Z})^2$ and $q(X)=3$. \end{cor} \begin{proof} By Lemmas~\ref{lem: Hodge} and \ref{prop: fix A}, we know that $\Aut_\mathbb{Q}(X)$ is contained in the group $\Aut_{\mathcal{O}}(X)\cap \Aut_A(X)$ of Theorem~\ref{thm: mAd}. \end{proof} Note that the case $\mathrm{Aut}_\mathbb{Q}(X)\cong (\mathbb{Z}/2\mathbb{Z})^2$ is realized by an unbounded series of threefolds by \cite[Example 6.1]{Z21}. \subsection{The case $\dim a_X(X)<3$} In this subsection we deal with irregular threefolds of general type which are not of maximal Albanese dimension. We will denote by $G:=\Aut_\mathcal{O}(X)$ the $\mathcal{O}$-cohomologically trivial automorphism subgroup, and $\pi\colon X\rightarrow Y:=X/G$ the quotient morphism. \begin{lem}\label{lem: Ad1} There is a positive constant $M_1$ such that the following holds. Let $f\colon X\rightarrow B$ be a fibration from a smooth projective threefold of general type onto a smooth projective curve $B$ with $g(B)\geq 2$. Then $|\Aut_{\mathcal{O}}(X)|\leq M_1$. \end{lem} \begin{proof} Since $f^*\colon H^1(B, \mathcal{O}_B)\rightarrow H^1(X, \mathcal{O}_X)$ is injective and $G:=\Aut_\mathcal{O}(X)$ acts trivially on $H^1(X, \mathcal{O}_X)$, $G$ induces a trivial action on $H^1(B, \mathcal{O}_B)$. Since $g(B)\geq 2$, $G$ acts trivially on $B$, that is, $G\subset \Aut_B(X)$, the group of automorphisms preserving each fiber of $f$. Let $F$ be a general fiber of $f$. Then $G$ acts on $F$ via the injective homomorphism $G\hookrightarrow \Aut(F)$, $\sigma\mapsto \sigma|_F$. Let $\pi\colon X\rightarrow Y:=X/G$ and $\pi_F: F\rightarrow F' := F/G$ be the quotient morphisms. Since $B$ is of general type, by Theorem \ref{thm: decomp} or \cite[Lemma 2.1]{JLT14}, both $a_{X*}\omega_X$ and $a_{Y*}\omega_Y$ are M-regular. Moreover, $p_g(X)=p_g(Y)$, thus $a_{Y*}\omega_Y=a_{X*}\omega_X$. Hence $p_g(F)=p_g(F')$. By \cite[Propositions 2.1 and 4.1]{Bea79}, if $\chi(F, \mathcal O_F)\geq 31$, then the canonical map $\varphi_F$ of $F$ is either of degree $\leq 9$ or is a fibration such that the genus $g$ of a general fiber is $\leq 5$. Thus in this case we obtain \[ |G|\leq \begin{cases} \deg\varphi_F \leq 9 & \text{if $\varphi_F$ is generically finite}\\ 84(g-1) \leq 336 &\text{if $\varphi_F$ is composed with a pencil} \end{cases} \] where the inequality in second case follows from the Hurwitz bound of the full automorphism group of a curve with genus $g\geq 2$. On the other hand, surfaces $F$ with $\chi(F, \mathcal O_F)<31$ form a birationally bounded family and thus the order of their automorphism groups are bounded by a constant. As a conclusion, there exists a constant $M_1$ such that $|G|\leq M_1$. \end{proof} \begin{cor}\label{cor: Ad1} The inequality $|\Aut_{\mathcal{O}}(X)|\leq M_1$ holds for any smooth projective threefold $X$ of general type with $q(X)\geq 2$ and $\dim a_X(X)=1$. \end{cor} \begin{proof} Since $q(X)\geq 2$ and $\dim a_X(X)=1$, we infer that the Albanese image of $X$ factors as $a_X\colon X\xrightarrow{f} C \hookrightarrow A_X$, where $g(C)=q(X)$ and $f$ is a fibration. Now apply Lemma~\ref{lem: Ad1}. \end{proof} \begin{rema}We can indeed work out an explicit bound for $M_1$. Note that in the proof of Lemma~\ref{lem: Ad1}, when $\chi(F, \mathcal O_F)<31$, we have $\mathrm{vol}(K_F)\leq 9\chi(F, \mathcal O_F)\leq 180$ by the Bogomolov--Miyaoka--Yau inequality. Thus $|G|\leq 42^2\mathrm{vol}(K_F)\leq 317520$ by \cite{X95}, and we may take $M_1=317520$. \end{rema} \begin{prop}\label{prop: Ad2} Let $X$ be a smooth threefold of general type with $q(X)\geq 3$ and $\dim a_X(X)=2$. Then $|\Aut_{\mathcal{O}}(X)|\leq M_1$. \end{prop} \begin{proof} Since $a_X$ is not surjective, the image $Z$ of the Albanese morphism (or rather its desingularization) has Kodaira dimension $\geq 1$. Let $H$ be the image of $\Aut_{\mathcal{O}}(X)$ in $\Aut(A_X)$; see \eqref{eq: induce}. By Lemma \ref{lem: chi 0}, $H$ acts on $A_X$ by translations. Thus the quotient morphism $A_X\rightarrow A_X/H$ is \'etale. Consider the commutative diagram \begin{eqnarray*} \xymatrix{ X\ar[r]^{\pi}\ar@/_2pc/[dd]_{a_X}\ar[d] & Y\ar[d]\ar@/^2pc/[dd]^{a_Y}\\ Z\ar[r]\ar@{^(->}[d]& Z/H\ar@{^(->}[d]\\ A_X \ar[r] & A_X/H} \end{eqnarray*} where $Y=X/G$ and $\pi\colon X\rightarrow Y$ is the quotient map. Since the morphism $Z\rightarrow Z/H$ is \'etale, the Kodaira dimension of the desingularization of $Z/H$ is the same as the Kodaira dimension of the desingularization of $Z$. If $Z$ is of general type, then so is $Z/H$. Hence $a_{Y*}\omega_Y$ and $a_{Y*}\pi_*\omega_X$ are M-regular sheaves supported on $Z/H$ by Theorem~\ref{thm: decomp}. By the trace map, we write $\pi_*\omega_X=\omega_Y\oplus \mathcal{M}$. Suppose that $G$ is non-trivial. Then, since the general fibers of $a_Y$ are curves, the rank of $a_{Y*}\pi_*\omega_X$ is strictly larger than that of $a_{Y*}\omega_Y$. Hence $a_{Y*}\mathcal{M}$ is non-zero and, being M-regular, has a non-zero global section. But then $p_g(X)=h^0(A_X/H, a_{Y*}\pi_*\omega_X)>h^0(A_X/H, a_{Y*}\omega_Y) = p_g(Y)$, which is a contradiction. If $Z$ has Kodaira dimension $1$, then it is an elliptic fiber bundle over a curve $C$ with genus $g(C)\geq 2$, by \cite[Theorem 10.9]{Ue75}. Therefore, the Stein factorization $X\to \tilde{C}$ of the natural map $X\to C$ is a fibration with $g(\tilde{C})\geq 2$. It follows that $|G|\leq M_1$, where $M_1$ is as in Lemma~\ref{lem: Ad1}. \end{proof} Using the same argument for Corollary~\ref{cor: mAd}, we obtain \begin{cor}\label{cor: Ad2} Let $X$ be a smooth projective threefold of general type such that $\dim a_X(X)=2$ and $q(X)\geq 3$. Then $|\Aut_\mathbb{Q}(X)|\leq M_1$, where $M_1$ is the constant appearing in Lemma~\ref{lem: Ad1}. \end{cor} The rest of this section is devoted to the proof of the following \begin{prop}\label{prop: Ad2 simple} There is a positive constant $M_2$ such that the following holds. Let $X$ be a smooth threefold of general type with $q(X)=\dim a_X(X)=2$ such that its Albanese variety $A_X$ is a simple abelian surface. Then $|\Aut_{\mathcal{O}}(X)|\leq M_2$. \end{prop} We need some preparations for the proof. Assume that $X$ is as in Proposition~\ref{prop: Ad2 simple}. Since $X$ is of general type, $V^0(a_{X*}\omega_X)$ generates $\Pic^0(A_X)$ by \cite{JS15}. By the simplicity of $\Pic^0(A_X)$, we conclude that \begin{equation}\label{eq: V0} V^0(a_{X*}\omega_X)=\Pic^0(A_X) \end{equation} In particular, $p_g(X)>0$. Let $f\colon X\rightarrow S$ be the Stein factorization of $a_X\colon X\rightarrow A_X$. Then $S$ is a normal projective surface which is finite over the simple abelian surface $A_X$. Consider $G:=\Aut_{\mathcal{O}}(X)$ and its images $\psi_S(G)\subset\Aut(S)$ and $\psi_A(G)\subset\Aut(A_X)$. Then we have the following commutative diagram \begin{equation}\label{eq: quotient} \begin{tikzcd} X \arrow[r, "f"] \arrow[d,"\pi"'] \arrow[rr, bend left =45, "a_X"]& S \arrow[d, "\pi_S"] \arrow[r, "a_S"] & A_X\arrow[d, "\pi_A"]\\ Y \arrow[r, "h"] \arrow[rr, bend right =45, "a_Y"']& T \arrow[r, "a_T"] & B \end{tikzcd} \end{equation} where $Y=X/G,\, T=S/\psi_S(G),\, B=A_X/\psi_A(G)$ are the quotient varieties, and $\pi,\,\pi_S,\, \pi_A$ are the quotient maps. One can check that the morphism $Y\rightarrow B$ is indeed the Albanese morphism of $Y$. \begin{lem} \label{lem: B=A} $\psi_A\colon G\rightarrow \Aut(A_X)$ is trivial, so $B=A_X$ and the quotient map $\pi_A$ is the identity. \end{lem} \begin{proof} Assume on the contrary that $\psi_A(G)$ is nontrivial. Note that $\psi_A(G)$ consists of translations of $A_X$, so $\pi\colon A_X\rightarrow B=A_X/\psi_A(G)$ is \'etale. Let $Y'\cong X/\ker(\psi_A)$. Then $Y=Y'/\bar G$, where $\bar G =G /\ker(\psi_A)$, and we have a commutative diagram: \begin{eqnarray*} \xymatrix{ X\ar[r]^{\pi'}\ \ar[d]_{a_X}& Y'\ar[r]^{\pi''}\ar[d]_{a_{Y'}}& Y \ar[d]^{a_Y}\\ A_X\ar@{=}[r] & A_X\ar[r]^{\pi_A} & B. } \end{eqnarray*} where $\pi'\colon X\rightarrow Y'$ and $\pi''\colon Y'\rightarrow Y$ are the quotient maps. By the universal property of fiber products, one sees easily that $Y'= Y\times_B A_X$, and $\pi'\colon Y'\rightarrow Y$ and $a_{Y'}\colon Y'\rightarrow A_X$ are the projections under this identification. Since $\displaystyle \pi_{A*}\mathcal{O}_A = \bigoplus_{P\in \ker \pi_A^*} P$, where $\pi_A^*\colon \Pic^0(B)\rightarrow \Pic^0(A_X)$ is the pull-back, we have \begin{equation}\label{eq: KY'} \pi''_*\omega_{Y'}=\bigoplus_{P\in \ker \pi_A^*} (\omega_Y\otimes P). \end{equation} Since $G$ acts trivially on $H^0(X, \omega_X)$, we have \[ H^0(X, \omega_X)\cong H^0(Y', \omega_{Y'})\cong H^0(Y, \omega_Y). \] Thus this implies that for $P$ non-trivial in \eqref{eq: KY'}, $H^0(Y, \omega_Y\otimes P)=0$. Thus $V^0(a_{Y*}\omega_Y)$ is a proper subset of $\Pic^0(B)$. Since $A_X$ and hence $B$ is simple, so are $\Pic^0(A_X)$ and $\Pic^0(B)$. Thus $V^0(a_{Y*}\omega_Y)$ consists of finitely many points. By Theorem \ref{thm: decomp}, \begin{equation}\label{eq: CJ Y} a_{Y*}\omega_Y = \bigoplus_i Q_i, \end{equation} where $Q_i\in \Pic^0(B)$ are torsion line bundles on $B$. On the other hand, as a consequence of \eqref{eq: V0}, we have $p_g(Y)=p_g(X)>0$. It follows that some $Q_i$ in the decomposition \eqref{eq: CJ Y} must be $\mathcal O_B$. By the Leray spectral sequence, $q(Y)-q(B)$ is the number of trivial line bundles in \eqref{eq: CJ Y}, and hence \[ q(Y) =q(B) + (q(Y) - q(B)) >2 \] which contradicts the assumption that $q(Y)=q(X)=2$. \end{proof} By Lemma~\ref{lem: B=A}, the commutative diagram \eqref{eq: quotient} simplifies to \begin{equation}\label{diag: ST} \begin{tikzcd} X \arrow[r, "f"] \arrow[d,"\pi"'] \arrow[drr, bend left =90, "a_X"]& S \arrow[d, "\pi_S"'] \arrow[dr, "a_S"] & \\ Y \arrow[r, "h"] \arrow[rr, bend right =45, "a_Y"']& T \arrow[r, "a_T"] & A_X \end{tikzcd} \end{equation} Note that every variety in \eqref{diag: ST} have $A_X$ as its Albanese variety. \begin{lem}\label{lem: M} Let $\pi_*\omega_X=\omega_Y\oplus \mathcal{M}$ be the splitting induced by the trace map. Then the following holds. \begin{enumerate} \item[(i)]$H^i(Y, \mathcal{M})=0$ and $H^i(A_X, R^ja_{Y*}\mathcal{M})=0$ for all $i,j \geq 0$. \item[(ii)] $R^j a_{Y*}\mathcal{M} =\bigoplus_k Q_{k}^j$, where $Q_{k}^j\in \Pic^0(A_X)$ are nontrivial torsion line bundles on $A_X$ for $j\geq 0$. \end{enumerate} \end{lem} \begin{proof} Since $G$ acts trivially on $H^i(X, \omega_X)$, we have $H^i(X, \omega_X)\cong H^i(Y, \omega_Y)$, hence $H^i(Y, \mathcal{M})=0$ for all $i\geq 0$. Pushing the decomposition $\pi_*\omega_X=\omega_Y\oplus \mathcal{M}$ forward to $A_X$ by $a_{Y*}$, we obtain \begin{equation}\label{eq: M} a_{X*}\omega_X=a_{Y*}\omega_Y\oplus a_{Y*}\mathcal{M}. \end{equation} Note that $H^0(A, a_{Y*}\mathcal{M})=H^0(Y, \mathcal{M})=0$. By Theorem \ref{thm: decomp} and Remark \ref{rmk:torsion}, taking the simplicity of $A_X$ into account, we infer that \[ a_{Y*}\mathcal{M} = \bigoplus_{k} Q_k \] where $Q_k\in \Pic^0(A)$ are nontrivial torsion line bundles on $A_X$. This implies that (\cite[Corollary~3.2]{Hac04}) \[ H^i(A_X, a_{Y*}\mathcal{M})= \bigoplus_{k} H^i(A_X, Q_k) = 0\, \text{ for all } i\geq 0. \] Now it follows from the Leray spectral sequences for $H^i(Y,\mathcal{M})$ that \[ H^i(A_X, R^1a_{Y*}\mathcal{M})=0 \] for all $i\geq 0$. Using the Chen--Jiang decomposition of $R^1a_{Y*}\mathcal{M}$ and the simplicity of $A_X$, we obtain \[ R^1a_{Y*}\mathcal{M} =\bigoplus_k Q_{k}^1 \] where the $Q_{k}^1$ are all nontrivial torsion line bundles on $A_X$. Finally, we remark that $R^ja_{Y*}\mathcal{M}\subset R^ja_{Y*}\omega_Y=0$ for $j\geq 2$ by \cite[Theorem~2.1]{Ko86a}. \end{proof} \begin{lem}\label{lem: ST} The homomorphism $\psi_S\colon G\rightarrow \Aut(S)$ is trivial, or equivalently, the quotient morphism $\pi_S\colon S\rightarrow T=S/\psi_S(G)$ in \eqref{diag: ST} is an isomorphism. \end{lem} \begin{proof} If $\kappa(S)=0$, then $S$ is an abelian surface and $S\rightarrow A_X$ is an isomorphism by the universal properties of the Stein factorization and the Albanese morphism. As a consequence, $S=T$. If $\kappa(S)=1$ then there is a pencil of (possibly singular) elliptic curves on $S$, whose image in $A_X$ is necessarily again a pencil of elliptic curves, contradicting the simplicity of $A_X$. Suppose now $\kappa(S)=2.$ Since $\pi_S$ is finite, in order to show that $\pi_S$ is an isomorphism, it suffices to show that $\pi_S$ is birational. For this purpose, we may pass to smooth higher birational models $X', Y', S', T'$ of $X, Y, S$ and $T$ respectively, and by abuse of notation, assume that $S$ and $T$ are themselves smooth. We will show that $\chi(S, \omega_{S}) =\chi(T, \omega_{T})$. Grant this for the moment. Then, since the eventual paracanonical map of $S$ factors through $S\rightarrow T$ by \cite[Proposition~1.5]{J16}, we can apply \cite[Theorem~1.6]{J16} to conclude that $\pi_S\colon S\rightarrow T$ is birational. It remains to show that $\chi(S, \omega_{S}) = \chi(T, \omega_{T})$. By \cite[Proposition~7.6]{Ko86a}, we have $R^1f_*\omega_X=\omega_{S}$ and $R^1h_*\omega_Y=\omega_{T}$. Therefore, \begin{equation}\label{eq: XSYT} \chi(X, \omega_X)=\chi(S, f_*\omega_X)-\chi(S, \omega_{S}) \text{ and } \chi(Y, \omega_Y)=\chi(T, h_*\omega_Y)-\chi(T, \omega_{T}). \end{equation} As in Lemma~\ref{lem: M}, we have a splitting $\pi_*\omega_X=\omega_Y\oplus\mathcal{M}$ such that \begin{equation}\label{eq: vanish M} H^i(A_X, a_{Y*}\mathcal{M}) =0 \text{ for any } i \geq 0 \end{equation} Since $a_{S*}f_*\omega_X = a_{X_*}\omega_X=a_{Y*}\omega_Y\oplus a_{Y*}\mathcal{M}=a_{T*}h_*\omega_Y\oplus a_{Y*}\mathcal{M}$, we obtain \begin{multline}\label{eq: ST} \chi(S, f_*\omega_X)=\chi(A_X, a_{S*}f_*\omega_X)=\chi(A_X, a_{T*}h_*\omega_Y) + \chi(A_X, a_{Y*}\mathcal{M}) \\ =\chi(A_X, a_{T*}h_*\omega_Y) = \chi(T, h_*\omega_Y) \end{multline} where the first and the last equalities are due to the vanishing of $R^1a_{S*}(f_*\omega_X)$ and $R^1a_{T*}(h_*\omega_Y)$ by \cite[Theorem~3.4 (iii)]{Ko86b} and the third equality is by \eqref{eq: vanish M}. Moreover, since $h^i(X, \omega_X)=h^i(Y, \omega_Y)$ for each $i\geq 0$, we have $\chi(X, \omega_X)=\chi(Y, \omega_Y)$. Combining this with \eqref{eq: XSYT} and \eqref{eq: ST}, we obtain $\chi(T, \omega_{T}) = \chi(S, \omega_{S})$. \end{proof} By Lemma~\ref{lem: ST}, the commutative diagram~\eqref{diag: ST} further simplifies to \begin{equation}\label{diag: S} \begin{tikzcd} X \arrow[dr, "f"] \arrow[d,"\pi"'] \arrow[drr, bend left =45, "a_X"]& & \\ Y \arrow[r, "h"] \arrow[rr, bend right =45, "a_Y"']& S \arrow[r, "a_S"] & A_X \end{tikzcd} \end{equation} \begin{proof}[Proof of Proposition~\ref{prop: Ad2 simple}] In the diagram~\eqref{diag: S}, the general fiber $C$ of $f$ is preserved by the action of $G$. Let $D=\pi(C)$ be the fiber of $h$ over the point $f(C)\in S$. Then $D\cong C/G$ and $\pi|_C \colon C \rightarrow D$ is the quotient map under the action of $G$. By the Riemann--Hurwitz formula, we have \begin{equation}\label{eq: RH} 2g(C)-2 = |G|(2g(D)-2)+\delta \end{equation} where $\delta$ is the degree of the ramification divisor of $\pi|_C \colon C \rightarrow D$. Also, we have \[ \mathrm{rk}(a_{Y*}\mathcal{M}) = \mathrm{rk}(a_{S*}h_*\mathcal{M}) = (\deg a_S)\cdot \mathrm{rk}(h_*\mathcal{M}) = (\deg a_S)(g(C)-g(D)), \] where $\mathrm{rk}(\cdot)$ denotes the rank of a sheaf. One has $p_g(Y)=p_g(X)>0$ by \eqref{eq: V0} and hence $g(D)\geq 1$. By Lemma~\ref{lem: M}, there is an abelian \'etale cover $\mu: {\widetilde A}_X\rightarrow A_X$ such that $\mu^*(R^1a_{Y*}\mathcal{M})$ is a direct sum of trivial line bundles. Consider the base change of $X\rightarrow Y\rightarrow S\rightarrow A_X$ by $\mu\colon\tilde A_X\rightarrow A_X$, \[ \begin{tikzcd} \tilde X\arrow[r, "\tilde \pi"] \arrow[d, "\mu_X"] \arrow[rr, bend left = 45, "\tilde f"]& \tilde Y\arrow[r, "\tilde h"]\arrow[d, "\mu_Y"] &\tilde S \arrow[r, "\tilde a_{S}"] \arrow[d, "\mu_S"]& \tilde A_X\arrow[d, "\mu"]\\ X\arrow[r, "\pi"] \arrow[rr, bend right = 45, "f"]& Y\arrow[r, "h"]&S \arrow[r, "a_S"] & A_X \end{tikzcd} \] where $\tilde X=X\times_{A_X} \tilde A_X,\, \tilde Y\times_{A_X} \tilde A_X$ and $\tilde S=S\times_{A_X}\tilde A_X$, and the squares are those of fiber products. By \cite[Corollary 3.2]{Ko86b}, we have \begin{eqnarray*} H^2({\widetilde X}, \omega_{{\widetilde X}})&\cong & H^1({\tilde S}, R^1{\tilde f_*}\omega_{{\widetilde X}} )\oplus H^2({\tilde S}, {\tilde f_*}\omega_{{\widetilde X}})\\ &\cong& H^1({\tilde S}, \omega_{{\widetilde S}})\oplus H^2({\widetilde A}_X, \mu^*(a_{X*}\omega_X)), \end{eqnarray*} so $q_{\tilde f} := q(\tilde X) - q({\widetilde S}) = h^2({\widetilde A}_X, \mu^*(a_{X*}\omega_X))$. Since $a_{Y*}\mathcal{M}$ is a direct summand of $a_{X*}\omega_X$, $\mu^*(a_{Y*}\mathcal{M})$ is a direct sum of $\mu^*(a_{X*}\omega_X)$ and we conclude that \[ h^2({\widetilde A}_X, \mu^*(a_{X*}\omega_X))\geq h^2({\widetilde A}_X, \mu^*(a_{Y*}\mathcal{M}))=\mathrm{rk}( a_{Y*}\mathcal{M})=(\deg a_{S})(g(C)-g(D)), \] where the second equality is because $\mu^*(a_{Y*}\mathcal{M})$ is a direct sum of copies of $\mathcal{O}_{\tilde A_X}$ by construction. Let $B$ be a general hyperplane section of ${\widetilde S}$ and $\tilde X_B=\tilde f^{-1}(B)$. Let $\tilde f_B\colon \tilde X_B \rightarrow B$ be the restriction of $\tilde f$ over $B$. \begin{claim}\label{clm: equal H1} $h^0(B, R^1\tilde f_{B*}\mathcal{O}_{\tilde X_B}) = h^0({\widetilde S}, R^1{\tilde f_*} \mathcal{O}_{{\widetilde X}}) $ \end{claim} \begin{proof}[Proof of the claim.] Applying ${\tilde f_*}$ to the short exact sequence of sheaves on $\tilde X$: \[ 0\rightarrow \mathcal{O}_{\tilde X}(-\tilde f^*B) \rightarrow \mathcal{O}_{\tilde X} \rightarrow \mathcal{O}_{\tilde X_B} \rightarrow 0 \] we obtain an exact sequence of sheaves on $\tilde S$: \[ f_* \mathcal{O}_{\tilde X_B} \rightarrow (R^1 {\tilde f_*} \mathcal{O}_{\tilde X})(-B) \rightarrow R^1 {\tilde f_*} \mathcal{O}_{\tilde X} \rightarrow R^1 {\tilde f}_{B*}\mathcal{O}_{\tilde X_B} \rightarrow (R^2 {\tilde f_*} \mathcal{O}_{\tilde X})(-B) \] For a general hyperplane $B\subset {\widetilde S}$, one deduces \[ 0\rightarrow (R^1 {\tilde f_*} \mathcal{O}_{\tilde X})(-B) \rightarrow R^1 {\tilde f_*} \mathcal{O}_{\tilde X} \rightarrow R^1 {\tilde f}_{B*}\mathcal{O}_{\tilde X_B} \rightarrow 0 \] Since we have $H^0({\widetilde S}, (R^1 {\tilde f_*} \mathcal{O}_{\tilde X})(-B)) =0$ and $H^1( {\widetilde S}, (R^1 {\tilde f_*} \mathcal{O}_{\tilde X})(-B)) = 0$ for a sufficiently ample hypersurface $B$ on $\tilde S$, the induced exact sequence of cohomology groups gives the desired isomorphism: \[ H^0({\widetilde S},R^1 {\tilde f_*} \mathcal{O}_{\tilde X}) \cong H^0(B, R^1 \tilde f_{B*}\mathcal{O}_{\tilde X_B}). \] \end{proof} By Claim~\ref{clm: equal H1}, we obtain \begin{equation}\label{eq: q_f} q_{\tilde f_B} = h^0(B, R^1\tilde f_{B*}\mathcal{O}_{\tilde X_B}) = h^0({\widetilde S}, R^1{\tilde f_*} \mathcal{O}_{{\widetilde X}}) = q_{\tilde f}\geq (\deg a_S)(g(C)-g(D)). \end{equation} Suppose that $g(D)=1$. If $g(C)\geq 8$ then $q_{\tilde f_B}\geq g(C)-1\geq \frac{5g(C)+1}{6}$, and hence $\tilde f_B$ is birationally trivial by Xiao's result \cite{X87}. Since $B\subset \tilde S$ is a general hypersurface, $\pi_1(B)\rightarrow \pi_1(\tilde S)$ is surjective and the birational triviality of $\tilde f_B\colon \tilde X_B\rightarrow B$ implies that of $\tilde f\colon \tilde X\rightarrow \tilde S$. Therefore, $\tilde{X}$ is birational to ${\tilde S}\times C$ and $\tilde{Y}$ is birational to $\tilde S\times D$. By the fact that $$\chi({\widetilde X}, \omega_{{\widetilde X}})=(\deg \mu) \chi(X, \omega_X)=(\deg\mu )\chi(Y, \omega_Y)=\chi({\widetilde Y}, \omega_{{\widetilde Y}}),$$ we infer that $C=D$, which is absurd. Thus in this case $g(C)\leq 7$ and hence $|G|\leq |\mathrm{Aut}(C)|\leq 84\times (7-1)=504$, where the second inequality is Hurwitz's bound of the full automorphism group of a curve. If $g(D)\geq 2$, then by \eqref{eq: RH} and \eqref{eq: q_f} \[ q_{\tilde f_B} \geq (\deg a_S)(g(C)-g(D)) = \left(\deg a_S\right)\left(\frac{\delta}{2}+(|G|-1)(g(D)-1)\right). \] where $\delta$ is as in \eqref{eq: RH}. By a simple calculation, if $g(C)\geq 8$ and $|G|\geq 13$, then $q_{\tilde f_B}>\frac{5g(C)+1}{6}$ and by Xiao's result \cite{X87}, $\tilde f_B$ and hence $\tilde f$ is birationally trivial, and we draw a contradiction by the same argument as in the last paragraph. Thus either $|G|\leq 12$ or $g(C)\leq 7$, in which case $|G|\leq \frac{g(C)-1}{g(D)-1} \leq 6$. \end{proof} \section{Threefolds of general type with Gorenstein minimal models} \begin{thm}\label{thm: pg} There is a constant $M$ such that the following holds. Let $X$ be a projective threefold of general type with canonical singularities such that its minimal models are Gorenstein. Then $|\Aut_\mathcal{O}(X)|<M$. \end{thm} \begin{proof} Since $X$ has a Gorenstein minimal model, the Miyaoka--Yau inequality gives \begin{multline}\label{eq: MY} \vol(K_X)\leq 72\chi(X, \omega_X) = 72(p_g(X) - h^1(X,\omega_X) + q(X) -1) \\ \leq 72(p_g(X) +q(X) -1 ) \end{multline} In particular, $\chi(X, \omega_X)>0$. By Lemma~\ref{lem: chi 0}, $\Aut_\mathcal{O}(X) = \Aut_\mathcal{O}(X)\cap \Aut_A(X)$. If $q(X)\geq 3$ then $|\Aut_\mathcal{O}(X)|$ is uniformly bounded by Theorem~\ref{thm: mAd}. In the following we can assume that $q(X)\leq 2$. Let $Y=X/\Aut_\mathcal{O}(X)$ be the quotient variety and $\pi\colon X\rightarrow Y$ the quotient morphism. Then there is an effective divisor $B$, which is supported on the branched divisor of $\pi$ and with coefficients from the set $\mathcal{C}_2:=\{1-\frac{1}{n}\mid n\in \mathbb{Z}_{>0}\}$, such that $K_X= \pi^*(K_Y+\Delta)$. Obviously, $K_Y+\Delta$ is big and, by \cite[Proposition~5.20]{KM98}, the pair $(Y, \Delta)$ is klt. Since $\Aut_\mathcal{O}(X)$ acts trivially on $H^0(X, K_X)$, one has $p_g(X) = p_g(Y, \Delta)$. By Theorem~\ref{thm: Noether}, there are some positive constants $a$ and $b$ such that \begin{equation}\label{eq: Noether} \vol(K_X)=|\Aut_\mathcal{O}(X)|\vol(K_Y+\Delta) \geq |\Aut_\mathcal{O}(X)|(ap_g(X) -b). \end{equation} Combining the inequalities \eqref{eq: MY} and \eqref{eq: Noether}, we obtain \[ |\Aut_\mathcal{O}(X)|(ap_g(X) -b) \leq 72(p_g(X) +1 ). \] Now one sees easily that, there is a sufficiently large integer $N$ such that $|\Aut_\mathcal{O}(X)|\leq \lceil \frac{72}{a}+1\rceil$ holds if $p_g(X)>N$. On the other hand, if $p_g(X)\leq N$ then, by \eqref{eq: MY}, we have $\vol(K_X)\leq 72(N+1)$, which implies that this class of threefolds of general type are bounded. It follows that there is a constant $M'>0$ such that $|\Aut(X)|\leq M'$, provided $p_g(X)\leq N$. Then $M=\max\{\lceil\frac{72}{a}+1\rceil, M'\}$ is the bound we wanted. \end{proof} \begin{cor}\label{cor: Aut Q} Let $X$ be a projective threefold of general type with canonical singularities such that its minimal models are Gorenstein. Then $|\Aut_\mathbb{Q}(X)|\leq M$, where $M$ is as in Theorem~\ref{thm: pg}. \end{cor} \begin{proof} By Lemma~\ref{lem: Hodge}, $\Aut_\mathbb{Q}(X)$ is contained in the group $\Aut_\mathcal{O}(X)$. \end{proof} Recall that a smooth projective variety is isogenous to a product of curves if it admits the product of smooth projective curves as an \'etale cover. \begin{cor}\label{cor: isog} Let $X$ be a projective threefold of general type isogenous to a product of curves. Then $|\Aut_\mathbb{Q}(X)|\leq M$, where $M$ is as in Theorem~\ref{thm: pg}. \end{cor} \begin{proof} Since $X$ is isogenous to a product of curves, it is smooth with ample $K_X$. Now apply Corollary~\ref{cor: Aut Q}. \end{proof}
\section{Introduction} \hspace{\parindent} In the past several decades, the dynamical systems approach to Lagrangian transport has been applied to a variety of problems in computational fluid dynamics (CFD), such as transport and mixing in oceanic flows \cite{coulliette2001} \cite{mancho2006} \cite{mendoza2014} \cite{rypina2009}, and microfluidic mixers \cite{mcilhany2011} \cite{ottino2004}. More recently, techniques from the field have also been applied to chemical reaction dynamics \cite{katsanikas2020} \cite{naik2019}. In this paper, we motivate the dynamical systems approach to Lagrangian transport by comparing two numerical diagnostics which reveal phase space structures in two-dimensional, time-periodic incompressible flows. These geometric structures will be shown to constrain or facilitate transport in flow fields. Specifically, we seek to identify stable and unstable manifolds of stagnation points with hyperbolic stability, and the Kolmogorov-Arnold-Moser (KAM) tori of stagnation points with elliptic stability. \\ In literature, the term ``Lagrangian Coherent Structure'' (LCS) often has different meanings depending on the author or paper. It is most often referred to broadly and qualitatively, as a structure which organizes the rest of the flow into ordered patterns \cite{haller2015} \cite{haller2000} . Haller and Yuan define LCS in \cite{haller2000} as material lines for which \textit{hyperbolicity times} (which they have defined) attain local extrema. Haller also provides an alternate definition in \cite{haller2001}, where LCS are defined as the local maxima of the Finite-Time Lyapunov Exponent (FTLE) field. A similar definition of LCS was given in \cite{shadden2005}, which defines Lagrangian Coherent Structures as the ridges of FTLE fields. In this paper, we use the term broadly, perhaps synonymous with ``phase space structure,'' as a way to categorize flow fields into regions of distinct behavior. More often, however, we will simply refer to particular structures, such as stable and unstable manifolds or KAM invariant tori. \\ There are many numerical diagnostics that have been used to qualitatively explore transport and mixing in flow fields, such as FTLEs \cite{shadden2005}, Lagrangian Descriptors (LDs) \cite{mancho2013b} \cite{mendoza2010b}, Poincare maps \cite{dumas2014}, and Encounter Volume \cite{rypina2017}, to name a few. This paper will specifically compare FTLEs and LDs. These two methods reveal similar patterns in flow fields, and they are both used to identify phase space structures such as stable and unstable manifolds or KAM tori. Despite the similarity of the two diagnostics, a comparison of the methods is useful since they have different limitations, advantages, and computational considerations. \\ In Section \ref{sec:Gyre}, a simple model of a two-dimensional time-dependent double-gyre will be described, which will be used as our example to compute FTLE and LD fields. A double-gyre is a large-scale feature of ocean circulation, typically occurring in the mid-latitudes. Specifically, the term double-gyre refers to two ``gyres,'' or circulations, which occur adjacent to each other and flow in opposite directions, such as a system containing both a subpolar and subtropical gyre, for example. Inter-gyre transport remains an active and important area of research within the study of general ocean circulation \cite{burkholder2011} \cite{coulliette2001} \cite{foukal2016} \cite{levang2020} \cite{liu1994}. In this paper, we use a simple two-dimensional toy representation of this phenomenon to illustrate concepts. \\ In Section \ref{sec:FTLE}, the definition and computation of FTLEs will be described, and their relationship to the stable and unstable manifolds of stagnation points with hyperbolic stability will be discussed. Similarly, in Section \ref{sec:LD}, the definition and computation of LDs and their relationship to stable and unstable manifolds will be shown, along with a discussion of their relationship to KAM tori. Lastly, in Section \ref{sec:results}, a number of examples of LDs, FTLEs, and Poincare Maps will be shown using the time-dependent double-gyre subject to varying parameters. \section{The Double-Gyre} \label{sec:Gyre} \hspace{\parindent} We will now introduce a simple example of double-gyre flow, which will be used to compute the numerical diagnostics that will be shown in Sections \ref{sec:FTLE} - \ref{sec:results}. The system we describe is prevalent in literature and is commonly used for various topics in fluid dynamics \cite{shadden2005}. Suppose that a fluid is two-dimensional, incompressible, and inviscid. Then the velocity field can be obtained from the derivatives of a scalar function, $\psi$, called the streamfunction: \begin{align} u &= -\frac{\partial \psi}{\partial x} \label{eqn:psi}\text{,} \\ v &= \frac{\partial \psi}{\partial y} \text{.} \nonumber \end{align} In the context of dynamical systems, Equation \eqref{eqn:psi} describes a time-dependent Hamiltonian vector field, for which $\psi$ represents the Hamiltonian function. In this paper we will sometimes use the vector $\vec{u} = (u,v)$ to denote velocity and $\vec{x} = (x,y)$ to denote spatial coordinates. \\ Consider the following ``general'' equation for a time-dependent double-gyre system: \begin{eqnarray} \label{eqn:UPsi} \psi &=& A \sin(\pi f(x,t,\epsilon,\omega))\sin(\pi y) \text{,} \end{eqnarray} \noindent which we will define on the domain $(x,y) \in [0~ 2] \times [0~ 1]$. In this system $f$ should be chosen such that $f(x = 0,t,\epsilon,\omega) = 0$ and $f(x = 2,t,\epsilon,\omega) = 2$. This function $f$ determines the time-dependent behavior of the system, where $\epsilon$ and $\omega$ will be used to represent the ``amplitude'' and ``frequency'' of a periodic perturbation, respectively. The parameter $A$ is a constant which scales the Hamiltonian (and therefore the magnitude of the velocity field). The first thing we will note is that when $f(x,t,\epsilon,\omega) = x$, the streamfunction describes a system which is identical for all time, and so it is called ``steady'' (i.e. time-\textit{independent}). In this case, the streamfunction and its corresponding velocity field reduce to: \begin{align} \psi &= A\sin(\pi x) \sin(\pi y) \label{eq:psisteady}\text{,} \\ u &= -\frac{\partial \psi}{\partial x} = -A\pi\sin(\pi x)\cos(\pi y) \text{,} \nonumber \\ v &= \frac{\partial \psi}{\partial y} = A\pi\cos(\pi x)\sin(\pi y) \text{.} \nonumber \end{align} \\ The streamfunction and corresponding velocity field for this system have been shown in Figure \ref{fig:vel_field}. This system has several notable features. First, there is no flux through the boundaries or between gyres, which is to say that $u = 0$ along the lines $x = 0$, $x = 1$, and $x = 2$, and that $v = 0$ along the lines $y = 0$ and $y = 1$. The line $x = 1$ is often called a ``separatrix'' since it has the effect of separating the two gyres. There are also several stagnation points in the flow field. \textit{Stagnation points} are any point $(x,y)$ for which $\vec{u}(x,y) = 0$. For this flow system, stagnation points exist at all corners, between the two gyres along the vertical boundaries (i.e. $(x,y) = (1,0), (1,1)$), and at the center of either gyre (i.e. $(x,y) = (0.5, 0.5), (1.5,0.5)$ ). \\ Stagnation points in Hamiltonian systems are characterized by linearized stability, the nature of which is determined by finding the eigenvalues of the Jacobian of the linearized velocity field when evaluated at the stagnation point. The linearized behavior of these stagnation points can have either Hyperbolic or Elliptic stability (note that this reduction only applies to Hamiltonian systems, such as the one we use). \textit{Hyperbolic} stability occurs when the eigenvalues of the Jacobian evaluated at a stagnation point are both pure real and have opposite signs. \textit{Elliptic} stability occurs when these eigenvalues are pure imaginary. The behavior of hyperbolic and elliptic trajectories near these stagnation points will be discussed more in Sections \ref{sec:FTLE} and \ref{sec:LD}. \begin{figure}[H] \centering \includegraphics[width=.6\textwidth]{VelField_Steady.jpg} \caption{Velocity field $\vec{u}(x,y)$ overlaid on top of the contour plot of $\psi$ for the steady-state double-gyre system described by Equation \eqref{eq:psisteady}}. \label{fig:vel_field} \end{figure} Next, we will consider a case where the double-gyre is unsteady (i.e. time-\textit{dependent}). A sinusoidal time-dependence is often used, described by: \begin{eqnarray} f(x,t,\epsilon,\omega) &=& a(t)x^2+b(t)x\text{,} \label{eqn:timedep} \\ a(t,\epsilon,\omega) &=& \epsilon \sin(\omega t)\text{,} \nonumber \\ b(t,\epsilon,\omega) &=& 1 - 2 \epsilon \sin(\omega t)\text{.} \nonumber \end{eqnarray} Note that $f(x,t,\epsilon,\omega)$ could be replaced with some other function, but the sinusoidal time-dependence is useful since it is both simple and periodic (with period $T = 2\pi/\omega$). \\ With this unsteady version of the double-gyre, one can verify that, much like the steady double-gyre, there is no flux through the boundaries (i.e., $u = 0$ along the lines $x = 0$ and $x = 2$, and $v = 0$ for $y = 0$ and $y = 1$). However, what we have previously called the separatrix appears to oscillate left and right, to a minimum $x = 1-\epsilon$ and a maximum of $x = 1+\epsilon$. At this point, this line is no longer a separatrix, since it is no longer a barrier to transport (a \textit{separatrix} is most often defined as a Lagrangian feature which acts as a barrier to transport between two flow regimes). In Figure \ref{fig:twotrajs}, two trajectories initialized at $t = 0$ in the double-gyre with parameters $A = .1$, $\epsilon = 0.25$ and $\omega = 2$ are shown, up to time $t = 1500$. Note that one trajectory has stayed ``inside'' of its gyre, and the other has moved between the left and right-hand sides of the domain several times. By ``moving between gyres'' we mean that the parcel crosses the center line for which $u = 0$ (which was previously at $x = 1$ but is now oscillating). The mechanisms which act as barriers to transport for such fluid parcels (and similarly, those which facilitate transport) will be discussed further in Sections \ref{sec:FTLE} and \ref{sec:LD}. \begin{figure}[H] \centering \includegraphics[width=0.5\linewidth]{Trajectories_epsilon25_omega20_tau1500.jpg} \caption{Two trajectories in the time-dependent double-gyre such as in Equations \eqref{eqn:UPsi} and \eqref{eqn:timedep} initialized at $t_0 = 0$ with parameters $A = .1$, $\epsilon = .25$ and $\omega = 2$. The trajectories are calculated until $t = 1500$. The red trajectory remains inside of left gyre for all time, while the green trajectory moves between the two gyres several times. The dots at $(x,y) = (.6,~.5)$ (trajectory shown in red) and $(x,y) = (.7,~.5)$ (trajectory shown in green) represent the initial conditions. } \label{fig:twotrajs} \end{figure} As the line for which $u = 0$ moves, so do the stagnation points on its upper and lower boundaries. Similarly, the stagnation points which begin at the center of both gyres begin oscillating back and forth. These stagnation points can now be called ``instantaneous stagnation points'' (ISPs). An \textit{instantaneous stagnation point} is a point in space occurring at any instant in time for which $\vec{u}(x,y,t) = 0$. Now that the basic behavior and features of the time-dependent double-gyre have been described, we will use it to perform the numerical diagnostics that are the focus of this paper. \section{Finite-Time Lyapunov Exponents} \label{sec:4} \label{sec:FTLE} \hspace{\parindent} The first diagnostic that we will consider is the Finite-Time Lyapunov Exponent (FTLE). We have mentioned that we will be using diagnostics to look for ``phase space structures.'' The term \textit{phase space} may have slightly different meanings depending on context. In ordinary differential equations, and in our case, we use phase space to refer to the space of dependent variables. For the two-dimensional flow that we consider, phase space is synonymous with the physical space in which the fluid flows, i.e. the space with coordinates $(x,y)$. \\ \subsection{Definition and Computation} \hspace{\parindent} The concept of \textit{Lyapunov Exponents} began in the late 1800s, when Aleksandr Lyapunov addressed the problem of stability in dynamical systems. Lyapunov Exponents are the exponential separation rate of infinitesimally close trajectories \cite{katok1995}. Since Lyapunov Exponents are defined only in infinite time, the Finite-Time Lyapunov Exponent (FTLE) is often used in computation. Conceptually, the FTLE is a time average of the maximum separation rate for a pair of particles advected in a flow, after some time interval. To constructs FTLEs, the right Cauchy-Green deformation tensor is computed for an initial condition and a grid of its neighboring points. The Cauchy-Green deformation tensor, in this case, is a $2x2$ matrix which measures local stretching between points, and is constructed as in Equation \eqref{eqn:CG}: \begin{equation} \Delta = \frac{\text{d} \phi_t^{t+\tau}(\vec{x})}{\text{d} \vec{x}}^* \frac{\text{d} \phi_t^{t+\tau}(\vec{x})}{\text{d} \vec{x}}\text{,} \label{eqn:CG} \end{equation} \noindent where $\phi_t^{t+\tau}$ is the flow map of the dynamical system, meaning that it indicates the final location of a trajectory beginning at $\vec{x} = (x,y)$ and time $t$ after it is integrated to $t+\tau$. Numerically, we compute $\frac{\text{d} \phi_t^{t+T}(\vec{x})}{\text{d} \vec{x}}$ in finite-difference form such as in Equation \eqref{eqn:differencing}: \begin{equation} \label{eqn:differencing} \left.\frac{\text{d} \phi_t^{t+\tau}(\vec{x})}{\text{d} \vec{x}}\right\vert_{x_{i,j}} = \begin{pmatrix} \frac{x_{i+1,j}(t+\tau) - x_{i-1,j}(t+\tau)}{x_{i+1,j}(t) - x_{i-1,j}(t)} & \frac{x_{i,j+1}(t+\tau) - x_{i,j-1}(t+\tau)}{y_{i,j+1}(t) - y_{i,j-1}(t)} \\ \\ \frac{y_{i+1,j}(t+\tau) - y_{i-1,j}(t+\tau)}{x_{i+1,j}(t) - x_{i-1,j}(t)} & \frac{y_{i,j+1}(t+\tau) - y_{i,j-1}(t+\tau)}{y_{i,j+1}(t) - y_{i,j-1}(t)} \end{pmatrix}\text{,} \end{equation} \noindent where $x_{i,j}(t)$ indicates the x-location of the particle in grid position $i,j$ at time $t$, etc. The FTLE is considered a ``forward'' FTLE when $\tau$ is positive and a ``backward'' FTLE when $\tau$ is negative.\\ We can then compute the FTLE of a trajectory using: \begin{equation} \sigma_{t}^\tau(\vec{x}) = \frac{1}{|\tau|}\ln{\sqrt{\lambda_\text{max}(\Delta)}}\text{,} \end{equation} \noindent where $\lambda_\text{max}(\Delta)$ is the maximum eigenvalue of the deformation tensor, $\Delta$. This process is repeated for each point on a grid of initial conditions to construct an ``FTLE field,'' i.e. a scalar field in $\mathbb{R}^2$ for which the value of the field at $(x,y)$ refers to the FTLE value of a trajectory beginning at $(x,y)$ after some finite integration time, $\tau$.\\ We note that FTLEs are, by definition, a differentiated quantity. Any student who has been asked to compute the derivative of a signal has likely found that differentiation has the tendency to add noise to computations. For FTLEs, one consequence of this is that computed FTLE values are highly sensitive to the grid spacing of available initial conditions. A simple experiment can illustrate this dilemma. Consider the coarse grid of initial conditions (and their corresponding FTLE field) shown in Figure \ref{fig:FTLEcoarse}, for which trajectories are known on the interval $[t_0 ~t_f] = [0 ~12]$. For this grid, FTLE values can be computed for all interior grid points. In Figure \ref{fig:FTLEfine}, a slightly denser grid is shown. As expected, FTLE values from the original grid have changed, since trajectories of new ``closer'' initial conditions were used to compute FTLE values. As the grid spacing continues to decrease, the FTLE value will continue to change (and should converge to the analytic FTLE value for the initial condition and specified integration time). Also note that even if trajectories of grid points along the boundaries are known, FTLE values cannot be computed on the edges of the domain, since to do so would require trajectories which lie outside of the domain. \begin{figure}[H] \begin{subfigure}[t]{0.5\textwidth} \includegraphics[width=\textwidth]{FTLE_COARSE_epsilon10_omega20_tau12.jpg} \caption{} \sublabel{fig:FTLEcoarse} \end{subfigure} \begin{subfigure}[t]{0.5\textwidth} \includegraphics[width=\textwidth]{FTLE_FINE_epsilon10_omega20_tau12.jpg}\caption{} \sublabel{fig:FTLEfine} \end{subfigure} \caption{Two FTLE Fields for the double-gyre such as in Equations \eqref{eqn:UPsi} and \eqref{eqn:timedep} with parameters $A = .1$, $\epsilon = .1$, $\omega = 2$ and $\tau = 12$. Panel (a) uses a coarse grid of initial conditions that begins as 11x6 (note that FTLE values can only be computed for the interior 9x4 grid, since FTLEs cannot be computed along the boundaries). Panel (b) uses a slightly finer 21x11 grid of initial conditions. The grid points which remain the same between the two cases have been outlined by a black edge in panel (b). Note that since the ``neighboring'' initial conditions and their corresponding trajectories have changed in panel (b), that the FTLE values at the ``old'' locations have changed in response. } \end{figure} After reading the previous discussion, a student who is new to computing FTLEs might do the following: after creating the grid for which one wants to compute FTLEs, compute four new trajectories with initial conditions that are very, very close to the original grid point. This would, in fact, more closely approximate the analytic FTLE for that initial condition. However, doing so for a grid of initial conditions could be extremely misleading. This is because when computing FTLEs, we are usually less interested in the exact FLTE value at a specific location, but rather we are interested in roughly identifying ridges of maximal stretching (these ridges are associated with structures in phase space and will be discussed in the next subsection). If one wishes to compute FTLE values at two locations that are on either side of a ridge of maximal stretching, then using new initial conditions that are too close to the original grid points can ``hide'' this ridge. To visualize this, consider the grid and ridge of maximal stretching in Figure \ref{fig:FTLEGrid}. In panel \ref{fig:FTLEGridGood}, the two points on either side of the ridge are used for the computation. In this situation, the stretching caused by the ridge will be reflected in the computed FTLE values, since at least one pair of points will experience stretching associated with the ridge. In panel \ref{fig:FTLEGridBad}, four initial conditions surrounding each grid point have been generated in order to compute FTLEs. Notice that both sets of points are contained on either side of the ridge. It can be seen that two points which both begin on one side of a ridge will not experience the same extent of ``stretching'' from each other that would be experienced by two points on either side of the same ridge. In the case for which virtual trajectories were computed, the ridge of stretching will likely not be reflected in any FTLE values. Therefore, it is only in the first situation that the desired phase space structure has been identified. \begin{figure}[H] \begin{subfigure}[t]{0.5\textwidth} \includegraphics[width=\textwidth]{FTLE_GOOD.png} \caption{} \sublabel{fig:FTLEGridGood} \end{subfigure} \begin{subfigure}[t]{0.5\textwidth} \includegraphics[width=\textwidth]{FTLE_BAD.png} \caption{} \sublabel{fig:FTLEGridBad} \end{subfigure} \caption{An example grid of initial conditions is shown. We wish to calculate FTLEs for the initial conditions that are filled in black. In panel (a), the shown grid alone is used for the FTLE computation. In panel (b), a new grid of initial conditions, beginning very close to the center grid point, is generated for the computation. The case in panel (b) is intuitive for many people, but should be avoided, since the ridge of maximal stretching might not be captured by any FTLE values.} \label{fig:FTLEGrid} \end{figure} An example of two FTLE fields (one forward and one backward) are shown in Figure \ref{fig:FTLEfwdbwd}. One sees that the ridges of maximal stretching develop in the FTLE fields. These ridges approximate the stable and unstable manifolds of hyperbolic stagnation points in the flow field. \begin{figure}[H] \begin{subfigure}[t]{0.48\textwidth} \includegraphics[width=\textwidth]{FTLE_FWD_epsilon25_omega_5_tau15.png} \end{subfigure}\hfill \begin{subfigure}[t]{0.48\textwidth} \includegraphics[width=\textwidth]{FTLE_BWD_epsilon25_omega_5_tau15.png} \sublabel{fig:backward} \end{subfigure}\hfill \caption{FTLE fields for the double-gyre such as in Equations \eqref{eqn:UPsi} and \eqref{eqn:timedep} with parameters $A = .1$, $\epsilon = .25$, $\omega = .5$, and $\tau = 15$. Forward FTLEs are shown in panel (a) and backward FTLEs are shown in panel (b). Note the distinct ridges of maximal stretching that have formed.} \label{fig:FTLEfwdbwd} \end{figure} \subsection{FTLEs for observing Stable and Unstable Manifolds} \hspace{\parindent} We previously defined stagnation points and instantaneous stagnation points in the context of dynamical systems. These stagnation points can exhibit several types of stability which characterize nearby trajectories. We are currently interested in stagnation points with hyperbolic stability, which means that the eigenvalues of the Jacobian evaluated at the stagnation point have real values with opposite sign. Stagnation points with hyperbolic stability possess stable and unstable manifolds. The \textit{stable manifold} of a hyperbolic stagnation point is defined as the curve for which trajectories lying on the curve will exponentially decay towards a hyperbolic point as time increases, and similarly, an \textit{unstable manifold} is a curve whose trajectories will exponentially grow away from a hyperbolic stagnation point as time increases. These manifolds and their hyperbolic stagnation point may move or oscillate in time. In Figure \ref{fig:HyperbolicFP}, a simple schematic of a hyperbolic stagnation point is shown at the intersection of a stable and unstable manifold. \begin{figure}[H] \centering \includegraphics[width = .4\textwidth]{Manifolds_Sketch_v3.png} \caption{A hyperbolic stagnation point, with its associated stable and unstable manifolds also labeled.} \label{fig:HyperbolicFP} \end{figure} One can see in Figure \ref{fig:HyperbolicFP} that all initial conditions on either side of the stable manifold, for instance, will be advected away from the stable manifold in forward time, so that the stable manifold acts as a boundary which separates parcels that move exponentially away from each other. This means that the maximal stretching of a flow field in forward time often occurs near a stable manifold, and so the ridges of forward FTLE fields correspond to stable manifolds (and similarly, the ridges of backward FTLEs will correspond to unstable manifolds). In literature, FTLE fields are widely used to approximate stable and unstable manifolds for autonomous as well as both periodically and aperiodically forced systems, and many references can be found which conduct such analyses \cite{branicki2010} \cite{haller2001} \cite{rypina2009} \cite{shadden2005}. \\ We would like to know how varying integration time affects the structure of FTLE fields. Figure \ref{fig:FTLEchangetau} shows FTLE fields for the same set of initial conditions, where the only parameter varied is integration time. In panel \ref{fig:FTLEtau15} the integration time is $\tau = 15$ and in panel \ref{fig:FTLEtau20} the integration time is $\tau = 20$. In panel \ref{fig:FTLEsingular}, cross-sections of the FTLE field have been taken at $y = 0.5$ for both the $\tau = 15$ and $\tau = 20$ cases from the previous panels. As integration time increases, longer manifold segments (and therefore more complexity) can be seen in the field. More peaks can then be seen in panel (c) for the case of longer $\tau$. However, we notice that some peaks have changed $x$-locations between the two cases. \\ The Forward and Backward FTLE fields of a system can be summed together, in order to visualize the approximations of stable and unstable manifolds simultaneously. These curves intersect to form ``lobes'' which are bounded on one side by a stable manifold and another side by an unstable manifold. Since stable and unstable manifolds are material curves, all trajectories which begin inside of a lobe will remain bounded by the stable and unstable manifolds for all time, and so they are ``stuck'' in the lobe \cite{coulliette2001}. A \textit{material curve} is a surface of one less dimension than the flow domain that is made up entirely of particle trajectories. In systems such as ours, the lobes will often ``stretch'' and ``fold'' so that they become incorporated into both gyres. In this way, lobes made by the intersection of stable and unstable manifolds act as the mechanism for transport in the time-dependent double-gyre. This process is often referred to as ``lobe dynamics'' and has been described in many papers such as \cite{coulliette2001} \cite{raynal2006}. \begin{figure}[H] \begin{subfigure}[t]{0.46\textwidth} \includegraphics[width=\textwidth]{FTLE_SINGULAR_SHORT_epsilon25_omega_5_tau15.png} \caption{} \sublabel{fig:FTLEtau15} \end{subfigure}\hfill \begin{subfigure}[t]{0.46\textwidth} \includegraphics[width=\textwidth]{FTLE_SINGULAR_LONG_epsilon25_omega_5_tau15.png} \caption{} \sublabel{fig:FTLEtau20} \end{subfigure} \centering \begin{subfigure}[t]{0.48\textwidth} \includegraphics[width=\textwidth]{FTLE_SINGULAR_BOTH_epsilon25_omega_5_tau15.png} \caption{} \sublabel{fig:FTLEsingular} \end{subfigure} \caption{Forward FTLE fields for the double-gyre such as in Equations \eqref{eqn:UPsi} and \eqref{eqn:timedep} with parameters $A = .1$, $\epsilon = .25$, and $\omega = .5$ are shown. The case of $\tau = 15$ is shown in panel (a) and the case of $\tau = 20$ is shown in panel (b). In panel (c), the FTLE value for cross-sections along the line $y = 0.5$ are shown (the green curve corresponds to $\tau = 15$ and red curve corresponds to $\tau = 20$.). Note that some ridge locations have changed slightly between the two cases.} \label{fig:FTLEchangetau} \end{figure} \section{Lagrangian Descriptors} \label{sec:LD} \hspace{\parindent} The next diagnostic we will use to identify phase space structures in the double-gyre system are Lagrangian Descriptors (LDs). LDs are another trajectory-based scalar diagnostic that were first described by Mendoza and Mancho as a tool for finding hyperbolic trajectories in dynamical systems \cite{mendoza2010b}. They were originally defined as the Euclidean arc-length of a trajectory, but have since been extended to include various $p$-norm quantities, and other quantities such as the integrals of acceleration or curvature \cite{mancho2013b}. In this paper we will consider only trajectory arc-length, which is the most common definition of LDs. \subsection{Definition and Computation} \hspace{\parindent} Lagrangian Descriptors, according to the definition we will use, are a measure of the Euclidean arc-length of trajectories. We will use the function $M$ to denote the LD value for an initial condition with location $\vec{x}$ beginning at time $t_0$ and with integration window $\tau$. In integral form (where the integrand is the magnitude of the velocity field), $M$ is written: \begin{equation} M(\vec{x},t_0) = \int_{t_0 - \tau}^{t_0 + \tau}{||\vec{u}}(\vec{x}(t),t)||~dt \label{eqn:Mfunction} \text{,} \end{equation} \noindent or in the discrete case, we will use the function $MD$ to denote discrete Lagrangian Descriptor values on a finite grid: \begin{align} MD_{i} = \sum_{n = -N}^{N} \sqrt{(x_{i}^{n+1}-x_{i}^n)^2 + (y_{i}^{n+1}-y_{i}^n)^2}\text{,} \label{eqn:MD} \end{align} \noindent where $n$ indexes the current time-step, $i$ indexes a particular initial condition, $N$ indicates the number of time steps in the integration window, and $x_i^{n+1}$ and $y_i^{n+1}$ depend on the initial conditions and flow map of the system. Note that $t = n\Delta t$, $\tau = N \Delta t$. \\ One might also wish to separate Lagrangian Descriptors into two parts, one that is integrated forward in time and one that is integrated backward in time. This will help us later to separately identify stable and unstable manifolds, similar to the use of forward and backward FTLEs. This is done with the separated equations \begin{align} M(\vec{x},t_0) &= M^f(\vec{x},t_0) + M^b(\vec{x},t_0)\text{,} \label{eqn:Mfunction}\\ M^f(\vec{x},t_0) &= \int_{t_0}^{t_0 + \tau}{||\vec{\mathbf{u}}}(\vec{x}(t),t)||~dt \label{eqn:MfunctionFWD} \text{,}\\ M^b(\vec{x},t_0) &= \int_{t_0-\tau}^{t_0}{||\vec{\mathbf{u}}}(\vec{x}(t),t)||~dt\text{.} \label{eqn:MfunctionBWD} \end{align} We note that Lagrangian Descriptors are, by definition, an integrated quantity. Any student who has been asked to integrate a signal numerically has likely found that integration has a smoothing effect. \\ One useful feature of $M$ is that its value is not dependent on neighboring trajectories. To visualize this, consider the coarse grid of initial conditions and their corresponding LD fields in Figure \ref{fig:LDcoarse}, and the slightly finer grid in Figure \ref{fig:LDfine}. Note that LD values from initial conditions that exist in both cases are identical. No change is observed because the computation of LDs does not require information from neighboring points. \begin{figure}[H] \begin{subfigure}[t]{0.5\textwidth} \includegraphics[width=\textwidth]{LD_COARSE_epsilon10_omega20_tau12.jpg} \caption{} \sublabel{fig:LDcoarse} \end{subfigure} \begin{subfigure}[t]{0.5\textwidth} \includegraphics[width=\textwidth]{LD_FINE_epsilon10_omega20_tau12.jpg} \caption{} \sublabel{fig:LDfine} \end{subfigure} \caption{LD values for the double-gyre such as in Equations \eqref{eqn:UPsi} and \eqref{eqn:timedep} with parameters $A = .1$, $\omega = .5$, and $\tau = 12$. In panel (a) a coarse grid of 11x6 points is used, and in panel (b) a slightly finer grid of 21x11 points is used. Initial conditions which remain the same in both cases have been shown outlined in black in panel (b). Note that the value of $M$ at these locations remains identical in both cases. Also note that LD values can be computed along the boundaries, so long as the trajectory is known.} \end{figure} \subsection{Lagrangian Descriptors for observing Stable and Unstable Manifolds} \hspace{\parindent} When computing LDs for a grid of initial positions, one begins to identify features which are very similar to the FTLE ridges shown in the previous section. Figures \ref{fig:forwardLD} and \ref{fig:backwardLD} contain forward and backward LD fields for the double-gyre with parameters $\epsilon = 0.25$ and $\omega = .5$, with integration time $\tau = 15$ (note that these are the same parameters used in the FTLE fields of Figure \ref{fig:FTLEfwdbwd}). These again represent the stable and unstable manifolds of stagnation points.\\ \begin{figure}[H] \begin{subfigure}[b]{0.48\textwidth} \includegraphics[width=\textwidth]{LD_FWD_epsilon25_omega_5_tau15.jpg} \caption{} \sublabel{fig:forwardLD} \end{subfigure}\hfill \begin{subfigure}[b]{0.48\textwidth} \includegraphics[width=\textwidth]{LD_BWD_epsilon25_omega_5_tau15.jpg} \caption{} \sublabel{fig:backwardLD} \end{subfigure}\hfill \caption{Forward (a) and Backward (b) LD fields for the double-gyre such as in Equations \eqref{eqn:UPsi} and \eqref{eqn:timedep} with parameters $A = .1$, $\epsilon = 0.25$, $\omega = .5$, and $\tau = 15$, computed using Equations \eqref{eqn:MfunctionFWD} and \eqref{eqn:MfunctionBWD}.} \end{figure} There exists a rigorous mathematical connection between the stable and unstable manifolds displayed in LD fields and the exact stable and unstable manifolds of hyperbolic stagnation points. This result was first proved by Lopesino et al. for two-dimensional autonomous and nonautonomous flows \cite{lopesino2017}. The proof was next extended to 3D dynamical systems in Garc\'ia-Garrido et al. \cite{garcia-garrido2018}, and more recently it has been shown for the stable and unstable manifolds of normally hyperbolic invariant manifolds in Hamiltonian systems with two or more degrees of freedom in Naik et al. \cite{naik2019}. These proofs will not be discussed here, but we will instead mention the heuristic argument presented, for instance, by Mancho et al. \cite{mancho2013b}. \\ The heuristic argument is as follows: trajectories which begin ``near'' each other and remain so throughout their time evolution are expected to have arc-lengths which are ``close.'' However, at the boundaries between regions consisting of trajectories with qualitatively different behavior, we expect that the arc-lengths of trajectories on either side of this boundary will not be ``close.'' Instead, these boundaries are marked by an ``abrupt change'' in $M$, meaning that the derivative of $M$ transverse to these boundaries is discontinuous. This abrupt change occurs near regions separated by the stable and unstable manifolds of hyperbolic trajectories. Figure \ref{fig:SingularFeature} demonstrates this numerically with $MD$ for a case of the double-gyre with $\epsilon = .25$ and $\omega = 0.5$. The values of $MD$ along the line $y = 0.5$ are plotted, and one can see that a discontinuity in the derivatives of $MD$ occur at the locations of stable and unstable manifolds. Note that these ``discontinuities'' are not precisely the singular features described in \cite{mancho2013}, since the shown cross-section is not necessarily transverse to the stable and unstable manifolds. The method, however, is useful for visualizing abrupt changes in $MD$. \\ Similar to FTLE fields, we would like to know how varying integration time affects the structure of LD fields. LD fields exhibit a similar behavior to FTLEs in that as $\tau$ is increased, longer manifold segments and increased complexity can be seen in the domain. However, the locations of the perceived stable and unstable manifolds do not change when $\tau$ is increased. This can be understood first through the more rigorous connection between LDs and stable/unstable manifolds in \cite{lopesino2017}, \cite{garcia-garrido2018}, and \cite{naik2019}, and is also an observed fact for those who compute LDs. Consider the following two fields of LDs, one with an integration time of $\tau = 15$ in Figure \ref{fig:LDtau15}, and one with an integration time of $\tau = 20$ in Figure \ref{fig:LDtau20}. It can be seen in the $\tau = 20$ case that ridge locations have not changed compared to $\tau = 15$, but have only gained complexity. This can also be seen in panel \ref{fig:LDRidge}, since the discontinuities in $MD$ occur at the same location in both cross-sections. \\ \begin{figure}[H] \begin{subfigure}[t]{0.48\textwidth} \includegraphics[width=\textwidth]{LD_SINGULAR_SHORT_epsilon25_omega_5_tau15.png} \caption{} \sublabel{fig:LDtau15} \end{subfigure}\hfill \begin{subfigure}[t]{0.48\textwidth} \includegraphics[width=\textwidth]{LD_SINGULAR_LONG_epsilon25_omega_5_tau15.png} \caption{} \sublabel{fig:LDtau20} \end{subfigure} \hfill \centering \begin{subfigure}[t]{0.48\textwidth} \includegraphics[width=\textwidth]{LD_SINGULAR_BOTH_epsilon25_omega_5_tau15.png} \caption{} \sublabel{fig:LDRidge} \end{subfigure} \caption{Forward LD fields for the double-gyre such as in Equations \eqref{eqn:UPsi} and \eqref{eqn:timedep} with parameters $A = .1$, $\epsilon = 0.25$, and $\omega = .5$. The case of $\tau = 15$ is shown in panel (a) and the case of $\tau = 20$ is shown in panel (b). In panel (c), the value of $MD$ from a cross section at $y = 0.5$ in each case is shown as a function of $x$ (green curve corresponds to $\tau = 15$ and red curve corresponds to $\tau = 20$). In panel (c), discontinuities in LD values from the shorter (green) simulation remain in the longer (red) simulation, illustrating that the location of stable or unstable manifolds do not change as $\tau$ increases. However, more discontinuities begin to appear in the long (red) curve, showing that increasing $\tau$ for LDs increases the length of the resolved manifolds.} \label{fig:SingularFeature} \end{figure} \subsection{Lagrangian Descriptors and KAM Tori} \hspace{\parindent} Now that some examples of Lagrangian Descriptors have been shown (with stable and unstable manifolds clearly visible), one can see that there are ``other'' features in the LD fields that do not correspond with manifolds. Specifically large dips tend to appear near the center of gyres. These dips correspond to stable KAM tori. In this section, we will describe the relationship between Lagrangian Descriptors and KAM tori. First, Kolmogorov-Arnold-Moser (KAM) theory will be briefly introduced. The concept of Poincare Maps will be introduced, and some examples of Poincare Maps for our double-gyre model will be shown. Finally, the relationship between Lagrangian Descriptors and KAM invariant tori will be described. \subsubsection{KAM Theory} \hspace{\parindent} KAM theory arises from elliptic trajectories that are affected by a small, time-periodic perturbation. By elliptic trajectories, we mean trajectories which begin near a stagnation point with elliptic stability. A stagnation point has elliptic stability when the Jacobian of the velocity field evaluated at the stagnation point are pure imaginary. \\ For a conservative flow in an unperturbed system, the streamfunction of the flow, $\psi(x,y)$, can be transformed in terms of the action-angle variables, $(I,\theta)$ by replacing $\psi(x,y)$ with the new Hamiltonian, $H(I)$. The details of this transformation will not be described here but are common in classical mechanics. The equations of motion in the transformed system become: \begin{eqnarray} \frac{\text{d} I}{\text{d} t} = -\frac{\partial H}{\partial \theta} &=& 0\text{,} \\ \frac{\text{d} \theta}{\text{d} t} = ~~\frac{\partial H}{\partial I} &=& \omega(I)\text{.} \end{eqnarray} After integrating these equations, one sees that $I$ simply indexes particle trajectories, and that the motion of trajectories is periodic with angular frequency $\omega(I)$. These trajectories can be viewed as lying on curves, or ``tori'' within phase space. When the system is perturbed, almost all tori are preserved while others are destroyed. This is the main result of the Kolmogorov-Arnold-Moser (KAM) theorem. More specifically, the KAM theorem maintains that after a sufficiently small perturbation, the tori of most trajectories are preserved, except for those which have an angular frequency that is rationally related to the frequency of perturbation \cite{dumas2014}. Which is to say: \begin{equation} \alpha = \frac{\omega(I)}{\omega_0} = \frac{p}{q}\text{,} \end{equation} \noindent where $(p,q)$ are integers, and $\omega_0$ is the frequency of perturbation.\\ The trajectories for which the ratio $\alpha$ is sufficiently irrational (meaning their angular frequencies are not rationally related to the frequency of perturbation and that they do not lie very close to one of these trajectories) are associated with structures called KAM invariant tori. These tori will remain invariant under perturbation and are barriers to transport --- meaning any orbits beginning ``inside'' of the tori will remain inside throughout the system's dynamic evolution \cite{dumas2014}. Meanwhile, tori with rational $\alpha$ and their close neighbors will be ``destroyed,'' or in other words, they will not densely fill out a curve. One way to easily view these tori is through a tool known as a Poincare Map. \subsubsection{Poincare Maps} \label{subsec:Poincare} \hspace{\parindent} Recall Figure \ref{fig:twotrajs} for which two trajectories were released. One moved chaotically around the domain, and the other remained on one side of the domain for the entirety of the simulation. This calls for a tool to determine whether certain trajectories are ``trapped'' permanently in regions of the domain (particularly near elliptic centers). Consider Figure \ref{fig:Simulation}, which contains the initial and final positions of fluid parcels after being advected for 32 iterations of the period of perturbation of the system. From this simulation alone, however, one cannot determine whether a parcel is actually stuck in one of these islands (perhaps some left and returned, or will escape at a later time if the simulation is continued). Drawing inspiration from KAM theory allows us to develop Poincare Maps that helps us determine whether some trajectories will be ``caught'' in regions of elliptic stability. \begin{figure}[H] \centering \begin{subfigure}[t]{0.48\textwidth} \includegraphics[width=\textwidth]{GyreSim_IC.png} \caption{} \sublabel{fig:SimulationIC} \end{subfigure} \begin{subfigure}[t]{0.48\textwidth} \includegraphics[width=\textwidth]{GyreSim_eps25_omega5_tau100.jpg} \caption{} \sublabel{fig:SimulationF} \end{subfigure} \caption{Initial conditions (a) and final state (b) of particles advected in double-gyre flow such as in Equations \eqref{eqn:UPsi} and \eqref{eqn:timedep} with parameters $\epsilon = 0.25$ and $\omega = 2$, after $\tau = 100.53$ (32 iterations of the period $T = 2\pi/\omega$). The lack of mixing around the center of the gyres is related to the invariant tori from the Poincare Map in Figure \ref{fig:Poincare}} \label{fig:Simulation} \end{figure} A \textit{Poincare Map} is a type of recurrence map which is constructed by plotting the positions of trajectories at integer multiples of the period of perturbation, $T= 2 \pi / \omega$ \cite{dumas2014}. Figure \ref{fig:PoincareF} contains a Poincare Map of the double-gyre with parameters $\epsilon = 0.25$, $\omega = 2$, and integrated for 4000 multiples of the period of perturbation. The initial conditions used to create this map are shown in Figure \ref{fig:PoincareIC}. Note that when constructing these maps, a much less dense grid of initial conditions is used compared to a grid one might prefer when running a simple simulation of advected parcels. This is because too many initial conditions makes it more difficult to observe distinct features in Poincare Maps. Typically, one wishes to see solid or dashed curves which one can interpret as stable or unstable tori. In Figure \ref{fig:PoincareF}, evidence of both resonant and non-resonant tori can be seen when beginning with the coarse grid of parcels in Figure \ref{fig:PoincareIC}. \\ \begin{figure}[H] \centering \begin{subfigure}[t]{0.48\textwidth} \includegraphics[width=\textwidth]{Poincare_grid_IC.png} \caption{} \sublabel{fig:PoincareIC} \end{subfigure} \begin{subfigure}[t]{0.48\textwidth} \includegraphics[width=\textwidth]{Poincare_grid_epsilon25_omega_20_its4000.png} \caption{} \sublabel{fig:PoincareF} \end{subfigure} \caption{Poincare map of the double-gyre such as in Equations \eqref{eqn:UPsi} and \eqref{eqn:timedep} with parameters $\epsilon = 0.25$ and $\omega = 2$. 4000 iterations of the period of perturbation are shown. Points with initial conditions to the left of $x = 1$ are shown in red and points with initial conditions to the right of $x = 1$ are shown in green. Invariant tori and destroyed tori can be seen in the map, as solid or broken curves respectively.} \label{fig:Poincare} \end{figure} Our understanding of KAM theory and Poincare Maps now gives us one way to interpret the results from Figure \ref{fig:twotrajs}. Comparing Figures \ref{fig:twotrajs} and \ref{fig:PoincareF}, one sees that the trajectory which remained in the gyre was initialized inside of a KAM invariant tori, and so it was constrained within an ``island'' without the ability to escape. Similarly, the other trajectory in Figure \ref{fig:twotrajs} was initialized outside of the invariant tori, and as such, was able to move about the domain chaotically. \\ \subsubsection{Relationship between LDs and KAM Tori} \hspace{\parindent} In side-by-side examples, KAM invariant tori seem to appear in Lagrangian Descriptors as uniform ``dips.'' It has also been shown that there is a rigorous connection between invariant sets (such as KAM invariant tori) and the time-average of functions along trajectories (such as Lagrangian Descriptors). This connection is based on Birkhoff's ergodic theorem and has been discussed in \cite{mezic1999}, \cite{susuki2009}, and more specifically with respect to Lagrangian Descriptors in \cite{lopesino2017}. The theorem states that the limit of time-averaged functions along trajectories (as $\tau \rightarrow \infty$) exists, so long as the dynamical system preserves smooth measures and is defined on a compact set. Level curves of these limit functions are invariant sets. Lopesino et al. note that this theory has not been generalized for aperiodic time-dependent flows \cite{lopesino2017}. In this paper, we reiterate a simple heuristic argument which connects KAM tori to Lagrangian descriptors. Closed trajectories within KAM invariant tori will have trajectories of similar past and future behavior. Being ``trapped'' within their tori, these trajectories are also less likely to have seen much of the domain, leading to lower LD values. Outside of these tori are regions of higher complexity, that are associated with strong mixing (and consequently, trajectories that have ``visited'' more of the domain and are likely to have higher LD values). \\ Figure \ref{fig:Poincare3panel} contains three panels: \ref{fig:PoincareLD1} shows an LD field for the double-gyre with parameters $A = .1$, $\epsilon = 0.25$, $\omega = 2$, and $\tau = 15$, \ref{fig:PoincareLD2} shows a Poincare map for the same system representing 4000 iterations, and \ref{fig:PoincareLD3} shows the Poincare map from (b) overlaid onto the LD field in (a). One can see that the KAM tori correspond nicely with the boundaries of the LD ``islands.'' More examples of this can be seen throughout the results in Section \ref{sec:results}. \begin{figure}[H] \begin{subfigure}[t]{0.33\textwidth} \includegraphics[width=\textwidth]{LD_epsilon25_omega_20_tau15.png} \caption{} \sublabel{fig:PoincareLD1} \end{subfigure}\hfill \begin{subfigure}[t]{0.31\textwidth} \includegraphics[width=\textwidth]{Poincare_grid_epsilon25_omega_20_its4000.png} \caption{} \sublabel{fig:PoincareLD2} \end{subfigure}\hfill \centering \begin{subfigure}[t]{0.33\textwidth} \includegraphics[width=\textwidth]{PoincareOveraly_epsilon25_omega5_its4000.jpg} \caption{} \sublabel{fig:PoincareLD3} \end{subfigure} \caption{LDs and KAM tori in the double-gyre such as in Equations \eqref{eqn:UPsi} and \eqref{eqn:timedep} with parameters $A = .1$, $\epsilon = .25$ and $\omega = 2$. Panel (a) shows an LD field using $\tau = 15$, panel (b) shows a Poincare map up to 4000 iterations (identical to Figure \ref{fig:Poincare}), and panel (c) has shown the Poincare map overlaid onto the LD field.} \label{fig:Poincare3panel} \end{figure} \section{Results} \label{sec:results} \hspace{\parindent} Now that both FTLEs and LDs have been discussed in depth, we will move on to a series of results which compare the two diagnostics using varying parameters of the time-dependent double-gyre. Figures 6-14 contain examples of FTLEs, LDs, and Poincare maps for various parameters in the time-dependent double-gyre. The parameters $A = .1$ and $t_0 = 0$ are used for all cases. The FTLE panels contain the sum of the forward and backward FTLE fields for each case. FTLEs and LDs are computed for $\tau = 15$, and Poincare maps are shown for 4000 iterations of the period of perturbation. The set of initial conditions consist of a $501\times251$ grid for FTLEs and LDs, and a $21\times11$ grid for Poincare Maps. For Poincare Maps, points are shown in red if their respective initial condition began on the left side of the domain ($x < 1$) or green if they begin on the right side of the domain ($x > 1$). Computing trajectories was done using the velocity field described by Equations \eqref{eqn:UPsi} and \eqref{eqn:timedep}, while using \textit{MATLAB}'s ode45 function, which implements an explicit 4th-order variable time step Runge-Kutta scheme.\\ We observe in the results that ridges of FTLE fields visually correspond to features in LD fields, except towards the ends of FTLE ridges, where the curves often become displaced or distorted. Sharp features in the FTLE and LD fields exist in the ``mixed'' chaotic regions of the Poincare maps (recall that the intersection of stable and unstable manifolds become a mechanism for transport between gyres). Further, large Poincare ``islands'' are visibly related to smooth dips in LD fields and lack of ridges in the FTLE fields. \begin{figure}[H] \begin{subfigure}[t]{0.33\textwidth} \includegraphics[width=\textwidth]{FTLE_TOTAL_epsilon10_omega_5_tau15.png} \caption{} \end{subfigure}\hfill \begin{subfigure}[t]{0.33\textwidth} \includegraphics[width=\textwidth]{LD_epsilon10_omega_5_tau15.png} \caption{} \end{subfigure}\hfill \begin{subfigure}[t]{0.31\textwidth} \includegraphics[width=\textwidth]{Poincare_grid_epsilon10_omega_5_its4000.png} \caption{} \end{subfigure} \begin{subfigure}[t]{0.33\textwidth} \includegraphics[width=\textwidth]{FTLE_TOTAL_epsilon10_omega_10_tau15.png} \caption{} \end{subfigure}\hfill \begin{subfigure}[t]{0.33\textwidth} \includegraphics[width=\textwidth]{LD_epsilon10_omega_10_tau15.png} \caption{} \end{subfigure}\hfill \begin{subfigure}[t]{0.31\textwidth} \includegraphics[width=\textwidth]{Poincare_grid_epsilon10_omega_10_its4000.png} \caption{} \end{subfigure} \begin{subfigure}[t]{0.33\textwidth} \includegraphics[width=\textwidth]{FTLE_TOTAL_epsilon10_omega_20_tau15.png} \caption{} \end{subfigure}\hfill \begin{subfigure}[t]{0.33\textwidth} \includegraphics[width=\textwidth]{LD_epsilon10_omega_20_tau15.png} \caption{} \end{subfigure}\hfill \begin{subfigure}[t]{0.31\textwidth} \includegraphics[width=\textwidth]{Poincare_grid_epsilon10_omega_20_its4000.png} \caption{} \end{subfigure} \caption{LDs, FTLEs, and KAM tori in the double-gyre such as in Equations \eqref{eqn:UPsi} and \eqref{eqn:timedep} with parameters $A = .1$ and $\epsilon = .1$. The first row [(a),(b),(c)] corresponds to $\omega = .5$, the second row [(d),(e),(f)] corresponds to $\omega = 1$, and the third row [(g),(h),(i)] corresponds to $\omega = 2$. The first column [(a),(d),(g)] contains summed forward and backward FTLE fields with $\tau = 15$, the second column [(b),(e),(h)] contains LD fields with $\tau = 15$, and the third column [(c),(f),(i)] contains Poincare Maps up to 4000 iterations of the period of perturbation.} \end{figure} \begin{figure}[H] \begin{subfigure}[t]{0.33\textwidth} \includegraphics[width=\textwidth]{FTLE_TOTAL_epsilon25_omega_5_tau15.png} \caption{} \end{subfigure}\hfill \begin{subfigure}[t]{0.33\textwidth} \includegraphics[width=\textwidth]{LD_epsilon25_omega_5_tau15.png} \caption{} \end{subfigure}\hfill \begin{subfigure}[t]{0.31\textwidth} \includegraphics[width=\textwidth]{Poincare_grid_epsilon25_omega_5_its4000.png} \caption{} \end{subfigure} \begin{subfigure}[t]{0.33\textwidth} \includegraphics[width=\textwidth]{FTLE_TOTAL_epsilon25_omega_10_tau15.png} \caption{} \end{subfigure}\hfill \begin{subfigure}[t]{0.33\textwidth} \includegraphics[width=\textwidth]{LD_epsilon25_omega_10_tau15.png} \caption{} \end{subfigure}\hfill \begin{subfigure}[t]{0.31\textwidth} \includegraphics[width=\textwidth]{Poincare_grid_epsilon25_omega_10_its4000.png} \caption{} \end{subfigure} \begin{subfigure}[t]{0.33\textwidth} \includegraphics[width=\textwidth]{FTLE_TOTAL_epsilon25_omega_20_tau15.png} \caption{} \end{subfigure}\hfill \begin{subfigure}[t]{0.33\textwidth} \includegraphics[width=\textwidth]{LD_epsilon25_omega_20_tau15.png} \caption{} \end{subfigure}\hfill \begin{subfigure}[t]{0.31\textwidth} \includegraphics[width=\textwidth]{Poincare_grid_epsilon25_omega_20_its4000.png} \caption{} \end{subfigure} \caption{LDs, FTLEs, and KAM tori in the double-gyre such as in Equations \eqref{eqn:UPsi} and \eqref{eqn:timedep} with parameters $A = .1$ and $\epsilon = .25$. The first row [(a),(b),(c)] corresponds to $\omega = .5$, the second row [(d),(e),(f)] corresponds to $\omega = 1$, and the third row [(g),(h),(i)] corresponds to $\omega = 2$. The first column [(a),(d),(g)] contains summed forward and backward FTLE fields with $\tau = 15$, the second column [(b),(e),(h)] contains LD fields with $\tau = 15$, and the third column [(c),(f),(i)] contains Poincare Maps up to 4000 iterations of the period of perturbation.} \end{figure} \begin{figure}[H] \begin{subfigure}[t]{0.33\textwidth} \includegraphics[width=\textwidth]{FTLE_TOTAL_epsilon50_omega_5_tau15.png} \caption{} \end{subfigure}\hfill \begin{subfigure}[t]{0.33\textwidth} \includegraphics[width=\textwidth]{LD_epsilon50_omega_5_tau15.png} \caption{} \end{subfigure}\hfill \begin{subfigure}[t]{0.31\textwidth} \includegraphics[width=\textwidth]{Poincare_grid_epsilon50_omega_5_its4000.png} \caption{} \end{subfigure} \begin{subfigure}[t]{0.33\textwidth} \includegraphics[width=\textwidth]{FTLE_TOTAL_epsilon50_omega_10_tau15.png} \caption{} \end{subfigure}\hfill \begin{subfigure}[t]{0.33\textwidth} \includegraphics[width=\textwidth]{LD_epsilon50_omega_10_tau15.png} \caption{} \end{subfigure}\hfill \begin{subfigure}[t]{0.31\textwidth} \includegraphics[width=\textwidth]{Poincare_grid_epsilon50_omega_10_its4000.png} \caption{} \end{subfigure} \begin{subfigure}[t]{0.33\textwidth} \includegraphics[width=\textwidth]{FTLE_TOTAL_epsilon50_omega_20_tau15.png} \caption{} \end{subfigure}\hfill \begin{subfigure}[t]{0.33\textwidth} \includegraphics[width=\textwidth]{LD_epsilon50_omega_20_tau15.png} \caption{} \end{subfigure}\hfill \begin{subfigure}[t]{0.31\textwidth} \includegraphics[width=\textwidth]{Poincare_grid_epsilon50_omega_20_its4000.png} \caption{} \end{subfigure} \caption{LDs, FTLEs, and KAM tori in the double-gyre such as in Equations \eqref{eqn:UPsi} and \eqref{eqn:timedep} with parameters $A = .1$ and $\epsilon = .5$. The first row [(a),(b),(c)] corresponds to $\omega = .5$, the second row [(d),(e),(f)] corresponds to $\omega = 1$, and the third row [(g),(h),(i)] corresponds to $\omega = 2$. The first column [(a),(d),(g)] contains summed forward and backward FTLE fields with $\tau = 15$, the second column [(b),(e),(h)] contains LD fields with $\tau = 15$, and the third column [(c),(f),(i)] contains Poincare Maps up to 4000 iterations of the period of perturbation.} \end{figure} \section{Discussion} \hspace{\parindent} In this paper, the utility and computational considerations of Finite-Time Lyapunov Exponents and Lagrangian Descriptors were explored in detail, and many results were shown for a time-dependent double-gyre model. The double-gyre model is a toy model of a natural phenomenon common to large-scale ocean dynamics. \\ Some thought should be given to the choice of integration time, $\tau$, for both FTLEs and LDs. Throughout the paper, we have generally set $\tau = 15$. There is no general rule for choosing $\tau$, and the best choice is always problem-dependent. For periodically forced systems, a good place to start is often several multiples of the period of perturbation. For aperiodic systems, one might start with some advective time scale considering the size of the domain and magnitude of the velocity field. In general, as $\tau$ is increased, richer details of the underlying structures are revealed, meaning that the choice also depends on how much complexity the user wants to resolve. Ultimately, the process of choosing $\tau$ usually requires trial and error when attempting to reveal specific features. \\ When choosing to use FTLEs or LDs to reveal stable and unstable manifolds of hyperbolic trajectories, one consideration is our confidence in the method as a tool for revealing phase space structure. Branicki and Wiggins explored the accuracy of FTLE ridges for the purpose of revealing transport barriers (such as stable and unstable manifolds) in some depth \cite{branicki2010}. FTLE ridges are not material curves in general, though they may be ``close'' to one in the sense that flux across the ridge may be small or negligible with sufficiently large $\tau$, as discussed in \cite{shadden2005}. However, there are many known cases in which the stable and unstable manifolds of a system are known exactly, and yet FTLE fields are either flat, or their ridges do not correspond to stable and unstable manifolds. A few examples of such cases were shown in the Branicki and Wiggins work, including a simple time-dependent case of linear strain. For the example, the FTLE value of any particular initial condition, $\lambda_\tau(\vec{x},t_0)$, does not depend on $x$ or $y$. As shown in Figure \ref{fig:FTLEsingular}, the location of FTLE ridges can also be particularly sensitive to the choice in parameter, $\tau$. \\ In our results, KAM tori appear to be identified both in FTLEs and LDs. Some connection between invariant tori-like structures and FTLEs was shown in \cite{beron-vera2010}, where structures like KAM-tori are taken to be revealed by locally minimizing curves of FTLE fields. These ``trenches,'' however, appear to be subject to the same issues related to FTLE ridges that are discussed above. In general, one expects trajectories contained in invariant tori to experience minimal stretching compared to trajectories in chaotic regions of the domain, meaning trajectories within KAM tori will often have small FTLE values. The connection between LDs and invariant sets such as KAM tori, however, is more robust and has been rigorously considered by Lopesino et al. \cite{lopesino2017}. In principle, one can continue integration a bit longer, and compute the time average of $MD$ to extract an accurate approximation of KAM tori. This method has been used in Garc\'ia-Garrido et al. to extract invariant sets in 3D vector fields \cite{garcia-garrido2018}.\\ When identifying KAM tori, we observe that Poincare maps show more complex features of KAM tori than LDs or FTLEs in flows with periodic perturbations. However, while Poincare maps are useful for identifying KAM invariant tori in dynamical systems containing periodic perturbations, they are meaningless in aperiodic flows (there would be no ``natural'' frequency with which to infer recurrence in the first place). We may be interested, however, in finding similar ``islands'' in aperiodic systems, such as in many geophysical systems. Lagrangian Descriptors and FTLEs may be more useful for identifying these features in aperiodic flows, since their computation does not depend on the existence of a characteristic frequency. Poincare Maps also require long integration lengths that are several orders of magnitudes longer than diagnostics such as FTLEs and LDs (usually several thousand multiples of the period of perturbation), in order to generate enough points to visibly differentiate between the broken and unbroken tori. \\ LDs are also exceptionally easy to calculate. An undergraduate student with minimal coding experience can be asked to compute the ``arc-length of trajectories,'' and will very likely return with satisfactory results. However, FTLEs require significantly more explanation, and are not always intuitive. One must first explain the meaning of Lyapunov exponents, reduce the concept to a finite-time case, calculate trajectories, differentiate, and then compute eigenvalues. This can be a difficult set of concepts for a new dynamical systems student to grasp. On the other hand, the conceptual simplicity of LDs is likely the reason they have begun to be accepted in new fields such as in chemical reaction dynamics \cite{katsanikas2020} \cite{naik2019}. \\ There are also fewer computational considerations for LD fields compared to FTLE fields. The sensitivity of FTLEs to grid spacing and integration time, for instance, requires the user to take more care when interpreting structure in FTLE fields. The choice of ``neighboring trajectories'' is also extremely important when computing FTLEs, and this fact can be easily neglected. For several years, the author made the mistake of computing FTLEs by generating a new set of initial conditions for each grid point, such as the problem illustrated in Figure \ref{fig:FTLEGrid}, which is not an uncommon mistake for students who are new to the dynamical systems approach to Lagrangian transport. \\ One might also like to know how FTLEs and LDs perform in higher dimensions. While FTLEs are commonly computed in three dimensions by constructing the appropriate three-dimensional deformation tensor, the identified structures suffer from similar limitations as they do in two dimensions \cite{branicki2010}. Meanwhile, the connection between Lagrangian Descriptors and phase-space structures in three and higher dimensions has been thoroughly detailed in a number of works \cite{garcia-garrido2018} \cite{lopesino2015} \cite{lopesino2017} \cite{naik2019}. \\ While FTLEs have been used widely in literature to identify phase space structures in real systems such as oceanic flows, the concept of LDs is more recent, and the current extent of literature using LDs to analyze real flows is somewhat limited but growing rapidly. Future studies could see LDs being used more frequently to analyze these systems, considering their robust connection to phase space structures and their simplicity for new students to learn. \section*{Acknowledgments} \hspace{\parindent} I would like to thank Steve Wiggins and Reza Malek-Madani for their tutoring in dynamical systems concepts, and for guidance related to this paper. Also, many thanks to the University of Bristol School of Mathematics for hosting during my visit in the summer of 2018, where the work began. I would also like to give special thanks to Kevin McIlhany for his many years of mentorship in CFD and other topics in physics and mathematics. \bibliographystyle{siam}
\section{Introduction}\label{Introduction} In the low energy limit of superstring theory, spacetime fields satisfy supergravity (SUGRA) equations of motion, which are super-analogues of the Einstein equations. It is one of the main principles of string theory, that these target space equations of motion are equivalent to the BRST invariance of the string worldsheet theory. When they are satisfied, the space of fields is an infinite-dimensional $Q$-manifold (a manifold with an odd nilpotent vector field \cite{Alexandrov:1995kv}). But in the case of \emph{pure spinor string}, the sigma-model also defines a \emph{finite-dimensional} $Q$-manifold. Indeed, the action of the BRST operator on matter fields and pure spinor ghosts does not contain worldsheet derivatives. (The worldsheet derivatives will appear when we consider the action on the conjugate momenta to matter fields and pure spinor ghosts, but they can be considered separately.) This means that, if we think of the pure spinor ghosts as part of target space, the BRST operator defines \emph{on the target space} an odd nilpotent vector field, which we denote $Q$. In other words, the target space of the pure spinor sigma-model (a finite-dimenisional supermanifold) is a $Q$-manifold. Moreover, in generic space-time (for example in $AdS_5\times S^5$, but not in flat space-time) the energy-momentum tensor and the $b$-ghost can also be interpreted as symmetric tensors on the target space (see \cite{Mikhailov:2017mdo}). How to classify a generic odd nilpotent vector field $Q$? A vector field can usually be ``simplified'' by a clever choice of coordinates. This is called ``normal form''. If a vector field is non-vanishing, one can choose coordinates so that the it is $\partial\over\partial\theta$ where $\theta$ is one of fermionic coordinates. If $Q$ vanishes at some point, then the normal form would be (in the notations of \cite{Alexandrov:1995kv}) $\eta^a {\partial\over\partial x^a}$. But in out case, the target space is not a smooth supermanifold, because pure spinor ghosts live on a cone. The vector $Q$ vanishes precisely at the singular locus, and the problem of classification of normal forms is a nontrivial cohomological computation. This is what we will do in this paper. We will find that the space of equivalence classes of odd nilpotent vector fields in a vicinity of the singular locus is equivalent to the space of the classical SUGRA solutions. This is true modulo some \emph{``zero modes''} --- a finite-dimensional subspaces of soultions (see \cite{Mikhailov:2014qka}) which we ignore in this paper. Some details of our computations can be found in the \href{https://andreimikhailov.com/math/vector-fields/index.html}{\textbf{\textcolor{blue}{HTML version of this paper}}}. \subsection{Definition of $M$}\label{sec:IntroM} The particular singularity which we are interested in can be described as follows. Consider the space $M$ with bosonic coordinates $x^m$ ($m$ running from 1 to 10) and $\lambda_L^{\alpha}$, $\lambda_R^{\hat{\alpha}}$ ($\alpha$ and $\hat{\alpha}$ both running from 1 to 16), and fermionic $\theta_L^{\alpha}$ and $\theta_R^{\hat{\alpha}}$, with the constraint: \begin{equation} \lambda_L^{\alpha}\Gamma_{\alpha\beta}^m\lambda_L^{\beta} = \lambda_R^{\hat{\alpha}}\Gamma_{\hat{\alpha}\hat{\beta}}^m\lambda_R^{\hat{\beta}} = 0 \label{IntroPSCone}\end{equation} where $\Gamma^m$ are ten-dimensional gamma-matrices. These constraints are called ``pure spinor constraints''. We understand Eqs. (\ref{IntroPSCone}) as specifying the singular locus in $M$, from the point of view of differential geometry. All we need from these equations is to know how $M$ deviates from being smooth. The singular locus is the tip of the cone (\ref{IntroPSCone}): \begin{equation} \lambda_L = 0 \mbox{ \tt\small or } \lambda_R = 0 \label{SingularityLocus}\end{equation} Pure spinor constraints (\ref{IntroPSCone}) are invariant under the action of the group \begin{equation} G = {\rm Spin}(10)_L\times {\bf C}^{\times}_L \times {\rm Spin}(10)_R\times {\bf C}^{\times}_R \label{DefG}\end{equation} The diagonal \begin{equation} {\bf C}^{\times}\subset {\bf C}_L^{\times}\times {\bf C}_R^{\times} \label{GhostNumber}\end{equation} is called ``ghost number symmetry''. Infinitesimal ghost number symmetry is generated by $\lambda_L^{\alpha}{\partial\over\partial\lambda_L^{\alpha}} + \lambda_R^{\hat{\alpha}}{\partial\over\partial\lambda_R^{\hat{\alpha}}}$. Consider an odd vector field $Q$ satisfying the following properties: \begin{itemize}\item $Q$ has ghost number 1, \textit{i.e.}: \begin{equation} \left[\lambda_L^{\alpha}{\partial\over\partial\lambda_L^{\alpha}} + \lambda_R^{\hat{\alpha}}{\partial\over\partial\lambda_R^{\hat{\alpha}}}\;,\;Q\right] = Q \label{QhasGhostNumberOne}\end{equation} \item $Q^2 = 0$\item $Q$ is ``smooth'' in the sense that it can be obtained as a restriction to the cone (\ref{IntroPSCone}) of a smooth (but not nilpotent) vector field in the space parametrized by unconstrained $x,\theta,\lambda$\item $Q$ is zero at $\lambda_L = \lambda_R = 0$ \end{itemize} We want to classify such vector fields modulo coordinate transformations. Coordinate transformations are supermaps $(x,\lambda,\theta)\mapsto (\tilde{x},\tilde{\lambda},\tilde{\theta})$ such that $\tilde{\lambda}$ satisfy the same constraints (\ref{IntroPSCone}). Such a vector field is one of the geometrical structures associated to the pure spinor superstring worldsheet theory \cite{Berkovits:2001ue},\cite{Guttenberg:2008ic}. In particular, flat background (empty ten-dimensional spacetime) corresponds to $Q=Q^{\rm flat}$: \begin{align} Q^{\rm flat} \;=\; &Q^{\rm flat}_L + Q^{\rm flat}_R \mbox{ \tt\small where: }\label{QFlat} \\ Q_L^{\rm flat}\;=\; &\lambda^{\alpha}_L{\partial\over\partial\theta^{\alpha}_L} + (\lambda^{\alpha}_L\Gamma_{\alpha\beta}^m\theta^{\beta}_L) {\partial\over\partial x^m}\nonumber{} \\ Q_R^{\rm flat}\;=\; &\lambda^{\hat{\alpha}}_R{\partial\over\partial\theta^{\hat{\alpha}}_R} + (\lambda^{\hat{\alpha}}_R\Gamma_{\hat{\alpha}\hat{\beta}}^m\theta^{\hat{\beta}}_R) {\partial\over\partial x^m}\nonumber{} \end{align} String worldsheet theory also has, besides $Q$, some other structures which are less geometrically transparent (various couplings in the string worldsheet sigma-model). All these structures should satisfy certain consistency conditions. \begin{itemize}\item \emph{Question:} is it true, that just a nilpotent vector field $Q$ already includes, as various coefficients in its normal form, all the supergravity fields, and the supergravity equations of motion are automatically satisfied (\textit{i.e.} follow from $Q^2 = 0$)? \end{itemize} This may be false in two ways. First, it could be that some supergravity fields do not enter as coefficients in the normal form of $Q$ (\textit{i.e.} they would only appear as some couplings in the sigma-model, but would not enter in $Q$). Second, it could be that just $Q^2 = 0$ would not be enough to impose SUGRA equations of motion (\textit{i.e.} one would have to also require the $Q$-invariance of the worldsheet sigma-model action). \subsection{Our results}\label{sec:IntroResults} In this paper we will derive the normal form of $Q$ as a deformation of $Q^{\rm flat}$: \begin{equation} Q = Q^{\rm flat} + \epsilon Q_1 + \epsilon^2 Q_2 + \ldots \label{ExpansionOfQAroundFlatSpace}\end{equation} Our analysis will be restricted to the terms linear in $\epsilon$ (\textit{i.e.} $Q_1$). It turns out that $Q_1$ is parameterized by some tensor fields satisfying certain hyperbolic partial differential equations. These fields are in one-to-one correspondence with the fields of the Type II SUGRA, and our hyperbolic equations are the equations of motion of the linearized Type II SUGRA. It is useful to compare to the pure spinor description of the super-Yang-Mills equations. The super-Yang-Mills equations are equivalent to having an odd nilpotent operator: \begin{equation} Q_{\rm SYM} = \lambda^{\alpha} \left( {\partial\over\partial\theta^{\alpha}} + \Gamma_{\alpha\beta}^m \theta^{\beta}{\partial\over\partial x^m} + A^a_{\alpha}(x,\theta){\bf t}_a \right) \label{QSYM}\end{equation} where ${\bf t}_a$ are generators of the gauge group, and $A^a_{\alpha}(x,\theta)$ is vector potential. Zero solution corresponds to $A_{\alpha} = 0$. In this sense, the SYM solutions can be considered as deformations of the differential operator: \begin{equation} Q_{\rm SYM}^{(0)} = \lambda^{\alpha} \left( {\partial\over\partial\theta^{\alpha}} + \Gamma_{\alpha\beta}^m \theta^{\beta}{\partial\over\partial x^m} \right) \end{equation} where the leading symbol (\textit{i.e.} the derivatives) remains undeformed. Here we consider, instead, the deformations of the leading symbol. \subsection{Relation to partial $G$-structures}\label{GStructures} The variables $\lambda_L$ and $\lambda_R$ parametrize the normal direction to the singularity locus $Z\subset M$: \begin{equation} i\;:\; Z\rightarrow M \end{equation} The first infinitesimal neighborhood is a bundle over $Z$ with the fiber $C_L\times C_R$ --- the product of two cones. Filling the cones, we obtain a vector bundle over $Z$ with the fiber $V = {\bf C}^{32}$. The vector field $Q$ is power series in $\lambda_L,\lambda_R$, with zero at the tip of $C_L\times C_R$. The derivative of $Q$ at the zero locus defines a linear map: \begin{equation} Q_*\;:\; V\rightarrow i^* TM \end{equation} This map is not an isomorphism, since the image of $Q_*$ only covers a $(0|32)$-dimensional subbundle of $TZ$. We can interpret $M$ as $(C_L\times C_R)\times_G \widehat{Z}$ where $\widehat{Z}$ is a partial frame bundle of $Z$ and $G$ is given by Eq. (\ref{DefG}). It was shown in \cite{Mikhailov:2015sva} that $Q$ defines a connection in a partial $G$-structure on $Z$ with some constraints on torsion, modulo some equivalence relation. The relation to previous work on SUGRA constraints \cite{Nilsson:1981bn}, \cite{Howe:1983sra}, \cite{Witten:1985nt}, \cite{Shapiro:1986xp}, \cite{Chau:1988sm}, \cite{Bergshoeff:1990mr}, \cite{Bergshoeff:1991ei}, \cite{Howe:1991bx}, \cite{Howe:1991mf} can be established along these lines. \subsection{Divergence of a nilpotent vector field}\label{sec:Divergence} Let us fix some volume form $\mbox{vol}$, an integral form on $M$. Then we can consider, for any vector field $V$, its divergence $\mbox{div}\, V$. This is by definition the Lie derivative of $\mbox{vol}$ along $V$: \begin{equation} {\cal L}_V\mbox{vol} = (\mbox{div}\,V)\mbox{vol} \end{equation} In particular, for a nilpotent odd vector field $Q$, we can consider the cohomology class: \begin{equation} [\mbox{div}\,Q] = \mbox{div}\,Q \quad \mbox{mod}\quad Q(\ldots) \end{equation} This cohomology class does not depend on the choice of the volume form $\mbox{vol}$. The cohomology class $[\mbox{div}\;Q]$ plays two importan roles in our approach. First, they allow to reduce the study of $Q$ to the first infinitesimal neighborhood of the singularity locus given by Eq. (\ref{SingularityLocus}). Second, it allows to prove that there is no obstacle to extending the linearized deformations (the term $\epsilon Q_1$ in Eq. (\ref{ExpansionOfQAroundFlatSpace})) to higher orders in $\epsilon$. We will now explain this. \subsubsection{Requiring $\mbox{div}\,Q = 0$}\label{sec:FirstInfinitesimalNeighborhood} We required that $Q$ has ghost number one, see Eq. (\ref{QhasGhostNumberOne}). But the ``ghost number'' $\lambda_L^{\alpha}{\partial\over\partial\lambda_L^{\alpha}} + \lambda_R^{\hat{\alpha}}{\partial\over\partial\lambda_R^{\hat{\alpha}}}$ is coordinate-dependent. It is not invariant under a change of coordinates: \begin{equation} \lambda^{\alpha} \mapsto \mbox{polynomial of }\; \lambda \end{equation} In fact, we can relax Eq. (\ref{QhasGhostNumberOne}) by replacing it with the following two requirements: \begin{align} &Q = 0 \quad \mbox{when} \quad\lambda_L = 0\; \mbox{ or }\; \lambda_R = 0\label{QisZeroAtLocus} \\ &[\mbox{div}\;Q] = 0\label{ZeroDiv} \end{align} Indeed Eq. (\ref{QisZeroAtLocus}) implies that $Q$ is a vector field of ghost number one plus vector fields of ghost numbers two and higher. Although we have not computed $H^{>1}\left(\left[Q^{\rm flat},\_\right]\right)$, the results of \cite{Mikhailov:2014qka} suggest that \begin{equation} \mbox{div} \;:\; H^2\left(\left[Q^{\rm flat},\_\right]\right) \longrightarrow H^2\left(Q^{\rm flat},\mbox{functions}\right) \end{equation} is an isomorphism, and $H^{>2}\left(\left[Q^{\rm flat},\_\right]\right)$ is zero modulo finite-dimensional spaces. Then, Eq. (\ref{ZeroDiv}) implies that the terms of the ghost number higher than one in $Q$ can be removed by the coordinate redefinition. In other words, the normal form of $Q$ can be always choosen to be of the ghost nuber one. It is enough to study the first infinitesimal neighborhood of the singularity locus. \subsubsection{Vanishing of obstacles to nonlinear solution}\label{sec:VanishingOfObstacles} It is necessary to extend this analysis to full nonlinear SUGRA equations, \textit{i.e.} higher order terms in Eq. (\ref{ExpansionOfQAroundFlatSpace}). The potential obstacle to extending linearized solutions to the solution of the nonlinear equation $Q^2=0$ lies in $H^2\left(\left[Q^{\rm flat},\_\right]\right)$. We will not compute $H^2\left(\left[Q^{\rm flat},\_\right]\right)$ in this paper, but the results of \cite{Mikhailov:2014qka} suggest that $H^2\left(\left[Q^{\rm flat},\_\right]\right)$ is actually nonzero. (We would expect it to be roughly isomorphic to $H^1\left(\left[Q^{\rm flat},\_\right]\right)$ which we compute here.) But we also know that the \emph{actual} obstacle is zero, because of the consistency of the nonlinear supergravity equations of \cite{Berkovits:2001ue}. This means that $\{Q_1,Q_1\}$ must be a coboundary. In our language, this can be proven in the following way. Let us choose $\mbox{vol}$ so that the divergence of $Q^{\rm flat}$ is zero. The divergence of $Q_1$, and therefore of $\{Q_1,Q_1\}$, is $Q_0$-exact (this statement does not depend on the choice of $\mbox{vol}$). This is because $\mbox{div} \,Q_1$ has ghost number 1. The cohomology at ghost number 1 is finite-dimensional, and in fact those $Q_1$ with nonzero $\mbox{div}\,Q_1 \; \mbox{mod}\; Q_0(\ldots)$ are non-physical (see \cite{Mikhailov:2014qka} and references there). At the same time, the divergence of the elements of $H^2\left(\left[Q^{\rm flat},\_\right]\right)$ is nonzero. Therefore the obstacle actually vanishes. \section{Notations}\label{IntroNotations} To avoid the discussion of reality conditions, we consider complex vector fields. The notation: \begin{equation} {\bf C}\langle v_1,v_2,\ldots \rangle \label{LinearSpan}\end{equation} means the space of all linear combinations of vectors $v_1,v_2,\ldots$ with complex coefficients. We introduce the abbreviated notations: \begin{align} (\!(\lambda\theta)\!)^m \;=\; &\lambda^{\alpha}\Gamma^m_{\alpha\beta}\theta^{\beta}\nonumber{} \\ (\!(\lambda\theta\theta)\!)_{\gamma} \;=\; &\lambda^{\alpha}\Gamma^m_{\alpha\beta}\theta^{\beta}\theta^{\delta}\Gamma^{m}_{\delta\gamma}\nonumber{} \\ [v\otimes\psi]^{1/2}_{\alpha} \;=\; &\Gamma^m_{\alpha\beta} v_m \psi^{\beta}\nonumber{} \\ [v\otimes\psi]_{1/2}^{\alpha} \;=\; &\Gamma^{m\alpha\beta} v_m \psi_{\beta}\nonumber{} \end{align} \section{Setup for cohomological perturbation theory}\label{CohomologicalPerturbationTheory} \subsection{Definition of $\theta^{\alpha}_L$ and $\theta^{\hat{\alpha}}_R$}\label{sec:DefThetas} We \emph{define odd coordinates} $\theta$ so that: \begin{equation} Q_L\theta_L^{\alpha} = \lambda_L^{\alpha} + O(\theta^2),\quad Q_L\theta_R^{\hat{\alpha}} = O(\theta^2),\quad Q_R\theta_R^{\hat{\alpha}} = \lambda_R^{\hat{\alpha}} + O(\theta^2),\quad Q_R\theta_L^{\alpha} = O(\theta^2) \label{DefTheta}\end{equation} \subsection{Flat $Q$ and expansion around it}\label{sec:FlatQ} Flat spacetime corresonds to $Q=Q^{\rm flat} = Q^{\rm flat}_L + Q^{\rm flat}_R$ where: \begin{align} Q_L^{\rm flat}\;=\; &\lambda_L{\partial\over\partial\theta_L} + (\!(\lambda_L\theta_L)\!){\partial\over\partial x}\nonumber{} \\ Q_R^{\rm flat}\;=\; &\lambda_R{\partial\over\partial\theta_R} + (\!(\lambda_R\theta_R)\!){\partial\over\partial x}\nonumber{} \end{align} Let us consider $Q$ as a small deformation of $Q^{\rm flat}$: \begin{equation} Q = Q^{\rm flat} + \epsilon Q_1 \label{LinearizedQ}\end{equation} to the first order in $\epsilon$. Such deformations form a linear space. They correspond to odd vector fields $Q_1$ satisfying: \begin{equation} [Q^{\rm flat} , Q_1] = 0 \end{equation} modulo the equivalence relation, corresponding to the action of diffeomorphisms: \begin{equation} Q_1\simeq Q_1 + [Q^{\rm flat},R] \end{equation} where $R$ is a ghost number zero vector field on $M$. Therefore, the classification of nilpotent vector fields of the form (\ref{LinearizedQ}) is equivalent to the computation of the cohomology of the operator $[Q^{\rm flat},\_]$ on the space of vector fields. In the rest of this paper we will compute the cohomology of $[Q^{\rm flat},\_]$ on the space of vector fields. \subsection{Spectral sequence}\label{sec:SpectralSequence} The grading operator: \begin{equation} N = \theta_L {\partial\over\partial \theta_L} +\theta_R {\partial\over\partial\theta_R} + \lambda_L {\partial\over\partial\lambda_L} + \lambda_R {\partial\over\partial\lambda_R} \label{GradingOperator}\end{equation} defines a filtration on the algebra of functions on $\mbox{Fun}(M)$, and on the space of vector fields as a $\mbox{Fun}(M)$-module. Let $F^N\mbox{Vect}$ be the space of vector fields with grade at least $N$. This filtration defines a spectral sequence converging to the cohomology of $[Q^{\rm flat},\_]$. \subsection{First page}\label{sec:FirstPage} The first page of this spectral sequence is the cohomology of: \begin{equation} [Q^{(0)}_L + Q^{(0)}_R\,,\,\_] = \left[\lambda_L{\partial\over\partial\theta_L} + \lambda_R{\partial\over\partial\theta_R}\,,\,\_\right] \end{equation} on the space of vector fields on $M$. For a set of coordinates $x,y,\ldots$ we denote $\mbox{Fun}(x,y,\ldots)$ the space of functions of $x,y,\ldots$ and $\mbox{Vect}(x,y,\ldots)$ the space of vector fields (\textit{i.e.} differentiations of $\mbox{Fun}(x,y,\ldots)$). Let us introduce the following complexes: \begin{align} C_L^{\rm vect}\;=\; &\mbox{$\mbox{Vect}(\theta_L,\lambda_L)$ with differential $[Q_L^{(0)},\_]$}\nonumber{} \\ C_R^{\rm vect}\;=\; &\mbox{$\mbox{Vect}(\theta_R,\lambda_R)$ with differential $[Q_R^{(0)},\_]$}\nonumber{} \\ C_L^{\rm fun}\;=\; &\mbox{$\mbox{Fun}(\theta_L,\lambda_L)$ with differential $Q_L^{(0)}$}\nonumber{} \\ C_R^{\rm fun}\;=\; &\mbox{$\mbox{Fun}(\theta_R,\lambda_R)$ with differential $Q_R^{(0)}$}\nonumber{} \end{align} Then, $\mbox{Vect}(M)$ with differential $Q_L^{(0)} + Q_R^{(0)}$ decomposes as follows: \begin{align} \mbox{Vect}(M) \;=\; &\phantom{\;\oplus\;} \mbox{Fun}(x) \otimes C_R^{\rm fun}\otimes C_L^{\rm vect}\label{FunXCRCL} \\ &\;\oplus\;\mbox{Fun}(x) \otimes C_L^{\rm fun}\otimes C_R^{\rm vect}\label{FunXCLCR} \\ &\;\oplus\;\mbox{Fun}(x) \otimes C_L^{\rm fun}\otimes C_R^{\rm fun} \otimes {\partial\over\partial x}\label{FunXCLCRDx} \end{align} (We do not need to take care about the completions of the tensor products, since all our functions are polynomials in $\theta$ and $\lambda$.) The cohomology of $C_L^{\rm fun}$ and $C_R^{\rm fun}$ is well known, see \textit{e.g.} the review part of \cite{Mafra:2009wq}: \begin{align} H^0(C^{\rm fun})\;=\; &{\bf C}\langle {\bf 1}\rangle\nonumber{} \\ H^1(C^{\rm fun})\;=\; &{\bf C}\left\langle (\!(\lambda\theta)\!),\;[(\!(\lambda\theta)\!)\otimes \theta]^{1/2} \right\rangle\nonumber{} \\ H^2(C^{\rm fun})\;=\; &{\bf C}\Big\langle (\!(\lambda\theta)\!)^m(\!(\lambda\theta)\!)^n\Gamma_{mn}\theta,\; (\!(\lambda\theta)\!)^m(\!(\lambda\theta)\!)^n(\theta\Gamma_{lmn}\theta) \Big\rangle\nonumber{} \\ H^3(C^{\rm fun})\;=\; &{\bf C}\left\langle (\!(\lambda\theta)\!)^l(\!(\lambda\theta)\!)^m(\!(\lambda\theta)\!)^n (\theta \Gamma_{lmn}\theta) \right\rangle\nonumber{} \end{align} Parts of the cohomology of $C_L^{\rm vect}$ and $C_R^{\rm vect}$ which are relevant to this work will be computed in Section \ref{CohomologyQ0}. \section{Cohomology of $Q^{(0)}$ in the space of vector fields}\label{CohomologyQ0} \subsection{Notations}\label{sec:Notations} Let $X$ denote the singular supermanifold parametrized by bosonic $\lambda^{\alpha}$ and fermionic $\theta^{\alpha}$ satisfying the pure spinor constraint: \begin{equation} \lambda^{\alpha}\Gamma_{\alpha\beta}^m \lambda^{\beta} = 0 \label{NotationsPureSpinorConstraint}\end{equation} (The space $M$ introduced in Section \ref{sec:IntroM} is the direct product of two copies of $X$, and the space parametrized by $x^m$.) Let ${\cal O}(X)$ denote the algebra of polynomial functions on $X$, and $Vect(X)= Der({\mathcal O} (X))$ the space of polynomial vector fields. Consider the odd nilpotent vector field $Q^{(0)}$: \begin{equation} Q^{(0)} = \lambda^{\alpha}{\partial\over\partial\theta^{\alpha}} \end{equation} The commutation $[Q^{(0)},-]$ is a nilpotent operator on $Vect(X)$. We will now compute the cohomology of this operator. Any vector field $V\in Vec(X)$ can be written as \begin{align} V \;=\; &\xi^{\alpha}(\lambda,\theta) \frac{\partial }{\partial \l ^\a } + u^{\alpha}(\lambda,\theta)\frac{\partial }{\partial \t ^\a}\nonumber{} \\ &(\l {\gamma} _m)_\a \xi^{\alpha} = 0\nonumber{} \end{align} The condition $(\l {\gamma} _m)_\a \xi^{\alpha} = 0$ is needed because $\lambda^{\alpha}$ is constrained to satisfy Eq. (\ref{NotationsPureSpinorConstraint}). Consider the subsheaf $U \subset TX$ consisting of vectors of the form $u^{\alpha}{\partial\over\partial\theta^{\alpha}}$ (in other words, $\xi^{\alpha}=0$). Its space of sections is: \begin{equation} \Gamma(U) = \{v\in \mbox{Vect}(X) \;|\; {\cal L}_v\lambda^{\alpha} = 0\} \end{equation} We observe that $\Gamma(U)\subset \mbox{Vect}(X)$ is invariant under the action of $[Q^{(0)},\_]$. Therefore, we can think of both $\Gamma(U)$ and $\Gamma(TX/U)$ as complexes with the differential $[Q^{(0)},\_]$. \subsection{Summary of results for $H^1(Vect(X))$}\label{sec:SummaryOfH1} Using the notations of Section \ref{IntroNotations}: \begin{align} H^1(Vect(X))_{\rm odd}\;=\;{\bf C}\Big\langle &[(\!(\lambda\theta)\!)\otimes\theta]^{1/2}\otimes{\partial\over\partial\theta},\label{H1VectXOdd} \\ &(\!(\lambda\theta)\!) \left( \lambda^{\alpha}{\partial\over\partial\lambda^{\alpha}} + \theta^{\alpha}{\partial\over\partial\theta^{\alpha}} \right) \Big\rangle\nonumber{} \\ H^1(Vect(X))_{\rm even}\;=\;{\bf C}\Big\langle &[(\!(\lambda\theta)\!)\otimes\theta]^{1/2}\otimes \left( \lambda\Gamma_{mn}{\partial\over\partial\lambda} + \theta\Gamma_{mn}{\partial\over\partial\theta} \right) \Big\rangle\label{H1VectXEven} \end{align} In the rest of this Section we will explain the computation. \subsection{Exact sequences}\label{ExactSequences} Consider the short exact sequence of complexes: \begin{equation} 0 \longrightarrow \Gamma (U) \longrightarrow Vect(X) \longrightarrow \Gamma(TX/U) \longrightarrow 0 \end{equation} The corresponding long exact sequence in cohomology of $[Q^{(0)},\_]$ is: \begin{align} \longrightarrow\; &H^{n-1}(\Gamma(U)) \longrightarrow H^{n-1}(Vect(X)) \longrightarrow H^{n-1}(\Gamma(TX/U)) \longrightarrow\nonumber{} \\ \longrightarrow\; &H^n(\Gamma(U)) \longrightarrow H^n(Vect(X)) \longrightarrow H^n(\Gamma(TX/U)) \longrightarrow\nonumber{} \\ \longrightarrow\; &H^{n+1}(\Gamma(U))\longrightarrow \ldots\nonumber{} \end{align} \subsection{Computation of $H^1(Vect(X))_{\rm odd}$}\label{sec:ComputationH1Odd} \subsubsection{Summary of result}\label{sec:SummaryH1odd} We use the following segment of the long exact sequence: \begin{align} &H^0(\Gamma(TX/U))_{\rm even}\stackrel{\delta}{\longrightarrow}\nonumber{} \\ \stackrel{\delta}{\longrightarrow} &H^1(\Gamma(U))_{\rm odd} \longrightarrow H^1(Vect(X))_{\rm odd} \longrightarrow H^1(\Gamma(TX/U))_{\rm odd} \stackrel{\delta}{\longrightarrow}\nonumber{} \\ \stackrel{\delta}{\longrightarrow} &H^2(\Gamma(U))_{\rm even}\nonumber{} \end{align} The cohomology groups participating in this segment have the following description: \begin{align} H^0(\Gamma(TX/U))_{even} \;=\; &\mbox{${\bf C}\langle D, M_{mn} \rangle$ of Eq. (\ref{DandM})}\nonumber{} \\ H^1(\Gamma(U))_{odd}\;=\; &{\bf C}\left\langle (\lambda\Gamma^m\theta)(\theta\Gamma_m)_{\alpha}{\partial\over\partial\theta^{\beta}} \right\rangle\label{AnswerH1GUodd} \\ \left[\delta\;:\;H^{0}(\Gamma(TX/U))_{even} \longrightarrow H^1(\Gamma(U))_{odd}\right]\;=\; &\mbox{$0$ Section \ref{sec:DeltaH0evenH1odd}}\label{AnswerDeltaH0evenH1odd} \\ H^1(\Gamma(TX/U))_{odd} \;=\; &{\bf C} \left\langle (\lambda\Gamma^m\theta)\left(\lambda^{\alpha}{\partial\over\partial\lambda^{\alpha}}\right) \right\rangle\label{AnswerGammaTXoverUodd} \\ &\mbox{Section \ref{H1DerLambda}}\nonumber{} \\ \left[\delta\;:\;H^{1}(\Gamma(TX/U))_{odd} \longrightarrow H^2(\Gamma(U))_{even}\right]\;=\; &0\label{AnswerDeltaH1oddH2even} \end{align} This implies: \begin{align} H^1(Vect(X))_{\rm odd}\;=\; &H^1(\Gamma(U))_{\rm odd} \oplus H^1(\Gamma(TX/U))_{\rm odd}\;=\;\nonumber{} \\ \;=\; &{\bf C}\left\langle\; (\lambda\Gamma^m\theta)(\theta\Gamma_m)_{\alpha}{\partial\over\partial\theta^{\beta}} \;,\; (\lambda\Gamma^m\theta) \left( \lambda^{\alpha}{\partial\over\partial\lambda^{\alpha}} + \theta^{\alpha}{\partial\over\partial\theta^{\alpha}} \right) \;\right\rangle\label{AnswerH1VectXodd} \end{align} We will now explain the computation. \subsubsection{Computation}\label{sec:ComputationH1VectOdd} \paragraph{$\Gamma(TX/U)$}\label{sec:GammaTXU} The space $\Gamma(TX/U)$ is generated as an ${\cal O}(X)$-module, by the following vector fields: \begin{equation} D = \l ^\a \frac{\partial }{\partial \l ^\a } \ ,\quad M_{mn} = (\l {\gamma} _{mn})^\a \frac{\partial }{\partial \l ^\a } \label{DandM}\end{equation} However $\Gamma(TX/U)$ is \emph{not} a free ${\cal O}(X)$ module, because there is a relation: \begin{equation} \frac{1}{10} (\l {\gamma} ^{mn})^\a M_{mn} + \l ^\a D = 0 \end{equation} \paragraph{$\delta\;:\; H^0(\Gamma(TX/U))_{\rm even} \longrightarrow H^1(\Gamma(U))_{\rm odd}$}\label{sec:DeltaH0evenH1odd} It is zero because both $D$ and $M_{mn}$ can be extended to elements of $\mbox{Vect}(X)$ commuting with $Q^{(0)}$: \begin{align} D\mapsto &\lambda^{\alpha}{\partial\over\partial\lambda^{\alpha}} + \theta^{\alpha}{\partial\over\partial\theta^{\alpha}}\label{ExtensionOfD} \\ M_{mn} \mapsto &\left(\lambda\Gamma_{mn} {\partial\over\partial \lambda}\right) + \left(\theta\Gamma_{mn} {\partial\over\partial \theta}\right)\label{ExtensionOfM} \end{align} \paragraph{$H^1(\Gamma(TX/U))_{odd}$ and $\delta \;:\; H^1(\Gamma(TX/U))_{odd} \rightarrow H^2(\Gamma(U))_{even}$}\label{H1DerLambda} For any tensor $A^{lmn}$, consider vector fields of the form: \begin{equation} A^{l,mn} (\lambda\Gamma_{l}\theta) \left(\lambda\Gamma_m\Gamma_n {\partial\over\partial\lambda}\right) \label{ElementOfC1GTXU}\end{equation} Such vector fields generate $Z^1(\Gamma(TX/U))_{\rm odd}$. But some of them are $Q^{(0)}$-exact: \begin{equation} (\lambda\Gamma_{[l}\theta) \left(\lambda \Gamma_{m]}\Gamma_n {\partial\over\partial\lambda} \right) = {1\over 4}\left[ Q^{(0)}, (\theta\Gamma_{lm}\Gamma_p\theta)\left(\lambda \Gamma_p\Gamma_n {\partial\over\partial\lambda}\right) \right] \mbox{ \tt\small mod} \; \Gamma(U) \label{TrivialityOfC1GTXU}\end{equation} Therefore the vector fields of the form Eq. (\ref{ElementOfC1GTXU}) with $A^{lmn}$ of the form: \begin{equation} A^{l,mn} = X^{[lm]n} + Y^{l(mn)}\quad , \quad Y^{lmm} = 0 \label{AZeroInH}\end{equation} are zero in $H^1(\Gamma(TX/U))_{odd}$. This implies that $H^1(\Gamma(TX/U))_{odd}$ is generated by the vector fields of the form: \begin{equation} (\lambda\Gamma^i\theta)\left(\lambda^{\alpha}{\partial\over\partial\lambda^{\alpha}}\right) \label{LambdaThetaDilatation}\end{equation} A vector field of Eq. (\ref{ElementOfC1GTXU}) is zero in cohomology iff: \begin{equation} A^{l,lm} - A^{l,ml} - A^{m,ll} = 0 \label{ProjectionOnH1GTX}\end{equation} Vector fields of the form (\ref{LambdaThetaDilatation}) correspond to: \begin{align} &A^{l,mn} \;=\;{1\over 10}\delta_{il} \delta_{mn}\nonumber{} \\ &A^{l,lm} - A^{l,ml} - A^{m,ll} \;=\; -\delta_{im}\nonumber{} \end{align} Notice that the section of $\Gamma(TX/U)$ defined by Eq. (\ref{LambdaThetaDilatation}) can be extended to a $[Q^{(0)},\_]$-closed section of $TX$: \begin{equation} (\lambda\Gamma^m\theta) \left( \left(\lambda^{\alpha}{\partial\over\partial\lambda^{\alpha}}\right) + \left(\theta^{\alpha}{\partial\over\partial\theta^{\alpha}}\right) \right) \end{equation} This means that $\delta \;:\; H^1(\Gamma(TX/U))_{odd} \rightarrow H^2(\Gamma(U))_{even}$ is zero. Eq. (\ref{TrivialityOfC1GTXU}) has the following refinement: \begin{align} &(\lambda\Gamma_{[l}\theta) \left( \lambda \Gamma_{m]}\Gamma_n {\partial\over\partial\lambda} + \theta \Gamma_{m]}\Gamma_n {\partial\over\partial\theta} \right) \;=\;\label{DownToU} \\ \;=\; & {1\over 4}\left[ Q^{(0)}, (\theta\Gamma_{lm}\Gamma_p\theta) \left( \lambda \Gamma_p\Gamma_n {\partial\over\partial\lambda} + {1\over 3} \theta \Gamma_p\Gamma_n {\partial\over\partial\theta} \right) \right] - {1\over 6} (\theta\Gamma_p\lambda)\left(\theta\Gamma_p\Gamma_{lm}\Gamma_n{\partial\over\partial\theta}\right) \nonumber{} \end{align} \subsection{Computation of $H^1(\Gamma(TX))_{\rm even}$}\label{ComputationH1Even} \subsubsection{Summary of result}\label{sec:SummaryH1even} \begin{align} H^1(\mbox{Vect}(X))_{\rm even}\;=\; &{\bf C}\Big\langle (\lambda\Gamma^m\theta)\Gamma_{m\alpha\beta}\theta^{\beta} \left( \lambda\Gamma_{kl}{\partial\over\partial\lambda} + \theta\Gamma_{kl}{\partial\over\partial\theta} \right) \Big\rangle\label{AnswerH1VectXeven} \end{align} \subsubsection{Computation}\label{sec:ComputationH1even} We use the following segment of the long exact sequence: \begin{align} &H^0(\Gamma(TX/U))_{\rm odd}\stackrel{\delta}{\longrightarrow}\nonumber{} \\ \stackrel{\delta}{\longrightarrow} &H^1(\Gamma(U))_{\rm even} \longrightarrow H^1(Vect(X))_{\rm even} \longrightarrow H^1(\Gamma(TX/U))_{\rm even} \stackrel{\delta}{\longrightarrow}\nonumber{} \\ \stackrel{\delta}{\longrightarrow} &H^2(\Gamma(U))_{\rm odd}\nonumber{} \end{align} \paragraph{$H^0(\Gamma(TX/U))_{odd}$}\label{H0DerLambdaOdd} is generated by: \begin{equation} Z_{\alpha}^q = (\Gamma_p\theta)_{\alpha} \left(\lambda\Gamma^p\Gamma^q{\partial\over\partial\lambda}\right) \end{equation} \paragraph{$H^1(\Gamma(U))_{even}$}\label{H1GUEven} is generated by: \begin{equation} Y^m_{\alpha} = (\theta\Gamma^m\lambda) {\partial\over\partial \theta^{\alpha}} \end{equation} \paragraph{Computation of $\delta \;:\; H^{0}(\Gamma(TX/U))_{odd} \longrightarrow H^1(\Gamma(U))_{even}$}\label{sec:CoboundaryH0OddH1Even} \begin{align} \delta Z_{\alpha}^q\;=\; &(\Gamma_p\theta)_{\alpha} \left(\lambda\Gamma^p\Gamma^q{\partial\over\partial\theta}\right)\;=\;\nonumber{} \\ \;=\; &- (\theta\Gamma^p\lambda) \left(\Gamma_p\Gamma^q{\partial\over\partial\theta}\right)_{\alpha} \mbox{ mod } [Q^{(0)},\_] = - (\Gamma_m\Gamma^q)_{\alpha}^{\beta} Y^m_{\beta} \mbox{ mod } [Q^{(0)},\_]\label{CoboundaryH0OddH1Even} \end{align} The linear map $Y^q_{\alpha}\mapsto (\Gamma_m\Gamma^q)_{\alpha}^{\beta} Y^m_{\beta}$ is a bijection. More precisely: \begin{equation} \left\{ \lambda{\partial\over\partial\theta}\;,\; (\Gamma_p \theta)_{\alpha}\left( \theta\Gamma^p\Gamma^q{\partial\over\partial\theta} + 2 \lambda\Gamma^p\Gamma^q{\partial\over\partial\lambda} \right) \right\} = - \left(\Gamma_p\Gamma^q \;(\theta\Gamma^p\lambda) {\partial\over\partial\theta}\right)_{\alpha} \end{equation} \begin{align} & \left\{ \lambda{\partial\over\partial\theta}\;,\; \left( \delta^q_r\Gamma_p\theta - {1\over 10}\Gamma^q\Gamma_r\Gamma_p\theta \right)_{\alpha} \left( \theta\Gamma^p\Gamma^r{\partial\over\partial\theta} + 2 \lambda\Gamma^p\Gamma^r{\partial\over\partial\lambda} \right) \right\} \; = \nonumber{} \\ =\; & - 2 \left( \left( \delta^q_r - {1\over 10}\Gamma^q\Gamma_r \right) \;(\theta\Gamma^r\lambda) {\partial\over\partial\theta} \right)_{\alpha} \nonumber{} \end{align} \begin{align} & \left\{ \lambda{\partial\over\partial\theta}\;,\; {1\over 10}(\Gamma^q\Gamma_r\Gamma_p \theta)_{\alpha} \left( \theta\Gamma^p\Gamma^r{\partial\over\partial\theta} + 2 \lambda\Gamma^p\Gamma^r{\partial\over\partial\lambda} \right) \right\} \; = \nonumber{} \\ =\; & 8 \left( {1\over 10}\Gamma^q\Gamma_r \;(\theta\Gamma^r\lambda) {\partial\over\partial\theta} \right)_{\alpha} \nonumber{} \end{align} \begin{align} (\theta\Gamma^q\lambda){\partial\over\partial\theta^{\alpha}}\;=\; &\left\{ \lambda{\partial\over\partial\theta} \;,\; A^q_{\alpha} \right\} \nonumber{} \\ &\mbox{where}\nonumber{} \\ A^q_{\alpha}\;=\; &- {1\over 2} \left( \delta^q_r\Gamma_p\theta - {1\over 10}\Gamma^q\Gamma_r\Gamma_p\theta \right)_{\alpha} \left( \theta\Gamma^p\Gamma^r{\partial\over\partial\theta} + 2 \lambda\Gamma^p\Gamma^r{\partial\over\partial\lambda} \right) \;+ \nonumber{} \\ & + {1\over 80}(\Gamma^q\Gamma_r\Gamma_p \theta)_{\alpha} \left( \theta\Gamma^p\Gamma^r{\partial\over\partial\theta} + 2 \lambda\Gamma^p\Gamma^r{\partial\over\partial\lambda} \right)\;= \nonumber{} \\ =\; &- {1\over 2} \left( \delta^q_r\Gamma_p\theta - {1\over 8}\Gamma^q\Gamma_r\Gamma_p\theta \right)_{\alpha} \left( \theta\Gamma^p\Gamma^r{\partial\over\partial\theta} + 2 \lambda\Gamma^p\Gamma^r{\partial\over\partial\lambda} \right) \nonumber{} \end{align} Therefore $H^{0}(\Gamma(TX/U))_{odd}$ cancels with $H^1(\Gamma(U))_{even}$. \paragraph{Computation of $H^1(\Gamma(TX/U))_{\rm even}$ and vanishing of $\delta \;:\; H^1(\Gamma(TX/U))_{even} \rightarrow H^2(\Gamma(U))_{odd}$}\label{sec:ComputationgH1Even} \vspace{10pt} The space of cocycles $Z^1(\Gamma(TX/U))_{\rm even}$ is generated by: \begin{align} &[(\!(\lambda\theta)\!)\otimes\theta]^{1/2} D\nonumber{} \\ &[(\!(\lambda\theta)\!)\otimes\theta]^{1/2} M_{mn}\nonumber{} \end{align} where $D$ and $M_{mn}$ are from Eq. (\ref{DandM}). Since both $D$ and $M_{mn}$ extend to $[Q^{(0)},\_]$-closed sections of $TX$ by Eqs. (\ref{ExtensionOfD}) and (\ref{ExtensionOfM}), the coboundary operator $\delta \;:\; H^1(\Gamma(TX/U))_{even} \rightarrow H^2(\Gamma(U))_{odd}$ is zero. But some cocycles are exact. Indeed, as sections of $TX/U$: \begin{align} Q^{(0)} &\left( \Gamma_{pq}\Gamma_m\theta\, (\theta\Gamma_{kpq}\theta) \left(\lambda \Gamma^k\Gamma^m {\partial\over\partial\lambda}\right) \right) \;=\;\nonumber{} \\ \;=\; &-32 \Gamma_m\theta(\theta\Gamma^m\lambda) \left(\lambda{\partial\over\partial\lambda}\right) - 4\Gamma_n \Gamma_m \Gamma_q \theta (\theta \Gamma^q\lambda) \left(\lambda\Gamma^n\Gamma^m {\partial\over\partial\lambda}\right)\nonumber{} \end{align} \section{Coefficients of normal form satisfy wave equations}\label{WaveEquations} Modulo $F^4\mbox{Vect}$ we can choose the coordinates so that: \begin{align} Q_L\;=\; &\lambda_L{\partial\over\partial\theta_L} + (\!(\lambda_L\theta_L)\!)^mE^{Ln}_m{\partial\over\partial x^n} \;+\label{LeadingTermsOfQL1} \\ &+ \; (\!(\lambda_L\theta_L)\!)^m \left( \lambda_L {\Omega_L{}^L_L}_m \partial_{\lambda_L} + \theta_L {\Omega_L{}^L_L}_m \partial_{\theta_L} + \lambda_R {\Omega_L{}^R_R}_m \partial_{\lambda_R} + \theta_R {\Omega_L{}^R_R}_m \partial_{\theta_R} \right) \; +\label{LeadingTermsOfQL2} \\ &+ \; (\!(\lambda_L\theta_L\theta_L)\!) \left(P_{LL}{\partial\over\partial \theta_L} + P_{LR} {\partial\over\partial \theta_R}\right) \mbox{ mod }F^4\label{LeadingTermsOfQL} \\ Q_R\;=\; &\lambda_R{\partial\over\partial\theta_R} + (\!(\lambda_R\theta_R)\!)^mE^{Rn}_m{\partial\over\partial x^{n}}\;+\nonumber{} \\ &+ \; (\!(\lambda_R\theta_R)\!)^m \left( \lambda_R {\Omega_R{}^R_R}_m \partial_{\lambda_R} + \theta_R {\Omega_R{}^R_R}_m \partial_{\theta_R} + \lambda_L {\Omega_R{}^L_L}_m \partial_{\lambda_L} + \theta_L {\Omega_R{}^L_L}_m \partial_{\theta_L} \right) \; +\nonumber{} \\ &+ (\!(\lambda_R\theta_R\theta_R)\!) \left(P_{RL}{\partial\over\partial \theta_L} + P_{RR} {\partial\over\partial \theta_R}\right) \mbox{ mod } F^4\label{LeadingTermsOfQR} \end{align} where $E,\Omega,P$ are some functions of $x$. Indeed, using Section \ref{sec:FirstPage}: \begin{itemize}\item $H^1(C^{\rm fun}_L)_{\rm odd}\otimes {\partial\over\partial x}$ enters on Line (\ref{LeadingTermsOfQL1}),\item Second part of $H^1(C^{\rm vect}_L)_{\rm odd}$ (see Eq. (\ref{AnswerH1VectXodd})) and $H^1(C^{\rm fun}_L)_{\rm odd}\otimes H^0(C_R^{\rm vect})_{\rm even}$ on Line (\ref{LeadingTermsOfQL2}),\item First part of $H^1(C_L^{\rm vect})_{\rm odd}$ (see Eq. (\ref{AnswerH1VectXodd})) and $H^1(C_L^{\rm fun})_{\rm even}\otimes H^0(C_R^{\rm vect})_{\rm odd}$ on Line (\ref{LeadingTermsOfQL})\end{itemize} \subsection{Equations for tetrad and spin connection}\label{sec:EquationsForTetradAndSpinConnections} \subsubsection{Fixing $(so(10)\oplus {\bf C})_L$ and $(so(10)\oplus {\bf C})_R$}\label{sec:FixingFrame} Let us study the linearized order in deviations from flat space-time. In flat space-time $E^{L\mu}_m = E^{R\mu}_m = \delta^{\mu}_m$. The deviation from flatness can be written as: \begin{equation} E^{L\mu}_m = \delta^{\mu}_m + \delta^{\mu}_n e^{L}_{n,m} \quad \mbox{\tt\small and} \quad E^{R\mu}_m = \delta^{\mu}_m + \delta^{\mu}_n e^{R}_{n,m} \end{equation} where $e^L$ and $e^R$ are infinitesimal. We assume summation over repeated indices. We can choose a freedom of $so(10)\oplus {\bf C}$ redefinitions of both $(\lambda_L,\theta_L)$ and $(\lambda_R,\theta_R)$ to fix: \begin{align} &e^L_{[m,n]} = e^R_{[m,n]} \;=\; 0\label{BothEAreSymmetric} \\ &e^L_{m,m} = e^R_{m,m}\label{TraceELisTraceER} \end{align} At this point, the only remaining freedom in redefinition of $\lambda$ and $\theta$ is overall rescaling of $(\lambda_L,\lambda_R, \theta_L, \theta_R)$. We fixed both $(so(10)\oplus {\bf C})_L \oplus (so(10)\oplus {\bf C})_R$ down to the diagonal $\bf C$. \subsubsection{Fixing ${\Omega_L{}^L_L}$ and ${\Omega_R{}^R_R}$}\label{sec:FixingOmegaLLLandOmegaRRR} According to Section \ref{H1DerLambda}, we can choose: \begin{equation} {\Omega_L{}^L_L}_{m,lk} = {1\over 10}{\Omega_L{}^L_L}^{(s)}_m\delta_{lk} \label{FixingOmegaLLL}\end{equation} From $\{Q_L,Q_R\} = 0$, the coefficient of $(\!(\lambda_L\theta_L)\!)^l(\!(\lambda_R\theta_R)\!)^n \left( \lambda_L{\partial\over\partial\lambda_L} + \theta_L{\partial\over\partial\theta_L} \right) $, projected to $H^1(\Gamma(TX/U))$ (see Eq. (\ref{ProjectionOnH1GTX})): \begin{equation} 2\partial_m{\Omega_R{}^L_L}_{n,[ml]} - \partial_l{\Omega_R{}^L_L}_{n,mm} + \partial_n{\Omega_L{}^L_L}^{(s)}_l = 0 \label{OmegaLLLvsOmegaRLL}\end{equation} Similarly with $L\leftrightarrow R$: \begin{equation} 2\partial_m{\Omega_L{}^R_R}_{n,[ml]} - \partial_l{\Omega_L{}^R_R}_{n,mm} + \partial_n{\Omega_R{}^R_R}^{(s)}_l = 0 \label{OmegaRRRvsOmegaLRR}\end{equation} Eqs. (\ref{FixingOmegaLLL}) and (\ref{OmegaLLLvsOmegaRLL}) and similar equations with $L\leftrightarrow R$ determine ${\Omega_L{}^L_L}$ and ${\Omega_R{}^R_R}$ in terms of ${\Omega_R{}^L_L}$ and ${\Omega_L{}^R_R}$. Eqs. (\ref{OmegaLLLvsOmegaRLL}) and (\ref{OmegaRRRvsOmegaLRR}) guarantee the cancellation of the obstacle in $H^1(\Gamma(TX/U))_{\rm odd}$, \textit{i.e.} the one containing $\partial\over\partial\lambda$. It remains the coefficient of $(\lambda\Gamma^m\theta)(\theta\Gamma_m)_{\alpha}{\partial\over\partial\theta^{\beta}}$ (see Eq. (\ref{AnswerH1VectXodd})). This will cancel by $P_{LL}$ and $P_{RR}$, see Section \ref{EqsRRQLQR}. Let us denote: \begin{equation} \Omega^L_{m,nk} = - {\Omega_R{}^L_L}_{m,[nk]} + {1\over 2}{\Omega_R{}^L_L}_{m,pp}\delta_{nk} \end{equation} and similar definition for $\Omega^R_{m,nk}$ in terms of ${\Omega_L{}^R_R}$. This notation is useful, because for any vector $V_l$: \begin{equation} {\Omega_R{}^L_L}_{m,nk}V_l\left(\Gamma_n\Gamma_k\Gamma_l + \Gamma_l (\Gamma_n\Gamma_k)^T\right) \;=\; 4V_p \Omega^L_{m,pq} \Gamma_q \end{equation} From $\{Q_L,Q_R\} = 0$, the coefficient of $(\!(\lambda_L\theta_L)\!)^m(\!(\lambda_R\theta_R)\!)^n{\partial\over\partial x}$: \begin{align} {\partial\over\partial x^m}E^R_n + E^R_k\Omega^R_{m,kn} \;=\; &{\partial\over\partial x^n}E^L_m + E^L_k\Omega^L_{n,km}\nonumber{} \\ \partial_m e_{Rn,k} + \Omega^R_{m,nk} \;=\; &\partial_n e_{Lm,k} + \Omega^L_{n,mk}\nonumber{} \end{align} Equivalently: \begin{align} &\partial_{[m}(e_L + e_R)_{n],k} + \left(\Omega^L + \Omega^R\right)_{[m,n]k} = 0\label{TorsionZero} \\ &\partial_{(m}(e_L - e_R)_{n),k} + \left(\Omega^L - \Omega^R\right){}_{(m,n)k} = 0\label{AntiTorsionZero} \end{align} Eq. (\ref{TorsionZero}) is zero torsion of the ``average'' (\textit{i.e.} left plus right) connection. \subsubsection{Einstein equations}\label{sec:EinsteinEquations} Let us denote: \begin{align} g_{mn} \;=\; &e_{L(m,n)} + e_{R(m,n)}\nonumber{} \\ \Omega_{m,nk} \;=\; &{1\over 2}\left(\Omega^L + \Omega^R\right)_{m,nk}\nonumber{} \end{align} Then Eq. (\ref{TorsionZero}) implies the existence of $a_m$ such that: \begin{equation} \Omega_{m,nk} = - g_{m[n}\stackrel{\leftarrow}{\partial}_{k]} + a_m \delta_{nk} - 2 \delta_{m[n}a_{k]} \label{DefAm}\end{equation} Infinitesimal coordinate redefinition $\tilde{x}^{\mu} = x^{\mu} + \varepsilon v^{\mu}$, followed a compensating rotation of $\theta$ and $\lambda$ in order to preserve Eq. (\ref{BothEAreSymmetric}), corresponds to: \begin{align} \delta_v e_{Lm,k} \;=\; &\delta_v e_{Rm,k} = \partial_{(m} v_{k)}\nonumber{} \\ \delta_v \Omega_{m,nk} \;=\; &\partial_m(\partial_{[n}v_{k]})\nonumber{} \\ \delta{\Omega_L{}^L_L}^{(s)}_m \;=\; &2\partial_p \partial_{[p}v_{n]}\nonumber{} \end{align} The overall rescaling \begin{equation} \delta_{\gamma} (\lambda_L,\lambda_R, \theta_L, \theta_R) = (\gamma\lambda_L,\gamma\lambda_R, \gamma\theta_L, \gamma\theta_R) \label{rescalingGaugeTransformation}\end{equation} corresponds to: \begin{align} \delta_{\gamma} g_{m,n} \;=\; &2\gamma\delta_{mn}\label{RescalingG} \\ \delta_{\gamma} a_m \;=\; &-\partial_m\gamma\label{RescalingA} \\ \delta_{\gamma} \Omega_{m,nk} \;=\; &-\partial_m\gamma \delta_{nk}\label{RescalingO} \end{align} From $\{Q_L,Q_L\} = 0$ and $\{Q_R,Q_R\} = 0$ follows that ${\Omega_L{}^R_R}_m$ and ${\Omega_R{}^L_L}_m$ both satisfy Maxwell equations: \begin{equation} {\partial\over\partial x^n}{\partial\over\partial x^{[m}} {\Omega_L{}^R_R}_{n]pq} = {\partial\over\partial x^n}{\partial\over\partial x^{[m}} {\Omega_R{}^L_L}_{n]pq} = 0 \label{MaxwellEquations}\end{equation} Considering the scalar part, we conclude that $a_m$ satisfies the Maxwell equations: \begin{equation} \partial_m \partial_{[m}a_{n]} = 0 \end{equation} and $g_{mn}$ satisfies: \begin{align} &\partial_p\partial_{[p}g_{m][n}\stackrel{\leftarrow}{\partial}_{k]} + 2\partial_p \partial_{[p}\delta_{m][n}a_{k]} = 0\nonumber{} \\ \Rightarrow &\partial_k \left( 2\partial_{[p}g_{n][m}\stackrel{\leftarrow}{\partial}_{p]} + \partial_m a_n + \delta_{mn} \partial^pa_p \right) - (k\leftrightarrow n) = 0\label{CurlRicci} \\ \Rightarrow &\exists b_m\;:\; 2\partial_{[p}g_{n][m}\stackrel{\leftarrow}{\partial}_{p]} + \partial_m a_n + \delta_{mn} \partial^pa_p = - \partial_n b_m\nonumber{} \end{align} It follows from the symmetry $m\leftrightarrow n$ that exists $\phi$ such that $b_m = a_m - \partial_m\phi$. Therefore: \begin{equation} 2\partial_{[p}g_{n][m}\stackrel{\leftarrow}{\partial}_{p]} + \delta_{mn} \partial^p a_p + 2\partial_{(m}a_{n)} = \partial_m\partial_n\phi \label{EqWithAandPhi}\end{equation} The rescaling Eqs. (\ref{RescalingG}), (\ref{RescalingA}) and (\ref{RescalingO}) are accompanied by: \begin{equation} \delta_{\gamma} \phi = (10-4)\gamma \end{equation} With Eq. (\ref{CurlRicci}), the consistency of the sum of Eq. (\ref{OmegaLLLvsOmegaRLL}) and Eq. (\ref{OmegaRRRvsOmegaLRR}) requires, modulo zero modes: \begin{equation} \partial_{[m}a_{n]} = 0 \end{equation} and therefore $a_m$ can be gauged away: \begin{equation} a_m = 0 \end{equation} fixing the overall rescaling gauge symmetry of Eq. (\ref{rescalingGaugeTransformation}). \subsubsection{Antisymmetric tensor}\label{sec:AntisymmetricTensor} Eq. (\ref{AntiTorsionZero}) implies, after total symmetrization: \begin{equation} \partial_{(m}(e_L - e_R)_{n,k)} + \Omega^{L(s)}_{(m}\delta_{nk)} - \Omega^{R(s)}_{(m}\delta_{nk)} = 0 \label{SymmetrizedDEm}\end{equation} Modulo finite dimensional spaces, Eqs. (\ref{SymmetrizedDEm}), (\ref{AntiTorsionZero}) and (\ref{TraceELisTraceER}) imply that (\textit{cf} Eq. (\ref{GeneralEquationModuloDelta})): \begin{align} e_L - e_R \;=\; &0\nonumber{} \\ \Omega^{L(s)}_m - \Omega^{R(s)}_m \;=\; &0\label{DifferenceOfScalarConnections} \\ \left(\Omega^L - \Omega^R\right){}_{(m,n)k} \;=\; &0\nonumber{} \end{align} Therefore $\Omega^L - \Omega^R$ is antisymmetric: \begin{equation} \left(\Omega^L - \Omega^R\right)_{k,lm} = H_{klm} = H_{[klm]} \end{equation} Eqs. (\ref{MaxwellEquations}) imply: \begin{equation} \partial^p\partial_{[p}H_{q]mn} = 0 \label{MaxwellForH}\end{equation} The consistency of the difference of Eq. (\ref{OmegaLLLvsOmegaRLL}) and Eq. (\ref{OmegaRRRvsOmegaLRR}) implies that $H_{lmn}$ is harmonic: \begin{equation} \partial_p\partial^p H_{lmn} = 0 \end{equation} and, modulo a constant, divergenceless: \begin{equation} \partial^p H_{pmn} = 0 \label{DivHisZero}\end{equation} Then: \begin{equation} {\Omega_L{}^L_L}_l^{(s)} = {\Omega_R{}^R_R}_l^{(s)} = 2 \partial_l \phi - 2 \partial_{[l}g_{m]m} \end{equation} \subsection{Equations for bispinors}\label{sec:EquationsForRR} \subsubsection{Equations following from $\{Q_L,Q_R\}=0$}\label{EqsRRQLQR} Considering terms proportional to $(\!(\lambda_R\theta_R)\!)(\!(\lambda_L\theta_L\theta_L)\!){\partial\over\partial\theta_L}$ and similar terms with $L\leftrightarrow R$, we need to require that they cancel similar terms in Section \ref{sec:FixingOmegaLLLandOmegaRRR}. \begin{align} & {\partial\over\partial x^m} P_{RR}^{\hat{\alpha}\hat{\beta}} = {1\over 6}\partial_{[p} H_{qr]m}\Gamma_{pqr}^{\hat{\alpha}\hat{\beta}} + {2\over 3}\partial_m(\partial_l\phi - \partial_{[l}g_{p]p})\Gamma_l^{\hat{\alpha}\hat{\beta}} \nonumber{} \\ & {\partial\over\partial x^m} P_{LL}^{\alpha\beta} = - {1\over 6}\partial_{[p} H_{qr]m}\Gamma_{pqr}^{\alpha\beta} + {2\over 3}\partial_m(\partial_l\phi - \partial_{[l}g_{p]p})\Gamma_l^{\alpha\beta} \nonumber{} \end{align} This implies that modulo zero modes: \begin{align} &\partial_{[k}H_{lmn]} = 0\nonumber{} \\ & P_{RR}^{\hat{\alpha}\hat{\beta}} = {1\over 18}H_{klm}\Gamma_{klm}^{\hat{\alpha}\hat{\beta}} + {2\over 3}(\partial_l\phi - \partial_{[l}g_{p]p})\Gamma_l^{\hat{\alpha}\hat{\beta}} \nonumber{} \\ & P_{LL}^{\alpha\beta} = - {1\over 18}H_{klm}\Gamma_{klm}^{\alpha\beta} + {2\over 3}(\partial_l\phi - \partial_{[l}g_{p]p})\Gamma_l^{\alpha\beta} \nonumber{} \end{align} The antisymmetric tensor field $H_{lmn}$ should be identified with the field strength of the NSNS B-field: $H = dB$. Now consider the terms proportional to $(\!(\lambda_R\theta_R\theta_R)\!)(\!(\lambda_L\theta_L)\!){\partial\over\partial\theta_L}$: \begin{equation} (\!(\lambda_R\theta_R\theta_R)\!)_{\hat{\alpha}}\; \partial_m P_{RL}^{\hat{\alpha}\alpha}\; (\!(\lambda_L\theta_L)\!)^m{\partial\over\partial\theta_L^{\alpha}} \end{equation} It is cancelled by adding: \begin{equation} -{1\over 2} (\!(\lambda_R\theta_R\theta_R)\!)_{\hat{\alpha}}\; \partial_m P_{RL}^{\hat{\alpha}\alpha}\; \left( \delta^m_r\Gamma_p\theta - {1\over 8}\Gamma^m\Gamma_r\Gamma_p\theta \right)_{\alpha} \left( \theta_L\Gamma^p\Gamma^r{\partial\over\partial\theta_L} + 2 \lambda_L\Gamma^p\Gamma^r{\partial\over\partial\lambda_L} \right) \end{equation} leading to the extra term: \begin{equation} {1\over 3} (\!(\lambda_R\theta_R\theta_R)\!)_{\hat{\alpha}}\; \partial_m P_{RL}^{\hat{\alpha}\alpha}\; \left((4\delta_{mq} - \Gamma_m\Gamma_q)(\!(\lambda_L\theta_L\theta_L)\!)\right)_{\alpha}\; {\partial\over\partial x^q} \end{equation} There is a similar contribution with $R\leftrightarrow L$. For them to cancel each other, we need: \begin{align} &\Gamma^m_{\alpha\beta}\partial_m P_{RL}^{\hat{\alpha}\beta} = 0\nonumber{} \\ &\Gamma^m_{\hat{\alpha}\hat{\beta}}\partial_m P_{LR}^{\alpha\hat{\beta}} = 0\nonumber{} \\ &P_{LR}^{\alpha\hat{\alpha}} = P_{RL}^{\hat{\alpha}\alpha}\nonumber{} \end{align} \subsubsection{Equations for RR bispinor following from $\{Q_L,Q_L\}=0$}\label{EqsRRQLQL} To get $\{Q_L, Q_L\} = 0$ and $\{Q_R, Q_R\} = 0$ we need: \begin{align} &\Gamma^m_{\beta\alpha} {\partial\over\partial x^m} P_{LR}^{\alpha\hat{\alpha}} = 0\nonumber{} \\ &\Gamma^m_{\hat{\beta}\hat{\alpha}} {\partial\over\partial x^m} P_{RL}^{\alpha\hat{\alpha}} = 0\nonumber{} \end{align} \section{Fermionic fields}\label{FermionicFields} In Section \ref{WaveEquations} we restricted ourselves with $Q_L$ and $Q_R$ parameterized by \emph{even} functions $E^{L},E^{R},\ldots$. We will now add the terms parameterized by \emph{odd} functions. According to Section \ref{ComputationH1Even} these terms are: \begin{align} Q_L'\;=\; &\xi_{LRm}^{\hat{\beta}}(x) (\!(\lambda_L\theta_L)\!)^m {\partial\over\partial\theta_R^{\hat{\beta}}}\;+ (\!(\lambda_L\theta_L\theta_L)\!)_{\alpha} \psi_L^{\alpha\mu}(x) {\partial\over\partial x^{\mu}}\;+ \nonumber{} \\ &+\;{\Xi_L{}^L_L}^{\alpha [mn]}(x)(\!(\lambda_L\theta_L\theta_L)\!)_{\alpha} \left( \lambda_L\Gamma_{mn}{\partial\over\partial\lambda_L} + \theta_L\Gamma_{mn}{\partial\over\partial\theta_L} \right) \;+\nonumber{} \\ &+\;{\Xi_L{}^R_R}^{\alpha mn}(x)(\!(\lambda_L\theta_L\theta_L)\!)_{\alpha} \left( \lambda_R\Gamma_m\Gamma_n{\partial\over\partial\lambda_R} + \theta_R\Gamma_m\Gamma_n{\partial\over\partial\theta_R} \right) \;+\ldots\nonumber{} \end{align} \begin{align} Q_R'\;=\; &\xi_{RLm}^{\beta}(x) (\!(\lambda_R\theta_R)\!)^m {\partial\over\partial\theta_L^{\beta}}\;+ (\!(\lambda_R\theta_R\theta_R)\!)_{\hat{\alpha}} \psi_R^{\hat{\alpha}\mu}(x) {\partial\over\partial x^{\mu}}\;+ \nonumber{} \\ &+\;{\Xi_R{}^R_R}^{\hat{\alpha} [mn]}(x)(\!(\lambda_R\theta_R\theta_R)\!)_{\hat{\alpha}} \left( \lambda_R\Gamma_{mn}{\partial\over\partial\lambda_R} + \theta_R\Gamma_{mn}{\partial\over\partial\theta_R} \right) \;+\nonumber{} \\ &+\;{\Xi_R{}^L_L}^{\hat{\alpha} mn}(x)(\!(\lambda_R\theta_R\theta_R)\!)_{\hat{\alpha}} \left( \lambda_L\Gamma_m\Gamma_n{\partial\over\partial\lambda_L} + \theta_L\Gamma_m\Gamma_n{\partial\over\partial\theta_L} \right) \;+\ldots\nonumber{} \end{align} The first terms in both $Q_L'$ and $Q_R'$ are of grade 1, and the rest of the terms are of grade 3. \subsection{Grade 3 terms are determined by the grade 1 terms}\label{sec:Grade3AreFixed} Let us first assume that the grade 1 terms are zero, \textit{i.e} $\xi_{LRm}^{\hat{\beta}}(x)=0$ and $\xi_{RLm}^{\beta}(x)=0$. Considering the coefficient of $(\!(\lambda_L\theta_L\theta_L)\!)(\!(\lambda_R\theta_R)\!){\partial\over\partial x}$, we deduce that $\psi_L^{\alpha\mu}$ satisfies: \begin{equation} \partial^{\nu}\psi_L^{\alpha\mu} + 4{\Xi_L{}^R_R}^{\alpha [\nu\mu]} - 2{\Xi_L{}^R_R}^{\alpha mm} g^{\mu\nu} = 0 \end{equation} and a similar equation for $\psi_R^{\hat{\alpha}\mu}$. This implies (see Section \ref{FiniteDimensionalSolutions}) that modulo finite dimensional subspaces (which we ignore): \begin{align} \psi_L^{\alpha\mu} \;=\; &0\nonumber{} \\ {\Xi_L{}^R_R}^{\alpha \nu\mu} \;=\; &0\nonumber{} \\ \psi_R^{\hat{\alpha}\mu} \;=\; &0\nonumber{} \\ {\Xi_R{}^L_L}^{\hat{\alpha} \nu\mu} \;=\; &0\nonumber{} \end{align} The coefficients $\xi^{\hat{\alpha}}_{LRm}$ and $\xi_{RLm}^{\alpha}$ come with gauge transformations: \begin{align} \delta_{\phi_L}\xi_{LRm}^{\hat{\alpha}}\;=\; &\partial_m \phi_L^{\hat{\alpha}}\nonumber{} \\ \delta_{\phi_R}\xi_{RLm}^{\alpha}\;=\; &\partial_m \phi_R^{\alpha}\nonumber{} \end{align} Considering the coefficient of $(\!(\lambda_L\theta_L\theta_L)\!)(\!(\lambda_R\theta_R)\!) \left(\lambda_L{\partial\over\partial\lambda_L} + \theta_L{\partial\over\partial\theta_L}\right)$, we conclude that ${\Xi_L{}^L_L}^{\alpha [mn]}$ (and similarly ${\Xi_R{}^R_R}^{\hat{\alpha} [mn]}$) are constants, and we ignore them. \subsection{Grade 1 terms}\label{sec:Grade1Terms} \subsubsection{Requiring $Q_L^2 = 0$}\label{sec:FermionicQLQL} Requiring $Q_L^2 = 0$, the ``Maxwell bishop move'': \begin{align} &\xi_{LRm}^{\hat{\beta}}(x)(\!(\lambda_L\theta_L)\!)^m \stackrel{(\!(\lambda_L\theta_L)\!)\partial_x}{\longrightarrow} \partial_n\xi_{LRm}^{\hat{\beta}}(x)(\!(\lambda_L\theta_L)\!)^m(\!(\lambda_L\theta_L)\!)^n \stackrel{(\lambda_L\partial_{\theta_L})^{-1}}{\longrightarrow} \ldots \stackrel{(\!(\lambda_L\theta_L)\!)\partial_x}{\longrightarrow}\nonumber{} \\ \longrightarrow &\partial^n\partial_{[n}\xi_{LRm]}^{\hat{\beta}}(x)(\!(\lambda_L\theta_L)\!)^p(\!(\lambda_L\theta_L)\!)^q(\!(\theta_L\theta_L)\!)^{pqm}\nonumber{} \end{align} we conclude that $\xi_{LR}$ (and similarly $\xi_{RL}$) should satisfy the Maxwell equations: \begin{equation} \partial_m \partial_{[m}\xi_{LRn]} = 0 \end{equation} \subsubsection{Requiring $\{Q_L,Q_R\} = 0$}\label{sec:FermionicQLQR} We will now consider the anticommutator of $Q_R'$ with $Q_L$. It is convenient to start by completing $\partial\over\partial\theta_L^{\beta}$ to ${\partial\over\partial\theta_L^{\beta}} - (\Gamma^m\theta_L)_{\beta}{\partial\over\partial x^m}$. We have: \begin{align} & \left\{\; \lambda_L{\partial\over\partial\theta_L} + (\lambda_L\Gamma^m\theta_L){\partial\over\partial x^m} \;,\; (\lambda_R\Gamma^n\theta_R) \xi_{RLn}^{\beta}\left( {\partial\over\partial\theta_L^{\beta}} - (\Gamma^k\theta_L)_{\beta}{\partial\over\partial x^k} \right) \;\right\}\;= \nonumber{} \\ \;=\; &(\lambda_R\Gamma^n\theta_R) {\partial\xi_{RLn}^{\beta} \over\partial x^m} (\lambda_L\Gamma^m\theta_L) \left( {\partial\over\partial\theta_L^{\beta}} - (\Gamma^k\theta_L)_{\beta}{\partial\over\partial x^k} \right)\nonumber{} \end{align} The term $(\lambda_R\Gamma^n\theta_R){\partial\xi_{RLn}^{\beta} \over\partial x^m}(\lambda_L\Gamma^m\theta_L){\partial\over\partial\theta_L^{\beta}}$ is removed by further modifying (\textit{cp} Eq. (\ref{CoboundaryH0OddH1Even})): \begin{equation} (\theta_R\Gamma^k\lambda_R)\;\xi_{RLk}^{\beta} \left[ {\partial\over\partial\theta_L^{\beta}} - (\Gamma^n\theta_L)_{\beta}{\partial\over\partial x^n} \right] \end{equation} to: \begin{align} &(\theta_R\Gamma^k\lambda_R)\xi_{RLk}^{\beta} \left[ {\partial\over\partial\theta_L^{\beta}} - (\Gamma^n\theta_L)_{\beta}{\partial\over\partial x^n} \right]\;+\nonumber{} \\ &+ {1\over 2}(\theta_R\Gamma^k\lambda_R){\partial\xi_{RLk}^{\alpha}\over\partial x^m} \left( \left(\delta_{mn} - {1\over 8}\Gamma_m\Gamma_n\right) \Gamma_p\theta_L \right)_{\alpha} \left[ 2\lambda_L \Gamma_p\Gamma_n {\partial\over\partial\lambda_L} +\theta_L \Gamma_p\Gamma_n {\partial\over\partial\theta_L} \right]\nonumber{} \end{align} Then, when we commute with $(\lambda_l\Gamma^m\theta_L){\partial\over\partial x^m}$, this modification produces: \begin{equation} {1\over 2}(\theta_R\Gamma^k\lambda_R){\partial\xi_{RLk}^{\alpha}\over\partial x^m} \left( \left(\delta_{mn} - {1\over 8}\Gamma_m\Gamma_n\right) \Gamma_p\theta_L \right)_{\alpha} (2(\lambda_L \Gamma_p\Gamma_n \Gamma_q\theta_L) + (\theta_L \Gamma_p\Gamma_n \Gamma_q\lambda_L)) {\partial\over\partial x^q} \end{equation} which should cancel $-(\lambda_R\Gamma^k\theta_R){\partial\xi_{RLk}^{\alpha} \over\partial x^m}(\lambda_L\Gamma^m\theta_L)(\Gamma^q\theta_L)_{\alpha}{\partial\over\partial x^q}$. Indeed, let us denote: \begin{equation} A^{mq}_{\alpha} \;=\; - (\lambda_L\Gamma^m\theta_L)(\Gamma^q\theta_L)_{\alpha} \; + \; {1\over 2}\left( \left(\delta_{mn} - {1\over 8}\Gamma_m\Gamma_n\right) \Gamma_p\theta_L \right)_{\alpha} \left(2 (\lambda_L \Gamma_p\Gamma_n \Gamma_q\theta_L) + (\theta_L \Gamma_p\Gamma_n \Gamma_q\lambda_L)\right) \end{equation} The total contribution is: \begin{equation} (\theta_R\Gamma^k\lambda_R){\partial\xi_{RLk}^{\alpha}\over\partial x^m}A_{\alpha}^{mq}{\partial\over\partial x^q} \label{TotalContributionToCancel}\end{equation} We observe: \begin{equation} \lambda_L{\partial\over\partial\theta_L} A^{mq}_{\alpha} = 0 \end{equation} In fact: \begin{equation} A^{mq}_{\alpha} \;=\; {1\over 3} \left(\left( 4\delta_{mq} - \Gamma_m \Gamma_q \right)\Gamma_p\theta_L\right)_{\alpha} (\lambda_L\Gamma_p\theta_L) + \lambda_L{\partial\over\partial\theta_L}(\ldots) \end{equation} To cancel Eq. (\ref{TotalContributionToCancel}) we must impose the Dirac equation on $\xi^{\alpha}_{RLk}$, in the following sense. Require that exists $\eta_{RL\alpha}$ such that: \begin{equation} \Gamma^p_{\alpha\beta}{\partial\over\partial x^p}\xi_{RLk}^{\beta} = {\partial\over\partial x^k} \eta_{RL\alpha} \end{equation} Then we cancel Eq. (\ref{TotalContributionToCancel}) by choosing \begin{align} \psi_L^{\alpha q} \;=\; &{1\over 3}\Gamma_q^{\alpha\beta} \eta_{RL\beta} + {4\over 3}\xi^{\alpha}_{RLq}\nonumber{} \\ {\Xi_L{}^R_R}^{\alpha mq}(x) \;=\; &{4\over 3}\partial_{[m}\xi_{RLq]}^{\alpha}\nonumber{} \end{align} To summarize: \begin{align} Q_L' \;=\; &(\!(\lambda_L\theta_L)\!)^m\xi_{LRm}^{\hat{\beta}}(x) \left( {\partial\over\partial\theta_R^{\hat{\beta}}} - (\Gamma^n\theta_R)_{\hat{\beta}} {\partial\over\partial x^n} \right)\;+ \nonumber{} \\ &+\;(\!(\lambda_L\theta_L)\!)^k{\partial \xi_{LRk}^{\hat{\beta}}\over\partial x^m} \left( \left(\delta_{mn} - {1\over 8}\Gamma_m\Gamma_n\right) \Gamma_p\theta_R \right)_{\alpha} \left[ 2\lambda_R \Gamma_p\Gamma_n {\partial\over\partial\lambda_R} +\theta_R \Gamma_p\Gamma_n {\partial\over\partial\theta_R} \right] +\; \nonumber{} \\ & +\;(\!(\lambda_L\theta_L\theta_L)\!)_{\alpha} \psi_L^{\alpha\mu}(x) {\partial\over\partial x^{\mu}} \;+\; \partial_{[n}\xi_{LRm]}^{\hat{\beta}}(x)[\theta_R^3\lambda_R]^{[mn]} \left( {\partial\over\partial\theta_R^{\hat{\beta}}} - (\Gamma^n\theta_R)_{\hat{\beta}} {\partial\over\partial x^n} \right) \;+ \nonumber{} \\ &+\;{\Xi_L{}^L_L}^{\alpha [mn]}(x)(\!(\lambda_L\theta_L\theta_L)\!)_{\alpha} \left( \lambda_L\Gamma_{mn}{\partial\over\partial\lambda_L} + \theta_L\Gamma_{mn}{\partial\over\partial\theta_L} \right) \;+\nonumber{} \\ &+\;{\Xi_L{}^R_R}^{\alpha mn}(x)(\!(\lambda_L\theta_L\theta_L)\!)_{\alpha} \left( \lambda_R\Gamma_m\Gamma_n{\partial\over\partial\lambda_R} + \theta_R\Gamma_m\Gamma_n{\partial\over\partial\theta_R} \right) \;+\ldots\nonumber{} \end{align} and a similar formula for $Q_R'$. \subsection{Comparison to SUGRA}\label{sec:ComparisonToSUGRA} The only fermionic superfields of \cite{Berkovits:2001ue} are $C^{\alpha\hat{\gamma}}_{\beta}$ and $C^{\hat{\alpha}\gamma}_{\hat{\beta}}$. The top component of $C^{\alpha\hat{\gamma}}_{\beta}$ corresponds to $\partial_{[m}\xi^{\hat{\gamma}}_{LRn]}(\Gamma^{mn})^{\alpha}_{\beta}$, and the top component of $\hat{C}^{\hat{\alpha}\gamma}_{\hat{\beta}}$ to $\partial_{[m}\xi^{\gamma}_{RLn]}(\Gamma^{mn})^{\hat{\alpha}}_{\hat{\beta}}$. \section{Supersymmetries and dilatation}\label{SUSY} The vector field $Q^{\rm flat}$ of Eq. (\ref{QFlat}) is manifestly supersymmetry-invariant. In other words, it commutes with the super-Poincare algebra, which is generated by ${\partial\over\partial \theta_L^{\alpha}} - \Gamma^m_{\alpha\beta}\theta_L^{\beta} {\partial\over\partial x^m}$ and ${\partial\over\partial \theta_R^{\hat{\alpha}}} - \Gamma^m_{\hat{\alpha}\hat{\beta}}\theta_R^{\hat{\beta}} {\partial\over\partial x^m}$. It is also invariant under dilatations, if we define the weight of $x$ to be twice the weight of $\theta_L$, $\theta_R$. It is perhaps less straightforward to see that there are no other symmetries. For example, there are no conformal symmetries. (But the dilatation symmetry is present.) We will now prove that there are no other symmetries. We have to compute the cohomology of $Q^{\rm flat}$ in the space of vector fields of ghost number $0$. The cohomology of $\lambda_L^{\alpha}{\partial\over\partial\theta_L^{\alpha}} + \lambda_R^{\hat{\alpha}}{\partial\over\partial\theta_L^{\hat{\alpha}}}$ at the ghost number $0$ is (see Section \ref{CohomologyQ0}): \begin{align} T_m \;=\; &\partial\over\partial x^m\nonumber{} \\ S^L_{\alpha} \;=\; &\partial\over\partial \theta_L^{\alpha}\nonumber{} \\ S^R_{\hat{\alpha}} \;=\; &\partial\over\partial \theta_R^{\hat{\alpha}}\nonumber{} \\ D^L\;=\; &\lambda_L^{\alpha}{\partial\over\partial\lambda_L^{\alpha}} + \theta_L^{\alpha}{\partial\over\partial\theta_L^{\alpha}}\nonumber{} \\ M^L_{mn} \;=\; &\left(\lambda_L\Gamma_{mn} {\partial\over\partial \lambda_L}\right) + \left(\theta_L\Gamma_{mn} {\partial\over\partial \theta_L}\right)\nonumber{} \\ D^R\;=\; &\lambda_R^{\hat{\alpha}}{\partial\over\partial\lambda_R^{\hat{\alpha}}} + \theta_R^{\hat{\alpha}}{\partial\over\partial\theta_R^{\hat{\alpha}}}\nonumber{} \\ M^R_{mn} \;=\; &\left(\lambda_R\Gamma_{mn} {\partial\over\partial \lambda_R}\right) + \left(\theta_R\Gamma_{mn} {\partial\over\partial \theta_R}\right)\nonumber{} \end{align} This means that any infinitesimal symmetry can be brought to the form: \begin{align} v\;=\; &T^m(x){\partial\over\partial x^m} +\nonumber{} \\ &+\; D_L(x)\left( \lambda_L^{\alpha}{\partial\over\partial\lambda_L^{\alpha}} + \theta_L^{\alpha}{\partial\over\partial\theta_L^{\alpha}} \right) + M_L^{mn}(x)\left( \left(\lambda_L\Gamma_{mn} {\partial\over\partial \lambda_L}\right) + \left(\theta_L\Gamma_{mn} {\partial\over\partial \theta_L}\right) \right) +\nonumber{} \\ &+\; D_R(x)\left(\lambda_R^{\hat{\alpha}}{\partial\over\partial\lambda_R^{\hat{\alpha}}} + \theta_R^{\hat{\alpha}}{\partial\over\partial\theta_R^{\hat{\alpha}}} \right) + M_R^{mn}(x)\left( \left(\lambda_R\Gamma_{mn} {\partial\over\partial \lambda_R}\right) + \left(\theta_R\Gamma_{mn} {\partial\over\partial \theta_R}\right) \right) +\nonumber{} \\ &+\; S_L^{\alpha}(x){\partial\over\partial \theta_L^{\alpha}} + S_R^{\hat{\alpha}}(x){\partial\over\partial \theta_R^{\hat{\alpha}}}\;+\ldots\nonumber{} \end{align} where $\ldots$ stand for terms of the higher order in the grading defined by Eq. (\ref{GradingOperator}). Commuting $v$ with $\left( (\!(\lambda_L\theta_L)\!)^m + (\!(\lambda_R\theta_R)\!)^m \right){\partial\over\partial x^m}$, we have to cancel the coefficients of all generators of $[Q^{(0)}_L + Q^{(0)}_R\,,\,\_]$ (see Section \ref{sec:FirstPage}). The vanishing of the coefficient of $(\!(\lambda_R\theta_R)\!)^m \left( \lambda_L^{\alpha}{\partial\over\partial\lambda_L^{\alpha}} + \theta_L^{\alpha}{\partial\over\partial\theta_L^{\alpha}} \right)$ implies that $D_L(x) = D_{L0}$ (constant in $x$). Similarly, $M^{mn}_L (x) = M^{mn}_{L0}$, $D_R(x) = D_{R0}$, $M^{mn}_R (x) = M^{mn}_{R0}$. The vanishing of the coefficient of $(\!(\lambda_L\theta_L)\!)^m {\partial\over\partial x^n}$ and $(\!(\lambda_R\theta_R)\!)^m {\partial\over\partial x^n}$ imply: \begin{align} &D_{L0} = D_{R0}\;=:D_0\nonumber{} \\ &M_{L0}^{mn} = M_{R0}^{mn}\;=:M_0^{mn}\nonumber{} \\ &T^m(x) = T^m_0 + 2D_{0}x^m + M_{0}^{mn} x^n\nonumber{} \end{align} The vanishing of the coefficients of $(\!(\lambda_R\theta_R)\!){\partial \over\partial\theta_L}$ and $(\!(\lambda_L\theta_L)\!){\partial \over\partial\theta_R}$ imply $S_L^{\alpha}(x) = S_{L0}^{\alpha}$ and $S_R^{\hat{\alpha}}(x) =S_{R0}^{\hat{\alpha}}$ (do not depend on $x$). \section{Acknowledgments}\label{Acknowledments} This work was supported in part by ICTP-SAIFR FAPESP grant 2016/01343-7, and in part by FAPESP grant 2019/21281-4. We want to thank Nathan Berkovits and Andrey Losev for useful discussions.
\section{Introduction} As per the current understanding, there exist two accelerating epochs in the evolutionary history of the Universe. The first one is the early inflation driven possibly by a scalar field. The second is the late acceleration in the current epoch in which dark energy is the dominant component. The transient stage between these accelerated expansions consists of a radiation-dominated epoch followed by a matter-dominated one \cite{bjorken2003cosmology}. So far, we do not have an entirely consistent theory that explains the sequential emergence of all these epochs. The inflation stage is characterized by a constant Hubble parameter $H_I$. In contrast, the end accelerated epoch is characterized by another constant, say $\Lambda$, called the cosmological constant, extremely small compared to $H_I.$ The standard $\Lambda$CDM model is very successful in explaining the late acceleration \cite{bahcall1999cosmic, copeland2006dynamics, 1999ApJ...517..565P, 1998AJ....116.1009R}. However it fails to explain the little value of the so-called cosmological constant. The cosmological constant problem and the coincidence problem (why the dark energy density and dark matter density are comparable to each other in the current epoch \cite{Papagiannopoulos2020, Sola:2013gha, weinberg1989cosmological, padmanabhan2003cosmological}) indicate that the rigid nature of the cosmological constant in the entire evolutionary history of the Universe may not be satisfactory. Understanding this issue from a fundamental principle is an important challenge in physics. This leads to the proposal of dynamical dark energy models by many \cite{lima2013expansion, peracaula2018dynamical, gomez2015dynamical,sola2015hints,george2016holographic}, mainly in the late acceleration context. There are attempts in the literature to connect the early inflation and the late accelerated epoch. For instance, a particular approach based on particle production is presented in reference \cite{Nunes:2016eab}. Another exciting work considers the coupling between a decaying vacuum with radiation and matter \cite{Fay:2014fta, tsiapi2019testing, amendola2000coupled, del2008toward, sharov2017new}. A unification of early inflation and late acceleration was proposed using modified gravity theory \cite{PhysRevD.68.123512, nojiri2003modified}. Recently Joan Sola et al. \cite{Sola:2015rra} proposed a novel class of dynamical vacuum energy models which accounts for the the radiation dominated era and subsequent matter dominated epoch and also that for the late accelerating phase are solved separately, using different approximated forms for Hubble parameter-dependent vacuum energy density. In the present work, we solve for a most general common solution by using the Hubble parameter-dependent varying vacuum energy, which represents a smooth transition of the Universe through subsequent stages from the early inflation. So far up to recently, there is no such constructive effort to find a common solution that could represent both the early inflationary solution and the subsequent epochs up to the end de Sitter epoch. We assume vacuum energy density, modeled as a power series of the Hubble function \cite{Papagiannopoulos2020, shapiro2002scaling, sola2011cosmologies, sola2013cosmological, sola2014vacuum,john2000generalized} and derive a general solution for the Hubble parameter, which allows getting a complete cosmological scenario with a spacetime emerging from an initial de Sitter stage, subsequently evolving into the radiation, matter, and dark energy dominated epochs, which ultimately end to another de Sitter epoch. we define finite boundaries for the Universe, with reference to the model proposed by T. Padmanabhan. \cite{Padmanabhan_2012} by considering the evolution of primordial perturbation wavelength. \section{General Solution and Asymptotic Epochs} The Friedmann equations which explain the evolution of the Universe can be written as, \begin{equation} \label{eqn:h01} 3H^2 = 8\pi G(\rho_m+\rho_{\Lambda}), \end{equation} \begin{equation} 2\dot{H} + 3H^2 = -8\pi G(\omega_m\rho_m+\omega_{\Lambda}\rho_{\Lambda}). \end{equation} The over dot represents the derivative with respect to time. Combining equations (1) and (2), we get, \begin{equation} \dot{H} + 4\pi G(1+\omega_m)\rho_m + 4\pi G(1+\omega_{\Lambda})\rho{\Lambda}= 0. \end{equation} Assuming the equation of state for the vacuum energy density as $\omega_{\Lambda}=-1$, we obtain, \begin{equation} \dot{H} + 4\pi G(1+\omega_m)\rho_m = 0. \end{equation} Using equation (1), the above equation takes the form, \begin{equation} \label{eqn:H123} \dot{H} + \frac{3}{2}(1+\omega_m)H^2 = 4\pi G(1+\omega_m)\rho_{\Lambda}. \end{equation} The Renormalisation group approach allows us to consider vacuum energy density as a dynamical quantity \cite{shapiro2005running}. In the cosmic scenario, the vacuum energy's dynamical nature is inherited from its dependence on the apt cosmic variable, the Hubble parameter, $H(t).$ The general covariance of the corresponding effective action restricts the power of the cosmic variable to appear in the dark energy density to an even number. In this model, we assume the vacuum energy density depends on $H^2$ and $H^4.$ The general form of the vacuum energy density can be written as \cite{Sola:2015rra}, \begin{equation} \label{eqn:rho2} \rho_{\Lambda}(H) = \frac{3}{8\pi G}\left(c_0 + \nu H^2 + \frac{H^4}{H_I^2}\right). \end{equation} In this equation, $c_0$ is a bare cosmological constant that dominates at low energy condition like the one persisted during the Universe's current epoch and the Hubble parameter is close to its present value, $H_0$. The successive terms will give the running status to this density. The parameter $\nu$ is a dimensionless coefficient and is an analog of the $\beta$ function coefficient appearing in the effective action of quantum field theory in curved space time. The last term proportional to $H^4$ has got relevance only in the early epoch of the Universe, the inflationary stage. The constant term $H_I$ is thus equivalent to the constant Hubble parameter during the early inflationary epoch of the Universe. The third term doesn't contain any additional parameter like $\nu$ as in the second term, since any additional parameter which can be proposed will naturally be absorbed into $H_I.$ This equation of the vacuum energy density will give insight into the connection between the early inflation and the late acceleration. Substituting equation (\ref{eqn:rho2}) in to (\ref{eqn:H123}), we obtain, \begin{equation} \label{eqn:h1} \dot{H} = \frac{3}{2}(1+\omega_m)c_0 - \frac{3}{2}(1+\omega_m)(1-\nu)H^2+\frac{3}{2}(1+\omega_m)\frac{H^4}{H_I^2}. \end{equation} By changing variable from time to scale factor, the equation become easier to handle, thus we have, \begin{equation} aH\frac{dH}{da} = \frac{3}{2}(1+\omega_m)c_0 - \frac{3}{2}(1+\omega_m)(1-\nu)H^2+\frac{3}{2}(1+\omega_m)\frac{H^4}{H_I^2}. \end{equation} On integrating, we obtain Hubble parameter as, \begin{equation} \label{eqn:H2} H(a) = (1-\nu)^\frac{1}{2}H_I\left(\frac{H_0^2- \frac{C_0}{1-\nu} + \frac{C_0}{1-\nu} a^{3(1+\omega_m)(1-\nu)}}{H_0^2 - \frac{C_0}{1-\nu} + (1-\nu)H_I^2 a^{3(1+\omega_m)(1-\nu)}}\right)^\frac{1}{2}. \end{equation} This solution represents the smooth evolution history of the Universe from the early inflationary phase up to the end de Sitter epoch. In the limit $a\rightarrow 0$, corresponding to the very early epoch, the Hubble parameter would attain a constant value, $H \sim (1-\nu)^\frac{1}{2}H_I$ and is corresponding to the early inflationary phase of the Universe. In the extreme future limit of $a \to \infty,$ the term $(H_0^2 - c_0/(1-\nu))$ in the denominator and the numerator will be negligible, as a result the Hubble parameter takes the form, $H \sim \left(\frac{c_0}{1-\nu}\right)^{(1/2)}$, and it corresponds to the end de Sitter epoch. Between these two accelerating epochs, the Universe has undergone two transient epochs, first the radiation dominated, and then the matter dominated phase, at each phases the respective Hubble parameters will vary as the Universe expands. \par To explicitly bring the transient epochs, we use the appropriate equation of state. Due to the small value of the bare constant $c_0$ (which is equivalent to the late cosmological constant responsible for the late acceleration), it has no relevance in the early stage. Then, on omitting terms containing $c_0,$ the Hubble parameter in equation(\ref{eqn:H2}) will takes the form, \begin{equation} \label{eqn:H4} H \to (1-\nu)^{1/2} H_I\left(\frac{H_0^2 }{H_0^2 + (1-\nu)H_I^2 a^{3(1+\omega_m)(1-\nu)}}\right)^\frac{1}{2}. \end{equation} Then in the very early epoch Hubble parameter assumes the form $H \sim \sqrt{(1-\nu)}H_I$ corresponding to the inflationary epoch. After inflation, the Universe would have expanded many times large so that the Hubble parameter evolves as equation (\ref{eqn:H4}) and the Universe is in the radiation dominated era, with equation of state, $\omega_m= 1/3.$ \par We will now consider the next prominent epochs, the matter dominated era and late accelerated epoch, during which the most relevant constant is $c_0$ rather than $H_I.$ Thus by putting $\omega_m = 0$ in equation (\ref{eqn:H2}), we obtain, \begin{equation} \label{eqn:H10} H =\left[\frac{H_0^2-\frac{c_0}{1-\nu} + (\frac{c_0}{1-\nu})a^{3(1-\nu)}}{\left(\frac{H_0^2-\frac{c_0}{1-\nu}}{(1-\nu)H_I^2}\right) + a^{3(1-\nu)}}\right]^\frac{1}{2}. \end{equation} During this period, $\left(\frac{H_0^2-\frac{c_0}{1-\nu}}{(1-\nu)H_I^2}\right) << a^{3(1-\nu)}.$ The term involving $H_I^2$ in the denominator of the above equation is not relevant so the equation (\ref{eqn:H10}) reduces to \begin{equation} \label{eqn:H11} H = \left[\left(H_0^2-\frac{c_0}{1-\nu}\right) a^{-3(1-\nu)} + \left(\frac{c_0}{1-\nu}\right)\right]^\frac{1}{2} \end{equation} In the asymptotic limit $a \to \infty$ which the Hubble parameter become, $H \sim \left(\frac{c_0}{1-\nu}\right)^\frac{1}{2},$ which is corresponding to the end de Sitter epoch. For the period prior to this, the matter dominated epoch, the first term in the RHS of the above equation become the dominant one, and the result is a decelerated expansion. This guarantees the transition into the late accelerating epoch from a matter dominated decelerated epoch. The consistency of this form of the Hubble parameter can be checked by assuming $a=a_0=1$, corresponding to the current epoch and it will result in to $H = H_0, $ representing the Hubble parameter value in the present time. \par The energy densities at these two successive early epochs can be obtained from the simple Friedman equation $\rho \sim 3H^2$ respectively. The equation (\ref{eqn:H4}) can be re-written as \begin{equation} \label{eqn:H15} H \to H_I\left(\frac{(1-\nu)H_0^2 }{H_0^2 + (1-\nu)H_I^2 a^{3(1+\omega_m)(1-\nu)}}\right)^\frac{1}{2}. \end{equation} After inflation the Universe will attain size many times large compared to pre-inflationary period. Hence the scale factor $a$ would be relatively very large in post inflationary era compared to the prior inflationary phase. Hence it is possible to take a local condition, the above equation can be suitable approximated, by considering the transition from early inflation to the consequent radiation dominated epoch. This leads to the standard form of the Hubble parameter as, \begin{equation} \label{eqn:H06} H\rightarrow H_0 a^{-2(1-\nu)}. \end{equation} This otherwise implies that the radiation density will evolve as, $\rho_{\gamma} \sim H_0^2 a^{-4(1-\nu)}.$ \par Now, let us consider the evolution of the energy densities during these early period of inflation-radiation epochs. The vacuum energy density, by neglecting $c_0$ from equation (\ref{eqn:rho2}) which is not relevant in the initial de-Sitter to radiation dominated phase, and substituting for $H$ using equation (\ref{eqn:H15}), can be expressed as \begin{equation} \label{eqn:rho4} \rho_{\Lambda}(H) = \rho_{\Lambda_i}\left[\frac{1+\nu(1-\nu)\frac{H_I^2}{H_0^2}a^{4(1-\nu)}}{\left(1+(1-\nu)\frac{H_I^2}{H_0^2}a^{4(1-\nu)}\right)^2}\right]. \end{equation} Where $\rho_{\Lambda_i} = \frac{3(1-\nu)H_I^2}{8\pi G}$ is the static vacuum energy density corresponding to the initial de Sitter phase of the Universe. That is as $a\rightarrow 0$, $\rho_{\Lambda}(H)\rightarrow \rho_{\Lambda_i}$. During the transition form the early inflation to the radiation dominated epoch, the Hubble parameter satisfies the general rule, $H^2=\frac{8\pi G}{3} (\rho_{\Lambda} + \rho_{\gamma}).$ Substituting equation(\ref{eqn:H15}) and (\ref{eqn:rho4}) in (\ref{eqn:h01}) we get the radiation density as, \begin{equation} \label{eqn:rhogamma} \rho_{\gamma}(H) = \rho_{\Lambda_i}\left[\frac{(1-\nu)^2\frac{H_I^2}{H_0^2}a^{4(1-\nu)}}{\left(1+(1-\nu)\frac{H_I^2}{H_0^2}a^{4(1-\nu)}\right)^2}\right]. \end{equation} From the above equation, it is clear that as $a\rightarrow 0$, $\rho_{\gamma}\rightarrow 0$, that is the radiation density is negligible in the very early phase of the Universe where the vacuum energy is the only dominant component. \par Now, let us obtain the analytical expression for vacuum energy density and matter density in the late epoch. The vacuum energy density, by neglecting $H^4$ from equation (\ref{eqn:rho2}) which is not relevant in the matter dominated to late de-Sitter phase, and substituting for $H$ using equation (\ref{eqn:H11}), can be expressed as \begin{equation} \label{eqn:H14} \rho_{\Lambda}(H) = \rho_{\Lambda_0} + \frac{\nu}{1-\nu}\rho_{m_0}\left(a^{-3(1-\nu)}-1\right), \end{equation} where $\rho_{m_0} = \frac{3}{8\pi G}\left[\left((1-\nu)H_0^2 - C_0\right)\right]$ and $\rho_{\Lambda_0} = \frac{3H_0^2}{8\pi G} - \rho_{m_0}$ are the present values of the matter and vacuum energy density respectively. The present value of the vacuum energy, by substituting $a=1$ in the equation (\ref{eqn:H14}), can be written as, $\rho_{\Lambda}(H) = \rho_{\Lambda_0}$. In the limit $a\rightarrow\infty$, $\rho_{\Lambda}(H)\rightarrow\rho_{\Lambda_0} - (\frac{\nu}{1-\nu})\rho_{m_0}$. This is the vacuum energy density corresponds to the final de Sitter phase of the Universe. During the transition from the matter dominated to late accelerating epoch, the Hubble parameter satisfies the general rule, $H^2=\frac{8\pi G}{3} (\rho_{\Lambda} + \rho_{m}).$ Substituting equation(\ref{eqn:H11}) and (\ref{eqn:H14}) in (\ref{eqn:h01}), we get the matter density as, \begin{equation} \label{eqn:H17} \rho_{m}(H) = \rho_{m_0}a^{-3(1-\nu)}. \end{equation} From the above equation, it is clear that as $a\rightarrow \infty$, $\rho_{m}\rightarrow 0$, that is the matter density is negligibly small in the final de Sitter phase of the Universe where the vacuum energy is the only dominant component. The present matter, by putting $a=1$ in the equation(\ref{eqn:H17}), can be obtained as $\rho_m(H) = \rho_m^0$. \section{Finite Boundary for the de Sitter Epochs} Our Universe is evolving between two asymptotically de Sitter phases, dominated by vacuum energy density. In between we have a radiation dominated phase as well as matter dominated phase \cite{padmanabhan2013cosmin, padmanabhan2014cosmological}. During the transient period, the Universe expands about a factor of $10^{28}$ in the radiation dominated phase, and expands only about a factor of $10^4$ in the matter dominated phase \cite{Padmanabhan_2012}. So we ignore the matter dominated phase for the ongoing discussion to establish the connection between two de Sitter phases. The length scale over which the physical processes operate coherently in an expanding Universe is the Hubble radius, $d_H \sim H^{-1},$ and is proportional to the cosmic time (t) \cite{padmanabhan2013solution}. Consider a perturbation generated in the early inflationary period, at some given wavelength scale, $\lambda.$ This will be stretched with the expansion of the Universe as $\lambda \propto a(t).$ The evolution of Hubble radius with the scale factor in logarithmic scale is plotted in (Fig. \ref{fig:dH}). \begin{figure}[h] \centering \includegraphics[width=8cm,height=6cm]{fig1.eps} \caption{Hubble radius (red solid curve) and wavelength of primordial perturbation (blue dashed lines) are plotted against the scale factor in logarithmic scale.} \label{fig:dH} \end{figure} The length $d_H$ will be constant during both the early inflationary epoch and the end de Sitter epoch. The initial inflationary phase ends at $a=a_F$ and is followed by radiation and matter dominated phases. These proceeds to another de Sitter phase of late time accelerated expansion for $a> a_{\Lambda}.$ Mathematically the two de Sitter phases can last forever. However there should exist physical cut-off length scales in both these accelerated epochs, which make the region to us be finite. Let us obtain $a_F$ the scale factor corresponding to which the energy densities of vacuum and radiation are equal, and after that, the radiation density will take over the vacuum density. The vacuum density in the early inflationary phase is given by equation (\ref{eqn:rho4}). After the inflationary period, the Universe eventually make transition to radiation dominated phase, the corresponding radiation density can be expressed as in equation (\ref{eqn:rhogamma}). Equating the two densities at $a=a_F$, we get, \begin{equation} \label{eqn:H50} \rho_{\Lambda_i}\left(\frac{1+\nu(1-\nu)\frac{H_I^2}{H_0^2}a_F^{4(1-\nu)}}{1+(1-\nu)\frac{H_I^2}{H_0^2}a_F^{4(1-\nu)}}\right) = \rho_{\Lambda_i}\left(\frac{(1-\nu)^2\frac{H_I^2}{H_0^2}a_F^{4(1-\nu)}}{1+(1-\nu)\frac{H_I^2}{H_0^2}a_F^{4(1-\nu)}}\right), \end{equation} on simplification we get, \begin{equation} \label{eqn:H13} a_F = \left(\frac{H_0^2}{(1-2\nu)(1-\nu)H_I^2}\right)^{\frac{1}{4(1-\nu)}}. \end{equation} We obtain the Hubble radius corresponding to $a_F,$ using equation (\ref{eqn:H4}) as, \begin{equation} \label{eqn:H01} d_{H_F} =\left(\frac{2}{(1-2\nu)H_I^2}\right)^{\frac{1}{2}}. \end{equation} Now let us go for the next important scale factor, $a_{\Lambda},$ corresponding to the switch over to the late de Sitter epoch. The energy density of radiation in the late Universe will evolves as, \begin{equation} \label{eqn:H02} \rho_{\gamma}(a)=\rho_{\gamma}^0a^{-4(1-\nu)}. \end{equation} During this late period, the vacuum energy density can be expressed using the expression (\ref{eqn:H14}). At $a=a_{\Lambda}$ these two densities are equal, that is, \begin{equation} \label{eqn:H03} \rho_{\gamma}^0a^{-4(1-\nu)} = \rho_{\Lambda}^0+\frac{\nu}{1-\nu}\rho_{\gamma}^0(a^{-4(1-\nu)}-1). \end{equation} Rearranging the above equation give rise to the scale factor $a_{\Lambda}$, as \begin{equation} \label{eqn:H18} a_{\Lambda} = \left(\frac{c_0}{(1-2\nu)[(1-\nu)H_0^2-c_0]}\right)^{\frac{-1}{4(1-\nu)}}. \end{equation} The Hubble radius corresponding to the transit from radiation dominated epoch to late accelerating epoch can be obtained by substituting the above obtained expression of $a_{\Lambda}$ in equation (\ref{eqn:H11}), as \begin{equation} \label{eqn:H27} d_{H_{\Lambda}} = \left(\frac{1-2\nu}{2c_0}\right)^{\frac{1}{2}}. \end{equation} The physical cut-off to both early inflation and late de Sitter epochs can be obtained as follows. During the early inflation, the Hubble radius $d_H$ will remain a constant due to prevailing constancy of $H$ during this epoch. On the other hand, the perturbation wavelength, $\lambda,$ grows exponentially, owing to the exponential increase of the scale factor (i.e., the wave will stretch in proportion to the scale factor). As a result, thesse perturbations will soon leave the Hubble radius. Once the Universe switched over to the radiation dominated era, the Hubble radius grows in proportion to $a^2$ ($d_H \propto a^2$), but the perturbation length will still grow in proportion to $a$ only (i.e. $\lambda \propto a$). If there would be no late accelrating epoch, then all the perturbation once left the Hubble sphere are eventually re-enter the Hubble sphere in the future course of evolution. But due to the late accelerated epoch, there exists some perturbation, having wavelength beyond some critical value, will never enter the Hubble radius. This critical length will naturally causes a finite extension to the early de Sitter epoch. The question is how to find this length. Let us now consider the plot of the $\ln d_H$ versus $\ln a.$. The point corresponding to $a_{\Lambda}$ i.e $(\ln a_{\Lambda}, \ln d_{H_{\Lambda}})$ marks the entry of the Universe into the late de Sitter epoch. The slope of the tangent to the curve at $a_{\Lambda}$, can be obtained as, \begin{equation} \label{eqn:H21} m=\left(\frac{dln(d_H)}{dln(a)}\right)_{a=a_{\Lambda}}=\frac{a_{\Lambda}}{d_{H_{\Lambda}}}\left(\frac{d(d_H)}{da}\right)_{a=a_{\Lambda}}. \end{equation} On detailed calculation this leads to, \begin{equation} \label{eqn:H22} m= \frac{2(1-\nu)(H_0^2-\frac{C_0}{1-\nu})a_{\Lambda}^{-4(1-\nu)}}{(H_0^2-\frac{C_0}{1-\nu})a_{\Lambda}^{-4(1-\nu)}+\frac{C_0}{1-\nu}}. \end{equation} On extending this tangent, it can be found to intersect the flat portion corresponding to the early inflation, at the point $a_I$ i.e.$(\ln a_I, \ln d_{H_I}).$ On substituting $a_{\Lambda}^{-4(1-\nu)}$ form equation (\ref{eqn:H18}), it can be verified that the slope, $m=1.$ The pertubation wavelength, $\lambda \propto a,$ also have the same slope in this plane. Then it can be concluded that, perturbations leaving the Hubble sphere from beyond the location $a_I$ during the early inflation, will never re-enter the Hubble sphere at any time in the future. This means that any region beyond $a_I$ in the inflationary period would have no effect on our region, hence it can be take as a boudary which limits the past extend of inflation. Following the standard equation of the straight line, we can now deduce that, \begin{equation} \label{eqn:H23} a_I = \left(\frac{d_{H_I}}{d_{H_{\Lambda}}}\right)a_{\Lambda}, \end{equation} where $d_{H_I}$ is the Hubble radius corresponding to the early inflationary phase and it can be expressed as \begin{equation} \label{eqn:H45} d_{H_I} = \frac{1}{(1-\nu)^{\frac{1}{2}}H_I}. \end{equation} We will now proceed to calculate the finite boundary of the end de Sitter epoch. The slope of the tangent at the point $(\ln a_F, \ln d_{H_F})$ as, \begin{equation} \label{eqn:H19} n=\left(\frac{d\ln(d_H)}{d\ln(a)}\right)_{a=a_F}=\frac{a_F}{d_{H_F}}\left(\frac{d(d_H)}{da}\right)_{a=a_F}, \end{equation} the detailed form is, \begin{equation} \label{eqn:H20} n= \frac{2(1-\nu)^2\frac{H_I^2}{H_0^2}a_F^{4(1-\nu)}}{1+(1-\nu)\frac{H_I^2}{H_0^2}a_F^{4(1-\nu)}}. \end{equation} The tangent will intersect the flat portion corresponding to the late de Sitter phase, at the point $a_v$ (i.e.$(\ln a_v, \ln d_{H_v})),$ Substituting for $a_F$ for the previous results, it can be shown that, the slope $n=1.$ Posing similar arguements as in the previous case, the points $a_v,$ can be taken as the finite boundary of the late de Sitter phase in the future. Equation (\ref{eqn:H20}) actually represents the slope of the straight line connecting the points $(\ln a_F, \ln d_{H_F})$ and ($\ln a_{v}, \ln d_{H_{v}}).$ Following the standard equation of the straight line, we can now deduce that, \begin{equation} \label{eqn:H24} a_v = \left(\frac{d_{H_v}}{d_{H_F}}\right)a_{F}, \end{equation} where $d_{H_v}$ is the Hubble radius corresponding to the late de-Sitter phase and can be expressed as \begin{equation} \label{eqn:H29} d_{H_{v}}=\left(\frac{1-\nu}{c_0}\right)^{\frac{1}{2}}. \end{equation} From equations (\ref{eqn:H23}) and (\ref{eqn:H24}), it follows that, \begin{equation} \label{eqn:H30} \frac{a_I}{a_F} = \left(\frac{d_{H_I}}{d_{H_{\Lambda}}}\right) \left(\frac{d_{H_v}}{d_{H_F}}\right) \frac{a_{\Lambda}}{a_v}. \end{equation} Substituting the equations (\ref{eqn:H13}), (\ref{eqn:H15}), (\ref{eqn:H18}), (\ref{eqn:H27}), (\ref{eqn:H23}), (\ref{eqn:H45}) in equation (\ref{eqn:H30}), we obtain, \begin{equation} \label{eqn:H32} \frac{a_F}{a_I} = \frac{a_{v}}{a_{\Lambda}}. \end{equation} The interesting conclusion from this is that the portions $a_I-a_F$ and $a_{\Lambda}-a_v$ are equal. There is a middle portion in the pot corresponds to $a_F - a_{\Lambda},$ which represents the interim radiation/matter phase. Let us now check the relative duration of this interim phase and contrast it the duration of the first and last de Sitter epochs. From equation (\ref{eqn:H06}), it is clear that the slanted portion of the curve representing the Hubble radius in (Fig. \ref{fig:dH}) has a slope $2(1-\nu)$. Assuming $d_{H_F}$ almost equal to $d_{H_I}$, we can express the slope as, \begin{equation} \label{eqn:H07} 2(1-\nu) = \frac{\ln\left(\frac{d_{H_\Lambda}}{d_{H_I}}\right)}{\ln\left(\frac{a_{\Lambda}}{a_{F}}\right)}. \end{equation} Similarly, the slanted portion of the curve representing perturbation wavelength in (Fig. \ref{fig:dH}) has a unit slope. So we can express the slope as, \begin{equation} \label{eqn:H08} 1 = \frac{\ln\left(\frac{d_{H_\Lambda}}{d_{H_I}}\right)}{\ln\left(\frac{a_{\Lambda}}{a_{I}}\right)}. \end{equation} combining equation (\ref{eqn:H07}) and (\ref{eqn:H08}), we obtain, \begin{equation} \label{eqn:H09} \left(\frac{a_{\Lambda}}{a_F}\right)^{1-\nu} = \frac{a_{F}}{a_I}. \end{equation} From the above equation, it is clear that the portions $a_I-a_F$ and $a_{\Lambda}-a_v$ become equal to $a_F-a_{\Lambda}$ only if $\nu = 0$ \cite{Padmanabhan_2012}. However the parameter $\nu$ is relatively very small, hence it can be conclude that all the three intervals are almost equal to each other. \par The above proven approximate equality has an interesting significance. It turn out that the number of perturbation modes leaving the horizon during the early phase $a_I - a_F$, will re-enter the horizon during the interval $a_F - a_v $ and will exit the Hubble sphere again during $a_{\Lambda} - a_v.$ A perturbation of wavelength $\lambda_p = a/k$ (where k is the comoving wave number), crosses the Hubble radius when $\lambda_p(a)=H^{-1}$ or equivalently $k=aH(a)$ is satisfied. The modes having comoving wave numbers within the domain $(k, k+dk)$ cross the respective Hubble radius during the interval $(a,a+da)$. The number of modes with wave number $dk$ can be written as $dN=V_{com}d^3k/(2\pi)^3$ (where $v_{com}$ is the comoving volume). The number of modes crossing the Hubble radius during the interval $(a_I<a<a_F)$ can be written as \begin{equation} N(a_I,a_F) = \int_{a_I}^{a_F}\frac{V_{com}k^2}{2\pi^2}\frac{dk}{da}da =\frac{2}{3\pi}\int_{H_I a_I}^{H_F a_F}\frac{d(Ha)}{Ha} = \frac{2}{3\pi}\ln\left(\frac{H_Fa_F}{H_Ia_I}\right) \end{equation} Substituting for $a_I$ form equation (\ref{eqn:H23}), gives \begin{equation} \label{eqn:N12} N(a_I,a_F) = \frac{2}{3\pi}\ln\left(\frac{H_Fa_F}{H_{\Lambda}a_{\Lambda}}\right) \end{equation} The RHS of the above equation is $N(a_F,a_{\Lambda})$ the number modes crossing the Hubble radius of the radiation dominated era. Thus the number of modes leaving the horizon during early inflationary period will re-enter the radiation dominated era. Now substitute for $a_F$ in equation (\ref{eqn:N12}) from equation (\ref{eqn:H24}) we obtain \begin{equation} \label{eqn:N13} N(a_I,a_F) =\frac{2}{3\pi}\ln\left(\frac{H_va_v}{H_{\Lambda}a_{\Lambda}}\right) \end{equation} which in turn equal to $N(a_{\Lambda},a_v).$ From equation (\ref{eqn:N12}) and equation (\ref{eqn:N13}), we obtain that the number of perturbations modes leaving the Hubble radius of the early inflationary phase, subsequently re-enter the radiation pahse and finally exit the end de Sitter epoch corrsponding to the late acceleration, hence \begin{equation} \label{eqn:N14} N(a_I,a_F) = N(a_F,a_{\Lambda}) = N(a_{\Lambda},a_v). \end{equation} This otherwise implies that, $\left(\frac{H_Fa_F}{H_{\Lambda}a_{\Lambda}}\right)=\left(\frac{H_va_v}{H_{\Lambda}a_{\Lambda}}\right),$ which in turn equal to $\left(\frac{H_Fa_F}{H_Ia_I}\right).$ This equality, however doesn't implies the equality of the intervals in the scale factor, especially in the case of the interim radiation (or matter) dominated epoch. The number of modes crossing the Hubble radii in subsequent epochs is thus a conserved quantiy and let it be denoted by $N_c$ for our Universe. In the following we evaluate this quantiy. Consider the radiation dominated epoch. The number of modes crossing the Hubble radius during the interval $a_F < a < a_{\Lambda}$ can be written as, \begin{equation} \label{eqn:N15} N_c = \frac{2}{3\pi}\ln\left(\frac{H_{F}a_{F}}{H_{\Lambda} a_{\Lambda}}\right) = \frac{2}{3\pi}\ln\left(\frac{d_{H_{\Lambda}}a_{F}}{d_{H_{F}} a_{\Lambda}}\right), \end{equation} Substituting equation (\ref{eqn:H01}), (\ref{eqn:H13}), (\ref{eqn:H18}) and (\ref{eqn:H27}) in equation (\ref{eqn:N15}), we obtain \begin{equation} \begin{split} \label{eqn:N16} N_c = \frac{2}{3\pi}\ln\left[\frac{(1-2\nu)H_I}{2\sqrt{c_0}} \left(\frac{\sqrt{c_0}}{(1-2\nu)(1-\nu)H_I\left(\sqrt{1-(\frac{c_0}{(1-\nu)H_0^2})}\right)}\right)^{\frac{1}{2(1-\nu)}}\right] \end{split} \end{equation} an on simplification, we arrive at, \begin{equation} \begin{split} \label{eqn:N17} N_c \sim \frac{(1-2\nu)}{3\pi(1-\nu)}\ln\left(\frac{(1-2\nu)H_I}{\sqrt{c_0}}\right) - \frac{2}{3\pi}\ln(2) - \frac{1}{3\pi(1-\nu)}\ln(1-\nu) \end{split} \end{equation} The second and third term in equation (\ref{eqn:N17}) are negligible small compared to first term, hence we obtain \begin{equation} \begin{split} \label{eqn:N18} N_c \sim \frac{(1-2\nu)}{3\pi(1-\nu)}\ln\left(\frac{(1-2\nu)H_I}{\sqrt{c_0}}\right). \end{split} \end{equation} Here $H_I$ is the Hubble parameter of the initial de Sitter Universe, and $c_0$ represents the Hubble parameter corresponds to the late de Sitter Universe. The model parameter $\nu \leq 10^{-3}$ and if it assumed to be negligibly small, then $N_c \sim (1/3\pi) \ln\left(\frac{H_I}{\sqrt{c_0}}\right).$ Assuming the standard values, $H_I \sim 10^{14}$ GeV and $\sqrt{c_0} \sim 10^{-42}$ GeV, it can be shown that, $N_c \sim 4\pi.$ Here we have expressed the numerical value by retaining $\pi$ because we have that in the denominator of the arguement of the logarithm. \section{Conclusions} In this work, we have derived an analytical solution for the Hubble parameter for the complete background evolution of the Universe; from the early inflation to late de Sitter phase using the running vacuum model of the dark energy proposed by Sola and others. The general form of the Hubble parameter is suitably reduced to the one which corresponds to the subsequent phases in the evolution of the Universe, the early inflation, interim radiation (matter), and end de Sitter epochs through a late accelerated phase. The Universe, with evolution as shown in figure (\ref{fig:dH}) having two distinct de Sitter epochs, one during the inflation and the other during the late time acceleration. Both of these epochs can be extended indefinitely into the past and future with a constant Hubble radius. Nevertheless, there are physical processes that limit the physically relevant region of these two epochs. Since the Hubble radius flattens out when $a > a_{\Lambda}$, the perturbations with wavelengths larger than a critical value will never re-enter the Hubble radius, which we imply a physical boundary of this de Sitter epoch. This otherwise implies that only those perturbations that left the early inflationary period during $a_I < a < a_F$ are feasible, which in turn determine the early de Sitter's finite boundary epoch. We found that the resepctive scale factors will satisfy a relation, $(a_F/a_I)=(a_v/a_{\Lambda}).$ The transition between the two de Sitter phases is through a radiation dominated phase, giving way to a very late time matter-dominated phase. It is, however, evident that the matter-dominated epoch is not much significant since it quickly gives way to the second de Sitter phase dominated by the cosmological constant. Hence we considered only the radiation epoch as the transient phase. On analyzing the evolution of this interim epoch, we found the scale factors ratio, which can equate with the previously mentioned ratio is $(a_{\Lambda}/a_F)^{1-\nu}.$ One may note at this juncture that the slanted portion in figure (\ref{fig:dH}), which represents the evolution of the interim phase, has a slope of 2$(1-\nu).$ The perturbation modes which exit the Hubble radius during $a_I-a_F$ re-enter the Hubble radius during $a_F-a_{\Lambda}$ and again exit during $a_{\Lambda}-a_v.$ We obtained this conserved number of modes and is approximately $N_c \sim (1/3\pi) \ln\left(\frac{H_I}{\sqrt{c_0}}\right).$ We expect that this constant number may have further insights into the connection between the early inflationary epoch and the end de Sitter epoch, about which more work is needed.
\section{Introduction} \label{intro} The next High Luminosity Large Hadron Collider (HL-LHC) phase will collect an overwhelming amount of data, with complex physics and small statistical error. To analyse this data, high precision methods which use only limited resources are needed. Traditional Monte Carlo based simulation, such as \textit{Geant4} \cite{Geant4, Geant4_recent} and the \textit{GeantV} prototype \cite{GeantV} for \textit{full simulation} of particle transport, is however very time-consuming, therefore new approaches using deep neural networks have been studied for \textit{fast simulations}. Generative Adversarial Networks (GAN) are a strong candidate for such fast simulations. Based on two neural networks, generator and discriminator, trained alternatively, GANs have been widely explored thanks to their ability to generate images with complex structures at much high speed. In HEP, the variations of GAN, such as CaloGAN \cite{CaloGAN} and 3DGAN \cite{3DGAN}, have achieved similar performance as full Monte Carlo based simulation, but with reduced time taken. At the same time, quantum computing has emerged as another important pillar in modern research attracting the attention of many researchers due to its potential to execute certain tasks with an exponentially reduced amount of resources both in time and space compared to classical processors \cite{Google}. It has already shown promising results in various fields, such as optimization \cite{quantum_optimization, QUBO_grover} and cryptography \cite{cryptography}. Advances in both deep learning and quantum computing suggest to merge them to benefit their advantages at once, leading to a new field of study, so-called \textit{Quantum Machine Learning} (QML). Quantum Generative Adversarial Networks, which are the quantum version of GANs, are one of its examples. Several quantum GAN models have been investigated in the last few years, but the scientific community still confronts a need to further explore in order to apply the model to more realistic use-cases. In this paper, we propose for the first time a \emph{Dual Parameterized Quantum Circuit GAN} model (dual-PQC GAN model) as one of the improvements to overcome the remaining limitations of quantum GANs. This model uses two parametrized quantum circuits, which share the role of a single quantum generator: the first PQC learns the distribution over image samples, while the second PQC determines the amplitude distribution over pixels on a single image. Thanks to this separation, it is possible to exploit the continuous nature of probability distributions over output states in quantum circuits to represent continuous variables. This paper is organized as follows. \secref{sec:GAN_in_HEP} summarizes the application of Generative Adversarial Networks in HEP. We then present a short overview of a quantum version of GAN in \secref{sec:QGAN}. In \secref{sec:dual_PQC} and \secref{sec:dual_PQC_training}, the first prototype of a dual-PQC GAN model is proposed, with the results of its simulation. This paper concludes with \secref{sec:conclusion}, which summarizes and gives an outlook of future works. \section{Applications of GANs in HEP} \label{sec:GAN_in_HEP} GANs, designed by I.\ Goodfellow et al.\ in 2014 \cite{GAN}, are deep generative models which aim to reproduce new data from a given original training set. They are characterized by two deep neural networks, \textbf{Generator} $G$ and \textbf{Discriminator} $D$, which are trained alternatively. During the training, $G$ progressively generates data similar to the real one, while $D$ increases the probability of assigning the correct labels to both real and fake data. Numerous improvements have been made since the initial proposal and, in particular, GANs have achieved remarkable success in image processing and generation, via variations such as Deep Convolutional GAN (DCGAN) \cite{DCGAN}, Auxiliary Classifier GAN (ACGAN) \cite{ACGAN}, Progressive GAN \cite{PGAN}, etc. The evolution of GANs has attracted strong interest in the high energy physics domain. In HEP, the detectors can be described as 3D cameras, recording pictures of particle collisions. Calorimeters, in particular, measure the energies deposited by a shower of the particles that traverse them. They generally consist of alternate arrays of active sensor material and passive dense layers to ensure that the incoming (primary) particle will deposit most of its energy inside their volume. These energy depositions can be compared to the monochromatic pixel intensities of a 3D image. Because of their high granularity, the detailed simulation of a calorimeter is particularly time-consuming. As a result, GANs come into the limelight to allow fast simulation of particle showers with high fidelity. One possible application of GAN in HEP is 3DGAN \cite{GAN_fast_simulation, 3DGAN}, which is a 3D extension of GAN, using 3D (de-)convolutional layers to capture the whole 3D energy profile. It simultaneously performs two additional tasks of estimating the incoming particle energy and measuring the total deposited energy to enhance the stability and convergence of networks. Details on 3DGAN architecture and its performance validation are available in \cite{3DGAN}. \section{Quantum Generative Adversarial Networks} \label{sec:QGAN} The possibility of combining machine learning and quantum computing also led to the generalization of GAN to quantum systems by S. Lloyd and C. Weedbrook \cite{QGAN}. The main mechanism of the model, the adversarial training, is reproduced, but different scenarios are possible: the input data can be either quantum data or classical data embedded in quantum states and the discriminator/the generator can also be either classical or quantum. Since its initial proposal, several quantum GAN (qGAN) variations have been suggested to generate either classical data \cite{QGAN_qiskit, QGAN_Romero, QGAN_Situ} or quantum data \cite{QGAN_Pierre, Hu_2019, Benedetti_2019, OpticalGAN}. Zoufal et al~\cite{QGAN_qiskit} proposed a hybrid qGAN model composed of a quantum generator and a classical discriminator to train on \emph{classical} data. During the training, the generator learns an arbitrary probability distribution over discrete variables, which is encoded in the amplitudes of the final quantum state. This model was applied of quantum finance, and demonstrated using the real quantum hardware, \textit{IBM Q Boeblingen}. Anand et al~\cite{QGAN_experimental} also present similar results, but simulated on the real Rigetti quantum hardware, \textit{Aspen-4-2Q-A}. Unlike the aforementioned models treating classical data, Situ et al \cite{QGAN_Situ} propose a qGAN model which aims to approximate an unknown pure quantum state with a quantum generator and a quantum discriminator. One problem with quantum machine learning models is the apparent difficulty of training PQCs, captured by the vanishing gradient and barren plateau problems. Fortunately, there have been also studies on the methods to improve the performance of qGAN, for instance, Quantum Multiplicative Matrix Weight (QMMW), which helps to avoid mode collapse or vanishing gradient problem in qGAN \cite{QMMW}. The results from the previous research are impressive, showing the potential of qGAN for the near-term quantum hardware. However, additional investigations are needed in order to fully understand the quantum advantages of qGAN and generate not only simple probability distributions but also more complex image samples. \section{Dual-PQC GAN model} \label{sec:dual_PQC} \begin{figure}[b] \centering \begin{quantikz} \lstick{} & \gate{R_y(\phi^0_0)}\gategroup[3,steps=1,style={dashed, rounded corners,fill=yellow!20, inner xsep=1pt, inner ysep = 1pt},background, label style={label position=below,anchor=north,yshift=-0.3cm} ]{{\sc Initialization}} & \qw & \ctrl{1}\gategroup[3,steps=3,style={dashed, rounded corners,fill=blue!20, inner xsep=1pt, inner ysep = 1pt},background, label style={label position=below,anchor=north,yshift=-0.3cm} ]{{\sc layer $1$}} &\qw & \gate{R_y(\phi^0_1)} & \qw & \ldots & & \ctrl{1}\gategroup[3,steps=3,style={dashed, rounded corners,fill=blue!20, inner xsep=1pt, inner ysep = 1pt},background, label style={label position=below,anchor=north,yshift=-0.3cm} ]{{\sc layer $k$}} &\qw & \gate{R_y(\phi^0_k)} &\qw \\ [-0.4cm] \lstick{} & \gate{R_y(\phi^1_0)} & \qw & \control{} & \ctrl{1} & \gate{R_y(\phi^1_1)} &\qw & \ldots & & \control{} & \ctrl{1} & \gate{R_y(\phi^1_k)} &\qw\\[-0.4cm] \lstick{}& \gate{R_y(\phi^2_0)} & \qw & \qw & \control{} & \gate{R_y(\phi^2_1)} & \qw & \ldots & & \qw & \control{} & \gate{R_y(\phi^2_k)} &\qw \end{quantikz} \caption{\it Quantum variational form using Pauli-$Y$ rotations and $CZ$ gates with depth $k$.} \label{fig:vf} \end{figure} Our preliminary experiments involved training a qGAN, as conceptualised in \cite{QGAN_qiskit}, for the calorimeter problem -- however this immediately revealed a problem: as the image itself is encoded in the amplitudes of the computational basis states, this meant that only the average of all the training samples could be learned, and the GAN did not, therefore, sample typical images. To put this in more precise terms, in order to achieve the exponential compression of representing a $N = 2^n$ pixel image using $n$ qubits, it follows that the qGAN prepares a quantum state of the form: \begin{equation} \ket{\psi} = {\textstyle\sum}_{j=0}^{2^{n}-1}\sqrt{I_{j}}\ket{j} \end{equation} where $I_j$ is the intensity of the $j^{th}$ pixel. So we can see that, in a sense, the qGAN encodes a \textit{single} image as a probability distribution, and so there is no room left to also encode a probability distribution, representing the full dataset, to sample images from. This problem does not arise in classical GANs, where a single sample from a $\mathcal{O}(N)$ sized neural network generates a single image in one go. In this section we describe our solution, a new type of quantum GAN, the \textit{dual Parameterized Quantum Circuit (PQC) GAN model} (dual-PQC GAN model). It aims to reproduce a set of image samples from real training data while preserving the exponential compression achieved by amplitude encoding. The work in \cite{rudolph2020generation} follows from similar motivation. The dual-PQC GAN is a hybrid qGAN architecture which has one classical discriminator and two parameterized quantum circuits, PQC1 and PQC2, sharing the role of the generator. PQC1, with $n_1$ qubits, learns the probability distribution over image samples and PQC2, with $n_2$ qubits, learns the amplitude distribution over pixels of each image. The classical discriminator takes the training set and the images generated by PQC2, and it classifies them into real and fake. The predicted labels are used to tune alternatively $\phi_1$, $\phi_2$ and $\theta$, the parameters for PQC1, PQC2, and the discriminator, respectively. In this study, both PQCs consist of alternating layers of single-qubit Pauli-rotations and a set of two-qubit entanglement gates, as shown in \figref{fig:vf} It is widely used in quantum machine learning thanks to its strong expressive power, offering an effective way of reconstructing an expected behaviour \cite{variational_form, PQC}. We use RY rotation gates and CZ entanglement gates, but other choices are possible. \tikzstyle{Generator2} = [rectangle, draw, fill=green!20, text width=4.6em, text centered, rounded corners, minimum height=1.3cm] \tikzstyle{Discriminator2} = [rectangle, draw, fill=blue!20, text width=6.8em, text centered, rounded corners, minimum height=1cm] \tikzstyle{input2} = [rectangle, draw, fill= white, text width=0.3em, minimum height = 2.3em, align= center, copy shadow={draw, shadow xshift=1mm, shadow yshift=-1mm} ] \tikzset{meter/.append style={draw, inner sep=4, rectangle, font=\vphantom{A}, minimum width=16, line width=.36, path picture={\draw[black] ([shift={(.04,.12)}]path picture bounding box.south west) to[bend left=50] ([shift={(-.04,.12)}]path picture bounding box.south east);\draw[black,-latex] ([shift={(0,.04)}]path picture bounding box.south) -- ([shift={(.12,-.04)}]path picture bounding box.north);}}} \tikzstyle{line} = [draw, -latex'] \begin{figure}[h] \begin{center} \begin{tikzpicture}[align=center,node distance = 2cm, auto] \draw (6.5,-0.5) node[input2, label = below:{ Fake Data \\ by sampling}] (FakeData) {\phantom{input}}; \node [Discriminator2, right of = FakeData, node distance=2.3cm] (Disc) {\bf Classical \\ Discriminator}; \node [input2, above of = Disc, node distance=1.3cm, label = right:{Real Data}] (RealData) {\phantom{input}}; \node [text width = 3.5em, right of = Disc, node distance = 2.5cm, minimum height = 1.6cm](PredictedLabel) {Predicted Labels}; \node [text width = 3.8em](Discard) at (7,0.5) {Discard}; \node [rectangle, text width=6em, minimum height = 1em, align= center] (Basis) at (0,-0.5) {${\ket{0},...,\ket{2^{n_1}-1}}$}; \node [rectangle, text width=4em, minimum height = 1em, align= center] (Zeros) at (0,0.5) {$\ket{0}^{\otimes n_2 - n_1}$}; \node [Generator2, below of = Basis, node distance = 1.9cm] (PQC1) { { \textbf{PQC1}} \\ \footnotesize $n_1$ qubits \\ depth $d_{g,1}$}; \node [Generator2] (PQC2) at (3,0) {{ \textbf{PQC2}} \\ \footnotesize $n_2$ qubits \\ depth $d_{g,2}$}; \draw[thick] (4.4, 0.35) -- (4.7, 0.65); \draw[thick] (4.4, -0.65) -- (4.7, -0.35); \draw[thick] (1.4, 0.35) -- (1.7, 0.65); \draw[thick] (1.4, -0.65) -- (1.7, -0.35); \node[text width = 5em] at (4.55,0.72) {$n_2 - n$}; \node[text width = 1em] at (4.55,-0.28) {$n$}; \node[text width = 5em] at (1.55,0.72) {$n_2 - n_1$}; \node[text width = 1em] at (1.55,-0.28) {$n_1$}; \path [line] (PQC1) -- (Basis); \draw (Basis) |- (PQC2.west |-Basis.east); \draw (Zeros) |- (PQC2.west |-Zeros.east); \path [line] (PQC2.east|-FakeData.west) |- (FakeData); \path [line] (PQC2.east|-Discard.west) |- (Discard); \path [line] (FakeData.east) -- (Disc); \path [line] (Disc) -- (PredictedLabel); \path [line] (RealData) -- (Disc); \path [line, style = dashed] (PredictedLabel.south) -- ++(0,-1.1cm) -| (Disc.south); \path [line, style = dashed] (PredictedLabel.south) -- ++(0,-1.1cm) -|node [pos = 0.25, below] (TextNode) {Classical Optimization} (PQC2.south); \path [line, style = dashed] (PredictedLabel.south) -- ++(0,-1.1cm) -- (PQC1.east); \node[meter, above of = PQC1, node distance = 1.1cm](meter){}; \node[meter, left of = Discard, node distance = 1.45cm](meter){}; \node[meter, left of = FakeData, node distance = 0.95cm](meter){}; \end{tikzpicture} \end{center} \caption{\em Schematic Diagram of dual-PQC GAN to reproduce images of $2^n$ pixels. } \label{fig2} \end{figure} Consider a training set $X \subset \mathbb{R}^{2^n}$ of $N = 2^n$ pixel images. To begin, the output state of PQC1 is measured producing $n_1$ bits. Then, via a set of Pauli-$X$ gates, this bit string is used to initialise PQC2 with the corresponding computational basis state in the $2^{n_1}$ dimensional Hilbert space, $\ket{i} \in \{\ket{0},..., \ket{2^{n_1} - 1}\}$. Then, by repeatedly measuring $n$ output qubits of PQC2, the probability distribution over the computational basis in the $2^{n}$ dimensional Hilbert space, $\ket{i} \in \{\ket{0},..., \ket{2^n - 1}\}$, is constructed and translated as an image of size $2^n$ for each input state. Note that since PQC2 performs a unitary operation, and since its inputs are always computational basis states, the output quantum states are necessarily orthogonal. This puts an unwanted restriction on the possible images. Relying on the Stinespring dilation theorem, we can remove this restriction by choosing $n_2 > n_1, n$ and using some ancilla qubits which are discarded at the end. We will return to this point at the end of the section. Let $p_g^i$ be the probability that state $\ket{i}$ is measured by PQC1; let $\mathcal{I}_i$ denote the normalized image produced by PQC2 when given the input state $\ket{i}$; and let $I_{ij}$ be the amplitude of $j^{th}$ pixel of $\mathcal{I}_i$ with $i\in \{0,..., 2^{n_1}-1\}$ and $j \in \{0,..., 2^n-1\}$. Then the output states generated by PQC1, $G_{1,\phi_1}$, and PQC2, $G_{2,\phi_2}$, are explicitly given as : \begin{equation} G_{1,\phi_1}\ket{\psi_{initial}} = \ket{g_{1,\phi_1}} = \sum_{j=0}^{2^{n_1}-1}\sqrt{p_g^j}\ket{j}, \end{equation} \begin{equation} G_{2,\phi_2}\ket{\mathbf0}\ket{i} = \ket{g_{2,\phi_2}} = \sum_{j=0}^{2^{n}-1}\sqrt{I_{ij}}\ket{\Psi_j} \ket{j} \end{equation} where $\ket{\psi_{initial}}$ is the input state of PQC1 fixed during the whole training and $\ket{\Psi_j}$ are some $n-n_2$ qubit states that we discard During the training, PQC1 learns the distribution $p_g(i)$ over $\mathcal{I}_i$, so that it approaches to the real distribution, $p_{real}$ over $X$. On the other hand, PQC2 learns the amplitude over $2^n$ pixels for $2^{n_1}$ images, to make $\mathcal{I}_i$ as close as possible to real images. At the end of the training, the true/fake probabilty predicted by the discriminator for $\mathcal{I}_i$, $D(\mathcal{I}_i)$ should converge to $1/2$. For the following simulations, we use a modified min-max loss, given as: \begin{equation} L_G = -\frac{1}{m}\sum_{i = 1}^m \log D(G( \mathbf{z}_i)) = -\sum_{i=0}^{2^{n_1} - 1} p_g^i\log(D(\mathcal{I}_i)) \label{eq:lg} \end{equation} \begin{equation} L_D = \frac{1}{m} \sum_{i = 1}^{m} \big[\log D(\mathbf{x}_i) + \log ( 1 - D(G( \mathbf{z}_i)))\big] = \frac{1}{m} \sum_{i = 1}^{m} \log D(\mathbf{x}_i) + \sum_{i=0}^{2^{n_1} - 1} p_g^i\ \log ( 1 - D(\mathcal{I}_i)) , \label{eq:ld} \end{equation} where $m$ is the batch size, $x_i$ the real data and $z_i$ random input. The first equality gives the definition of the loss in the classical GAN and the second equality the practical formula used in dual-PQC GAN simulations. Based on the calculated loss, the parameters in the quantum generator are tuned by computing the analytic quantum gradient descent \cite{QGD}, while the discriminator is optimized in the exactly same way as in classical GAN. Further details on the method used for analytic quantum gradient are explained in Ref. \cite{QGD2, QGD3}. Ultimately, the dual-PQC GAN model can generate $2^{n_1}$ images of size $2^n$. Increasing the number of qubits used in PQC1 and PQC2 allows to increase both the number and size of produced images. This model shows an advantage in terms of computational resources by using only $\mathcal{O}(\log(N))$ qubits, compared to the classical neural networks with $\mathcal{O}(N)$ neurons to reproduce an image of size $N$. Specifically, the potential advantages are threefold: firstly, there is an exponential reduction in space (memory) requirement; secondly, the resultant exponential reduction in number of tunable parameters (i.e. the number of tunable parameters is proportional to the number of gates in the PQC or neurons in the classical neural network) suggests that training could be performed more efficiently; finally, it is potentially advantageous to have the images encoded in quantum states if further processing is to be performed (for example if that image processing can itself be performed more efficiently using quantum computing). It should, however, be noted that if all one wants to do is to generate an image, then the number of samples required from PQC2 is exponential in the number of qubits. \paragraph{How many ancillas are needed?} Since we want to be able to reproduce any collection of images, we have to use some ancillary qubits. Stinespring's theorem gives an upper bound on the number of ancillas but it is not tight. We will now show that $n_2 = 2n$ will suffice when we assume for simplicity that $n_1 = n$. Let $U$ denote the unitary matrix corresponding to PQC2. When $U$ is applied to the input state $\ket0^{\otimes n}\otimes \ket i$, where $\ket i$ is an $n$-qubit basis state, the resulting state is always one of the columns of $U$; in particular it always one of the first $2^n$ columns. We'll construct an example of $U$ which realises $2^n$ arbitrary images. Let \[ \ket{\mathcal{I}_i} = (\sqrt{I_{i,0}}e^{i\phi_{i,0}}, \ldots, \sqrt{I_{i,0}}e^{i\phi_{i,0}})^T \] be a state whose amplitudes encode the pixels of image $i$. Consider the state $\ket{U(i)} = \ket i \otimes \ket{\mathcal{I}_i}$, and observe that if its first $n$ qubits are measured in the computational basis and discarded, then the remaining quantum state is precisely $\ket{\mathcal{I}_i}$. Since $\bra{U(i)}\ket{U(j)} = \delta_{ij}$, ie, they are orthonormal, we can construct the required \textit{unitary} matrix, $U$, by setting the first $2^n$ columns to be $\ket{U(i)}$ for $i\in\{0,\ldots 2^n-1\}$ and choosing the remainder arbitrarily. Since these columns correspond to states which will not be selected by any input to PQC2, they don't matter. It should be noted that it is unlikely that the trained dual-PQC GAN would actually converge on unitaries of such a form, and thus this construction is given merely to demonstrate that $2n$ qubits suffice; further improvements are surely possible. \section{Training dual-PQC GAN} \label{sec:dual_PQC_training} \begin{figure}[b] \centering \begin{subfigure}{0.45\textwidth} \includegraphics[width = \textwidth]{classification.eps} \caption{\em} \label{fig:classification} \end{subfigure} \begin{subfigure}{0.45\textwidth} \centering \includegraphics[width = \textwidth]{/mean_images.eps} \caption{\em } \label{fig:mean_images} \end{subfigure} \caption{\em Classification of 20,000 normalized real image samples (only 100 samples displayed) into $4$ classes via K-means clustering \cite{Kmeans} (a) and their average (b). The mean image of Set $i$ is assigned to a computational basis state $\ket{i}$.} \label{fig:classiciation_mean} \end{figure} This section tests dual-PQC GAN described in \secref{sec:dual_PQC} and shows its potential to generate a set of image samples from a training set with a certain degree of fidelity. We emphasize that, in order to work with a manageable number of qubits, this study simplifies the original 3DGAN problem by reducing it to a 1D problem: reproducing the energy pattern along the calorimeter depth. In other words, the training dataset is composed by 1D energy profiles along the calorimeter $z$ dimension, averaged over $N=4$ pixels. It should be noted that such drastic reductions in problem size are common-place in quantum machine learning, in order to obtain useful proof-of-principle results. In order to evaluate the performance of the model, the original data set of 20,000 sample images is classified into $2^{n}$ classes of via K-means clustering \cite{Kmeans} as shown on \figref{fig:classification} for the case $n = 2$. The average image for each class, displayed on \figref{fig:mean_images}, gives an insight on the shape of images which should be produced by PQC2. Note that this clustering is purely for evaluation of results - raw data are used for the training. Although, theoretically, it is sufficient to take $n_1 = n = 2$, several preliminary simulations have shown that $n_1 = 2n = 4$ gives better stability in the results. Therefore, for the following simulations, PQC1 takes $n_1 = 4$ but still builds a probability distribution over $2^2 = 4$ images, by only measuring $n = 2$ qubits among four. PQC1 is initialized with an equiprobable superposition over the computational basis, $\{\ket{0},..., \ket{2^{n_1}-1}\}$ with $n_1 = 4$. Furthermore, the initial parameters for both PQC1 and PQC2 are sampled from a uniform distribution over $[-\delta, \delta]$, with $\delta = 10^{-1}$. The discriminator is implemented in PyTorch, using an input layer with 4 nodes, two hidden layer with 256, 128 nodes, respectively, and a single node output layer. After the first two layers follows a Leaky ReLU function \cite{LeakyReLU} with $\alpha = 0.2$ and a sigmoid function \cite{sigmoid} is applied after the output layer. In addition, a gradient penalty \cite{penalty} for real images is added to help stability and convergence of the model, with the parameters $\lambda = 7$, $k = 0.01$ and $c = 1$. The dual-PQC GAN is trained using the AMSGRAD optimizer with initial learning rate of $10^{-4}$ for PQC1 and discriminator and $10^{-3}$ for PQC2. \begin{figure}[h] \centering \begin{subfigure}{0.3\textwidth} \includegraphics[width = \textwidth]{mean_image_N4_D2D6_opt3.eps} \caption{\em} \end{subfigure} \begin{subfigure}{0.3\textwidth} \includegraphics[width = \textwidth]{loss_N4_D2D6_opt3.eps} \caption{\em} \end{subfigure} \begin{subfigure}{0.3\textwidth} \includegraphics[width = \textwidth]{rel_entr_N4_D2D6.eps} \caption{\em} \label{fig:rel_entr_N4_D2D6} \end{subfigure} \begin{subfigure}{0.3\textwidth} \includegraphics[width = \textwidth]{mean_image_N4_D2D16_opt3.eps} \caption{\em} \end{subfigure} \begin{subfigure}{0.3\textwidth} \includegraphics[width = \textwidth]{loss_N4_D2D16_opt3.eps} \caption{\em} \end{subfigure} \begin{subfigure}{0.3\textwidth} \includegraphics[width = \textwidth]{rel_entr_N4_D2D16.eps} \caption{\em} \label{fig:rel_entr_N4_D2D16} \end{subfigure} \caption{\em Results of dual-PQC GAN simulations with $n = 2$, $n_1 = n_2 = 4$, $d_{g,1} = 2$ and $d_{g,2} = 6$ (a, b, c) / $d_{g,2} = 16$ (d, e, f). The mean image amplitudes calculated by \eqnref{eq:mean_image} (a,d), the generator and the discriminator losses (b, e), and the progress in relative entropy for the mean image (c,f) are illustrated. } \label{fig:mean_loss_dual} \end{figure} \figref{fig:mean_loss_dual} displays progress in the loss functions and relative entropy, as well as the average of generated images at the end of the training, weighted with their probability, given by: \begin{equation} \mathcal{I}_{mean} = {\textstyle\sum}_{i=0}^{2^n - 1}p_g^i\cdot \mathcal{I}_i. \label{eq:mean_image} \end{equation} Both cases of $d_{g,2} = 6$ and $d_{g,2} = 16$ exhibit convergence in mean energy distribution towards the target, as well as convergence of generator and discriminator losses. Furthermore, the relative entropy between real and generated mean images reaches below $10^{-4}$ as shown on \figref{fig:rel_entr_N4_D2D6} and \figref{fig:rel_entr_N4_D2D16}. Note that after the convergence in loss function, the relative entropy does not cease decreasing in case of $d_{g,2} = 16$, while it starts to oscillate with large amplitude in case of $d_{g,2} = 6$, reflecting certain degree of instability in the simulation. As an analysis on the mean images is not enough to validate the GAN result, it is necessary to evaluate the individual images produced by PQC2 as well as the probability distribution generated by PQC1. The images generated by PQC2 with $d_{g,2} = 16$, displayed on \figref{fig:images_N4_D2D16_opt3}, are similar to the mean real images shown in \figref{fig:mean_images} with the peaks at $x = 2$ or $x = 3$. On the other hand, those generated by PQC2 with $d_{g,2} = 6$ on \figref{fig:images_N4_D2D6_opt3} contain two images, $\mathcal{I}_0$ and $\mathcal{I}_2$, which are far from the real image profile. The probability distribution generated by PQC1 can explain this discrepancy. As shown on \figref{fig:prob_N4_D2D6_opt3}, the weights for $\mathcal{I}_0$ and $\mathcal{I}_2$ are negligible compared to those for $\mathcal{I}_1$ and $\mathcal{I}_3$, meaning that their labels, produced by the classical discriminator, are suppressed in the loss function given by \eqnref{eq:lg}. Therefore, the mean images and the generator loss could converge to the correct value, despite considerable errors in the produced images themselves. Contrarily, in case of $d_{g,2} = 16$, the probability on \figref{fig:prob_N4_D2D16_opt3} implies that all 4 images have non-negligible weights, thus leading to consistency between the quality for the mean and individual images. This result certainly highlights the importance of choosing a correct structure of dual-PQC GAN model in order to prevent any bias during training. \begin{figure}[h] \centering \begin{subfigure}{0.245\textwidth} \includegraphics[width = \textwidth]{images_N4_D2D6_opt3.eps} \caption{\em} \label{fig:images_N4_D2D6_opt3} \end{subfigure} \begin{subfigure}{0.245\textwidth} \includegraphics[width = \textwidth]{prob_N4_D2D6_opt3.eps} \caption{\em} \label{fig:prob_N4_D2D6_opt3} \end{subfigure} \begin{subfigure}{0.245\textwidth} \includegraphics[width = \textwidth]{images_N4_D2D16_opt3.eps} \caption{\em} \label{fig:images_N4_D2D16_opt3} \end{subfigure} \begin{subfigure}{0.245\textwidth} \includegraphics[width = \textwidth]{prob_N4_D2D16_opt3.eps} \caption{\em} \label{fig:prob_N4_D2D16_opt3} \end{subfigure} \caption{\em Images generated by PQC2 (a,c) and its distribution obtained from PQC1 (b,d) with $n = 2$, $n_1 = n_2 = 4$ and $d_{g,1} = 2$, but with different $d_{g,2}$ : 1) $d_{g,2} = 6$ (a,b), 2) $d_{g,2} = 16$ (c,d). Although the mean images shown on \figref{fig:mean_loss_dual} are close to the real value in both cases, PQC2 with $d_{g,2} = 6$ cannot imitate correctly the real data (c.f. \figref{fig:mean_images}), while the one with $d_{g,2} = 16$ achieves to reproduce very similar images.} \label{fig:image_samples} \end{figure} \begin{figure}[h] \centering \begin{subfigure}{0.38\textwidth} \includegraphics[width = \textwidth]{figures/rel_image0_N4_D2D16_opt3.eps} \end{subfigure} \begin{subfigure}{0.38\textwidth} \includegraphics[width = \textwidth]{figures/rel_image1_N4_D2D16_opt3.eps} \end{subfigure} \begin{subfigure}{0.38\textwidth} \includegraphics[width = \textwidth]{figures/rel_image2_N4_D2D16_opt3.eps} \end{subfigure} \begin{subfigure}{0.38\textwidth} \includegraphics[width = \textwidth]{figures/rel_image3_N4_D2D16_opt3.eps} \end{subfigure} \caption{\em Relative entropy of generated images $\mathcal{I}_0,..., \mathcal{I}_3$ with respect to average of real image classes, shown on \figref{fig:mean_images}. The images are generated via dual-PQC GAN with $n = 2$, $n_1 = n_2 = 4$, $d_{g,1} = 2$ and $d_{g,2} = 16$. According to minimum relative entropy at the end of the training, one-to-one correspondence can be established between real and generated images.} \label{fig:individual_rel_entr} \end{figure} Finally, the quality of individual images is evaluated by calculating the relative energy between the real images Set~$i$, shown on \figref{fig:mean_images}, and the generated images $\mathcal{I}_i$ for $i = 0,1,2,3$, as displayed on \figref{fig:individual_rel_entr}. Considering the lowest relative entropy values across the last 4 epochs (200 epochs are run in total), a bijection between real images and generated images can be constructed : $\mathcal{I}_0 \to$ Set0, $\mathcal{I}_1 \to$ Set3, $\mathcal{I}_2 \to$ Set1 and $\mathcal{I}_3 \to$ Set2. This result gives a quantitative proof that PQC2 can reproduce four different sets of images in the real training data. Despite this optimistic affirmation, the relative entropy large instability is the main point that should be improved in future studies. Unfortunately, the number of qubits in the quantum generator scales not only with the number of pixels in one image but also with the number of images that can be produced, while in original GAN, the system size mainly scales with image size. This fact represents the largest limitation of the model and it requires further improvement. We are currently investigating a solution feeding extra noise to the remaining PQC2 $n_2 - n_1$ qubits, while PQC1 keeps generating a probability distribution over the zero-noise image. \section{Conclusion} \label{sec:conclusion} This work presents a dual-PQC GAN model, a prototype of quantum GAN with two quantum generators, sharing the role of a single generator. One of the generators is responsible for reproducing the distribution over images, while the other for building amplitude distributions over pixels on a single image. If we supplement the input of PQC2 with a sample from PQC1 and some (continuous) noise, then we can see that PQC1 really is a distribution over means of different classes of images, and the noise allows generation of typical samples from the class. The results obtained prove that this model can generate individual image samples and their probability distribution, similar to the training set. It is also worth noting that, as the number of possible images (or classes of images if noise is added) grows \textit{exponentially} with $n_1$, the fact that we sample from a finite set of images (or classes of images if noise is added) rather than a continuum of typical images (as in the corresponding classical case) is unlikely to seriously compromise performance. An interesting question for future research would be how to reproduce an arbitrary number of outputs with the dual-PQC GAN model. One possible way is to introduce a \textit{complex-valued} noise to the remaining qubits in the PQC2. Using a fixed sampler instead of a trained quantum circuit for PQC1 to pass an entangled quantum state to PQC2 is another possible approach. Throughout future studies, we look forward to building a more advanced quantum GAN model to imitate the performance of classical GAN.
\section{Introduction} Single-image generative models perform image synthesis and manipulation by capturing the patch distribution of a single image. Prior to the Deep-Learning revolution, the classical prevailing methods were based on optimizing the similarity of small patches between the input image and the generated output image. These \emph{unsupervised} patch-based methods (e.g.,~\cite{efros1999texture,simakov2008summarizing,barnes2009patchmatch,pritch2009shiftmap,dekel2015revealing, ren2016examplebased}) gave rise to a wide variety of remarkable image synthesis and manipulation tasks, including image completion, texture synthesis, image summarization/retargeting, collages, image reshuffling, and more. Specifically, the Bidirectional similarity approach~\cite{simakov2008summarizing, barnes2009patchmatch} encourages the output image to contain only patches from the input image (``Visual Coherence''), and vice versa, the input should contain only patches from the output (``Visual Completeness''). Hence, no new artifacts are introduced in the output image and no critical information is lost either. Recently, deep \emph{Single-Image Generative Models} took the field of image manipulation by a storm. These models are a natural extension of ``Deep Internal Learning" \cite{Shocher_2018_CVPR, Gandelsman_2019_CVPR,zhang2019zero,zuckerman2020across,zhang2019internal,ghosh2020depth,ulyanov2018deep}. They train a GAN on a single image, in an unsupervised way, and have shown to produce impressive generative diversity of results, as well as notable new generative tasks. Being fully convolutional, these single-image GANs learn the patch distribution of the single input image, and are then able to generate a plethora of new images with the same patch distribution. These include SinGAN~\cite{shaham2019singan} for generating a \emph{large diversity} of different image instances -- all sampled from the input patch distribution, InGAN~\cite{ingan} for flexible image retargeting, Structural-Analogies~\cite{benaim2020structural}, texture synthesis~\cite{jetchev2016texture,bergmann2017learning,zhou2018non, zhao2021solid}, and more~\cite{hinz2021improved,mastan2020dcil,mastan2021deepcfl,gur2020hierarchical,vinker2020deep,lin2020tuigan, chen2021mogan}. However, despite their remarkable capabilities (both diverse generated outputs and diverse new tasks), single-image GANs come with several heavy penalties compared to their simpler classical patch-based counterparts: (i)~They require very long training time (usually hours) for each input image and each task (as opposed to fast patch-based methods~\cite{barnes2009patchmatch}). \ (ii)~They are prone to optimization issues such as mode collapse. (iii)~They often produce poorer visual quality than the classical patch-based methods. Hence, while the course of history has taken the field of image synthesis, from the patch search methods to powerful GANs, it turns out that ``good-old'' patch-based methods are superior in many aspects. In this paper we suggest to reconsider simple patch nearest neighbors again, \emph{but with a new twist}, which allows to inject new Single Image GANs-like generative capabilities into nearest-neighbor patch-based methods, thus obtaining \emph{the best of both worlds}. We further analyze and characterize the pros and cons of these 2 approaches (patch nearest-neighbors vs. single-image GANs) in Sec.~\ref{sec:discussion}. We observe that the generative \emph{diversity} of single-image GAN methods (which classical methods lack), stems primarily from their \emph{unconditional} input at coarser image scales. We further observe that the main source of the above-mentioned drawbacks (slowness, mode-collapse, and poorer visual quality compared to classical methods) stems from the generative (GAN-based) module. We therefore suggest to ``drop the GAN'' \footnote{\noindent While we could not resist this wordplay, we do acknowledge that single-image GANs have several significant capabilities which cannot be realized by simple patch nearest-neighbors. We discuss these pros (and cons) in Sec.~\ref{sec:discussion}. No GANs were harmed in the preparation of this paper... {\large \smiley} }, and replace this module with a simple (upgraded) Patch Nearest-Neighbor (PNN) module, while maintaining the unconditional nature of GAN-based methods. This gives rise to a simple new \emph{generative} patch-based algorithm, which we call \emph{Generative Patch Nearest-Neighbor} (\textbf{GPNN}). Its noise input \niv{our input is not just noise, I think we can say "Its noise injected input..."} at coarse-levels yields \emph{diverse image generation}, of much higher quality and significantly faster than single-image GANs (with similar diversity). This is verified via extensive evaluations (Sec.~\ref{sec:results}). GPNN can perform the new generative tasks of single-image GANs, as well as the old classical tasks, in a single unified framework, without any training, in an optimization-free manner, within a few seconds. Unlike single-image GAN-based methods, GPNN is very fast ($\times 10^3$-$\times 10^4$ faster), and produces superior visual results (confirmed by extensive quantitative and qualitative evaluation). Unlike classical patch-based methods, GPNN enjoys the non-deterministic nature of GANs, their large diversity of possible outputs, and new generative tasks/capabilities. We demonstrate a wide range of applications of GPNN: first and foremost \emph{diverse image generation}, but also image editing, image retargeting, structural analogies, image collages, and a newly introduced task of ``conditional inpainting''. We show that GPNN produces results which are either comparable or of higher quality than any of the previous approaches (whether GAN-based or classical patch-based). We hope GPNN will serve as a new baseline for single image generation/manipulation tasks. \begin{figure}[b] \vspace*{-0.5cm} \centering \includegraphics[width=\columnwidth]{figures/fig2_new3_1col.jpg} \caption{\small \textbf{The GPNN method.} \textit{GPNN's multi-scale architecture is very similar to that of SinGAN~\cite{shaham2019singan}: Each scale consists of a single image generator $G$, that generates diverse outputs $y_n$ with similar patch distribution as the source $x_n$. The generation module $G$ (a GAN in~\cite{shaham2019singan}), is replaced here with a non-parametric PNN Generation Module. The coarsest level input is injected with noise.} } \label{fig:method} \end{figure} \vspace{-0.1cm} \smallskip\noindent Our contributions are therefore several fold: \begin{itemize}[topsep=0pt,itemsep=-1ex,partopsep=1ex,parsep=1ex,leftmargin=*] \item We show that ``good old'' patch nearest neighbor approaches can be cast as a generative model, which substantially outperforms modern single-image GANs -- both in quality \shai[(evaluated extensively with many measures)]{} and in speed \shai[(from hours to seconds)]{}. \niv{Shouldn't we state the measures? Or at least the user study?} \item We introduce such a casting -- GPNN, a new generative patch-based algorithm, as an alternative to single-image GANs, which provides a unified framework for a large variety of applications. \item We analyze and discuss the \emph{inherent pros \& cons} of the modern {GAN-based approaches} vs. classical {Patch-based approaches}. {We experimentally} characterize the extent to which single-image GANs perform nearest-neighbor extraction behind the scenes. \shai{shouldn't this be a new bullet?} \end{itemize} \section{Method}\label{sec:method} Our goal is to efficiently cast patch nearest neighbor search as a diverse single-image generative model. To achieve that, GPNN uses a multi-scale architecture with \emph{noise injected input} (Fig.~\ref{fig:method}(a); Sec.~\ref{sec:multi-scale}), similarly to SinGAN~\cite{shaham2019singan}. However, in each scale, GPNN uses a \emph{non-parametric} Patch Nearest Neighbor (PNN) Generation Module (Fig.~\ref{fig:method}(b), Sec.~\ref{sec:pnn}), as opposed to a full-scale GAN in SinGAN. PNN generates new images with similar patch distribution as the source image \emph{at that scale}. \subsection{Multi-scale Architecture}\label{sec:multi-scale} It was previously recognized (e.g.,~\cite{shaham2019singan, simakov2008summarizing, ingan, ren2016examplebased}), that different information is captured in each scale of an image -- from global arrangement at coarser scales, to textures and fine details at finer scales. To capture details from all scales, GPNN has a coarse-to-fine architecture (illustrated in Fig.~\ref{fig:method}(a)). Given a source image $x$, it builds a pyramid $\left\{x_0, \dots, x_N\right\}$, where $x_n$ is $x$ downscaled by a factor $r^n$ (for $r{>}1$; in our current implementation $r{=}\frac{4}{3}$). GPNN uses the same patch size $p \times p$ in all scales ($p{=}7$ in our implementation). Similarly to \cite{shaham2019singan}, the depth of the pyramid $N$ is chosen such that $p$ is approximately half of the image height. At scale $n$, a new image $y_n$ is generated by PNN Generation Module (see Fig.~\ref{fig:method}(b); Sec.~\ref{sec:pnn}), using \emph{real} patches from the source image at that scale $x_n$, guided by $\tilde{y}_{n+1}$, the initial guess. PNN enforces similarity between the internal statistics of the output image and source image at each scale. \begin{figure} \vspace*{-0.3cm} \centering \includegraphics[width=\columnwidth]{figures/fig4_new2_1col.jpg} \caption{\small \textbf{Algorithmic steps of PNN.}} \label{fig:pnn} \vspace{-0.5cm} \end{figure} In the coarsest level, the initial guess is the source image injected with noise (similarly to \cite{Elad_2017}), $\tilde{y}_{N+1} = x_N + z_N$, where $z_N \sim \mathcal{N}(0,\sigma^2)$ . The coarsest scale defines the arrangement of objects in the image. Injecting noise at that scale makes the nearest-neighbors search nearly random (the mean of the patches remains the same in expectation), hence induces diversity in the global arrangement, yet the PNN maintains coherent outputs. The use of different noise maps $z_N$ is the basis for the diverse image generation presented in Sec.~\ref{sec:results}, whereas different choices for the initial guess are the basis for a wide variety of additional applications we present in Sec.~\ref{sec:apps}. In finer scales, the initial guess is the upscaled output of the coarser level, $\tilde{y}_{n+1} = y_{n+1} {\uparrow^r}$. The output at each scale is a refinement of the coarser scale output. Hence, the final output $y=y_0$ shares the internal statistics of $x$ at all scales. \begin{figure*}[t!] \vspace*{-0.3cm} \centering \includegraphics[width=\textwidth]{figures/fig_generation_comparison.jpg} \caption[]{\small \textbf{Random Instance Generation Comparison:} \textit{(Please zoom in) Images generated by our method are compared with images generated by SinGAN~\cite{shaham2019singan}. Images generated by GPNN (2nd row) look very realistic, whereas SinGAN produces many artifacts (3rd row).} } \label{fig:generation_comparison} \vspace*{-0.5cm} \end{figure*} \subsection{\mbox{Patch Nearest Neighbors Generation Module}}\label{sec:pnn} The goal of the PNN Generation Module is to generate a new image $y_n$, based on an initial guess image $\tilde{y}_{n+1}$ and a source image $x_n$, such that the structure would be similar to that of $\tilde{y}_{n+1}$'s and the internal statistics would match that of $x_n$. To achieve that, PNN replaces patches from the initial guess $\tilde{y}_{n+1}$ with patches from the source image $x_n$. While this coarse-to-fine refinement strategy bears resemblance to that of classical patch-based methods, GPNN introduces 2 major differences (in addition to the unconditional input at coarse scales): \ (i)~A \emph{Query-Key-Value patch search strategy}, which improves the visual quality of the generated output; and \ (ii)~A new \emph{normalized patch-similarity measure}, which ensures visual completeness in an \emph{optimization-free} manner. These differences are detailed below. Classical patch-based methods use a Query-Reference scheme, where the query is the initial guess and the reference is the source image. Each \emph{query} patch (from the initial guess image) is replaced, or optimized to get closer to, a \emph{reference} patch (from the source image). This encourages similarity between the internal statistics of the output and the source. However, that scheme may fail when there is a significant distribution shift between query and reference patches. For example, when the query patches are blurry (due to upscaling the initial guess from a coarser resolution), they might be matched to blurry reference patches. To overcome this problem, PNN uses a Query-Key-Value scheme (see Figs.~\ref{fig:method}(b), \ref{fig:pnn}, similarly to \cite{vaswani2017attention}). Instead of comparing the query patch to a \emph{reference} patch and replacing it by that same patch (as done in classical methods), here the lookup patch and replacement patch are different. For each query patch $Q_i$ in $\tilde{y}_{n+1}$, we find its closest \emph{key} patch $K_j$ in a (blurry) upscaled version of the reference image \ben[$x_{n+1}{\uparrow^r}$]{$\tilde{x}_{n+1} = x_{n+1} {\uparrow^r}=\left(x_n{\downarrow_r}\right){\uparrow^r}$}, and replace it by its corresponding \emph{value} patch $V_j$ from the (sharp) source image at that scale, $x_n$. Key and value patches are trivially paired (have the same pixel coordinates). That way, blurry \emph{query} patches are compared with blurry \emph{key} patches, but are replaced with sharp \emph{value} patches. Another difference regards the metric used to find nearest-neighbors. In some applications (e.g. image retargeting), it is essential to ensure that no visual data from the input is lost in the generated output. This was defined by \cite{simakov2008summarizing} as visual \emph{completeness}. In \cite{simakov2008summarizing}, completeness is enforced using an iterative optimization process over the pixels. \mbox{InGAN} \cite{ingan} uses a cycle-consistency loss for this purpose (which comes at the expense of lost diversity). PNN enforces completeness using a \emph{normalized patch similarity score}, which replaces the common $L_2$-metric. This similarity score is used to find patch-nearest-neighbors, and favors \emph{key} patches that are not well-represented in the \emph{query}, practically encouraging visual completeness in an optimization-free manner, as detailed in step 3 of the algorithm summary below. \\ \begin{figure} \centering \includegraphics[width=\columnwidth]{figures/fig_generation_1col_2.jpg} \caption[]{\small \textbf{Diverse Image Generation:} \textit{(Please zoom in) Random images produced by GPNN from a single input (marked in red).} } \label{fig:generation} \vspace*{-0.7cm} \end{figure} \begin{table*}[h] \vspace{-0.3cm} \hspace{-0.15cm} \begin{adjustbox}{max width=1.02\textwidth} \begin{tabular}{clccccccccr} \toprule \multirow{2}{*}{\textbf{Dataset}} & \multirow{2}{*}{{\textbf{Method}}} & \textbf{SIFID} $\downarrow$ & \textbf{NIQE} $\downarrow$ & \multicolumn{2}{c}{\textbf{Confusion-Paired [$\%$]} $\uparrow$} & \multicolumn{2}{c}{\textbf{Confusion-Unpaired [$\%$]} $\uparrow$} & \textbf{Realism competition [$\%$]} $\uparrow$ & \textbf{Diversity} & \textbf{Runtime} $\downarrow$ \\ &&\cite{shaham2019singan}&\cite{mittal2012making}&Time Limit& No Time Limit &Time Limit& No Time Limit& GPNN vs. SinGAN &\cite{shaham2019singan}&[sec] \\ \midrule & SinGAN ($N$) & 0.085 & 5.240 & 21.5$\pm$1.5 & 22.5$\pm$2.5& 42.9$\pm$0.9 & 35.0$\pm$2.0 & 28.1$\pm$2.2 & 0.5 & 3888.0 \\ & \textbf{GPNN} ($\sigma{=}1.25$) & {\textbf{0.071}} & {\textbf{5.049}} & {\textbf{44.7}}$\pm$1.7 & {\textbf{38.7}}$\pm$2.0 & {\textbf{47.6}}$\pm$1.5 & {\textbf{45.8}}$\pm$1.6 & \textbf{71.9}$\pm$2.2 & 0.5 & \textbf{2.1} \\ \cmidrule{2-11} & SinGAN ($N{-}1$) & 0.051 & 5.235 & 30.5$\pm$1.5 & 28.0$\pm$2.6 & {\textbf{47}}$\pm$0.8 & 33.9$\pm$1.9 & 32.8$\pm$2.3 & 0.35 & 3888.0\\ \multirow{-4}{*}{\shortstack{Places50 \\ \cite{zhou2016places, shaham2019singan}}} & \textbf{GPNN} ($\sigma{=}0.85$) & {\textbf{0.044}} & {\textbf{5.037}} & {\textbf{47}}$\pm$1.6 & {\textbf{42.6}}$\pm$1.7 & {\textbf{47}}$\pm$1.4 & {\textbf{45.9}}$\pm$1.6 & \textbf{67.2}$\pm$2.3 & 0.35 & \textbf{2.1}\\ \midrule & SinGAN ($N$) & 0.133 & 6.79 & 28.0$\pm$3.3 & 12.0$\pm$2.3 & 35.9$\pm$2.7 & 39.9$\pm$2.7 & 41.7$\pm$3.3 & 0.49 & 3888.0 \\ \multirow{-2}{*}{SIGD16} & \textbf{GPNN} ($\sigma{=}0.75$) & {\textbf{0.07}} & {\textbf{6.38}} & {\textbf{46.6}}$\pm$2.6 & {\textbf{43.3}}$\pm$2.7 & {\textbf{46.3}}$\pm$2.6 & {\textbf{46.8}}$\pm$2.4 & \textbf{59.3}$\pm$3.3 & 0.52 & \textbf{2.1} \\ \bottomrule \end{tabular} \end{adjustbox} \caption{\small \textbf{Quantitative Evaluation}. \textit{We evaluate our results over two datasets: The Place50 images used in the evaluation of~\cite{shaham2019singan}, and our new SIGD dataset (see text). We use a variety of measures: NIQE (unpaired image quality assessment)~\cite{mittal2012making}, SIFID - single image FID~\cite{shaham2019singan}, and human evaluations through an extensive user-study (see text). We repeat the evaluation for multiple diversity levels (measured as proposed by~\cite{shaham2019singan}). The table shows GPNN outperforms SinGAN by a large margin in every aspect: Visual quality, Realism, and Runtime.} } \label{table:comparison} \vspace*{-0.5cm} \end{table*} \vspace{-0.3cm} \noindent\mbox{\scalebox{0.95}[1]{\underline{PNN consists of 6 main algorithmic steps (numbered in Fig.~\ref{fig:pnn})}:}} \begin{enumerate}[topsep=5pt,itemsep=-1ex,partopsep=1ex,parsep=1ex, leftmargin=*, wide=0pt] \item \textbf{Extract patches:} PNN receives a sharp source image $x_n$ and an initial guess $\tilde{y}_{n+1}$ (which is an upscaled version of the generated output from the previous scale, hence somewhat blurry). Patches from the initial guess are extracted into the \emph{query} pool of patches (denoted as $Q$). Nearest neighbors of the blurry query patches are searched in the similarly-blurry image obtained by upscaling the coarser source image, $\tilde{x}_{n+1}$ (Fig.~\ref{fig:method}(b)). Its patches are denoted as the \emph{key} pool of patches ($K$). The corresponding sharp patches are then extracted from the sharp source image $x_n$, and are denoted as the \emph{value} pool of patches ($V$). The only exception is the coarsest image scale ($n{=}N$), where we use the value patches as keys ($K=V$). The keys and values are ordered in the same way to maintain correspondences (patches from the same location have the same index in both pools). Patches are overlapping, so the same pixel can appear in multiple patches. \item \textbf{Compute Distances:} The MSE distance between each query patch $Q_i$ and each key patch $K_j$ is computed, and stored in the distances matrix $D_{i,j}$. \shai[Classical patch methods used this metric for nearest neighbor search. However, this one-directional metric on its own cannot ensure the \emph{completeness} term (for example, in Fig.~\ref{fig:pnn}(2), all queries are mapped to the same key, marked in red). In \cite{simakov2008summarizing} this was addressed by optimizing a bidirectional similarity measure. In PNN we solve this in an \emph{optimization-free} manner by using the \emph{normalized score} below.]{} We utilize the parallel nature of computing $D_{i,j}$, and run it on GPU for speed. \item \textbf{Compute Normalized Scores:} To encourage visual completeness, PNN uses a similarity score that favors key patches that are missing in the queries. This increases their chance to be chosen and appear in the output, and thereby improve \emph{Completeness}. The score normalizes the distance with a per-key factor: \vspace*{-0.2cm} \begin{equation} \label{eq:normalizedScore} S_{i,j} = \frac{D_{i,j}}{\alpha + \min_{\ell}{D_{\ell,j}}} \vspace*{-0.2cm} \end{equation} Intuitively, when a key patch $K_j$ is missing in the queries, the normalization term would be large and the score would be smaller. On the other hand, when a key patch appears in the queries, the normalization factor would get closer to $\alpha$. The parameter $\alpha$ is used as a knob to control the degree of completeness, where small $\alpha$ encourages completeness, and $\alpha \gg 1$ is essentially the same as using MSE. \shai[Note that this process requires no optimization (as opposed to \cite{simakov2008summarizing}).]{} \item \textbf{Find NNs:} For each query patch $Q_i$, we find the index of its closest \emph{key} patch, i.e. $j_{nn}(i) = \argmin_{\ell}{S_{i,\ell}}$. \item \textbf{Replace by NNs:} \shai[Using the Query-Key-Value scheme, w]{}We replace each query patch $Q_i$ with the value of its nearest neighbor, $V_{j_{nn}(i)}$. The output is denoted as $O_i$. \item \textbf{Combine Patches:} Overlapping patches are combined into an image. Pixels that appear in multiple overlapping patches are aggregated using a gaussian weighted-mean. \end{enumerate} Note that combining very different overlapping patches may cause inconsistencies and artifacts. To mitigate these inconsistencies, PNN is applied $T$ times at each scale (in our implementation $T{=}10$). In the first iteration, the initial guess is as explained above. In further iterations, the previous output (without upscaling) is used as initial guess. \ben[These iterations diffuse information from nearby patches, and help to obtain coherent final output.]{} \vspace{0.3cm} \textbf{Runtime:} A key advantage of GPNN over GAN-based methods (e.g., SinGAN~\cite{shaham2019singan}, InGAN~\cite{ingan}, Structural Analogies~\cite{benaim2020structural}) is its short runtime. While GAN-based methods require a long training phase (hours \emph{per image}), GPNN uses a non-parametric generator which needs no training. Thus, SinGAN takes about $1$ \emph{hour} to generate a 180$\times$250 sized image, whereas GPNN does so in $2$ \emph{seconds} (see Table~\ref{table:comparison}). \begin{figure*} \vspace*{-0.3cm} \centering \includegraphics[width=\textwidth]{figures/fig_retargeting3.jpg} \caption{\small \textbf{Retargeting:} \textit{(Please zoom in) Top rows show retargeted images by our method. Patch distribution is kept when retargeting to various target shapes. Bottom row shows comparison with previous patch-based \cite{avidan2007seam},\cite{simakov2008summarizing} and GAN-based \cite{ingan} methods.}} \label{fig:retargeting} \vspace*{-0.5cm} \end{figure*} \section{Results \& Evaluation} \label{sec:results} We evaluate and compare the performance of GPNN to SinGAN~\cite{shaham2019singan} on the main application of \emph{random image generation}. We first follow the exact same evaluation procedure of SinGAN \cite{shaham2019singan}, with the same data. We then add more measures, more tests and introduce more data. We show substantial supremacy in Visual-Quality and Realism with a large margin, both quantitatively and qualitatively, over all measures and datasets. The complete set of results can be found in the supplementary material. Runtime of GPNN is shown to be 3 orders of magnitude faster. \noindent \textbf{Data:} \ We evaluate our performance on 2 datasets. The first is the set of 50 images used in SinGAN~\cite{shaham2019singan} for their evaluation (50 images from Places365 dataset~\cite{zhou2016places}). The second is a new benchmark we introduce, Single Image Generation Dataset (SIGD) -- a set of 16 images that well exemplify a variety of different important aspects of single image generation tasks (visual aspects not represented in the structural Places images). These include: 7 images extracted from figures in the SinGAN paper~\cite{shaham2019singan}, 2 images from the Structural Analogies paper~\cite{benaim2020structural} and 7 more we collected from online sources. These SIGD images are characterized by having many more conceivable versions per image than Places images, hence are more suited for comparing the quality of random image generation by different methods. \vspace{0.1cm} \noindent \textbf{Visual Results:} \ Fig.~\ref{fig:generation} shows GPNN results for diverse image generation, which highlight 3 characteristics of GPNN: (i)~\textit{Visual quality}: The results are sharp looking with almost no artifacts (please zoom-in). (ii)~\textit{Realistic structure}: The generated images look real, the structures make sense (iii)~\textit{Diversity}: GPNN produces high diversity of results (e.g., diverse architectures of the building), while maintaining the above 2 characteristics. Fig.~\ref{fig:teaser}~(top-left) further shows results of GPNN on SinGAN's pivotal examples in their paper~\cite{shaham2019singan}. Fig.~\ref{fig:generation_comparison} shows a visual comparison of GPNN to SinGAN. Images generated by GPNN look very realistic, whereas SinGAN often produces artifacts/structures that make no sense (note that birds and branches generated by GPNN look very realistic despite the different ordering of the birds on the branch, while SinGAN doesn't maintain realistic structures). \noindent \textbf{Quantitative evaluation:} \ Table.~\ref{table:comparison} shows quantitative comparison between GPNN and SinGAN. All generated images are found in the supplementary material. We use the SIFID measure~\cite{shaham2019singan} to measure the distance between the source and the generated image patch distributions, as well as NIQE~\cite{mittal2012making} for reference-free quality evaluation. GPNN has much greater flexibility in choosing the degree of diversity (by tuning the input noise). However, for fair comparison, we adjusted the input noise level in GPNN so that its diversity level matches that of SinGAN's results. Diversity is measured as proposed by SinGAN: pixelwise STD over 50 generated images. On SinGAN's places50 dataset we achieve clear superiority in both measures (SIFID \& NIQE), for both levels of diversity used in SinGAN. The margin is even larger on the SIGD dataset. \vspace{0.1cm} \noindent \textbf{Qualitative Evaluation -- Extensive User-Study:} Table~\ref{table:comparison} displays the results of our user-study, conducted using Amazon Mechanical Turk platform. \mbox{Our surveys composed of:} 2 setups (paired \& unpaired) \textbf{$\times$} 2 datasets (Places50~\cite{shaham2019singan} \& SIGD) \textbf{$\times$} multiple diversity levels \textbf{$\times$} 2 temporal modes (Time limit \& No time limit). Altogether, these resulted in \emph{27 different surveys, each answered by 50 human raters}. The number of questions in each survey equals the number of images in the dataset. Results are summarized in Table~\ref{table:comparison}. \noindent\emph{\underline{paired / unpaired setups}}: In the paired setup, the ground-truth image and a generated image are shown side-by-side in random order. The rater is asked to determine which one is real. In the unpaired setup, a single image is shown (real or generated), and the rater has to decide whether it is real or fake. In both setups we report the percent of trials the rater was ``fooled" (hence, the highest expected score is 50\%). The above setups were applied separately to GPNN and SinGAN. In addition, we also ran a \emph{Realism competition} where the rater has to decide which image looks more realistic, in a paired survey of GPNN-vs-SinGAN (here the highest possible score is 100\%). \noindent\emph{\underline{Time limit / No time limit}}: We first followed the time-limited setup of SinGAN's user study~\cite{shaham2019singan}, which flashed each image for only 1 second (``Time limit"). We argue that $1sec$ makes it hard for raters to notice differences, resulting in a strong bias towards chance (50\%) for any method. We therefore repeat the study also with unrestricted time (``No time limit''). \noindent\emph{\underline{Results}}: GPNN scores significantly higher than SinGAN in all setups (Table~\ref{table:comparison}). Moreover, in the unlimited-time surveys (when the human rater had more time to observe the images), SinGAN's ability to ``fool'' the rater significantly drops, especially in the unpaired case. In contrast, having no time-limit had a very small effect on GPNN's confusion rate. \michal{Looking at the table, I don't think we can claim these last 2 sentences.} In all surveys GPNN got results very close to chance level ($50\%$). The fact that an observer with unlimited time can rarely distinguish between real and GPNN generated images, implies high realism of the generated results. Finally, in the direct GPNN-vs-SinGAN survey (unlimited time), GPNN's results were selected as more realistic than SinGAN's for most images in all surveys. \begin{figure} \includegraphics[width=\columnwidth]{figures/fig_analogies3_1col_1.jpg} \caption{\small \textbf{Structural Analogies:} \textit{(Please zoom in) Red arrow indicates the `structure', while black arrow indicates the `source' (defining the patch distribution to match). GPNN is compared to~\cite{benaim2020structural}. GPNN can also generate sketch-to-image instances (right). }} \label{fig:structural_analogies} \vspace*{-0.6cm} \end{figure} \section{Additional Applications} \label{sec:apps} In addition to diverse image generation, GPNN gives rise to many other applications (old and new), all within a \emph{single unified framework}. The different applications are obtained simply by modifying a few basic parameters in GPNN, such as the pyramid depth $N$, the initial guess at the coarsest level $\tilde{y}_{N+1}$, and the choice of the hyper-parameter $\alpha$ in Eq.~\ref{eq:normalizedScore}. We next describe each application, along with its design choices. \vspace*{0.1cm} \noindent \textbf{Retargeting:} The goal is to resize the single source image to a target size (smaller or larger; possibly of different aspect ratio), but \emph{maintain the patch distribution of the source image} (i.e., maintain the size, shape and aspect-ratio of all small elements of the source image) \cite{ingan, simakov2008summarizing, barnes2009patchmatch}. GPNN starts by naively resizing the input image to the target size, and downscale it by a factor of $r^N$, this is inserted as the initial guess $\tilde{y}_{N+1}$. The pyramid depth $N$ might change according to the objects size in the image, but it's usually chosen such that the smaller axis of the image at the coarsest pyramid level is roughly $\times 4$ GPNN's patch size $p$. For retargeting, we wish to retain as much visual information as possible from the source image, and hence $\alpha$ in Eq.~\ref{eq:normalizedScore} is set to a small value (e.g., $\alpha=.005$), thus promoting ``Completeness''. To get better final results, the described process is done gradually (similarly to \cite{simakov2008summarizing}), i.e. resizing in a few small steps. Results for retargeting can be seen in Fig.~\ref{fig:retargeting} and \ref{fig:teaser}. Fig.~\ref{fig:retargeting} further compares the performance of our method with that of \cite{ingan, simakov2008summarizing, avidan2007seam}. GPNN produces results which are more realistic, and with less artifacts. \vspace*{0.1cm} \noindent \textbf{Image-to-image and Structural Analogies:} We demonstrate image-to-image translations of several types. There exist many approaches and various goals and brandings for image-to-image translations; Style-transfer, domain-transfer, structural-analogies \cite{ulyanov2017improved, gatys2016image, kolkin2019style, zhu2017unpaired, johnson2016perceptual, isola2017image, liao2017visual, Elad_2017}. Given two input images $\mathnormal{A}$ and $\mathnormal{B}$, we wish to create an image with the patch distribution of $\mathnormal{A}$, but which is structurally aligned with $\mathnormal{B}$. Namely, a new image where all objects are located in the same locations as in $\mathnormal{B}$, but with the visual content of $\mathnormal{A}$. For that, GPNN sets the source image $x$ to be $\mathnormal{A}$. Our initial guess $\tilde{y}_{N+1}$, is chosen as $\mathnormal{B}$ downscaled by $r^N$. This guess sets the overall structure and location of objects, while GPNN ensure that the output has similar patch distribution to $A$. The pyramid depth $N$ may change between pairs of images according to the change in object sizes. The output should contain as much visual data from $\mathnormal{A}$ (e.g., in the bottom-left pair in Fig.~\ref{fig:structural_analogies}, it is desired that many types of balloons will appear in the output), hence we set $\alpha$ in Eq.~\ref{eq:normalizedScore} to be small (e.g., $\alpha=.005$). Finally, for refinement of the output, the output is downscaled by $r^N$ and re-inserted to GPNN. Results can be found in Fig. \ref{fig:structural_analogies}. Our method creates new objects at the locations of objects of image $\mathnormal{B}$, while the output image seems to be from the distribution of image $\mathnormal{A}$ as desired. GPNN works well also for sketch-to-image instances as shown. Compared to the GAN-based method of \cite{benaim2020structural}, our results suffer from less artifacts, and are more reliable to the style of the source image $\mathnormal{A}$ (e.g., the ``S'' image in Fig. \ref{fig:structural_analogies}). In addition to providing superior results, GPNN is also several orders of magnitude faster than \cite{benaim2020structural}. \vspace*{0.1cm} \noindent \textbf{Conditional Inpainting:} Similarly to the well studied inpainting task, in this task an input image with some occluded part is received, and the missing part should be reconstructed. However, in our suggested conditional version, in addition to regular image completion, the user can further steer the way the missing part is filled. This is obtained by the user marking the image region to be completed, with a region of \emph{uniform color of choice}, which is the "steering direction" (e.g., blue to fill sky, green to guide the completion toward grass, etc.). This will be the source image $x$. Note that GPNN gets the mask of the occluded part, hence does not use patches which originated from there. The initial guess $\tilde{y}_{N+1}$ is set to be a downscaled version of $x$ by $r^N$. The number of pyramid levels $N$ is chosen such that the occluded part in the downscaled image is roughly $p \times p$ (the size of a single patch). PNN applied at the coarsest level replaces the masked part coherently with respect to the chosen color. In finer levels, details and textures are added. In this task, completeness is not required, hence a large $\alpha$ is set in Eq.~\ref{eq:normalizedScore}. Fig.~\ref{fig:teaser}, show the choice of different colors for the same masked region indeed affects the outcome, while maintaining coherent and visually appealing images. \vspace*{0.1cm} \noindent \textbf{Image Collage:} This task, previously demonstrated in~\cite{simakov2008summarizing}, aims to \emph{seamlessly} merge a set of $n$ input images $\{{x^i}\}_{i=1}^n$ to a single output image, so that no information/patch from the input images is lost in the output (``Completeness''), yet, no new visual artifacts that did not exist in the inputs are introduced in the output (``Coherence''). We create the initial guess $\tilde{y}_{N+1}$ by first naively concatenating the input images. Then, we use the same design as for retargeting, with a single change - GPNN extracts patches from all the source images (rather than from a single source image in retargeting). Fig.~\ref{fig:collage} shows a collage produced by GPNN, on an example taken from~\cite{simakov2008summarizing}. Compared with~\cite{simakov2008summarizing}, our results are sharper and more faithful to the inputs. \vspace*{0.1cm} \noindent \textbf{Image Editing:} In image editing/reshuffling~\cite{simakov2008summarizing, shaham2019singan}, one makes a change in the image (move objects, add new objects, change locations, etc.), and the goal is to seamlessly blend the change in the output image. We use the unedited original image as the source image $x$, and a downscaled version of the edited image by $r^N$ as the initial guess $\tilde{y}_{N+1}$. Completeness is not required in this task (e.g., if the edit removes an object), thus we set $\alpha$ in Eq.~\ref{eq:normalizedScore} to be large. The depth $N$ of pyramid is set such that the edited region covers roughly the size of a single patch ($p \times p$) in the coarsest scale. Similarly to inpainting, the area around and inside the edited region is "corrected" by our algorithm to achieve coherence. Noise may be added at the coarsest level, to allow for different coherent solutions given a single input. Fig.~\ref{fig:editing} shows our editing results compared to SinGAN's \cite{shaham2019singan}. Our results tend to be less blurry (especially visible around the edited region). \narrowstyle \section{\mbox{{GANs vs. Patch Nearest-Neighbors: Pros \& Cons}}} \label{sec:discussion} \normalstyle The experiments in Secs.~\ref{sec:results} and~\ref{sec:apps} show striking superiority of GPNN compared to single-image GANs, both in visual-quality and in run-time (while having comparable diversity). This section first analyzes the source of these surprising \emph{inherent advantages} of simple classical patch-based methods (exemplified through GPNN). Nevertheless, single-image GANs have several significant capabilities which \emph{cannot be realized} by simple patch nearest-neighbor methods. Hence, despite the title of our paper, you may not always want to ``Drop the GAN''... These \emph{inherent limitations} of classical patch-based methods (GPNN included) are also discussed. \subsection*{\underline{Advantages}} \label{sec:advantages} \vspace{-0.2cm} \noindent The advantages of Patch-based methods over GANs stem primarily from one basic fundamental difference: Single-image GANs \emph{implicitly learn} the patch-distribution of a single image, whereas classical Patch-based approaches \emph{explicitly maintain} the entire patch-distribution (the image itself), and directly access it via patch nearest-neighbor search. This fundamental difference yields the following advantages: \begin{figure}[t] \vspace*{-0.1cm} \centering \includegraphics[width=\columnwidth]{figures/fig_collage2.jpg} \caption{\small \textbf{Collage:} \textit{Multiple input images are seamlessly combined into a single coherent output, maintaining visual information from all inputs. Note the higher quality of GPNN compared to Bidiectional-Similarity~\cite{simakov2008summarizing}. \textcolor{red}{The 3 input images are found in Fig.\ref{fig:teaser}.}} } \label{fig:collage} \vspace*{-0.5cm} \end{figure} \vspace*{0.1cm} \noindent\textbf{Visual Quality:} An output image produced by patch nearest-neighbor search, is \emph{composed of original image patches} pulled out directly from the input image. In contrast, in GANs the output is \emph{synthesized via an optimization process}. GPNN thus produces images whose patches are more faithful to the original input patches than GANs. This yields sharper outputs (almost as sharp as the input), with fewer undesired visual artifacts (please zoom in on Fig.~\ref{fig:generation_comparison}, \ref{fig:editing} to compare). \noindent\textbf{Runtime:} Since no training takes place, the runtime of patch-based methods reduces \emph{from hours to seconds} compared to GANs (Table~\ref{table:comparison}). Moreover, since nearest-neighbor search can be done independently and in parallel for different image patches, this naturally leverages GPU computing. \noindent\textbf{Visual Completeness:} While GANs are trained to produce patches of high likelihood (thus encouraging output \textit{Coherence} to some extent), no mechanism enforces \textit{Completeness} (i.e., encourage all patches of the input image to appear in the output image). Lack of Completeness is further intensified by the natural tendency of GANs to suffer from mode collapse. In contrast, classical patch-based methods can explicitly enforce Completeness, e.g., by optimizing \emph{Bidirectional patch similarity} between the input and output image~\cite{simakov2008summarizing}, or in an optimization-free manner by using GPNN's \emph{patch-specific} normalized score (Eq.~(\ref{eq:normalizedScore})). InGAN~\cite{ingan} has successfully introduced Completeness into GANs, by training a \emph{conditional} single-image GAN via an encoder-encoder scheme with a reconstruction loss. However, this came with a price: lack of diversity in the generated outputs. In contrast, GPNN is able to promote both Completeness \& Coherence, as well as large output diversity. There is an \emph{inherent trade-off between the Completeness and Diversity}. The $\alpha$ parameter in Eq.~(\ref{eq:normalizedScore}) thus provides a ``knob'' to control the degree of desired Completeness in GPNN (according to the image/application at hand). Despite this new flexibility of GPNN compared to GANs, all experiments in Table~\ref{table:comparison} were performed with a fixed $\alpha$ (for fairness). \noindent\textbf{Visual Coherence (realistic image structures):} The iterative nearest-neighbor search of classical patch-based methods prevents forming adjacency of output patches that are not found adjacent in the input image (for any image scale). This tends to generate realistic looking structures in the output. In contrast, such tendency for coherence is only weakly enforced in GANs. Proximity between unrelated patches may emerge in the generated output, since the generator is fully convolutional with limited receptive field. The generator typically generates mitigating pixels, hopefully with high likelihood. This often results in incoherent non-realistic image structures and artifacts that do not exist in the input image. See examples in Fig.~\ref{fig:generation_comparison} and in Supplementary-Material. \begin{figure}[t] \vspace*{-0.5cm} \centering \includegraphics[width=\columnwidth]{figures/fig_editing.jpg} \caption{\small \textbf{Image Editing:} \textit{A naively edited image is injected to our pyramid of PNNs. Compared with the results of \cite{shaham2019singan}.}} \label{fig:editing} \vspace*{-0.5cm} \end{figure} \noindent\textbf{Controlling diversity vs. global structure:} There is a natural trade-off between high output diversity and preserving global image structure. The magnitude $\sigma$ of the noise added in GPNN to the coarsest scale of the input image, provides a simple user-friendly ``knob'' to control the degree of desired output diversity. It further yields a natural \emph{continuum} between large diversity (high noise) and global structural fidelity (low noise). GANs, on the other hand, do not hold any mechanism for controlling the preservation of global structure (although there are some inductive biases that tend to preserve global structure implicitly~\cite{xu2020positional}). While GANs may support a few discrete levels of diversity (e.g.,~\cite{shaham2019singan} demonstrates 2 diversity levels), this diversity is not adjustable. \subsection*{\underline{Limitations}} \label{sec:limitations} \vspace{-0.2cm} \noindent\textbf{Generalization:} Classical patch-based methods use a \emph{discrete} patches distribution. GANs on the other hand learn a \emph{continuous} distribution. GANs can therefore generate novel patches with high likelihood from the learned distribution. This capability is lacking in patch-based methods. Such generalization can be advantageous (e.g., image harmonization~\cite{shaham2019singan}), but may also be disadvantageous, as it frequently generates undesired artifacts (see above). \begin{figure} \vspace*{-0.5cm} \centering \includegraphics[width=0.95\columnwidth]{figures/fig_discussion_1col.jpg} \caption{\small \textbf{Are GANs ``Fancy Nearest Neighbors Extractors"?} {\it Input image (\textcolor{in_red}{red}), reference (\textcolor{ref_blue}{blue}), GPNN generated (\textcolor{gpnn_purple}{purple}), SinGAN generated (\textcolor{gan_green}{green}). Please see text for details.} } \label{fig:discussion} \vspace*{-0.5cm} \end{figure} \noindent\textbf{Continuous output generation:} Neural networks are continuous functions. Small change in the latent input causes a small divergence in the generated output. This enables latent space interpolation and other smooth manipulations, such as single image animation~\cite{shaham2019singan}, or smooth resizing animation~\cite{ingan}. In contrast, nearest neighbor search is discrete in nature. This prevents naively performing continuous interpolation or animation in classical patch-based methods. \noindent\textbf{Mapping to patches vs. Mapping to pixels:} In classical nearest-neighbor methods (including GPNN), the nearest-neighbor search maximizes the quality of the extracted patches, but not the quality of the final output pixels. The formation of the output image typically involves heuristic averaging of overlapping patches. This may introduce some local blurriness in patch-based methods. GAN discriminators also judge {output patches} in the size of their receptive field. However, since the generators receive pixel-based gradients, they can \emph{optimize directly for each output pixel}. \assaf{Originally I mentioned SR in this context. I think we should since one possible question a reviewer may ask is what about SR since demonstrated in SinGAN. I think we would be doing ourselves a big favor if we mention the apps we cannot do in the eubmission rather than in the rebuttal.} \subsection*{Are GANs ``Fancy Nearest Neighbors Extractors"?} \noindent It has been argued that GANs are only elaborated machinery for nearest neighbors retrieval. In \emph{single-image} GANs, the ``dataset" is small enough (a single image), providing an excellent opportunity to quantitatively examine this claim. Fig.~\ref{fig:discussion} shows two generated random instances of the same input image (red), once using SinGAN (green) and once using GPNN (purple). We also added a reference image (blue) of the same scene taken a slightly different position/time representing an ``ideally" new generated instance. We measured the distance between the generated patches to their nearest neighbors in the input image and plotted the histograms of these distances (MSE). We repeated this experiment twice for 2 different input images. It is easy to see that the GAN-generated patch distribution behaves more like the reference distribution than the patch nearest neighbor generated distribution. That is, GANs are capable of generating new samples beyond nearest neighbors. However, this capability of GANs comes with a price, its newly generated instances suffer from blur and artifacts (\emph{please zoom in}). In contrast, GPNN generated samples has higher fidelity to the input (the histogram is peaked at zero), resulting with higher output quality, but at a limited ability to generate novel patches. \section{Acknowledgements} This project received funding from the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (grant agreement No 788535). Dr Bagon is a Robin Chemers Neustein AI Fellow. \clearpage {\small \bibliographystyle{ieee_fullname}
\section{Introduction} A recent development in motivic homotopy theory is the theory of framed transfers, introduced in \cite{voevodsky2001notes} and studied further in \cite{garkusha2014framed}, \cite{deloop1} and other works. The fundamental results of this theory are as follows. First, the \emph{reconstruction theorem} \cite[Theorem~3.5.12]{deloop1} states that every generalized motivic cohomology theory has a unique structure of (coherent) framed transfers, i.e., has covariance along finite syntomic maps of schemes equipped with a trivialization of the cotangent complex. Second, the \emph{motivic recognition principle} \cite[Theorem~3.5.14]{deloop1} shows that every $\P^1$-connective (also called ``very effective") motivic spectrum is a suspension spectrum on its infinite $\P^1$-loop space, when framed transfers on the space are taken into account. With these tools in hand, several important motivic spectra can be described geometrically as framed suspension spectra of certain moduli stacks of schemes. For example, the algebraic cobordism spectrum is the framed suspension spectrum of the stack of finite syntomic schemes \cite[Theorem~3.4.1]{deloop3}, and the effective algebraic K-theory spectrum is the framed suspension spectrum of the stack of finite flat schemes \cite[Theorem~5.4]{robbery}. From the point of view of moduli of schemes, there are three natural conditions of interest: Cohen--Macaulay, Gorenstein, and local complete intersection, see~\cite[Chapters~8--9]{HarDeform}. Being Cohen--Macaulay is automatic for finite schemes, so by the discussion above, the first and third conditions relate to algebraic K-theory and algebraic cobordism, respectively. In this article, we connect the second condition, being Gorenstein, to another important cohomology theory, namely, hermitian K-theory. We show that, over a field of characteristic not $2$, hermitian K-theory is the framed suspension spectrum of the stack of finite Gorenstein algebras equipped with an \emph{orientation}, meaning a trivialization of the dualizing line bundle (Theorem~\ref{thm:KQ-kq-FGor}): \[\kq \simeq \Sigma^\infty_\fr \FGor^\o.\] This identification allows us to complete the description of all well-known generalized motivic cohomology theories as motivic spectra with framed transfers, which we summarize in \sectsign\ref{ssec:big} below (see also Theorem~\ref{thm:all mot spectra}). The infinite $\P^1$-loop space of $\kq$ is motivically equivalent to the group completion of the stack $\Vect^\sym$ of vector bundles with a non-degenerate symmetric bilinear form. Using the motivic recognition principle, the equivalence $\kq \simeq \Sigma^\infty_\fr \FGor^\o$ follows from the fact that the forgetful map of commutative monoids $\FGor^\o \to \Vect^\sym$ induces an $\A^1$-equivalence after group completion (Theorem~\ref{thm:main-gp}); the $\A^1$-inverse map is given by sending a symmetric vector bundle $V$ to $[V \oplus \Oo[x]/x^2] - [\Oo[x]/x^2] $. To prove this result, we employ several explicit $\A^1$-homotopies. A key ingredient is the intermediate notion of an \emph{isotropically augmented} oriented Gorenstein algebra, which is a condition that allows to split off a copy of the dual numbers in a controlled way. We would like to emphasize that, although Theorem~\ref{thm:main-gp} is analogous to~\cite[Theorem~3.1]{robbery}, the proof in \emph{loc.\ cit.}\ cannot be applied in the hermitian context. Indeed, while the square-zero extension functor $\Vect_d \to \FFlat_{d+1}$ is an $\A^1$-equivalence, the analogous functor $\Vect^\sym_d \to \FGor^\o_{d+2}$, which adds a copy of the dual numbers, is not an $\A^1$-equivalence; we show this explicitly for the base field $\bR$ in Proposition~\ref{prop: square zero ext over R}. Instead, $\Vect^\sym_d$ is $\A^1$-equivalent to the substack of \emph{isotropic} oriented Gorenstein algebras $\FGor^{\o,0}_{d+2}$, defined by the condition that the orientation vanishes at the unit. As a corollary of our results, we get a Hilbert scheme model for the Grothendieck–Witt space $\GWspace$ (Corollary~\ref{cor:Hilb-FGor}): we show that it is motivically equivalent to $\Z \times \Hilb_\infty^{\Gor,\o}(\A^\infty)$, where $\Hilb_d^{\Gor,\o}(\A^n)$ is the Hilbert scheme of degree $d$ finite Gorenstein subschemes of $\A^n$ equipped with an orientation. We also give a new proof of the motivic equivalence $\GWspace \simeq \Z\times \GrO_\infty$ due to Schlichting and Tripathi \cite{SchlichtingTripathi}, where $\GrO_d$ is the orthogonal Grassmannian (see Corollary~\ref{cor: Vect^bil and GrO}). A notable difference between these two models is that, when 2 is not invertible, the oriented Hilbert scheme gives the ``genuine symmetric'' variant of Grothendieck--Witt theory defined in \cite{HermitianI,HermitianII}, whereas the orthogonal Grassmannian corresponds to the ``genuine even'' variant. \begin{rem} None of the techniques in this paper require $2$ to be invertible. This assumption only appears in statements that involve the motivic spectra $\KQ$ or $\kq$, which so far have only been defined over $\Z[\tfrac 12]$-schemes (see however Remark~\ref{rem:2}). \end{rem} Our arguments have an unexpected direct application to complexity theory. One of the central problems there is bounding the asymptotic complexity of matrix multiplication~\cite{burgisser_clausen_shokrollahi, Landsberg__complexity_book}. The current algorithm giving the upper bound (called the \emph{laser method}) rests on the existence of certain tensors of minimal border rank, most notably the big Coppersmith--Winograd tensor $\mrm{CW}_q$. In Corollary~\ref{cor:degTensors} we show that \emph{every} $1$-generic tensor of minimal border rank degenerates to $\mrm{CW}_q$, thus the latter is the most degenerate one; it has the smallest value, which is very surprising given that the whole algorithm depends critically on the value of $\mrm{CW}_q$. Equally surprising is the fact that this result is seemingly not known to researchers in tensor world, even though it is much easier to obtain than our main results, since the degeneration need not be canonical. Oriented Gorenstein algebras are also called commutative Frobenius algebras and appear in a different context: they classify 2-dimensional topological field theories~\cite[Section~1.1]{LurieTFT}. \subsection{Framed models for motivic spectra}\label{ssec:big} We give here an overview of the known framed models for motivic spectra. We work over a base field $k$ for simplicity and refer to Section~\ref{sec:framed-models} for more detailed statements and references. Consider the following presheaves of $\infty$-groupoids on the category of smooth $k$-schemes: \begin{itemize} \item $\uZ$ is the constant sheaf with fiber $\Z$; \item $\uGW$ is the sheaf of unramified Grothendieck--Witt groups; \item $\Vect$ is the groupoid of vector bundles; \item $\Vect^\sym$ is the groupoid of non-degenerate symmetric bilinear forms; \item $\FFlat$ is the groupoid of finite flat schemes; \item $\FGor^\o$ is the groupoid of oriented finite Gorenstein schemes; \item $\FSyn$ is the groupoid of finite syntomic schemes; \item $\FSyn^\o$ is the groupoid of oriented finite syntomic schemes; \item $\FSyn^\fr$ is the $\infty$-groupoid of framed finite syntomic schemes \cite[3.5.17]{deloop1}. \end{itemize} Then the forgetful maps \[\begin{tikzcd} & \FSyn \ar{r} & \FFlat \ar{r} & \Vect \ar{r} & \uZ \\ \FSyn^\fr \ar{r} & \FSyn^\o \ar{u} \ar{r} & \FGor^\o \ar{r} \ar{u}& \Vect^\sym \ar{u}\ar{r} & \uGW\ar{u} \end{tikzcd}\] induce, upon taking framed suspension spectra, the canonical morphisms of motivic $\Einfty$-ring spectra over $k$ (assuming $\operatorname{char} k\neq 2$ for $\kq$): \[\begin{tikzcd} & \MGL \ar{r} & \kgl \ar["\simeq"]{r} & \kgl \ar{r} & \hz \\ \MonUnit \ar{r} & \MSL \ar{u} \ar{r} & \kq \ar["\simeq"]{r} \ar{u}& \kq \ar{u}\ar{r} & \hzmw \ar{u} \rlap . \end{tikzcd}\] Here, $\MonUnit$ is the motivic sphere spectrum, $\MGL$ (resp.\ $\MSL$) is the algebraic (resp.\ special linear) cobordism spectrum, $\kgl$ (resp.\ $\kq$) is the very effective algebraic (resp.\ hermitian) K-theory spectrum, and $\hz$ (resp.\ $\hzmw$) is the motivic cohomology (resp.\ Milnor–Witt motivic cohomology) spectrum. One application of these geometric models is that they allow us to describe modules over these motivic ring spectra in terms of the corresponding transfers. For example, we prove in Theorem~\ref{thm:kq-modules} that modules over hermitian K-theory are equivalent (at least in characteristic 0) to generalized motivic cohomology theories with coherent transfers along oriented finite Gorenstein maps. The fact that hermitian K-theory has such transfers is well-known (see for example \cite[\sectsign 0]{GilleTransfers}), and this result characterizes hermitian K-theory as the universal such cohomology theory. \subsection*{Acknowledgments} We are thankful to Tom Bachmann, Joseph M. Landsberg, Rahul Pandharipande and Burt Totaro for helpful discussions. We would like to thank SFB 1085 ``Higher invariants'' and Regensburg University for its hospitality. Yakerson was supported by a Hermann-Weyl-Instructorship and is grateful to the Institute of Mathematical Research (FIM) and to ETH Z\"urich for providing perfect working conditions. \section{Oriented Gorenstein algebras} In this section we introduce several types of algebras and their properties, which will later be used in the proof of the main theorem. All rings and algebras are assumed commutative. Let $R$ be a base ring. An $R$-algebra $A$ is \emph{finite locally free} if it is finite, flat, and of finite presentation, or equivalently if $A$ is a locally free $R$-module of finite rank. A finite locally free $R$-algebra $A$ is called a \emph{Gorenstein} $R$-algebra if its dualizing module $\omega_{A/R} = \Hom_R(A, R)$ is an invertible $A$-module~\cite[Proposition~21.5]{Eisenbud}. We denote by $\FGor(R)$ the groupoid of Gorenstein $R$-algebras. We emphasize that for us a Gorenstein algebra is by definition finite locally free; in this article we do not consider more general Gorenstein algebras, so this usage will not be ambiguous. \begin{defn}\label{dfn:oriented-Gorenstein-algebra} Let $A$ be a Gorenstein $R$-algebra. An \emph{orientation} of $A$ is an element $\varphi \in \omega_{A/R}$ that trivializes the dualizing module of $A$. Equivalently, $\varphi \colon A\to R$ is an $R$-linear homomorphism such that the bilinear form $B_\varphi(x,y)=\varphi(xy)$ on $A$ is non-degenerate (i.e., $B_\varphi$ induces an isomorphism $A \simeq A^\vee$). An \emph{oriented} Gorenstein $R$-algebra is a pair $(A, \varphi)$ where $\varphi$ is an orientation of the Gorenstein $R$-algebra $A$. We denote by $\FGor^\o(R)$ the groupoid of oriented Gorenstein $R$-algebras. \end{defn} \begin{rem} An oriented Gorenstein $R$-algebra is the same thing as a commutative Frobenius algebra in the category of $R$-modules, in the sense of \cite[Definition 4.6.5.1]{HA}. \end{rem} \begin{rem} Let $R$ be a field or, more generally, a semilocal ring. Then every Gorenstein $R$-algebra can be oriented, but the choice of an orientation is usually far from unique. For a Gorenstein algebra $A$ over a more general ring $R$ an orientation may not exist, since $\omega_{A/R}$ may be a non-trivial line bundle. \end{rem} \begin{ex} \label{ex:kx/x2} The algebra $R[x]/x^2$ can be equipped with the orientation $\varphi_0(r+sx)=s$, turning it into an oriented Gorenstein $R$-algebra. The corresponding bilinear form $B_{\varphi_0}$ has matrix $\left(\begin{smallmatrix}0 & 1\\ 1& 0\end{smallmatrix}\right)$ in the basis $(1,x)$. This algebra is therefore a refinement of the hyperbolic plane. As such, it will play a crucial role in Section~\ref{sec:gp}. \end{ex} \begin{ex} More generally, consider the Gorenstein $R$-algebra $A = R[x]/x^{n+1}$. One can check that a functional $\varphi\colon A\to R$ is an orientation if and only if $\varphi(x^n) \in R^\times$. \end{ex} \begin{rem}\label{rem:FGoror} The presheaves of groupoids $\FGor$ and $\FGor^\o$ are algebraic stacks. To see this, consider the universal finite flat family $p\colon U \to \FFlat$. By \cite[Tag 05P8]{stacks}, the locus $U_1\subset U$ where the sheaf $\omega_{U/\FFlat}$ is locally free of rank $1$ is open. By definition, $\FGor$ is the Weil restriction of $U_1$ along $p$, hence it is an open substack of $\FFlat$ \cite[\sectsign 7.6 Proposition 2(i)]{NeronModels}. The forgetful map $\FGor^\o\to \FGor$ is similarly the Weil restriction of a $\bG_m$-torsor over $U\times_\FFlat\FGor$, hence it is affine. Alternatively, we can consider the vector bundle $E=\Spec\Sym(p_*\sO_U)$ over $\FFlat$. As a stack, $E$ classifies pairs $(A,\phi)$ where $A$ is a finite locally free $R$-algebra and $\phi\in\omega_{A/R}$. Thus, $\FGor^\o$ is the open substack of $E$ where the determinant of $B_\phi$ does not vanish. This shows moreover that the forgetful map $\FGor^\o\to \FFlat$ is affine, since the complement of $\FGor^\o$ in $E$ is cut out by a single equation (locally on $\FFlat$). \end{rem} \begin{lem}\label{lem:perpendiculars_to_ideals_are_intrinsic} Let $R$ be a ring, $A$ a Gorenstein $R$-algebra and $I\subset A$ an ideal. For every orientation $\varphi$ of $A$, we have $I^{\perp} = \Ann(I)$, where the orthogonal is taken with respect to $B_{\varphi}$. \end{lem} \begin{proof} Take $a\in A$. If $aI = 0$ we have $B_{\varphi}(a, i) = \varphi(ai) = 0$ for every $i\in I$, hence $a\in I^{\perp}$. Conversely, if $aI\neq 0$ then, since $B_{\varphi}$ is non-degenerate, there exist $i\in I$ and $a'\in A$ such that $B_{\varphi}(a', ai)\neq 0$. This means that $B_{\varphi}(a,a'i)=\varphi(aa'i)=B_{\varphi}(a',ai)\neq 0$ so $a\not\in I^\perp$. \end{proof} Recall that for an $R$-algebra $A$ an \emph{augmentation} is an $R$-algebra map $e \colon A \to R$. When $(A,\varphi)$ is an oriented Gorenstein $R$-algebra, we denote by $e^*\colon R\to A$ the $R$-linear adjoint map, i.e., the map such that $B_\varphi(e^*\lambda,y)=\lambda e(y)$. \begin{defn}\label{def:isotropic-aug} Let $(A,\phi)$ be an oriented Gorenstein $R$-algebra. An augmentation $e\colon A\to R$ is called \emph{isotropic} if $e^*(1)$ is isotropic, i.e., if $B_\phi(e^*(1),e^*(1))=0$. An \emph{isotropically augmented} oriented Gorenstein $R$-algebra is a triple $(A, \varphi, e)$ where $e$ is an isotropic augmentation of the oriented Gorenstein $R$-algebra $(A, \varphi)$. We denote by $\FGor^{\o,+}(R)$ the groupoid of isotropically augmented oriented Gorenstein $R$-algebras. \end{defn} \begin{prop}\label{prop:loosingorientation} Let $(A,\phi)$ be an oriented Gorenstein $R$-algebra and $e\colon A\to R$ an augmentation. Then $e$ is isotropic if and only if $\Ann(\ker e)\subset \ker e$. \end{prop} \begin{proof} By definition, $e$ is isotropic if and only if the image of $e^*\colon R\to A$ is contained in $\ker e$. By dualizing the short exact sequence of $R$-modules \[0\to\ker e\to A\stackrel e\to R\to 0,\] we see that $\Ima e^*=(\ker e)^\perp$. By Lemma~\ref{lem:perpendiculars_to_ideals_are_intrinsic}, we get $\Ima e^*=\Ann(\ker e)$, whence the result. \end{proof} \begin{ex}\label{ex:isotropic} Let $A$ be a finite algebra over a field $k$, so that $A$ is a finite product of local algebras $A_\mathfrak{m}$. A choice of augmentation is then tantamount to a choice of $\mathfrak m$ such that $k\to \kappa(\mathfrak{m})$ is an isomorphism. This augmentation is isotropic (for any choice of orientation) if and only if $A_{\mathfrak{m}} \not\simeq k$. \end{ex} \begin{rem} Suppose $R$ is a \emph{reduced} ring. If $(A,\phi)$ is an oriented Gorenstein $R$-algebra with augmentation $e$, then $e$ is isotropic if and only it is isotropic after base change to the residue fields of $R$ (where isotropicity is a simple geometric condition, see Example~\ref{ex:isotropic}). Indeed, if $R$ is reduced then the map $R\to \prod_{\mathfrak p} \kappa(\mathfrak p)$ is injective, where $\mathfrak p$ ranges over the minimal primes of $R$. \end{rem} \begin{rem} The condition $\Ann(\ker e)\subset \ker e$ in Proposition~\ref{prop:loosingorientation} is independent of the orientation $\phi$. Thus one could define isotropically augmented finite locally free algebras, but we do not know of an application for such a notion. \end{rem} \begin{defn} Let $(A,\varphi,e) \in \FGor^{\o,+}(R)$. The element $e^\ast(1) \in A$ is called the \emph{local socle generator} of $(A,\varphi,e)$. \end{defn} By definition of $e^*$, the local socle generator $x=e^*(1)$ has the property that $B_\varphi(x,y)=e(y)$ for each $y\in A$. In particular, by the isotropy condition, we have $e(x) =B_\varphi(x,x) = 0$. The name reflects the fact that $x$ generates the \emph{socle} (the annihilator of the maximal ideal) of the localization of $A$ at $\ker e$, see Lemma~\ref{lem:local_socle}(1) below. \begin{ex}\label{ex:dualnumbers} The oriented Gorenstein $R$-algebra $(R[x]/x^2, \varphi_0)$ from Example~\ref{ex:kx/x2} has a unique isotropic augmentation $e_0$ given by $e_0(r+sx) = r$. Its local socle generator is $x$. \end{ex} \begin{ex}\label{ex:Gorenstein-algebras-from-bilinear-forms} Let $(V,B)$ be a non-degenerate symmetric bilinear form over a ring $R$. Then we can construct an algebra $A:=R[x]/x^2\oplus V$ with multiplication \[(r+sx,v)\cdot(r'+s'x,v'):=(rr'+(rs'+r's+B(v,v'))x, r'v+rv')\,.\] If we let $\varphi(r+sx,v)=s$ and $e(r+sx,v)=r$, then the triple $(A,\varphi,e)$ is an isotropically augmented oriented Gorenstein $R$-algebra, with local socle generator $x$. Note that the bilinear form $B_\phi$ is the direct sum of the hyperbolic form on $R[x]/x^2$ (with respect to the basis $(1,x)$) and the original form $B$ on $V$. \end{ex} \begin{lem}\label{lem:local_socle} Let $x$ be the local socle generator of $(A,\varphi,e)\in \FGor^{\o,+}(R)$. Then \begin{enumerate} \item $x$ spans the $R$-module $\Ann(\ker e)$ (in particular, $R x \subset A$ is an ideal); \item $x^2=0$; \item $\varphi(x)=1$. \end{enumerate} In particular, there is a canonical copy of $R[x]/x^2$ inside $A$, with an induced orientation given by $\varphi(r+sx)=\varphi(1)r+s$. \end{lem} \begin{proof} By definition, $x$ spans $\Ima e^*=(\ker e)^\perp$ (see the proof of Proposition~\ref{prop:loosingorientation}), which is $\Ann(\ker e)$ by Lemma~\ref{lem:perpendiculars_to_ideals_are_intrinsic}. By Proposition~\ref{prop:loosingorientation}, $\Ann(\ker e)$ is a square-zero ideal, hence $x^2=0$. Finally, $\phi(x)=B_\phi(x,1)=e(1)=1$, since $e$ is a ring homomorphism. \end{proof} \begin{defn} A \emph{non-unital oriented Gorenstein} $R$-algebra is a pair $(V, B)$ where $V$ is a finite locally free non-unital (i.e., not necessariy unital) $R$-algebra and $B$ is a non-degenerate symmetric bilinear form on $V$ such that $B(xy,z)=B(x,yz)$ for all $x,y,z \in V$. We denote by $\FGor^{\nonu}(R)$ the groupoid of non-unital oriented Gorenstein $R$-algebras. \end{defn} \begin{rem} If $(V,B)$ is a non-unital oriented Gorenstein $R$-algebra such that $V$ is unital, we can define an $R$-linear map $\varphi\colon V\to R$ by $\varphi(y) = B(y, 1)$. By construction, we then have $B_\varphi = B$, so $(V, \varphi)$ is an ordinary oriented Gorenstein $R$-algebra. \end{rem} If we view the moduli stack $\FGor^\o$ of oriented Gorenstein algebras as the hermitian counterpart of the moduli stack $\FFlat$ of finite locally free algebras, then $\FGor^{\o,+}$ is the hermitian counterpart of the moduli stack $\FFlat^\mrk$ of augmented finite locally free algebras, and $\FGor^\nonu$ that of the moduli stack $\FFlat^\nonu$ of non-unital finite locally free algebras. In the finite locally free case, the augmentation ideal defines an equivalence of presheaves of groupoids $\Aug\colon\FFlat^\mrk\to \FFlat^\nonu$, whose inverse is given by unitalization. We now investigate the hermitian analogue of this equivalence, which is slightly more complicated. \begin{constr}\label{constr:non-unitalization} If $(A, \varphi, e) \in \FGor^{\o,+}(R)$ has local socle generator $x$, there is a direct sum decomposition \[ \ker e=Rx\oplus (R[x]/x^2)^\perp. \] Indeed, since $B_\phi(x,y)=e(y)$ we have $\ker e=(Rx)^\perp$, which contains the right-hand side as $x$ is isotropic. Conversely, if $y\in \ker e$, then $y-B_\phi(y,1)x$ is orthogonal to $1$ by Lemma~\ref{lem:local_socle}(3) and to $x$, hence it is orthogonal to $R[x]/x^2$. In particular, $(R[x]/x^2)^\perp$ can be identified with the quotient $\ker(e)/Rx$. Since $Rx$ is an ideal in $A$ by Lemma~\ref{lem:local_socle}(1), $((R[x]/x^2)^\perp, B_\varphi)$ is a non-unital oriented Gorenstein $R$-algebra with multiplication given by the multiplication in $A/Rx$ (or equivalently, by the multiplication in $A$ followed by the orthogonal projection). \end{constr} \begin{prop}\label{prop:nonunital=augmented} The map \[\Aug\colon\FGor^{\o,+}\to \A^1\times\FGor^{\nonu}\] sending $(A,\varphi,e)$ to the pair $(\varphi(1),((R[x]/x^2)^\perp, B_\varphi))$ is an equivalence of presheaves of groupoids. \end{prop} \begin{proof} We construct the inverse map $\Uni\colon \A^1\times\FGor^{\nonu} \to \FGor^{\o,+}$ by associating to $\lambda\in R$ and $(V, B) \in \FGor^{\nonu}(R)$ the $R$-module $R[x]/x^2\oplus V$ with the multiplication \begin{equation}\label{eq:multiplication-in-augmented-algebras} (r+sx,v)(r'+s'x,v')=(rr'+(sr'+s'r+B(v,v'))x, r'v+rv'+vv')\,, \end{equation} and augmentation and orientation given by \[e(r+sx,v)=r,\qquad \varphi(r+sx,v)=r\lambda+s\,.\] It is straightforward to check that this multiplication is associative. Clearly, this assignment is functorial, and $\Aug \circ \Uni \simeq \id$, so it remains to show that $\Uni \circ \Aug\simeq\id$. Let $(A,\varphi,e) \in \FGor^{\o,+}(R)$ with the local socle generator $x$, and let $(V, B)$ be the orthogonal complement of $R[x]/x^2$ in $A$ equipped with the non-unital Gorenstein algebra structure of Construction~\ref{constr:non-unitalization}. Then there is a canonical orthogonal decomposition $A\simeq R[x]/x^2\oplus V.$ Since the kernel of the augmentation is exactly $(R\cdot x)^\perp$ (by definition of $x$), the augmentation is given by projecting onto the first summand and setting $x=0$. Moreover, $V$ is contained in the orthogonal complement of $R\cdot 1$ and so \[\varphi(r+sx,v)=\varphi(r+sx,0)=r\lambda+s\,.\] Finally, we need to check that the multiplication is given by \eqref{eq:multiplication-in-augmented-algebras}. Since $x$ annihilates $V$, the only question is what is the product of two elements of the form $(0,v)$ and $(0,v')$. The second component is, by definition, the product in $V$. Since the product still needs to be in $\ker e$, it follows that \[(0,v)(0,v')=(bx,vv')\] for some $b\in R$. But then \[b=\varphi(bx,vv')=\varphi\left((0,v)(0,v')\right)=B_\varphi\left((0,v),(0,v')\right)=B(v,v')\] as required. \end{proof} The following table summarizes the various presheaves of groupoids of finite flat algebras considered in this paper: \begin{center} \begin{tabular}{l l} name & description\\ \toprule $\FFlat$ & finite locally free algebras\\ $\FFlat^\mrk$ & augmented finite locally free algebras\\ $\FFlat^\nonu$ & non-unital finite locally free algebras\\ $\FGor$ & (finite) Gorenstein algebras\\ $\FGor^\o$ & oriented Gorenstein algebras\\ $\FGor^{\o,+}$ & isotropically augmented oriented Gorenstein algebras\\ $\FGor^\nonu$ & non-unital oriented Gorenstein algebras\\ $\FGor^{\o,0}$ & isotropic oriented Gorenstein algebras (see Section~\ref{sec:isotropic}) \end{tabular} \end{center} All of these groupoids of $R$-algebras extend by descent to groupoids of quasi-coherent $\Oo_S$-algebras for an arbitrary scheme $S$. For example, $\FGor^\o(S)$ is the groupoid of finite locally free quasi-coherent $\sO_S$-algebras $\mathcal{A}$ equipped with an $\Oo_S$-linear map $\varphi\colon \mathcal{A}\to \Oo_S$ such that the induced bilinear form $B_\varphi\colon \sA\times\sA\to \sO_S$ is non-degenerate. We will also identify quasi-coherent $\Oo_S$-algebras with $S$-schemes that are affine over $S$ (in particular in the discussion of Hilbert schemes). Thus, $\FGor^\o(S)$ can be identified with the groupoid of finite locally free $S$-schemes $p\colon Z\to S$ together with a suitable map $\varphi\colon p_*\Oo_Z\to \Oo_S$. In this situation, we will often abuse notation and regard $\sO_Z$ as a quasi-coherent $\sO_S$-algebra. In order to construct some $\A^1$-homotopies in the proof of our main result, we will need a way to glue together objects of $\FGor^{\o,+}(S)$ along the basepoint. Given $(Z_1, \varphi_1, e_1), (Z_2, \varphi_2, e_2) \in \FGor^{\o,+}(S)$, the disjoint union $Z_1\sqcup Z_2$ inherits an orientation \[ \phi\colon \sO_{Z_1\sqcup Z_2}=\sO_{Z_1}\times \sO_{Z_2}\to \sO_S,\quad \phi(a_1,a_2)=\phi_1(a_1)+\phi_2(a_2), \] which makes $\sO_{Z_1\sqcup Z_2}$ into the orthogonal sum of $\sO_{Z_1}$ and $\sO_{Z_2}$. Gluing $Z_1$ and $Z_2$ along the basepoint means passing to the subalgebra $\sO_{Z_1\sqcup_SZ_2}=\sO_{Z_1}\times_{\sO_S} \sO_{Z_2}\subset \sO_{Z_1}\times \sO_{Z_2}$. However, the restriction of $\phi$ to $\sO_{Z_1\sqcup_SZ_2}$ is no longer an orientation: if $x_i$ is the local socle generator of $(Z_i,\varphi_i,e_i)$, then $(x_1,-x_2)$ belongs to the radical of $B_\phi$ on $\sO_{Z_1\sqcup_SZ_2}$. It turns out that this is the only obstruction and that we obtain a well-defined orientation on the vanishing locus of $(x_1,-x_2)$: \begin{prop}\label{prop:connectedSum} Let $(Z_1, \varphi_1, e_1), (Z_2, \varphi_2, e_2) \in \FGor^{\o,+}(S)$ and let $x_i\in\sO(Z_i)$ be the corresponding local socle generators. Let $Z_{12} \subset Z_1\sqcup_{S} Z_2$ be the closed subscheme given by the equation $(x_1,-x_2)$, let $e=e_1=e_2\colon S\to Z_{12}$, and let $\phi=\phi_1+\phi_2\colon \sO_{Z_{12}}\subset \sO_{Z_1}\oplus\sO_{Z_2}\to \sO_S$. Then $Z_{12}$ is a finite Gorenstein $S$-scheme of degree $\deg(Z_1) + \deg(Z_2) - 2$, with orientation $\phi$ and isotropic augmentation $e$. \end{prop} \begin{proof} First we need to prove that $Z_{12}$ is finite locally free over $S$. Since this property is local on the base we can assume $S=\Spec(R)$ is affine. Then we can write $Z_i=\Spec(A_i)$ and $Z_{12}=\Spec (A_1\times_R A_2)/(x_1,-x_2)$. We know that $A_1\times_R A_2$ is finite locally free over $R$ by \cite[Lemma~3.6]{robbery}. The inclusion of the ideal spanned by $x_i$ is a split inclusion $R\to A_i$, with the splitting given by $\varphi_i$, so the inclusion of the ideal spanned by $(x_1,-x_2)$ is also a split inclusion $R\to A_1\times_R A_2$ (split, say, by $\varphi_1\circ\mathrm{pr}_1$). In particular, the quotient $(A_1\times_R A_2)/(x_1,-x_2)$ is also finite locally free, and of the desired degree. To show that $\phi$ is an orientation, we can again work in the affine case. We have to show that the radical of the form $B_\phi$ on $A_1\times_RA_2$ is precisely the ideal $R(x_1,-x_2)$. On the one hand, \[ B_\phi((x_1,-x_2),(y_1,y_2)) = e_1(y_1)-e_2(y_2) = 0 \] for all $(y_1,y_2)\in A_1\times_RA_2$, so $(x_1,-x_2)$ is in the radical. By Lemma~\ref{lem:local_socle}, we can write $A_i=R[x_i]/x_i^2\oplus V_i$ with $V_i=(R[x_i]/x_i^2)^\perp$, whence \[ A_1\times_RA_2 \simeq R[x_1,x_2]/(x_1,x_2)^2 \oplus V_1\oplus V_2. \] The restriction of $B_\phi$ to $R[x_1,x_2]/(x_1,x_2)^2$ is given by a matrix $\left(\begin{smallmatrix}b & 1 \\ 1 & 0\end{smallmatrix}\right)\oplus 0$ in the basis $(1,x_1,x_1-x_2)$, hence has radical $R(x_1-x_2)$. The latter contains the radical of $B_\phi$ since the restriction of $B_\phi$ to $V_1\oplus V_2$ is non-degenerate. Finally, the augmentation $e$ is isotropic since $e^*(1)=(x_1,0)$ and hence $e(e^*(1))=e_2(0)=0$. \end{proof} \begin{defn}\label{def:connected sum} In the setting of Proposition~\ref{prop:connectedSum}, $(Z_{12},\phi,e)\in\FGor^{\o,+}(S)$ is called the \emph{connected sum} of $(Z_1,\phi_1,e_1)$ and $(Z_2,\phi_2,e_2)$. \end{defn} \begin{rem} In the affine case, Definition~\ref{def:connected sum} is a special case of the more general notion of connected sum of rings studied in \cite[Section 2]{Ananthnarayan_Connected_sums}. In particular, the fact that $Z_{12}$ is Gorenstein is also a consequence of \cite[Theorem~2.8]{Ananthnarayan_Connected_sums}. \end{rem} \begin{rem} It is easy to show that the connected sum gives a commutative monoid structure on the stack $\FGor^{\o,+}$. Moreover, if $\FFlat^\mrk$ denotes the moduli stack of pointed finite locally free schemes with the commutative monoid structure given by the wedge sum, the morphism $\Hyp\colon \FFlat^\mrk\to \FGor^{\o,+}$ from Remark~\ref{rem:functor_hyp} is a morphism of commutative monoids. We shall not need these facts in the sequel. \end{rem} \section{$\A^1$-equivalence between the group completions of the stacks $\FGor^\ori$ and $\Vect^\sym$} \label{sec:gp} We denote by $\Vect^\sym$ the stack of finite locally free modules equipped with a non-degenerate symmetric bilinear form. The direct sum and tensor product define an $\Einfty$-semiring structure on $\Vect^\sym$. Similarly, the disjoint union and cartesian product of schemes define an $\Einfty$-semiring structure on $ \FGor^\o$, and the forgetful map $\eta\colon\FGor^\o \to \Vect^\sym$, sending $(A,\varphi)$ to $(A,B_\varphi)$, is a morphism of $\Einfty$-semirings. We will describe these constructions more explicitly in Section~\ref{sec:kq}. The main result of this section is the following theorem. \begin{thm}\label{thm:main-gp} The map $\eta^\gp\colon \FGor^{\o,\gp} \to \Vect^{\sym,\gp}$ is an $\A^1$-equivalence of presheaves on the category of schemes, where $\gp$ stands for objectwise group completion. \end{thm} \begin{rem}\label{rem:functor_hyp} Theorem~\ref{thm:main-gp} is analogous to~\cite[Theorem~2.1]{robbery}, which states that the forgetful map from the stack of finite locally free schemes $\FFlat$ to the stack of vector bundles $\Vect$ becomes an $\A^1$-equivalence after group completion. The connection can be expressed precisely in the following way. There is a commutative diagram of hyperbolic and forgetful functors \[\begin{tikzcd} \FFlat\ar[d,swap,"\Hyp"] \ar[r, "\eta"] & \Vect\ar[d,"\Hyp"]\\ \FGor^{\ori}\ar[r, "\eta"] \ar[d,swap,"\mathrm{forget}"] & \Vect^{\sym} \ar[d,"\mathrm{forget}"] \\ \FFlat \ar[r, "\eta"] & \Vect\rlap. \end{tikzcd}\] Here, the functor $\Hyp\colon \Vect\to\Vect^\sym$ sends $V$ to $\left(V\oplus V^\vee, \left(\begin{smallmatrix} 0 & I\\ I & 0\end{smallmatrix}\right)\right)$, and the functor $\Hyp\colon \FFlat\to \FGor^\o$ sends a finite locally free $R$-algebra $A$ to the square-zero extension $A\oplus\omega_{A/R}$ with the orientation $\varphi(a,f)=f(a)$. \end{rem} To proceed, we define the following stabilization maps: \begin{align*} \tau \colon \Vect^\sym \to \Vect^\sym, &\quad (V,B) \mapsto (V\oplus R^2, B \oplus B_{\Hyp}), \\ \sigma \colon \FGor^{\o} \to \FGor^{\o}, &\quad (A,\varphi) \mapsto (A\oplus R[x]/x^2, \varphi \oplus \varphi_0), \\ \sigma^+ \colon \FGor^{\o,+} \to \FGor^{\o,+}, &\quad (A,\varphi,e) \mapsto (A\oplus R[x]/x^2, \varphi \oplus \varphi_0, e\circ \pr_1), \end{align*} where $B_{\Hyp} = \left(\begin{smallmatrix} 0 & 1\\ 1& 0\end{smallmatrix}\right)$ is the hyperbolic form and $\phi_0$ is the orientation from Example~\ref{ex:kx/x2}. We denote by $\Vect^{\sym,\st}$ the colimit of the sequence \[ \Vect^\sym\xrightarrow{\tau} \Vect^\sym \xrightarrow{\tau }\Vect^\sym\to\dotsb, \] and we define $\FGor^{\o,\st}$ and $\FGor^{\o,+,\st}$ similarly. By Example~\ref{ex:kx/x2}, the square \[ \begin{tikzcd} \FGor^{\o} \ar{r}{\eta} \ar{d}[swap]{\sigma} & \Vect^{\sym} \ar{d}{\tau} \\ \FGor^{\o} \ar{r}{\eta} & \Vect^{\sym} \end{tikzcd} \] commutes, inducing a map $\eta^\st\colon \FGor^{\o,\st} \to \Vect^{\sym,\st}$ in the colimit. Similarly, the map $\theta\colon \FGor^{\ori,+}\to \FGor^{\ori}$ that forgets the augmentation stabilizes to a map $\theta^\st\colon \FGor^{\ori,+,\st}\to \FGor^{\ori,\st}$. Note that there are canonical maps $\Vect^{\sym,\st}\to\Vect^{\sym,\gp}$ and $\FGor^{\o,\st}\to\FGor^{\o,\gp}$ from the telescopes to the group completions, induced by mapping the $n$th copy of $\Vect^\sym(R)$ resp.\ of $\FGor^{\o}(R)$ to the group completion via $(V,b)\mapsto (V,b)-n\cdot (R^2,B_{\Hyp})$ resp.\ $(A,\phi)\mapsto (A,\phi)-n\cdot (R[x]/x^2,\phi_0)$. We shall deduce Theorem~\ref{thm:main-gp} from the following variant, which does not involve group completion: \begin{thm}\label{thm:main-st} The map $\eta^\st\colon \FGor^{\o,\st}\to \Vect^{\sym,\st}$ is an $\A^1$-equivalence. \end{thm} The strategy of the proof of Theorem~\ref{thm:main-st} is to use the stack $\FGor^{\o,+}$ and show that both $\theta^\st$ and $\eta^\st\circ \theta^\st$ are $\A^1$-equivalences. For $\theta^\st$, the idea is to construct an inverse by stabilizing the map \[ \gamma\colon\FGor^{\ori}\to \FGor^{\ori,+},\quad (A,\varphi)\mapsto (A\oplus R[x]/x^2, \varphi \oplus \varphi_0, e_0\circ \pr_2). \] However, this does not quite work: we have $\theta \circ \gamma \simeq \sigma$, but $\gamma \circ \theta \not\simeq \sigma^+$, since the maps $\gamma \circ \theta$ and $\sigma^+$ equip Gorenstein algebras with different augmentations. Construction~\ref{constr:bankrobbery} allows us to get around this obstruction; it is the main technical ingredient in the proof of Theorem~\ref{thm:main-st}. For the convenience of the reader, the following table summarizes the various maps we will use in the proof of Theorem~\ref{thm:main-st}: \begin{center} \begin{tabular}{l l} name & description\\ \toprule $\eta\colon \FGor^\o \to \Vect^\sym$ & forgets the algebra structure\\ $\theta\colon \FGor^{\o,+} \to \FGor^\o$ & forgets the isotropic augmentation\\ $\tau\colon\Vect^\sym \to \Vect^\sym$ & adds a copy of the hyperbolic form\\ $\sigma\colon\FGor^\o \to \FGor^\o$ & adds a copy of the double point\\ $\sigma^+\colon \FGor^{\o,+}\to \FGor^{\o,+}$ & adds a copy of the double point without changing the augmentation\\ $\gamma\colon\FGor^\o \to \FGor^{\o,+}$ & adds a copy of the double point with its augmentation\\ $\varepsilon\colon\FGor^{\o,+} \to \FGor^{\o,+}$ & takes the connected sum with $R[x]/x^4$ \\ $\pi\colon\FGor^\nonu\to \Vect^\sym$ & forgets the algebra structure \end{tabular} \end{center} \vskip\parskip \begin{constr} \label{constr:bankrobbery} There is a zigzag of $\A^1$-homotopies \[ \sigma^+ \stackrel{H^\const}\leftsquigarrow \varepsilon \stackrel{H^\mv}\rightsquigarrow \gamma \circ \theta \] and an isomorphism $\psi\colon \theta\circ H^\const\simeq\theta\circ H^\mv$ such that $\psi_0=\id_{\theta\circ\varepsilon}$ and $\psi_1$ is the canonical isomorphism $\theta\circ \sigma^+\simeq \sigma\circ\theta \simeq \theta\circ \gamma\circ \theta$. \end{constr} \begin{proof} Consider the oriented Gorenstein $\Z[t]$-algebra \[\robber = \Z[x,t]/((x-t)^2x^2),\quad \varphi_\robber(r_0 + r_1x + r_2x^2 + r_3x^3) = r_3,\] where $r_i \in \Z[t]$. Its fiber over $t=1$ is isomorphic to $(\Z[x]/x^2,\phi_0)\times(\Z[x]/x^2,\phi_0)$, where $\phi_0$ is the orientation of Example~\ref{ex:kx/x2}. Its fiber over $t=0$ is $\robber_0 =\Z[x]/(x^4)$, with orientation $\phi_{\robber_0}$ given by the same formula as $\phi_\robber$. One can view $\robber$ as two copies of the dual numbers colliding at $t = 0$. Each copy has a natural augmentation as in Example~\ref{ex:dualnumbers}, which extends to an augmentation of $\robber$. Explicitly, we have two augmentations $e^\const, e^\mv\colon \robber \to \Z[t]$ given by sending $x$ to $0$ and to $t$. One computes that \begin{align*} (e^\const)^*(1) &= t^2x -2tx^2 + x^3,\\ (e^\mv)^*(1) &= -tx^2 + x^3, \end{align*} which shows that both $e^\const$ and $e^\mv$ are isotropic. We thus obtain two elements $(\robber,\varphi_\robber, e^\const)$ and $(\robber,\varphi_\robber, e^\mv)$ in $\FGor^{\ori,+}(\Z[t])$, with local socle generators as above. The augmentations $e^\const$ and $e^\mv$ agree at $t=0$ and define an element $(\robber_0, \varphi_{\robber_0}, e_{\robber_0})\in \FGor^{\ori,+}(\Z)$. We let $\varepsilon \colon \FGor^{\ori,+} \to \FGor^{\ori,+}$ be the map that sends $(Z,\phi,e)\in \FGor^{\ori,+}(S)$ to its connected sum with $(\robber_0, \varphi_{\robber_0}, e_{\robber_0})_{S}$ (see Definition~\ref{def:connected sum}). Given $(Z,\phi,e)\in \FGor^{\ori,+}(S)$, we denote by $(\tilde Z,\tilde \phi,\tilde e^\const)$ the connected sum of $\A^1_Z$ with $(\robber,\phi_\robber,e^\const)_S$ in $\FGor^{\ori,+}(\A^1_S)$. Explicitly, if $s\in\sO(Z)$ is the local socle generator, then $\tilde Z$ is the vanishing locus of the function $(-s, t^2x-2tx^2+x^3)$ on the pushout $\A^1_Z\sqcup_{\A^1_S}(\Spec\robber)_S$, which is defined using $e\colon S\to Z$ and $e^\const\colon \A^1\to\Spec\robber$. Note that replacing $x$ by $t$ in $t^2x-2tx^2+x^3$ gives $0$, so the composite \[ \A^1_S \xrightarrow{e^\mv} (\Spec\robber)_S \xrightarrow{\mathrm{can}} \A^1_Z\sqcup_{\A^1_S} (\Spec\robber)_S \] lands in $\tilde Z$. This defines another section $\tilde e^\mv\colon \A^1_S\to\tilde Z$, which is moreover isotropic. Indeed, we have $(\tilde e^\mv)^*(1)=(0,(e^\mv)^*(1))$, hence $\tilde e^\mv((\tilde e^\mv)^*(1))=e^\mv((e^\mv)^*(1))=0$. Let $H^{\const}\colon \FGor^{\ori,+}\to \FGor^{\ori,+}(\A^1\times -)$ be the map that sends $(Z,\phi,e)$ to $(\tilde Z,\tilde \phi,\tilde e^\const)$, and let $H^{\mv}\colon \FGor^{\ori,+}\to \FGor^{\ori,+}(\A^1\times -)$ be the map that sends $(Z,\phi,e)$ to $(\tilde Z,\tilde \phi,\tilde e^\mv)$. Then it is clear that $H^\const_0=H^\mv_0\simeq\varepsilon$. Moreover, we have $H^\const_1\simeq\sigma^+$ and $H^\mv_1\simeq\gamma\circ\theta$. Indeed, the fiber of $(\tilde Z,\tilde\phi)$ over $t=1$ is the disjoint union of $(Z,\phi)$ and $(\Z[x]/x^2,\phi_0)_S$, with $\tilde e^\const_1$ being the given section $e$ to the first summand and $\tilde e^\mv_1$ the canonical section to the second summand. Thus, $H^\const$ and $H^\mv$ are the desired $\A^1$-homotopies. By construction, the underlying oriented Gorenstein schemes of $H^\const(Z,\phi,e)$ and $H^\mv(Z,\phi,e)$ are the same, and we can take the isomorphism $\psi$ to be the identity. \end{proof} \begin{prop}\label{prop:bank-robbery} The map $\theta^\st\colon \FGor^{\ori,+,\st}\to \FGor^{\ori,\st}$ is an $\A^1$-equivalence. \end{prop} \begin{proof} Consider the diagram \[ \begin{tikzcd} \FGor^{\ori,+} \ar["\theta"]{r} \ar[swap,"\sigma^+"]{d} & \FGor^{\ori} \ar["\sigma"]{d} \ar[swap,"\gamma"]{dl} \\ \FGor^{\ori,+}\ar["\theta"]{r} & \FGor^{\ori} \rlap. \end{tikzcd} \] By Construction~\ref{constr:bankrobbery} there is a homotopy $H\colon \Lhtp(\sigma^+)\simeq \Lhtp(\gamma\circ\theta)$ such that $\theta\circ H$ is the canonical isomorphism $\theta\circ \sigma^+\simeq \sigma\circ\theta\simeq \theta\circ\gamma\circ\theta$. It follows that the map $\Lhtp\gamma$ induces in the colimit a map $\Lhtp\FGor^{\o,\st} \to \Lhtp\FGor^{\o,+,\st}$, which is inverse to $\Lhtp\theta^\st$. \end{proof} \begin{prop}\label{prop:vect-nu} The forgetful map $\pi\colon \FGor^{\nonu}\to \Vect^\sym$ is an $\A^1$-equivalence. \end{prop} \begin{proof} Let $\nu\colon \Vect^\sym \to\FGor^{\nonu}$ be the map sending a symmetric space $(V,B)$ to the non-unital oriented Gorenstein algebra $(V, B)$ with zero multiplication. Then $\pi\circ\nu$ is the identity, and the map \[ \FGor^{\nonu} \to \FGor^{\nonu}(\A^1\times-), \quad (V, B) \mapsto (tV[t], (tp,tq)\mapsto B_{R[t]}(p,q)), \] where $B_{R[t]}$ is the $R[t]$-bilinear extension of $B$, is an $\A^1$-homotopy from $\nu\circ\pi$ to the identity of $\FGor^{\nonu}$. \end{proof} Recall that a symmetric space $(V,b)$ is said to be \emph{metabolic} if it has a Lagrangian, i.e., a direct summand $L\subset V$ such that $L=L^\perp$. For example, for every $V\in\Vect(R)$, the hyperbolic space $\Hyp V=\left(V\oplus V^\vee,\left(\begin{smallmatrix} 0 & I\\ I &0\end{smallmatrix}\right)\right)$ is metabolic, with Lagrangian $V\oplus 0 \subset V\oplus V^\vee$. When 2 is invertible, all metabolic spaces are in fact of this form. The following lemma shows that this is also the case up to $\A^1$-homotopy, even when 2 is not invertible. \begin{lem}\label{lem:metabolic=hyperbolic} Let $(V,b)$ be a symmetric space over a ring $R$. If $(V,b)$ is metabolic with Lagrangian $L$, then the class of $(V,b)$ in $\pi_0(L_{\A^1}\Vect^\sym)(R)$ is equal to the class of $\Hyp L$. \end{lem} \begin{proof} Let $W$ be a complement of $L$ in $V$. Then the map $W\to V\simeq V^\vee\to L^\vee$ is an isomorphism and we can identify $V$ as $L\oplus L^\vee$. Under this decomposition $b$ is given by the matrix \[\begin{pmatrix} 0 & I\\ I & A\end{pmatrix},\] where $A$ is some symmetric bilinear form on $L^\vee$. Then \[\left(L[t]\oplus L[t]^\vee,\ \begin{pmatrix} 0 & I\\ I & tA\end{pmatrix}\right)\in \Vect^\sym(R[t])\] is an $\A^1$-homotopy between $(V,b)$ and $\Hyp L$. \end{proof} \begin{lem}\label{lem:invert-hyp} Let $\Hyp=\Hyp \Z\in \Vect^\sym(\Z)$, and let $\Vect^\sym[-\Hyp]$ be the commutative monoid obtained from $\Vect^\sym$ by additively inverting $\Hyp$. \begin{enumerate} \item The cyclic permutation of $\Hyp^{\oplus 3}$ is $\A^1$-homotopic to the identity. \item The canonical map $\Vect^\sym[-\Hyp]\to \Vect^{\sym,\gp}$ is an $\A^1$-equivalence on affine schemes. \item The canonical map $\Vect^{\sym,\st}\to\Vect^{\sym,\gp}$ is an $\A^1$-equivalence on affine schemes. \end{enumerate} \end{lem} \begin{proof} (1) The cyclic permutation of $\Hyp^{\oplus 3}$ is given by applying the functor $\Hyp$ to the cyclic permutation of $\Z^3$ in $\Vect$, which is $\A^1$-homotopic to the identity (being a product of elementary matrices). (2) It suffices to show that every element of $\pi_0(L_{\A^1}\Vect^\sym[-\Hyp])(R)$ is additively invertible. Every object $(V,b)\in\Vect^\sym(R)$ is a summand of $(V,b)\oplus (V,-b)$, which is metabolic with Lagrangian given by the diagonal copy of $V$, so it suffices to show that every metabolic object is invertible. By Lemma~\ref{lem:metabolic=hyperbolic}, it then suffices to show that every object of the form $\Hyp V$ is invertible. But if $W$ is such that $V\oplus W=R^n$, we have $\Hyp V\oplus \Hyp W=\Hyp(R^n)=(\Hyp R)^{\oplus n}$, and so $\Hyp V$ is invertible. (3) This follows from (1) and (2) by \cite[Proposition 5.1]{deloop4}. \end{proof} \begin{proof}[Proof of Theorem~\ref{thm:main-st}] By Lemma~\ref{lem:local_socle}, there is a commutative square \[ \begin{tikzcd} \FGor^{\o,+} \ar{r}{\theta} \ar{d}[swap]{(\id\times\pi)\circ\Aug} & \FGor^\o \ar{d}{\eta} \\ \A^1\times \Vect^\sym \ar{r}{\tilde\tau} & \Vect^\sym\rlap, \end{tikzcd} \] where $\Aug\colon \FGor^{\o,+}\to\A^1\times \FGor^{\nonu}$ was defined in Proposition~\ref{prop:nonunital=augmented} and $\tilde\tau(\lambda,-)$ adds a copy of the bilinear form $\left(\begin{smallmatrix}\lambda & 1 \\ 1 & 0 \end{smallmatrix}\right)$. Moreover, this square fits in a commutative cube with the respective ``stabilization maps'' $\sigma^+$, $\sigma$, $\id_{\A^1}\times\tau$, and $\tau$, and in the colimit we obtain a commutative square \[ \begin{tikzcd} \FGor^{\o,+,\st} \ar{r}{\theta^\st} \ar{d}[swap]{((\id\times\pi)\circ\Aug)^\st} & \FGor^{\o,\st} \ar{d}{\eta^\st} \\ \A^1\times \Vect^{\sym,\st} \ar{r}{\tilde\tau^\st} & \Vect^{\sym,\st}\rlap. \end{tikzcd} \] By Propositions \ref{prop:nonunital=augmented} and~\ref{prop:vect-nu}, the left vertical map is an $\A^1$-equivalence (already in the unstable square). By Proposition~\ref{prop:bank-robbery}, $\theta^\st$ is an $\A^1$-equivalence. We have $\tilde\tau^\st(0,-)=\tau^\st$, where $\tau^\st\colon \Vect^{\sym,\st}\to\Vect^{\sym,\st}$ is the action of $\Hyp\in\Vect^\sym(\Z)$ on the $\Vect^\sym$-module $\Vect^{\sym,\st}$. Note that $\tau^\st$ is \emph{not} an equivalence, but it is an $\A^1$-equivalence by \cite[Proposition 5.1]{deloop4} since the cyclic permutation of $\Hyp^{\oplus 3}$ is $\A^1$-homotopic to the identity (Lemma~\ref{lem:invert-hyp}(1)). Thus, $\tilde\tau^\st$ is also an $\A^1$-equivalence. We conclude that $\eta^\st$ is an $\A^1$-equivalence, as desired. \end{proof} \begin{proof}[Proof of Theorem~\ref{thm:main-gp}] As above, let $\Vect^\sym[-\Hyp]$ be obtained from $\Vect^\sym$ by additively inverting $\Hyp$, and let $\FGor^\o[-\Z[x]/x^2]$ be obtained from $\FGor^\o$ by additively inverting the oriented Gorenstein algebra $(\Z[x]/x^2, \varphi_0)$ from Example~\ref{ex:kx/x2}. We have a commutative square \[ \begin{tikzcd} \FGor^{\o,\st} \ar{r} \ar[swap,"\eta^\st"]{d} & \FGor^\o[-\Z[x]/x^2] \ar{d} \\ \Vect^{\sym,\st} \ar{r} & \Vect^\sym[-\Hyp] \rlap. \end{tikzcd} \] By Lemma~\ref{lem:invert-hyp}(1), the cyclic permutation of $\Hyp^{\oplus 3}$ becomes the identity in $\Lhtp\Vect^\sym$, which by \cite[Proposition 5.1]{deloop4} implies that the lower horizontal map is an $\A^1$-equivalence. By Theorem~\ref{thm:main-st}, the left vertical map is an $\A^1$-equivalence. In particular, the cylic permutation of $(\Z[x]/x^2)^{\times 3}$ also becomes the identity in $\Lhtp\FGor^{\o,\st}$. It then follows again from \cite[Proposition 5.1]{deloop4} that the upper horizontal map is an $\A^1$-equivalence. Hence, the right vertical map is an $\A^1$-equivalence. Since the functor $\Lhtp$ commutes with group completion \cite[Lemma 5.5]{HoyoisCdh}, we deduce that $ \FGor^{\o,\gp}\to\Vect^{\sym,\gp}$ is an $\A^1$-equivalence. \end{proof} \begin{rem}\label{rem:FGor-gp} Combining Theorems~\ref{thm:main-gp} and \ref{thm:main-st} with Lemma~\ref{lem:invert-hyp}(3), we deduce that the canonical map $\FGor^{\o,\st}\to \FGor^{\o,\gp}$ is an $\A^1$-equivalence on affine schemes. \end{rem} \section{Consequences in complexity theory} In this short section we derive consequences of Proposition~\ref{prop:vect-nu} for structure tensors of finite algebras. This section is an interesting side application of our methods: it has no relation to the subsequent sections, however it is of interest for complexity theory. Because of this target audience, we strive to be more explicit than elsewhere. In this section we work over an algebraically closed field $k$. For $q\geq 1$ the \emph{G-fat} point~\cite{Casnati_Notari_6points} is the spectrum of a locally free $k$-algebra $A_q$ of degree $q+2$ presented as \[ A_q := \frac{k[y_1, \ldots ,y_q]}{(y_iy_j\ |\ i\neq j) + (y_i^2 - y_j^2\ |\ i\neq j)+(y_1^3)}. \] This is an oriented Gorenstein algebra with orientation $\varphi_0 := (y_1^2)^*\in \Hom_k(A_q, k)$, and its unique augmentation is isotropic by Example~\ref{ex:isotropic}. In the equivalence from Proposition~\ref{prop:nonunital=augmented} the triple $(A_q, \varphi, e)$ corresponds to $(0, V_0)$, where $V_0$ is spanned by self-dual elements $y_1, \ldots ,y_q$ and equipped with a trivial multiplication. Let $(C, \varphi, e)$ be another isotropically augmented Gorenstein algebra of degree $q+2$. As in Definition~\ref{dfn:oriented-Gorenstein-algebra}, we have a non-degenerate form $B_{\varphi}$ on $C$ and a local socle generator $x\in C$. (If $C$ is local, then $x$ is exactly its socle generator, see Lemma~\ref{lem:local_socle}). Let $V = 1_C^{\perp}\cap x^{\perp} \subset C$. Then $B_{\varphi}$ restricts to a non-degenerate form on $V$, so as a $k$-vector space we have $C = k\cdot 1_C\oplus kx \oplus V$. A $\bG_m$-equivariant \emph{degeneration} of a finite $k$-algebra $C$ to a finite $k$-algebra $A$ is a finite flat family $f\colon \mathcal{X}\to \A^1$ together with a $\bG_m$-action on $\mathcal{X}$ making $f$ equivariant with respect to the usual $\bG_m$-action on $\A^1$ and such that $\mathcal{X}_1 \simeq \Spec(C)$ and $\mathcal{X}_0 \simeq \Spec(A)$. The $\bG_m$-equivariance implies that the fiber of $\mathcal{X}$ over every nonzero $k$-point of $\A^1$ is isomorphic to $\Spec(C)$. Proposition~\ref{prop:vect-nu} and Proposition~\ref{prop:nonunital=augmented} contain a construction of a degeneration of $C$ to $A_q$. Explicitly, it is given by $f\colon\Spec(\mathcal{C})\to \Spec(k[t])$, where $\mathcal{C}$ is a free $k[t]$-module $(k[t]\cdot 1 \oplus k[t]x)\oplus V[t]$ with multiplication given by \[ (r+sx,v)\cdot (r'+s'x,v')=(rr'+(sr'+s'r+B_{\varphi}(v,v'))x, r'v+rv'+tvv'), \] where $v,v'\in V[t]$ and $B_{\varphi}$ extends $k[t]$-linearly. The algebra $\mathcal{C}$ admits a $\bG_m$-action given by $t\cdot (r+sx, v) = (r+st^{-2}x, t^{-1}v)$ which proves that $f$ is a degeneration. \begin{prop}\label{prop:abstractDegenerations} Let $q\geq 1$ and let $C$ be a Gorenstein $k$-algebra of degree $q+2$. Then $C$ admits a $\bG_m$-equivariant degeneration to $A_q$. \end{prop} \begin{proof} Choose an orientation of $C$. If $C$ has nonzero nilpotent radical, then by Example~\ref{ex:isotropic} it admits an isotropic augmentation and the associated degeneration $\mathcal{C}$ above proves our claim. It remains to consider reduced $C$. Since $k$ is algebraically closed, we have $C = \prod_{q+2} k$. In this case, choose a set $\Gamma$ of $q+2$ general lines through the origin of $\A^{q+1}$ and a hyperplane $H = (y = 1)$ intersecting them transversely. Then $\Gamma\cap (y = t)$ is a degeneration over $\A^1$ with parameter $t$. Since a general tuple of $q+2$ points on $\P^{q}$ is arithmetically Gorenstein, the special fiber of the degeneration is Gorenstein. This fiber has $q$-dimensional tangent space, which implies that it is $\Spec(A_q)$. \end{proof} \begin{rem} Proposition~\ref{prop:abstractDegenerations} in the special case when $C$ is local was obtained in~\cite{Casnati_Notari_6points}, by completely different means. This proposition also shows that the Gorenstein locus of the Hilbert scheme of $d$ points on $\A^n$ is connected by rational curves whenever $n\geq d-2$. In general, even topological connectedness of the Gorenstein locus is open. \end{rem} For the terminology on tensors below, we refer to~\cite[5.6.1]{Landsberg__complexity_book}. \begin{cor}\label{cor:degTensors} Let $m\geq 3$ and let $T\in k^m\otimes k^m\otimes k^m$ be a $1$-generic tensor of minimal border rank (that is, of border rank $m$). Then $T$ degenerates to the big Coppersmith--Winograd tensor $\mrm{CW}_{m-2}$. \end{cor} \begin{proof} As explained in~\cite[5.6.2.1]{Landsberg__complexity_book}, the tensor $T$ is isomorphic to a structure tensor of a Gorenstein algebra $C$. The tensor $\mrm{CW}_{m-2}$ is isomorphic to the structure tensor of $A_{m-2}$. The claim follows directly from Proposition~\ref{prop:abstractDegenerations}. \end{proof} \begin{rem} The assumptions of Corollary~\ref{cor:degTensors} can be much weakened. We only need to assume that $T$ is $1$-generic and satisfies Strassen's equations, see~\cite[\sectsign 2.1]{Landsberg_Michalek__Abelian_Tensors} for their definition. Indeed, to such a $T$ we associate a commuting tuple of matrices~\cite[Definition 2.7]{Landsberg_Michalek__Abelian_Tensors}, hence a module over a polynomial ring~\cite[Introduction]{Jelisiejew_Sivic}. Since $T$ is $1$-generic, it is $1_B$-generic, hence this module is cyclic and can be viewed as a $k$-algebra. By~\cite[5.6.2.1]{Landsberg__complexity_book} this algebra is Gorenstein and we argue as in the proof of~Corollary~\ref{cor:degTensors}. \end{rem} \section{Oriented Hilbert scheme and orthogonal Grassmannian} \begin{defn} Let $X\to S$ be a morphism of schemes. The \emph{oriented Hilbert scheme} \[\Hilb^{\Gor,\o}(X/S)\colon \Sch_S^\op\to\Set\] is the pullback \[\Hilb^{\Gor,\o}(X/S):=\Hilb(X/S)\times_{\FFlat} \FGor^\o\,.\] That is, $\Hilb^{\Gor,\o}(X/S)$ classifies finite locally free subschemes of $X$ that are Gorenstein and equipped with an orientation. \end{defn} \begin{rem} If $X\to S$ is such that $\Hilb(X/S)$ is a scheme (for example, $X$ is quasi-projective over $S$) or an algebraic space (for example, $X$ is separated over $S$), then so is $\Hilb^{\Gor,\o}(X/S)$. Indeed, the forgetful map $\Hilb^{\Gor,\o}(X/S)\to \Hilb(X/S)$ is a base change of $\FGor^\o\to \FFlat$, which is representable by schemes by Remark~\ref{rem:FGoror}. \end{rem} From now on we will be interested in the ind-scheme $\Hilb^{\Gor,\o}(\A^\infty) := \colim_n \Hilb^{\Gor,\o}(\A^n)$ over $\Spec\Z$. Note that we have a coproduct decomposition \[\Hilb^{\Gor,\o}(\A^\infty)\simeq\coprod_{d\ge0} \Hilb^{\Gor,\o}_d(\A^\infty)\] where $\Hilb^{\Gor,\o}_d(\A^\infty)$ classifies the oriented Gorenstein subschemes of $\A^\infty$ of degree $d$. \begin{prop}\label{prop:Hilb-FGor} The forgetful map $\Hilb^{\Gor,\o}(\A^\infty)\to \FGor^{\o}$ is a universal $\A^1$-equivalence on affine schemes. \end{prop} \begin{proof} By definition, this map is a base change of the forgetful map $\Hilb(\A^\infty)\to \FFlat$, which is a universal $\A^1$-equivalence on affine schemes by~\cite[Proposition~4.2]{robbery}. \end{proof} Consider the map $\sigma\colon\Hilb^{\Gor,\o}(\A^\infty)\to \Hilb^{\Gor,\o}(\A^\infty)$ sending an oriented Gorenstein subscheme $Z\subset \A^\infty$ to \[(\Spec \Oo[x]/x^2\times\{0\})\sqcup (\{0\}\times Z)\subset \A^1\times \A^\infty,\] where $\Spec \Oo[x]/x^2$ is equipped with the orientation of Example~\ref{ex:kx/x2} and is embedded in $\A^1$ at $1$. Then we define \[\Hilb^{\Gor,\o}_\infty(\A^\infty) := \colim(\Hilb^{\Gor,\o}_2(\A^\infty)\xrightarrow{\sigma}\Hilb^{\Gor,\o}_4(\A^\infty)\xrightarrow{\sigma}\cdots).\] \begin{cor}\label{cor:Hilb-FGor} The forgetful maps \[ \uZ\times \Hilb^{\Gor,\o}_\infty(\A^\infty) \to \FGor^{\o,\gp} \to \Vect^{\sym,\gp} \] are $\A^1$-equivalences on affine schemes. \end{cor} \begin{proof} The second map is an $\A^1$-equivalence on all schemes by Theorem~\ref{thm:main-gp}. The first map factors as \[ \uZ\times \Hilb^{\Gor,\o}_\infty(\A^\infty) \to \FGor^{\o,\st} \to \FGor^{\o,\gp}, \] where the second map is an $\A^1$-equivalence on affine schemes by Remark~\ref{rem:FGor-gp}. On quasi-compact schemes, the presheaf $\uZ\times \Hilb^{\Gor,\o}_\infty(\A^\infty)$ is the colimit of \[\Hilb^{\Gor,\o}(\A^\infty)\xrightarrow{\sigma}\Hilb^{\Gor,\o}(\A^\infty)\xrightarrow{\sigma}\cdots,\] while $\FGor^{\o,\st}$ is the colimit of \[\FGor^\o\xrightarrow{\sigma}\FGor^\o\xrightarrow{\sigma}\cdots.\] Hence, the result follows from Proposition~\ref{prop:Hilb-FGor}. \end{proof} Let $(V,B)\in \Vect^\sym(S)$ be a vector bundle over $S$ with a non-degenerate symmetric bilinear form. Recall from \cite{SchlichtingTripathi} that the \emph{orthogonal Grassmannian} $\GrO_d(V,B)$ is the open subscheme of the Grassmannian $\Gr_d(V)$ given by the rank $d$ subbundles $W\subset V$ such that the restriction of $B$ to $W$ is non-degenerate. We consider the smooth ind-scheme \[\GrO_d=\GrO_d(\Hyp^\infty):=\colim_n \GrO_d(\Hyp^n)\] over $\Spec\Z$. Forgetting the embedding into $\Hyp^\infty$ defines a canonical map $\GrO_d\to \Vect^\sym_d$. A bilinear form $B$ on an $R$-module $V$ is called \emph{even} if it is symmetric and $B(x,x)\in 2R$ for all $x\in V$. Clearly, if $2\in R^\times$, every symmetric form is even. If $V$ is projective, a symmetric bilinear form $B$ on $V$ is even if and only if there exists a bilinear form $B'$ on $V$ such that $B(x,y)=B'(x,y)+B'(y,x)$. \begin{lem}\label{lem:Hyp-embedding} Let $R$ be a ring, $V$ a finite locally free $R$-module, and $B$ an even symmetric bilinear form on $V$. Then there exists an isometric embedding $V\hookrightarrow \Hyp(R^n)$ for some $n\geq 0$. \end{lem} \begin{proof} Choose an isomorphism $V\oplus W\simeq R^n$ and let $A$ be the matrix representing $B'\oplus 0$. Then we can take the composition \[ V\hookrightarrow R^n \to \Hyp(R^n), \] where the second map has components $(A, \id_{R^n})$. \end{proof} Note that every hyperbolic space $\Hyp V$ is even. It follows that the forgetful map $\GrO_d\to\Vect^\sym_d$ lands in the subpresheaf $\Vect^\ev_d\subset \Vect^\sym_d$ of even forms. \begin{prop}\label{prop:Vect^bil and Gr^o} For any $d\ge 0$, the forgetful map \[\GrO_d\to \Vect^\ev_d\] is a universal $\A^1$-equivalence on affine schemes. \end{prop} \begin{proof} We will apply \cite[Lemma~4.1(2)]{robbery}, or rather its proof. Unlike $\Vect^\sym_d$, the presheaf $\Vect^\ev_d$ for $d\geq 2$ does not satisfy closed gluing (in particular, it is not an algebraic stack). Indeed, consider a closed pushout of affine schemes $X\sqcup_ZY$ on which there is a noneven function $f$ whose restriction to both $X$ and $Y$ is even (for example: $X=Y=\Spec\Z[x,y]$, $Z=\Spec\Z[x,y]/(2x-2y)$, and $f=(2x,2y)$); then the non-degenerate symmetric bilinear form $\left(\begin{smallmatrix} f & 1\\ 1 & 0\end{smallmatrix}\right)$ is not even, even though its restriction to both $X$ and $Y$ is. However, $\Vect^\ev_d$ does nevertheless transform the colimit $\partial \A^n_R=\colim_{\Delta^k\hook \partial\Delta^n} \A^k_R$ into a limit, since the presheaf $\Spec R\mapsto 2R$ does. It therefore suffices to check that for every commutative square \[\begin{tikzcd} \Spec R/I \ar[r] \ar[d] & \GrO_d\ar[d]\\ \Spec R\ar[r]\ar[ur,dashed] & \Vect^\ev_d \end{tikzcd}\] with $R=R_0[t_0,\dotsc,t_n]/(\sum_i t_i-1)$ and $I=(t_0\dotsm t_n)$, there exists a diagonal arrow making both triangles commute. Unwrapping the definitions of $\Vect^\ev_d$ and $\GrO_d$, this means that for every even bilinear space $(V,B)$ over $R$ and every isometric embedding $F\colon V/IV\hook \Hyp(R/I)^N$, we must find an isometric embedding $\tilde F\colon V\hook \Hyp(R)^N$ lifting $F$, after possibly increasing $N$. First, let $\tilde F\colon V\to \Hyp(R)^N$ be any lift of $F$ (possibly not isometric), which exists since $V$ is projective over $R$. If we write \[\tilde B(x,y)\coloneqq B(x,y)-B_{\Hyp}\left(\tilde Fx, \tilde Fy\right),\] then $\tilde B$ is an $I$-valued even form on $V$. Our first claim is that we can change $\tilde F$ so that $\tilde B$ has values in $I^2$. To do so, note that since $I\cap 2R=2I$, every $I$-valued even form on $V$ is an $I$-linear combination of even forms. Hence, we can find an $I$-valued bilinear form $\tilde B'$ such that $\tilde B(x,y)=\tilde B'(x,y)+\tilde B'(y,x)$. Since $B$ is non-degenerate, there exists $r\colon V\to IV$ such that \[\tilde B'(x,y)=B(x,r(y))\,.\] Then it is easy to check that replacing $\tilde F$ with $\tilde F + \tilde Fr$ has the desired effect. Without loss of generality, we can therefore assume that $\tilde B$ takes values in $I^2$. Since $I^2\cap 2R=2I^2$, we can then write \[\tilde B=\sum_i a_i b_i C_i\] for some $a_i, b_i\in I$ and some even bilinear forms $C_i\colon V\times V\to R$. Using Lemma~\ref{lem:Hyp-embedding}, we can find for each $i$ an $R$-linear map $G_i\colon V\to \Hyp(R)^{N_i}$ such that \[C_i (x,y)=B_{\Hyp}(G_ix, G_iy)\,.\] Then an isometric lift of $F$ is given by \[\left(\tilde F,\left((a_i,b_i)\circ G_i\right)_i\right)\colon V\to \Hyp(R)^{N+\sum_i N_i}\,,\] where $(a_i,b_i)\colon\Hyp(R)^{N_i}\to \Hyp(R)^{N_i}$ is the map given on each component by the matrix $\left(\begin{smallmatrix} a_i & 0\\ 0 & b_i\end{smallmatrix}\right)$. \end{proof} Let $\tau\colon\GrO_d\to \GrO_{d+2}$ be the map sending $V\subset \Hyp^\infty$ to $\Hyp \oplus V\subset \Hyp^{1+\infty}$, and define the infinite orthogonal Grassmannian as \[\GrO_\infty\coloneqq \colim(\GrO_2\xrightarrow\tau \GrO_4\xrightarrow\tau \cdots)\,.\] Using Proposition~\ref{prop:Vect^bil and Gr^o} we obtain the following result, which generalizes a theorem of Schlichting and Tripathi \cite[Theorem~5.2]{SchlichtingTripathi} to rings that are not necessarily regular nor $\Z[\tfrac 12]$-algebras. \begin{cor}\label{cor: Vect^bil and GrO} The forgetful map \[ \uZ\times \GrO_\infty \to \Vect^{\ev,\gp} \] is an $\A^1$-equivalence on affine schemes. \end{cor} \begin{proof} This map factors as \[ \uZ\times \GrO_\infty \to \Vect^{\ev,\st} \to \Vect^{\ev,\gp}, \] where the second map is an $\A^1$-equivalence on affine schemes by Lemma~\ref{lem:invert-hyp} (in which we may replace $\Vect^\sym$ by $\Vect^\ev$). On quasi-compact schemes, the presheaf $\uZ\times \GrO_\infty$ is the colimit of \[\coprod_{d\ge0}\GrO_d\xrightarrow{\tau}\coprod_{d\ge0}\GrO_d\xrightarrow{\tau}\cdots,\] where the coproducts are taken in $\Pre_\Sigma(\Sch)$. On the other hand, $\Vect^{\ev,\st}$ is the colimit of \[\Vect^\ev\xrightarrow{\tau}\Vect^\ev\xrightarrow{\tau}\cdots.\] Hence, the result follows from Proposition~\ref{prop:Vect^bil and Gr^o}. \end{proof} \begin{rem} The spaces $\Vect^\sym(R)^\gp$ and $\Vect^\ev(R)^\gp$ appearing in Corollaries \ref{cor:Hilb-FGor} and~\ref{cor: Vect^bil and GrO} are equivalent to the ``genuine symmetric'' and ``genuine even'' Grothendieck--Witt spaces $\GWspace^\mathrm{gs}(R)$ and $\GWspace^\mathrm{ge}(R)$ defined in \cite[Section 4]{HermitianII}; this is proved in \cite{HebestreitSteimle}. We note that the forgetful map $\GWspace^\mathrm{ge}\to\GWspace^\mathrm{gs}$ does not induce an equivalence in $\H(S)$ if $2$ is not invertible on $S$. Both motivic spaces are stable under base change (by Corollary~\ref{cor: Vect^bil and GrO} and \cite[Example A.0.6(5)]{deloop3}, respectively), so it suffices to consider a field $k$ of characteristic $2$. Then every even form over $k$ is alternating (by definition), and non-degenerate alternating forms have even rank \cite[I, Corollary 3.5]{HM}, so the composition \[ \pi_0\GWspace^\mathrm{ge}(k)\twoheadrightarrow\pi_0(L_\mot\GWspace^\mathrm{ge})(k)\to \pi_0(L_\mot\GWspace^\mathrm{gs})(k)\stackrel{\rk}\twoheadlongrightarrow \Z \] has image $2\Z\subset\Z$. \end{rem} \section{Isotropic Gorenstein algebras} \label{sec:isotropic} Inspired by~\cite[Theorem~2.1]{robbery}, one is tempted to ask whether the map \[\alpha\colon\Vect^\sym_{d-2}\to \FGor^\o_d\] sending $(V,B)$ to the oriented Gorenstein algebra $(R[x]/x^2\oplus V,\phi)$ of Example~\ref{ex:Gorenstein-algebras-from-bilinear-forms} is an $\A^1$-equivalence. Unfortunately this turns out not to be the case. \begin{prop}\label{prop: square zero ext over R} For any formally real field $k$ and any $d\geq 2$, the map \[\alpha\colon\Vect^\sym_{d-2}\to \FGor^\o_d\] is not a motivic equivalence on smooth $k$-schemes. \end{prop} \begin{proof} Let us consider the composition \[\FGor^\o_d\to \Vect^\sym_d\to \uW\,,\] where $\uW$ is the Zariski sheafification of the presheaf of Witt groups on smooth $k$-schemes. It is well-known that $\uW$ is an $\A^1$-invariant Nisnevich sheaf, for example by \cite[Theorem 3.4.11]{deloop1}, since Witt groups have framed transfers and are $\A^1$-invariant on regular noetherian $\Z[\tfrac 12]$-schemes (see the discussion in the introduction of \cite{GilleWittGroups}). Hence, this composition factors through a map \[\pi_0\left(L_\mot\FGor^\o_d\right)\to \uW\,.\] Let us now consider the composition \[\pi_0\left(L_\mot\Vect^\sym_{d-2}\right)(k)\xrightarrow\alpha \pi_0\left(L_\mot\FGor^\o_d\right)(k)\to \uW(k)\to \Z\,,\] where the last map is the signature associated with some real closure of $k$. We claim that the image of this composition is contained in the subset $\{n\in\Z\mid -d+2\le n\le d-2\}$. Indeed, $\pi_0\left(L_\mot\Vect^\sym_{d-2}\right)(k)$ is a quotient of $\pi_0\Vect^\sym_{d-2}(k)$ \cite[\sectsign 2, Corollary 3.22]{MV}, so it suffices to consider the image of the latter. By definition of $\alpha$, the composition \[ \Vect^\sym_{d-2}\xrightarrow{\alpha}\FGor^\o_d\to \Vect^\sym_d \] adds a hyperbolic form, and in particular does not change the signature, which is therefore bounded by the rank $d-2$. Now if $\alpha$ were a motivic equivalence, this would imply that the image of \[\pi_0\left(L_\mot\FGor^\o_d\right)(k)\to \uW(k)\to \Z\] is also contained in the subset of integers of absolute value $\leq d-2$. But the oriented Gorenstein algebra $k^d$ with the orientation $\varphi(x_1,\dots,x_d)=x_1+\cdots+x_d$ has signature $d$, thus providing a contradiction. \end{proof} \begin{rem} The algebra $k^d$ seems to be the only example leading to a contradiction in Proposition~\ref{prop: square zero ext over R}. More precisely, consider the complement $\mathcal{Z}$ of the open substack of smooth schemes in $\FGor^\o_d$. The map $\alpha$ factors through $\mathcal{Z}$, and it seems possible that $\alpha\colon\Vect^\sym_{d-2}\to \mathcal{Z}$ is an $\A^1$-equivalence. \end{rem} We now modify Proposition~\ref{prop: square zero ext over R} so that it becomes a positive statement. \begin{defn} An oriented Gorenstein $R$-algebra $(A,\varphi)$ is called \emph{isotropic} if $\varphi(1)=0$. We write $\FGor^{\o,0}_d\subset \FGor^\o_d$ for the substack of isotropic oriented Gorenstein algebras of rank $d$. \end{defn} \begin{rem} We warn the reader that the notion of isotropic oriented Gorenstein algebra is not directly related to that of isotropically augmented oriented Gorenstein algebra from Definition~\ref{def:isotropic-aug}. In particular, the forgetful functor $\FGor^{\o,+}\to\FGor^\o$ does not land in $\FGor^{\o,0}$. Nevertheless, there is a zigzag of $\A^1$-equivalences \[ \FGor^{\o,0}_{\geq 2} \leftarrow \FGor^{\o,0}\times_{\FGor^\o} \FGor^{\o,+} \to \FGor^{\o,+}, \] where the middle term is equivalent to $\FGor^\nonu$. Indeed, the right-hand map can be indetified with the zero section $\FGor^\nonu\hook \A^1\times\FGor^\nonu$ via Proposition~\ref{prop:nonunital=augmented}, and the left-hand map fits in a commuting triangle \[ \begin{tikzcd} \FGor^{\o,0}_{\geq 2} \ar{dr} &[-35pt] &[-35pt] \FGor^\nonu \ar{ll} \ar{dl}{\pi} \\ & \Vect^\sym & \end{tikzcd} \] where the diagonal maps are $\A^1$-equivalences (Propositions \ref{prop:vect-nu} and \ref{prop: Vect^bil and FGor}). \end{rem} Note that the image of the map $\alpha$ lies in the substack $\FGor^{\o,0}_d\subset \FGor^{\o}_d$. Moreover, for $(A,\varphi) \in \FGor^{\o,0}_d(R)$, the underlying symmetric bilinear form $(A,B_\varphi)$ is equipped with a canonical isotropic subspace $R\subset A$. Therefore we can apply algebraic surgery to it and obtain the non-degenerate symmetric bilinear form $\left(R^\perp/R,\bar B_\varphi\right)$. The following proposition was independently obtained by Burt Totaro.\footnote{Private communication} \begin{prop}\label{prop: Vect^bil and FGor} For any $d\geq 2$, the maps \[\alpha\colon\Vect^\sym_{d-2}\to \FGor^{\o,0}_d\] sending $(V,B)$ to the oriented Gorenstein algebra $(R[x]/x^2\oplus V,\phi)$ of Example~\ref{ex:Gorenstein-algebras-from-bilinear-forms} and \[\FGor^{\o,0}_d\to \Vect^\sym_{d-2}\] sending $(A,\phi)$ to $\left(R^\perp/R,\bar B_\varphi\right)$ are inverse up to $\A^1$-homotopy. \end{prop} \begin{proof} It is clear that the composition \[\Vect^\sym_{d-2}\to \FGor^{\o,0}_d\to \Vect^\sym_{d-2}\] is isomorphic to the identity, as the orientation $\phi$ of the algebra $R[x]/x^2\oplus V$ satisfies $B_\phi((0,v),(0,v'))=\phi(B(v,v')x,0)=B(v,v')$ by definition. Following the proof of~\cite[Theorem~2.1]{robbery}, we will use the Rees algebra to construct an $\A^1$-homotopy of the other composition to identity. The difference with the proof in \textit{loc.\ cit.}\ is that we will use the orientation $\varphi$ to refine the filtration. Indeed, let us consider the natural filtration \[R\subset R^\perp\subset A\] of $A$. The corresponding Rees algebra is the $R[t]$-algebra given by \[\Rees(A,\varphi)=\{a\in A[t]\mid a_0\in R,\ \varphi(a_1)=0\}.\] By \cite[Lemma~2.2]{robbery}, it is a finite locally free $R[t]$-algebra such that \[\Rees(A,\varphi)/(t-1)\simeq A\quad\text{and}\quad \Rees(A,\varphi)/(t)\simeq R\oplus R^\perp/R\oplus A/R^\perp\,.\] We can equip $\Rees(A,\varphi)$ with an orientation $\tilde\varphi \colon \Rees(A,\varphi)\to R[t]$ given by $a\mapsto \frac{1}{t^2}\varphi(a)$ (note that $\varphi(a_0)=\varphi(a_1)=0$ by definition of the filtration, so $\varphi(a)$ is indeed divisible by $t^2$). We claim this gives $\Rees(A,\varphi)$ the structure of an oriented Gorenstein $R[t]$-algebra. Since this is a property local on the base, we can assume that $A$ is free as an $R$-module. Then let us choose a basis of $A$ of the form \[(1,e_1,\dots,e_{d-2},x)\,,\] where $1,e_1,\dots,e_{d-2}$ is a basis of $\ker \varphi$ and $x$ is such that $\varphi(x)=1$ and $\varphi(xe_i)=0$. Then the matrix of the bilinear form $B_\varphi$ is \[\begin{pmatrix} 0 & 0 & 1\\ 0 & D & 0\\ 1 & 0 & \varphi(x^2)\end{pmatrix},\] where $D$ is an invertible matrix (since $B_\varphi$ is non-degenerate). Then the collection \[(1,e_1t,\dots,e_{d-2}t,xt^2)\] is a basis for $\Rees(A,\varphi)$, and the matrix of the symmetric bilinear form $B_{\tilde \varphi}$ in this basis is \[\begin{pmatrix} 0 & 0 & 1\\ 0 & D & 0\\ 1 & 0 & \varphi(x^2)t^2\end{pmatrix},\] which is invertible (since $D$ is). Hence, sending $(A,\varphi)$ to $(\Rees(A,\varphi),\tilde\varphi)$ defines a natural transformation \[\FGor^{\o,0}_d\to \FGor^{\o,0}_d(\A^1\times-)\,,\] which provides the desired $\A^1$-homotopy. Indeed, at $t=0$ we have an isomorphism of $R$-algebras \[ R\oplus R^\perp/R\oplus A/R^\perp \simeq R[x]/x^2\oplus R/R^\perp \] identifying $A/R^\perp$ with $Rx$ via $a\mapsto \phi(a)x$, under which the orientation $\tilde\phi_0=\phi\circ \pr_3$ of the left-hand side corresponds to the orientation of Example~\ref{ex:Gorenstein-algebras-from-bilinear-forms}, which extracts the coefficient of $x$. \end{proof} \begin{cor} For any $d \geqslant 2$, there is a canonical $\A^1$-equivalence \[\FGor^{\o,0}_d \simeq \GrO_{d-2}\] on affine $\Z[\tfrac 12]$-schemes. \end{cor} \begin{proof} Combine Propositions~\ref{prop:Vect^bil and Gr^o} and~\ref{prop: Vect^bil and FGor}. \end{proof} \section{The motivic hermitian K-theory spectrum}\label{sec:kq} Fix a base scheme $S$. By a \emph{presheaf with framed transfers} on $\Sm_S$ we mean a $\Sigma$-presheaf on the $\infty$-category $\Span^\fr(\Sm_S)$ constructed in \cite{deloop1} (i.e., a presheaf that takes finite coproducts in $\Span^\fr(\Sm_S)$ to products of spaces). We refer to \cite[\sectsign 3]{deloop1} for the definition of the $\infty$-categories $\H^\fr(S)$ and $\SH^\fr(S)$ of framed motivic spaces and framed motivic spectra over $S$. The general reconstruction theorem \cite[Theorem 18]{framed-loc} states that the ``forget transfers'' functor implements an equivalence \[ \SH^\fr(S)\simeq \SH(S) \] between the symmetric monoidal $\infty$-categories of framed motivic spectra and of motivic spectra. In particular, for any $E\in\SH(S)$, the presheaf of spaces $\Omega^\infty_\T E$ has a canonical structure of framed transfers. We will abusively denote by $\Sigma^\infty_{\T,\fr}$ the composite functor \[ \Pre_\Sigma(\Span^\fr(\Sm_S)) \to \H^\fr(S) \xrightarrow{\Sigma^\infty_{\T,\fr}} \SH^\fr(S)\simeq \SH(S). \] Let $\Span^{\fgor,\o}(\Sch_S)$ be the symmetric monoidal $(2,1)$-category of oriented finite Gorenstein correspondences: its objects are $S$-schemes and its morphisms are spans \[ \begin{tikzcd} & Z \ar[swap]{ld}{f}\ar{rd}{g} & \\ X & & Y \end{tikzcd} \] where $Z\in\FGor^\o(X)$, that is, $f$ is finite locally free and equipped with a trivialization $\omega_f\simeq \sO_Z$ (see Definition~\ref{dfn:oriented-Gorenstein-algebra}). The symmetric monoidal structure is given by the product of $S$-schemes (for two finite locally free morphisms $f\colon Z\to X$ and $f'\colon Z'\to X'$ over $S$, the dualizing sheaf $\omega_{f\times_S f'}$ is the external tensor product $\omega_f\boxtimes_S \omega_{f'}$, so trivializations of $\omega_f$ and $\omega_{f'}$ induce a trivialization of $\omega_{f\times_Sf'}$). The wide subcategory where $f$ is finite syntomic is the $(2,1)$-category $\Span^{\fsyn,\o}(\Sch_S)$ of oriented finite syntomic correspondences considered in \cite[\sectsign 4.2]{deloop3}. We write $\Span^{\fgor,\o}(\Sm_S)$ for the full subcategory spanned by the smooth $S$-schemes. The presheaf on $\Span^{\fgor,\o}(\Sch_S)$ represented by $S$ is the presheaf of groupoids $\FGor^\o$, which is therefore a commutative monoid in $\Pre_\Sigma(\Span^{\fgor,\o}(\Sch_S))$ (with respect to the Day convolution). We observe that the presheaf of groupoids $\Vect^\sym$ can also be promoted to a commutative monoid object in $\Pre_\Sigma(\Span^{\fgor,\o}(\Sch_S))$. Given a finite Gorenstein morphism $f\colon Z\to X$ with orientation $\phi\colon f_*\sO_Z\to\sO_X$, we have a pushforward functor \[ f_*\colon \Vect^\sym(Z) \to \Vect^\sym(X), \quad (\sE,B)\mapsto (f_*\sE, \phi\circ f_*B). \] This pushforward is compatible with composition, base change, and the tensor product (it satisfies a projection formula) up to canonical isomorphisms. Since $\Vect^\sym$ is an ordinary groupoid, it is straightforward to check the coherence of these canonical isomorphisms, which gives $\Vect^\sym$ the structure of a commutative monoid in $\Pre_\Sigma(\Span^{\fgor,\o}(\Sch_S))$. Finally, the forgetful map $\eta\colon \FGor^\o\to \Vect^\sym$ can be uniquely promoted to a morphism of commutative monoids in $\Pre_\Sigma(\Span^{\fgor,\o}(\Sch_S))$, since $\FGor^\o$ is the initial such object. We will write $\FGor^\o_S$ and $\Vect^\sym_S$ for the restrictions of these presheaves to smooth $S$-schemes. By Lemma~\ref{lem:det(L)} below (see also \cite[Theorem A.1]{BachmannWickelgren}), the determinant $\det\colon K_{\rk=0}\to\Pic$ defines a symmetric monoidal forgetful functor \[ \Span^\fr(\Sch_S) \to \Span^{\fsyn,\o}(\Sch_S)\subset \Span^{\fgor,\o}(\Sch_S). \] We can therefore regard $\FGor^\o$ and $\Vect^\sym$ as commutative monoids in $\Pre_\Sigma(\Span^\fr(\Sch_S))$. \begin{lem}\label{lem:det(L)} Let $f$ be a finite syntomic map, $L_f$ its cotangent complex, and $\omega_f$ its relative dualizing sheaf. Then there is a canonical isomorphism \[\det(L_f) \simeq \omega_f .\] Moreover, this isomorphism is compatible with base change and composition in the obvious way. \end{lem} \begin{proof} By \cite[Tag 0FKD]{stacks}, there is such a family of isomorphisms for $f$ a finite syntomic morphism between noetherian schemes. Since they are compatible with base change, they uniquely determine the desired isomorphisms for $f$ between qcqs schemes (by noetherian approximation), whence between arbitrary schemes by descent. \end{proof} \begin{rem} Lemma~\ref{lem:det(L)} holds more generally if $f$ is any quasi-smooth morphism of derived schemes, with $\omega_f=f^!(\sO)$, but the proof is more complicated (in fact, the functor $f^!$ seems not to have been defined in this generality, although one can also define $\omega_f$ more directly). \end{rem} In \cite{Schlichting3}, Schlichting defined the Grothendieck--Witt spectrum of a qcqs $\Z[\tfrac 12]$-scheme $S$; we shall denote by $\GWspace(S)$ its underlying space.\footnote{In \emph{loc.\ cit.}, Schlichting works with schemes admitting an ample family of line bundles, but remarks that this assumption can be removed if one uses perfect complexes instead of strictly perfect complexes. In any case, Schlichting's setting suffices for our purposes, since it suffices to define the motivic localization of $\GWspace$.} The presheaf $\GWspace$ is then a Nisnevich sheaf \cite[Theorem 9.6]{Schlichting3}, and it is $\A^1$-invariant on regular schemes \cite[Theorem 9.8]{Schlichting3}. By the example in~\cite[p.~1781]{Schlichting3} and by~\cite[Remark~4.13]{Schlichting1}, for $R$ a $\Z[\tfrac 12]$-algebra there is a natural equivalence \begin{equation*}\label{eqn:GW-Vect-sym} \GWspace(R) \simeq \Vect^\sym(R)^\gp . \end{equation*} In particular, we have an equivalence $\GWspace \simeq L_\Zar\Vect^{\sym,\gp}$ making $\GWspace$ into a presheaf of $\Einfty$-ring spaces. By \cite[Remark~5.9 and Theorem~9.10]{Schlichting3}, we have a chain of equivalences of $\GWspace$-modules: \[\GWspace\simeq \GWspace^{[-4]}\simeq \Omega^4_{\P^1}\GWspace.\] The element $1$ in the left-hand side gives a canonical element $\betah\colon (\P^1)^{\wedge 4} \to \GWspace$, called the \emph{hermitian Bott element}. The above equivalence means that $\GWspace$ is $\betah$-periodic in the sense of \cite[Section 3]{HoyoisCdh}. Let $S$ be a scheme with $2\in \sO(S)^\times$. We define the motivic hermitian K-theory spectrum $\KQ_S\in\SH(S)$ as the motivic spectrum associated with the $\T^{\wedge 4}$-prespectrum \[ (L_\mot\GWspace_S, L_\mot\GWspace_S,\dotsc), \] where $\GWspace_S$ is the restriction of $\GWspace$ to $\Sm_S$, with structure maps $L_\mot\GWspace_S \to \Omega_\T^4 L_\mot\GWspace_S$ induced by the hermitian Bott element. Since the structure maps are $\GWspace_S$-module maps, we can regard $\KQ_S$ as an object of $\Mod_{\GWspace}(\SH(S))$. We write $\kq_S$ for the very effective cover of $\KQ_S$. Note that when $S$ is regular, then $\GWspace_S\simeq L_\mot\GWspace_S$ and the above prespectrum is already a spectrum; in that case, $\KQ_S$ was originally defined by Hornbostel \cite{Hornbostel:2005}. We refer to Proposition~\ref{prop:KQ=GW} below for a justification of our definition in general. \begin{rem}\label{rem:2} There is work in progress by B.~Calmès, Y.~Harpaz and the third author on constructing the motivic hermitian K-theory spectrum over base schemes where $2$ need not be invertible \cite{CalmesNardinHarpaz}. All of the results below remain valid without that assumption (in Proposition~\ref{prop:KSp}(2), one must however use skew-symmetric instead of alternating forms). \end{rem} \begin{lem}\label{lem:KQ-is-E-infinity} Let $S$ be a regular $\Z[\tfrac 12]$-scheme. Then the object $\KQ_S\in \Mod_{\GWspace}(\SH(S))$ has a unique structure of $\Einfty$-algebra lifting the $\Einfty$-ring structure of $\GWspace_S$. \end{lem} \begin{proof} Since $S$ is regular we have $\KQ_S=(\GWspace_S,\GWspace_S,\dotsc)$. The action of $\betah$ on $\KQ_S$ is given levelwise by its action on $\GWspace_S$, and hence it is invertible. The motivic spectrum $\KQ_S$ is thus $\betah$-periodic in the sense of \cite[Section 3]{HoyoisCdh}. By \cite[Proposition 3.2]{HoyoisCdh}, there is an equivalence of symmetric monoidal $\infty$-categories \[ \Sigma^\infty_\T(-)[\betah^{-1}]: P_\betah\Mod_{\GWspace}(\H_*(S)) \rightleftarrows P_\betah \Mod_{\GWspace}(\SH(S)): \Omega^\infty_\T, \] where $P_\betah\Mod_{\GWspace}$ on either side denotes the subcategory of $\betah$-periodic $\GWspace$-modules. Since $\Omega^\infty_\T \KQ_S\simeq \GWspace_S$, this proves the claim. \end{proof} By construction, there is a $\T^{\wedge 4}$-prespectrum of presheaves on \emph{all} $\Z[\tfrac 12]$-schemes whose restriction to $\Sm_S$ gives $\KQ_S$ for all $S$. This implies that $S\mapsto \KQ_S$ is a section of the cocartesian fibration over $\Sch_{\Z[\frac 12]}^\op$ classified by $\SH(-)$. In particular, for any morphism of $\Z[\tfrac 12]$-schemes $f\colon T\to S$, we have a canonical comparison map $f^*(\KQ_S)\to \KQ_T$ in $\SH(T)$. \begin{lem}\label{lem:KQ-bc} For any morphism of $\Z[\tfrac 12]$-schemes $f\colon T\to S$, the canonical map $f^*(\KQ_S)\to \KQ_T$ is an equivalence. \end{lem} \begin{proof} The functor $f^*$ is compatible with spectrification, motivic localization, and group completion. Hence, it suffices to show that the canonical map $f^*(\Vect^\sym_S)\to \Vect^\sym_T$ is a motivic equivalence of presheaves on $\Sm_T$. In fact, it is a Zariski-local equivalence by \cite[Proposition A.0.4]{deloop3}, since $\Vect^\sym$ is a smooth algebraic stack with affine diagonal. \end{proof} Combining Lemmas~\ref{lem:KQ-is-E-infinity} and \ref{lem:KQ-bc}, we obtain a canonical $\Einfty$-ring structure on $\KQ_S$ for any $\Z[\tfrac 12]$-scheme $S$, which is compatible with base change (an $\Einfty$-ring structure on $\KQ_S$ was also constructed in this generality by Lopez-Avila in \cite{AvilaThesis}; we suspect but do now know that it is equivalent to ours). Next, we show that the motivic spectrum $\KQ_S$ represents Karoubi–Grothendieck–Witt theory made $\A^1$-homotopy invariant: \begin{prop}\label{prop:KQ=GW} Let $S$ be a qcqs scheme with $2\in\sO(S)^\times$ and let $n\in\Z$. Then there is a natural equivalence of spectra (and of $\Einfty$-ring spectra if $n=0$) \[ \Gamma(S,\Sigma^n_\T\KQ) \simeq (\Lhtp\KGW^{[n]})(S), \] where $\KGW^{[n]}$ is the $n$th shifted Karoubi–Grothendieck–Witt spectrum \cite[Definition 8.6]{Schlichting3}. \end{prop} \begin{proof} We start with the observation that the restriction of the Bott element $\beta\in \GWspace^{[1]}(\P^1)$ defined in \cite[\sectsign 9.4]{Schlichting3} to either $\A^1$ or $\P^1-0$ is canonically null-homotopic. This gives rise to the following four variations on the domain of the Bott element, which are all motivically equivalent: \[ \begin{tikzcd} \T=\A^1/\bG_m \ar{r} \ar{d} & \P^1/(\P^1-0) \ar{dr}{\beta} & \P^1/\infty \ar{l} \ar{d}{\beta} \\ \Sigma\bG_m \ar{rr}{\beta} & & \GWspace^{[1]}\rlap. \end{tikzcd} \] Let us write $\GWspectrum$ for the Grothendieck–Witt spectrum and $\GWspectrum_{\geq 0}$ for its connective cover. We consider the following four ``periodic'' prespectra with structure maps given by $\betah=\beta^4$: \begin{itemize} \item[(A)] $(\GWspace,\GWspace,\dotsc)$, \item[(B)] $(\GWspectrum_{\geq 0},\GWspectrum_{\geq 0},\dotsc)$, \item[(C)] $(\GWspectrum,\GWspectrum,\dotsc)$, \item[(D)] $(\KGW,\KGW,\dotsc)$. \end{itemize} Here, (A) is a prespectrum in presheaves of pointed spaces, which defines $\KQ$, whereas (B)–(D) are prespectra in presheaves of spectra. Note also that (A), (C), and (D) are $(\P^1)^{\wedge 4}$-spectra, by the projective bundle formula \cite[Theorem~9.10]{Schlichting3}. Since $\KGW^{[n]}$ is a Nisnevich sheaf of spectra on qcqs schemes \cite[Theorem 9.6]{Schlichting3}, its motivic localization is given by $\Lhtp\KGW^{[n]}$. Moreover, since $\Lhtp$ commutes with $\Omega_{\P^1}$ and $\Omega_{\P^1}\KGW^{[n]}\simeq \KGW^{[n-1]}$, we see that the motivic spectrum defined by (D) satisfies the desired conclusion. It will thus suffice to show that (A)–(D) all define the same motivic spectrum. The fact that we get an equivalence of $\Einfty$-rings when $n=0$ follows by repeating the proof of Lemma~\ref{lem:KQ-is-E-infinity} with $\Lhtp\KGW$ instead of $\GWspace$. The maps $(B)\to (C)\to(D)$ become equivalences after $(\Sigma\bG_m)^{\wedge 4}$-spectrification, since the maps \[\Omega_{\Sigma\bG_m}^{n}\GWspectrum_{\geq 0}\to \Omega_{\Sigma\bG_m}^n\GWspectrum\to \Omega_{\Sigma\bG_m}^n\KGW\] induce isomorphisms on $\pi_i$ for $i\geq -n$ \cite[Proposition 9.3(1)]{Schlichting3}. Hence, the motivic spectra associated with (B), (C), and (D) are the same. Furthermore, since $\Lhtp$ commutes with spectrification, we see that the motivic spectrum associated with (B) can be obtained in two steps: first apply $\Lhtp$ and then $(\Sigma\bG_m)^{\wedge 4}$-spectrify. As $\Omega^\infty$ preserves sifted colimits of \emph{connective} spectra, this explicit formula for the localization of (B) implies that the motivic spectra associated with (A) and (B) are identified under the equivalence between $\T^{\wedge 4}$-spectra in motivic spaces and in motivic $S^1$-spectra (which is implemented by the functor $\Omega^\infty$ levelwise). This completes the proof. \end{proof} \begin{samepage} \begin{prop}\label{prop:KQ-kq-Vect^bil} Assume $2\in\sO(S)^\times$. \begin{enumerate} \item There is an equivalence of $\Einfty$-ring spectra \[ \KQ_S\simeq (\Sigma^\infty_{\T,\fr}\Vect^\sym_S)[\betah^{-1}]. \] \item If $S$ is regular over a field, there is an equivalence of $\Einfty$-ring spectra \[ \kq_S\simeq \Sigma^\infty_{\T,\fr}\Vect^\sym_S. \] \end{enumerate} \end{prop} \end{samepage} \begin{proof} Since $\GWspace$ is a Nisnevich sheaf, which is given by $\Vect^{\sym,\gp}$ on affine schemes, we have $\GWspace=L_\Nis\Vect^{\sym,\gp}$. Since Nisnevich sheafification preserves presheaves with oriented finite Gorenstein transfers (cf.\ \cite[Proposition 3.2.4]{deloop1}), the $\T^{\wedge 4}$-prespectrum defining $\KQ_S$ is a $\GWspace_S$-module with oriented finite Gorenstein transfers. In particular, it defines a $\GWspace_S$-module in framed motivic spectra whose underlying motivic spectrum is $\KQ_S$. Repeating the proof of Lemma~\ref{lem:KQ-is-E-infinity} in the framed setting, we see that $\KQ_S \simeq (\Sigma^\infty_{\T,\fr}\Vect^\sym_S)[\betah^{-1}]$ as $\Einfty$-rings when $S$ is regular. By Lemma~\ref{lem:KQ-bc}, the left-hand side is stable under base change. The right-hand side is stable under base change as well by \cite[Lemma~16]{framed-loc}, which proves (1) in general. The proof of (2) uses the motivic recognition principle and is identical to the proof of \cite[Corollary 5.2]{robbery}. \end{proof} We have analogous results with the shifted Grothendieck–Witt space $\GWspace^{[2]}$. For a $\Z[\tfrac 12]$-scheme $S$, we define $\KSp_S\in\Mod_\GWspace(\SH(S))$ to be the motivic spectrum associated with the $\T^{\wedge 4}$-prespectrum \[ (L_\mot\GWspace^{[2]}, L_\mot\GWspace^{[2]},\dotsc), \] with structure maps induced by $\betah$. We write $\ksp_S$ for the very effective cover of $\KSp_S$. For a $\Z[\tfrac 12]$-algebra $R$, we have \[ \GWspace^{[2]}(R)\simeq \Vect^\alt(R)^\gp \] where $\Vect^\alt$ is the stack of non-degenerate alternating bilinear forms. Since the latter is a smooth algebraic stack with affine diagonal, we deduce as in Lemma~\ref{lem:KQ-bc} that $\KSp_S$ is stable under arbitrary base change. From the equivalence $\Omega_{\P^1}^2\GWspace^{[2]}\simeq \GWspace$, it follows immediately that \[\KSp_S\simeq \Sigma^2_\T\KQ_S\] when $S$ is regular, whence in general by base change. Arguing exactly as in Proposition~\ref{prop:KQ-kq-Vect^bil}, we obtain the following result: \begin{prop}\label{prop:KSp} Assume $2\in\sO(S)^\times$. \begin{enumerate} \item There is an equivalence of $\KQ_S$-module spectra \[ \KSp_S\simeq (\Sigma^\infty_{\T,\fr}\Vect^\alt_S)[\betah^{-1}]. \] \item If $S$ is regular over a field, there is an equivalence of $\kq_S$-module spectra \[ \ksp_S\simeq \Sigma^\infty_{\T,\fr}\Vect^\alt_S. \] \end{enumerate} \end{prop} \begin{rem} Combining Propositions~\ref{prop:KQ-kq-Vect^bil} and \ref{prop:KSp}, we find \[ \KQ_S\oplus \KSp_S \simeq \Sigma^\infty_{\T,\fr}\big(\Vect^\sym_S\times \Vect^\alt_S\big)[\betah^{-1}]. \] One can easily check that the groupoid $\Vect^\sym\times \Vect^\alt$ has a symmetric monoidal structure given by tensoring bilinear forms, which is compatible with the oriented finite Gorenstein transfers. We deduce that $\KQ_S\oplus \KSp_S$ has an $\Einfty$-ring structure such that the summand inclusion $\KQ_S\to \KQ_S\oplus \KSp_S$ is an $\Einfty$-map. \end{rem} \begin{rem}\label{rem:SL-orientation} Recall that $\MSL_S\simeq \Sigma^\infty_{\T,\fr}\FSyn^\o_S$ \cite[Theorem 3.4.3]{deloop3}. Hence, by Proposition~\ref{prop:KQ-kq-Vect^bil}, the forgetful map $\FSyn^\o\to \Vect^\sym$ induces a morphism of $\Einfty$-ring spectra \[ \MSL_S \to \KQ_S \] for any $\Z[\tfrac 12]$-scheme $S$, which factors through $\kq_S$ since $\MSL_S$ is very effective. \end{rem} \begin{rem} The oriented finite Gorenstein transfers in hermitian K-theory are known to not fully depend on the trivialization of the dualizing line $\omega_f$, but only on a choice of square root $\omega_f\simeq \mathcal L^{\otimes 2}$. Correspondingly, the coherent $\SL$-orientation of $\KQ_S$ from Remark~\ref{rem:SL-orientation} can be improved to an $\SL^c$-orientation. Define the presheaf $K^{\SL^c}\colon \Sch^\op\to \Spc$ by the pullback square \[ \begin{tikzcd} K^{\SL^c} \ar{r} \ar{d} & K \ar{d}{\det} \\ \Pic \ar{r}{2} & \Pic\rlap, \end{tikzcd} \] where $\Pic(X)$ is the groupoid of invertible sheaves on $X$. The motivic $\Einfty$-ring spectrum $\MSL^c$ is the Thom spectrum associated with the composition \[K^{\SL^c}\times_{\uZ} \{0\}\to K\to \Pic(\SH),\] in the sense of \cite[Section 16]{norms}. By \cite[Theorem 3.3.10]{deloop3}, there is an equivalence of $\Einfty$-rings \[ \MSL^c\simeq \Sigma^\infty_{\T,\fr}\FSyn^{c} \] where $\FSyn^c(X)$ is the groupoid of triples $(Z,\sL,\lambda)$ with $Z$ a finite syntomic $X$-scheme, $\sL$ an invertible sheaf on $Z$, and $\lambda\colon \omega_{Z/X}\simeq \sL^{\otimes 2}$. There is a map $\FSyn^c\to\Vect^\sym$ sending $(Z,\sL,\lambda)$ to $f_*(\sL)$, where $f\colon Z\to X$ is the structure map, with the symmetric bilinear form \[ f_*(\sL) \otimes f_*(\sL) \to f_*(\sL^{\otimes 2}) \stackrel\lambda\simeq f_*(\omega_{Z/X}) \to\sO_X. \] This induces an $\Einfty$-$\SL^c$-orientation $\MSL^c\to\KQ$ refining the $\SL$-orientation of Remark~\ref{rem:SL-orientation}. \end{rem} Combining Proposition~\ref{prop:KQ-kq-Vect^bil} and Theorem~\ref{thm:main-gp}, we obtain a description of the motivic hermitian K-theory spectrum in terms of oriented Gorenstein algebras: \begin{thm}\label{thm:KQ-kq-FGor} Assume $2\in\sO(S)^\times$. \begin{enumerate} \item There is an equivalence of $\Einfty$-ring spectra \[\KQ_S\simeq (\Sigma^\infty_{\T,\fr}\FGor^\o_S)[\betah^{-1}],\] where $\betah\in\pi_{8,4}\Sigma^\infty_{\T,\fr}\FGor^\o_S$ is transported through the equivalence of Theorem~\ref{thm:main-gp}. \item If $S$ is regular over a field, there is an equivalence of $\Einfty$-ring spectra \[ \kq_S \simeq \Sigma^\infty_{\T,\fr} \FGor^\o_S. \] \end{enumerate} \end{thm} \section{The Milnor--Witt motivic cohomology spectrum}\label{sec:MW} Let $S$ be a scheme that is pro-smooth over a field or over a Dedekind scheme (i.e., $S$ is locally a cofiltered limit of smooth schemes; for example, by Popescu's theorem~\cite[Tag 07GC]{stacks}, $S$ is regular over a field). The \emph{Milnor–Witt motivic cohomology spectrum} $\hzmw_S\in\SH(S)$ is defined by \[\hzmw_S=\underline\pi^\eff_0(\MonUnit_S),\] where $\underline\pi^\eff_*$ are the homotopy groups in the effective homotopy $t$-structure on $\SH^\eff(S)$ (whose connective part is the subcategory $\SH^\veff(S)$ of very effective motivic spectra). This definition is due to Bachmann \cite{BachmannSlices,BachmannDedekind}, and it is known to be equivalent to the original definition of Calmès and Fasel over a perfect field of characteristic not $2$~\cite{BachmannFasel}. Note that $\hzmw_S$ is an $\Einfty$-ring spectrum (even a normed spectrum, see \cite[Proposition 13.3]{norms}) that is stable under pro-smooth base change. For $S$ as above, we define a presheaf of rings $\uGW_S$ on $\Sm_S$ in two cases: \begin{enumerate} \item if $S$ is over a perfect field $k$, $\uGW_S$ is the Zariski sheafification of the left Kan extension of the sheaf of unramified Grothendieck–Witt rings over $\Sm_k$ defined by Morel \cite[\sectsign 3.2]{Morel}; \item if $2\in\sO(S)^\times$, $\uGW_S$ is the Nisnevich sheafification of the presheaf of Grothendieck–Witt rings, i.e., $\uGW_S=L_\Nis\pi_0\Vect_S^{\sym,\gp}$. \end{enumerate} Note that these two definitions agree when they both apply (see the proof of \cite[Theorem 10.12]{norms}). We can promote $\uGW_S$ to a commutative monoid in presheaves with framed transfers as follows. In case (1), since $\uGW=(\underline{K}_3^{MW})_{-3}$, \cite[Theorem 5.19]{BachmannYakerson} implies that $\uGW_k$ admits a unique structure of presheaf with framed transfers compatible with its $\uGW_k$-module structure and extending Morel's transfers for monogenic field extensions \cite[\sectsign 4.2]{Morel}. In case (2), $\uGW_S$ inherits oriented finite Gorenstein transfers from $\Vect^\sym$. The uniqueness of the framed transfers in (1) implies that they agree with those in (2) when $2$ is invertible. \begin{rem} Over a field of characteristic $2$, there is a canonical epimorphism of Nisnevich sheaves $L_\Nis\pi_0\Vect^{\sym,\gp}\to\uGW$, but we do not know if it is an isomorphism (see \cite[Remark 4.7]{deloop4}). \end{rem} \begin{lem}\label{lem:hzmw-transfers} Let $S$ be pro-smooth over a field or a Dedekind scheme. If $S$ has mixed characteristic, assume also that $2\in\sO(S)^\times$. Then there is an equivalence $\Omega^\infty_{\T,\fr}\hzmw_S\simeq \uGW_S$ of commutative monoids in $\Pre_\Sigma(\Span^\fr(\Sm_S))$. \end{lem} \begin{proof} In the equicharacteristic case, it suffices to prove the result over a perfect field. By \cite[Proposition~4(3)]{BachmannSlices}, $\hzmw$ is the effective cover of $\underline\pi_0(\1)_*$, and hence we have isomorphisms of rings $\Omega^\infty_\T\hzmw\simeq\underline\pi_0(\1)_0\simeq \uGW$. It remains to compare the framed transfers on either side. By \cite[Corollary 5.17]{BachmannYakerson}, it suffices to compare the transfers induced by a monogenic field extension $K\subset L$ with chosen generator $a\in L$. This was done in the proof of \cite[Proposition 4.3.17]{deloop2}. Assume now that $2\in\sO(S)^\times$. By \cite[Definition 4.1 and Corollary 4.9]{BachmannDedekind}, we have an isomorphism $\Omega^\infty_{\T}\hzmw_S\simeq \uGW_S$ such that the following square commutes, where $\kq^\fr_S=\Sigma^\infty_{\T,\fr}\Vect^{\sym,\gp}_S$: \[ \begin{tikzcd} \Vect^{\sym,\gp}_S \ar{r}{\mathrm{unit}} \ar{d} & \Omega^\infty_{\T}\kq^\fr_S \ar{d} \\ \uGW_S \ar{r}{\simeq} & \Omega^\infty_{\T}\hzmw_S\rlap. \end{tikzcd} \] The top and left arrows are morphisms of presheaves with framed transfers by definition, and so is the right vertical arrow since it is $\Omega^\infty_{\T}$ of the morphism $\kq_S^\fr\to \underline\pi^\eff_0\kq_S^\fr\simeq \hzmw_S$. Using the compatibility of the Nisnevich topology with framed transfers \cite[Proposition 3.2.14]{deloop1}, we deduce that the bottom isomorphism is compatible with framed transfers. \end{proof} The next theorem is the analogue of \cite[Theorem 21]{framed-loc} for Milnor–Witt motivic cohomology. We are grateful to Tom Bachmann for providing the rigidity argument in the mixed characteristic case. \begin{thm}\label{thm:HtildeZ} Let $S$ be pro-smooth over a field or a Dedekind scheme. If $S$ has mixed characteristic, assume also that $2\in\sO(S)^\times$. Then there is an equivalence of motivic $\Einfty$-ring spectra $\hzmw_S \simeq \Sigma^\infty_{\T,\fr} \uGW_S$ in $\SH(S)$. \end{thm} \begin{proof} The equivalence $\Omega^\infty_{\T,\fr}\hzmw_S\simeq \uGW_S$ of Lemma~\ref{lem:hzmw-transfers} induces a canonical $\Einfty$-map \[ \Sigma^\infty_{\T,\fr}\uGW_S\to \hzmw_S \] in $\SH(S)$. Since both sides are compatible with pro-smooth base change, it is enough to show that it is an equivalence when $S$ is a perfect field or a Dedekind domain. In the former case, the result follows directly from the motivic recognition principle \cite[Theorem~3.5.14]{deloop1}, since $\hzmw_S$ is very effective. Let us therefore assume that $S$ is a Dedekind domain with $2\in\sO(S)^\times$. By \cite[Proposition B.3]{norms}, it suffices to show that both $\Sigma^\infty_{\T,\fr}\uGW_S$ and $\hzmw_S$ are stable under base change to the residue fields. For $\hzmw_S$, this holds by \cite[Theorem 4.4]{BachmannDedekind}. For $\Sigma^\infty_{\T,\fr}\uGW_S$, in view of \cite[Lemma 16]{framed-loc}, it suffices to show that the canonical map $s^*(\uGW_S)\to \uGW_{\kappa(s)}$ in $\Pre(\Sm_{\kappa(s)})$ is a motivic equivalence for all $s\in S$. Since $\uGW\simeq\uW\times_{\uZ/2}\uZ$ and Witt groups satisfy rigidity for henselian local $\Z[\tfrac 12]$-algebras \cite[Lemma 4.1]{Jacobson}, this follows from Lemma~\ref{lem:rigidity} below. \end{proof} \begin{rem} The proof of Theorem~\ref{thm:HtildeZ} shows that $\hzmw_S \simeq \Sigma^\infty_{\T,\fr} \uGW_S$ for any $\Z[\tfrac 12]$-scheme $S$, if one defines $\hzmw_S$ by base change from $\Spec\Z$ and $\uGW_S$ as $L_\Nis\pi_0\Vect^{\sym,\gp}_S$. \end{rem} We say that a presheaf $\sF\in \Pre(\Sch_S)$ is \emph{finitary} if it transforms limits of cofiltered diagrams of qcqs schemes with affine transition maps into colimits. We say that $\sF$ \emph{satisfies rigidity} for a henselian pair $(A,I)$ if the map $\sF(A)\to \sF(A/I)$ is an equivalence. \begin{lem}[Bachmann] \label{lem:rigidity} Let $\sF\in\Pre(\Sch_S)$ be a finitary presheaf satisfying rigidity for all pairs $(A,I)$ where $A$ is an essentially smooth henselian local ring over $S$. Suppose either that $S$ is locally of finite Krull dimension or that $\sF$ is truncated. For $X\in\Sch_S$, denote by $\sF_X$ the restriction of $\sF$ to $\Sm_X$. Then, for every morphism $f\colon Y\to X$ in $\Sch_S$, the canonical map \[ f^*(\sF_X) \to \sF_Y \] in $\Pre(\Sm_Y)$ is a motivic equivalence. \end{lem} \begin{proof} Note that the statement depends only on the Nisnevich sheafification of $\sF$, so we are free to assume that $\sF(\emptyset)=*$. By 2-out-of-3, we can assume $X=S$. Since the question is local on $Y$ and $\sF$ is finitary, we can further assume that $Y$ is a closed subscheme of $\A^n_S$. Replacing $S$ by $\A^n_S$, we see that it suffices to prove the result for a closed immersion $i\colon Z\hook S$. Let $j\colon U\hook S$ be its open complement and consider the commutative square \[ \begin{tikzcd} j_\sharp\sF_U \ar{r} \ar{d} & \sF_S \ar{d} \\ U \ar{r} & i_*\sF_Z \end{tikzcd} \] in $\Pre(\Sm_S)$. We claim that this square is a Nisnevich-local pushout square. If $\sF$ is truncated, this is a square of truncated presheaves, so the claim can be checked on stalks; the same is true if $S$ is locally of finite dimension by \cite[Corollary 3.27]{ClausenMathew}. Using that $\sF$ is finitary, the stalks over an essentially smooth henselian local scheme $X$ are given by \[ \begin{tikzcd} \sF(X) \ar{r} \ar{d} & \sF(X) \ar{d} \\ * \ar{r} & \sF(\emptyset) \end{tikzcd} \quad\text{or}\quad \begin{tikzcd} \emptyset \ar{r} \ar{d} & \sF(X) \ar{d} \\ \emptyset \ar{r} & \sF(X_Z)\rlap, \end{tikzcd} \] depending on whether $X_Z$ is empty or not. Since $\sF$ is rigid and satisfies $\sF(\emptyset)=*$, this proves the claim. On the other hand, by the Morel–Voevodsky localization theorem, the square \[ \begin{tikzcd} j_\sharp\sF_U \ar{r} \ar{d} & \sF_S \ar{d} \\ U \ar{r} & i_*i^*\sF_S \end{tikzcd} \] is motivically cocartesian (see \cite[\S3 Theorem 2.21]{MV} or \cite[Corollary 5]{framed-loc}). It follows that the canonical map $i_*i^*\sF_S\to i_*\sF_Z$ is a motivic equivalence. Since $i_*$ commutes with $L_\mot$ for presheaves satisfying $\sF(\emptyset)=*$ and since $i_*\colon \H(Z)\to \H(S)$ is fully faithful, we deduce that $i^*\sF_S\to\sF_Z$ is a motivic equivalence, as desired. \end{proof} \section{Modules over hermitian K-theory} We begin with a straightforward adaptation of Bachmann's cancellation theorem for finite flat correspondences \cite{BachmannFFlatCancellation} to Gorenstein and oriented Gorenstein correspondences. Let $k$ be a perfect field and $\sC$ be a motivic $\infty$-category of correspondences over $k$, in the sense of \cite[Definition 2.1]{BachmannFFlatCancellation} (our primary interest is the example $\sC = \Span^{\fgor,\o}(\Sm_k)$). We denote by $\h^\sC(X)\in \Pre_\Sigma(\sC)$ the presheaf represented by a smooth $k$-scheme $X$, by $\H^\sC(k)\subset \Pre_\Sigma(\sC)$ the full subcategory of $\A^1$-invariant Nisnevich sheaves, and by $\SH^\sC(k)$ the $\infty$-category of $\T$-spectra in $\H^\sC(k)_*$. Recall that: \begin{itemize} \item $\sC$ \emph{satisfies cancellation} if the functor $\h^\sC(\bG_m,1)\otimes(-)\colon \H^\sC(k)^\gp\to \H^\sC(k)^\gp$ is fully faithful; \item $\sC$ \emph{satisfies rational contractibility} if the presheaf $\h^\sC((\bG_m,1)^{\wedge n})^\gp$ on $\Sm_k$ is rationally contractible for all $n\geq 1$. \end{itemize} The following result is only new in the cases of Gorenstein and oriented Gorenstein correspondences, but the same proof works in all cases. \begin{prop}\label{prop: cancellation + rat contract} Let $k$ be a perfect field. Let $\sC$ be the $\infty$-category of smooth $k$-schemes and correspondences of one of the following types: \begin{enumerate} \item finite flat; \item finite Gorenstein; \item finite syntomic; \item oriented finite Gorenstein; \item oriented finite syntomic; \item framed finite syntomic. \end{enumerate} Then $\sC$ satisfies cancellation and rational contractibility. \end{prop} \begin{proof} The case of finite flat correspondences is \cite[Theorem 3.5 and Proposition 3.8]{BachmannFFlatCancellation}. Essentially the same argument applies to all the other cases. For cancellation, we use the criterion \cite[Proposition 2.16]{BachmannFFlatCancellation} with $G=\h^\sC(\bG_m)$. The object $\h^\sC(\bG_m,1)$ is symmetric in $\H^\sC(k)$, because $\H^\sC(k)$ is prestable \cite[Lemma 2.10]{BachmannFFlatCancellation} and $\Sigma(\bG_m,1)$ is already symmetric in $\H(k)_*$. We then need to construct, for each $Y\in\Sm_k$, a map \[ \rho\colon \Hom(\bG_m,L_\mot\h^\sC(\bG_m\times Y)^\gp) \to L_\mot\h^\sC(Y)^\gp. \] in $\H^\sC(k)^\gp$ satisfying some conditions. For $m,n\geq 0$, we define \begin{align*} g_m^+\colon \bG_m\times\bG_m\to\A^1,& \quad g_m^+(t_1,t_2)=t_1^m+1,\\ g_m^-\colon \bG_m\times\bG_m\to\A^1,& \quad g_m^+(t_1,t_2)=t_1^m+t_2,\\ h_{m,n}^\pm\colon \A^1\times\bG_m\times\bG_m\to\A^1,&\quad h_{m,n}^\pm(s,t_1,t_2) = sg_n^\pm(t_1,t_2)+(1-s)g_m^\pm(t_1,t_2). \end{align*} (Thus, $h_{m,n}^\pm$ is the straight-line homotopy from $g_m^\pm$ to $g_n^\pm$.) Given a span $\bG_m\times X\leftarrow Z\to \bG_m\times Y$ and $m,n\geq 0$, we let $Z_m^{\pm}\subset Z$ and $Z_{m,n}^\pm\subset \A^1\times Z$ be the \emph{derived} vanishing loci of the functions \begin{equation*} Z\to\bG_m\times \bG_m \xrightarrow{g_m^\pm} \A^1\quad\text{and}\quad \A^1\times Z\to \A^1\times\bG_m\times \bG_m \xrightarrow{h_{m,n}^\pm} \A^1. \end{equation*} The fibers of $Z_{m,n}^\pm$ over $0$ and $1$ in $\A^1$ are $Z_m^\pm$ and $Z_n^\pm$, respectively. By \cite[Corollary 3.4]{BachmannFFlatCancellation}, if $Z$ is finite flat over $\bG_m\times X$, then $Z_{m,n}^\pm$ is finite flat over $\A^1\times X$ for $m,n$ large enough. For $i\geq 0$, let \[ F_i^\sC(Y)\subset \Hom(\bG_m,\h^\sC(\bG_m\times Y)) \] be the subpresheaf consisting of spans $\bG_m\times X\leftarrow Z\to \bG_m\times Y$ such that $Z_{m,n}^+$ and $Z_{m,n}^-$ are finite flat over $\A^1\times X$ for all $n,m\geq i$; this is an exhaustive filtration of $\Hom(\bG_m,\h^\sC(\bG_m\times X))$ in $\Pre_\Sigma(\sC)$. Since $Z_{m,n}^\pm$ is cut out by a single equation in $\A^1\times Z$, the closed immersion $Z_{m,n}^\pm\hookrightarrow \A^1\times Z$ is quasi-smooth with trivialized conormal sheaf. On the other hand, the projection $\A^1\times\bG_m\times X\to \A^1\times X$ is smooth with trivialized cotangent sheaf. Hence, if $Z\to \bG_m\times X$ is framed quasi-smooth, oriented quasi-smooth, quasi-smooth, or has trivialized or invertible dualizing sheaf, then the same holds for $Z_{m,n}^\pm\to \A^1\times X$ (this is essentially the only new observation needed compared to the finite flat case). For $m,n\geq i$, we can therefore define \[ \rho_{m}^\pm\colon F_i^\sC(Y)\to \h^\sC(Y) \quad\text{and}\quad \rho_{m,n}^\pm\colon F_i^\sC(Y)\to \h^\sC(Y)^{\A^1} \] by sending a $\sC$-correspondence $\bG_m\times X\leftarrow Z\to\bG_m\times Y$ to the $\sC$-correspondences $X\leftarrow Z_{m}^\pm\to Y$ and $\A^1\times X\leftarrow Z_{m,n}^\pm\to Y$, respectively. Note that $\rho_{m,n}^\pm$ is an $\A^1$-homotopy between $\rho_m^\pm$ and $\rho_n^\pm$. The morphisms \[ \rho_i^\pm\colon F_i^\sC(Y)\to \h^\sC(Y) \] and the $\A^1$-homotopies $\rho_{i,i+1}^\pm$ induce in the colimit a pair of morphisms \[ \rho^\pm\colon \Hom(\bG_m,\h^\sC(\bG_m\times Y))\to \Lhtp \h^\sC(Y). \] We let \[ \rho =\rho^+-\rho^-\colon \Hom(\bG_m,\h^\sC(\bG_m\times Y))\to \Lhtp \h^\sC(Y)^\gp. \] By \cite[Proposition 2.8]{BachmannFFlatCancellation}, the canonical map \[ \Hom(\bG_m,\h^\sC(\bG_m\times Y))^\gp \to \Hom(\bG_m,L_\mot\h^\sC(\bG_m\times Y)^\gp) \] is a motivic equivalence, so we obtain an induced morphism \[ \rho\colon \Hom(\bG_m,L_\mot\h^\sC(\bG_m\times Y)^\gp)\to L_\mot \h^\sC(Y)^\gp. \] We now check that $\rho$ satisfies conditions (1)–(3) of \cite[Proposition 2.16]{BachmannFFlatCancellation}. Conditions (1) and (2) follow from the corresponding facts about $\rho_{m,n}^\pm$, namely, the commutativity of the triangle \[ \begin{tikzcd} \h^\sC(U)\otimes F_i(Y) \otimes \h^\sC(\A^1) \ar{dr}{\id\otimes\rho_{m,n}^\pm} \ar{d} & \\ F_i(U\times Y)\otimes\h^\sC(\A^1) \ar{r}[swap]{\rho_{m,n}^\pm} & \h^\sC(U\times Y) \end{tikzcd} \] and the naturality of $\rho_{m,n}^\pm$ in $Y\in\Sm_k$. As in the proof of \cite[Theorem 3.5]{BachmannFFlatCancellation}, condition (3) reduces to the existence of an $\A^1$-homotopy \[ \rho^+_2(\id_{\bG_m}) \simeq_{\A^1} \id + \rho^-_2(\id_{\bG_m}) \] between endomorphisms of $\Spec k$ in $\sC$. Here, $\rho_2^+(\id_{\bG_m})$ and $\rho_2^-(\id_{\bG_m})$ are the framed finite syntomic $k$-schemes $\Spec k[t]/(t^2+1)$ and $\Spec k[t]/(t^2+t)$, respectively. Let $H\subset \A^2=\Spec k[s,t]$ be the vanishing locus of $t^2+st+1-s$. Then $H$ is framed finite syntomic over $\A^1=\Spec k[s]$ and defines an $\A^1$-homotopy from $\rho_2^+(\id_{\bG_m})$ to $\id + \rho^-_2(\id_{\bG_m})$, as desired. For rational contractibility, the proof of \cite[Proposition 3.8]{BachmannFFlatCancellation} applies with no significant changes. Indeed, one can replace $\h^\fflat$ by $\h^\sC$ in the statement and proof of \cite[Proposition 3.7]{BachmannFFlatCancellation}: it suffices to note that the morphism $s\colon \h^\fflat(X)\to \hat C_1\h^\fflat(X)$ constructed in \emph{loc.\ cit.}\ extends in an obvious way to a morphism $s\colon \h^\sC(X)\to \hat C_1\h^\sC(X)$. \end{proof} We can now prove the universality of hermitian K-theory as a generalized motivic cohomology theory with oriented finite Gorenstein transfers, in the following strong sense. \begin{thm}\label{thm:kq-modules} Let $k$ be a field of exponential characteristic $e \ne 2$. Then there is an equivalence of symmetric monoidal $\infty$-categories \[\Mod_\kq \SH(k)[\tfrac{1}{e}] \simeq \SH^{\fgor,\o}(k)[\tfrac{1}{e}],\] which is compatible with the forgetful functors to $\SH(k)$. \end{thm} \begin{proof} The symmetric monoidal forgetful functor $\gamma\colon \Span^\fr(\Sm_k)\to\Span^{\fgor,\o}(\Sm_k)$ gives rise to an adjunction \[ \gamma^*: \SH(k)\simeq\SH^\fr(k) \rightleftarrows \SH^{\fgor,\o}(k) : \gamma_* \] where the left adjoint $\gamma^*$ is symmetric monoidal. We claim that the right adjoint $\gamma_*$ sends the unit to the $\Einfty$-algebra $\mathrm{kq}$. To prove this, since $\gamma_*$ commutes with pro-smooth base change, we can assume that $k$ is perfect. Then the cancellation and rational contractibility properties of the category of oriented Gorenstein correspondences obtained in Proposition~\ref{prop: cancellation + rat contract}, together with \cite[Corollary~2.20]{BachmannFFlatCancellation}, imply that \[ \gamma_* (\MonUnit) \simeq \Sigma^\infty_{\T, \fr} \FGor^\o_k. \] As we showed in Theorem~\ref{thm:KQ-kq-FGor}, $\Sigma^\infty_{\T, \fr} \FGor^\o_k \simeq \kq$. We therefore obtain an induced adjunction \[ \Mod_{\mathrm{kq}}(\SH(k))\rightleftarrows \SH^{\fgor,\o}(k), \] which we claim is an equivalence after inverting $e$. Since the right adjoint is conservative, it suffices to show that the left adjoint is fully faithful. By construction, the unit of the adjunction is an equivalence on the unit object $\mathrm{kq}$, hence on any dualizable object. But $\SH(k)[\tfrac 1e]$ is generated under colimits by dualizable objects \cite[Theorem 3.2.1]{shperf}, so the claim follows. \end{proof} \section{Summary of framed models for motivic spectra} \label{sec:framed-models} In this final section, we offer a summary of the known geometric models for the most common motivic spectra. For simplicity, we first state the results in the regular equicharacteristic case; for the state of the art see Remark~\ref{rem:general base}. \begin{thm}\label{thm:all mot spectra} Let $S$ be a regular scheme over a field. Then the forgetful maps of $\Einfty$-semirings \[\begin{tikzcd} & \FSyn \ar{r} & \FFlat \ar{r} & \Vect \ar{r} & \uZ \\ \FSyn^\fr \ar{r} & \FSyn^\o \ar{u} \ar{r} & \FGor^\o \ar{r} \ar{u}& \Vect^\sym \ar{u}\ar{r} & \uGW\ar{u} \end{tikzcd}\] induce, upon taking framed suspension spectra, canonical maps of motivic $\Einfty$-ring spectra over $S$ (assuming $2\in\sO(S)^\times$ for $\kq$): \[\begin{tikzcd} & \MGL \ar{r} & \kgl \ar["\simeq"]{r} & \kgl \ar{r} & \hz \\ \MonUnit \ar{r} & \MSL \ar{u} \ar{r} & \kq \ar["\simeq"]{r} \ar{u}& \kq \ar{u}\ar{r} & \hzmw \ar{u} \rlap . \end{tikzcd}\] \end{thm} \begin{proof} The functor $\Sigma^\infty_{\T,\fr}$ is symmetric monoidal, so it takes the unit $\FSyn^\fr$ in presheaves with framed transfers to the unit $\MonUnit$ in motivic spectra. The leftmost vertical arrow is a consequence of \cite[Theorems~3.4.1 and~3.4.3]{deloop3}. The top row is contained in \cite[Corollary~5.2, Theorem~5.4]{robbery} and \cite[Theorem~21]{framed-loc}, while the bottom row follows from Proposition~\ref{prop:KQ-kq-Vect^bil}, Theorem~\ref{thm:KQ-kq-FGor}, and Theorem~\ref{thm:HtildeZ}. \end{proof} \begin{rem}\label{rem:general base} The statements about $\MonUnit$, $\MSL$, $\MGL$, and $\hz$ in Theorem~\ref{thm:all mot spectra} are in fact proved over general base schemes in the given references. The statement about $\hzmw$ holds under the assumption of Theorem~\ref{thm:HtildeZ}, and the statements about $\kgl$ and $\kq$ were recently extended by Bachmann to the same generality \cite{BachmannKGL}. \end{rem} \begin{cor} On the level of infinite $\P^1$-loop spaces, the diagram of motivic spectra in Theorem~\ref{thm:all mot spectra} is the motivic localization of the following diagram of forgetful maps (up to the Nisnevich-local plus construction for the left half in characteristic zero): \[\begin{tikzcd} &\Z\times \Hilb_\infty^\lci(\A^\infty) \ar{r} & \Z\times \Hilb_\infty(\A^\infty) \ar{r} & \uZ \\ \Z\times \Hilb_\infty^\fr(\A^\infty) \ar{r} & \Z\times \Hilb_\infty^{\lci,\o}(\A^\infty) \ar{u} \ar{r} & \Z\times \Hilb_\infty^{\Gor,\o}(\A^\infty) \ar{r} \ar{u} & \uGW\ar{u}\rlap. \end{tikzcd}\] \end{cor} \begin{proof} This follows from Theorem~\ref{thm:all mot spectra} using \cite[Theorems 1.2 and~1.5]{deloop4}, \cite[Corollary~4.5]{robbery}, and Corollary~\ref{cor:Hilb-FGor}. \end{proof} Let us conclude with some comments on the ``canonical maps'' in Theorem~\ref{thm:all mot spectra}. First, we note that the $\Einfty$-maps to $\hzmw$ and $\hz$ in the diagram are all \emph{unique}. For $\hzmw$, this is because $\hzmw=\underline\pi^\eff_0(\1)$ and the unit maps of all the spectra in the lower row induce equivalences on $\underline\pi^\eff_0$ (cf.\ \cite[Corollary~3.6.7]{MuraMSL}). Similarly, we have $\hz=s_0(\1)$ \cite[Theorem 10.5.1]{Levine:2008} and the unit maps of all spectra except $\hzmw$ induce equivalences on $s_0$ (see \cite[Remark 10.2]{SpitzweckHZ}, \cite[Example 16.35]{norms}, and \cite[Theorem 3.2]{kq-slices}). The $\Einfty$-map $\hzmw\to \hz$ is also unique since $\hz$ is in the heart of the effective homotopy $t$-structure. The $\Einfty$-map $\MGL\to\kgl$ in Theorem~\ref{thm:all mot spectra} was shown in \cite[Proposition~6.2]{robbery} to induce the usual Thom classes in algebraic K-theory, i.e., it is an $\Einfty$ refinement of the usual orientation map obtained from the universal property of $\MGL$ as a homotopy commutative ring spectrum \cite[Theorem 2.7]{Panin:2008}. A similar argument will show that the $\Einfty$-map $\MSL\to\kq$ induces the usual Thom classes of oriented vector bundles in Grothendieck–Witt theory, once one promotes the forgetful map $\FQSm^{\o,4*}\to \Perf^\sym$ to a morphism of framed $\Einfty$-semirings (which requires some work but should present no essential difficulty). By \cite[Theorem 5.9]{PaninWalter}, it is known that there exists at least one unital morphism $\MSL\to\kq$ inducing the usual Thom classes in Grothendieck–Witt theory, but its uniqueness and multiplicativity properties are unclear. To the best of our knowledge, the existence of $\Einfty$-maps $\MGL\to \kgl$ and $\MSL\to\kq$ was not known before the main result of \cite{deloop3}, which describes $\MGL$ and $\MSL$ as framed suspension spectra. \let\mathbb=\mathbf {\small \newcommand{\etalchar}[1]{$^{#1}$} \providecommand{\bysame}{\leavevmode\hbox to3em{\hrulefill}\thinspace}
\section{Introduction} \begin{figure}[htp] \setlength{\abovecaptionskip}{0pt} \setlength{\belowcaptionskip}{0pt} \centering \includegraphics[width=\columnwidth]{teaser.pdf} \caption{Example results of ground truth, ours and VNL~\cite{yin2019enforcing}. By enforcing our proposed Adaptive Surface Normal (ASN) constraint, our reconstructed point cloud preserves both global structural information and local geometric features. The recovered surface normal is more accurate and less noisy than that of VNL.} \label{fig:teaser} \end{figure} Estimating depth from a single RGB image, one of the most fundamental computer vision tasks, has been extensively researched for decades. With the recent advances of deep learning, depth estimation using neural networks has drawn increasing attention. Earlier works \cite{eigen2014depth,liu2015learning,fu2018deep,roy2016monocular,ranftl2016dense} in this field directly minimize the pixel-wise depth errors, of which results cannot faithfully capture the 3D geometric features. Therefore, the latest efforts incorporate geometric constraints into the network and show promising results. Among various geometric attributes, surface normal is predominantly adopted due to the following two reasons. First, surface normal can be estimated by the 3D points converted from depth. Second, surface normal is determined by a surface tangent plane, which inherently encodes the local geometric context. Consequently, to extract normals from depth maps as geometric constraints, previous works propose various strategies, including random sampling~\cite{yin2019enforcing}, Sobel-like operator~\cite{hu2019revisiting, kusupati2020normal} and differentiable least square~\cite{qi2018geonet, long2020occlusion}. Despite the improvements brought about by the existing efforts, a critical issue remains unsolved, i.e., how to determine the reliable local geometry to correlate the normal constraint with the depth estimation. For example, at shape boundaries or corners, the neighboring pixels for a point could belong to different geometries, where the local plane assumption is not satisfied. Due to this challenge, these methods either struggle to capture the local features~\cite{yin2019enforcing}, or sensitive to local geometric variations (noises or boundaries)~\cite{hu2019revisiting, kusupati2020normal}, or computationally expensive~\cite{qi2018geonet, long2020occlusion}. Given the significance of local context constraints, there is a multitude of works on how to incorporate shape-ware regularization in monocular reconstruction tasks, ranging from sophisticated variational approaches for optical flow~\cite{revaud2015epicflow,xiao2006bilateral,ren2008local,bao2014fast} to edge-aware filtering in stereo~\cite{song2018edgestereo} and monocular reconstruction~\cite{jiao2014local,qi2020geonet++}. However, these methods have complex formulations and only focus on 2D feature edges derived from image intensity variation, without considering geometric structures of shapes in 3D space. In this paper, we introduce a simple yet effective method to correlate depth estimation with surface normal constraint. Our formulation is much simpler than any of the aforementioned approaches, but significantly improves the depth prediction quality, as shown in Fig.~\ref{fig:teaser}. Our key idea is to adaptively determine the faithful local geometry from a set of randomly sampled candidates to support the normal estimation. For a target point on the image, first, we randomly sample a set of point triplets in its neighborhood to define the candidates of normals. Then, we determine the confidence score of each normal candidate by measuring the consistency of the learned latent geometric features between the candidate and the target point. Finally, the normal is adaptively estimated as a weighted sum of all the candidates. Our simple strategy has some unique advantages: 1) the random sampling captures sufficient information from the neighborhood of the target point, which is not only highly efficient for computation, but also accommodates various geometric context; 2) the confidence scores adapatively determine the reliable candidates, making the normal estimation robust to local variations, e.g., noises, boundaries and sharp changes; 3) we measure the confidence using the learned contextual features, of which representational capacity is applicable to complex structures and informative to correlate the normal constraint with the estimated depth. More importantly, our method achieves superior results on the public datasets and considerably outperforms the state-of-the-art methods. Our main contributions are summarized as follows: \begin{itemize} \vspace{-2mm} \item We introduce a novel formulation to derive geometric constraint for depth estimation, i.e., adaptive surface normal. \vspace{-2mm} \item Our method is simple, fast and effective. It is robust to noises and local variations and able to consistently capture faithful geometry. \vspace{-2mm} \item Our method outperforms the state-of-the-art method on the public datasets by a large margin. \end{itemize} \section{Related Work} \paragraph{Monocular depth estimation} As an ill-posed problem, monocular depth estimation is challenging, given that minimal geometric information can be extracted from a single image. Recently, benefiting from the prior structural information learned by the neural network, many learning-based works~\cite{eigen2014depth,liu2015learning,xu2017multi,fu2018deep,roy2016monocular,ranftl2016dense,godard2019digging,godard2017unsupervised,liu2020fcfr,liu2021learning} have achieved promising results. Eigen~\etal~\cite{eigen2014depth} directly estimate depth maps by feeding images into a multi-scale neural network. Laina~\etal~\cite{laina2016deeper} propose a deeper residual network and further improve the accuracy of depth estimation. Liu~\etal~\cite{liu2015learning} utilize a continuous conditional random field (CRF) to smooth super-pixel depth estimation. Xu~\etal~\cite{xu2017multi} propose a sequential network based on multi-scale CRFs to estimate depth. Fu~\etal~\cite{fu2018deep} design a novel ordinal loss function to recover the ordinal information from a single image. Unfortunately, the estimated depth maps of these methods always fail to recover important 3D geometric features when converted to point clouds, since these methods do not consider any geometric constraints. \vspace{-3mm} \paragraph{Joint depth and normal estimation} Since the depth and surface normal are closely related in terms of 3D geometry, there has been growing interests in joint depth and normal estimation using neural networks to improve the performance. Several works \cite{eigen2015predicting,zhang2019pattern,xu2018pad,li2015depth} jointly estimate depth and surface normal using multiple branches and propagate the latent features of each other. Nevertheless, since there are no explicit geometric constraints enforced on the depth estimation, the predicted geometry of these methods is still barely satisfactory. Consequently, methods~\cite{xu2019depth,yang2018unsupervised,qiu2019deeplidar,hu2019revisiting,qi2018geonet,long2020occlusion,kusupati2020normal} are proposed to explicitly enforce geometric constraints on estimated depth maps.. Hu~\etal~\cite{hu2019revisiting} and Kusupati~etal~\cite{kusupati2020normal} utilize a Sobel-like operator to calculate surface normals from estimated depths, and then enforce them to be consistent with the ground truth. Nonetheless, the Sobel-like operator can be considered as a fixed filter kernel that indiscriminately acts on the whole image (see Fig.~\ref{fig:normal_diagram}), leading to unacceptable inaccuracy and sensitivity to noises. To constrain surface normal more reliably, Qi~\etal~\cite{qi2018geonet} and Long~\etal~\cite{long2020occlusion} propose to utilize a differentiable least square module for surface normal estimation. These methods optimize the geometric consistency, of which solution is more accurate and robust to noises but limited to expensive computation. Yin~\etal~\cite{yin2019enforcing} introduce virtual normal, which is a global geometric constraint derived from the randomly sampled point triplets from estimated depth. However, this constraint struggles to capture local geometric features, given that the point triplets are randomly sampled from the whole image. \paragraph{Edge preserving methods} Out of the statistical relations between shape boundaries and image intensity edges, many works leverage this statistic prior to benefit many vision tasks. Anisotropic diffusion~\cite{perona1990scale,black1998robust,weickert1998anisotropic} is a well-known technique for image denoising without removing important details of image content, typically edges. Works~\cite{revaud2015epicflow,xiao2006bilateral,ren2008local,bao2014fast} propose variational approaches with anisotropic diffusion to model local edge structures for optical flow estimation. Some stereo/monocular depth estimation works rely on pretrained edge detection network~\cite{song2018edgestereo} or Canny edge detector~\cite{jiao2014local,qi2020geonet++}, to extract image edges to improve depth estimation. However, only a small fraction of the intensity edges keep consistent with true geometric shape boundaries. Our method could detect the true shape boundaries where 3D geometry changes instead of image intensity edges. \section{Method} Given a single color image $I$ as input, we use an encoder-decoder neural network to output its depth map $D_{pred}$. Our approach aims to not only estimate accurate depth but also recover high-quality 3D geometry. For this purpose, we correlate surface normal constraint with depth estimating. Overall, we enforce two types of supervision for training the network. First, like most of depth estimation works, we employ a pixel-wise depth supervision like $L_1$ loss over the predicted depth $D_{pred}$ and ground truth depth $D_{gt}$. Moreover, we compute the surface normal $N_{pred}$ from $D_{pred}$ using an \textit{adaptive strategy}, and enforce consistency between $N_{pred}$ with the ground truth surface normal $N_{gt}$, named as Adaptive Surface Normal (ASN) constraint. The method is overviewed in Fig.~\ref{fig:pipeline}. \paragraph{Local plane assumption.} To correlate surface normal constraint with depth estimation, we adopt the local plane assumption following ~\cite{qi2018geonet,long2020occlusion}. That is, a small set of neighborhoods of a point forms a local plane, of which normal vector approximates the surface normal. Hence, for a pixel on the depth map, its surface normal can be estimated by the local patch formed by its neighboring points. In theory, the local patch could have arbitrary shapes and sizes. In practice, however, square local patches are widely adopted with sizes $(2m+1)\times(2m+1), m=1,2,...,n$, due to its simplicity and efficiency. \paragraph{Normal candidates sampling.} To compute the surface normal, unlike prior works utilize least square fitting ~\cite{qi2018geonet,long2020occlusion} or Sobel-like kernel approximation ~\cite{hu2019revisiting,kusupati2020normal}, we propose a randomly sampling based strategy. For a target point $P_i\in\mathbb{R}^3$, we first extract all the points $\mathbb{P}_i=\left\{P_{j} \mid P_j\in\mathbb{R}^3,\ j=0,\ldots, r^2-1\right\}$ within a local patch of size $r \times r$. Then, we randomly sample $K$ point triplets in $\mathbb{P}_i$. All sampled point triplets for the target point $P_i$ are denoted as $\mathbb{T}_i=\left\{\left(P_k^A, P_k^B, P_k^C\right) \mid P\in \mathbb{R}^3,\ k=0,\ldots ,K-1\right\}$. If the three points are not colinear, the normal vector of the sampled local plane can be directly computed by the cross-product: \begin{equation} \label{cross_normal} \vec{n}_{k}=\frac{\overrightarrow{P_k^A P_k^B} \times \overrightarrow{P_k^A P_k^C}}{\mid \overrightarrow{P_k^A P_k^B} \times \overrightarrow{P_k^A P_k^C} \mid}. \end{equation} A normal vector will be flipped according to the viewing direction if it does not match the camera orientation. In this way, for each target point, we obtain $K$ normal candidates corresponding to $K$ sampled local planes. Next, we adaptively determine the confidence of each candidate to derive the final normal estimation result. \begin{figure}[t] \setlength{\abovecaptionskip}{0pt} \setlength{\belowcaptionskip}{0pt} \centering \includegraphics[width=0.9\linewidth]{normal_diagram.pdf} \caption{Sobel-like operator versus ours for surface normal estimation. The Sobel-like operator first calculates two principle vectors along up-down and left-right directions, and then use their cross product to estimate the normal. Ours first computes the normal vectors of the randomly sampled triplets, and then adaptively combines them together to obtain the final estimation.} \label{fig:normal_diagram} \vspace{-2mm} \end{figure} \vspace{-4mm} \paragraph{Geometric context adaption.} We observe that the neighbors of a target point may not lie in the same tangent plane, especially at a region where the geometry changes, e.g., shape boundaries or sharp corners. Thus, we propose to learn a guidance feature map that is context aware to reflect the geometric variation. Therefore, the network can determine the confidence of the neighboring geometry by measuring the learned context features. Given the learned guidance feature map, we measure the $L_2$ distance of the features of a sampled point $P_{j}$ and the target point $P_{i}$, and then use a normalized Gaussian kernel function to encode their latent distance into $[0,1]$: \begin{equation} \label{kernel_function} \begin{aligned} \mathcal{L}\left(P_{i}, P_{j}\right) &= e^{-0.5\left\|f\left(P_{i}\right)-f\left(P_{j}\right)\right\|_{2}} \\ \overline{\mathcal{L}}\left(P_{i}, P_{j}\right) &= \frac{\mathcal{L}\left(P_{i}, P_{j}\right)}{\sum_{P_n \in \mathbb{P}_i} \mathcal{L}\left(P_{i}, P_{n}\right)}, \end{aligned} \end{equation} where $f(\cdot)$ is the guidance feature map, $\left\| \cdot \right\|_{2}$ is $L_2$ distance, and $\mathbb{P}_i$ is the neighboring point set in the local patch of $P_i$ as aforementioned. E.q.~\ref{kernel_function} gives a confidence score, where the higher the confidence is, the more likely the two is to locate in the same tangent plane with target pixel. Accordingly, the confidence score of a local plane $(P_k^A, P_k^B, P_k^C)$ to the center point $P_i$ given by the geometric adaption is defined by: \begin{equation} \label{geo_adaption} g_k = \prod_{t=A,B,C} \overline{\mathcal{L}}\left(P_{i}, P_{k}^t\right). \end{equation} This is the multiplication of three independent probabilistic scores of the three sampled points, which measures the reliability of a sampled local plane. \vspace{-4mm} \paragraph{Area adaption.} The area of a sampled local plane (triangle) is an important reference to determine the reliability of the candidate. A larger triangle captures more information and thus would be more robust to local noise, as shown in ~\cite{yin2019enforcing}. For a triangle $T_k$, we simply consider its projected area $s_k$ on the image as a measurement of confidence score. Note that the area is calculated on the 2D image, since the sampled triangles in the 3D space could be very large due to depth variation, leading to unreasonable overestimation. \noindent Finally, the normal for a point $P_i$ is determined by a weighted combination of all the $K$ sampled candidates, where the weights represent the confidence given by our adaptive strategy: \begin{equation} \label{full_adaption} \vec{n}_i=\frac{\sum_{k=0}^{K-1} s_{k} \cdot g_k \cdot \vec{n}_{k}}{\sum_{k=0}^{K-1} s_{k} \cdot g_k}, \end{equation} where $K$ is the number of sampled triplets, $s_k$ is the projected area of three sampled point $(P_k^{A}, P_k^{B}, P_k^C)$ on the 2D image, and $n_k$ is its normal vector. \section{Implementation} \paragraph{Network architecture} Our network adopts a multi-scale structure, which consists of one encoder and two decoders. We use HRNet-48~\cite{wang2020deep} as our backbone. Taking one image as input, one encoder produces coarse-to-fine estimated depths in four scales, and the other decoder is used to generate the guidance feature map that captures geometric context. The depth estimation decoder consists of four blocks in different scales, each of which is constituted by two ResNet~\cite{he2016deep} basic blocks with a feature reducing convolution layer. The appending convolution layers are used to produce one-channel output for depth estimation. The guidance feature encoder adopts a nearly identical structure with the depth encoder but without any feature reducing layers. \vspace{-3mm} \paragraph{Loss functions} Our training loss has two types of terms: depth loss term and surface normal loss term. For the depth term, we use the $L_1$ loss for our multi-scale estimation: \begin{equation} \label{depth_term} l_{d} = \sum_{s=0}^{3} \lambda^{s-3} \left\| D_{pred}^{s}-D_{gt}\right\|_{1}, \end{equation} where $D_{pred}^{s}$ means the estimated depth map at $s^{th}$ scale, $D_{gt}$ is the ground truth depth map, and $\lambda$ is a factor for balancing different scales. Here we set $\lambda = 0.8$. To enforce geometric constraint on the estimated depth map, using our proposed adaptive strategy, we compute the surface normals only based on the finest estimated depth map. To regularize the consistency of the computed surface normals with ground truth, we adopt a cosine embedding loss: \begin{equation} \label{normal_term} l_{n} = 1-cos(N_{pred}, N_{gt}), \end{equation} where $N_{pred}$ is the surface normal map calculated from the finest estimated depth map, and $N_{gt}$ is the ground truth surface normal. Therefore, the overall loss is defined as: \begin{equation} \label{full_loss} l = l_{d} + \alpha l_{n}, \end{equation} where $\alpha$ is set to 5 in all experiments, which is a trade-off parameter to make the two types of terms roughly of the same scale. \vspace{-3mm} \paragraph{Training details} Our model is implemented by Pytorch with Adam optimizer ($init\_lr= 0.0001$, $\beta_{1}=0.9$, $\beta_{2}=0.999$, $weight\_decay = 0.00001$). The learning rate is polynomially decayed with polynomial power 0.9. The model is trained with only depth loss term in the first 20 epochs, and then with depth and surface normal loss terms in the last 20 epochs. The whole training is completed with 8 batches on four GeForce RTX 2080 Ti GPUs. We adopt $5 \times 5$ local patch and 40 sampling triplets in all experiments. \begin{figure*}[t] \setlength{\abovecaptionskip}{1pt} \setlength{\belowcaptionskip}{1pt} \centering \includegraphics[width=\linewidth]{depth_compare_nyu.pdf} \caption{Qualitative comparisons with SOTAs on NYUD-V2. Compared with other methods, our estimated depth is more accurate and contain less noises. The recovered surface normal maps and point clouds demonstrate that our estimated depth faithfully preserve important geometric features. The black regions are the invalid regions lacking ground truth. } \label{fig:nyu_compare} \vspace{-3mm} \end{figure*} \section{Experiments} \subsection{Dataset} \paragraph{NYUD-V2} Our model is trained on NYUD-V2 dataset. NYUD-V2 is a widely used indoor dataset and contains 464 scenes, of which 249 scenes are for training and 215 for testing. We directly adopt the collected training data provided by Qi~\etal~\cite{qi2018geonet}, which has 30,816 frames sampled from the raw training scenes with precomputed ground truth surface normals. The precomputed surface normals are generated following the procedure of ~\cite{fouhey2013data}. Note that DORN~\cite{fu2018deep}, Eigen~\etal~\cite{eigen2015predicting}, Xu~\etal~\cite{xu2017multi}, Laina~\etal~\cite{laina2016deeper}, and Hu~\etal~\cite{hu2019revisiting} use 407k, 120k, 90k, 95k and 51k images for training, which are all significantly larger than ours. For testing, we utilize the official test set that is the same as the competitive methods, which contains 654 images. \vspace{-5mm} \paragraph{ScanNet} We also evaluate our method on a recently proposed indoor dataset, ScanNet~\cite{dai2017scannet}, which has more than 1600 scenes. Its official test split contains 100 scenes, and we uniformly select 2167 images from them for cross-dataset evaluation. \begin{table}[t] \setlength{\abovecaptionskip}{0pt} \setlength{\belowcaptionskip}{0pt} \begin{center} \caption{Depth evaluation on NYUD-V2 dataset. } \label{tab:nyu_depth_eval} \resizebox{\linewidth}{!}{% \begin{tabular}{l | c c c c c c c} \hline Method & \textbf{rel} ($\downarrow$) & \textbf{log10} ($\downarrow$) & \textbf{rms} ($\downarrow$) & $ \boldsymbol{\delta_{1}}$ ($\uparrow$) & $ \boldsymbol{\delta_{2}}$ ($\uparrow$) & $\boldsymbol{\delta_{3}}$ ($\uparrow$)\\ \hline Saxena~\etal~\cite{saxena2008make3d} & 0.349 & - & 1.214 & 0.447 & 0.745 & 0.897\\ Karsch~\etal~\cite{karsch2012depth} & 0.349 & 0.131 & 1.21 & - & - & - \\ Liu~\etal~\cite{liu2014discrete} & 0.335 & 0.127 & 1.06 & - & - & - \\ Ladicky~\etal~\cite{ladicky2014pulling} & - & - & - & 0.542 & 0.829 & 0.941 \\ Li~\etal~\cite{li2015depth} & 0.232 & 0.094 & 0.821 & 0.621 & 0.886 & 0.968 \\ Roy~\etal~\cite{roy2016monocular} & 0.187 & 0.078 & 0.744 & - & - & - \\ Liu~\etal~\cite{liu2015learning} & 0.213 & 0.087 & 0.759 & 0.650 & 0.906 & 0.974 \\ Wang~\etal~\cite{wang2015towards} & 0.220 & 0.094 & 0.745 & 0.605 & 0.890 & 0.970\\ Eigen~\etal~\cite{eigen2015predicting} & 0.158 & - & 0.641 & 0.769 & 0.950 & 0.988 \\ Chakrabarti~\etal~\cite{chakrabarti2016depth} & 0.149 & - & 0.620 & 0.806 & 0.958 & 0.987 \\ Li~\etal~\cite{li2017two} & 0.143 & 0.063 & 0.635 & 0.788 & 0.958 & 0.991 \\ Laina~\etal~\cite{laina2016deeper} & 0.127 & 0.055 & 0.573 & 0.811 & 0.953 & 0.988 \\ Hu~\etal~\cite{hu2019revisiting} & 0.115 & 0.050 & 0.530 & 0.866 & 0.975 & 0.993 \\ DORN~\cite{fu2018deep} & 0.115 & 0.051 & 0.509 & 0.828 & 0.965 & 0.992 \\ GeoNet~\cite{qi2018geonet} & 0.128 & 0.057 & 0.569 & 0.834 & 0.960 & 0.990 \\ VNL~\cite{yin2019enforcing} & 0.108 & 0.048 & 0.416 & 0.875 & 0.976 & 0.994 \\ BTS~\cite{lee2019big} & 0.113 & 0.049 & 0.407 & 0.871 & 0.977 & 0.995 \\ Ours & \textbf{0.101} & \textbf{0.044} & \textbf{0.377} & \textbf{0.890} & \textbf{0.982} & \textbf{0.996}\\ \hline \hline \end{tabular}% } \end{center} \vspace{-5mm} \end{table} \subsection{Evaluation metrics} To evaluate our method, we compare our method with state-of-the-arts in three aspects: accuracy of depth estimation, accuracy of recovered surface normal, and quality of recovered point cloud. \vspace{-5mm} \paragraph{Depth} Following the previous method~\cite{eigen2014depth}, we adopt the following metrics: mean absolute relative error (rel), mean log10 error (log10), root mean squared error (rms), and the accuracy under threshold ($\delta < {1.25}^{i} \text{ where } i\in\{1,2,3\}$). \vspace{-5mm} \paragraph{Surface normal} Like prior works~\cite{eigen2015predicting,qi2018geonet}, we evaluate surface normal with the following metrics: the mean of angle error (mean), the median of the angle error (median), and the accuracy below threshold $t \text{ where } t \in\left[11.25^{\circ}, 22.5^{\circ}, 30^{\circ}\right]$. \vspace{-5mm} \paragraph{Point cloud} For quantitatively evaluate the point clouds converted from estimated depth maps, we utilize the following metrics: mean Euclidean distance (dist), root mean squared Euclidean distance (rms), and the accuracy below threshold $t \text{ where } t \in\left[0.1m, 0.3m, 0.5m\right]$. \subsection{Evaluations} \paragraph{Depth estimation accuracy} We compare our method with other state-of-the-art methods on NYUD-V2 dataset. As shown in Table~\ref{tab:nyu_depth_eval}, our method significantly outperforms the other SOTA methods across all evaluation metrics. Moreover, to further evaluate the generalization of our method, we compare our method with some strong SOTAs on unseen ScanNet dataset. As shown in Table~\ref{tab:scannet_depth_eval}, our method still shows better performance than others. Besides the quantitative comparison, we show some qualitative results for several SOTA methods that also use geometric constraints, including i) GeoNet~\cite{qi2018geonet} (least square normal); ii)VNL~\cite{yin2019enforcing} (virtual normal constraint); iii) BTS~\cite{lee2019big} (predict local plane equations not directly predict depth). As shown in Fig.~\ref{fig:nyu_compare}, the proposed method faithfully recovers the original geometry. For the regions with high curvatures, such as the sofas, our results obtain cleaner and smoother surfaces; our predicted depth map also yields high-quality shape boundaries, which leads to better accuracy compared to the ground truth depth map. Also, note even for the texture-less walls and floors, our estimated depth is still satisfactory. \begin{table}[t] \begin{center} \caption{Depth evaluation on ScanNet dataset. } \label{tab:scannet_depth_eval} \resizebox{\linewidth}{!}{% \begin{tabular}{l | c c c c c c } \hline Method & \textbf{rel} ($\downarrow$) & \textbf{log10} ($\downarrow$) & \textbf{rms} ($\downarrow$) & $ \boldsymbol{\delta_{1}}$ ($\uparrow$) & $ \boldsymbol{\delta_{2}}$ ($\uparrow$) & $\boldsymbol{\delta_{3}}$ ($\uparrow$)\\ \hline GeoNet~\cite{qi2018geonet} & 0.255 & 0.106 & 0.519 & 0.561 & 0.855 & \textbf{0.958}\\ VNL~\cite{yin2019enforcing} & 0.238 & 0.105 & 0.505 & 0.565 & 0.856 & 0.957\\ BTS~\cite{lee2019big} & 0.246 & 0.104 & 0.506 & 0.583 & 0.858 & 0.951\\ Ours & \textbf{0.233} & \textbf{0.100} & \textbf{0.484} & \textbf{0.609} & \textbf{0.861} & 0.955 \\ \hline \hline \end{tabular}% } \end{center} \vspace{-5mm} \end{table} \begin{table}[t] \begin{center} \caption{Point cloud evaluation on NYUD-V2 dataset. } \label{tab:point_cloud_eval_nyud} \resizebox{\linewidth}{!}{% \begin{tabular}{l | c c c c c } \hline Method & \textbf{dist} ($\downarrow$) & \textbf{rms} ($\downarrow$) & $\boldsymbol{0.1m}$ ($\uparrow$) & $\boldsymbol{0.3m}$ ($\uparrow$) & $\boldsymbol{0.5m}$ ($\uparrow$) \\ \hline VNL~\cite{yin2019enforcing} & 0.515 & 0.686 & 0.181 & 0.469 & 0.644 \\ GeoNet~\cite{qi2018geonet} & 0.392 & 0.608 & 0.220 & 0.558 & 0.747 \\ BTS~\cite{lee2019big}& 0.317 & 0.544 & 0.278 & 0.653 & 0.822 \\ Hu~\etal~\cite{hu2019revisiting} & 0.311 & 0.537 & 0.288 & 0.666 & 0.831\\ Ours & \textbf{0.266} & \textbf{0.497} & \textbf{0.332} & \textbf{0.727} & \textbf{0.869}\\ \hline \hline \end{tabular}% } \end{center} \vspace{-5mm} \end{table} \vspace{-3mm} \paragraph{Point cloud} From the Table~\ref{tab:point_cloud_eval_nyud}, in terms of the quality of point cloud, our method outperforms other methods by a large margin. Surprisingly, although VNL~\cite{yin2019enforcing} has better performance than GeoNet~\cite{qi2018geonet} in terms of depth evaluation errors, its mean Eucleadian distance is worse than GeoNet, which demonstrates the necessity of evaluation specially designed for point clouds. As shown in Fig.~\ref{fig:nyu_compare} (the third row), our point cloud has fewer distortions and much more accurate than others. The point clouds generated from the depth maps of other methods suffer from severe distortions and struggle to preserve prominent geometric features, such as planes (e.g., walls) and surfaces with high curvatures (e.g., sofas). Besides, we also show a qualitative comparison between our point cloud and the ground truth from a different view in Fig.~\ref{fig:nyu_compare}. The highly consistent result further demonstrates our method's superior performance in terms of the quality of 3D geometry. \vspace{-3mm} \paragraph{Surface Normal} As shown in Table~\ref{tab:nyu_normal_eval}, our recovered surface normals have considerably better quality than that of the other methods. For reference, we also report the results generated by the methods that directly output normal maps in the network. Surprisingly, the accuracy of our recovered surface normals is even higher than this kind of methods that can explicitly predict normals. Also, we present qualitative comparisons in Fig.~\ref{fig:nyu_compare}. It can be seen that our surface normal is smoother and more accurate than the others, which indicates that our strategy is effective for correlating normal constraints with depth estimation, resulting in not only accurate depth estimation, but also reliable surface normals and 3D geometry. \begin{table}[t] \begin{center} \caption{Surface normal evaluation on NYUD-V2 dataset. } \label{tab:nyu_normal_eval} \resizebox{\linewidth}{!}{% \begin{tabular}{l | c c c c c} \hline Method & \textbf{Mean} ($\downarrow$) & \textbf{Median} ($\downarrow$) & $\boldsymbol{11.25^{\circ}}$ ($\uparrow$) & $\boldsymbol{22.5^{\circ}}$ ($\uparrow$) & $\boldsymbol{30^{\circ}}$ ($\uparrow$)\\ \hline \hline \multicolumn{6}{c}{Predicted Surface Normal from the Network} \\ \hline \hline 3DP~\cite{fouhey2013data} & 33.0 & 28.3 & 18.8 & 40.7 & 52.4 \\ Ladicky~\etal~\cite{ladicky2014pulling} & 35.5 & 25.5 & 24.0 & 45.6 & 55.9 \\ Fouhey~\etal~\cite{fouhey2014unfolding} & 35.2 & 17.9 & 40.5 & 54.1 & 58.9 \\ Wang~\etal~\cite{wang2015designing} & 28.8 & 17.9 & 35.2 & 57.1 & 65.5 \\ Eigen~\etal~\cite{eigen2015predicting} & 23.7 & 15.5 & 39.2 & 62.0 & 71.1 \\ \hline \hline \multicolumn{6}{c}{Calculated Surface Normal from the Point cloud} \\ \hline \hline BTS~\cite{lee2019big} & 44.0 & 35.4 & 14.4 & 32.5 & 43.2 \\ GeoNet~\cite{qi2018geonet} & 36.8 & 32.1 & 15.0 & 34.5 & 46.7 \\ DORN~\cite{fu2018deep} & 36.6 & 31.1 & 15.7 & 36.5 & 49.4 \\ Hu~\etal~\cite{hu2019revisiting} & 32.1 & 23.5 & 24.7 & 48.4 & 59.9 \\ VNL~\cite{yin2019enforcing} & 24.6 & 17.9 & 34.1 & 60.7 & 71.7 \\ Ours & \textbf{20.0} & \textbf{13.4} & \textbf{43.5} & \textbf{69.1} & \textbf{78.6} \\ \hline \hline \end{tabular}% } \end{center} \vspace{-5mm} \end{table} \subsection{Discussions} In this section, we further conduct a series of evaluations with an HRNet-18~\cite{wang2020deep} backbone to give more insights into the proposed method. \vspace{-3mm} \paragraph{Effectiveness of ASN} To validate the effectiveness of our proposed adaptive surface normal constraint, we train models with different constraints: a) only $L_1$ depth constraint; b) depth and Sobel-like operator surface normal constraints (SOSN); c) depth and least square surface normal constraints (LSSN); d) depth and virtual normal constraints (VN); e) depth and our adaptive surface normal constraints (ASN). As shown in Table~\ref{tab:diff_constraints}, the model with our adaptive surface normal constraint outperforms (ASN) all the others. Although the models with Sobel-like operator (SOSN) and least square normal constraint (LSSN) shows better recovered surface normal, their depth estimation accuracy drops off compared with the model without geometric constraint. The model with virtual normal (VN)~\cite{yin2019enforcing} constraint shows the worst quality of recovered surface normal among the four types of geometric constraints, given that virtual normal is derived from global sampling on the estimated depth map, which inevitably loses local geometric information. Furthermore, we give a set of qualitative comparisons in Fig.~\ref{fig:different_constraints}. The results clearly show our ASN constraint achieves better surface normal estimation results and captures detailed geometric features, even for the thin structures like the legs of chairs. \begin{figure}[t] \setlength{\abovecaptionskip}{1pt} \setlength{\belowcaptionskip}{1pt} \centering \includegraphics[width=\linewidth]{abalation_normal_2.pdf} \caption{Comparisons of models with different geometric constraints. Model with our ASN constraint achieves better surface normal estimation, even accurately capture detailed geometries, like the legs of chairs (see white boxes).} \label{fig:different_constraints} \end{figure} \begin{table}[t] \begin{center} \caption{Comparisons of models with different geometric constraints on NYUD-V2 dataset. } \label{tab:diff_constraints} \resizebox{\linewidth}{!}{% \begin{tabular}{l | c c c | c c c } \hline \multirow{2}{*}{Constraints} & \textbf{rel} ($\downarrow$) & \textbf{log10} ($\downarrow$) & $\boldsymbol{\delta_{1}}$ ($\uparrow$) & \textbf{Mean} ($\downarrow$) & \textbf{Median} ($\downarrow$) & $\boldsymbol{11.25^{\circ}}$ ($\uparrow$) \\ & \multicolumn{3}{c}{Depth} & \multicolumn{3}{|c}{Recovered normal} \\ \hline L1 & 0.113 & 0.047 & 0.875 & 31.3 & 23.2 & 24.9 \\ L1 + SOSN & 0.118 & 0.049 & 0.867 & 22.8 & 16.1 & 36.2 \\ L1 + LSSN & 0.119 & 0.050 & 0.862 & 23.5 & 16.3 & 35.7 \\ L1 + VN & 0.111 & 0.047 & 0.876 & 31.7 & 21.4 & 28.4 \\ L1 + ASN & \textbf{0.111} & \textbf{0.047} & \textbf{0.876} & \textbf{22.2} & \textbf{15.8} & \textbf{36.9} \\ \hline \hline \end{tabular}% } \end{center} \vspace{-4mm} \end{table} \vspace{-3mm} \paragraph{Ablation study of adaptive modules} To evaluate the effect of the proposed two adaptive modules, i.e., geometric context adaption and area adaption, we conduct an ablation study. We train models with different adaptive modules: only Geometric Context (GC) adaption, only Area adaption, and both. From Table~\ref{tab:abalation}, we can see the model with both adaptive modules achieves the best performance, which verifies the necessity of each adaptive module. \begin{table}[t] \begin{center} \caption{Ablation study of the proposed adaptive modules on NYUD-V2 dataset. We evaluate the accuracy of the recovered surface normals.} \label{tab:abalation} \resizebox{\linewidth}{!}{% \begin{tabular}{l | c c c c c } \hline Module & \textbf{Mean} ($\downarrow$) & \textbf{Median} ($\downarrow$) & $\boldsymbol{11.25^{\circ}}$ ($\uparrow$) & $\boldsymbol{22.5^{\circ}}$ ($\uparrow$) & $\boldsymbol{30^{\circ}}$ ($\uparrow$)\\ \hline only Area &22.6 & 16.0 & 36.4 & 63.6 & 74.4 \\ only GC & 22.3 & \textbf{15.8} & \textbf{36.9} & 64.1 & 74.8\\ Area+GC & \textbf{22.2} & \textbf{15.8} & \textbf{36.9} & \textbf{64.2} & \textbf{74.9} \\ \hline \hline \end{tabular}% } \end{center} \vspace{-4mm} \end{table} \paragraph{Visualization of guidance features} The geometric adaptive module is the key to our adaptive surface normal constraint method. To better understand what the network learns, we visualize the learned features of the guidance map. We plot one from the multiple channels of the guidance feature map, which is shown in Fig.~\ref{fig:guidance_feature_vis}. It can be seen that the learned guidance map captures the shape context and geometric variations, giving informative boundaries. For comparison, we use the Canny operator to detect the edges of the input image by image intensity variance. As we can see, our guidance feature map is not simply coincident with the Canny edges. For example, in Fig.~\ref{fig:guidance_feature_vis}, the Canny operator detects fragmented edges based on the texture of wall painting and sofas, while our guidance feature map indicates the true shape boundaries where the 3D geometry changes. \begin{figure}[t] \setlength{\abovecaptionskip}{1pt} \setlength{\belowcaptionskip}{1pt} \centering \includegraphics[width=\linewidth]{guidance_feature_vis.pdf} \caption{Our guidance feature maps versus edge maps detected by Canny operator. Although shape boundaries have high statistic correlations with image edges, they are not always coincident. Our feature map captures the true geometric boundaries, while the Canny operator detects edges with significant intensity variances.} \label{fig:guidance_feature_vis} \end{figure} \begin{figure}[t] \setlength{\abovecaptionskip}{1pt} \setlength{\belowcaptionskip}{1pt} \centering \includegraphics[width=\linewidth]{kernel_visualize.pdf} \caption{The visualization of similarity kernels. The similarity kernels of Point A, B, and E demonstrate that our method could successfully distinguish different geometries. The similarity kernels of Point C and D further show that our method captures the 3D geometry variances of the shapes in the 3D world, instead of the image color distinctions. } \label{fig:kernel_vis} \end{figure} \paragraph{Visualization of similarity kernels} To validate whether our model can capture the true geometric boundaries of shapes, we select five points on the image and visualize their color coded similarity kernels in Fig.~\ref{fig:kernel_vis}. The similarity kernels of Point A, B, and E indicate that our method could successfully distinguish different geometries, such as shape boundaries and corners. Furthermore, the similarity kernels of Point C and D show that our approach captures the 3D geometry variances of the shapes in the real world, instead of the color distinctions of the image. For example, Point D has large color variances in the image, but its similarity kernel has constant values indicating the unchanged geometry. \paragraph{Number of sampled triplets.} To quantitatively analyze the influence of the number of sampled triplets, we recover surface normals from our estimated depth maps using our adaptive surface normal computation method with $5 \times 5$ local patch. Based on Fig.~\ref{fig:num_of_triplets}, it is not surprised that more sampled triplets will contribute to more accurate surface normals. The accuracy increases dramatically from $10 \sim 20$ sampled triplets and gradually saturates with more triplets sampled. To balance efficiency and accuracy, the number of sampled triplets is recommended to be $40 \sim 60$. \begin{figure}[t] \setlength{\abovecaptionskip}{1pt} \setlength{\belowcaptionskip}{1pt} \centering \includegraphics[width=\linewidth]{ab_sampled_triplets.png} \caption{The accuracy of recovered surface normal versus the number of sampled triplets. The more triplets are sampled, the more accurate the recovered surface normal is.} \label{fig:num_of_triplets} \end{figure} \paragraph{Size of local patch.} We evaluate the effect of the size of local patch to our method by training the network with different local patch sizes. As illustrated in Table~\ref{tab:patch_size}, a larger local patch could improve the performance, especially for the surface normal, but the improvements are not significant. The reason behind is, our ASN constraint is an adaptive strategy that can automatically determine the reliability of the sampled points given different local patches; therefore, our method is robust to the choice of local patch size. \begin{table}[t] \begin{center} \caption{The influence of local patch size. } \label{tab:patch_size} \resizebox{0.95\linewidth}{!}{% \begin{tabular}{c | c c c | c c c} \hline \multirow{2}{*}{Size} & \textbf{rel} ($\downarrow$) & \textbf{log10} ($\downarrow$) & $\boldsymbol{\delta_{1}}$ ($\uparrow$) & \textbf{Mean} ($\downarrow$) & \textbf{Median} ($\downarrow$) & $\boldsymbol{11.25^{\circ}}$ ($\uparrow$) \\ & \multicolumn{3}{c}{Depth} & \multicolumn{3}{|c}{ Recovered Normal} \\ \hline 3 & 0.112 & 0.047 & \textbf{0.877} & 22.5 & 15.8 & 36.9\\ 5 & \textbf{0.111} & 0.047 & 0.876 & 22.4 & 15.8 & \textbf{37.1}\\ 7 & 0.112 & 0.047 & \textbf{0.877} & \textbf{22.2} & \textbf{15.7} & \textbf{37.1}\\ 9 & \textbf{0.111} & 0.047 & 0.875 & 22.4 & 15.8 & 37.0 \\ \hline \end{tabular}% } \end{center} \vspace{-4mm} \end{table} \paragraph{Area-based adaption} We use the area of a sampled triangle as the combinational weight for adaption. To evaluate the effectiveness of the area-based adaption, we conduct an experiment with a comparison to the simple average strategy. We create a unit semi-sphere surface as noise-free data and then add Gaussian noises to simulate real noisy data (see Fig.~\ref{fig:noise_exp} (a)). We compare the mean of angle errors of the normals estimated by these two methods with the increase of noises, and the results are given in Fig.~\ref{fig:noise_exp} (b). We can see that our area-based adaption gives lower estimation error with the increase of noise level, demonstrating the robustness of the use of area for adaption. \paragraph{Time complexity} Here, we discuss the time complexity of different normal computation methods, including our sampling based method, Sobel-like operator \cite{hu2019revisiting, kusupati2020normal} and least square based method \cite{qi2018geonet,long2020occlusion} . Ours and the Sobel-like operator only involve matrix addition and vector dot/cross production operations; thus it is easy to show the time complexity is $O\left(n \right)$, while our time complexity will increase linearly with more samples. However, the least square module \cite{qi2018geonet,long2020occlusion} directly calculates the closed form solution of least square equations, which involves matrix multiplication, inversion and determinant, leading to the time complexity of $O\left(n^{3} \right)$. Therefore, our method effectively balances the accuracy and computational efficiency. \begin{figure}[t] \setlength{\abovecaptionskip}{1pt} \setlength{\belowcaptionskip}{1pt} \centering \includegraphics[width=\linewidth]{noise_exp_2.pdf} \caption{Effectiveness of the area-based adaption. (a) The ideal and noisy surface. (b) We employ the mean angle error to evaluate surface normals estimated by the simple average strategy and our area-based adaption. Compared with the simple average strategy, our area-based adaption is more robust to noises.} \label{fig:noise_exp} \end{figure} \section{Conclusion} In this paper, we present a simple but effective Adaptive Surface Normal (ASN) constraint for monocular depth estimation. Compared with other surface normal constraints, our constraint could adaptively determine the reliable local geometry for normal calculation, by jointly leveraging the latent image features and explicit geometry properties. With the geometric constraint, our model not only estimates accurate depth maps but also faithfully preserves important 3D geometric features so that high-quality 3D point clouds and surface normal maps can be recovered from the estimated depth maps. \begin{acks} We thank the anonymous reviewers for their valuable feedback. Wenping Wang acknowledges support from AIR@InnoHK -- Center for Transformative Garment Production (TransGP). Christian Theobalt acknowledges support from ERC Consolidator Grant 4DReply (770784). Lingjie Liu acknowledges support from Lise Meitner Postdoctoral Fellowship. \end{acks} \section*{Acknowledgments}} \NewEnviron{acks}{% \section*{Acknowledgments} \BODY } \usepackage[pagebackref=true,breaklinks=true,letterpaper=true,colorlinks,bookmarks=false]{hyperref} \iccvfinalcopy \def\iccvPaperID{} \def\mbox{\tt\raisebox{-.5ex}{\symbol{126}}}{\mbox{\tt\raisebox{-.5ex}{\symbol{126}}}} \ificcvfinal\pagestyle{empty}\fi \begin{document} \title{Adaptive Surface Normal Constraint for Depth Estimation} \author{Xiaoxiao Long$^{1}$ \quad Cheng Lin$^{1}$ \quad Lingjie Liu$^{2}$ \quad Wei Li$^{3}$ \\ Christian Theobalt$^{2}$ \quad Ruigang Yang$^{3}$ \quad Wenping Wang$^{1,4}$ \\[0.3em] $^{1}$The University of Hong Kong \quad $^{2}$Max Planck Institute for Informatics \\ $^{3}$Inceptio \quad $^{4}$Texas A\&M University } \maketitle \ificcvfinal\thispagestyle{empty}\fi \input{0_abs} \input{1_intro} \input{2_related_works} \input{3_method} \input{4_implementation} \input{5_0_experiments} \input{5_1_discussions} \input{6_conclusion} {\small \bibliographystyle{ieee_fullname}
\section{Introduction} Twisted spectral triples have been introduced by Connes and Moscovici in \cite{connesmosco:twisted} to incorporate type III algebras in the paradigm of spectral triples. Instead of requiring that the commutator $[D,a]$ is bounded for any $a\in\A$, one asks for an algebra automorphism $\sigma$ that makes the \emph{twisted commutator} \begin{equation*} [D,a]_{\sigma}:=Da-\sigma(a)D \end{equation*} bounded for any $a\in \A$. Other properties of spectral triples have been later generalised to the twisted case, in particular the real structure \cite{Connes:1995kx}}. This leads to a twisted version of the first order condition \cite{landimart:twisting}, \cite{landimart:twistgauge} \begin{equation*} [[D,a]_\sigma,b^{\circ}]_{\sigma^\circ}=0 \quad \forall a\A, b^\circ\in \A^\circ \end{equation*} where $\sigma^\circ$ is the automorphism induced by $\sigma$ on the opposite algebra $\A^\circ$ (for a twisted version of the the regularity condition, see \cite{Matassa:20119aa}). In \cite{chamconnessuijlekom:innerfluc}, the authors have shown how the removal of the first order condition for a usual - i.e. non twisted - spectral triple yields a non-linear term in the inner fluctuation of the Dirac operator. This term turns out to be important for the application of noncommutative geometry to high-energy physics, since it paves the way to models ``Beyond the Standard Model'' of fundamental interactions \cite{chamconnessuijlekom:beyond}. In this paper, we show that a similar phenomenon occurs for twisted spectral triples. The twisted inner fluctuations of \cite{landimart:twistgauge} generalise in case the twisted first-order condition \eqref{eq:twisted_commutator} does not hold, yielding a non-linear term. Twisted gauge transformations as well still make sense, and are well encoded by a semi-group structure, similar as the one worked out in \cite{chamconnessuijlekom:innerfluc} in the non-twisted case. \medskip The paper is organised as follows. In \S\ref{sec:twist-spectr-tripl} we recall some basics on real twisted spectral triples (\S \ref{sec:real-twist-spectr}), including generalised $1$-forms and connections (\S \ref{sec:one-forms-conn}). We discuss in particular in \S \ref{subsec:lift} the conditions under which the twisting automorphism $\sigma$ lifts to $\A$-modules, showing that the assumption made in \cite{landimart:twisting} is no the only possibility. The definition of hermitian connections in the twisted context is discussed in \S \ref{sec:twist-herm-conn}. Fluctuations without the first order conditions are generalised to the twisted case in section \ref{sec:twist-fluct-with-2}. First, we work out in details how to export a twisted spectral triple between Morita equivalent algebras using a right module (\S\ref{sec:morita-equivalence}), then taking into account the real structure and assuming the condition of order $1$ (\S \ref{sec:twist-fluct-real}). All this is done following what has been done in \cite{chamconnessuijlekom:innerfluc} for the non-twisted case, and provides an extension of the results of \cite{landimart:twistgauge} beyond self-Morita equivalence. The twisted first-order condition is removed in \S\ref{sec:twist-fluct-with}. One obtains a non-linear component in the twisted fluctuation in proposition \ref{sec:twist-fluct-with-1}. Section \ref{sec:gauge-transformation} deals with gauge transformation. It begins with a brief recalling of gauge transformations for twisted spectral triples in \S\ref{sec:twist-gauge-transf}, that are extended to the non-linear term in \S \ref{sec:non-linear-gauge}. The equivalence between gauge transformations and the twisted conjugate action of unitaries on the Dirac operator is shown in Prop.\ref{prop:TwistedGaugeTransformedNoFirstOrder}. The loss of selfadjointness of the Dirac operator under gauge transformation is discussed in \S \ref{sec:self-adjointness}: one finds the same limitations as when the condition of order $1$ holds. In section \ref{sec:self-adjointness-1} we work out the structure of semi-group associated to twisted inner fluctuations. The normalisation condition defining the semi-group is discussed in \S \ref{sec:twist-norm-cond}, and the semi-group is explicitly built in \S \ref{sec:from-semi-group}. All is summarised in Prop.\ref{prop:final}, which also shows how to describe gauge transformations by actions of unitary elements of the semi-group. Finally, in \S\ref{sec:twisted-u1times-u2} we adapt to the twisted case the concluding $U(1)\times U(2)$ example of \cite{chamconnessuijlekom:innerfluc}, showing that we obtain a similar field contains. The appendices contain technical results on fluctuations implemented by a left module. In all the paper, we assume that the algebras are unital. \newpage \section{Twisted Spectral Triples} \label{sec:twist-spectr-tripl} We begin with a brief summary of the results of \cite{landimart:twisting,landimart:twistgauge} on real twisted spectral triples (\S \ref{sec:real-twist-spectr}) and twisted $1$-forms (\S \ref{sec:one-forms-conn}). We discuss the lift of the twisting automorphism to modules in \S \ref{subsec:lift}, and hermitian connections in the twisted context in \S \ref{sec:twist-herm-conn}. \subsection{Real twisted spectral triples} \label{sec:real-twist-spectr} For simplicity we work with complex algebras, but the definitions below make sense for real algebras as well (this is important for applications to physics, since the algebra describing the Standard Model of fundamental interactions is a real one). \begin{defn}\cite{connesmosco:twisted} \label{defn:twisted_spectral_triples} A twisted spectral triple $(\A,\mathcal{H},D),\sigma$ consists~in a unital, involutive, complex algebra $\A$ acting faithfully on a separable Hilbert space $\mathcal{H}$ via an involutive representation $\pi$, together with a self-adjoint densely defined operator with compact resolvent $D$ (called Dirac operator) and an automorphism $\sigma\in\mathrm{Aut}(\A)$ satisfying \begin{equation} \label{eq:RegularityAutomorph} \sigma(a^{*})=\sigma^{-1}(a)^{*}\quad \forall a\in\A, \end{equation} and such that for any $a\in\A$ the twisted commutator \begin{eqnarray} \label{eq:twisted_commutator} \left[D,\pi(a)\right]_{\sigma}:=D\pi(a)-\pi(\sigma(a))D\quad\text{ is bounded}. \end{eqnarray} \end{defn} The automorphism $\sigma$ is not asked to be involutive, but rather to satisfy the regularity property (\ref{eq:RegularityAutomorph}) following from considerations on local index theory~\cite{connesmosco:twisted}. As in the non-twisted case, the spectral triple is graded when there is a selfadjoint operator $\Gamma$ on $\cal H$ that squares to the identity, anticommutes with $D$ and commutes with $\A$. The real structure \cite{Connes:1995kx} as well makes sense without change: this is an antilinear isometry $J$ on $\mathcal{H}$ such~that: \begin{equation} \label{real_structure} J^{2}=\varepsilon\mathbb{I} \quad JD=\varepsilon'DJ\quad J\Gamma=\varepsilon''\Gamma J \end{equation} where $\varepsilon,\varepsilon',\varepsilon''\in\{\pm 1\}$ defines the $KO$-dimension of the triple. It implements a representation \begin{equation} \label{eq:opposite_rep} \pi^{\circ}(a^{\circ}):=J\pi(a)^{*}J^{-1} \end{equation} of the opposite algebra $\A^{\circ}$, where the map $\circ\!:\!\A\!\rightarrow\!\A^{\circ}$ identifies any $a\in \A$ as an element $a^\circ$~of~$\A^\circ$. To $\sigma$ is associated the automorphism of $\A^\circ$ \begin{equation} \sigma^{\circ}(a^{\circ}):=(\sigma^{-1}(a))^{\circ},\label{eq:143} \;\text{ with inverse } \; {\sigma^\circ}^{-1}(a^\circ)=\sigma(a)^\circ. \end{equation} This automorphism satisfies a regularity condition similar as \eqref{eq:RegularityAutomorph} \begin{equation} \label{eq:84} \sigma^\circ((a^\circ)^*)= \sigma^\circ((a^*)^\circ) =(\sigma^{-1}(a^*))^\circ=(\sigma(a)^*)^\circ=(\sigma(a)^\circ)^*=\left({\sigma^\circ}^{-1}(a^\circ)\right)^*, \end{equation} where we used the commutation of $\circ$ with the involution: $J=J^*$ hence $(a^\circ)^*=(a^*)^\circ$. Moreover, by~\eqref{eq:opposite_rep} and (\ref{eq:RegularityAutomorph}) one has \begin{equation} \label{eq:36} \pi^{\circ}(\sigma^{\circ}(a^{\circ}))=J\pi(\sigma(a^{*}))J^{-1}, \end{equation} which guarantees the boundedness, for any $a^\circ\in \A^\circ$, of the twisted commutator \begin{equation} \label{eq:twistzero} \left[D,\pi^{\circ}(a^{\circ})\right]_{\sigma^{\circ}}:=D\pi^{\circ}(a^{\circ})-\pi^{\circ}(\sigma^{\circ}(a^{\circ}))D=\varepsilon'J\left[D,\pi(a^{*})\right]_{\sigma}J^{-1}. \end{equation} To define an (ordinary) real spectral triple, $J$ is asked to satisfy two conditions of order zero and one. The former passes to the twist without modification, the latter is modified as follows. \begin{defn}\cite{landimart:twisting} \label{defn:RealTwistedSpectralTriples} A twisted spectral triple $(\A,\mathcal{H},D),\sigma$ is real when it comes with a real structure $J$ which satisfies the conditions of \begin{align} \label{eq:zero-order} &\text{order-zero:}&&\left[\pi(a),\pi^{\circ}(b^{\circ})\right]=0,\\[0pt] \label{eq:TwistedFirstOrder} &\text{order-one:} &&[[D,\pi(a)]_{\sigma},\pi^{\circ}(b^{\circ})]_{\sigma^{\circ}}=0\qquad \forall a\in \A, \, b^\circ\in \A^\circ. \end{align} \end{defn} The order zero condition guarantees that the right action of $\A$ on $\HH$ defined by \begin{equation} \label{eq:19} \psi\, \pi(a):= \pi^\circ(a^\circ)\psi = J\pi(a^*)J^{-1}\psi \qquad \forall a\in \A,\, \psi\in\HH, \end{equation} commutes with the left action induced by the representation $\pi$. Let $\hat{\pi}(a)\!:=\!J\pi(a)J^{-1}= \pi^{\circ}((a^{*})^{\circ})$ denote the conjugation by the real structure. Dropping the representation $\pi$, this equation, eq.\eqref{eq:19}, the zero and first order conditions are equivalent~to \begin{equation} \label{eq:34} \psi a = a^\circ\psi,\quad \hat{a}=(a^{*})^{\circ}=(a^\circ)^*, \quad [a,\hat{b}]=0, \quad [[D,a]_\sigma,\hat{b}]_{\sigma^\circ}=0 \qquad\forall a,b\in \A,\; \psi\in\HH. \end{equation} \subsection{Twisted one-forms and connections} \label{sec:one-forms-conn} The twisted commutators \eqref{eq:twisted_commutator} and \eqref{eq:twistzero} are derivations on the algebra $\A$, \begin{equation} \delta(\cdot):=[D,\cdot]_{\sigma},\qquad \delta^{\circ}:=[D,(\cdot)^{\circ}]_{\sigma^{\circ}} \label{eq:1} \end{equation} which take value in the $\A$-bimodule of \textit{twisted one-forms} \cite{connesmosco:twisted} and its opposite \begin{align*} \Omega:=\Omega_{D}^{1}(\A,\sigma)=\bigg\{\sum_{j}a_{j}[D,b_{j}]_{\sigma},\;a_{j},b_{j}\in \A\bigg\},\quad \Omega^\circ:=\Omega_{D}^{1}(\A^{\circ},\sigma^{\circ})=\bigg\{\sum_{j}a^{\circ}_{j}[D,b^{\circ}_{j}]_{\sigma^{\circ}},\;a^{\circ}_{j},b^{\circ}_{j}\in \A^{\circ}\bigg\}, \end{align*} where the bimodule structure is, for any $\omega\in\Omega$, $\omega^{\circ}\in\Omega^{\circ}$ and $a,b\in \A$, \begin{align} \label{eq:BimoduleOneForms} a\cdot\omega\cdot b:=\sigma(a)\,\omega\,b \qquad a\cdot\omega^{\circ}\cdot b:=\sigma^{\circ}(b^{\circ})\,\omega^{\circ}\,a^{\circ}. \end{align} \begin{remark} \label{sec:twisted-one-forms-1} One twists the left action of $\A$ in order to have the Leibniz rules \begin{align} \label{eq:TwistedLeibniz} & \delta(ab)=\delta(a)b+\sigma(a)\delta(b) =\delta(a)\cdot b+a\cdot\delta(b),\\ \label{eq:TwistedLeibniz2} &\delta^{\circ}(ab) =\sigma^{\circ}(b^{\circ})\delta^{\circ}(a)+\delta^{\circ}(b)a^{\circ} = \delta^{\circ}(a)\cdot b+a\cdot\delta^{\circ}(b) \qquad \forall a,b\in \A. \end{align} Unlike usual commutators, these derivations are not anti-hermitian but rather satisfy \begin{align} \label{eq:82bis} \delta(a^*)= Da^*-\sigma(a^*)D = -(D\sigma^{-1}(a) - aD)^* = -[D, \sigma^{-1}(a)]_\sigma^*=-\left(\delta(\sigma^{-1}(a))\right)^*, \\[4pt] \delta^\circ(a^*)= Da^{*\circ}-\sigma^\circ(a^{*\circ})D = \left(a^\circ D - D\sigma^\circ(a^{*\circ}) ^*\right)^* = -[D, \sigma(a)^\circ]_{\sigma^\circ}^*=-\left(\delta^\circ(\sigma(a)\right)^*,\label{eq:147} \end{align} where in \eqref{eq:82bis} we use the regularity \eqref{eq:RegularityAutomorph} and in \eqref{eq:147} the commutativity $\circ,*$, then $\sigma^\circ(a^{*\circ}) =\left(\sigma(a)^\circ\right)^*$ extracted from~\eqref{eq:84}. These rules, as well as the bimodule laws, do not require the zero nor the first order conditions but rely only on the properties of the twisted commutators: $[D,ab]_\sigma= [D,a]_\sigma \, b + \sigma(a) \,[D,b]$ and $[D,(ab)^\circ]_{\sigma^\circ}= \sigma^\circ(b^\circ) \, [D,a^\circ]_{\sigma^\circ} + \,[D,b^\circ]_{\sigma^\circ}\,a^\circ.$ \end{remark} The derivations $\delta$, $\delta^\circ$ serve to define connections required to export spectral triples between Morita equivalent algebras. Recall that a $\Omega$-valued, resp. $\Omega^{\circ}$-valued, connection on a right $\A$-module $\mathcal{E}$, resp. a left $\A$-module~$\mathcal{F}$, are $\mathbb{C}$-linear maps \begin{align} \label{eq:TwistedConnection} \nabla:\mathcal{E}\longrightarrow\mathcal{E}\otimes_{\A}\Omega,\qquad \nabla^{\circ}:\mathcal{F}\longrightarrow\Omega^{\circ}\otimes_{\A}\mathcal{F} \end{align} which fulfil the Leibniz rules, for any $\xi\in\mathcal{E}, \zeta\in\mathcal{F}$ and $a\in\A$, \begin{align} \label{eq:TwistedLeibnizConn} \nabla(\xi a)=(\nabla\xi)a+\xi\otimes\delta(a), \quad \nabla^\circ(a\zeta)=a(\nabla^{\circ}\zeta)+\delta^{\circ}(a)\otimes\zeta, \end{align} where one defines \begin{align} (\nabla\xi)a= \xi_{(0)}\otimes (\xi_{(1)}\cdot a),\quad \label{eq:4} a(\nabla^\circ \zeta):=(a.\zeta_{(-1)})\otimes \zeta_{(0)} \end{align} using the Snyder notations \begin{align} \nabla \xi =\xi_{(0)}\otimes\xi_{(1)}, \quad \nabla^\circ\zeta=\zeta_{(-1)}\otimes\zeta_{(0)} \label{eq:7} \end{align} with \begin{equation} \xi_{(0)}\in{\mathcal E},\;\xi_{(1)}\in\Omega\quad\text{ and }\quad \zeta_{(0)}\in{\cal F},\; \zeta_{(-1)}\in\Omega^\circ.\label{eq:141} \end{equation} \subsection{Lift of automorphism} \label{subsec:lift} Inner fluctuations consist in exporting a noncommutative geometry from an algebra $\A$ to a Morita equivalent algebra $\B$. In case of twisted geometries, this requires as a preamble to lift the twisting automorphism $\sigma$ first to the module $\cal E$ implementing Morita equivalence, then to~$\B$. To this aim, recall that two algebras $\A, \B$ are (strongly) Morita equivalent when there exists a full Hilbert $\B$-$\A$-module $\cal E$ (that is $\B$-left, $\A$-right), such that the algebra $\mathrm{End}_{\A}(\mathcal{E})$ of $\A$-linear, adjointable, endormophisms of $\cal E$ is isomorphic to $\B$. If both $\A$ and $\B$ are unital then $\cal E$ is finitely projective as right $\A$-module, i.e. there is an idempotent $e=e^{2}=e^{*}\in M_n(\A)$ for some $n\in\mathbb{N}$ such that \begin{equation} \mathcal{E} \simeq e\A^n. \label{eq:124} \end{equation} Any element of $\cal E$, viewed as a vector $\xi=e\xi \in \A^n$, has components $\xi_i=e_i^j\xi_j \in \A$ ($i=1, ...,n$) with $e_i^j\in\A$ the $i^\text{th}$-line, $j^\text{th}$-column component of the idempotent $e$ and we use Einstein summation on indices in alternate up/down position. Identifying a vector with its components, we write \begin{equation} \xi=(\xi_i)=(e_i^j\xi_j).\label{eq:174} \end{equation} The module $\cal E$ is hermitian for the $\A$-valued inner product \begin{equation} \label{eq:12} (\xi', \xi) :=\sum_i {\xi_i'}^* \xi_i. \end{equation} An automorphism $\sigma$ of $\A$ lifts to $\cal E$ by defining a $\A$-module morphism $\Sigma:\mathcal{E}\rightarrow\mathcal{E}$ such that \begin{eqnarray} \label{eq:LiftingMorph} \Sigma(\xi a):=\Sigma(\xi)\sigma(a) \quad \forall\xi\in\mathcal{E}, a\in \A. \end{eqnarray} Explicitly, \begin{equation} \label{eq:62} \Sigma \left(\begin{array}{c} \xi_1\\\vdots\\\xi_n \end{array}\right) := e\left( \begin{array}{c} \sigma(\xi_1)\\\vdots\\\sigma(\xi_n) \end{array}\right)=e\sigma(\xi) \qquad \forall \xi=e\xi= \begin{pmatrix} \xi_1\\ \vdots\\ \xi_n \end{pmatrix} \end{equation} where $\sigma(\xi)$ is a shorthand notation for the vector in $\A^n$ with components $\sigma(\xi_i)$. To lift $\sigma$ to $\cal B$, recall the later is the subalgebra of the $n$-square matrices with entries in $\A$, invariant under the conjugate action of $e$, namely \begin{equation} \B\simeq\mathrm{End}_\A(\mathcal{E})\simeq eM_n(\A)e=\left\{b\in M_n(\A) \text{ such that } ebe = b\right\}.\label{eq:65} \end{equation} It is equipped with an involution: the matrix transpose composed with the $\A$-involution of every entry. The algebra $\cal B$ acts on $\cal E$ by left multiplication: with $b_i^j\in\A$ the components of $b$, one~has \begin{equation} \label{eq:163} b\xi =e \begin{pmatrix} b_1^j\xi_j\\\vdots\\ b_n^j\xi_j \end{pmatrix} \qquad\forall b\in{\cal B},\, \xi\in{\cal E}. \end{equation} The automorphism $\sigma$ extends to $M_n(\A)$ acting on each entry: for $m\in M_n(\A)$ with entries $m_i^j\in \A$, we define $\sigma(m)$ as the matrix with entries $\sigma(m_i^j)$. However this does not define an automorphism of $\B$, for $b=ebe$ does no guarantee that $\sigma(b)$ equals $e\sigma(b)e$. To lift $\sigma$ to an automorphism of $\B$, one should first ensures that its lift $\Sigma$ to $\A$ commutes with the inverse. By this, one intends that the lift to $\A$ of~$\sigma^{-1}$, \begin{equation} \label{eq:63} \Sigma^{-1}\xi := e\sigma^{-1}(\xi) \end{equation} coincides with the inverse of the lift $\Sigma$ \eqref{eq:62}. \begin{lem} \label{lem:lift-autom-its} $\Sigma^{-1}$ in \eqref{eq:63} is the inverse of $\Sigma$ in \eqref{eq:62} if, and only if, \begin{equation} \label{eq:70} e \sigma(e) e = e \quad\text{ and } \quad e \sigma^{-1}(e) e = e. \end{equation} Assuming the regularity condition \ref{eq:RegularityAutomorph}, this is equivalent with \begin{equation} \label{eq:74} e\sigma(e) e = e = e\sigma(e)^*e. \end{equation}\end{lem} \begin{proof} One has \begin{equation*} \Sigma\left(\Sigma^{-1}\xi\right) = \Sigma\left( e\sigma^{-1}(\xi) \right)=e\left( \sigma(e)\xi \right)=e\sigma(e) \xi. \label{eq:71} \end{equation*} Hence $\Sigma\Sigma^{-1}$ is the identity if, and only if, $ \xi = e\sigma(e)\xi$ for any $\xi=e\xi$. The set of such $\xi$ is the image of $\A^m$ under the projection $e$, so the above condition is equivalent to \begin{equation} \label{eq:72} e\sigma(e) e\varphi= e\varphi \quad \forall \varphi\in \A^m, \end{equation} that is $e=e\sigma(e)e$. Similarly $\Sigma^{-1}\Sigma$ is the identity iff $e=e\sigma^{-1}(e)e$. \end{proof} \begin{remark} Conditions \eqref{eq:70} are true if $e=\sigma(e)$ is invariant under the twist, as assumed in \cite{landimart:twistgauge}. However, this may not be the only~solution. \end{remark} Assuming that the lift $\Sigma$ to $\A$ of the twisting automorphism $\sigma$ is invertible in the sense of lemma \ref{lem:lift-autom-its}, then one is now able to define its lift $\sigma'$ to $\B$ as \begin{equation} \label{eq:17} \sigma'(b):=e\sigma(b)e \quad \forall b=ebe\in \B. \end{equation} \begin{prop} \label{sec:lift-autom-its} $\sigma'$ is an automorphism of $\B$, with inverse ${\sigma'}^{-1}(b)=e\sigma^{-1}(b)e$. If $\sigma$ is regular in the sense of \ref{eq:RegularityAutomorph}, then $\sigma'$ is regular as well: \begin{equation} \label{eq:142} \sigma'(b^*)={\sigma'}^{-1}(b)^{*} \quad \forall b\in {\cal B}. \end{equation} \end{prop} \begin{proof} For $a,b\in \B$ one has one has $eb=b$ and $ae=a$ thus \begin{align} \sigma'(a)\sigma'(b) = e\sigma(a) e\sigma(b)e&=e\,\sigma(a)\sigma(e)\, e\,\sigma(e)\sigma(b)\,e,\\ \nonumber &=e\,\sigma(a)\sigma(e)\, \sigma(e)\sigma(b)\,e =e\sigma(a)\sigma(b)e=e\sigma(ab)e=\sigma'(ab), \label{eq:75} \end{align} where, to get the second line, we used $\sigma(e)e\sigma(e)=\sigma(e)^2$ obtained applying $\sigma$ on \eqref{eq:70}, then using $\sigma(e)=\sigma(e^2)~=~\sigma(e)^2$. This shows that $\sigma'$ is an automorphism of $\cal B$. That ${\sigma'}^{-1}$ is its inverse comes from \begin{equation} \label{eq:118} \sigma'({\sigma'}^{-1} (b))= e\sigma(e\sigma^{-1}(b)e)e= e \sigma(e) b \sigma(e) e = e \sigma(e)e\, b\, e \sigma(e) e =ebe =b \end{equation} and a similar result for ${\sigma'}^{-1}(\sigma'(b))$. For $\sigma$ regular, the matrix $\sigma(b^*)$ has components $\sigma(b^*)_{ij}=\sigma(b_{ji}^*)= (\sigma^{-1}(b_{ji}))^*$, which is the component $ij$ of $(\sigma^{-1}(b))^*$. Hence \begin{equation*} \label{eq:116} \sigma'(b^*)= e\sigma(b^*)e= e (\sigma^{-1}(b))^*e=(e \sigma^{-1}(b)e)^*=\left({\sigma'}^{-1}(b)\right)^*. \end{equation*} \vspace{-.8truecm}\end{proof} \subsection{Twisted hermitian connection} \label{sec:twist-herm-conn} The connections $\nabla$ relevant for inner fluctuations are the \emph{hermitian} ones, that is those compatible with the inner product of $\cal E$ in that \cite[Chap.6, Def.10]{Connes:1994kx} \begin{equation} \label{eq:128} (\xi',\nabla\xi) - (\nabla \xi', \xi) = [D, (\xi',\xi)] \end{equation} where \begin{equation} (\nabla \xi,\xi')= \xi_{(1)}^*(\xi_{(0)},\xi'),\qquad (\xi,\nabla\xi')= (\xi,\xi'_{(0)})\xi'_{(1)}.\label{eq:134} \end{equation} As explained in \cite{Connes:1996fu}, the minus sign in \eqref{eq:128} is because $[D, a^*]= -[D, a]^*$, and gua-rantees that any such connection is the sum of the Grassmann connection with a selfadjoint element~of~$\Omega^1_D(\A)$. \smallskip For a twisted spectral triple $(\A, \HH, D), \sigma$, the derivations $\delta$ is not anti-hermitian but rather satisfy~\eqref{eq:82bis}. In addition, one needs to modify \eqref{eq:134} to take into account the bimodule structure of $\Omega$, defining \begin{equation} \label{eq:130} (\nabla \xi',\xi):= {\xi'}_{(1)}^{\, *}\cdot (\xi'_{(0)},\xi)\quad\quad\quad (\xi',\nabla\xi):= (\xi',\xi_{(0)})\cdot \xi_{(1)},\quad \forall \xi, \xi'\in {\cal E}, \end{equation} where the involution on $\Omega$ follows from the one of $\HH$, namely $(a\delta(b))^*=\delta(b)^*a^*$. Taking into account the bimodule structure, this means \begin{align} \label{eq:132} (a\cdot\omega)^*&= (\sigma(a)\omega)^*=\omega^*\sigma(a)^*= \omega^*\cdot \sigma(a)^*,\\ \label{eq:132bis} (\omega\cdot a)^*&= (\omega a)^*=a^*\omega^*=\sigma^{-1}(a^*)\cdot\omega^*=\sigma(a)^*\cdot\omega^*. \end{align} Notice these laws are compatible since $\sigma\left(\sigma\left(a\right)^*\right)^*=(\sigma^{-1}\left(\sigma(a)\right)^*)^*=(a^*)^*=a.$ We look for a definition of a $\Omega$-hermitian connection which guarantees the same properties as in the non-twisted case, namely that any such connection is the sum of the Grassmann connection \begin{equation} \label{eq:77} \nabla_0\,\xi :=\begin{pmatrix} e_1^j\\ \vdots\\ e_n^j \end{pmatrix}\otimes \delta(\xi_j) \simeq e\cdot\begin{pmatrix} \delta(\xi_1)\\\vdots\\ \delta(\xi_n) \end{pmatrix}=e\cdot\delta(\xi) \quad\quad \forall \xi=e\xi= \begin{pmatrix} \xi_1\\\vdots\\ \xi_n \end{pmatrix}\in{\cal E}, \end{equation} with a selfadjoint element of $M_n(\Omega)$. Note that the second equality in \eqref{eq:77} is the identification of ${\cal E}\otimes \Omega$ with $e\cdot\Omega^n$ (beware the matrix $e$ acts by the module law \ref{eq:BimoduleOneForms}: $e\cdot$ actually is the usual matrix multiplication by $\sigma(e)$), while the last one is a shorthand notation with $\delta(\xi)$ the vector of $\Omega^n$ with components $\delta(\xi_i)\in\Omega$. \begin{defn} \label{sec:twist-herm-conn-1} An $\Omega$-connection $\nabla$ on an hermitian right $\A$-module $\cal E$, with lift $\Sigma$ invertible in the sense of lemma \ref{lem:lift-autom-its}, is hermitian if \begin{equation} \label{eq:129} (\xi',\nabla\xi) - (\nabla (\Sigma^{-1}\xi'), \xi) = \delta\left((\xi',\xi)\right) \quad \forall \xi, \xi'\in {\cal E}. \end{equation} \end{defn} \noindent As long as the idempotent $e$ is twist-invariant or twist-commutes componentwise with $D$, \begin{equation} \label{eq:119} \sigma(e)=e \quad\text{ or }\quad \delta(e_i^j)=0 \quad\forall i,j=1,...,n, \end{equation} then definition \ref{sec:twist-herm-conn-1} is precisely the one guaranteeing similar properties as in the non-twisted case. \begin{lem} \label{sec:twist-herm-conn-2} Assuming \eqref{eq:119}, the Grassmann connection $\nabla_0$ is hermitian. Furthermore, any hermitian connection is of the form $\nabla= \nabla_0 + M$ where $M$ is a selfadjoint element of $M_n\left(\Omega\right)$. \end{lem} \begin{proof} By \eqref{eq:63}, $\Sigma^{-1}\xi'$ has components $S'_j=e_j^k\sigma^{-1}(\xi'_k)$ such that $e_i^j S'_j=S'_i$. Therefore \eqref{eq:77} yields \begin{equation} \nabla_0(\Sigma^{-1}\xi')= (e_i^k)\otimes \delta(S'_k) \label{eq:186} \end{equation} where $(e_i^k)$ denotes the element $\xi^k\in\cal E$ with components $(\xi^k)_i=e_i^k$. If $e=\sigma(e)$, then $\delta(S'_j)=\delta(\sigma^{-1}(e_j^k\xi'_k))=\delta(\sigma^{-1}(\xi'_j))$. Otherwise $e$ twist commutes with $D$ so that $\delta(S'_j)~=~e_j^k\cdot\delta(\sigma^{-1}(\xi'_k))$. In any case, \begin{equation} \nabla_0(\Sigma^{-1}\xi') =(e_i^j)\otimes \delta\left(\sigma^{-1}(\xi'_j)\right)=e\cdot \delta\left(\sigma^{-1}(\xi')\right). \label{eq:184} \end{equation} The product \eqref{eq:134} yields \begin{align*} & (\xi', \nabla_0\xi) =(\xi', (e_i^j))\cdot \delta(\xi_j)=\left(\sum_i {\xi'_i}^* e_i^j\right)\cdot \delta(\xi_j)=\left(\sum_i (e_j^i\xi'_i)^*\right) \cdot \delta(\xi_j)=\sum_j{\xi'_j}^*\cdot \delta(\xi_j),\\ &(\nabla_0(\Sigma^{-1}\xi'), \xi) =\delta(\sigma^{-1}\xi'_j)^*\cdot \left( (e_i^j),\xi\right)=\delta(\sigma^{-1}\xi'_j)^*\cdot \xi_j=-\sum_j\delta({\xi'_j}^*)\cdot \xi_j \end{align*} using \eqref{eq:82bis} for the last equality. Since $\delta\left((\xi',\xi)\right)=\delta\left(\sum_i {\xi'_i}^*\xi_i\right)=\sum_i {\xi'_i}^*\cdot\delta(\xi_i) +\delta{\xi'_i}^*\cdot\xi_i$, one has that $\nabla_0$ satisfies \eqref{eq:129}, hence is hermitian. From the Leibniz rule \eqref{eq:TwistedLeibnizConn}, the difference $\tilde\nabla:=\nabla-\nabla_0$ of the two connections is $\A$-linear, \begin{equation} \label{eq:133} \tilde\nabla (\xi a) =(\nabla_0\,\xi) a - (\nabla\xi) a =\tilde \nabla(\xi)a, \end{equation} meaning that $\tilde\nabla$ is an $\A$-linear endomorphism from $\cal E$ to ${\mathcal E}\otimes \Omega$, that is an element of $M_n(\A)\otimes_\A\Omega\simeq M_n(\Omega)$ invariant by the conjugate action of $e$. More precisely, there exists a matrix $M\in M_n(\Omega)$ with entries $m_i^j\in\Omega$, such that $e\cdot M\cdot e =M$ and \begin{align} \label{eq:135} &\tilde\nabla \xi = (e_i^j)\otimes (m_j^k\cdot\xi_k) \simeq M\cdot\xi,\\ &\tilde\nabla(\Sigma^{-1}\xi')= (e_i^j)\otimes (m_j^k\cdot \sigma^{-1}(\xi'_k))\simeq M\cdot \Sigma^{-1}(\xi'). \end{align} Being both $\nabla_0$ and $\nabla$ hermitian, one has \begin{align} 0&= \left(\xi',\tilde\nabla\xi\right) -\left(\tilde\nabla(\Sigma^{-1}\xi'),\xi\right),\\ \label{eq:136} &=\sum_j \,{\xi'}^*_j \cdot (m_j^k\cdot \xi_k)- (m_j^k\cdot \sigma^{-1}(\xi'_k))^*\cdot \xi_j = \sum_{j,k} {\xi'}^*_j \cdot m_j^k\cdot \xi_k- {\xi'_j}^*\cdot {m_k^j}^*\cdot \xi_k \end{align} where, for the last equality, we use \eqref{eq:132bis} as $(m_j^k\cdot \sigma^{-1}(\xi'_k))^*= {\xi'_k}^*\cdot {m_j^k}^*$, then exchange the indices $j$ and $k$. Being \eqref{eq:136} true for any $\xi, \xi'$, one obtains $m_j^k=(m_k^j)^*$, meaning the matrix $M$ is selfadjoint. \end{proof} All the results of \S \ref{subsec:lift} and \ref{sec:twist-herm-conn} makes sense with minimal modifications for left $\A$-module and $\Omega^\circ$-connections, as shown in the appendix \ref{sec:twist-herm-conn-4}. This is important later, in order to export a \emph{real} twisted geometry to a Morita equivalent algebra. \begin{remark} \label{sec:twist-herm-conn-5} Here, we have absorbed the twist in the bimodule laws \eqref{eq:BimoduleOneForms}, and modi-fied accordingly the definition of hermitian connections. An alternative - which should be equivalent - consists in letting the module law untouched and twist the connection, as done in \cite{Ponge:2016aa}. \end{remark} \section{Twisted fluctuation with a non-linear term} \label{sec:twist-fluct-with-2} Inner fluctuations follow from self-Morita equivalence and have been adapted to the twisted case in \cite{landimart:twistgauge}. We extend these results to a wider class of Morita equivalence, namely the one implemented by a bimodule which satisfies \eqref{eq:74},\eqref{eq:119}, following what has been done in \cite{chamconnessuijlekom:innerfluc} for the non-twisted case. We begin with twisted spectral triples in \S\ref{sec:morita-equivalence}, then take into account the real structure in \S\ref{sec:twist-fluct-real}. In \S\ref{sec:twist-fluct-with} we go back to self-Morita equivalence and show how the removal of the first-order condition yields an extra non-linear term in the fluctuation, similar as the one worked out~in~\cite{chamconnessuijlekom:innerfluc}. \subsection{Morita equivalent twisted geometries} \label{sec:morita-equivalence} We first recall inner fluctuations of a usual (i.e. non twisted) geometry $ (\A,\HH, D)$. \linebreak Take $\B=\text{End}_\A(\cal E)$ for a hermitian right $\A$-module $\cal E$ with inner product \eqref{eq:12}. Then \begin{equation} {\cal H}_R:=\mathcal{E}\otimes_{\A}\mathcal{H} \label{eq:07} \end{equation} is a (pre)-Hilbert space for the product (denoting $\langle\cdot,\cdot\rangle_{\mathcal{H}}$ the inner product on~$\mathcal{H}$): \begin{equation} \label{eq:122} \langle\xi'\otimes\psi',\xi\otimes\psi\rangle:=\langle\psi',(\xi',\xi)\psi\rangle_{\mathcal{H}}. \end{equation} Its completion, still denoted $\HH_R$, carries both a representation of the algebra $\cal B$ \begin{equation} \label{eq:6} \pi_R(b)(\xi\otimes\psi):=b\xi\otimes\psi \qquad \forall b\in \B,\, \xi\in\mathcal{E}, \, \psi\in\mathcal{H}, \end{equation} and an action of the operator $D$ as \begin{equation} \label{eq:15} (\I\otimes_{\nabla}D)(\xi\otimes\psi):=\xi\otimes D\psi+(\nabla\xi)\psi, \end{equation} with $\I$ the identity endomorphism on $\cal E$, $\nabla$ a $\Omega^1_D(\A)$-valued connection on $\mathcal{E}$, and \begin{equation} \label{eq:177} (\nabla \xi)\psi:=\xi_{(0)}\otimes\xi_{(1)}\psi \end{equation} (using \eqref{eq:7}) where the action of $\xi_{(1)}\in\Omega^1_D(\A)$ on $\HH$ follows from the representation of $a_j$ and $[D, b_j]$ as bounded operators). Then $(B, {\mathcal H}_R, 1\otimes_{\nabla}D)$ is a spectral triple (\cite[\S 10.8]{marcolconnes:noncommgeo}, see also \cite{chamconnessuijlekom:innerfluc}). The construction is similar for a twisted spectral triple $(\A,\HH, D), \sigma$, provided $\sigma$ satisfies the compatibility conditions \eqref{eq:119} with the idempotent and its lift $\Sigma$ to $\cal E$ defined \eqref{eq:17} is invertible. Make $\cal B$ act on $\HH_R$ as in \eqref{eq:6}, but instead of \eqref{eq:15} consider an $\Omega$-connection $\nabla$ and define \begin{equation} \label{eq:right_Dirac} {D}_R:= (\Sigma\otimes \mathbb{I})\circ(\I\otimes_{\nabla}D). \end{equation} This is a well densely-defined operator on $\HH_R$~\cite[Prop.3.5]{landimart:twistgauge}. \begin{prop} \label{sec:morita-equiv-twist} Assume the lift $\Sigma$ is invertible in the sense of lemma~\ref{lem:lift-autom-its} and that \eqref{eq:119} holds. Then $ \left[{D}_R, \pi_R(b)\right]_{\sigma'}$ with $\sigma'$ the lift \eqref{eq:17} of $\sigma$ to $\cal B$ is bounded for any $b\in B$. \end{prop} \begin{proof} With $\xi^p=e\xi^p$ and $\psi_p$ generic elements of ${\cal E}$ and $\HH$, a generic~element of $\HH_R$ is \begin{align} \label{eq:66prebis} \Psi=\xi^p\otimes\psi_p &= (e_i^j)\xi_j^p\otimes\psi_p =(e_i^j)\otimes \psi_j\simeq \begin{pmatrix} \psi_1\\\vdots\\ \psi_n \end{pmatrix}=e\Psi \end{align} where $\xi_i^p = e_i^j\xi_j^p\in\A$ are the components of $\xi^p$ and $\psi_j:=\xi^p_j\psi_p\in\HH$. The former last equality is the identification ${\cal E}\otimes_\A \HH\sim e\HH^n$. Denoting $\tilde\nabla$ the difference of $\nabla$ with the~Grassmann connection \eqref{eq:77}, then for $\Psi$ with components $\psi_j$ in $\mathrm{Dom}(D)$, eq.\eqref{eq:15} yields \begin{equation} \label{eq:45bis} (\I\otimes_{\nabla} D)\Psi= (e_i^j)\otimes D\psi_j+\nabla_0 (e_i^j) \psi_j + \tilde\nabla (e_i^j) \psi_j. \end{equation} By \eqref{eq:77}, $\nabla_0 (e_i^j) = (e_i^k)\otimes\delta(e_k^j)$ is zero in case $e$ twist-commutes with $D$. Otherwise by \eqref{eq:177} \begin{align} \label{eq:69bis} (\nabla_0 (e_i^j))\psi_j&= (e_i^k)\otimes\delta(e_k^j) \psi_j\simeq e\delta(e)\Psi \end{align} with $\delta(e)\in M_n(\Omega)$ with components $\delta(e)_i^j:=\delta(e_i^j)$. Being $e$ twist-invariant, \eqref{eq:TwistedLeibniz} gives $\delta(e_i^j)= \delta\left(e_i^ke_k^j\right)=\sigma(e_i^k)\delta(e_k^j)+\delta(e_i^k)e_k^j=e_i^k\delta(e_k^j)+\delta(e_i^k)e_k^j$, that is $\delta(e)~=~e\delta(e)~+~\delta(e)e$. Multiplying on the right by $e$ shows that $e\delta(e)e=0$, that is ~\eqref{eq:69bis} is zero. So in any case, the second term in the r.h.s. of \eqref{eq:45bis} vanishes. The third term is, by \eqref{eq:135}, \begin{equation} \label{eq:38} (\tilde\nabla (e_i^j))\psi_j =(e_i^k) \otimes (m_k^l\cdot e^j_l)\psi_j\simeq eM\Psi \end{equation} Applying $\Sigma\otimes\mathbb{I}$ to \eqref{eq:45bis} (with $\D\Psi\in e\HH^n$ the action of $D$ on each components of $\Psi$) one~gets \begin{equation} \label{eq:46} {D}_R\Psi =e(\sigma(e_i^j))\otimes D\psi_j + e(\sigma(e_i^k)) \otimes m_k^j\psi_j\simeq e\sigma(e) \left( \D+ M\right)\Psi. \end{equation} If $e$ is twist-invariant, this becomes \begin{equation} \label{eq:46bis} {D}_R\, \Psi =(e^k_i)\otimes\left( D\psi_k + m_k^l\psi_l\right) \simeq e (\D+M)\Psi. \end{equation} The same is true if $e$ twist-commutes with $\D$ since then $e\sigma(e)\D\Psi= e\D e\Psi=e\D\Psi$ whereas $\sigma(e)M=e.M=M$ by definition of $M$. Consider now $b=ebe$ in $\B$ with components $b_i^j\in \A$. From \eqref{eq:6} and \eqref{eq:66prebis} one has \begin{equation} \pi_R(b)\Psi = b\xi^p \otimes\psi_p = (e^j_i)\otimes b_j^k\xi^p_k\psi_p=(e^j_i)\otimes b_j^k\psi_k \simeq b\Psi\label{eq:18} \end{equation} where we use $((b\xi^p)_i)=(e_i^jb_j^k\xi^p_k)= (e_i^j) b_j^k\xi^p_k$. Thus \eqref{eq:46bis} gives \begin{align*} {D}_R\pi_R(b)\Psi = e(\D+M) b\Psi,\quad \pi_R(\sigma'(b)) {D}_R\Psi= e\sigma(b)e \sigma(e)(\D+M)\Psi= e \sigma(b)(\D+M)\Psi, \end{align*} where for the second equation we used \eqref{eq:17} together with \eqref{eq:46}, then \eqref{eq:70} as $\sigma(b) e \sigma(e)=\sigma(e)\sigma(b)\sigma(e)e\sigma(e) =\sigma(e) \sigma(b)=\sigma(b)$. Hence \begin{equation} \label{eq:3} \left[ {D}_R,\pi_R(b)\right]_{\sigma'}\Psi\simeq e[\D+M,b]_\sigma\Psi. \end{equation} Since $[\D,b]_\sigma$ is a matrix with components $[D,b_i^j]_\sigma$, bounded by hypothesis, while $[M,b]_\sigma$ is bounded being both $M$ and $b$ bounded, then \eqref{eq:3} is bounded. \end{proof} Proposition \ref{sec:morita-equiv-twist} is not sufficient to build a twisted spectral triple, for there is no guarantee that ${D}_R$ is a selfadjoint. This happens however if one restricts to hermitian connections. \begin{prop} \label{prop:rightMorita} In the conditions of Prop. \ref{sec:morita-equiv-twist} and with $\nabla$ hermitian in the sense of Def. \ref{sec:twist-herm-conn-1}, then $(\B, \HH_R, {D}_R), \sigma'$ with $\B$ acting on $\HH_R$ as in \eqref{eq:6} is a twisted spectral triple. \end{prop} \begin{proof} In view of props.\ref{sec:lift-autom-its} and \ref{sec:morita-equiv-twist}, the only point to check is that $ {D}_R$ is selfadjoint with compact resolvent. The operator \eqref{eq:46bis} coincides with the operator (7) in \cite{chamconnessuijlekom:innerfluc}, which is shown to be part of a spectral triple, hence selfadjoint with compact resolvent. For completeness we develop the proof here. For $ \Psi' =(e_i^j)\otimes \psi'_j$ with $\psi'_j\in\text{Dom}\,D$, \eqref{eq:122}~yields \begin{small} \begin{align} \label{eq:120} &\langle \Psi', {D}_R \Psi \rangle \!=\!\langle \psi'_j, (\!(e_i^j), \!(e_i^k\!)\!)\!\left(D\psi_k + m_k^l\psi_l\right)\rangle_{\HH} \!=\! \sum_k\langle e_k^j \psi'_j, D\psi_k \!+\! m_k^l\psi_l\rangle_{\HH} \!=\! \sum_k\langle\psi'_k, D\psi_k \!+\! m_k^l\psi_l\rangle_{\HH},\\ \label{eq:120bis} &\langle ( {D}_R\,\Psi', \Psi \rangle = \sum_j\langle D\psi'_j + m_j^l\psi'_l, e_j^k\psi_k\rangle_{\HH} =\sum_j \langle D \psi'_j +m_j^l\psi'_l, \psi_j\rangle_{\HH}, \end{align} \end{small} where we compute the $\A$-valued inner product \eqref{eq:12} (remembering ${e_i^j}^*=e_j^i$) \begin{equation} \label{eq:121} \left( (e_i^j),(e_i^k)\right)=\sum_i ({e_i^j}^*e_i^k) = e_j^ie_i^k =e_j^k={e_k^j}^*. \end{equation} $D$ and $m_k^l$ being selfadjoint, \eqref{eq:120} equals \eqref{eq:120bis}, meaning ${D}_R$ is symmetric. Furthermore, $\text{Ran}(D+ m_k^l\pm i)=\HH$ \cite[Theo. 8.3]{Reed1980}, so $\text{Ran}({D}_R\pm i)=\HH_R$, hence ${D}_R$ is selfadjoint. Regarding the compact resolvent, let us denote $D_R=D_0$ in case $\nabla$ is the Grassmann connection. For $\lambda$ in the resolvent set of $D$, ${D}_0-\lambda \I$ is invertible with inverse \begin{equation} \label{eq:123} ({D}_0-\lambda\I)^{-1}\, \psi =e \begin{pmatrix} (D-\lambda)^{-1}\psi_1\\\vdots\\ (D-\lambda \I)^{-1}\psi_n. \end{pmatrix} . \end{equation} $e$ being the identity on $\HH_R$ and a finite direct sum of compact operators being compact, $({D}_0-\lambda\I)^{-1}$ is compact. The passage to an arbitrary hermitian connection $\nabla$ is similar as for \cite[Thm. 6.15]{Walterlivre}, having in mind Prop.~\ref{sec:twist-herm-conn-2} which guarantees that the difference $\nabla-\nabla_0$ is similar as for the non-twisted case.\end{proof} \subsection{Morita equivalence for real twisted geometries} \label{sec:twist-fluct-real} Provided the initial twisted spectral triple is real, then the previous construction holds as well if the Morita equivalence between $\A$ and $\B$ is implemented by a left $\A$-module (details are in~\ref{sec:twist-fluct-left}). In particular, instead of the right-Morita equivalent triple of proposition \ref{prop:rightMorita}, one may~built a left-Morita equivalent triple using the $\A$-$\B$-module $\bar{\cal E}$ conjugate to~$\cal E$ defined in~\eqref{eq:9}. The latter is hermitian for the $\A$-valued pairing \begin{equation} \{\bar \xi', \bar\xi \}:=(\xi', \xi)\qquad \forall \xi, \xi'\in \cal E, \label{eq:10} \end{equation} and the Hilbert space $\HH_L:= \mathcal{H}\otimes_{\A}\overline{\mathcal{E}}$ carries the representation \eqref{eq:leftrep} of $\B$ \begin{equation} \label{eq:leftrepbbbis} \pi_L(b)(\Psi\otimes\overline{\xi}):=\Psi\otimes\overline{\xi}\, b\qquad \forall b\in \B,\, \overline{\xi}\in\overline{\mathcal{E}},\,\Psi\in\mathcal{H}_R. \end{equation} Consider an hermitian $\Omega^\circ$-connection on $\bar{\cal E}$, for instance the conjugate $\bar\nabla$ of an hermitian connection $\nabla$ on $\cal E$ defined in lemma \ref{sec:twisted-one-forms}. Assuming the idempotent $e$ satisfies the conditions of proposition \ref{prop:rightMorita}, one makes the operator $D$ act on $\HH_L$ as $D_L$ in \eqref{eq:left_Dirac}. Then proposition \ref{sec:twist-fluct-left-2} shows that $(\B, \HH_L, {D}_L), \Sigma^{\circ-1}$ is a twisted spectral triple. However, the real structure $J$ of the initial triple has no reason to be a real structure, neither for this left-Morita equivalent nor for the right-Morita one of Prop. \ref{prop:rightMorita}. Actually this is not even true for self-Morita equivalence [Lem.3.7]\cite{landimart:twistgauge}). So, to export a \emph{real} twisted spectral triple one needs to combines the two previous constructions, following what has been done for usual spectral triples in \cite{Connes:1996fu} (later explained in greater details in \cite{marcolconnes:noncommgeo,chamconnessuijlekom:innerfluc}). Explicitly, given a real, graded, twisted spectral triple \begin{equation} (\A, \HH, D), \sigma,\, \Gamma,\, J, \label{eq:188} \end{equation} one considers the Hilbert space \begin{equation} \HH':=\HH_R\otimes_{\A}\overline{\mathcal{E} \end{equation} for $\HH_R$ in \eqref{eq:07}. The tensor product makes sense with respect to the right action of $\A$ on $\HH_R$ \begin{equation} (\xi\otimes\psi)a=\xi\otimes \psi a \label{eq:158} \end{equation} well defined by the order zero condition of \eqref{eq:188} (see \eqref{eq:190} below). On $\HH'$, one makes the Dirac operator $D$ act as the operator \begin{equation} \label{eq:23} D':=(\mathbb{I}\otimes\Sigma^{\circ-1})\circ\left({D}_R\otimes_{\nabla^\circ_R}1\right) \end{equation} with ${D}_R$ given in \eqref{eq:right_Dirac}, $\nabla$ an $\Omega$-valued hermitian connection on $\cal E$, $\Sigma^\circ$ the lift \eqref{eq:5} of $\sigma$ to $\bar{\cal E}$, and $\nabla^\circ_R$ an hermitian connection on $\bar{\cal E}$ with value in the bimodule \begin{equation} \label{eq:194} \Omega^\circ_R:=\Omega^1_{D_R}(\A^\circ,\sigma^\circ)=\left\{ \sum_j\, \tilde\pi^\circ(a_j^\circ)\left[{D}_R,\tilde\pi^\circ(b_j^\circ)\right]_{\sigma^\circ},\; a_j^\circ, b_j^\circ \in \A^\circ\right\} \end{equation} generated by the derivation $\delta_R^\circ(a):=[D_R, \tilde\pi(a^\circ)]$, where the action of $\A^\circ$ on $\HH_R$ is \begin{equation} \label{eq:190} \tilde\pi^\circ(a)(\xi\otimes\psi):= \xi\otimes a^\circ\psi\quad \forall a\in\A,\, \xi\otimes \psi\in\HH. \end{equation} This action coincides with the right action \eqref{eq:158} and is well defined, for \begin{equation} \tilde\pi^\circ(a^\circ)(\xi a' \otimes \psi) = \xi \otimes a'a^\circ\psi = \xi\otimes a^\circ a'\psi=\tilde\pi^\circ(a^\circ)(\xi\otimes a'\psi) \qquad\forall a'\in\A. \label{eq:183new} \end{equation} by the order zero condition for \eqref{eq:188}. In order for $D'$ to make sense, one has to make sure that $\Omega^\circ_R$ acts on $\HH_R$ as bounded operators. To this aim, let us denote $R$ the bimodule morphism $\Omega^\circ\rightarrow \Omega^\circ_R$ \begin{equation} \label{eq:214} R(\omega^\circ):=\sum_j\tilde\pi(a^\circ_j)\delta^\circ_R(b_j)\in\Omega_R^\circ \qquad \forall \omega^\circ=\sum_j a^\circ_j\delta^\circ(b_j)\in\Omega^\circ \end{equation} (one shows this is a morphism by considerations as in remark \ref{sec:twisted-one-forms-1}). \begin{lem} \label{sec:morita-equiv-real-1} For any $a\in\A$, $\delta_R^\circ(a)$ is a bounded operator on $\HH_R$ and acts as $\Sigma\otimes\delta^\circ(a)$. Any element of $\Omega^\circ_R$ is of the form $R(\omega^\circ)$ for some $\omega^\circ\in\Omega^\circ$, and acts on $\HH_R$ as \begin{equation} \label{eq:208} R(\omega^\circ)\Psi = \Sigma\xi\otimes\omega^\circ\psi \qquad \forall \Psi=\xi\otimes\psi\in \HH_R. \end{equation} \end{lem} \begin{proof} From ~\eqref{eq:15} one has \begin{align} \label{eq:196} [\I\otimes_\nabla D, \tilde\pi^\circ (a^\circ)]&_{\sigma^\circ}(\xi\otimes \psi ) = (\I\otimes_\nabla D)(\xi\otimes a^\circ\psi) - \tilde\pi^\circ (\sigma^\circ(a^\circ)) (\I\otimes_\nabla D)(\xi\otimes\psi),\\ \nonumber &= \xi\otimes Da^\circ\psi + \nabla(\xi)a^\circ\psi -\xi\otimes \sigma^\circ(a^\circ)D\psi - \tilde\pi (\sigma^\circ(a^\circ))\nabla(\xi)\psi =\xi\otimes[D,a^\circ]_{\sigma^\circ}\psi, \end{align} where we noticed that \begin{align} \label{eq:197} \nabla(\xi)a^\circ\psi - \tilde\pi^\circ(\sigma^\circ(a^\circ))\nabla(\xi)\psi=\xi_{(0)}\otimes\xi_{(1)}a^\circ\psi -\xi_{(0)}\otimes \sigma^\circ(a^\circ)\xi_{1}\psi= \xi_{(0)}\otimes[\xi_{(1)},a^\circ]_{\sigma^\circ}\psi \end{align} vanishes by the first order condition satisfied by \eqref{eq:188}. Thus \eqref{eq:right_Dirac} yields \begin{equation} \label{eq:198} [{D}_R, \tilde\pi^\circ(a^\circ)]_{\sigma^\circ}(\xi\otimes \psi ) =\Sigma(\xi)\otimes [D,a^\circ]_{\sigma^\circ}\psi, \end{equation} which is bounded, being $[D,a^\circ]_{\sigma^\circ}$ bounded by definition of the triple \eqref{eq:188}. Notice that this action is well defined thanks to the twisted-first order condition, rewritten as $[[D,a^\circ]_{\sigma^\circ}, a']_\sigma=0$ (see \cite[Def.2.1]{landimart:twisting}). \end{proof} \noindent In the language of \cite{chamconnessuijlekom:innerfluc}, $\omega^\circ$ and $R(\omega^\circ)$ are representations of the same universal $1$-form: on $\HH$ using the twisted commutator with $D$, on $\HH_R$ using the one with $D_R$. Given an $\Omega$-hermitian connection $\nabla$ on $\cal E$, we denote \begin{equation} \bar\nabla_R=(R\otimes\I)\circ \bar\nabla\label{eq:225} \end{equation} the $\Omega^\circ_R$-connection on $\bar{\cal E}$ defined, for any $\bar\eta\in \bar{\cal E}$ with $\nabla\eta=\eta_{(0)}\otimes \eta_{(1)}$, as \begin{equation} \label{eq:209} \bar\nabla_R\bar\eta= R(\bar\eta_{(-1)})\otimes \bar\eta_{(0)} \end{equation} where $\bar\eta_{(-1)}=\epsilon'J\eta_{(1)} J^{-1}\in\Omega^\circ$ is defined in \eqref{eq:26}. This is an hermitian connection (one checks \eqref{eq:148} using $R$ is a bimodule morphism). This permits to conclude the construction of twisted fluctuations of real twisted spectral triples. \begin{prop} \label{sec:morita-equiv-real} Consider a real, graded twisted spectral triple \eqref{eq:188} and a finite projective right $\A$-module ${\cal E}=e\A^n$ such that the lift $\Sigma$ of $\sigma$ is invertible in the sense of lemma~\ref{lem:lift-autom-its} and \eqref{eq:119} holds. Let $\B=\text{End}_\A({\cal E})$ act on $\HH'$ as \begin{equation} \pi':=~\pi_R\otimes\I\label{eq:218} \end{equation} with $\pi_R$ defined in \ref{eq:6}, and $\sigma'$ the lift \eqref{eq:142} of $\sigma$ to $\cal B$. Given an $\Omega$-connection $\nabla$ on $\cal E$, define $D'$ as in \eqref{eq:23} with $\nabla^\circ_R=\bar\nabla_R$ given in \eqref{eq:209}. Then \begin{equation} \label{eq:twisted_triple_Mequiv_general} (\B,\mathcal{H}',D'),\;\sigma' \end{equation} is a real, graded, twisted spectral triple with grading and real structure \begin{align} \label{eq:17bter} &\Gamma'(\xi\otimes\psi\otimes\overline{\eta}):=\xi\otimes \Gamma\psi\otimes\overline{\eta},\\ &J'(\xi\otimes\psi\otimes\overline{\eta}):=\eta\otimes J\psi\otimes\overline{\xi} ,\;\quad \forall \, \xi\otimes\psi\in\HH_R,\bar\eta\in\bar{\cal E} \label{eq:17bbis} \end{align} and the same $KO$-dimension as \eqref{eq:188}. \end{prop} \begin{proof} For $\Psi'=\Psi\otimes \bar\eta\in\HH'$ with $\Psi\in \HH_R$ and $\bar\eta\in\bar{\cal E}$, one gets from \eqref{eq:153}, \eqref{eq:155}, \eqref{eq:165} \begin{align} \label{eq:171} D'\Psi' = {D}_R\Psi \otimes \Sigma^{\circ-1}\bar\eta + (\I\otimes\Sigma^{\circ-1})\circ \bar\nabla_R(\bar\eta)\Psi = {D}_R\Psi \otimes \overline{\Sigma\eta} + R(\bar\eta_{(-1)})\Psi\otimes \overline{\Sigma\eta_{(0)}}, \end{align} so that \begin{equation} \label{eq:173} \left[D',\pi'(b)\right]_{\sigma'} \Psi'= \left[{D}_R,\pi_R(b)\right]_{\sigma'}\Psi \otimes \overline{\Sigma\eta} +\left[R(\bar\eta_{(-1)}),\pi_R(b)\right]_{\sigma'}\Psi\otimes \overline{\Sigma\,\eta_{(0)}}. \end{equation} The first term is bounded by Prop.\ref{sec:morita-equiv-twist}, the second because $\pi_R(b)$ is bounded, as well as $R(\bar\eta_{(-1)})$ by lemma~\ref{sec:morita-equiv-real-1} . That $D'$ is selfadjoint with compact resolvent is shown as in the proof of Prop.\ref{prop:rightMorita}. The operator $\Gamma'$ is well defined ($\Gamma'(\xi a\otimes\psi\otimes b\bar\eta)=\Gamma'(\xi\otimes a\psi b\otimes \bar\eta)$ for $\Gamma$ commutes~with~$\A$). In addition, ${\Gamma'}^2=\I$ and $[\Gamma',\pi'(a)]=0$. Since $\Gamma$ anticommutes with both $\Omega$ and $\Omega^\circ$, then $\I\otimes\Gamma$ anticommutes with $D_R$ and $\bar\eta_{(-1)}$, thus $\Gamma'$ anticommutes with $D$. In other terms $({\cal B}, \HH', D'), \sigma'$ is a graded twisted spectral triple. \medskip To show that it is real, first note that $J'$ is well defined on $\HH'$, for \eqref{eq:9} yields \begin{align*} J'(\xi a\otimes\psi\otimes\bar\eta)&= \eta\otimes J\psi\otimes a^*\bar\xi= \eta\otimes (J\psi)a^*\otimes\bar\eta=\eta\otimes JaJ^{-1}J\psi \otimes\bar\eta= J'(\xi\otimes a\psi\otimes\bar\eta),\\ J'(\xi \otimes\psi\otimes a\bar\eta)&=J'(\xi \otimes\psi\otimes \overline{\eta a^*}) = \eta \otimes a^*J\psi\otimes \bar\xi= \eta\otimes Ja^\circ\psi\otimes\bar\eta=\eta\otimes J(\psi a) \otimes\bar\eta= J'(\xi\otimes \psi a\otimes\bar\eta). \label{eq:176} \end{align*} It induces a representation of the opposite algebra $\B^{\circ}$, following (\ref{eq:opposite_rep}), \begin{align} \pi'^{\circ}(c^{\circ})\Psi'&=J'\pi'(c^{*})J'^{-1}\Psi' =\epsilon J'\pi'(c^{*})(\eta\otimes J\psi\otimes\overline{\xi}) =\epsilon J'(c^*\eta\otimes J\psi\otimes\overline{\xi})= \xi\otimes\psi\otimes \overline{\eta}c \end{align} for any $c\in{\cal B}$ and $\Psi'=\xi\otimes\psi\otimes\bar\eta$ in $\HH'$, where we have used ${J'}^{-1}=\varepsilon J'$ as well as \begin{equation} \label{eq:168} \overline{c^*\eta}=\overline{ \begin{pmatrix} {(c^*)_1^j}\eta_j\\ \vdots\\{(c^*)_n^j}\eta_j \end{pmatrix}} =(\eta_j^* ((c^*)_1^j)^*,\ldots,\eta_j^* ((c^*)_n^j))^*=(\eta_j^* c_j^1,\ldots, \eta_j^* c_j^n)= \bar\eta c.\end{equation} For the order zero condition, it is convenient to identify $\HH'$ with $eM_n(\HH)e$ ($n$-square matrices on $\HH$, invariant by conjugation with $e$). Indeed, a generic element of $\HH'$ is \begin{equation} \Psi'=\xi^p\otimes\psi_p^q\otimes\bar\eta_q = (e_i^k)\otimes\psi_k^l\otimes (e_l^j) \simeq \begin{pmatrix} \psi_1^1 &\cdots & \psi_1^n\\ \vdots& &\vdots\\ \psi_n^1 &\cdots & \psi_n^n \end{pmatrix}=e\Psi'e \label{eq:187} \end{equation} where $\xi^p_i=e^k_i\xi^p_k$ and $\bar\eta_q^j=\bar\eta_q^l e_l^j$ are the components of generic elements $\xi^p\in{\cal E}$, $\bar\eta_q\in\bar{\cal E}$, $\psi^q_p$ is a generic element of $\HH$ and we denote $\psi_k^l=\zeta_k^p \psi_p^q\bar\eta^l_q\in\HH$ (unambiguously defined by the order zero condition of \eqref{eq:188}). The action \eqref{eq:17bbis} of $J'$ then amounts to acting with $J$ on each components of the transpose of $\Psi'$: from \eqref{eq:195} one has \begin{equation} \label{eq:199} J'\Psi' = \sum_{k,l}(e^l_j)\otimes\ J\psi^l_k\otimes (e_k^i)=(e^l_j)\otimes\!\ J\,^T\!( \psi)^k_l\otimes (e_k^i)\simeq e (\J\; ^T\!\Psi') e \end{equation} where $\J$ is the $n$-diagonal matrix with $J$ on the diagonal. Meanwhile, the action of $\pi'(b)$, ${\pi'}^\circ(c^\circ)$ are the left and right matrix multiplications \begin{align} \label{eq:66preter} \pi'(b)\Psi' &= (e_i^k)\otimes b_k^r \psi_r^l \otimes(e^j_l)\simeq b\Psi' ,\\ \pi'^{\circ}(c^{\circ})\Psi'&= (e_i^k)\otimes\psi_k^l\otimes(e^j_l)c =(e_i^k)\otimes\psi_k^m c^l_m\otimes(e^j_l) \simeq \Psi' c \label{eq:66prequat} \end{align} where the first equation comes from \eqref{eq:18}, while for the second we use $ec=ce$ as $(e^j_l)c=(e_l^mc_m^j)=(c_l^me_m^j)=c_l^m(e_m^j)$, then exchange $l$ with $m$. The order zero condition of \eqref{eq:188} guarantees that the $i,j$ component $e_i^k((b_k^r\psi_r^m)c_m^l)e_l^j$ of ${\pi'}^\circ(c^\circ)\pi'(b)\Psi'$ equals the one $e_i^k(b_k^r(\psi_r^mc^l_m)e_l^j$ of ${\pi'}^\circ(c^\circ) \pi'(b)\Psi'$ for any $b,c\in\B$. This means that \ref{eq:twisted_triple_Mequiv_general} satisfies the order zero condition $[\pi'(b),\pi'^{\circ}(c^{\circ})]=0$. Regarding the condition of order $1$, given a generic $\Psi'\in\HH'$ by \eqref{eq:187}, the first term on the r.h.s. of \eqref{eq:173} is - denoting $X_k^r:=\left[D,b_k^r\right]_\sigma + \left([m,b]_\sigma\right)_k^r$ and using \eqref{eq:46bis} and \eqref{eq:18}~- \begin{equation} \label{eq:67} X\Psi'= \left[{D}_R,\pi_R(b)\right]_\sigma \Psi\otimes\Sigma^{\circ-1}(e^j_l) = (e^k_i)\otimes X_k^r \psi_r^l\otimes(\sigma^{-1}(e^j_l))e. \end{equation} Together with \eqref{eq:66prequat} this gives \begin{align} \label{eq:108} &X{\pi'}^\circ(c^\circ) \Psi'=(e^k_i)\otimes \left(X^r_k (\psi_r^m c_m^l)\right)\otimes(\sigma^{-1}(e^j_l))e,\\ &{\pi'}^\circ(\sigma^\circ(c^\circ)) X\Psi' =(e^k_i)\otimes \left((X_k^r\psi_r^m(\sigma^{-1}(c_m^l)\right)\otimes \sigma^{-1}(e_l^j)e \label{eq:76} \end{align} where to get \eqref{eq:76} we multiply $X\Psi'$ on the left by ${\pi'}^{\circ}({\sigma'}^\circ(c^\circ))={\pi'}^{\circ}({\sigma'}^{-1}(c)^\circ)$, using \begin{align} (\sigma^{-1}(e^j_l))e{\sigma'}^{-1}(c)&=(\sigma^{-1}(e^j_l))e\sigma^{-1}(c)e =(\sigma^{-1}(e^k_l \sigma(e_k^r)c_r^j)e=(\sigma^{-1}(e^k_l \sigma(e_k^r)e_r^mc_m^j)e,\\ &=(\sigma^{-1}(e_l^mc_m^j)e=(\sigma^{-1}(c_l^me_m^j)e= \sigma^{-1}(c_l^m) \sigma^{-1}(e_m^j)e \label{eq:117} \end{align} following from the definition \eqref{eq:17} of $\sigma'$ together with $c=ec=ec$ and \eqref{eq:70}, then exchanging $l$ with $m$. The twisted-first order condition from the initial triple guarantees that $X_k^r(\psi_r^mc^l_m)=X_r^r{c^l_m}^\circ\psi_r^m$ equals $X_k^r\psi_r^m\sigma^{-1}(c^l_m)=\sigma^\circ({c^l_m}^\circ)X_k^r\psi_r^m$: for the component $[D, b_k^r]_\sigma$ of $X_k^r$ this is precisely the order one condition, for the component $[m, b]_\sigma$ this is because both $m$ and $b$ twist commute with $c^\circ$ by the order zero and the first order conditions. Hence the first term in the r.h.s. of \eqref{eq:173} twist-commutes with ${\pi'}^\circ(c^\circ)$. The twisted first order condition for \eqref{eq:twisted_triple_Mequiv_general} then follows noticing that the second term in the r.h.s. of \eqref{eq:173} actually vanishes. Indeed, for $\Psi= (e_i^j)\otimes\psi_j$ in $\HH_R$, one has \begin{equation} \label{eq:21} \bar\eta_{(-1)}\Psi = (e_i^k)\otimes \sigma(e_k^j)\tilde\eta_{(-1)}\psi_j \end{equation} where for $\bar\eta_{(-1)}=\sum_i a^\circ_i \delta^\circ_R(b_i)\in \Omega^\circ_R$, one denotes $\tilde\eta_{(-1)}= \sum_i a^\circ_i\delta^\circ(b_i)\in \Omega^\circ$: From \eqref{eq:18} one obtains \begin{align} \label{eq:68} \pi_R(b)\bar\eta_{(-1)}\Psi &= (e_i^k)\otimes b_k^l\sigma(e_l^j)\tilde\eta_{(-1)}\psi_j,\\ \bar\eta_{(-1)}\pi_R(\sigma'(b))\Psi &= (e_i^k)\otimes \sigma(e_k^j)\tilde\eta_{(-1)}\sigma(b_j^k)\psi_k \end{align} Finally, for the real structure, one has ${J'}^2=\I\otimes J^2\otimes \I=\epsilon \I$, as well as \begin{equation} J'\Gamma'\Psi' = \eta\otimes J\Gamma\psi\otimes\bar\xi = \epsilon'' \eta\otimes \Gamma J\psi\otimes\bar\xi=\epsilon'' \Gamma'\Psi'. \label{eq:201} \end{equation} There remains only to check that $J'D'=\epsilon' D' J'$. The construction of \S \ref{sec:twist-fluct-left} applies because $\Omega^\circ_R$ satisfies the same module laws as $\Omega^\circ$ and $\delta^\circ(e)=0$ is equivalent to $\delta_R^\circ(e)=0$ by lemma \ref{sec:morita-equiv-real-1}. Developing in \eqref{eq:171} the actions on $\HH_R$ of $D_R$ (by \eqref{eq:right_Dirac}) and $R(\bar\eta_{(-1)})$ (by \eqref{eq:209},\eqref{eq:208}) yields \begin{equation} \label{eq:125} D'\Psi'= \Sigma\xi\otimes D\psi\otimes\overline{\Sigma\eta} +\Sigma\xi_{(0)}\otimes \xi_{(1)}\psi\otimes\overline{\Sigma\eta} +\Sigma\xi\otimes \bar\eta_{(-1)}\psi\otimes\overline{\Sigma\eta_{(0)}} , \end{equation} so that by \eqref{eq:199} one obtains \begin{align} \label{eq:73} J'D'\Psi' &= \Sigma\eta\otimes JD\psi\otimes\overline{\Sigma\xi} + \Sigma\eta \otimes J\xi_{(1)}\psi\otimes\overline{\Sigma\xi_{(0)}}+ \Sigma\eta_{(0)}\otimes J\bar\eta_{(-1)}\psi\otimes\overline{\Sigma\xi},\\ D' J'\Psi' &= \Sigma\eta\otimes DJ\psi\otimes\overline{\Sigma\xi} + \Sigma\eta_{(0)} \otimes \eta_{(1)}J\psi\otimes\overline{\Sigma\xi}+ \Sigma\eta\otimes \bar\xi_{(-1)}J\psi\otimes\overline{\Sigma\xi_{(0)}}, \end{align} From \eqref{eq:26} follows $\bar{\eta}_{(-1)}=\epsilon' J\eta_{(1)}J^{-1}=\epsilon' J^{-1}\eta_{(1)}J$ (from $J^{-1}=\epsilon J$, with $\epsilon^2=1$), so that \begin{equation} \label{eq:16} J\bar\eta_{(-1)}\psi=\epsilon' \bar\eta_{(1)}J\psi. \end{equation} Similarly, $\bar\xi_{(-1)}J\psi= J\xi_{(1)}\psi$. Together with $DJ=\epsilon'JD$, this give $J'D'\Psi' = \epsilon' D'J'\psi'$. Hence $J'$ is a real structure for \eqref{eq:twisted_triple_Mequiv_general}, for the same $KO$-dimension as the initial triple~\eqref{eq:188}. \end{proof} \noindent This proposition is both a generalization of \cite{landimart:twistgauge} which dealt with twist but only for self Morita equivalence, and of \cite{chamconnessuijlekom:innerfluc} which dealt with general Morita equivalence but with no twist. \begin{remark} Whether conditions \eqref{eq:74} and \eqref{eq:119} are necessary restrictions on the module implementing Morita equivalence in order to export a twisted spectral triple should be investigated elsewhere. Notice, however, that any idempotent whose non-zero components are the identity of $\A$ satisfy all these conditions. This is in particular true for self-Morita equivalence, in which case $e$ is the unit element of $\A$. \end{remark} The construction above is symmetric from the left/right module points of view. Namely one may view the total Hilbert space as \begin{equation} \HH'=\cal E\otimes_\A\HH_L \label{eq:212} \end{equation} and, given an hermitian $\Omega$-connection on $\cal E$, define the Dirac operator \begin{equation} \label{eq:183} D''= (\Sigma\otimes\I)\circ(\I\otimes_{\nabla_L} D_L), \end{equation} where \begin{equation} \label{eq:226} \nabla_L=(\I\otimes L)\circ\nabla \end{equation} is a connection on $\cal E$ valued in the bimodule $\Omega_L$ generated by the derivation $\delta_L(a):=[D_L,\tilde\pi(a)]$, \begin{equation} \tilde\pi(a)(\psi\otimes\bar\eta)= a\psi\otimes\bar\eta \label{eq:220} \end{equation} is the representation of $\A$ on $\HH_L=\HH\otimes\bar{\cal E}$, and $L$ is the map sending any $\omega=\sum_j a_j\delta(b_j)\in\Omega$ to \begin{equation} \label{eq:215} L(\omega) :=\sum_j\tilde\pi(a_j)\delta_L(b_j)\in\Omega_L. \end{equation} One checks that $\delta_L(a)$ acts on $\HH_L$ as $\delta(a)\otimes\Sigma^{\circ-1}$, so that $L(\omega)$ acts on $\HH_L$ as \begin{equation} L(\omega)\varphi= \omega\psi\otimes\Sigma^{\circ-1}\bar\eta \qquad\forall \varphi=\psi\otimes\bar\eta\in\HH_L.\label{eq:216} \end{equation} \begin{equation} \label{eq:217} \nabla_L\xi =\xi_{(0)}\otimes L(\xi_{(1)}). \end{equation} This yields a twisted version of the first statement of \cite[Prop. 1]{chamconnessuijlekom:innerfluc}. \begin{prop} Let $\nabla$ be an hermitian connection on $\cal E$ with $\nabla_L$ the associated $\Omega_L$-connection \eqref{eq:226}, and $D_L$ defined by \eqref{eq:left_Dirac} with $\nabla^\circ=\bar\nabla$ the conjugate to $\nabla$ of lemma~\ref{sec:herm-conn-conj}. Then $D''=D'$. \end{prop} \begin{proof} For $\Psi'=\xi\otimes\varphi\in\HH'$ with $\varphi= \psi\otimes\bar\eta\in\HH_L$, one has \begin{align} \label{eq:181} D''\Psi'&=\Sigma\xi \otimes D_L\varphi + (\Sigma\otimes\I)\circ(\nabla_L\xi)\varphi,\\ &=\Sigma\xi \otimes D\psi\otimes \Sigma^{\circ-1}\bar\eta + \Sigma\xi\otimes\bar\eta_{(-1)} \psi\otimes \Sigma^{\circ-1}\bar\eta_{(0)} + \Sigma\xi_{(0)}\otimes\xi_{(1)}\psi\otimes\Sigma^{\circ-1}\bar\eta,\\ &= \Sigma\xi \otimes D\psi\otimes \overline{\Sigma\eta} + \Sigma\xi\otimes\bar\eta_{(-1)} \psi\otimes \overline{\Sigma\eta_{(0)}} + \Sigma\xi_{(0)}\otimes\xi_{(1)}\psi\otimes\overline{\Sigma\eta}. \end{align} This coincides with the formula \eqref{eq:125} of $D'$. \end{proof} \subsection{Twisted fluctuations without first order condition} \label{sec:twist-fluct-with} Let us apply the preceding construction to self-Morita equivalence, that is \begin{equation} \B=\A \quad \text{ with }\quad \mathcal{E}=\A=\overline{\mathcal{E}}. \label{eq:43} \end{equation} Any hermitian $\Omega$-connection $\nabla$ on $\cal E$ and its conjugate $\bar\nabla$ on $\bar{\cal E}$ are such that \begin{align} \label{eq:23bis} \nabla(ea) &= e\otimes \delta(a) + e\otimes \omega a,\\ \label{eq:23ter} \bar\nabla(a\bar e)&= \bar\nabla(\overline{ea^*}) = \delta^\circ(a)\otimes \bar e +\epsilon' J\omega J^{-1}a^\circ\otimes\bar e\quad \text{ with }\; \omega=\omega^*\in\Omega \end{align} where $e$ is the unit of $\A$ and \eqref{eq:23ter} follows from \eqref{eq:23bis}, using $\epsilon' J\delta(a^*)J^{-1}= \delta^\circ(a)$ (see \eqref{eq:twistzero}). Modulo the identification $\HH_R\simeq \HH\simeq \HH_L$, one gets (e.g. \cite[Cor. 3.6,3.11]{landimart:twistgauge}) \begin{align} \label{eq:42} D_R= (\Sigma\otimes\mathbb{I})\circ(1\otimes_{\nabla}D)&=D+\omega,\\ \label{eq:42bist} D_L= (\mathbb{I}\otimes\Sigma^{-1})\circ(D\otimes_{\bar\nabla}1)&=D+\epsilon' J \omega J^{-1}, \end{align} in agreement with the formula \eqref{eq:46bis} for $D_R$ and \eqref{eq:175} for $D_L$. The left and right Morita equivalent triples of Prop. \ref{prop:rightMorita} \ref{eq:18} thus differ from the initial triple by the substitution of $D$ with $D+\omega$ and $D+\epsilon' J\omega J^{-1}$. The latter are called \emph{twisted fluctuations} of $D$ by $\A$ and $\A^\circ$. For a real spectral triple \eqref{eq:188}, the Hilbert space $\HH'$ \eqref{eq:twisted_triple_Mequiv_general} coincides with the initial one $\HH$ and $J'$, $\Gamma'$ in \eqref{eq:17bter},\eqref{eq:17bbis} with $J$, $\Gamma$. The Dirac operator \eqref{eq:23} is (see e.g. \cite[Prop. 3.13]{landimart:twistgauge}) \begin{equation} \label{eq:TwistedDiracFlucAlternative} D'=D+\omega_{(1)}+\hat{\omega}_{(1)} \end{equation} where, to match the notations of \cite{chamconnessuijlekom:innerfluc}, one uses \eqref{eq:34} and denote \begin{equation} \omega_{(1)}:=\omega = \sum_{i}a_i\left[D,b_i\right]_{\sigma},\quad \hat{\omega}_{(1)}=\sum_{i}\hat{a}_i[D,\hat{b}_i]_{\sigma^{\circ}}= \epsilon'\,J \omega_{(1)}J^{-1}. \label{eq:13} \end{equation} Exporting the real twisted spectral triple $(\A,\HH,D),\sigma$ via self Morita equivalence thus amounts to substituting $D$ with $D'$. This is a \emph{twisted inner fluctuation}, first introduced by imitation of the ordinary case in \cite{landimart:twisting}, then rigorously derived by Morita equivalence in \cite{landimart:twistgauge}. What happens if one no longer assumes the twisted first-order condition ? This has been investigated in \cite{chamconnessuijlekom:innerfluc} for the non-twisted case and leads to Pati-Salam extensions of the Standard Model \cite{chamconnessuijlekom:beyond}. The process is similar in the twisted case, as described below. Some of the physical consequences are investigated in \cite{M.-Filaci:2020aa}. \begin{prop} \label{sec:twist-fluct-with-1} Consider a real twisted spectral triple \eqref{eq:188} that satisfies all the properties listed in \S \ref{sec:real-twist-spectr} but the twisted first-order condition \eqref{eq:TwistedFirstOrder}. Then an inner twisted-fluctuation amounts to substitute $D$ with \begin{equation} \label{eq:222} D_\omega = D+\omega+ \hat\omega_{(1)}+ \hat\omega_{(2)} \end{equation} while $\omega_{(1)}$, $\hat\omega_{(1)}$ are defined in \eqref{eq:13} and\begin{equation} \label{eq:224} \omega_{(2)}:= \sum_j \hat a_j[\omega,\hat b_j]_{\sigma^\circ}. \end{equation} \end{prop} \begin{proof} Given an hermitian $\Omega$-connection $\nabla$ and an hermitian $\Omega^\circ_R$-connection $\nabla^\circ_R$, the definition \eqref{eq:23} of $D'$ still makes sense. However, only the first statement of lemma \ref{sec:morita-equiv-real-1} is true: $\delta^\circ_R(a)$ is bounded on $\HH_R$ but acts as \begin{equation} \label{eq:33} \delta^\circ_R(a)(\xi\otimes\psi)= \xi\otimes\delta^\circ(a)\psi + \xi_{(0)}\otimes[\xi_{(1)}, a^\circ]_{\sigma^\circ}\psi \quad \forall \xi\otimes\psi\in\HH_R, \end{equation} for \eqref{eq:197} has no reason to vanish any more. In particular, for $\xi=e$, one has \begin{equation} \label{eq:40} \delta^\circ_R(a)(e\otimes\psi)= e\otimes\delta^\circ(a)\psi + e\otimes[\omega, a^\circ]_{\sigma^\circ}\psi. \end{equation} Thus, instead of \eqref{eq:208}, the action of $R(\omega^\circ)$ on $\HH_R$, for $\omega^\circ=\sum_j a_j^\circ\,\delta^\circ(b_j)$, is \begin{align} \label{eq:213} R(\omega^\circ)\Psi&= e\otimes\omega^\circ\psi + e\otimes \sum_j a_j^\circ[\omega,b_j^\circ]_{\sigma^\circ}\psi\\ \label{eq:227} &= e\otimes\left(\omega^\circ+ \sum_j a_j^\circ[\omega,b_j^\circ]_{\sigma^\circ}\right)\psi\qquad \forall \Psi=e\otimes\psi\in\HH_R. \end{align} In particular, for $\nabla^\circ_R=\bar\nabla_R$ as in \eqref{eq:225}, one has \begin{equation} \omega^\circ=\bar e_{(-1)}=\epsilon' J e_{(1)} J^{-1}= \epsilon' J \omega J^{-1}=\hat\omega_{(1)}.\label{eq:223} \end{equation} In other terms, $\omega^\circ= \sum_j \hat a_j [D, \hat b_j]_{\sigma^\circ}$, meaning that the parenthesis of \eqref{eq:227} is $\hat\omega_{(1)}+\omega_{(2)}$. For $\Psi'=e\otimes \psi\otimes e$ a generic element of $\HH'$, the Dirac operator $D'$ in \eqref{eq:125} reads \begin{equation} \label{eq:221} D'\Psi' = e\otimes D\psi\otimes \bar e + e\otimes\omega_{(1)}\psi\otimes\bar e+ e\otimes \left(\hat\omega_{(1)}+ \hat\omega_{(2)}\right)\psi\otimes\bar e \end{equation} Identifying $e\otimes\psi\otimes\bar e\simeq\psi$ amounts to identifying the operator $D'$ with $D_\omega$. \end{proof} If the twisted-first condition holds, then $\omega_{(2)}$ vanishes and one finds back \eqref{eq:TwistedDiracFlucAlternative}. Therefore, as in the non-twisted case, the term $\omega_{(2)}$ breaks the linearity of the map $\omega\mapsto D + \omega_{(1)} +\hat{\omega}_{(1)}$ between twisted $1$-forms and fluctuations. To 7truecm, one has the concluding \begin{prop} The triple $(\A, \HH, D_\omega)$ together with the automorphism $\sigma$ and the operators $\Gamma$, $J$ has all the properties of a real twisted spectral triple, but the twisted first order condition. \end{prop} \begin{proof} The proof of Prop.\ref{sec:morita-equiv-real} does not refer to the first order condition, except to show that the fluctuated triple satisfies the first order condition. So by applying this proposition to self Morita equivalence, one obtains that $(\A, \HH, D_\omega),\sigma$ together with $\Gamma$ is a graded twisted spectral triple. As in the proof of proposition \ref{sec:morita-equiv-real}, one checks that $J^2=\epsilon$, $J\Gamma=\epsilon''\Gamma J$. The only point is to check that $ JD_\omega=\epsilon' D_\omega J$. Actually Prop. \ref{sec:morita-equiv-real} guarantees that $(D+\omega_{(1)}+ \hat\omega_{(1)}) J = \epsilon' (D+\omega_{(1)}+ \hat\omega_{(1)}) J$, so one just needs to show that \begin{equation} \omega_{(2)}J = \epsilon' \omega_{(2)}J. \label{eq:219} \end{equation} Omitting the summation symbol, one has \begin{equation*} \begin{split} J\omega_{(2)}J^{-1}&=J\hat{a}_i[\omega_{(1)},\hat{b}_i]_{\sigma^{\circ}}J^{-1}=a_iJ\left(\omega_{(1)}\hat{b}_i-\sigma^{\circ}(\hat{b}_i)\omega_{(1)}\right)J^{-1}=\\ &=\varepsilon'a_i\left(\hat{\omega}_{(1)}b_i-\sigma(b_i)\hat{\omega}_{(1)}\right)=\varepsilon'a_i[\hat{\omega}_{(1)},b_i]_{\sigma}, \end{split} \end{equation*} where we used $J^{-1}=\epsilon J$, then ${\omega}_{(1)}=\varepsilon'J\hat\omega_{(1)}J^{-1}$ together with $J^{2}=J^{-2}=\varepsilon\mathbb{I}$, as well as \begin{equation} \sigma^\circ(\hat b_i)=\sigma^\circ\left(\left(b_i^*\right)^\circ\right)=\left(\sigma^{-1}(b_i^*)\right)^\circ=(\sigma(b_i)^*)^\circ=J\sigma(b_i)J^{-1}. \label{eq:228} \end{equation} The result follows noticing that, \begin{align*} \omega_{(2)}&=\sum_{i,j}\ \hat{a}_i[a_j[D,b_j]_{\sigma},\hat{b}_i]_{\sigma^{\circ}} =\sum_{i,j}a_j\hat{a_i}[[D,b_j]_{\sigma},\hat{b}_i]_{\sigma^{\circ}}=\sum_{i,j}a_j\hat{a}_i[[D,\hat{b}_i]_{\sigma^{\circ}},b_j]_{\sigma}=\sum_{j}a_j[\hat{\omega}_{(1)},b_j]_{\sigma}, \end{align*} where the second equality follows from the order-zero condition, and the third from \begin{equation} \label{eq:229} [[D,b]_\sigma,\hat a]_{\sigma^\circ} = [[D, \hat a]_{\sigma^\circ},b]_\sigma \end{equation} that is checked by direct computation. \end{proof} \begin{remark} In the non-twisted case, a selfadjoint element of $\Omega$ is the image of a selfadjoint universal $1$-form (i.e. a selfadjoint element of the differential algebra $\Omega(\A)$ \cite{Landi1997}). In the twisted case this is no longer the case, for the representation \begin{equation} \begin{split} &\pi:\Omega(\A)\longrightarrow\mathcal{B}(\mathcal{H})\\ \pi(a_0\delta a_1\dots\delta a_n)&\longmapsto\pi(a_0)[D,\pi(a_1)]_{\sigma}\dots[D,\pi(a_n)]_{\sigma} \end{split} \end{equation} is not in general a $*$-homomorphism. \end{remark} \section{Gauge transformation} \label{sec:gauge-transformation} We investigate in \S\ref{sec:non-linear-gauge} how a twisted spectral triple that does not meet the twisted first-order condition behaves under a gauge transformation, still following the strategy of \cite{chamconnessuijlekom:innerfluc}. The loss of selfadjointness is discussed in \S \ref{sec:self-adjointness}. We begin in \S \ref{sec:twist-gauge-transf} by recalling the definition of gauge transformations for twisted spectral triples \cite{landimart:twistgauge}, which is a straightforward adaptation of the non-twisted case \cite{Connes:1996fu}. \subsection{Twisted gauge transformation} \label{sec:twist-gauge-transf} A gauge transformation on a module $\cal E$ equipped with a connection $\nabla$ is a change of connection, obtained by acting on $\nabla$ with a unitary endomorphism $u$ of $\cal E$ (see e.g. \cite{Landi1997} for more details), \begin{equation} \label{eq:29} \nabla\longrightarrow \nabla^u:= u\nabla u^*. \end{equation} For self-Morita equivalence, ${\cal E}= \A$ and the set of unitary endomorphisms of $\cal E$ is the group \begin{equation} \mathcal{U}(\A)=\left\{u\in \A,\, \pi(u)\pi(u^*)=\pi(u^*)\pi(u)=\I\right\} \label{eq:25} \end{equation} of unitary elements of $\A$. Given the real twisted spectral triple $(\A, \HH, D'), \sigma$ of Prop. \ref{sec:twist-fluct-with-1} obtained by inner fluctuations, with $D'$ given in \eqref{eq:TwistedDiracFlucAlternative} and $\Gamma, J$ the grading and real structure of the initial triple, then a gauge transformation amounts to substituting $\omega_{(1)}$ and and $\hat{\omega}_{(1)}$ in the twist-fluctuated operator $D'$ with (details are given for instance in \cite[\S A.2]{landimart:twistgauge}) \begin{align} \label{eq:32} & \omega^{u}_{(1)} := \sigma(u)[D, u^*]_\sigma + \sigma(u)\, \omega_{(1)} u^*,\\ &\hat{\omega}_{(1)}^u := \sigma^\circ(\hat u)[D, \hat u^*]_{\sigma^\circ} + \sigma^\circ(\hat u)\, \hat\omega_{(1)}\hat u^*=\epsilon' J\omega^{u}_{(1)}J^{-1}. \label{eq:44} \end{align} This substitution turns out to be equivalent to the conjugate action (twisted on the left) on $D'$~of \begin{equation} \label{eq:Ad} \mathrm{Ad}(u)\psi:=u\psi u^{*} =u\hat u \psi\qquad \forall \psi\in\HH. \end{equation} Namely one has \cite[Prop. 4.5]{landimart:twistgauge} \begin{equation} \label{eq:27} \mathrm{Ad}(\sigma(u))\,D_{\omega}\,\mathrm{Ad}(u)^{*}=D + \omega^u_{(1)} + \hat\omega^{u}_{(1)}. \end{equation} The twisted first-order condition is required for this result. If it does not hold, then there is no reason for \eqref{eq:27} to be true. Actually this is not a surprise nor a problem since, as discussed in the previous section, this is not the operator $D'$ that is relevant, but the operator $D_\omega$ in \eqref{eq:222}. By relaxing the twisted first-order condition, we show below that the twisted action of $\mathrm{Ad}(u)$ on $D_\omega$ induces a transformation of the non-linear term $\omega_{(2)}$ to \begin{equation} \label{eq:TwistedNonLinearGauge} \sigma^{\circ}(\hat{u})\omega_{(2)}\widehat{u^{*}}+\sigma^{\circ}(\hat{u})[\sigma(u)[D,u^{*}]_{\sigma},\widehat{u^{*}}]_{\sigma^{\circ}}. \end{equation} This is a twisted version of the non-linear gauge transformation of \cite{chamconnessuijlekom:innerfluc} (formula for $A_{(2)}$ before lemma 3), and gives a non-linear correction to the first-order, linear, fluctuation of $\omega_{(1)}+\hat{\omega}_{(1)}$. \subsection{Non linear gauge transformation} \label{sec:non-linear-gauge} The inner twisted fluctuation of proposition \ref{sec:morita-equiv-real} is a map \begin{equation} \label{eq:54} \omega \to D_\omega \end{equation} that associates to any $\omega=\sum_{j=1}^{n}a_j[D,b_j]_{\sigma}$ the operator $D_\omega$ defined by \eqref{eq:222}, with $\omega_{(1)}$, $\hat\omega_{(1)}$ and $\omega_{(2)}$ the functions of the components $a_j, b_j$ of $\omega$ given in \eqref{eq:13} and \eqref{eq:224}. A gauge transformation thus amounts to substituting $D_\omega$ with $D_{\omega^u}$ for $\omega^u$ in \eqref{eq:32}. We show in proposition \ref{prop:TwistedGaugeTransformedNoFirstOrder} below that this is equivalent to the twisted adjoint action of $\text{Ad}(u)$ on $D_\omega$. To prove that, we need the preliminary \begin{lem} \label{lem:TwistedDiracGaugeLaw} Let $\left(\A,\mathcal{H},D\right),{\sigma},J$ be a real, twisted, spectral triple that does not necessarily fulfils the first-order condition. Then, for any $u\in\mathcal{U}(\A)$, \begin{align} \mathrm{Ad}(\sigma(u))\, D\, \mathrm{Ad}(u)^{*}=&D+\sigma(u)[D,u^{*}]_{\sigma}+\sigma^{\circ}(\hat{u})[D,\widehat{u^{*}}]_{\sigma^{\circ}} \\&+\sigma^{\circ}(\hat{u})[\sigma(u)[D,u^{*}]_{\sigma},\widehat{u^{*}}]_{\sigma^{\circ}}. \end{align} \end{lem} \begin{proof} Remembering (\ref{eq:36},\ref{eq:34}) the right action \eqref{eq:19} of $\sigma(u)^*$ is the left multiplication by \begin{equation} \widehat{\sigma(u)}=J\sigma(u)J^{-1}=\sigma^\circ((u^*)^\circ)= \sigma^\circ(\hat u) \label{eq:22} \end{equation} so that the adjoint action \eqref{eq:Ad} of $\sigma(u)$ writes \begin{equation} \label{eq:twist_Ad} \mathrm{Ad}(\sigma(u))=\sigma(u)\sigma^{\circ}(\hat{u})=\sigma^{\circ}(\hat{u})\sigma(u) \end{equation} (the second equality comes from the order-zero condition). As well \begin{equation} \text{Ad}(u)^* = (u\hat u)^*= {\hat u}^* u^* = u^*\widehat{u^*},\label{eq:53} \end{equation} where we use the commutation of the involution with the conjugation by $J$, \begin{equation} {\hat u}^*=\widehat{u^*}.\label{eq:20} \end{equation} Therefore \begin{align} \begin{split} \mathrm{Ad}(\sigma(u)) D \mathrm{Ad}(u)^{*}\!\!&=\sigma^{\circ}(\hat{u})\sigma(u)\,D\, u^{*}\widehat{u^{*}} =\sigma^{\circ}(\hat{u})\sigma(u)\left(\sigma(u^{*})D+[D,u^{*}]_{\sigma}\right)\widehat{u^{*}},\\[4pt] &=\sigma^{\circ}(\hat{u})\left(D\widehat{u^{*}}+\sigma(u)[D,u^{*}]_{\sigma}\widehat{u^{*}}\right) =\sigma^{\circ}(\hat{u})\left(\sigma^\circ(\widehat{u^{*}})D+[D,\widehat{u^{*}}]_{\sigma^{\circ}}\right),\\[4pt] &+\sigma^{\circ}(\hat{u})\left(\sigma^{\circ}(\widehat{u^{*}})\sigma(u)[D,u^{*}]_{\sigma}+[\sigma(u)[D,u^{*}]_{\sigma},\widehat{u^{*}}]_{\sigma^{\circ}}\right),\\ \nonumber &=D\!+\!\sigma^{\circ}(\hat{u})[D,\widehat{u^{*}}]_{\sigma^{\circ}}+\sigma(u)[D,u^{*}]_{\sigma}+\sigma^{\circ}(\hat{u})[\sigma(u)[D,u^{*}]_{\sigma},\widehat{u^{*}}]_{\sigma^{\circ}}\!. \end{split} \end{align} \vspace{-.75truecm} \end{proof} We now come to the main result of this section, which shows that even if the condition of order one is not met, a twisted gauge transformation is equivalent to the adjoint action of $\text{Ad}(u)$ (twisted on the right) on the Dirac operator. \begin{prop} \label{prop:TwistedGaugeTransformedNoFirstOrder} Let $(\A,\mathcal{H},D),\sigma,J$ be a real twisted spectral triple that does not necessarily satisfy the twisted first-order condition, and $\omega=\sum_{j=1}^{n}a_j[D,b_j]_{\sigma}$ a twisted $1$-form. Then for any unitary $u$ in $\mathcal{U}(A)$ one has \begin{equation*} \mathrm{Ad}(\sigma(u))D_{\omega}\mathrm{Ad}(u)^{*}=D_{\omega^{u}} \end{equation*} for \begin{equation} \omega^{u}=\sigma(u)\omega u^{*}+\sigma(u)[D,u^*]_\sigma, \label{eq:47} \end{equation} \end{prop} \begin{proof} We adapt the method of \cite{chamconnessuijlekom:innerfluc} to compute \begin{equation} D_{\omega^u} = \omega_{(1)}^u + \hat\omega_{(1)}^u + \omega_{(2)}^u \label{eq:59} \end{equation} as the image of $\omega^u$ under the map \eqref{eq:54}. The terms $\omega_{(1)}^u$ and $\hat\omega_{(1)}^u$ are given by \eqref{eq:32}, \eqref{eq:44}. To compute $ \omega_{(2)}^u$, it convenient to rewrite $\omega_{(1)}^u$ as \begin{equation*} \begin{split} \omega_{(1)}^u&=\sigma(u)\left(\sum_{j=1}^{n}a_{j}[D,b_{j}]_{\sigma}\right)u^{*}+\sigma(u)[D,u^{*}]_{\sigma},\\ &=\sigma(u)\sum_{j=1}^{n}a_{j}\left(\left[D,b_{j}u^{*}\right]_{\sigma}-\sigma(b_{j})\left[D,u^{*}\right]_{\sigma}\right)+\sigma(u)[D,u^{*}]_{\sigma}=\\ &=\sigma(u)\left(\I-\sum_{j=1}^{n}a_{j}\sigma(b_{j})\right)[D,u^{*}]_{\sigma}+\sum_{j=1}^{n}\sigma(u)a_{j}[D,b_{j}u^{*}]_{\sigma}=\sum_{j=0}^{n}a_{j}'[D,b_{j}']_{\sigma} \end{split} \end{equation*} where we defined \begin{align} \label{eq:49} &a_{0}'=\sigma(u)\left(\I-\sum_{j=1}^{n}a_{j}\sigma(b_{j})\right) & b_{0}'=u^{*},\\ \label{eq:50} &a_{j}'=\sigma(u)a_{j} & b_{j}'=b_{j}u^{*} & \quad\forall j\geq 1. \end{align} Notice that the same relation holds for any operator $T\in\mathcal{L}(\mathcal{H})$, namely \begin{equation} \sum_{j=0}^{n}a_{j}'[T,b_{j}']_{\sigma}=\sigma(u)\left(\sum_{j=1}^{n}a_{j}[T,b_{j}]_{\sigma}\right)u^{*}+\sigma(u)[T,u^{*}]_{\sigma}. \end{equation} Thus $\omega_{(2)}^u$ is given by \eqref{eq:224} with $a'_j, b'_j$ instead of $a_j, b_j$: \begin{align} \label{eq:51} \omega_{(2)}^u&=\sum_{j=0}^{n}a'_{j}[\hat{\omega}_{(1)}^u,b'_{j}]_{\sigma} =\sigma(u)\left(\sum_{j=1}^{n}a_{j}[\hat{\omega}_{(1)}^u,b_{j}]_{\sigma}\right)u^{*}+\sigma(u)[\hat{\omega}_{(1)}^u,u^{*}]_{\sigma},\\ \label{eq:52} &=\sum_{j=1}^{n}\sigma(u)a_{j}[\sigma^{\circ}(\hat{u})\,\hat{\omega}_{(1)}\widehat{u^{*}},b_{j}]_{\sigma}u^{*}+\sum_{j=1}^{n}\sigma(u)a_{j}[\sigma^{\circ}(\hat{u})[D,\widehat{u^{*}}]_{\sigma^{\circ}},b_{j}]_{\sigma}u^{*}+\\ &+\sigma(u)[\sigma^{\circ}(\hat{u})\,\hat{\omega}_{(1)}\widehat{u^{*}},u^{*}]_{\sigma}+\sigma(u)[\sigma^{\circ}(\hat{u})[D,\widehat{u^{*}}]_{\sigma^{\circ}},u^{*}]_{\sigma} \end{align} where \eqref{eq:51} comes from \eqref{eq:49},~\eqref{eq:50}, while \eqref{eq:52} is obtained substituting $\hat{\omega}_{(1)}^u$ with its explicit form \eqref{eq:44}, using also \eqref{eq:20}. Let us compute these four terms separately, dropping the summation index. \begin{itemize} \item The first one is \begin{align} & &\sigma(u)\,a\,[\sigma^{\circ}(\hat{u})\,\hat{\omega}_{(1)}\,\widehat{u^{*}},\,b]_{\sigma}u^{*}&=\sigma(u)\, a\,\sigma^{\circ}(\hat{u})[\hat{\omega}_{(1)},b]_{\sigma}\widehat{u^{*}}u^{*}\\ \label{eq:55} & &&=\sigma(u)\sigma^{\circ}(\hat{u})a[\hat{\omega}_{(1)},b]_{\sigma}\widehat{u^{*}}u^{*} =\mathrm{Ad}(\sigma(u))\omega_{(2)}\mathrm{Ad}(u)^{*} \end{align} where the first equalities are obtained by explicit computation, using that $b$ commutes with $\widehat{u^{*}}$ and $\sigma^\circ(\hat u)$ with $\sigma(b)$ (then with $a$) by the order zero condition. The last one follows from the definition \eqref{eq:224} of $\omega_{(2)}$ and the adjoint actions~(\ref{eq:twist_Ad},\ref{eq:53}). \item The second term is \begin{align} && \sigma(u)a[\sigma^{\circ}(\hat{u})[D,\widehat{u^{*}}]_{\sigma^{\circ}},b]_{\sigma}u^{*}&=\sigma(u)a[\sigma^{\circ}(\hat{u})D\widehat{u^{*}}-D,b]_{\sigma}u^{*},\\ & &=&\sigma(u)\sigma^{\circ}(\hat{u})a[D,b]_{\sigma}\widehat{u^{*}}u^{*}-\sigma(u)a[D,b]_{\sigma}u^{*}\\ \label{eq:56} & &=&\mathrm{Ad}(\sigma(u))\,\omega_{(1)}\,\mathrm{Ad}(u)^{*}-\sigma(u)\,\omega_{(1)}u^{*}. \end{align} \item The third and fourth terms give \begin{align} & & \sigma(u)[\sigma^{\circ}(\hat{u})\,\hat{\omega}_{(1)}\widehat{u^{*}},u^{*}]_{\sigma}&=\sigma(u)\sigma^{\circ}(\hat{u})\,\hat{\omega}_{(1)}\widehat{u^{*}}u^{*}-\sigma^{\circ}(\hat{u})\,\hat{\omega}_{(1)}\widehat{u^{*}},\\ \label{eq:57} & &=&\mathrm{Ad}(\sigma(u))\,\hat{\omega}_{(1)}\,\mathrm{Ad}(u)^{*}-\sigma^{\circ}(\hat{u})\,\hat{\omega}_{(1)}\widehat{u^{*}},\\ \label{eq:230} & & \sigma(u)[\sigma^{\circ}(\hat{u})[D,\widehat{u^{*}}]_{\sigma^{\circ}},u^{*}]_{\sigma}=&\sigma(u)\sigma^{\circ}(\hat{u})[[D,\widehat{u^{*}}]_{\sigma^{\circ}},u^{*}]_{\sigma},\\ \label{eq:58} & & =&\sigma^{\circ}(\hat{u})\sigma(u)[[D,u^{*}]_{\sigma},\widehat{u^{*}}]_{\sigma^{\circ}}, \end{align} where \eqref{eq:230} is proven using $[ab,c]_\sigma=a[b,c]_\sigma+ [a,\sigma(c)]b$, and \eqref{eq:58} using \eqref{eq:229}. \end{itemize} Collecting \eqref{eq:55}~\eqref{eq:56}~\eqref{eq:57} and \eqref{eq:58} one obtains \begin{align*} \omega_{(2)}^u=\mathrm{Ad}(\sigma(u))\left(\omega_{(1)}+\hat{\omega}_{(1)}+\omega_{(2)}\right)\mathrm{Ad}(u)^{*} -\sigma(u)\omega_{(1)}u^{*}-\sigma^{\circ}(\hat{u})\hat{\omega}_{(1)}\widehat{u^{*}}+\sigma^{\circ}(\hat{u})[\sigma(u)[D,u^{*}]_{\sigma},\widehat{u^{*}}]_{\sigma^{\circ}} \end{align*} Adding $\omega_{(1)}^u$ and $\hat\omega_{(1)}^u$ in \eqref{eq:32} and \eqref{eq:44}, one obtains \begin{align} \nonumber D_{\omega^u}\!=\! D\!+ \omega_{(1)}^u+\hat{\omega}_{(1)}^u+\omega_{(2)}^u&=D +\mathrm{Ad}(\sigma(u))\left(\omega_{(1)}+\hat{\omega}_{(1)}+\omega_{(2)}\right)\mathrm{Ad}(u)^{*}\\ \nonumber &\qquad+\sigma(u)[D,u^{*}]_{\sigma}+\sigma^{\circ}(\hat{u})[D,\widehat{u^{*}}]_{\sigma^{\circ}}+\sigma^{\circ}(\hat{u})[\sigma(u)[D,u^{*}]_{\sigma},\widehat{u^{*}}]_{\sigma^{\circ}}. \end{align} The result then follows by lemma \ref{lem:TwistedDiracGaugeLaw}. \end{proof} \begin{remark} A gauge transformation for the twisted covariant Dirac operator $D_\omega$ is implemented by the twisted conjugate action of $\text{Ad}(u)$. This is the same law \ref{eq:27} as when the twisted first-order condition holds. As a consequence, the gauge invariance of the fermionic action defined in \cite{devfarnlizmart:lorentziantwisted,devfilmartsingh:actionstwisted} still holds, even if the twisted first-order condition is violated. \end{remark} \subsection{Self-Adjointness} \label{sec:self-adjointness} A twisted gauge transformation does not preserve selfadjointness: starting with a selfadjoint operator $D_\omega$, one has that $\mathrm{Ad}(\sigma(u))\,D_\omega\,\mathrm{Ad}(u)^{*}$ is selfadjoint if and only if \cite[Prop.5.2]{landimart:twistgauge} \begin{equation} \label{eq:231} \left[D_\omega, \frak u \,\widehat{\frak u}\right]_\sigma=0 \quad \text{ with }\quad\frak u := \sigma(u)^*u\;\text{ and }\; \sigma(\frak u \widehat{\frak u}) := \sigma(\frak u)\widehat{\sigma(\frak u)}. \end{equation} This relation is trivially satisfied if the unitary $u$ is twist-invariant, that is $\sigma(u)=u$. But this is not the only solution, as shown below. \begin{prop} \label{prop:TwistedSelfAd} Let $\left(\A,\mathcal{H},D\right),\sigma,J$ be a twisted real spectral triple not necessarily fulfilling the twisted first-order condition, and $D_\omega$ a selfadjoint twisted inner-fluctuation~\eqref{eq:22}. Then the gauge-transformed Dirac operator $D_{\omega^{u}}$ is self-adjoint if and only if \begin{equation} \label{eq:TwistedSelfAdNoFirstOrder} \gamma(\frak u)+\epsilon'J\gamma(\frak u)J^{-1}+[[D_\omega,\frak u]_{\sigma},\widehat{\frak u}]_{\sigma^{\circ}}=0 \end{equation} where \begin{equation} \label{eq:232} \gamma(\frak u) := \sigma^\circ(\hat{\frak u})[D_\omega,{\frak u}]_{\sigma}. \end{equation} \end{prop} \begin{proof} By \eqref{eq:231} and \eqref{eq:22}, the gauge-transformed Dirac operator is self-adjoint iff \begin{eqnarray} [D_\omega,\frak u \widehat{\frak u}]_{\sigma}=[D_\omega,\frak u]_{\sigma}\hat{\frak u} + \sigma(\frak u)[D_\omega,\hat{\frak u}]_{\sigma^\circ }=0. \end{eqnarray} The result follows from \begin{align} [D_\omega,\frak u]_{\sigma}\hat{\frak u}&=[[D_\omega,\frak u]_\sigma,\widehat{\frak u}]_{\sigma^{\circ}}+\sigma^\circ(\hat{\frak u})[D_\omega,\frak u]_{\sigma},\\ \nonumber \sigma(\frak u)[D_\omega, \hat{\frak u}]_{\sigma^\circ}&=\epsilon'J\left(\sigma^\circ(\hat{\frak u})[D_\omega,\frak u]_{\sigma}\right)J^{-1}. \end{align} \vspace{-.5truecm}\end{proof} In case the twisted first-order condition holds, one finds back the result of \cite{landimart:twistgauge} noticing that \begin{equation} \sigma^\circ(\hat{\frak u})=\sigma^\circ(({\frak u}^*)^\circ )=\sigma^{-1}({\frak u}^*)^\circ =\sigma^{-1}(u^*\sigma(u))^\circ=(\sigma(u)^*u)^\circ= Ju^*\sigma(u)J^{-1}, \label{eq:233} \end{equation} so that \eqref{eq:22} yields \begin{align} \sigma^\circ(\hat{\frak u})[D_\omega,{\frak u}]_{\sigma}&=Ju^{*}\sigma(u)J^{-1}[D,\frak u]_{\sigma} =u^\circ \sigma^\circ(\hat u) [D,\frak u]_{\sigma}\\ &=u^\circ[D,\frak u]_{\sigma}\widehat{u}-u^\circ[[D,\frak u]_{\sigma},\widehat{u}]_{\sigma^{\circ}}. \end{align} By the condition of order one, the right term in the equation above vanishes, as well as the last term in the r.h.s. of \eqref{eq:TwistedSelfAdNoFirstOrder}. One is left with \begin{equation} \gamma(u)+\epsilon'J\gamma(u) J^{-1}=0 \quad\text{ with }\quad \gamma(u)= u^\circ[D, \sigma(u)^*u]_{\sigma}\widehat{u} \end{equation} which is precisely Prop. 5.2 of \cite{landimart:twistgauge}. \section{Twisted semi-group of inner perturbations} \label{sec:self-adjointness-1} In this section we adapt to the twisted case the semi-group of inner perturbations of \cite{chamconnessuijlekom:innerfluc}. The normalisation condition is twisted in \S\ref{sec:twist-norm-cond} and the structure of semi-group for twisted $1$-forms is worked out in \ref{sec:from-semi-group}. Its interpretation in terms of twisted inner fluctuation is the object of \S\ref{sec:twist-fluct-acti-2}. There are two notable differences with the non-twisted case: the semi-group structure depends on the twisting automorphism, and we do not restrict its definition to selfadjoint elements, for reasons explained below. In all this section, we consider a real twisted spectral triple \begin{equation} (\A, \HH, D), \sigma, J\label{eq:79} \end{equation} that does not necessarily satisfy the twisted first-order condition. The unit of $\A$ is $e$. \subsection{Twisted normalised condition} \label{sec:twist-norm-cond} Let $\A^{e}:=\A\otimes_{\mathbb{C}}\A^{\circ}$ denote the \textit{enveloping algebra} of $\A$ \cite{Landi1997}, with product \begin{equation} \label{eq:product_env} \left(a_1\otimes b^{\circ}_1\right)\cdot\left(a_2\otimes b^{\circ}_2\right):=a_1a_2\otimes b^{\circ}_1b^{\circ}_2. \end{equation} The normalisation condition imposed in \cite{chamconnessuijlekom:innerfluc} easily generalises to the twisted case. \begin{defn} \label{defn:TwistedNormalised} A combination $\sum_{j}a_{j}\otimes b^{\circ}_{j}\in \A^e$ is \emph{twisted normalised} iff \begin{equation*} \sum_{j}a_{j}\sigma(b_{j})=e. \end{equation*} \end{defn} In \cite{chamconnessuijlekom:innerfluc}, the semi-group of inner fluctuations is defined as the set of self-adjoint normalised elements of $\A^e$. The definition we propose in the twisted case is similar, except that we do not restrict to selfadjoint elements. Indeed, as explained in \S \ref{sec:self-adjointness}, the twisted gauge transformations do not preserve selfadjointness of $1$-forms, so there is no reason to consider only selfadjoint normalised elements of $\A^e$. \begin{prop} The set of twisted normalised elements of $\A^e$, \begin{equation} \label{eq:103} \mathrm{Pert}(\A,\sigma):=\bigg\{\sum_ja_j\otimes b^{\circ}_j\in \A^e\text{ such that } \sum_ja_j\sigma(b_j)=e\bigg\}, \end{equation} is a semi-group for the product of the enveloping algebra. \end{prop} \begin{proof} Let $\sum_ja_j\otimes b^{\circ}_j$ and $\sum_ia'_i\otimes b'^{\circ}_i$ be normalised elements of $\A^e$. Their product $\sum_{j,i} a_ja'_i \otimes b_j^\circ {b'_i}^\circ = \sum_{j,i} a_ja'_i \otimes (b'_i b_j)^\circ$ is normalised since \begin{equation*} \sum_{j,i}a_ja'_i\sigma(b'_i b_j)=\sum_ja_j\left(\sum_ia'_i\sigma(b'_i)\right)\sigma(b_j)=\sum_ja_j\sigma(b_j)=e. \end{equation*} Hence $ \mathrm{Pert}(\A,\sigma)$ is stable by the product of the enveloping algebra. \end{proof} \begin{remark} Since we assume the algebra are unital, $\mathrm{Pert}(\A,\sigma)$ is actually a monoid, with unit $e\otimes e$. \end{remark} We show below that the action of this semi-group on the Dirac operator $D$ coincides with the twisted fluctuations, and the multiplication by unitaries gives back the gauge transformation, as in the non-twisted case. This justifies to call $\mathrm{Pert}(\A,\sigma)$ the \emph{semi-group of twisted inner fluctuations} of the twisted spectral triple \eqref{eq:79}. To show this, we begin with working out the relation between the semi-group and twisted $1$-forms. \subsection{From the semi-group to twisted one-forms} \label{sec:from-semi-group} One defines a map from the semi-group to the twisted one-forms, \begin{eqnarray} \eta:\mathrm{Pert}(\A,\sigma)\longrightarrow\Omega_{D}^{1}(\A,\sigma), & &\eta\left(\sum_ja_j\otimes b^{\circ}_j\right):=\sum_ja_j[D,b_j]_{\sigma}, \end{eqnarray} which has similar properties as in the non-twisted case (the following lemma extends to the twisted case lemma $4$ of \cite{chamconnessuijlekom:innerfluc}). \begin{lem} \label{lem:TwistedOneFormsMap} i) The map $\eta$ is surjective. ii) The adjoint is given by \begin{equation} \label{eq:81} {\left(\eta\left(\sum_ja_j\otimes b^{\circ}_j\right)\right)}^*=\eta\left(\sum_j b_j^*\otimes (a_j^*)^\circ\right). \end{equation} iii) The gauge transformed (\ref{eq:32}) of $\omega=\eta\left(\sum_ja_j\otimes b_j^\circ\right)$ is \begin{equation} \omega^{u}= \eta\left(\sum_j\sigma(u)a_j\otimes (b_ju^{*})^{\circ}\right) \quad \forall u\in\mathcal{U}(\A). \label{eq:61} \end{equation} \end{lem} \begin{proof} \emph {This is a straightforward adaptation of the proof of \cite[Lemma. 4]{chamconnessuijlekom:innerfluc}.} \noindent $i)$ Any twisted 1-form is a finite sum $\sum_{j=1}^na_{j}\delta(b_j)$ with $a_j, b_j$ arbitrary elements of $\A$. The point is to write it as a sum such that $\sum_j a_j\sigma(b_j)$ is twisted normalised. This is obtained adding to the sum \begin{eqnarray} a_{0}:=e-\sum_{j=1}^{n}a_{j}\sigma(b_{j}), & b_{0}=e.\nonumber \end{eqnarray} Indeed, since $\delta(e)=0$, one has \begin{equation*} \sum_{j=1}^{n}a_{j}\delta(b_{j})=\sum_{j=1}^{n}a_{j}\delta(b_{j})+\left(e-\sum_{j=1} ^{n}a_{j}\sigma(b_{j})\right)\delta(e)=\sum_{j=0}^{n}a_{j}\delta(b_{j}) \end{equation*} where, by construction, $\sum_{j=0}^{n}a_{j}\sigma(b_{j})$ is twisted normalised. ii) The Leibniz rule (\ref{eq:TwistedLeibniz}) for $\delta(\sigma^{-1}(a_j)b_j)=\delta(\sigma^{-1}(a_j\sigma(b_j))= \delta(\sigma^{-1}(e))~=~0$ (we omitted the symbol of summation) reads \begin{equation} \label{eq:83} \sum_j a_j\delta(b_j) = -\sum_j \delta(\sigma^{-1}(a_j))b_j. \end{equation} Therefore, for $\sum_j a_j\otimes b_j^\circ$ in $\text{Pert}(\A, \sigma)$, one has (using \eqref{eq:82bis}) \begin{align} \label{eq:80} {\left(\eta\left(\sum_ja_j\otimes b^{\circ}_j\right)\right)}^*&=\left(\sum_j a_j\delta(b_j)\right)^*= -\left(\sum_j \delta(\sigma^{-1}(a_j) )b_j\right)^*\\ &=\sum_j b_j^*\delta(a_j^*)=\eta\left(\sum_j b_j^*\otimes (a_j^*)^\circ\right). \end{align} The result follows noticing that $\sum_j b_j^*\otimes (a_j^*)^\circ$ is normalised, for \begin{equation*} \sum_j b_j^*\sigma(a_j^*)=\sum_j \left(\sigma^{-1}(a_j) b_j\right)^*=\sum_j \sigma^{-1}(a_j\sigma( b_j))^*= \sigma^{-1}\left(\sum_ja_j\sigma( b_j)\right)^*=e.\label{eq:85} \end{equation*} iii) We first check that $\sum_j \sigma(u)a_j\otimes (b_ju^*)^\circ$ is twisted normalised: \begin{equation*} \sum_j \sigma(u)a_j\sigma(b_ju^*)= \sigma(u)\left(\sum_j a_j\sigma(b_j)\right)\sigma(u^*)= \sigma(u)\sigma(u^*)=\sigma(uu^*)= e. \end{equation*} Then, by the Leibniz rule and the normalisation condition one obtains \begin{align*} \eta\left(\sum_{j}\sigma(u)a_{j}\otimes(b_{j}u^{*})^{\circ}\right)&=\sum_{j}\sigma(u)a_{j}\delta(b_{j}u^{*}) =\sum_{j}\sigma(u)a_{j}\delta(b_{j})u^{*}+\sum_{j}\sigma(u)a_{j}\sigma(b_{j})\delta(u^{*}),\\ &=\sigma(u)\left(\sum_{j}a_{j}\delta(b_{j})\right)u^{*}+\sigma(u)\delta(u^{*})= \sigma(u)\omega u^{*}+\sigma(u)\delta(u^{*}), \end{align*} which is precisely the gauge transform (\ref{eq:32}) of $\omega$. \end{proof} The group ${\mathcal U}(\A)$ of unitaries of $\A$ maps to $\mathrm{Pert}(\A,\sigma)$ via the semi-group homomorphism \begin{equation} \label{eq:unitary_in_pert} u\longmapsto p(u):=\sigma(u)\otimes (u^*)^\circ. \end{equation} The gauge transformed \eqref{eq:61} corresponds to the product by $p(u)$ in the semi-group: \begin{equation} \omega^u =\eta\left(p(u)\omega\right). \label{eq:93} \end{equation} \medskip A similar construction holds for the opposite algebra. The subset \begin{equation} \label{eq:semi_group_hat} \mathrm{Pert}(\A^\circ,\sigma^{\circ}):=\bigg\{\sum_j a^\circ_j\otimes b_j \in\A^\circ\otimes_{\mathbb C} \A\, \text{ such that } \sum_j a_j^\circ\sigma^{\circ}(b_j^\circ)=e\bigg\} \end{equation} of the enveloping algebra of $\A^\circ$ forms a semi-group, for the product \begin{equation} \label{eq:95} \sum_{ij} a_j^\circ {a'}_i^\circ\otimes b_j {b'}_i= \sum_{ij} ({a'}_ia_j)^\circ\otimes b_j {b'}_i \end{equation} of two of its elements $\sum_j a_j^\circ\otimes b_j$ and $\sum_i {a'_i}^\circ\otimes {b'}_i$ is in $\mathrm{Pert}(\A^\circ,\sigma^{\circ})$, since \begin{equation} \label{eq:98} ({a'}_ia_j)^\circ\sigma^\circ((b_j {b'}_i)^\circ)=a_j^\circ\left({a'}_i^\circ\sigma^\circ({b'}_i)^\circ )\right)\sigma^\circ(b_j^\circ)=a_j^\circ\sigma^\circ(b_j^\circ)=1. \end{equation} Moreover, the surjective map \begin{equation} \eta^\circ:\mathrm{Pert}(\A^\circ,\sigma^{\circ})\longrightarrow\Omega_{D}^{1}(\A^\circ,\sigma^{\circ}), \end{equation} defined as \begin{equation} \label{eq:86} \eta^{\circ}\left(\sum_j a_j^\circ\otimes b_j\right):=\sum_j a_j^\circ [D, b_j^\circ]_{\sigma^{\circ}}\end{equation} satisfies similar properties as the map $\eta$ in lemma \ref{lem:TwistedOneFormsMap} (see the proof in appendix~\ref{sec:semi-group-opposite}). In particular, the unitary group $\mathcal{U}(\A)$ maps to this semi-group via \begin{equation} \label{eq:unitary_in_pert_hat} u\longmapsto p^\circ(u):=\sigma^{\circ}(\hat{u})\otimes\hat{u}^{*}; \end{equation} and the image \eqref{eq:44} of the opposite $1$-form $\hat\omega\in \mathrm{Pert}(\A^\circ,\sigma^{\circ})$ under a gauge transformation is \begin{equation} \hat\omega^u=\eta^\circ(p^\circ(u)\hat\omega). \label{eq:94} \end{equation} \subsection{Twisted fluctuations by action of the semi-group} \label{sec:twist-fluct-acti-2} The action of the semi-group of perturbations on the Dirac operator of a twisted spectral triple~\eqref{eq:79} yields the twisted fluctuation (hence justifying the name of the semi-group), similarly to what happens in the non-twisted case. This is shown below by adapting propositions 5 and 6 of \cite{chamconnessuijlekom:innerfluc}. One defines the action of $\mathrm{Pert}(\A,\sigma)$ and $\mathrm{Pert}(\A^\circ,\sigma^\circ)$ on $\mathcal{L}(\mathcal{H})$ as \begin{align} \label{eq:action_pert} &\left(A,T\right):=\sum_{j}a_jTb_j \qquad \forall \; A=\sum_{j}a_j\otimes b^{\circ}_j\in \mathrm{Pert}(\A,\sigma),\\ \label{eq:action_pertopp} &\left(A^\circ,T\right):=\sum_j a^\circ_i\, T\, b_j^\circ \qquad \forall \; A^\circ=\sum_j a^\circ_j\otimes b_j\in \mathrm{Pert}(\A^ \circ,\sigma^\circ),\; T\in\mathcal{L}(\mathcal{H}) \end{align} (omitting the representation symbol on the r.h.s.). \begin{lem} \label{sec:twist-fluct-acti-1} These actions are transitive, namely \begin{equation} \label{eq:110} \left(A',\left(A,T\right)\right)= \left(A'A, T\right),\quad \left({A'}^\circ,\left(A^\circ,T\right)\right)= \left({A'}^\circ A^\circ, T\right) \end{equation} for any $A, A'\in \mathrm{Pert}(\A,\sigma)$ and $A^\circ, {A'}^\circ \in \mathrm{Pert}(\A^\circ,\sigma^\circ)$. \end{lem} \begin{proof} For $A=\sum_j a_j^\circ\otimes b_j$, $A'=\sum_i {a'_i}^\circ\otimes b'_i$ in $\mathrm{Pert}(\A,\sigma)$, one has \begin{align} \label{eq:111} (A',(A,T))&= (A', \sum_j a_j T b_j)=\sum_{i,j} a'_ia_j T b_jb'_i=\left(\sum_{i,j} a'_ia_j \otimes (b_jb'_i)^\circ, T\right) ,\\ & =\left(\left(\sum_i a'_i\otimes {b'_i}^\circ\right)\left( \sum_j a_j\otimes b_j^\circ,T\right)\right)= (A'A, T). \end{align} The transitivity of the action of $\mathrm{Pert}(\A^\circ,\sigma^\circ)$ is shown in a similar way. \end{proof} For $T$ the Dirac operator $D$, one has \begin{align*} (A, D)&= \sum_{j}a_{j}Db_{j}=\sum_{j}a_{j}\sigma(b_{j})D+\sum_{j}a_{j}[D,b_{j}]_{\sigma}=D+\sum_{j}a_{j}[D,b_{j}]_{\sigma} =D+\eta(A),\\ (A^\circ, D)&= \sum_i a^\circ_i D b^\circ_i=\sum_i a_i^\circ \sigma^\circ(b_i^\circ)D+\sum_i a_i [D,b_i^\circ]_{\sigma^\circ}=D+\sum_{i}a_i^\circ[D,b_i]_{\sigma^\circ} =D+\eta^\circ(A^\circ). \end{align*} In other terms, the action of $A\in\mathrm{Pert}(\A,\sigma)$ on $D$ yields the twisted fluctuation \eqref{eq:42} of $D$ by $A$, with $\omega=\eta(A)$; while the action of $A^\circ\in\mathrm{Pert}(\A^\circ,\sigma^\circ)$ on $D$ yields the twisted fluctuation \eqref{eq:42bist} of $D$ by $\A^\circ$, with $\epsilon J\omega J^{-1}=\eta^\circ(A^\circ)$. The transitivity of these actions means that twisted fluctuations of twisted fluctuations are twisted fluctuations. \medskip All these results extend to the twisted fluctuations \eqref{eq:222} of real spectral triples. To take into account the real structure, one introduces \begin{align*} \mathrm{Pert}(\A\otimes_\C\A^\circ, \sigma):=&\left\{\sum_k A_k \otimes B_k \; \text{ such that }\, A_k\in \mathrm{Pert}(\A, \sigma),\; B_k\in \mathrm{Pert}(\A^\circ, \sigma^\circ) \right\}\label{eq:102} \end{align*} which is a semi group for the natural product $(A\otimes B)(A'\otimes {B'})=AA'\otimes B{B'}$. \newpage \begin{lem} \label{sec:twist-fluct-acti} For $A=\sum_j a_j\otimes b_j^\circ\in\mathrm{Pert}(\A,\sigma)$, denote $\hat A:=\sum_j\hat a_j \otimes\widehat{b_j^\circ}$ . Then the map \begin{align} \mu:\quad\mathrm{Pert}(\A,{\sigma})&\longrightarrow\mathrm{Pert}(\A\otimes_{\mathbb{C}}\A^\circ,\sigma)\\ A&\longmapsto A\otimes \hat A, \end{align} is a semi-group homomorphism where, \end{lem} \begin{proof} One first checks that $A\otimes\hat A$ is in $\mathrm{Pert}(\A\otimes_{\mathbb{C}}\A^\circ,\sigma)$, which is equivalent to show that $\hat A$ belongs to $\mathrm{Pert}(\A^\circ,\sigma^\circ)$. That $\hat A$ belongs to $\A^\circ\otimes\A$ comes from $\hat a_j= (a^*_j)^\circ\in \A^\circ$ and $\widehat{b_j^\circ}=b_j^*\in\A$. The normalisation \eqref{eq:semi_group_hat} follows from $\sigma^\circ((b_j^*)^\circ)=\left(\sigma^{-1}(b_j^*)\right)^\circ=\left(\sigma(b_j)^*\right)^\circ$: \begin{equation*} \label{eq:100} \sum_{j} (a_j^*)^\circ \,\sigma^\circ((b^*_j)^\circ)= \sum_j (a_j^*)^\circ \, \left(\sigma(b_j)^*\right)^\circ= \sum_j (\sigma(b_j)^* a_j^*)^\circ= \left(\left(\sum_j a_j\sigma(b_j)\right)^*\right)^\circ = {e^*}^\circ =e. \end{equation*} To show that $\mu$ preserves the product of semi-group, notice that with the notations of lemma \ref{sec:twist-fluct-acti-1} and omitting the summation index, one has \begin{align*} \hat A\hat{A'}=(\hat a\otimes \widehat{b^\circ}) (\hat{a'}\otimes\widehat{{b'}^\circ})&= \hat a \hat{a'}\otimes \widehat{b^\circ}\widehat{{b'}^\circ} =\widehat{a a'}\otimes \widehat{b^\circ{b'}^\circ}= \widehat{AA'}\quad \forall A, A' \in \mathrm{Pert}(\A,\sigma), \label{eq:114} \end{align*} where we used $\hat a \hat{a'}=\widehat{aa'}$ and $ \widehat{b}^\circ\widehat{{b'}^\circ}=(\hat{b})^\circ(\widehat{b'})^\circ=(\widehat{b'}\widehat{b})^\circ=(\widehat{b'b})^\circ= \widehat{(b'b)^\circ}=\widehat{b^\circ {b'}^\circ}$. Hence \begin{equation*} \mu(AA')=AA'\otimes \widehat{AA'}= (A\otimes \hat A)(A'\otimes \hat{A'})=\mu(A)\mu(A'). \label{eq:107} \end{equation*} \vspace{-.7truecm}\end{proof} \begin{remark} The semi-group defined in \cite{chamconnessuijlekom:innerfluc} is $\mathrm{Pert}(\A\otimes_\C\hat \A)$ where $\hat \A$ denotes the image of $\A$ under the conjugation by $J$. This notation is somehow more coherent with the map $\mu$ defined above. However, here we prefer to define $\mathrm{Pert}(\A\otimes_\C \A^\circ)$ for it is more coherent with the mapping to opposite twisted $1$-forms. One should be careful that the ``natural map'' between $\mathrm{Pert}(\A,\sigma)$ and $\mathrm{Pert}(\A\otimes_\C A^\circ)$ \begin{equation} \label{eq:106} A\longmapsto A\otimes A^\circ \end{equation} is not a semi-group homomorphism for $A\in \mathrm{Pert}(\A,\sigma)$ does not imply $A^\circ\in \mathrm{Pert}(\A^\circ,\sigma^\circ)$. This is because the normalisation condition defining $\mathrm{Pert}(\A^\circ,\sigma^\circ)$ is not equivalent to the one defining $\mathrm{Pert}(\A^\circ,\sigma^\circ)$ (see~\eqref{eq:89}). \end{remark} The action of $\mathrm{Pert}(\A\otimes_{\mathbb{C}}\hat{\A}, \sigma)$ on ${\cal L}(\HH)$ is defined by combining the actions \eqref{eq:action_pert} and \eqref{eq:action_pertopp} \begin{equation} \label{eq:104} \left(\sum_k A_k\otimes B^\circ_k, T \right):=\sum_k (A_k, (B_k^\circ, T)) \qquad \forall\; \sum_k A_k\otimes B^\circ_k\in \mathrm{Pert}(\A\otimes_{\mathbb{C}}\hat{\A}, \sigma). \end{equation} By the order zero condition, this action is equal to \begin{equation} \left(\sum_k A_k\otimes B^\circ_k, T \right) =\sum_k (B_k^\circ, (A_k,T)). \end{equation} \begin{prop} \label{prop:final} The action \eqref{eq:104} of $\mu(\mathrm{Pert}(A,{\sigma}))$ on the Dirac operator $D$ of a real twisted spectral triple \eqref{eq:79} yields the twisted fluctuation~(\ref{eq:222}): \begin{equation} \label{eq:115} \left(\mu(A), D\right) =D_\omega \quad \text{ for } \;\omega=\eta(A). \end{equation} Moreover, the product (\ref{eq:product_env}) in $\mathrm{Pert}(A,\sigma)$ encodes the transitivity of the fluctuations (a twisted fluctuation of a twisted fluctuation is a twisted fluctuation). \end{prop} \begin{proof} Let $A=\sum_j a_j\otimes b_j^\circ$ in $\mathrm{Pert}(\A, \sigma)$. Then \begin{equation} \mu(A)=A\otimes \hat A = \sum_{j,i} a_j\otimes b_j^\circ\otimes \hat a_i\otimes {\hat b_i}^\circ \label{eq:109} \end{equation} so that (using the twisted normalisation conditions for $A$ and $\hat A$) \begin{align*} \left(\mu(A), D\right) = &=\sum_{j,i}a_{j}\hat{a_{i}}D\hat{b_{i}}b_{j}= \sum_{j,i}a_{j}\hat{a_{i}}\left(\sigma^{\circ}(\hat{b_{i}})D+[D,\hat{b_{i}}]_{\sigma^{\circ}}\right)b_{j},\\ &=\sum_{j}a_{j}Db_{j}+\sum_{j,i}a_{j}\hat{a_{i}}[D,\hat{b_{i}}]_{\sigma^{\circ}}b_{j},\\ &=D+\sum_{j}a_{j}[D,b_{j}]_{\sigma}+\sum_{j,i}a_{j}\left(\sigma(b_{j})\hat{a_{i}}[D,\hat{b_{i}}]_{\sigma^{\circ}}+[\hat{a_{i}}[D,\hat{b_{i}}]_{\sigma^{\circ}},b_{j}]_{\sigma}\right),\\ &=D+\sum_{j}a_{j}[D,b_{j}]_{\sigma}+\sum_{i}\hat{a_{i}}[D,\hat{b_{i}}]_{\sigma^{\circ}}+\sum_{j,i}a_{j}[\hat{a_{i}}[D,\hat{b_{i}}]_{\sigma^{\circ}},b_{j}]_{\sigma},\\ &=D+\omega_{(1)}+\hat{\omega}_{(1)}+\omega_{(2)}=D_\omega, \end{align*} where the last equation follows from the formula of $\omega_{(2)}$ below \eqref{eq:228} For the second statement, we need to show that the action \eqref{eq:104} is transitive. For $M=A\otimes B^\circ$, $M'=A'\otimes {B'}^\circ$ in $\mathrm{Pert}(\A\otimes_{\mathbb{C}}\hat{\A}, \sigma)$, one has \begin{align} \label{eq:112} \left(M,(M',T)\right)&= \left(M, (A',({B'}^\circ,T))\right)=\left(B^\circ, \left(A, (A',({B'}^\circ,T))\right)\right),\\ &= \left(B^\circ, \left(AA', ({B'}^\circ,T)\right)\right)=\left(B^\circ, \left({B'}^\circ, (AA',T)\right)\right),\\ &= \left(B^\circ {B'}^\circ, (AA',T)\right)=\left(AA', (B^\circ {B'}^\circ,T)\right),\\ &=\left(AA'\otimes B^\circ {B'}^\circ,T\right) = \left((A\otimes B^\circ)(A'\otimes B'^\circ),T\right)=(MM',T). \end{align} Together with lemma \ref{sec:twist-fluct-acti} this yields \begin{align*} \left(\mu(A'),(\mu(A),D)\right)=\left(\mu(A')\mu(A),D\right) = \left(\mu(A'A),D\right). \end{align*} \vspace{-.75truecm} \end{proof} \smallskip\noindent This proposition \ref{prop:final} is a straightforward generalization to the twisted case of proposition 5 of \cite{chamconnessuijlekom:innerfluc}. This shows that in the twisted case as well, the transition from ordinary to real spectral triples is encoded by the homomorphism $\mu$. \medskip The group of unitary ${\mathcal U}(\A)$ maps to $\mathrm{Pert}(\A\otimes_{\mathbb{C}}\hat{\A}, \sigma)$ composing the inclusion (\ref{eq:unitary_in_pert}) of ${\mathcal U}(\A)$ in $\mathrm{Pert}(A,{\sigma}))$ with the homomorphism $\mu$, that is \begin{equation*} \mu(p(u))= \mu\left(\sigma(u)\otimes u^{*\circ}\right)= \sigma(u) \otimes \, u^{*\circ} \otimes \sigma^{\circ}(\hat{u})\otimes u \end{equation*} where we used $\widehat{\sigma(u)}=(\sigma(u)^{*})^{\circ}=(\sigma^{-1}(u^{*}))^{\circ}=\sigma^{\circ}(u^{*\circ})=\sigma^{\circ}(\hat{u})$ and $\widehat{u^{*\circ}}=\widehat{\hat u}=u$. Its action on action ${\mathcal L}(\HH)$ is - remembering \eqref{eq:twist_Ad} and \eqref{eq:53} - \begin{equation} (\mu(p(u)),T)=\sigma(u)\sigma^{\circ}(\hat{u})\, T\, u^\circ u^{*}=\mathrm{Ad}(\sigma(u))\, T \mathrm{Ad}(u)^{*}\quad \forall T\in{\mathcal L}(\HH). \end{equation} Thus the gauge transformation of Prop.\ref{prop:TwistedGaugeTransformedNoFirstOrder} is given by the action of $\mu(p(u))$ on the twisted fluctuate Dirac operator $D_\omega$. The latter being obtained by the action of $\mu(A)$ for $\omega=\eta(A)$, one has \begin{equation*} D\xrightarrow{\mu(A)}D_{\omega}\xrightarrow{\mu(p(u))}D_{\omega^{u}}. \end{equation*} \section{Example: the twisted $U(1)\times U(2)$ model} \label{sec:twisted-u1times-u2} To illustrate ours results, we work out in this finale part the twisting of the $U(1)\times U(2)$ model presented in \cite{chamconnessuijlekom:innerfluc}, applying the minimal twist introduced in~\cite{landimart:twisting}. Just to mention it, the minimal twist of the canonical triple associated to a closed spin$^c$ Riemannian manifold satisfies the twisted first-order condition, so it is a trivial example in the present context. The model starts with the general classification of irreducible finite geometries of $KO$-dimen\-sion~$6$ done in \cite{chamconnes:why}. In the simplest interesting case, the algebra and Hilbert space are \begin{eqnarray} \label{eq:algebra_no_grading_hilbert_space} \A=M_2(\mathbb{C})\oplus M_2(\mathbb{C}), & & \HH=(\mathbb{C}^2\otimes\overline{\mathbb{C}}^2)\oplus(\mathbb{C}^2\otimes\overline{\mathbb{C}}^2). \end{eqnarray} The elements of $\HH$ are labelled by two multi-indices $A=\alpha I$, $A'=\alpha' I'$ where $\alpha=1,2$ and $I=1,2$ label the first summand, while $\alpha'=1,2$, $I'=1,2$ label the second one. Any $\psi\in\HH$ thus writes \begin{equation} \label{eq:48} \psi = \begin{pmatrix} \psi_A\\\psi_{A'} \end{pmatrix} \end{equation} where $\psi_{A'}$ is the conjugate spinor to $\psi_A$. The Dirac operator is \begin{equation} \label{eq:236} D=\left(\begin{matrix} D_A^B & D_A^{B'}\\ D_{A'}^B & D_{A'}^{B'} \end{matrix}\right) \qquad \text{ with }\qquad \left\{\begin{array}{l} D_A^B= D^{\beta J}_{\alpha I}= \begin{pmatrix} 0 & k_x\\ \bar{k_x}&0 \end{pmatrix}_\alpha^\beta \delta^{J}_{I}=\overline{D_{A'}^{B'}}\;,\vspace{.05truecm}\\ D_{A'}^{B}= D^{\beta J}_{\alpha' I'}= \begin{pmatrix} k_y & 0\\0& 0 \end{pmatrix}_{\alpha'}^\beta \,\delta^{1}_{I'}\delta^{J}_{1}=\overline{D_A^{B'}}, \end{array}\right. \end{equation} where $k_x, k_y$ are two complex constants. The grading and real structure are \begin{align} \Gamma&=\left(\begin{matrix} \Gamma_A^B& 0\\ 0 & -\Gamma_{A'}^{B'} \end{matrix}\right) \quad \text{ where }\; \Gamma_A^B= \left(\begin{matrix} 1 & 0\\ 0 & -1 \end{matrix}\right)^{\beta}_{\alpha}\delta^{J}_{I}, \text{ and similarly for}\; \Gamma_{A'}^{B'};\\ \label{eq:real_structure_U(1)xU(2)} J&=\left(\begin{matrix} 0 & J_A^{B'}\\ J_{A'}^B& 0 \end{matrix}\right)cc \quad \text{ where } J_A^{B'}=\delta^{\beta'}_{\alpha}\delta^{J'}_{I},\text{ and similarly for } J_{A'}^B. \end{align} They satisfy $J^{2}=\mathbb{I}$, $JD=DJ$ and $J\Gamma=-\Gamma J$. The first $M_2(\mathbb{C})$ in $\A$ acts on the indices $\alpha$. Its commuting with $\Gamma$ makes it break into two copies of $\C$, thus defining the even part of $\A$, \begin{equation} \label{eq:even_algebra} \A_{\text{ev}}=\mathbb{C}_R\oplus\mathbb{C}_L\oplus M_2(\mathbb{C}), \end{equation} whose element $a=(\lambda_R, \lambda_L,m)$ with $\lambda_R\in\C^R$, $\lambda_L\in \C^L$ and $m\in M_2(\C)$ act on $\HH$ as \begin{eqnarray*} \pi_0(a)=\left(\begin{matrix} a_A^B& 0\\ 0 & a_{A'}^{B'} \end{matrix}\right) &\quad\text{ where }\; a_A^B=\left(\begin{matrix} \lambda_{R} & 0\\ 0 & \lambda_L \end{matrix}\right)_\alpha^\beta\delta^{J}_{I}\; \text{ and } \; a_{A'}^{B'}=\delta^{\beta'}_{\alpha'}\, m^{J'}_{I'}. \end{eqnarray*} The spectral triple $(\A_{\text{ev}}, \HH, D)$ does not satisfy the first order condition \cite[Prop.7]{chamconnessuijlekom:innerfluc}. \smallskip The twisting by grading, formalised in \cite{landimart:twisting}, consists in letting two copies of $\A_{\text{ev}}$ act independently on the eigenspaces of $\Gamma$. The latter are the image of $\HH$ under the projections \begin{equation} \label{eq:234} p_+=\frac{1}{2}(\mathbb{I}+\Gamma)=\left(\begin{matrix} \delta^{1}_{\alpha}\delta^{\beta}_{1}\delta^{J}_{I} & 0\\ 0 & \delta^{2}_{\alpha'}\delta^{\beta'}_{2}\delta^{J'}_{I'} \end{matrix}\right) \quad\text{ and }\quad p_-=\frac{1}{2}(\mathbb{I}-\Gamma)=\left(\begin{matrix} \delta^{2}_{\alpha}\delta^{\beta}_{2}\delta^{J}_{I} & 0\\ 0 & \delta^{1}_{\alpha'}\delta^{\beta'}_{1}\delta^{J'}_{I'} \end{matrix}\right). \end{equation} For $a^r= (\lambda_R^r, \lambda_L^r,m^r)$, $a^l= (\lambda_R^l, \lambda_L^l, m^l)$ in $\A_{\text{ev}}$, one thus defines the representation $\pi$ of~$\A_{\text{ev}}\oplus~\A_{\text{ev}}$, \begin{equation} \label{eq:new_presentation_A} \pi((a^r, a^l))=p_+\pi_0(a^r)+p_-\pi_0(a^l) =\left(\begin{matrix} Z_A^B & 0\\ 0 & M_{A'}^{B'} \end{matrix}\right) \end{equation} where \begin{align*} Z_A^B& =\left(\begin{matrix} \lambda^r_R & 0\\ 0 & \lambda_L^l \end{matrix}\right)^{\beta}_{\alpha}\delta^{J}_{I} \;\text{ and }\quad M_{A'}^{B'}= \begin{pmatrix} 0&0\\0&1 \end{pmatrix}_{\alpha'}^{\beta'}(m^r)^{J'}_{I'}+ \begin{pmatrix} 1&0\\0&0 \end{pmatrix}_{\alpha'}^{\beta'}(m^l)^{J'}_{I'}= \begin{pmatrix} (m^l)^{J'}_{I'}&0\\ 0& (m^r)^{J'}_{I'} \end{pmatrix}_{\alpha'}^{\beta'}. \end{align*} The twisting automorphism is the flip $\sigma((a^r, a^l))=(a^l, a^r)$, so that \begin{equation} \label{eq:repr_sigma} \pi(\sigma((a^r, a^l)))=\left(\begin{matrix} W_A^B& 0\\ 0 & N_{A'}^{B'} \end{matrix}\right)\end{equation} where \begin{equation*} W_A^B=\left(\begin{matrix} \lambda^l_R & 0\\ 0 & \lambda^r_L \end{matrix}\right)^{\beta}_{\alpha} \delta^{J}_{I} \;\text{ and }\; N_{A'}^{B'}= \begin{pmatrix} 0&0\\0&1 \end{pmatrix} _{\alpha'}^{\beta'}(m^l)^{J'}_{I'}+ \begin{pmatrix} 1&0\\0&0 \end{pmatrix}_{\alpha'}^{\beta'} (m^r)^{J'}_{I'}= \begin{pmatrix} (m^r)^{J'}_{I'}&0\\0&(m^l)^{J'}_{I'} \end{pmatrix} _{\alpha'}^{\beta'}. \end{equation*} The resulting triple $(\A_{\text{ev}}\oplus \A_{\text{ev}},\HH,D),\sigma, J,\Gamma$ is a real, graded, twisted spectral triple with the same $KO$-dimension of $(A,\HH,D),J,\Gamma$. However it does not satisfy the twisted first-order condition, as can be checked computing the inner fluctuation of $D$. \begin{prop} An inner twisted fluctuation of $(\A_{\text{ev}}\oplus \A_{\text{ev}},\HH,D),\sigma$ is parametrised by $6$ complex parameters $\phi, \phi'$, $\sigma_1, \sigma_2,\sigma^1, \sigma^2$ that enter the components of $D_\omega$ \eqref{eq:222} as \begin{align} \label{eq:242} (D_{\omega})^{\beta J}_{\alpha I}&=\left(\delta^{1}_{\alpha}\delta^{\beta}_{2}\,k_x(1+\phi)+\delta^{2}_{\alpha}\delta^{\beta}_{1}\,\bar k_{x}(1+\phi')\right)\delta^{J}_{I},\\ \label{eq:243} (D_{\omega})^{\beta' J'}_{\alpha' I'}&=\left(\delta^{1}_{\alpha'}\delta^{\beta'}_{2}\,\bar k_x(1+\bar\phi)+\delta^{2}_{\alpha'}\delta^{\beta'}_{1}\, k_{x}(1+\bar\phi')\right)\delta^{J'}_{I'},\\ \label{eq:244} (D_{\omega})^{\beta J}_{\alpha' I'}&=k_y\delta^{1}_{\alpha'}\delta^{\beta}_{1}(\sigma_{I'}+\delta^{1}_{I'})(\bar\sigma^{J}+\delta^{J}_{1}),\\ \label{eq:245} (D_{\omega})^{\beta' J'}_{\alpha I}&=\bar k_y\delta^{1}_{\alpha}\delta^{\beta'}_{1}(\bar{\sigma_{I}}+\delta^{1}_{I})(\sigma^{J'}+\delta^{J'}_{1}) \end{align} Imposing the twisted $1$-form $\omega_{(1)}$ to be selfadjoint implies $\phi'=\bar\phi$ and $\sigma^I=\bar{\sigma_I}$ so that the number of free parameters reduces to $3$. \end{prop} \begin{proof} We first compute the twisted one form $\omega_{(1)}=\sum_{j}{\pi(\bf a)}_j[D,\pi({\bf b}_j)]_\sigma$. From (\ref{eq:236}-\ref{eq:new_presentation_A}-\ref{eq:repr_sigma}), one has for ${\bf a}=(({\lambda '}^{r}_{R},{\lambda '}^{r}_{L},{m'}^r),({\lambda '}^{l}_{R},{\lambda '}^{l}_{L},{m'}^l))$ and ${\bf b}=((\lambda^r_{R}, \lambda^r_{L},m^r),(z^l_{R},\lambda^l_{L},m^l))$ \begin{equation} \label{eq:235} [D,\pi({\bf b})]_\sigma= \begin{pmatrix} D_A^B Z_A^B -W_A^B D_A^B & D_A^{B'} M_{A'}^{B'}- W_A^B D_A^{B'}\\ D_{A'}^BZ_A^B -N_{A'}^{B'}D_{A'}^B & D_{A'}^{B'}M_{A'}^{B'}- N_{A'}^{B'}D_{A'}^{B'} \end{pmatrix}, \end{equation} where one computes $D_{A'}^{B'}M_{A'}^{B'}- N_{A'}^{B'}D_{A'}^{B'}=0$, \begin{align} \label{eq:237} D_A^B Z_A^B -W_A^B D_A^B &= \begin{pmatrix} 0& k_x(\lambda^l_L-\lambda^l_R)\\ \bar{k_x}(\lambda^r_R-\lambda^r_L) \end{pmatrix}_\alpha^\beta \delta_I^J,\\ D_{A'}^BZ_A^B -N_{A'}^{B'}D_{A'}^B &= \begin{pmatrix} k_y(\lambda^r_R\delta_{I'}^1 - (m^r)_{I'}^1) &0\\ 0&0 \end{pmatrix}_{\alpha'}^\beta\delta^J_1,\\ D_{A}^{B'}M_{A'}^{B'} -W_{A}^{B}D_{A}^{B'} &= \begin{pmatrix} \bar k_y((m^l)_{1}^{J'}-\lambda^l_R\delta_1^{J'})&0\\ 0&0 \end{pmatrix}_{\alpha}^{\beta'} \delta_I^1.\end{align} Hence $\omega_{(1)}$ has diagonal components $(\omega_{(1)})_{A'}^{B'}=0$, $(\omega_{(1)})_A^B={Z'}_A^B( D_A^B Z_A^B -W_A^B D_A^B)$ (we omit the summation index $j$), that is \begin{eqnarray} \label{eq:20bisb} (\omega_{(1)})^{\beta' J'}_{\alpha' I'}=0,\quad& (\omega_{(1)})^{\beta J}_{\alpha I}=k_x\,\delta^{1}_{\alpha}\delta^{\beta}_{2}\delta^{J}_{I}\, \phi +\bar{k_{x}}\, \delta^{2}_{\alpha}\delta^{\beta}_{1}\delta^{J}_{I}\, \phi' \end{eqnarray} where one defines the complex parameters \begin{eqnarray} \label{eq:101} \phi:=\sum_{j}{\lambda '}^r_{R}(\lambda^l_{L}-\lambda^l_{R}) \quad& & \phi':=\sum_{j}{\lambda '}^l_{L}(\lambda^r_{R}-\lambda^r_{L}). \end{eqnarray} The off-diagonal components of $\omega_{(1)}$ are ${Z'}_A^B(D_{A}^{B'}M_{A'}^{B'} -W_{A}^{B}D_{A}^{B'})$, ${M'}_{A'}^{B'} ( D_{A'}^BZ_A^B -N_{A'}^{B'}D_{A'}^B)$, that is \begin{equation} \label{eq:241} (\omega_{(1)})^{\beta' J'}_{\alpha I}=\bar k_{y}\delta^{1}_{\alpha}\delta^{\beta'}_{1}\delta^{1}_{I}\sigma^{J'},\quad (\omega_{(1)})^{\beta J}_{\alpha' I'}=k_y\delta^{1}_{\alpha'}\delta^{\beta}_{1}\delta^{J}_{1}\, \sigma_{I'}, \end{equation} where \begin{equation} \label{eq:240} \sigma^{J'}:=\sum_{j}{\lambda '}^r_{R}((m^l)^{J'}_{1}-\lambda^l_{R}\delta^{J'}_{1})\quad \sigma_{I'}:=\sum_{j}({m'}^l)^{1}_{I'}\lambda^r_{R}-({m'}^l)^{K'}_{I'}\,(m^r)^{1}_{K'} . \end{equation} The next term is $\hat{\omega}_{(1)}=J\omega_{(1)}J^{-1}=J\omega_{(1)}J$. By (\ref{eq:real_structure_U(1)xU(2)}) one easily obtains \begin{align} \label{eq:239} (\hat{\omega}_{(1)})^{\beta J}_{\alpha I}&=0, \qquad (\hat{\omega}_{(1)})^{\beta' J'}_{\alpha' I'}=\overline{(\omega_{(1)})^{\beta J}_{\alpha I}}=\bar k_x\,\delta^{1}_{\alpha'}\delta^{\beta'}_{2}\delta^{J'}_{I'}\, \bar\phi +k_{x}\, \delta^{2}_{\alpha}\delta^{\beta}_{1}\delta^{J}_{I}\, \bar\phi'\\[4pt] \label{eq:238} (\hat{\omega}_{(1)})^{\beta J}_{\alpha' I'}&=\overline{({\omega}_{(1)})^{\beta' J'}_{\alpha I}}=k_y\delta_{\alpha'}^1\delta_1^{\beta}\delta_{I'}^1\, \bar{\sigma^{J}}, \quad(\hat{\omega}_{(1)})^{\beta' J'}_{\alpha I}=\overline{({\omega}_{(1)})^{\beta J}_{\alpha' I'}}=\bar{k_y}\delta_\alpha^1\delta_1^{\beta'}\delta_1^{J'}\bar{\sigma_I}. \end{align} The quadratic term $\omega_{(2)}=\sum_{i}a_i[\hat{\omega}_{(1)},b_i]_{\sigma}$ is computed as $\omega_{(1)}$, substituting the components of $D$ with those of $\hat\omega_{(1)}$. The latter have the same indices structure as the components of $D$ so the computation is similar and one obtains \begin{align} \label{eq:105} (\omega_{(2)})^{\beta J}_{\alpha I}&=(\omega_{(2)})^{\beta' J'}_{\alpha' I'}=0,\\ \label{eq:211} (\omega_{(2)})^{\beta J}_{\alpha' I'}&=k_y\delta^{1}_{\alpha'}\delta^{\beta}_{1}\sigma_{I'}\bar{\sigma^{J}}, (\omega_{(2)})^{\beta' J'}_{\alpha I}=k^{*}_{y}\delta^{1}_{\alpha}\delta^{\beta'}_{1}\bar{\sigma_{I}}\sigma^{J'}. \end{align} The result follows summing up \eqref{eq:105}-\eqref{eq:211}, \eqref{eq:239}-\eqref{eq:238}, \eqref{eq:20bisb}-\eqref{eq:241} with \eqref{eq:236}. \end{proof} In case $\omega_{(1)}$ is selfadjoint (i.e. $\phi'=\bar\phi$ and $\sigma^{I} = \bar{\sigma_{I}}$), the components \eqref{eq:242}-~\eqref{eq:245} of $D_\omega$ are the same as in the non-twisted case. The only difference is in the relation \eqref{eq:101}, \eqref{eq:240} between the complex parameters $\phi,\sigma^I$ and the algebra elements. One finds back the formula of the non-twisted case \cite{chamconnessuijlekom:innerfluc} identifying the $l$ and $r$ indices. \section{Outlook} There is a way to twist the spectral triple of the Standard Model in order to generate an extra scalar field, as investigated in \cite{M.-Filaci:2020aa}. In the $U(1)\times U(2)$model above there is no such extra field, for the part $D_{A'}^{B'}$ of the Dirac operator that commutes with the algebra also twist-commutes with it. Instead, the part of the Dirac operator of the Standard Model that commutes with the algebra (namely the one containing the Majorana mass of the neutrino) no longer twist-commutes with the algebra. A systematic study of the minimal twisting of almost commutative geometries, in relation with the generation of extra scalar fields and the twisted first-order condition is on its way \cite{Manuel-Filaci:2020aa}. In the non-twisted case, the first order condition is retrieved dynamically by minimising the spectral action. A similar thing occurs with the partial twist of the Standard Model performed in \cite{buckley}. Whether this happens in other examples of minimal twist (as for the $U(1)\times U(2)$ model above should be investigated in a systematic way; but this requires first to stabilise a definition for the spectral action in a twisted context. Some ideas have been proposed in\cite{devfilmartsingh:actionstwisted} but deserve more study, especially in the light of a possible signature transition towards the lorentzian \cite{devfarnlizmart:lorentziantwisted}\cite{Martinetti:2019aa}. Finally let us mention another alternative to \cite{chamconnessuijlekom:innerfluc} proposed in \cite{DabrowskiMagee:gaugetwist} based on spectral triples in which the real structure is twisted \cite{T.-Brzezinski:2016aa} (see recent developments in \cite{DabrowskiDandreMagee:twistedreality} and \cite{Dabrowski:2019aa}). A link with the twisted spectral triples used in this paper is worked out in \cite{Brzezinski:2018aa} (see also \cite{Goffeng:2019aa} for another approach on untwisting a twisted spectral triple). \newpage
\section{Appendix} \begin{figure}[t] \centering \includegraphics[width=0.7\textwidth]{Figures/MIDL_interpretabilityGCN_final2.png} \caption{IA-GCN architecture. The model consists of three components: 1) Interpretable Attention Module(IAM), 2) Graph Learning Module(GLM), and 3) Classification Module. These are trained in an end-to-end training fashion. In backpropagation, two loss functions are playing roles which are demonstrated in blue and red arrows.} \label{fig.method} \end{figure} \textbf{List of feature chosen by IA-GCN for Tadpole for Alzehimer' prediction and their corresponding correlation coefficients and attention values reported by our model} \begin{table}[htbp] \caption{IA-GCN on Tadpole dataset.} \centering \begin{tabular}{ |c|c|c| } \hline Feature&co-coefficient &attention value on average\\ \hline CDRSB&0.8166&.9202\\ CDRSB\_bl&0.8166&0.9193 \\ MMS&0.6697&0.4596 \\ MMSE\_bl&0.6702&0.4421 \\ others&0.15&0.093\\ \hline \end{tabular} \end{table} \\ \textbf{List of feature chosen by IA-GCN for UKK for Gender prediction and their corresponding correlation coefficients and attention values reported by our model} \begin{table}[htbp] \caption{IA-GCN on UKBB dataset Gender prediction task.} \centering \begin{tabular}{ |c|c|c| } \hline Feature&co-coefficient &attention value on average\\ \hline Volumetric scaling from T1 head image to standard space&0.639&0.9561\\ Volume of white matter&0.575&0.947\\ Volume of brain, Grey+white matter&.532&0.8326\\ Volume of grey matter&0.427&0.6662\\ Volume of peripheral cortical grey matter&0.421&0.5149\\ \hline \end{tabular} \end{table} \\ \textbf{List of feature chosen by IA-GCN for UKBB for age prediction and their corresponding correlation coefficients and attention values reported by our model} \begin{table}[htbp] \caption{IA-GCN on UKBB dataset age prediction task.} \centering \begin{tabular}{ |c|c|c| } \hline Feature&co-coefficient &attention value on average\\ \hline Volume of peripheral cortical grey matter (normalised for head size) & -0.539&0.5597\\ Mean MD in fornix on FA skeleton&0.418&0.7443\\ Mean L2 in fornix on FA skeleton&0.384&0.7244\\ Mean L3 in anterior corona radiata on FA skeleton (right)&0.225&0.6024\\ Mean L3 in anterior corona radiata on FA skeleton (left)&0.245&0.7449\\ Mean L3 in posterior corona radiata on FA skeleton (right)&0.193&0.5477\\ Mean L3 in posterior corona radiata on FA skeleton (left)&0.182&0.6731\\ Mean L3 in fornix cres+stria terminalis on FA skeleton (right)&0.259&0.732\\ Mean OD in fornix on FA skeleton&0.244&0.7504\\ \hline \end{tabular} \end{table} \begin{figure}[t] \centering \includegraphics[width=1.0\textwidth]{image.jpg} \caption{Heat maps result for the graph generated before training \textbf{(left)} and after training \textbf{(right)} by our GLM module. It can be seen that in the beginning the graph is fully connected {(lefts)} which gain a semantic structure with inter- and intra- class connections. } \label{thresh} \end{figure} \textbf{Table 1} shows the behavior of the proposed IA-GCN for different of contribution of classification loss $L_c$ ($\alpha$), $F_{MEL}$ ($\alpha_1$) and $F_{MSL}$ ($\alpha_2$) \begin{table}[htbp] \caption{Performance of IA-GCN on Tadpole dataset in different settings.} \centering \begin{tabular}{ |c|c|c|c|c|c| } \hline $\alpha$& $\alpha_1$&$\alpha_2$ & Accuracy& Avg.4 & Avg.O\\ \hline 0 & 0.006 & 0.02 & 57.00±09.78 &$10^{-6}$& $10^{-6}$\\ 0.2 & 0.006& 0.02 & 94.20±03.44 &00.12& 0.002 \\ 0.4 & 0.006& 0.02 & 95.10±02.62&0.29& 0.001\\ \textbf{0.6} & \textbf{0.006}& \textbf{0.02} & \textbf{96.10±02.49}&\textbf{0.74}& \textbf{0.09}\\ 0.8 & 0.006& 0.02 & 95.80±02.31&0.78& 0.23\\ 1.0 & 0.006& 0.02 & 95.40±02.32&0.82& 0.42\\ \hline 0.6& 0 & 0.02 & 95.60 ± 02.44 & 0.54 &0.13\\ 0.6& 0.006 & 0 & 95.10 ± 03.69 & 0.86&0.21\\ \hline \end{tabular} \end{table} \textbf{Table 2} shows the results of the GCN and DGM model for a) model trained conventionally, b) model trained with features selected by traditional dimensionality reduction method (ridge classifier), c) model trained on all features other than the ones selected by the proposed method and d) model trained only on the features selected by proposed method. \begin{table}[htbp] \centering \floatconts \label{tab:val alpha}% {\caption{Performance shown for classification task on Tadpole dataset. We show results for four baselines on GCN\cite{parisot2017spectral} and DGM\cite{cosmo2020latent} with different input feature setting.}}% {\begin{tabular}{|cc|c|c|c|c|} \hline &&a&b&c&d\\ \hline &Acc &77.4±02.41&81.00±06.40&74.50±3.44&82.4±04.14\\ \multirow{}{}{GCN}&AUC &79.79±04.75&74.70±04.32&72.11±08.24&83.89±09.06\\ &F1&74.7±05.32&78.4±06.77&65.23±08.46&78.73±07.60\\ \hline &ACC&89.2±05.26&92.92±02.50&79.70±04.22&95.09±03.15\\ \multirow{}{}{DGM}&AUC&96.47±02.47&97.16±01.32&90.66±02.64&98.33±02.07\\ &F1&88.60±05.32&91.4±03.32&77.9±6.38&93.36±03.28\\ \hline \end{tabular}} \end{table} \end{document} \section{Introduction} Recently, Graph Convolutional Networks(GCNs) have shown great impact in the medical domain, especially for multi-modal data analysis \cite{parisot2018disease,gopinath2019graph,kazi2019self}. So far, GCNs have been applied to many medical problems such as Autism and Alzheimer's prediction \cite{anirudh2019bootstrapping}, brain shape analysis \cite{gopinath2019adaptive}, handling missing data \cite{vivar2019multi}, Pulmonary Artery-Vein Separation \cite{zhai2019linking}, functional connectivity analysis \cite{kim2020understanding}, mammogram analysis \cite{du2019zoom} and brain imaging \cite{stankevivciute2020population,gopinath2019graph}. GCNs allow a setup where a cohort of patients can be represented in terms of a population graph. It is done usually by putting the patients as nodes and neighborhood connections computed based on the similarity between the corresponding medical meta-data \cite{parisot2017spectral}. Multi-modal features for each patient are then initialized at the corresponding node of this population graph. Graph convolutions are then applied to this setup to process the node features for optimizing various objectives. In recent literature, many methodological advances have been made, especially for medical tasks, such as dealing with the out-of-sample extension \cite{hamilton2017inductive}, handling multiple graph scenario \cite{vivar2020simultaneous,kazi2019self,kazi2019graph}, graph learning \cite{cosmo2020latent}, and dealing with graph heterogeneity \cite{kazi2019inceptiongcn}. However, GCNs are complex models and highly sensitive towards the input graph, input node features, and task (loss) \cite{jin2020certified,wang2019graphdefense}. Interpreting the model's outcome with respect to each of them is essential and yet a challenging task. In spite of their great success, GCNs are still less transparent models. Interpretability techniques dealing with the analysis of GCNs with respect to the above factors are gaining importance only since the last couple of years. GNNExplainer \cite{ying2019gnnexplainer}, from the computer vision domain, for example, is one of the pioneer works in this direction. This paper proposes a post hoc technique to generate an explanation of the Graph Convolutional(GC) based model with respect to input graph and features. This is obtained by maximizing the mutual information between the pre-trained model output and the output with selected input sub-graph and features. Further conventional gradient-based and decomposition-based techniques have also been applied to GCN in \cite{baldassarre2019explainability}. Another work \cite{huang2020graphlime} proposes a local interpretable model explanation for graphs. It uses a nonlinear feature selection method leveraging the Hilbert-Schmidt Independence Criterion (HSIC). However, the method is computationally complex as it generates a nonlinear interpretable model. In the medical domain, interpretability is essential as it can help in informed decision-making during diagnosis and treatment planning. However, works targeting interpretability, especially for GCNs, are limited. One recent work \cite{jaume2020towards} proposes a post hoc approach similar to the GNN explainer applied to digital pathology. Another method Brainexplainer \cite{li2020braingnn} proposes an ROI-selection pooling layer (R-pool) that highlights ROIs (nodes in the graph) important for the prediction of neurological disorders. Interpretability for GCNs is still an open challenge in the medical domain. In this paper, we not only target the interpretability of GCNs but also design a model capable of incorporating the interpretable attentions for better model performance. Unlike conventional GCN models that require a pre-defined graph, our model does not require a pre-computed graph. As such pre-defined graphs may be noisy or unknown. In the recent graph deep learning literature, only a few works have focused on latent graph learning problems \cite{kazi2019self,kazi2019graph,coates2019mgmc}. The proposed model is empowered with an interpretability-specific loss that helps in increasing the confidence of the interpretability. We show that such an interpretation-based feature selection enhances the model performance. \textbf{Contributions:} In this work, we propose a GCN-based method that is capable of 1) learning the Interpretable Attention for input features, 2) using these Interpretable Attentions to better optimize the task better, and 3) providing an explanation for the model's outcome. We leverage a unique Loss function for interpretability. Further, our model learns and outputs a population-level graph that aids in discovering the relationship between the patients. The whole pipeline is trained end-to-end for a) task at hand (disease, age, and gender prediction), b) learning the latent population-level graph, and 3) interpretable attention for features. We show the superiority of the proposed model on 2 datasets for 3 tasks, Tadpole \cite{marinescu2018tadpole} for Alzheimer's disease prediction (three-class classification) and UKBioBank (UKBB) \cite{miller2016multimodal} for gender (2 classes) and age (4 classes) classification task. We show several ablation tests and validations supporting our hypothesis that incorporating the interpretation with the model is beneficial. In the following sections, we first give mathematical details of the proposed method, then describe the experiments, followed by discussion and conclusion. \section{Method} Given the dataset $Z=\left [X,Y\right]$, where $X\in \mathbb{R}^{N \times D}$ is the feature matrix with dimension $D$ and $N$ patients. $Y \in \mathbb{R}^{N}$ being the labels with $c $ classes. The task is to classify each patient into the respective class from $c$. Along with this primary task, the proposed method targets to obtain two more by-products 1) population-level graph that explores the clinically semantic latent relationship between the patients, 2) Interpretable Attentions for features and incorporation of them in an end-to-end model for better representation learning. Both graph learning and feature interpretation are trained end-to-end on unique loss that contributes towards the three tasks. \begin{figure}[t] \centering \includegraphics[width=0.8\textwidth]{Figures/MIDL_interpretabilityGCN_final.png} \caption{IA-GCN architecture. The model consists of three components: 1) IAM, 2) GLM, and 3) Classification Module. These are trained in an end-to-end training fashion. In backpropagation, two loss functions are playing roles which are demonstrated in blue and red arrows.} \label{fig.method} \end{figure} In the following paragraphs, we will explain Graph Learning Module (GLM), Interpretable attention Module (IAM), and Classification module.\\ \textbf{Graph Learning Module (GLM)} Given the dataset $Z$, the main objective of GLM is to predict an optimal graph/ adjacency matrix $G'\in \mathbb{R}^{N\times N}$. $G'$ is then used in the graph convolutional network for the classification, as shown in figure \ref{fig.method}. The major challenge in solving the graph learning task is the discrete nature of the graph edges. This makes the backpropagation impracticable, making the model non-differentiable. Inspired from DGM \cite{cosmo2020latent} we define our GLM in 2 steps as follows: \textbf{Step 1:} Defining $f_{\theta}$ to predict lower-dimensional embedding from the input features for the edges. $f_{\theta}$ can be defined as $ \hat{X} = f_{\theta}(X, \theta)$ where $f$ is a generic function with learnable parameters $\theta$. To keep it simple, we chose $f$ to be MLP, however, could be changed based on the input data and the task. $f_{\theta}$ takes the feature matrix $X\in \mathbb{R}^{N\times D}$ as input and produces $\hat{X}$ embedding specific for the graph as output. It should be noted that $f_{\theta}$ is dedicated to learning the feature embedding $\hat{X}$ only to predict the graph structure. \textbf{Step 2:} We compute a fully connected graph with continuous edge values (shown as graph construction in figure \ref{fig.method}) using the euclidean distance metric between the feature embedding $\hat{x_{i}}$ and $\hat{x_{j}}$ obtained in step 1. We use the sigmoid function for soft thresholding keeping the GLM differentiable . $g'_{ij}$ is computed as $g'_{ij}=\frac{1}{1+e^{ \left(t \|\mathbf{\tilde{x}_{i}}-\mathbf{\tilde{x}_{j}}\|_2 + \theta \right)} }$ where $\theta$ being the threshold parameter and $t$ the temperature parameter pushing values of $a_{ij}$ to either $0$ or $1$. Both $t$ and $\theta$ are optimized during training. The output $G'$ from GLM is further given as an input to the classification module.\\ \textbf{Interpretable Attention Module (IAM)} For IAM, we define a differentiable and continuous mask $M \in \mathbb{R}^{1 \times D}$ that learns an attention coefficient for each feature element from $D$ features. IAM can be mathematically defined as $x_i' =\sigma (M) \times x_i $ where, $x_i'\in \mathbb{R}^{1\times D}$ is the masked output, $\sigma$ is the sigmoid function. $\sigma (M)$ represents the learned Mask $M' \subset \left [ 0,1 \right ]$. Our mask $M$ is continuous as the target is to learn the interpretable attentions while the model is training. Conceptually, the corresponding weights in the mask $M'$ should take a value close to zero when a particular feature is not significant towards the task. In effect, $m_i$ corresponding to $d_i$ may improve or deteriorate the model performance depending on the importance of $d_i$ towards the task. Further, the proposed IAM is trained by a conventional classification loss $L_{c}$ and two separate regularization losses $F_{MSL}$, and $F_{MEL}$. All the losses are defined in detail in the loss function section. \\ \textbf{Classification Module with joint optimization of GLM and IAM} As mentioned before, the primary goal is to classify each patient $x_{i}$ into the respective class $y_{i}$. The classification model can be mathematically defined as $\hat{Y} = f_{\theta }\left ( X', G' \right )$ where $f_{\theta }$ is the classification function with learnable parameters $\theta$, $G'$ being the learned latent population graph structure, $M'$ being the interpretable attention mask. We define $f_{\theta }$ as a generic graph convolution network targeted towards node classification.\\ \textbf{Interpretability focused loss functions} In order to optimize the whole network in an end-to-end fashion, we define the loss function as $L = \alpha*L_{c} + (1- \alpha)* L_{IA}$ where $L$ is the final loss function used to optimize the whole model. $L_{c}$ is the classification loss. $L_{IA}$ is interpretable attention loss. Furthermore, $\alpha$ is the weighting factor, chosen empirically. We use softmax cross-entropy for classification loss $L_{c}$. Training the model with only $L_c$ has three main drawbacks 1) the model performance is not optimal, 2) the mask learns average value for all the features depicting the uncertainty, and 3) the unimportant features take higher weights in the mask. In order to overcome these drawbacks, we define $L_{IA}$ as $L_{IA} = \alpha_1 * F_{MEL}+ \alpha_2 * F_{MSL}$ , where $F_{MEL}$ is the feature mask entropy loss, and $F_{MSL}$ is the feature mask size loss as defined in section 3.2. $\alpha_1 $, $\alpha_2$ are the weighting factors chosen empirically. Firstly, $F_{MSL}= \sum_{i=0}^{D-1} m'_i$ nails the values of individual $m'_i$'s to minimum. Otherwise, all the features get the highest importance with all the $m'$s taking up the value 1. On the other hand, $ F_{MEL} = \sum_{i=0}^{D-1} -m'_i log (m'_i)$ tries to push values away from $0.5$, which makes the model more confident about the importance of the feature $d_i$. Rewriting the loss function as: \begin{equation} L = (1- \alpha)L_{c} + \alpha* (\alpha_1 * \sum_{i=0}^{D-1} -m'_i log (m'_i)+ \alpha_2 * \sum_{i=0}^{D-1} m'_i) \end{equation} We would like to point out \textbf{the role} of each element in final loss $L$. Each term in $L$ affects each other. The final values of each term are determined by the optimal point of $L$. $F_{MSL}$ tried to bring $m'_i$ to zero. However, the important features must get corresponding $m'=1$, which is possible due the effect of $L_c$ on $F_{MSL}$. Further, $F_{MEL}$ tried to move the values of $m'$ away from 0.5. However, it is governed by $L_c$ and $F_{MSL}$ together to do so. All other weighting factors $\alpha$, $\alpha_1$ and $\alpha_2$ are chosen empirically for optimal $L$. \section{Experiments} We conduct our experiments on two publicly available datasets for three tasks. Tadpole \cite{marinescu2018tadpole} for Alzheimer's disease prediction and UK Biobank\cite{miller2016multimodal} for age and gender prediction. The task in \textbf{Tadpole} dataset is to classify 564 patients into three categories (Normal, Mild Cognitive Impairment, Alzheimer's) which represent their clinical status. Each patient has 354 multi-modal features cognitive tests, MRI ROIs, PET imaging, DTI ROI, demographics, and others. On the other hand, the \textbf{UK Biobank} dataset consists of 14,503 patients with 440 features per individual, which are extracted from MRI and fMRI images. Two classification tasks are designed for this dataset 1) gender prediction, 2) categorical age prediction. In the second task, patients’ ages are quantized into four decades as the classification targets. We compare the proposed method with four state-of-the-art and one baseline method shown in Table 1. We perform an experiment with a linear classifier to see the complexity of the task. Further, Spectral-GCN \cite{parisot2018disease} is the Chebyshev polynomial-based GC method, and Graph Attention Network(GAT)\cite{velivckovic2017graph} is a spatial method. We compare with these two methods as they require a pre-defined graph structure for the classification task. Whereas our method and DGM\cite{kazi2020differentiable} learns a graph during training. In such methods, the graph structure is constructed based on the patients' similarities either from the imaging features or the meta-data. Our argument is that pre-computed/ preprocessed graphs can be noisy, irrelevant to the task or may not be existing. Depending on the model, learning the population graph is much more clinically semantic. Unlike Spectral-GCN and GAT, DGCNN\cite{wang2019dynamic}, constructs a Knn graph at each layer dynamically during training. This removes the requirement of a pre-computed graph. However, the method still lacks the ability to learn the latent graph.\\ \textbf{Implementation Details:} $M$ is initialized either with Gaussian normal distribution or constant values. Experiments are performed using Google Colab with Tesla T4 GPU with PyTorch 1.6. Number of epochs = 600. Same 10 folds with the train: test split of 90:10 are used in all the experiments. Two MLP layers (16→8) for GLM. Ttwo Conv layers followed by a FC layer (32→16→\# classes) for classification network. RELU is used as the activation function.\\ \textbf{Classification performance} Three different experiments are performed for the comparison between the methods. We report Accuracy, AUC and F1 score of each experiment. In the first experiment, We compare the methods on Tadpole as shown in Table. 1. The lower F1-score indicates the challenging task due to the class imbalance. ($\frac{2}{7}$,$\frac{4}{7}$,$\frac{1}{7}$) Our proposed method outperforms the state-of-the-art. The low variance of the proposed method shows the stability of the method.\\ \begin{table}[t] \centering \label{tab:tadpole}% {\caption{Performance of the proposed method compared with several state-of-the-art methods, and various baselines methods on Tadpole dataset. LC stands for Linear Classifier.}}% {\begin{tabular}{|c|ccc|} \hline Method & Accuracy & AUC &F1 \\ \hline LC \cite{Hoerl1}& 70.22 ± 06.32 & 80.26 ± 04.81 & 68.73 ± 06.70\\ GCN\cite{parisot2017spectral} & 81.00 ± 06.40 & 74.70 ± 04.32&78.4 ± 06.77 \\ GAT\cite{velivckovic2017graph} & 81.86 ± 05.80 & 91.76 ± 03.71 &80.90 ± 05.80\\ DGCNN\cite{wang2019dynamic}& 84.59 ± 04.33 & 83.56 ± 04.11 &82.87 ± 04.27\\ DGM\cite{cosmo2020latent} & 92.92 ± 02.50& 97.16 ± 01.32&91.4 ± 03.32\\ IA-GCN & \textbf{96.08 ± 02.49} & \textbf{98.6 ± 01.93}&\textbf{94.77 ± 04.05} \\ \hline \end{tabular}} \end{table} Two more tasks of gender and age prediction are performed with the above methods on UKBB dataset with much larger dataset size. The results are shown in Table. \ref{tab:ukbb}. Our method shows superior performance and AUC reconfirms the consistency of model's performance. For age prediction, results demonstrate that the overall task is much more challenging than the gender prediction. Lower F1-score shows the existence of class imbalance. Our method outperforms the DGM (SOTA) by $2.02\%$ and $1.65\%$ in accuracy for Gender and Age task respectively. \begin{table}[t] \centering \label{tab:ukbb}% \caption{Performance of the proposed method compared with several state-of-the-art methods, and a baselines methods on UKBB dataset. \textbf{Top:} Gender classification, \textbf{Bottom:} Age classification.}% \begin{tabular}{|c|c|c|c|c|c|c|} \hline & & LC& GCN&DGCNN&DGM&IA-GCN\\ \hline &Accuracy &81.70±01.64 &83.7±01.06&87.06±02.89&90.67±01.26&92.32±00.89\\ Gender&AUC & 90.05±01.11&83.55±00.83&90.05±01.11&96.47±00.66&97.04±00.59\\ &F1& 81.62±01.62 &83.63±00.86&86.74±02.82&90.65±01.25& 92.25±00.87\\ \hline &Accuracy &59.66±01.17 &55.55±01.82&58.35±00.91&63.62±01.23 &65.64±01.12\\ Age&AUC & 80.26±00.91&61.00±02.70 &76.82±03.03&76.82±03.03&76.82±03.03\\ &F1&48.32±03.35&40.68±02.82&47.12±03.95&50.23±02.52&51.73±02.68\\ \hline \end{tabular} \end{table} The above results indicate that graph-based methods perform better than the conventional ML method (LC). The incorporation of graph convolutions helps in better representation learning resulting in better classification. Further, GAT requires full data in one batch along with the affinity graph, which causes Out Of Memory in UKBB experiments. Moreover, DGCNN and DGM achieve higher accuracy compared to Spectral-GCN and GAT. This confirms our hypothesis that a pre-computed graph may not be optimal. Between DGCNN and DGM, DGM performs better than DGCNN, confirming that learning graph is beneficial to the final task and for getting latent semantic graph as output (Table. 2).\\ \begin{table}[t] \parbox{.6\linewidth}{ \centering \label{tab:val alpha} \begin{tabular}{|c|c|c|c|} \hline &ACC&AUC&F1\\ \hline a) &89.2±05.26&96.47±02.47&88.60±05.32\\ b) &92.92±02.50&97.16±01.32&91.4±03.32\\ c) &79.70±04.22&90.66±02.64&77.9±6.38\\ d) &95.09±03.15&98.33±02.07&93.36±03.28\\ \hline \end{tabular} \vspace{10px} \caption{Performance shown for classification task on Tadpole dataset. We show results for four baselines on DGM\cite{cosmo2020latent} with different input feature setting.} } \hfill \parbox{.35\linewidth}{ \centering \label{tab:validation1} \begin{tabular}{ |c|c|c|c| } \hline $\alpha$& Accuracy& Avg.4 & Avg.O\\ \hline 0 & 57.00±09.78 &$10^{-6}$& $10^{-6}$\\ 0.2 & 94.20±03.44 &0.12& 0.002 \\ 0.4 & 95.10±02.62&0.29& 0.001\\ 0.6 & 96.10±02.49& 0.74& 0.0\\ 0.8 & 95.80±02.31&0.78& 0.23\\ 1.0 & 95.40±02.32&0.82& 0.42\\ \hline \end{tabular} \vspace{5px} \caption{Performance of IA-GCN on Tadpole dataset in different settings.} } \end{table} \textbf{Interpretability} We now check the importance of the selected features by manually adding and removing the features from the input for DGM\cite{cosmo2020latent}. We chose the best performing method DGM for this experiment. In Table. 3, we show experiments with different choices on input features. The four variations of input are given as a) method trained traditionally. b) ridge classifier used to reduce the dimensionality at the pre-processing step, c) method trained conventionally with all input features except the features selected by the proposed method, d) model trained on only features selected by the proposed method. The following can be observed from Table \ref{tab:validation1}. In general, the feature selection technique (b and d) is beneficial for the task. The proposed IA-based feature selection performs the best for the method (d). When the models are trained with features other than the selected one, the performance of the model drastically drops.\\ \textbf{Analysis of the loss function} Further, we investigated the contribution of two main loss terms $L_c$ and $L_{IA}$ and $F_{MEL}$, $F_{MSL}$, towards the optimization of a task. Table. 4 shows changes in the performance and the average of attention values (Avg.4 and Avg.O) with respect to the changes on $\alpha$. We look into the contribution of each loss term ($L_c$, $L_{IA}$). It can be seen that the performance drops significantly with $\alpha=0$. Best accuracy at $\alpha= 0.6$ shows that both the loss terms are necessary for the optimal performance of the model. We report the average attention for the top four features (Avg.4) selected by the model and other features (Avg.O). The Avg.O surges dramatically each time $\alpha$ increases. This proves that $L_{IA}$ plays the most important role in shrinking the attention values of less important features. In Figure. \ref{coeff}, we show the attention learned by IAM vs. the Pearson correlation coefficient for the corresponding features with the ground truth. For both Tadpole and UKBB datasets, it is observed that 1) the set of selected features are different depending on the task, 2) age classification is more difficult than gender classification; thus, more features are given attention.\\ \textbf{Clinical interpretation} In the Tadpole, our model selects four cognitive features. Cognitive tests measure cognitive decline in a straightforward and quantifiable way. Therefore, these are important in Alzheimer's disease prediction \cite{jack2013biomarker}, in particular CDRBS and MMSE \cite{o2008staging,arevalo2015mini}. Apart from cognitive tests, Tadpole dataset includes other imaging features. In the absence of cognitive features, the model selects the PET FDG feature. The PET measures are one of the earliest biomarkers of Alzheimer's Disease since they provide insight into molecular processes in the brain\cite{marinescu2018tadpole}. Our interpretation about the model not selecting the MRI features is that attention is distributed over 314 features which are indistinct compared to cognitive features. MRI features are valuable only when two scans taken over time between two visits to the hospital are compared to check the loss in volume. However, in our case, we only consider scans at the baseline. For age prediction, the most relevant feature selected by our network was Volume of peripheral cortical grey matter, which is also supported by \cite{jiang2020predicting}. \begin{figure}[t] \centering \includegraphics[width=0.1\textwidth]{Figures/coeff.png} \caption{Person Correlation Coefficient with respect to groundtruth vs. attention learned by the IAM. \textbf{(left)}Tadpole, \textbf{(center)} UKBB for gender prediction. \textbf{(right)} UBBB for age prediction. The names of the features are provided in the supplementary material.} \label{coeff} \end{figure} \section{Discussion and Conclusion} In this paper, we propose a novel GCN-based model that includes 1) generic interpretable attention module, 2) graph learning module, and 3) unique loss function. Our model learns the attention for input multi-modal features and uses the generated interpretation to train the model. IAM can be incorporated in any deep learning model capable of learning together with the task. The model's interpretation goes inline with the clinical findings and also the correlation with the ground truth. Further, our proposed GLM produces a latent population-level graph (heat maps added to supplementary) where we discovered 1) classes are clustered with a high number of edges between class samples within the class, 2) inter-class edges are important too as they help differentiate between the features from different classes. The end-to-end model leads to a significantly better classification performance than the state-of-the-art. Moreover, we showed the contribution of GLM, IAM, and the losses in our experiments. Our model is light and scalable in the case of multiple graph scenario. \cite{kazi2019self,kazi2019graph,coates2019mgmc}
\section{INTRODUCTION}\label{section: introduction} Parametric models are pivotal for analysis, design, control, and optimization in many studies and applications such as textile manufacturing\cite{durakovic2013continuous}, food \cite{yu2018design}, energy\cite{schlueter2018linking} and pharmaceutical\cite{paulo2017design} industries. Often, the unknown parameters in these models are estimated using experimental data. However, in many of these applications, running experiments are expensive and time-consuming. Therefore, it is very important to carefully select few experiments to be performed while simultaneously ensuring reliable parameter estimation. Model-Based Design of Experiments (DoE)\cite{pukelsheim2006optimal} introduces statistical methods which pose and solve appropriate optimization problems that strategically select experiments from a large set of possible experiments. These selection problems are also common in other contexts, for instance, the application areas that use learning tasks such as active learning\cite{settles2012active}, multi-arm bandits\cite{deshpande2012linear}, diversity sampling\cite{kulesza2012determinantal} require effective selection of input data. \begin{figure}[tb] \centering \includegraphics[scale=0.1,width=0.5\columnwidth]{aoptim_ellipse.JPG} \caption{Illustrates effect of A-optimality criteria on decreasing variance in estimation of $\beta$, considering a linear model of the form $Y=X\beta+\epsilon$. This variance in estimation is given by $\Sigma^{-1}=(X^\top X)^{-1}$. In particular, A-optimality minimizes the average inverse singular value($\lambda$). The arrows indicate directions of shrinkage of the ellipse as the criteria is optimized.} \label{fig: aoptim} \end{figure} Linear models of the form $y=f^\top(\ensuremath \mathbf{z})\beta$, where the measured output depends linearly on the parameters $\beta$ (not necessarily linear on the process variables $\ensuremath \mathbf{z}$) are very common in many of the above applications. DoE for these linear models is critical since they are extensively used, are amenable to simpler interpretations, and offer tractable solution to the experiment selection problem \cite{montgomery2021introduction},\cite{jiao2020does},\cite{lu2017application}. The underlying principle for these statistical techniques is to select a small subset from a pre-specified set $\Omega$ of process variables $\{\ensuremath \mathbf{z}_i\}_{i=1}^n$ at which the experiments need to be conducted to obtain a reasonable estimate $\hat \beta$ of $\beta\in\ensuremath \mathbb R^p$ such that $f^T(\ensuremath \mathbf{z})\hat\beta$ is a good (low variance) estimation of $y$ for all $\ensuremath \mathbf{z}$ in $\Omega$. More precisely, a case with $r$ experimental observations $\ensuremath \mathbf{y}\in \mathbb{R}^r$ at process values $\{\ensuremath \mathbf{z}_i\}_1^r$ ($r\ll n$) can be written as $\ensuremath \mathbf{y}=X\beta+\epsilon$, where $X\in\ensuremath \mathbb R^{r\times p}$, $f(\ensuremath \mathbf{z}_i)^\top$ is the $i$th row of $X$, and $\epsilon$ is the error vector (typically assumed to be realizations of independent and identically distributed (iid) random variables). A least square estimate for this regression problem is given by $\hat\beta=(X^\top X)^{-1}X^\top\ensuremath \mathbf{y}$ and the variance $var(\hat\beta)=\sigma^2(X^\top X)^{-1}$, where $\sigma^2$ is the variance of $\epsilon$. Also the predicted response is $\hat \ensuremath \mathbf{y}(\ensuremath \mathbf{z})=f^\top(\ensuremath \mathbf{z})\hat\beta$ with variance $var(\hat \ensuremath \mathbf{y}(\ensuremath \mathbf{z}))=\sigma^2f^\top (\ensuremath \mathbf{z})(X^\top X)^{-1}f(\ensuremath \mathbf{z})$. The DoE problem deals with choosing an appropriate choice of $r$ process values $\{\ensuremath \mathbf{z}_i\}_{i=1}^r$ from a larger set $\Omega$, such that the corresponding Fisher information matrix $\Sigma=X^\top X$ \cite{rissanen1996fisher} ensures small variance in predicted response; here $r$ is known a priori and is small enough to be cost and time effective. In particular, various optimality criteria $g(\Sigma)\in \mathbb{R}$ are used for DoE \cite{pukelsheim2006optimal}; for instance $A$-optimality criterion requires parsimonious selection of ${\ensuremath \mathbf{z}_i}$ such that $g(\Sigma)=\text{trace}(\Sigma^{-1})$ is minimized (See Figure \ref{fig: aoptim}). Other such criteria include D-optimality (minimize $\text{determiniant}(\Sigma^{-1}$), T-optimality (maximize $\ensuremath \text{trace}(\Sigma)$), E-optimality (minimize ${\text{maximum eigenvalue}(\Sigma)}$), V-optimality (minimize average prediction variance), and G-optimality (minimize worst possible prediction variance) \cite{pukelsheim2006optimal}. These optimization problems are combinatorial in nature and are known to be NP hard\cite{civril2009selecting}. These problems become even more complex when not all process variable values are preset but need to be chosen or designed. More precisely, in the context of linear regression models considered above, when some elements in the matrix $X$ are themselves parameters to be designed (chosen typically from a continuous domain set). These problems arise in DoE applications where not all process variables $\ensuremath \mathbf{z}_i\in \Omega$ are determined a priori, but are free to be chosen. For instance if $y$ represents taste-quality score of a certain wine and $f_k(\ensuremath \mathbf{z})$ represents a specific feature (among many other features) – say that depends on temperature of the room at which wine is served; the temperature values can be treated as a design variable. Similar objectives also arise in certain missing-data problems, where values for $f_k(\ensuremath \mathbf{z}_i)$ (for some ($k,i$)) are missing and these values need to be imputed. Missing of data can occur due to various reasons such as unreliable sensors\cite{yick2008wireless}, system malfunction\cite{lo2011progressive}\cite{fletcher2004estimation} or incomplete surveys\cite{raghunathan2004we}. While range of missing data points are known, exact values might still be missing. This is widespread in many research areas and has adverse affects on final model estimation\cite{kromrey1994nonrandomly,ayilara2019impact,marlin2008missing}. The corresponding complexity of DoE problem increases since solving for the above optimality criteria will require solving {\em simultaneously} the selection problem as well as designing these parameters. There are many approaches that address individually the optimal DoE problem and missing data imputations but there are none to our knowledge that solve them simultaneously. Methods specifically developed for DOE that apply to various optimality criteria include heuristic algorithms such as genetic algorithm \cite{exchangealgo},\cite{heredia2003genetic} and Fedorov’s exchange\cite{miller1994algorithm} or convex relaxations \cite{pmlr-v70-allen-zhu17e}; some approaches provide better analytical guarantees for specific criteria such as $T-$ and $D$-optimality \cite{pmlr-v48-ravi16,5671202,li2017polynomial }, or A-optimality \cite{avron2013faster,JMLR:v18:17-175,nikolov2019proportional,derezinski2018leveraged}. On the other hand imputing values to missing-data problems are generally addressed by using surrogates such as mean or mode of the data \cite{eekhout2014missing,zhang2016missing,malhotra1987analyzing}; or estimating missing values using maximum likelihood methods\cite{dempstermaximal}. There is no existing literature on the coupled selection-imputation problems. These problems are nonconvex typically with multiple local minima. Simulations show that standard optimization techniques, such as interior points method, gets stuck at poor local minima. Using exchange algorithms\cite{nguyen1992review} to solve this coupled objective becomes computationally intensive as they need to rely on discretized values for continuous variables and the search space multiplies for every missing value. In this work, we pose a combined objective function optimizing for both designable (missing) feature values and experiment selection. In this article, we use $A$-optimality, that is, $\ensuremath \text{trace}(\Sigma^{-1})$ as the optimality criterion. We design a flexible solution approach, which in addition to solving the combined objective, can easily incorporate a wide range of constraints on the decision variables. The main heuristic in our solution is casting the problem from the viewpoint of maximum-entropy-principle (MEP) \cite{jaynes1957information,rose1998deterministic, dubey2018maximum,gehler2007deterministic,rao1997design, srivastava2020simultaneous,gull1984maximum, baranwal2019multiway,banerjee2007generalized,xu2014aggregation}. In this viewpoint, we ascribe a probability distribution on the space of combinatorial selections, and determine expected cost function parameterized by design (imputable) values. We determine this probability distribution and design values in an iterative process, where a distribution with maximum entropy is computed at each iteration as an upper bound on the expected cost function, is successively decreased. The imputable values at each iteration are simultaneously obtained by minimizing the corresponding unconstrained Lagrangian. Our primary contributions in this work include, \begin{itemize} \item Developing a framework for Simultaneous Selection-Imputation Optimization (SSIO) problem. \item Posing this problem in MEP framework and developing an iterative algorithm to solve it. \item Demonstrating that the iterations in our algorithm mimic a descent method and hence converge to a local minimum. \end{itemize} We also show that our proposed MEP based approach can be adapted to various other linear (non-linear) design optimality criteria. Further, we show a systematic procedure to incorporate application-specific constraints (such as resource capacity constraint) into the SSIO problem. Our simulations show empirical success of the developed algorithm. We test our algorithm on multiple randomly generated data. We show over $3.2$ times improvement in comparison to (the standard) mean data imputation for missing data followed by the Fedorov's algorithm \cite{miller1994algorithm} for experiment selection, and over $4.7$ times improvement in comparison to mean data imputation followed by random sampling of experiments \cite{pmlr-v70-allen-zhu17e}. Further, we expound the benefits of {\em annealing} (an integral part of our proposed algorithm described in Section \ref{section: Solution Approach}) by comparing it with the standard optimization techniques (such as interior-point, and Trust-region reflective algorithm \cite{byrd1999interior}) that simultaneously solve for missing data imputation, and experiment selection. In particular, here we show that our algorithm results into a lower cost function value that is $0.57$ times the cost from the above direct methods. The paper is organised as follows, Section \ref{section: Problem Formulation} will deal with problem formulation and modifying it for MEP framework, Section \ref{section: Solution Approach} deals with developing an iterative algorithm to solve for this objective, this is followed by simulations in Section \ref{Section: Simulation} and discussion in Section \ref{section: discussion and analysis}. \section{Problem Formulation}\label{section: Problem Formulation} We consider a linear model $y=f^\top (\ensuremath \mathbf{z})\beta+\epsilon$, where $\ensuremath \mathbf{z}$ takes values from a set $\Omega=\{\ensuremath \mathbf{z}_i\}_{i=1}^n$, and $\beta\in\ensuremath \mathbb R^p$ is the parameter vector. We define $X\in\ensuremath \mathbb R^{n\times p}$ such that its $k$th row $\mathbf{x}_k^\top =f^\top (\ensuremath \mathbf{z}_k)$. A model-based $A$-optimality DoE problem requires forming a matrix $X_s\in\ensuremath \mathbb R^{r\times p}$ by appropriately selecting $r\ll n$ rows (experiments) in $X$ such that $\ensuremath \text{trace}\left(\Sigma_s^{-1}\right)$ is minimized, where $\Sigma_s=[X_s^\top X_s]$ is the Fisher Information matrix. The space of such combinatorial selections are described by the set $S\subset \{0,1\}^n$, where every $\ensuremath \mathbf{s}=\{s_i\}_{i=1}^n\in S$ satisfies $\sum_i s_i=r$, that is \begin{align} S=\{\mathbf{s}:\mathbf{s}=\{s_i\}_{i=1}^n,s_i\in\{0,1\},\sum_i s_i=r\}\label{eq: setS}. \end{align} To each selection vector $\ensuremath \mathbf{s}$, we can determine a matrix $X_s\in\ensuremath \mathbb R^{r\times p}$ by deleting all $j$th rows for which $s_j=0$. The corresponding Fisher information matrix can be written as \[\Sigma_s=X_s^\top X_s=X^\top \ensuremath \Lambda(\ensuremath \mathbf{s}) X,\] where the $\ensuremath \Lambda(s)\in \{0,1\}^{n\times n}$ is a diagonal matrix with $\ensuremath \mathbf{s}$ as its diagonal. As illustrated in Section \ref{section: introduction}, in this work, we consider an additional objective of imputing feature data while solving A-optimality criterion. Specifically, let $\textbf{m}\in M$ denote designable or missing feature entries in matrix $X$. Here \begin{align} M=\{\ensuremath \mathbf{m}:\ \ensuremath \mathbf{m}=\text{vec}\left(x_{ij}\right);x_{ij}\in[a_{ij},b_{ij}]\forall(i,j)\in\mathcal{G}\}\label{eq: setM}, \end{align} and $\mathcal{G}$ specifies the locations of missing data in matrix $X$. We denote the input data matrix with missing values $\textbf{m}\in\mathbb{R}^{|\mathcal{G}|}$ by $X(\textbf{m})\in\mathbb{R}^{n\times p}$. Consistent with related literature \cite{nikolov2019proportional,derezinski2018leveraged,pmlr-v70-allen-zhu17e} in linear design of experiments, we assume $X(\ensuremath \mathbf{m})$ to be of full rank (equal to $p$) and hence $X(\ensuremath \mathbf{m})^\top X(\ensuremath \mathbf{m})$ is invertible for all $\ensuremath \mathbf{m}$. The SSIO\ problem is given by \begin{align} \label{Eq: original objective} \min_{\textbf{s}\in S,\textbf{m}\in M}\quad &\ensuremath \text{trace}\left(\left[X(\textbf{m})^\top \ensuremath \Lambda(\textbf{s})X(\textbf{m})\right]^{-1}\right). \end{align} To ensure the invertibility of $(X(\textbf{m})^\top \ensuremath \Lambda(\textbf{s})X(\textbf{m}))$, a necessary condition is that the number of selected rows must at least be equal to the number of features in each experiment $i.e\quad r\geq p$. In our framework we reformulate the optimization problem (\ref{Eq: original objective}) by changing the decision variable space. We introduce a binary-valued probability distribution $\eta:S\rightarrow \{0,1\}$ on the space of selections such that $\sum_S\eta(\textbf{s})=1$. Specifically, it is a distribution which takes a unit value at a particular selection of experiments i.e at a vector $\ensuremath \mathbf{s}\in S$ and zero otherwise. Hence the equivalent optimization problem is given by \begin{align} &\min_{\eta,\mathbf{m}\in M}\quad\text{trace}\Big(\Big[\sum_{\mathbf{s}\in S}\eta(\mathbf{s})\left(X(\mathbf{m})^\top \ensuremath \Lambda(\mathbf{s})X(\mathbf{m})\right)\Big]^{-1}\Big)\label{eq: etaoptimization}\\ &\text{subject to}\ \eta(\mathbf{s})\in\{0,1\}\quad \quad\sum_S\eta(\mathbf{s})=1.\label{eta constraint} \end{align} In our MEP based framework we relax this binary decision variable $\eta(\textbf{s})$, and replace it with association weight $p(\textbf{s})\in[0,1]$ such that $\sum_Sp(\textbf{s})=1$. The resulting relaxed cost function $\mathcal{A}$ is given by \begin{align}\label{eq: final objective} \begin{split} \mathcal{A}&=\ensuremath \text{trace}\Big(\big(\sum_S p(\textbf{s})X(\textbf{m})^\top \ensuremath \Lambda(\textbf{s})X(\textbf{m})\big)^{-1}\Big).\\ &=\ensuremath \text{trace}\Big(\big(\underbrace{\sum_S p(\textbf{s})\sum_{i=1}^ns_ix_i(\ensuremath \mathbf{m})x_i(\ensuremath \mathbf{m})^T}_{D}\big)^{-1}\Big), \end{split} \end{align} where $x_i(\ensuremath \mathbf{m})$ denote the $i$-th row of the $X(\ensuremath \mathbf{m})$ data matrix. For simplicity of notation we denote $x_i(\ensuremath \mathbf{m})$ by $x_i$ wherever clear from the context. Subsequently, we use MEP to design these association weights $p(\ensuremath \mathbf{s})$ as illustrated in the next section. \section{Solution approach}\label{section: Solution Approach} In the proposed approach instead of directly solving for (\ref{eq: etaoptimization}) we use MEP based algorithm to solve for the distribution $p(\textbf{s})$ which forms a part of the relaxed cost function (\ref{eq: final objective}). In particular, we solve for the distribution which has maximum entropy while the relaxed cost function $\mathcal{A}$ in (\ref{eq: final objective}) attains a given value $a_0>0$. Intuitively, given a prior information ($\mathcal{A}=a_0$), MEP determines the \textit{most unbiased} distribution and hence maximizes Shannon Entropy $H$. We pose the following optimization problem, \begin{align}\begin{split}\label{eq:MEP} \max_{p(\textbf{s}),\textbf{m}\in M}H&=-\sum_Sp(\textbf{s})\log p(\textbf{s})\\ \text{subject to}& \quad\mathcal{A}=a_0\\ &p(\ensuremath \mathbf{s})\geq 0 \ \text{for all}\ \ensuremath \mathbf{s}\in S \ \text{and }\ \sum_S p(\ensuremath \mathbf{s})=1 \end{split} \end{align} The corresponding Lagrangian to be minimized is given by \begin{align}\label{eq: initial lag} L=\mathcal{A}-a_0-TH, \end{align} where $T$ denotes Lagrange multiplier. In our framework, we repeatedly solve the above optimization problem at successively decreasing values of $a_0$; as illustrated shortly. Note that the set $S$ is combinatorially large (i.e., {\small$|S|=\binom{n}{r}$}). Thus our decision variable space $p(\textbf{s})$ becomes intractable for large values of $n\choose r$. We reduce the search space by incorporating an assumption that $\{s_i\}$ are independent variables which introduces an additional term into the Lagrangian $L$ as shown later. More precisely, we dissociate the distribution $p(\cdot)$ over combinatorially large space $S$ into $p_i(\cdot)$ over individual entries $s_i\in\textbf{s}$, as given by \begin{align}\label{eq: dissaociate probabilities} p(\textbf{s})&=p(s_{1},s_2,\hdots,s_n)=\Pi_i^np_i(s_i). \end{align} This assumption of independence reduces the number of decision variables from $n\choose r$ to $n$ variables as shown below. Substituting the above dissociation (\ref{eq: dissaociate probabilities}) into the expression $D$ in the relaxed cost (\ref{eq: final objective}), we obtain \begin{align}\label{eq:indepD} \sum_{\textbf{s}\in S}p(\textbf{s})(\sum_{i=1}^N s_ix_ix_i^\top )&=\sum_{\textbf{s}\in S}\sum_{i}\prod_{j=1}^n p_j(s_j)s_ix_ix_i^\top \\ &=\sum_{i=1}^n\sum_{s_i}p_i(s_i)s_ix_ix_i^\top \end{align} Similarly, using (\ref{eq: dissaociate probabilities}) to modify $H$ in (\ref{eq:MEP}), we obtain \begin{align}\label{eq:indepH} H &= - \sum_S p(S)\log p(S)= - \sum_S p(S) \log \prod_{i}p_{i}(s_{i})\\ &= - \sum_{i} \sum_{s_{i}}p_{i}(s_{i})\log p_{i}(s_{i}) \end{align} For simpler notation, we introduce and define a new variable $q_i:=p_i(s_i=1)$ for each $1\leq i\leq n$; This definition implies $p_i(s_i=0)=1-q_i$ for each $i$. Therefore, using (\ref{eq:indepD}) and (\ref{eq:indepH}) in (\ref{eq: initial lag}), the Lagrangian $L(\mathbf{q},\mu,\ensuremath \mathbf{m})$ for the missing data A-optimality problem is given by \begin{align}\label{eq: final lag} \begin{split} L(\mathbf{q},\mu,\ensuremath \mathbf{m})&=\ensuremath \text{trace}(\sum_i^n q_ix_ix_i^\top)^{-1}-a_0+T\sum_{i} \big[q_{i}\log q_{i}\big]\\ &+ T\big[(1-q_{i})\log (1-q_{i})\big] +\mu(\sum_iq_i-r), \end{split} \end{align} where the last term of this Lagrangian is to account for the constraint of selecting $r$ rows from $n$. In equation (\ref{eq: final lag}), L is referred to as free energy and T as temperature borrowing analogies from statistical physics which defines free energy as difference between enthalpy and temperature times entropy. At large values of temperature T, this free energy optimization reduces to minimizing a convex function and hence results in global minimum. As T is annealed (decreased in value), higher weight is given to the relaxed cost function $\mathcal{A}$ changing the Lagrangian from a convex to non-convex function. Finally, as $T\rightarrow 0$, the objective reduces to solving for A-optimality. We solve for $q_i$ which minimizes $L$ by setting $\frac{\partial L}{\partial q_i}=0$. This results in the following update for $q_i$ \begin{align} q_i = \frac{1}{1+\exp\Big\{-\frac{1}{T}x_i^\top R^{-2}x_i + \frac{1}{T}\mu\Big\}},\label{eq: q update} \end{align} where $R=\sum_iq_ix_ix_i^\top $. Similarly, to solve for $\mu$, we exploit the fact that $\sum_iq_i=r$, and use $q_i$ from (\ref{eq: q update}), which results in the update of the form \begin{align}\begin{split} \mu&=T\log(\frac{K}{r}),\\ \text{where }\quad K&=\sum_i\frac{1}{\exp\{-\frac{1}{T}\mu\}+\exp\{-\frac{1}{T}x_i^\top R^{-2}x_i\}}.\end{split}\label{eq: mu update} \end{align} Finally, we determine the missing values $\ensuremath \mathbf{m}$ (when unconstrained) by setting $\frac{\partial L}{\partial x_{jk}}=0$, where $x_{jk}$ are the entries of the vector $\ensuremath \mathbf{m}\in M$. In particular, \begin{align} \frac{\partial L}{\partial x_{jk}}&=x_j^\top R^{-2}e_k,\label{eq: xstep}\\ \frac{\partial L}{\partial x_{jk}}=0&\implies x_{jk}=-\frac{1}{e_k^TR^{-2}e_k}\sum_{l\neq k}x_{jl}e_l^\top R^{-2}e_k,\label{eq: m_update} \end{align} where $R=\sum_i q_ix_ix_i^T$, and $e_k\in\mathbb{R}^p$ is a basis vector with value $1$ at the $k$-th location, and $0$ otherwise. It can be seen that the updates for $\textbf{q},\mu$ and $\textbf{m}=\text{vec}(x_{ij}=[X]_{ij}:(i,j)\in\mathcal{G})$ in (\ref{eq: q update}), (\ref{eq: mu update}), and (\ref{eq: m_update}), respectively, are implicit and depend on each other. Hence, in our algorithm we perform the above iterates simultaneously at each value of the annealing parameter $T$. In fact, through the following theorem we show that our iterates in (\ref{eq: q update}), (\ref{eq: mu update}), and (\ref{eq: m_update}) mimic a descent method; and thus, guarantee convergence to a local minimum with appropriate step sizes. \begin{theorem} (a) The implicit equation $q_i$ in (\ref{eq: q update}) corresponds to gradient descent step in the auxiliary variable $\xi_i:=-\log\frac{q_i}{1-q_i}$, or equivalently, $q_i = \frac{e^{-\xi_i}}{1+e^{-\xi}}$, where the descent step is given by \begin{align} \xi_i^+=\xi_i-T(\exp(\xi_i/2)+\exp(-\xi_i/2))^2\frac{\partial L}{\partial \xi_i}, \end{align} \\ (b) The implicit equation $\mu$ in (\ref{eq: mu update}) is analogous to the gradient descent step \begin{align} \mu^+=\mu-\frac{T}{\Bar{k}}\frac{\partial L}{\partial \mu}, \end{align} where $\bar{k}>0$ lies between $\sum_i q_i$ and $r$. \end{theorem} \begin{proof} See Appendix \ref{app: First}. \end{proof} Thus, at each given T, the updates $\textbf{q},\mu$ and $\textbf{m}$ given by (\ref{eq: q update}), (\ref{eq: mu update}) and (\ref{eq: m_update}) respectively, are analogous to the gradient descent step of the form \begin{align} \begin{bmatrix} [\xi_i^+]\\ \mu^+\\ [x_{jk}^+] \end{bmatrix}= \begin{bmatrix} [\xi_i]\\ \mu\\ [x_{jk}] \end{bmatrix}- \begin{bmatrix} [\gamma_i] & 0 & 0\\ 0 & \zeta & 0\\ 0 & 0 & [\phi_{jk}] \end{bmatrix} \begin{bmatrix} [\frac{\partial L}{\partial \xi_i}]\\ \frac{\partial L}{\partial \mu}\\ [\frac{\partial L}{\partial x_{jk}}] \end{bmatrix}, \end{align} where $\gamma_i=T(\exp(\xi_i/2)+\exp(-\xi_i/2))^2$, $\zeta=\frac{T}{\bar{k}}$, and $\phi_{jk}>0$ denotes the step size. Hence, local minimum at each temperature $T$ is obtained by solving (\ref{eq: q update}) for $q_i$, (\ref{eq: mu update}) for $\mu$, and (\ref{eq: m_update}) for $\ensuremath \mathbf{m}$. However, in the case where the missing data $\ensuremath \mathbf{m}$ are constrained to a domain, we solve for $\textbf{m}$ using standard constrained optimization routines like interior points method \cite{byrd1999interior}. We summarize the above steps in Algorithm \ref{alg: Algorithm1}. As stated before, in our algorithm we anneal the temperature from a large value $T\rightarrow \infty$, where the Lagrangian $L$ is dominated by the negative of Shannon entropy $-H$, and the algorithm results into uniform distribution $q_i=r/n$. As $T$ decreases, more weight is given to the cost function $\mathcal{A}$, and the $q_i$'s are no longer uniform. As $T\rightarrow 0$, the Lagrangian $L$ is dominated by the cost function $\mathcal{A}$, distribution $q_i\rightarrow\{0,1\}$ as can be seen from (\ref{eq: q update}), and we minimize the original objective in (\ref{Eq: original objective}). \begin{algorithm} {\textbf{Input:} $X\in\mathbb{R}^{n\times p},T_{\text{init}},\alpha<1$, $\{a_{ij}\}$, $\{b_{ij}\}$, $r$, $\ensuremath \mathbf{m}_{\text{init}}$, $T_{\min}$,$T_{\text{init}}$;\\ \textbf{Output: }{$\textbf{q}$, $\textbf{m}$}\\ $T\leftarrow T_{\text{init}},\textbf{q}\leftarrow\frac{r}{n},\textbf{m}\leftarrow \ensuremath \mathbf{m}_{\text{init}}$\\ \While{$T>T_{\min}$}{ \While{$\text{until convergence}$}{Update $\mathbf{q},\mu$ as in (\ref{eq: q update}), (\ref{eq: mu update}),\\ Update $\ensuremath \mathbf{m}$ using (\ref{eq: m_update}) (unconstrained), or interior-points methods (constrained case). } T=$\alpha$T} \Return ($\textbf{q}$, $\textbf{m}$) \caption{Design of experiments and imputation of missing data}\label{alg: Algorithm1}} \end{algorithm It can be seen that direct minimization of the A-optimality objective alone by setting the first derivative of the objective function to zero might be stuck at any of multiple local minima and is tightly dependent on initialization. The underlying idea of our proposed algorithm is to find global minimum at large temperatures T, where the problem is convex and track it as we decrease T. As we complete the annealing, the distribution $q_i$ become {\em hard}, and we minimize the original cost function in (\ref{Eq: original objective}). In the subsequent section we compare our Algorithm \ref{alg: Algorithm1} with sequential benchmark methods to demonstrate the efficacy of our proposed methodology. \section{SIMULATION}\label{Section: Simulation} In this section we demonstrate the efficacy of our proposed Algorithm \ref{alg: Algorithm1} in solving the simultaneous experiment selection, and feature data imputation problems underlying the model-based DoE. Algorithm \ref{alg: Algorithm1} takes in $X(\textbf{m})\in\mathbb{R}^{n\times p}$ and $r$ as inputs, where $\textbf{m}$ (as in (\ref{eq: setM})) denotes the missing data in the matrix $X(\textbf{m})$, and $r$ denotes the number of experiments to be selected. Since there are no existing works which simultaneously address missing data imputation and selection of experiments, we provide comparison of our Algorithm \ref{alg: Algorithm1} with a sequential methodology to solve the above two problems. That is, we (a) first implement a commonly used mean imputation for missing feature data $\mathbf{m}$ \cite{eekhout2014missing}, and (b) subsequently use either simple uniform sampling \cite{pmlr-v70-allen-zhu17e} (with equal probability to sample each row) or standard Federov's exchange \cite{miller1994algorithm} algorithm (which swaps selected rows, one at a time, with the ones available to minimize the objective) for selecting the appropriate set of $r$ experiments. \begin{figure} \centering \includegraphics[width=0.5\columnwidth]{missing_data1.png} \caption{Illustrates an example input data matrix $X(\textbf{m})$ with missing data. The darker shade positions indicate missing values and lighter shade denotes a known value in a given range obtained from a random distribution. This example $X\in\mathbb{R}^{20\times 5}$ has $24\%$ missing data.} \label{fig: missing data} \end{figure} In our simulations, we generate incomplete matrices $X(\mathbf{m})$ of various sizes with values missing at randomly selected locations $\mathbf{m}$. Figure \ref{fig: missing data} illustrates an example of such matrices. In the figure, cells marked in darker shade indicate locations of missing values, and those marked in lighter shade denote known entries of the matrix. We evaluate the performance of our Algorithm \ref{alg: Algorithm1}, and compare with the above sequential methodologies on 6 example scenarios. First example E1 generates $X\in\mathbb{R}^{20\times4}$ with $12.5\%$ entries missing from randomly selected locations, and each {\em known} data point in the range of $[-1,2]$. The task is to simultaneously impute for these missing values and select 11 rows (experiments) from $X$. In the second example E2, we create an input data matrix of same size, i.e $X\in\mathbb{R}^{20\times4}$, but with values in range of $[0,4]$ and $10\%$ data missing at random places. The objective here in addition to imputing missing data is to select 12 experiments from the set. Similar examples, E3-E6, are generated to simulate various instances of missing data. See Table \ref{tab:experiments} for details. \begin{table}[h!] \centering \begin{tabular}{ |c| c| c| c| c|} \hline No. &$n\times p$ &$\%$ \textbf{m} & r &range of data \\ \hline E1 & $20\times4$ &12.5 &11 &$[-1,2]$\\ E2 & $20\times4$ &10 &12 &$[0,4]$\\ E3 & $20\times4$ &16.25 &12 &$[-2,2]$\\ E4 & $20\times5$ &24 &11 &$[0,1]$\\ E5 & $30\times5$ &10 &12 &$[5,10]$\\ E6 & $30\times5$ &10 &6 &$[5,10]$\\ \hline \end{tabular} \caption{This table illustrates 6 example simulations we run Algorithm \ref{alg: Algorithm1} and benchmarks on. $n\times p$ indicates size of input matrix $X$, $\%$\textbf{m} indicate the percentage of missing data, r denotes number of rows to be selected, and range of data column indicates the data range of known values. Note that the notation is consistent with ones used in Section \ref{section: Problem Formulation}.} \label{tab:experiments} \end{table} \begin{figure} \centering \includegraphics[width=0.7\columnwidth]{simulation2_edited1_final.png} \caption{Demonstrates the efficacy of Algorithm \ref{alg: Algorithm1} against other benchmarks on examples elaborated in Table \ref{tab:experiments}. For each example on X-axis, we report the ratio of cost obtained from Algorithm \ref{alg: Algorithm1} for solving the combined objective with that obtained from other algorithms on Y-axis (i.e cost as a result of Algorithm \ref{alg: Algorithm1}/cost obtained from benchmark algorithms). As indicated by the legend various shapes of points indicate different benchmarks used. A value less than 1 on Y-axis indicates Algorithm \ref{alg: Algorithm1} results in a cost less than the benchmarks and hence performs better.} \label{fig: experiments} \end{figure} Figure \ref{fig: experiments} illustrates the comparison of the Algorithm \ref{alg: Algorithm1} with the above stated benchmark sequential methodologies. In particular, it plots the ratio of the A-optimal cost incurred using Algorithm \ref{alg: Algorithm1} with the cost incurred when using the sequential methodologies for each of the experiments E1-E6 described in Table \ref{tab:experiments}. Note that the Algorithm \ref{alg: Algorithm1} consistently performs better than the benchmark methods. For instance, in the example E1 our Algorithm \ref{alg: Algorithm1} results into a solution that (a) incurs only $0.6$ times the cost incurred when using mean imputations for missing data followed by our MEP-based algorithm (assuming complete known matrix $X\in \mathbb{R}^{n\times p}$), (b) incurs only $0.52$ times the cost incurred with mean data imputation followed by the standard Fedorovs algorithm, and (c) incurs only $0.35$ times the cost incurred with mean data imputation followed by uniform sampling of experiments. Similarly, in the example E4 our Algorithm \ref{alg: Algorithm1} (a) incurs a cost that is $0.47$ times the cost incurred by mean data imputation followed by our MEP-based algorithm (assuming complete known matrix $X$) to select experiments, (b) incurs a cost that is $0.42$ times the cost incurred when using Fedorovs algorithm for selecting experiments after mean data imputations, and (c) incurs a cost that is $0.2$ times the cost incurred when using uniform sampling for selecting experiments after mean data imputations. Further as seen from Figure \ref{fig: experiments}, given a complete matrix $X$ with imputed values, MEP based Algorithm \ref{alg: Algorithm1} consistently performs better than other standard methods like Fedorov's exchange. Please refer to Figure \ref{fig: experiments} for details on all the other experiments. \begin{comment} We compare our proposed Algorithm \ref{alg: Algorithm1} on the examples E1-E6 with 3 other approaches to solve the same problem. In particular, we run 4 algorithms on each missing feature data imputation and experiment selection problem. First, Algorithm \ref{alg: Algorithm1} which solves for both imputation and experiment selection simultaneously. For rest of the benchmarks, we follow the standard mean imputation for missing data. In particular, each missing data is replaced by mean of the existing data in the same column. For second benchmark, this mean imputation is followed by experiment selection task using Algorithm \ref{alg: Algorithm1}. Third, we follow mean imputation as described above, followed by experimental design using standard Fedorov's algorithm. Finally as a naive baseline, we follow mean imputation with random experiment selection. The present results of our simulations in Figure (\ref{fig: experiments}). For each experiment E1-E6 on X-axis, we plot the ratio of A-optimal cost as calculated from Algorithm \ref{alg: Algorithm1} after solving the combined task of data imputation and experiment selection with the cost obtained from the rest benchmarks. This implies, a value less than 1 on Y-axis in Figure (\ref{fig: experiments}) implies the algorithm results in cost greater than that obtained from Algorithm \ref{alg: Algorithm1}. As can be seen in Figure (\ref{fig: experiments}), experiment selection and imputation using the suggested algorithm (\ref{alg: Algorithm1}) outperforms the rest in all the simulations. For instance, on first example E1, our Algorithm \ref{alg: Algorithm1} obtains a cost half of that from using mean imputation followed by Fedorov's exchange. Further, it can be seen that given a matrix with no missing values, Algorithm \ref{alg: Algorithm1} does better than standard Fedorov's exchange or naive random sampling. Further, we observe that as expected random sampling has higher variance in resulting design when compared to any of the above methods. The suggested algorithm results in a cost function lower than mean imputation followed by Fedorov's exchange by an average of $62\%$. \end{comment} To illustrate the benefit of annealing as done in our proposed Algorithm \ref{alg: Algorithm1}, we benchmark our results to that of direct optimization of the posed objective given by (\ref{Eq: original objective}) using standard constrained optimization routine interior points method\cite{byrd1999interior}. On first example, E1, we obtain a cost $0.57$ times lower using Algorithm \ref{alg: Algorithm1} compared to that of of direct optimization. This demonstrates the benefit of annealing in avoiding poor local minimum. An interesting observation while performing the direct optimization using interior points method is that selection of experiments do not change much from the initialization but still, it gives a competitive cost to other algorithms. This is attributed to the imputed missing feature data in a coupled manner and hence strengthens the utility of our proposed problem (\ref{Eq: original objective}). \section{DISCUSSION AND ANALYSIS}\label{section: discussion and analysis} Here we highlight some of the features and extensions of our proposed framework. \subsection{Generalization to different optimality criteria} In this work, our MEP-based framework minimizes the A-{\em optimality criteria} in (\ref{Eq: original objective}) to determine the feature data imputations, and select appropriate experiments that ascertain the regression parameter $\beta$. As illustrated in Section \ref{section: introduction}, there are several such linear and non-linear design {\em optimality criteria} developed in literature \cite{pukelsheim2006optimal}. Our proposed MEP-based methodology easily extends to these optimality criteria. For instance, consider the D-optimality design criteria that minimizes the determinant of the variance in estimation of $\beta$ $(\Sigma^{-1})$, i.e. it solves the objective $\min_{\mathbf{s}\in S,\mathbf{m}\in M}\big(\text{det}(X(\mathbf{m})^\top\Lambda(\mathbf{s})X(\mathbf{m})^\top)\big)^{-1/p}$ \cite{pukelsheim2006optimal}. Similar to the case of A-optimality illustrated in the Section \ref{section: Problem Formulation}, here we again reformulate the D-optimaltiy criteria as $\min_{\mathbf{\eta},\mathbf{m}\in M}\big(\text{det}(\sum_{\mathbf{s}\in S}\eta(\ensuremath \mathbf{s})X(\mathbf{m})^\top\Lambda(\mathbf{\ensuremath \mathbf{s}})X(\mathbf{m})^\top)\big)^{-1/p}$ in terms of the binary decision variable $\eta(\mathbf{s})$. The subsequent solution approach to determine the set of experiments $\mathbf{s}$, and the feature data imputations $\mathbf{m}$ that minimize D-optimality remains similar to the one illustrated in the Section \ref{section: Solution Approach}. \subsection{Flexibility to incorporate constraints} Various application areas involving design of experiments require efficient utilization of resources; resulting into several capacity, and feasibility based constraints in the optimization problem (\ref{Eq: original objective}). For instance, consider a scenario where the cost vector $\mathbf{c_i}:=(\mathbf{c_i^1},\hdots,\mathbf{c_i^p})\in \mathbb{R}^p$ indicates the cost (related to individual features) incurred in performing the $i$-th experiment in $X\in\mathbb{R}^{n\times p}$. The limited budget constraint on the resources pose the constraint of the form $\sum_i\mathbf{c_i}s_i = \mathbf{\kappa}$, where $s_i\in\{0,1\}$ indicates selection of an experiment, and $\mathbf{\kappa}:=(\mathbf{\kappa_1},\hdots,\mathbf{\kappa_p})\in\mathbb{R}^p$ denotes the maximum budget available for the individual features of the experiment. Our framework is flexible, and easily incorporates such constraints. More precisely, we re-interpret the above budget constraint as $\sum_i \mathbf{c_i}q_i = \mathbf{\kappa}$ in terms of our decision variable $q_i:=p_i(s_i=1)$. With this constraint introduced into the optimization problem (\ref{eq:MEP}), the augmented Lagrangian $\mathcal{L}_1$ is given by \begin{align}\label{eq: augmented_Lag} \mathcal{L}_1 &= \text{Trace}(\sum_i^n q_ix_ix_i^\top)^{-1}+\mu(\sum_iq_i-r)+T\sum_{i} \big[q_{i}\log q_{i}\big]\nonumber\\ &+ T\big[(1-q_{i})\log (1-q_{i})\big] + \nu^\top(\sum_i \mathbf{c_i}q_i - \mathbf{\kappa}), \end{align} where $\nu\in\mathbb{R}^p$ is the Lagrange parameter. Minimizing $\mathcal{L}_1$ with respect to $q_i$ results into \begin{align}\label{eq: new_q_const} &q_i = \frac{1}{1+\exp\Big\{-\frac{1}{T}\big(x_i^\top R^{-2}x_i-\mu-\sum_j \nu_j\mathbf{c_i^j}\big)\Big\}}\\ &~= \frac{\eta_l}{\eta_l+\exp\Big\{-\frac{1}{T}\big(x_i^\top R^{-2}x_i-\mu-\sum_{j}\nu_j\mathbf{c_i^j}+\nu_l\big)\Big\}}\nonumber, \end{align} where $\eta_l:=\exp(-\nu_l/T)$. Noting that the desired budget constraint for the $j$-th feature is given by $\sum_i\mathbf{c_i^j}q_i=\mathbf{\kappa_j}$, the update equation for $\eta_l$ is obtained by substituting $q_i$ in the above constraint, i.e., we obtain the update equation \begin{align}\label{eq: budget_upd} \eta_l = \frac{\mathbf{\kappa_j}}{\sum_i \mathbf{c_i}^j\frac{1}{\eta_l+\eta_l\exp\Big\{-\frac{1}{T}\big(x_i^\top R^{-2}x_i-\mu-\sum_{j}\nu_j\mathbf{c_i^j}\big)\Big\}}}. \end{align} As illustrated in Section \ref{section: Solution Approach}, we can deterministically optimize the Lagrangian $\mathcal{L}_1$ in (\ref{eq: augmented_Lag}) at successively decreasing values of the annealing temperature $T$ by alternating between the equations (\ref{eq: new_q_const}), (\ref{eq: mu update}), and (\ref{eq: budget_upd}) until convergence. {Subsequently, as in Algorithm \ref{alg: Algorithm1} we impute the missing data (if any) $\mathbf{m}$ that minimize (local) $\mathcal{L}_1$ in (\ref{eq: augmented_Lag}) using optimization routines like interior-points method.} As a part of our ongoing research, we are working towards (a) a proof of convergence of the above iterates, and (b) extending our framework to incorporate inequality constraints in the optimization problem (\ref{Eq: original objective}). \begin{appendices} \section{}\label{app: First} {\bf Proof of Theorem 1.} From the Lagrangian L given by (\ref{eq: final lag}), we get \begin{align}\label{eq: Dlag} \frac{\partial L}{\partial q_i}=T\log(\frac{q_i}{1-q_i})+\mu-x_i^\top R^{-2}x_i \end{align} Let $\xi_i=-\log(\frac{q_i}{1-q_i})\implies q_i=\frac{\exp(-\xi_i)}{1+\exp(-\xi_i)}$. Hence, from (\ref{eq: Dlag}), the update for $\xi_i$ in each iteration is \begin{align} \xi_i^+=-\frac{1}{T}(x_i^\top R^{-2}x_i-\mu) \end{align} Further, \begin{align} \frac{\partial L}{\partial q_i}=\frac{\partial L}{\partial \xi_i}\frac{\partial \xi_i}{\partial q_i}&=-\frac{\partial L}{\partial \xi_i}\big[\frac{1}{q_i}+\frac{1}{1-q_i}\big]\\&=-\frac{\partial L}{\partial \xi_i}\big[\exp(-\xi_i/2)+\exp(\xi_i/2)\big]^2\label{eq: xistep}. \end{align} It also follows from (\ref{eq: Dlag}) that \begin{align}\label{eq: xiDlagq} \frac{\partial L}{\partial q_i}=-T\xi_i+T\xi_i^+ \end{align} From (\ref{eq: xistep}) and (\ref{eq: xiDlagq}), \begin{align} \xi_i^+=\xi_i-T\big[\exp(-\xi_i/2)+\exp(\xi_i/2)\big]^2\frac{\partial L}{\partial \xi_i}\label{eq: xistep}. \end{align} Similarly, for $\mu$ using (\ref{eq: mu update}) we directly arrive at \begin{align} \mu^+&=\mu-T\log(\frac{\sum_i q_i}{r})\\ &=\mu-T\frac{\log(\sum_iq_i)-\log r}{\sum_i q_i-r}(\sum_iq_i-r)\\ &=\mu-T\frac{\log(\sum_iq_i)-\log r}{\sum_i q_i-r}\frac{\partial L}{\partial \mu}\label{eq: mustep} \end{align} Since $f(x)=\log(x)$ satisfies conditions for mean value theorem between $(\sum_i q_i,r)$, there exists $\Bar{k}\in(\sum_i q_i,r)$ such that $\frac{1}{\Bar{k}}=\frac{\log(\sum_iq_i)-\log r}{\sum_i q_i-r}$. Since $\sum_iq_i>0$ and $r>0$, $\Bar{k}>0$. \end{appendices} \bibliographystyle{IEEEtran}
\section*{Abstract} \textbf{ The spatial discretization of the single-cone Dirac Hamiltonian on the surface of a topological insulator or superconductor needs a special ``staggered'' grid, to avoid the appearance of a spurious second cone in the Brillouin zone. We adapt the Stacey discretization from lattice gauge theory to produce a generalized eigenvalue problem, of the form $\bm{\mathcal H}\bm{\psi}=\bm{E}\bm{\mathcal P}\bm{\psi}$, with Hermitian tight-binding operators $\bm{\mathcal H}$, $\bm{\mathcal P}$, a locally conserved particle current, and preserved chiral and symplectic symmetries. This permits the study of the spectral statistics of Dirac fermions in each of the four symmetry classes A, AII, AIII, and D. } \vspace{10pt} \noindent\rule{\textwidth}{1pt} \tableofcontents\thispagestyle{fancy} \noindent\rule{\textwidth}{1pt} \vspace{10pt} \section{Introduction} \label{intro} Three-dimensional topological insulators are Nature's way of working around the Nielsen-Ninomiya no-go theorem \cite{Nie81}, which forbids the existence of a single species of massless Dirac fermions on a lattice. The fermion doubling required by the theorem is present in a topological insulator slab, but the two species of Dirac fermions are spatially separated on opposite surfaces \cite{Has10,Qi11}. On each surface the two-dimensional (2D) Dirac Hamiltonian \begin{equation} H_{\rm D}=\hbar v_{\rm F}\bm{k}\cdot\bm{\sigma}=-i\hbar v_{\rm F}\left(\sigma_x\frac{\partial}{\partial x}+\sigma_y\frac{\partial}{\partial y}\right)\label{HDirac} \end{equation} emerges as the effective low-energy Hamiltonian, with a single Dirac cone at $\bm{k}=(k_x,k_y)=0$. Since it is computationally expensive to work with a three-dimensional (3D) lattice, one would like to be able to discretize the 2D Dirac Hamiltonian, without introducing a second Dirac cone. We can draw inspiration from lattice gauge theory, where a variety of strategies have been developed to avoid fermion doubling \cite{Kog83,Kap09}. The condensed matter context introduces its own complications, notably the lack of translational invariance and breaking of chiral symmetry by disorder and boundaries. In Ref.\ \citen{Two08} it was shown how the transfer matrix of the Dirac equation in a disorder potential can be discretized without fermion doubling. This allows for efficient calculation of the conductance and other transport properties in an open system \cite{Med10,Bor11,Her12}. Here we apply the same approach to the Hamiltonian of a closed system, in order to study the spectral statistics. The Nielsen-Ninomiya theorem forbids a local discretization of the eigenvalue problem $H_{\rm D}\psi=E\psi$ without fermion doubling and without breaking the chiral symmetry relation \begin{equation} \sigma_z H_{\rm D}=-H_{\rm D}\sigma_z.\label{chiralsym} \end{equation} One way to circumvent the no-go theorem, is to abandon the locality by introducing long-range hoppings in the discretized Dirac Hamiltonian \cite{Dre76}. Here we follow an alternative route, following Stacey \cite{Sta82}, which is to work with a \textit{generalized} eigenvalue problem \begin{equation} {\cal H}\psi=E{\cal P}\psi, \end{equation} with \textit{local} tight-binding operators ${\cal H}$ and ${\cal P}$ on both sides of the equation. Going beyond Ref.\ \citen{Sta82}, we transform the operators ${\cal H}$ and ${\cal P}$ such that they remain, respectively, Hermitian and positive definite in the absence of translational invariance. This favors a stable and efficient numerical solution, and moreover guarantees that the resulting spectrum is real, not only in the continuum limit but at any grid size. A key feature of our approach, compared with the more familiar approaches of Wilson fermions \cite{Wil74} and Susskind fermions \cite{Sus77}, is that both the chiral symmetry \eqref{chiralsym} is preserved and the symplectic time-reversal symmetry \cite{notesymplectic} \begin{equation} \sigma_y H^\ast_{\rm D}\sigma_y=H_{\rm D}.\label{HDsymplectic} \end{equation} This also implies the conservation of the product of the chiral and symplectic symmetries, which is a particle-hole symmetry, \begin{equation} \sigma_x H^\ast_{\rm D}\sigma_x=-H_{\rm D}.\label{HDparticlehole} \end{equation} To demonstrate the capabilities of our approach we calculate the spectral statistics of a disordered system and show how the numerics distinguishes broken versus preserved chiral or symplectic symmetry in each of the four symmetry classes of random-matrix theory \cite{Eve08}. The outline of the paper is as follows: In the next section we formulate the generalized eigenproblem, first following Stacey \cite{Sta82} for a translationally invariant system, and then including disorder. The symmetrization that produces a Hermitian ${\cal H}$ and positive definite ${\cal P}$ is introduced in Sec.\ \ref{sec_symm}. The locality of the discretization scheme is demonstrated by the construction of a locally conserved current in Sec.\ \ref{sec_jA}. By applying different types of disorder, in scalar potential, vector potential, or mass, we can access the different symmetry classes and obtain the characteristic spectral statistics for each, as we show in Sec.\ \ref{sec_spectral}. We conclude in Sec.\ \ref{sec_conclude}. \section{Construction of the generalized eigenproblem} \label{sec_construct} \subsection{Staggered discretization} If we discretize the Dirac Hamiltonian \eqref{HDirac} on a lattice (lattice constant $a$), the replacement of the momentum $k$ by $a^{-1}\sin ka$ produces a second Dirac cone at the edge of the Brillouin zone ($k= \pi/a$). To place our work into context, we summarize methods to remove this spurious low-energy excitation. If one is willing to abandon the locality of the Hamiltonian, one can eliminate the fermion doubling by a discretization of the spatial derivative that involves all lattice points, $df/dx\mapsto \sum_{n}(-1)^n n^{-1} f(x-na)$. The resulting dispersion remains strictly linear in the first Brillouin zone. This discretization scheme goes by the name of {\sc slac} fermions \cite{Dre76} in the high-energy physics literature. It has recently been implemented in a condensed matter context \cite{Lan19}. An alternative line of approach preserves the locality at the expense of a symmetry breaking. The simplest way is to couple the top and bottom surfaces of the topological insulator slab \cite{Sha10,Zho17}. The coupling adds a momentum dependent mass term $\mu\sigma_z(1-\cos ka)$ which gaps out the second cone, while breaking both chiral symmetry and symplectic symmetry. This is the Wilson fermion regularization of lattice gauge theory \cite{Wil74,Gin82}. The product of chiral and symplectic symmetry is preserved by Wilson fermions, which may be sufficient for some applications \cite{Mes17,Ara19}. It is possible to maintain the chiral symmetry by discretizing the Dirac Hamiltonian on a pair of staggered grids. Much of the lattice gauge theory literature is based on the Susskind discretization \cite{Sus77}, which applies a different grid to each of the two components of the spinor wave function $\psi$. On a 2D lattice it reduces the number of Dirac cones in the Brillouin zone from 4 to 2. Chiral symmetry is preserved, but symplectic symmetry is broken by the Susskind discretization (see App.\ \ref{appSusskind}). Hammer, P\"{o}tz, and Arnold \cite{Ham14b,Ham14c} have developed an ingenious single-cone discretization method for the \textit{time-dependent} Dirac equation. As in the Susskind discretization, different grids are used for each of the spinor components, but these are staggered not only in space but also in time. While this method is well suited for dynamical simulations \cite{Ham13,Pot17}, it is not easily adapted to energy-resolved spectral studies. An altogether different approach, introduced by Stacey \cite{Sta82,Ben83}, is to evade the fermion-doubling no-go theorem by the replacement of the conventional eigenvalue problem ${H}_{\rm D}\psi=E\psi$ by a generalized eigenproblem $U\psi=E\Phi\psi$. There is now no obstruction to having a local $U$ and $\Phi$ and also preserving chiral and symplectic symmetry. The Stacey discretization of the transfer matrix was implemented in Ref.\ \citen{Two08}. In what follows we show how to apply it to the Hamiltonian, to solve the time-independent Dirac equation on a 2D lattice. In the next subsection we first summarize the results of Ref.\ \citen{Sta82} for a translationally invariant system, and then will present the modifications needed to apply the method in the presence of a disorder potential. \subsection{Translationally invariant system} \begin{figure}[tb] \centerline{\includegraphics[width=0.4\linewidth]{layout}} \caption{A pair of staggered grids (lattice constant $a$, lattice vectors $e_x,e_y$) used in the Stacey discretization of the 2D Dirac equation. The wave function and its spatial derivatives are evaluated at the open lattice points, in terms of the values on the four neighboring closed lattice points. The basis states $\langle\bm{n}|$ and $|\bm{n}\rangle$ on the two lattices are indicated. } \label{fig_layout} \end{figure} We seek to discretize the Dirac equation $H_{\rm D}\psi = E\psi$ on a 2D square lattice (lattice constant $a$). We denote the discretized wave function by $\psi_{\bm{n}}$, with $\bm{n}=(n_x,n_y)\in\mathbb{Z}^2$ labeling the lattice points at $n_xe_x+n_ye_y$. For ease of notation we will henceforth set $v_{\rm F}$, $\hbar$, and $a$ to unity. Staggered discretization \textit{a la} Stacey means that the wave function and its spatial derivatives are evaluated on a displaced lattice with sites at the center of the unit cells of the original lattice (see Fig.\ \ref{fig_layout}). The discretization rules are: \begin{subequations} \begin{align} &\frac{\partial\psi}{\partial x} \mapsto \tfrac{1}{2}(\psi_{\bm n+e_x}+\psi_{\bm n+e_x+e_y}-\psi_{\bm n}-\psi_{\bm n+e_y}) ,\\ &\frac{\partial\psi}{\partial y}\mapsto \tfrac{1}{2}(\psi_{\bm n+e_y}+\psi_{\bm n+e_x+e_y}-\psi_{\bm n}-\psi_{\bm n+e_x}),\\ &\psi\mapsto \tfrac{1}{4}(\psi_{\bm n}+\psi_{\bm n+e_x}+\psi_{\bm n+e_y}+\psi_{\bm n+e_x+e_y}) . \end{align} \end{subequations} In distinction to Susskind staggering, the same discretization applies to each spinor component. In momentum representation, $\psi(\bm{k})=\sum_{\bm{n}}\psi_{\bm{n}}e^{-i\bm{k}\cdot\bm{n}}$, the discretized Dirac equation reads \begin{equation} {U}(\bm{k})\psi(\bm{k})=E\Phi(\bm{k})\psi(\bm{k}),\label{eq:stacey} \end{equation} with the $\bm{k}$-dependent operators \begin{equation} \begin{split} &{U}=-\tfrac{1}{2}{i}\sigma_x({e}^{{i} k_x}-1)({e}^{{i} k_y}+1)-\tfrac{1}{2}{i}\sigma_y({e}^{{i} k_x}+1)({e}^{{i} k_y}-1),\\ &\Phi=\tfrac{1}{4}({e}^{{i} k_x}+1)({e}^{{i} k_y}+1). \end{split} \end{equation} The dispersion relation \begin{equation} E(\bm{k})=\pm 2\sqrt{\tan^2(k_x/2)+\tan^2(k_y/2)} \end{equation} has a single Dirac point at $\bm{k}=0$. The Dirac point at the edge of the Brillouin zone has been converted into a pole by the Stacey discretization. \subsection{Including a disorder potential} We break translational invariance by including in the Dirac equation a spatially dependent scalar potential $V\sigma_0$, vector potential $A_x\sigma_x+A_y\sigma_z$, and mass $M\sigma_z$, \begin{equation} (-{i}\nabla+e\bm{A})\cdot\bm\sigma\psi +(V\sigma_0+M{\sigma_z})\psi= E\psi.\label{Diraceq2} \end{equation} The electron charge $e$ is set to unity in what follows. The Pauli matrices $\bm{\sigma}=(\sigma_x,\sigma_y)$ and $\sigma_z$ act on the spin degree of freedom, with $\sigma_0$ the $2\times 2$ unit matrix. On the surface of a topological insulator the mass term represents a perpendicular magnetization. Alternatively, we can consider a 2D topological superconductor with chiral \textit{p}-wave pair potential, described by the Bogoliubov-de Gennes (BdG) Hamiltonian \begin{equation} H_{\rm BdG}=\left(\frac{k^2}{2m}+V-E_{\rm F}\right)\sigma_z+v_\Delta(\bm{k}\cdot\bm{\sigma}).\label{HBdG} \end{equation} The Pauli matrices now act on the electron-hole degree of freedom, electrons and holes are coupled by the pair potential $\propto v_\Delta$. Since this coupling is linear in momentum $k$, the quadratic kinetic energy $k^2/2m$ can be neglected near $k=0$. The difference $V-E_{\rm F}$ of electrostatic potential $V$ and Fermi energy $E_{\rm F}$ then plays the role of the mass term $M$ in Eq.\ \eqref{Diraceq2}. The low-energy physics of the problem is governed by three symmetry relations, the chiral symmetry \eqref{chiralsym}, the symplectic symmetry \eqref{HDsymplectic}, and the particle-hole symmetry \eqref{HDparticlehole}. Chiral symmetry is preserved by $\bm{A}$ and broken by $V$ or $M$. Symplectic symmetry is preserved by $V$ and broken by $M$ or $\bm{A}$. If at least two of the three potentials $V,M,\bm{A}$ are nonzero all symmetries of the Dirac Hamiltonian are broken. Finally, if $V=0$, $\bm{A}=0$ while $M\neq 0$ the particle-hole symmetry \eqref{HDparticlehole} remains. Table \ref{table_symm} summarizes the symmetry classification \cite{Eve08}. \begin{table}[tb] \begin{center} \begin{tabular}{c|c|c|c|c} symmetry&symplectic&chiral&particle-hole&class\\ \hline $V\neq 0\neq M$&$\times$&$\times$&$\times$&A\\ $V\neq 0=M,\bm{A}$&$\checkmark$&$\times$&$\times$&AII\\ $\bm{A}\neq 0 =V,M$&$\times$&$\checkmark$&$\times$&AIII\\ $M\neq 0=V,\bm{A}$&$\times$&$\times$&$\checkmark$&D \end{tabular} \end{center} \caption{The four symmetry classes realized by single-cone Dirac fermions \cite{Eve08}. The table lists the broken ($\times$) and preserved ($\checkmark$) symmetries of the Dirac Hamiltonian, in the presence of a scalar potential $V$, vector potential $\bm{A}$, and mass $M$. Class A applies if at least two of the three $V,M,\bm{A}$ are nonzero. } \label{table_symm} \end{table} The inclusion of the vector potential requires a separate consideration, in order to preserve gauge invariance. We delay that to Sec.\ \ref{sec_jA}, at first we only include $V$ and $M$. To incorporate the spatially dependent terms in the discretization scheme we write the operators $U$ and $\Phi$ in the position basis. In view of the identity \begin{equation} e^{ik_\alpha}=\sum_{\bm{n}}|\bm{n}\rangle\langle\bm{n}|e^{ik_\alpha}=\sum_{\bm{n}}|\bm{n}\rangle\langle\bm{n}+e_\alpha|, \end{equation} we have \begin{align} &U=-\tfrac{1}{2}i \sigma_x\Omega_{+-}-\tfrac{1}{2}i \sigma_y\Omega_{-+},\;\;\Phi=\tfrac{1}{4}\Omega_{++},\\ &\Omega_{ss'} =\sum_{\bm n}\biggl(ss'|{\bm n}\rangle\langle{\bm n}| +s |{\bm n}\rangle\langle{\bm n+e_x}| + s'|{\bm n}\rangle\langle{\bm n+e_y}|+ |{\bm n}\rangle\langle{\bm n+e_x+e_y}| \biggr). \end{align} For later use we also define the factorization $\Phi=\Phi_x\Phi_y$, with commuting operators $\Phi_x,\Phi_y$ given by \begin{equation} \Phi_\alpha=\tfrac{1}{2}(e^{ik_\alpha}+1)=\tfrac{1}{2}\sum_{\bm{n}}\biggl(|{\bm n}\rangle\langle{\bm n}| +|{\bm n}\rangle\langle{\bm n+e_\alpha}|\biggr).\label{Phialphadef} \end{equation} In these equations the ket states $|\bm{n}\rangle$ refer to sites on the displaced lattice (open lattice points in Fig.\ \ref{fig_layout}), while the bra states $\langle\bm{n}|$ refer to sites on the original lattice (closed lattice points). The inner product is defined such that the two sets of eigenstates of position are orthonormal, $\langle \bm{n}'|\bm{n}\rangle=\delta_{\bm{n},\bm{n}'}$. We define the potential and mass operators, \begin{equation} V=\sum_{\bm{n}}V_{\bm{n}}|\bm{n}\rangle\langle \bm{n}|,\;\; {M}=\sum_{\bm{n}}{M}_{\bm{n}}|\bm{n}\rangle\langle \bm{n}|, \end{equation} where $V_{\bm{n}}$ and ${M}_{\bm{n}}$ denote the value at the open lattice point $\bm{n}$. With this notation we have the discretized Dirac equation \begin{equation} U\psi+(V\sigma_0+{M}{\sigma}_z)\Phi\psi=E\Phi\psi.\label{UpsiEPhipsi} \end{equation} The product $V\Phi\psi$ multiplies the value of $V$ on an open lattice point with the average of the values of $\psi$ on the four adjacent closed lattice points, and similarly for $M\Phi\psi$. Eq.\ \eqref{UpsiEPhipsi} is a generalized eigenvalue problem, with operators on both sides of the equation. Neither operator is Hermitian. This is problematic in a numerical implementation, and we will show in the next section how to resolve that difficulty. \section{Symmetrization of the generalized eigenproblem} \label{sec_symm} We wish to rewrite Eq.\ \eqref{UpsiEPhipsi} in the form ${\cal H}\psi=E{\cal P}\psi$, with Hermitian ${\cal H}$ and Hermitian positive definite ${\cal P}$. Such a symmetrization of the generalized eigenvalue problem allows for a stable and efficient numerical solution \cite{Pet70,McC81,note1}. Moreover, it guarantees real eigenvalues $E$ and eigenvectors $\psi_E$ that satisfy the orthogonality relation $\langle\psi_E|{\cal P}|\psi_E'\rangle=0$ if $E\neq E'$. We multiply both sides of Eq.\ \eqref{UpsiEPhipsi} by $\Phi^\dagger$ and note that $\Phi^\dagger U$ is a Hermitian operator. In position basis it reads \begin{subequations} \label{Ddef} \begin{align} &\Phi^\dagger U=-i{\bm D}\cdot\bm{\sigma},\;\;{\bm D}=(D_x,D_y),\\ &D_x=\tfrac{1}{8}\sum_{\bm n}\biggl(2|{\bm n}\rangle\langle{\bm n+e_x}| + |{\bm n}\rangle\langle{\bm n+e_x+e_y}|+ |{\bm n}\rangle\langle{\bm n+e_x-e_y}| \biggr)-\text{H.c},\\ &D_y=\tfrac{1}{8}\sum_{\bm n}\biggl(2|{\bm n}\rangle\langle{\bm n+e_y}| + |{\bm n}\rangle\langle{\bm n+e_x+e_y}|+ |{\bm n}\rangle\langle{\bm n+e_y-e_x}| \biggr)-\text{H.c.} \end{align} \end{subequations} We thus arrive at the generalized eigenproblem \begin{equation} \begin{split} &{\cal H}\psi=E{\cal P}\psi,\;\;{\cal P}=\Phi^\dagger\Phi,\\ &{\cal H}=-i{\bm D}\cdot\bm{\sigma}+\Phi^\dagger(V\sigma_0+{M}{\sigma}_z)\Phi, \end{split}.\label{HDVM} \end{equation} In the translationally invariant case the operators ${\cal H}$ and ${\cal P}$ are given by \begin{equation} \begin{split} &{\cal H}=\tfrac{1}{2}\sigma_x(1+\cos k_y)\sin k_x+\tfrac{1}{2}\sigma_y(1+\cos k_x)\sin k_y,\\ &{\cal P}=\tfrac{1}{4}(1+\cos k_x)(1+\cos k_y). \end{split} \end{equation} Both operators are Hermitian and ${\cal P}$ is also positive semi-definite. Moreover, ${\cal P}$ is positive definite if the edges of the Brillouin zone ($k_x$ or $k_y$ equal to $\pm\pi$) are excluded from the spectrum. To ensure that, we can choose an odd number $N_x,N_y$ of lattice points with periodic boundary conditions in the $x$- and $y$-directions (or alternatively, even $N_x,N_y$ with antiperiodicity). By way of illustration, we work out the expectation value \begin{align} &\langle\psi|\Phi^\dagger V\sigma_0\Phi|\psi\rangle=\sum_{\bm{n}}V_{\bm{n}}|\tfrac{1}{4}(\psi_{\bm{n}}+\psi_{\bm{n}+e_x}+\psi_{\bm{n}+e_y}+\psi_{\bm{n}+e_x+e_y})|^2, \end{align} so the value of the potential on an open lattice point is multiplied by the norm squared of the average of the wave function amplitudes on the four adjacent closed lattice points. Eq.\ \eqref{HDVM} is local in the sense that the operators ${\cal H}$ and ${\cal P}$ only couple nearby lattice sites. It can be converted into a conventional eigenvalue problem $\tilde{\cal H}\tilde{\psi}=E\tilde{\psi}$ with $\tilde{\psi}=\Phi\psi$ and $\tilde{\cal H}$ a \textit{nonlocal} effective Hamiltonian: \begin{equation} \tilde{\cal H}=(\Phi^\dagger)^{-1}{\cal H}\Phi^{-1}=U\Phi^{-1}+\sigma_0V+{M}{\sigma}_z.\label{tildeHdef} \end{equation} In the translationally invariant case, the effective Hamiltonian reduces simply to \begin{equation} \tilde{\cal H}=2\sigma_x\tan(k_x/2)+2\sigma_y\tan(k_y/2). \end{equation} Both chiral symmetry and symplectic symmetry are preserved on the lattice if present in the continuum description: $\sigma_z\tilde{\cal H}=-\tilde{\cal H}\sigma_z$ when $V=0=M$, and $\sigma_y\tilde{\cal H}^\ast\sigma_y=\tilde{\cal H}$ when $M=0$. \section{Locally conserved particle current} \label{sec_jA} In real space the effective Hamiltonian \eqref{tildeHdef} produces infinitely long-range hoppings, as in the {\sc slac} fermion discretization \cite{Dre76,Lan19}. The transformation to the generalized eigenproblem \eqref{HDVM} restores the locality of the hoppings. One might wonder whether there is a physical content to this mathematical statement. Yes there is, as we show in this section the Stacey discretization allows for the construction of a locally conserved particle current. We define the particle number \begin{equation} \langle\tilde{\psi}|\tilde{\psi}\rangle=\langle\psi|\Phi^\dagger\Phi|\psi\rangle, \end{equation} corresponding to the density operator \begin{equation} \rho({\bm{n}})=\Phi^\dagger|\bm{n}\rangle\langle \bm{n}|\Phi.\label{rhodef} \end{equation} With reference to the two staggered grids in Fig.\ \ref{fig_layout}, the particle density on an open lattice point $\bm{n}$ is given by the norm squared of the average of the wave function on the four adjacent closed lattice points, \begin{equation} \langle\psi|\rho(\bm{n})|\psi\rangle=|\tfrac{1}{4}(\psi_{\bm{n}}+\psi_{\bm{n}+e_x}+\psi_{\bm{n}+e_y}+\psi_{\bm{n}+e_x+e_y})|^2.\label{psirho} \end{equation} The current density operator is given by \begin{equation} j_{\alpha}(\bm{n})= (\Phi_\alpha^\dagger)^{-1} \sigma_\alpha\rho(\bm{n})\Phi_\alpha^{-1},\label{jalphadef} \end{equation} or equivalently, \begin{equation} \begin{split} & j_x(\bm{n})=\sigma_x\sum_{\bm{n}}\Phi^\dagger_y|\bm{n}\rangle\langle\bm{n}|\Phi_y,\\ &j_y(\bm{n})=\sigma_y\sum_{\bm{n}}\Phi^\dagger_x|\bm{n}\rangle\langle\bm{n}|\Phi_x, \end{split} \end{equation} in terms of the operators $\Phi_x,\Phi_y$ defined in Eq.\ \eqref{Phialphadef}. The current density in the state $\psi$ then takes the form \begin{equation} \begin{split} &\langle\psi|j_x(\bm{n})|\psi\rangle=\tfrac{1}{4}(\psi_{\bm n}+\psi_{\bm{n}+e_y})^\dagger\sigma_x(\psi_{\bm n}+\psi_{\bm{n}+e_y}),\\ &\langle\psi|j_y(\bm{n})|\psi\rangle=\tfrac{1}{4}(\psi_{\bm n}+\psi_{\bm{n}+e_x})^\dagger\sigma_y(\psi_{\bm n}+\psi_{\bm{n}+e_x}). \end{split} \end{equation} The current density at an open lattice point is evaluated by averaging the wave function at the two nearby closed lattice points connected by an edge perpendicular to the current flow. The local conservation law \begin{equation} -\frac{\partial}{\partial t}\langle\psi|\rho({\bm{n}})|\psi\rangle=\sum_{\alpha=x,y}\langle\psi|j_\alpha(\bm{n}+e_\alpha)-j_\alpha(\bm{n})|\psi\rangle\label{drhodt} \end{equation} is derived in App.\ \ref{app_currentconservation}. Knowledge of the current operator allows us to introduce the vector potential operator $\bm{A}=\sum_{\bm{n}}\bm{A}_{\bm{n}}|\bm{n}\rangle\langle \bm{n}|$ such that \begin{equation} \lim_{\bm{A}\rightarrow 0}\frac{\partial {\cal H}}{\partial \bm{A}_{\bm{n}}}=\bm{j}(\bm{n}). \end{equation} This is satisfied if \begin{align} {\cal H}={}&-i{\bm D}\cdot\bm{\sigma}+\Phi^\dagger\bigl(V\sigma_0+{M}{\sigma}_z\bigr)\Phi+\Phi_y^\dagger\sigma_x A_x\Phi_y+\Phi_x^\dagger \sigma_y A_y\Phi_x+{\cal O}({A}^2).\label{HwithA} \end{align} In App.\ \ref{app_gauge} we check that the Hamiltonian \eqref{HwithA} is gauge invariant to first order in ${A}$. Higher order terms are nonlocal and we will not include them. \section{Spectral statistics} \label{sec_spectral} We have tested the validity and capability of the generalized eigenvalue problem by comparing the spectral statistics with predictions from random-matrix theory (RMT). Similar tests for different methods to place Dirac fermions on a lattice have been reported in the particle physics literature \cite{Goc99,Far99,Kie14}. \begin{figure}[tb] \centerline{\includegraphics[width=0.9\linewidth]{spacings}} \caption{Histograms: Spacing distributions computed from the discretized Dirac Hamiltonian \eqref{Hdiscretized}, with different types of disorder corresponding to the four symmetry classes in Table \ref{table_symm}. The red dashed line is the prediction \eqref{Wigner} from random-matrix theory in the presence of symplectic symmetry ($\beta=4$) and in its absence ($\beta=2$). } \label{fig_spacing} \end{figure} \begin{figure}[tb] \centerline{\includegraphics[width=0.6\linewidth]{DOS}} \caption{Density of states in the four symmetry classes, calculated numerically from the discretized Dirac Hamiltonian (blue solid lines) and compared with the RMT prediction \eqref{rhoE} (red dashed lines). Chiral symmetry introduces a linear dip (class AIII), while particle-hole symmetry introduces a quadratic peak (class D). } \label{fig_DOS} \end{figure} We have solved the generalized eigenproblem \begin{equation} \begin{split} &{\cal H}\psi=E{\cal P}\psi,\;\;{\cal P}=\Phi^\dagger\Phi,\\ &{\cal H}=-i{\bm D}\cdot\bm{\sigma}+\Phi^\dagger\bigl(V\sigma_0+{M}{\sigma}_z\bigr)\Phi+\Phi_y^\dagger\sigma_x A_x\Phi_y+\Phi_x^\dagger \sigma_y A_y\Phi_x \end{split}\label{Hdiscretized} \end{equation} on a square lattice of size $N_x\times N_y$. Antiperiodic boundary conditions in the $x$- and $y$-direction account for the $\pi$ Berry phase accumulated by the spin when it makes one full rotation. The dimensions $N_x,N_y$ are even to ensure a positive definite $\Phi$ (no zero-mode in the spectrum). The spectrum was calculated for $5\cdot 10^4$ realizations of a random disorder, chosen independently on each site from a uniform distribution in the interval $(-\delta,\delta)$. To access the four symmetry classes from Table \ref{table_symm} we took \begin{itemize} \item $A_x,A_y\equiv 0$ and random $V,M$ with $\delta=15/\sqrt 2$ for class A; \item $M,A_x,A_y\equiv 0$ and random $V$ with $\delta=15$ for class AII; \item $V,M\equiv 0$ and random $A_x,A_y$ with $\delta=\tfrac{1}{4}\sqrt 2$ for class AIII; \item $V,A_x,A_y\equiv 0$ and random $M$ with $\delta=15$ for class D. \end{itemize} The relatively weak disorder in class AIII was chosen in view of the linearization in the vector potential. For that case we took $N_x=N_y=150$, in the other symmetry classes with stronger disorder we took $N_x=N_y=100$. Symmetry class D is insulating for weak disorder in the mass $M\in(-\delta,\delta)$, it undergoes a metal-insulator transition at $\delta_c=3.44$ \cite{Med10}. This is the thermal metal phase of a topological superconductor \cite{Rea00}. The thermal metal can be reached by vortex disorder, as in the network model studied in Ref.\ \citen{Mil07}, or it can be reached by electrostatic disorder in the BdG Hamiltonian \eqref{HBdG}, as in the tight-binding models studied in Refs.\ \citen{Med10,Wim10}. Here we follow the latter approach, taking $\delta=15$ much larger than $\delta_c$, so that we are deep in the metallic regime. In Fig.\ \ref{fig_spacing} we show the probability distribution of the level spacing $\delta E$ in the bulk of the spectrum, far from $E=0$, where the average spacing $\langle E\rangle$ is energy independent. We compare with the Wigner surmise from RMT \cite{Mehta}, \begin{equation} P(s)=\begin{cases} \frac{32}{\pi^2}s^2e^{-4s^2/\pi}&\text{in class A, AIII, D,}\\ \frac{2^{18}}{(9\pi)^3}s^4e^{-64s^2/9\pi}&\text{in class AII}, \end{cases}\label{Wigner} \end{equation} with $s=\delta E/\langle \delta E\rangle$. The characteristic difference between the two distributions is the decay $\propto s^\beta$ for small spacings, with $\beta=4$ in the presence of symplectic symmetry, while $\beta=2$ in its absence. (The case $\beta=1$ of RMT is not realized in a spin-full system.) In Fig. \ref{fig_DOS} we make a similar comparison for the density of states near $E=0$. In class A and AII the ensemble averaged density of states $\rho(E)$ is flat in a broad energy range around $E=0$. Chiral symmetry in class AIII introduces a linear dip in the density of states, while particle-hole symmetry in class D introduces a quadratic peak. The RMT predictions are \cite{Ver93,Iva02} \begin{align} \rho(E)=\frac{1}{\langle\delta E\rangle}\times\begin{cases} \tfrac{1}{2}\pi^2|\varepsilon|\left[J_0^2(\pi\varepsilon)+J_1^2(\pi\varepsilon)\right]&\text{in class AIII},\\ 1+(2\pi\varepsilon)^{-1}\sin(2\pi \varepsilon)&\text{in class D,} \end{cases}\label{rhoE} \end{align} with $\varepsilon=E/\langle\delta E\rangle$. The mean level spacing $\langle\delta E\rangle$ is computed away from $E=0$. The good agreement between the numerical results from the disordered Dirac equation and the RMT predictions, evident in Figs.\ \ref{fig_spacing} and \ref{fig_DOS}, is reached without any adjustable parameter. Remaining discrepancies are likely due to a dynamics that is not fully chaotic. (In particular, incipient localization can explain the shift to smaller spacings noticeable in Fig.\ \ref{fig_spacing}.) The computer code to reproduce this data is provided \cite{code}. \section{Conclusion} \label{sec_conclude} In conclusion, we have developed and implemented a lattice fermion Hamiltonian that, unlike the familiar Wilson fermion and Susskind fermion Hamiltonians \cite{Wil74,Sus77}, preserves both chiral symmetry and symplectic symmetry while avoiding fermion doubling. Our approach is a symmetrized version of Stacey's generalized eigenvalue problem \cite{Sta82}, which allows for the construction of a locally conserved particle current. To demonstrate the universal applicability of the lattice fermion Hamiltonian we have shown how it can reproduce the characteristic spectral statistics for each of the four symmetry classes of Dirac fermions. We mention three topics for further research. Firstly, we have only succeeded in including the vector potential in a gauge invariant way to first order, so for a flux through a unit cell that is small compared to the flux quantum. Is it possible to remove this limitation? Secondly, can we extend the approach to discretize time as well as space? And thirdly, can we incorporate boundary conditions without breaking the local current conservation? \section*{Acknowledgements} We have benefited from discussions with A. R. Akhmerov. This project has received funding from the Netherlands Organization for Scientific Research (NWO/OCW) and from the European Research Council (ERC) under the European Union's Horizon 2020 research and innovation programme.
\section{Introduction} Evidences suggest that isolated massive elliptical galaxies or that are present at the central region of the cool-core clusters, are usually low-luminous, low-excitation radio galaxies (LERGs), that possess powerful radio-emitting jets emanating from their host active nuclei harbouring SMBHs (Hlavecek-Larrondo \& Fabian 2011; Janssen et al. 2012; see the recent review of Heckman \& Best 2014, hereinafter HB14). In these LERGs, most of the energy of their host active galactic nuclei (AGNs) is released in the bulk kinetic form through the radio-emitting jets (also referred to as jet-mode AGNs). These jets strongly interact with the ambient medium and inject considerable amount of energy into the surrounding gas, thereby heating the gas and prevent its radiative cooling (e.g., Churazov et al. 2002; McNamara \& Nulsen 2007; McCarthy 2010; Ishibashi et al. 2014). Indeed, X-ray observations show demonstrative evidence of the interaction between these jets and the interstellar medium (ISM) of their host galaxies, and/or with the intracluster medium (ICM) if the ellipticals reside at the centre of clusters (Fabian et al. 2003; McNamara et al. 2005; Allen at al. 2006; Nemmen at al. 2007, hereinafter N07; McNamara \& Nulsen 2007). This kinetic feedback (or radio-mode feedback) has been envisaged to account for the lack of star formation in these massive galaxies, and quenching of cooling flows in the isolated ellipticals or in the central region of the cool-core clusters (e.g., Fabian et al. 2003; Croton et al. 2006; Fabian 2012; Gaspari et al. 2012; Gaspari et al. 2013a; Croston et al. 2013), thereby preventing the collapse of the surrounding gas onto the centre of their host galaxies, inhibiting their growth (Narayan \& Fabian 2011, hereinafter NF11). Such a feedback is now thought to play a pivotal role in shaping the late evolution of these massive galaxies in the present-day Universe (e.g., Fabian 2012). A pertinent question now arises as to what fuels the central SMBHs in these LERGs. Unlike that of the luminous, high-excitation sources, whose central SMBHs are thought to be fuelled by the cold gas in a radiatively efficient accretion mode, the mode of fuelling for LERGs is less certain. Nonetheless, it is most likely that the hot gas may be the fuelling source for these jet-mode LERGs. The central SMBHs in the nuclei of these massive ellipticals (either in the context of isolated ellipticals or in the case of the ones present at the central region of the cool-core clusters) are immersed in a hot X-ray emitting gaseous medium, that provides an abundant gas source for their fuelling. Based on several evidences, it has been widely argued that host SMBHs in these massive galaxies are directly fuelled by these hot gases through a spherical/quasi-spherical accretion, in a radiatively inefficient mode (or hot mode accretion), at Bondi or at near-Bondi accretion rates (see di Matteo et al. 2003; Best et al. 2006; Hardcastle et al. 2007; Best \& Heckman 2012; HB14; Ineson et al. 2015). From a sample of nine nearby massive ellipticals, Allen et al. (2006), in fact, observed a tight correlation between their (computed) Bondi accretion rates ($\dot{M}_{B}$) and their total jet powers, suggesting that a Bondi-type spherical accretion can reasonably power these low-luminous AGNs. In reality, however, the in-falling gas would likely to retain some angular momentum, and under these circumstances, the nature of accretion would then be most appropriately described as a quasi-spherical, advection dominated accretion flow (ADAF) (Narayan \& Yi 1994, 1995; Bhattacharya et al. 2010; NF11; Yuan \& Narayan 2014; Ghosh 2017). Nonetheless, it has been pointed out by NF11 that to a great degree ADAF resembles a Bondi-type spherical accretion. In that paper the authors have, in fact, found that the jet power directly scales with Bondi accretion power rate, and argued that if the BH is fast rotating, a Bondi-type flow can support the observed jet power. Considering an ADAF, N07 has established an empirical relationship between the mass accretion rate (i.e., $\dot M_{\rm ADAF}$) and jet power for a sample of nine massive ellipticals [as used by Allen et al. (2006)], and found a same functional form as the correlation in Allen et al. (2006). An important aspect of (Bondi-type) hot mode accretion powering the LERGs, is that, the radio AGN feedback and the fuelling of host AGN gets tightly coupled. The radio-mode feedback keeps the surrounding gas hot. This hot phase then controls the fuelling of host AGNs, which in turn affects the radio AGN feedback itself. Thus a feedback loop is being maintained, enabling a `self-regulated' and an efficient feedback to occur in these galaxies. This feedback cycle helps in the maintenance of these massive galaxies in the contemporary Universe. The scenario then corresponds to a giant Bondi-type spherical accretion onto the central SMBH with the accretion-flow extending well beyond the Bondi radius, exceeding several hundred pc length-scale. Under these circumstances, it would be difficult to conceive a scenario in which the corresponding accretion flow towards the AGN is influenced by the gravitational field of the central SMBH alone; the galactic contribution to the gravitational potential needs to be considered in a more realistic modelling as was also pointed out earlier by other authors (e.g., NF11, Ishibashi et al. 2014). Moreover, for giant ellipticals present at the centre of galaxy clusters, like central dominant (CD) galaxies, whose radius may exceed several hundred kpc (e.g., Seigar et al. 2007), the host nucleus is fuelled directly from the hot phase of the ICM, and the length-scale of the corresponding accretion flow may then well extend beyond hundreds of kpc. In addition to the effect of the gravitational potential of galaxy, the influence of dark energy (e.g., Riess et al. 1998; Perlmutter et al. 1999) on the flow would then also be expected to become significant, at least at the outer regions of the flow. The simplest and most attractive candidate for the dark energy is the positive or repulsive cosmological constant ($\Lambda \sim$ 10$^{-52}$ m$^{-2}$), and the current paradigm of cosmology is based on $\Lambda$CDM model, where CDM refers to cold dark matter (e.g., Komatsu et al. 2011). Although the effect of $\Lambda$ is ignorable in the central regions of the galaxy, however, at length-scales $\raisebox{-.4ex}{$\stackrel{>}{\scriptstyle \sim}$} \, (50 - 100) \, {\rm kiloparsecs}$ from the nuclei of massive ellipticals, its effect may become non-negligible (e.g., Sarkar et al. 2014). To model the gravitational field of a massive elliptical galaxy, one needs to ascertain the total density or the mass distribution profile in that galaxy. Unlike in the case of spiral galaxies, in which, one can constrain the total mass distribution from the multicomponent modelling of their rotation curves, such an analysis is seemingly difficult in the context of ellipticals comprising mainly of four-mass-components (central SMBH, stellar, DM, and hot gas), as they have very little rotation (see for e.g., Mamon \& Lokas 2005b, hereinafter ML05b). ML05b have performed a detailed modelling of the four-component elliptical galaxy, describing the density profiles of stellar, DM, and hot gas components. In the context of massive ellipticals, if one incorporates the effect of $\Lambda$, the elliptical galaxy can then be described as a five-component gravitational system (SMBH + stellar + DM + hot gas + $\Lambda$). In recent times, Ghosh \& Banik (2015) (hereinafter GB15) have explored the possible impact of $\Lambda$ on the spherically symmetric accretion flows and found that $\Lambda$ suppresses Bondi accretion rate. However, in that work, the authors have ignored the explicit effect of the galactic potential in their calculations (also see Karkowski \& Malec 2013; Mach et al. 2013, in this context). On the other hand, Quataert \& Narayan (2000) had earlier endeavoured to investigate the Bondi-type spherical accretion in the gravitational field of a galaxy by considering a simplistic form of gravitational potential representing the rotation curve of the galaxy, however neglecting the effect of $\Lambda$, while Stuchl\'ik et al. (2016) have investigated the possible role of $\Lambda$ on spherically symmetric static mass configurations in the context of general-relativistic polytropes. In this paper, we endeavour to perform a detailed study of Bondi-type spherical accretion onto the central SMBH in the context of the above-mentioned five-component galactic system, to investigate how the galactic contribution to the gravitational potential in the presence of $\Lambda$ impact the dynamics of spherical accretion. Our work, described in this paper, is then a non-trivial extension of GB15, who studied only the cosmological aspect of the problem. Spherically symmetric flows have been extensively studied from multiple angles, not only in the context of accretion onto isolated BHs/compact objects (see the introduction of GB15), but also in the context of stellar wind theories (e.g., Axford \& Newman 1967; Summers 1980). Classical Bondi flow onto an isolated BH [which is inviscid and steady adiabatic (or polytropic)] is transonic in nature, always described by a single critical point. However there may be instances when this `criticality-condition' may be violated if the flow deviates from being strictly adiabatic, either with the appearance of subcritical points in the flow (e.g., Flammang 1982; Turolla \& Nobili 1989), or even obtaining more than one critical point in the spherical accretion (e.g., Chang \& Ostriker 1985; Turolla \& Nobili 1988; Nobili \& Turolla 1988; Nobili et al. 1991). In this work, we investigate in detail, the transonic behaviour of spherical accretion for a generic class of polytropic flows in the context of the five-component galactic system, to explore, whether the galactic contribution to the potential affects the `criticality-condition' of the classical Bondi solution. If such a criticality-condition is violated, this could substantially modify the properties of flow, and might significantly change the flow topology and structure relative to the classical Bondi solution, with the possibility of even occurrence of shocks in the flow. We examine such possibilities in the present study. Among the various mass components in the elliptical galaxy, the precise nature of density or mass distribution profile for DM component is less definitive. Several DM density distribution models exist in the literature with the objective to describe $\Lambda$CDM halos in the dissipationless cosmological N body simulations (see ML05b; Merritt et al. 2006; Graham et al. 2006; Memola 2011; Stuchl\'ik \& Schee 2011, hereinafter SS11). Navarro, Frenk \& White (1995,1996) prescribed a double power-law DM density distribution profile with an outer slope of $ \simeq -3$ and an inner slope of $ -1$ (hereinafter NFW), obtained in large-scale high resolution dissipationless cosmological N-body simulations, and has been validated in many cosmological N-body simulations (see Lokas \& Mamon 2001, and references therein). Later simulation works have, however, revealed that the inner slope of the DM profile can actually be much steeper with its values lying within a range between $-3/2$ and $-1$ (e.g., Moore et al. 1999; Jing \& Suto 2000). A more general version of the NFW type DM density profile has been prescribed by Jing \& Suto (2000), with an outer slope of $ \simeq -3$ and an arbitrary inner slope of $- \gamma$, which is found to provide much better fit to simulated DM halos \footnote{For a detailed comparison of different DM models one can see Merritt et al. 2006.}. In the present study we adopt this generalized model of Jing \& Suto (2000) to describe the DM mass profile in our five-component galaxy. The rest of the paper is planned accordingly: In the next section, we formulate our five-component elliptical galaxy model. \S 3 briefly describes the hydrodynamical model for spherical accretion in the elliptical galaxy gravitational field, and the solution procedure. In \S 4 we analyse the transonic behaviour of spherical accretion in the elliptical galaxy gravitational field, and perform the global analysis of the parameter space. In \S 5, we study the fluid properties of spherical accretion in the context of our five-component elliptical galaxy model. In \S 6, we investigate how the galactic contribution to the potential influence the Bondi accretion rate. Finally, we end up in \S 7 with a summary and discussion. Before proceeding further, we furnish the values of the following cosmological quantities used in our study (e.g., ML05b; SS11): $\Lambda$ = 10$^{-52}$ m$^{-2}$; $\Omega_m$ (cosmological density parameter) = 0.3; $\Omega_b$ (baryon density parameter) = 0.041; $H_0$ (Hubble constant) = 100 $h$ km s$^{-1}$ Mpc$^{-1}$ = 70 $h_{70}$ km s$^{-1}$ Mpc$^{-1}$, $h$ = 0.7 (i.e. $h_{70}$ =1.0); ${\overline{\mathit{f}}_b}$ (mean baryon fraction of Universe) = $\Omega_b/\Omega_m \simeq 0.14$; ${\overline{\Upsilon}}_{B}$ (mass-to-light ratio of the Universe) = 390 $M_{\odot}/L_{\odot}$, where $M_{\odot}$ and $L_{\odot}$ are the solar mass and solar luminosity, respectively. \section{Modelling elliptical galaxy gravitational field} Elliptical galaxies can be assumed to have nearly spherical mass distribution. In the presence of $\Lambda$, the spacetime geometry exterior to a static spherically symmetric mass distribution is Schwarzschild-de Sitter (SDS). The basic features of SDS spacetime have been extensively discussed in the literature (for e.g., see SS11; Sarkar et al. 2014; GB15); we do not repeat it here. Although the SdS geometry generally describes BH in a spatially inflated Universe, however, it can be applied to describe the spacetime outside any spherical or nearly spherical matter distribution, or even outside any mass distribution at length-scales where the deviation from spherical symmetry of the mass distribution can be ignored (e.g., SS11). Owing to the difficulty of studying complex astrophysical phenomena in the framework of full general relativity, many complex astrophysical phenomena has been studied through the use of pseudo-Newtonian potentials (PNPs), which are prescribed to approximately mimic corresponding GR effects, and has been extensively used in the astrophysical literature (e.g., Ghosh \& Mukhopadhyay 2007; Ghosh et al. 2014; Sarkar et al. 2014; Ghosh et al. 2015, 2016). Although few PNPs exist in literature that can well mimic SDS spacetime (Stuchl\'ik \& Kov\'a\v{r} 2008; Stuchl\'ik et al. 2009; Sarkar et al. 2014), here, we focus on the PNP prescribed in Stuchl\'ik et al. (2009), which is given by \begin{eqnarray} \Psi_{\rm PN} \, (r) = - \frac{GM+ \frac{\Lambda c^2 \, r^3}{6}}{r-\frac{2GM}{c^2}- \frac{\Lambda r^3}{3}} \, , \label{1} \end{eqnarray} where $M$ is the gravitational mass of the distribution, $G$ and $c$ are the universal gravitational constant and speed of light, respectively. The subscript `PN' symbolizes `pseudo-Newtonian'. This PNP quite precisely reproduces salient features of corresponding SDS geometry, and has been used on number of occasions to study the effect of $\Lambda$ on relevant astrophysical phenomena (in local-scales) (Stuchl\'ik et al. 2009; SS11; GB15). Following the approach of SS11, we expand the PNP described in Eqn. (1), to obtain its Newtonian limit. The corresponding gravitational force in the Newtonian limit ignoring the higher order relativistic terms, is then given by \begin{eqnarray} \mathscr{F}_{N} \, (r) = \frac{GM}{r^2} - \frac{\Lambda c^2 \, r}{3} \, , \label{2} \end{eqnarray} where subscript `N' symbolizes `Newtonian'. In the right hand side of the above equation, the second term represents the form of gravitational force associated with $\Lambda$, whereas the first term describes the gravitational force associated with the spherical mass distribution; in the context of an elliptical galaxy, the mass distribution then comprises of four-mass components: BH, stellar, DM, and diffuse hot gas. In the framework of Eqn. (2), the net gravitational force associated with the elliptical galaxy, can then be simply expressed through a linear superposition of all the individual gravitational force terms associated with each different component of the elliptical galaxy, given by \begin{align} \mathscr{F}_{\rm Gal} \, (r) = \mathscr{F}_{\rm BH} \, (r) + \mathscr{F}_{\rm star} \, (r) + \mathscr{F}_{\rm DM} \, (r) + \mathscr{F}_{\rm gas} \, (r) + \mathscr{F}_{\Lambda} \, (r) \, , \label{3} \end{align} where $\mathscr{F}_{\rm Gal}$ is the galactic force function. The corresponding galactic potential can then be written as $\Psi_{\rm Gal} \, (r) = \int \mathscr{F}_{\rm Gal} (r) \, dr$. The advantage of representing the gravitational effect of the galactic mass distribution in the presence of $\Lambda$ through the above additive fashion, is that, this would then enable one to study relevant astrophysical phenomena both inside the spherical galactic halo, as well as exterior to the galactic mass distribution. For more details, see SS11, although in a different context, where they used this approach to study the effect of $\Lambda$ on the motion of Small and Large Magellanic Clouds, in the gravitational field of the Milky Way. They found that the Newtonian limit of the PNP [described by Eqn. (1)] representing the effects of $\Lambda$ can be quite effectively used in the regions vicinity of the galactic disc and inside the galactic halo. Nonetheless, in the regions far outside the galactic halo the relativistic corrections are important and the full PNP then needs to be adopted. In the present work, as we are predominantly concerned with the fluid flow in the region either close to the galactic halo, or inside the galactic halo, we ignore the relativistic corrections (relating to $\Lambda$) and adopt the gravitational force function described by Eqn. (3), appropriate to our purpose. In this framework, the gravitational effect associated with the central SMBH is then represented through the Newtonian potential. This would then incorrectly describe the flow behavior in the vicinity of the BH, where the relativistic effects are important. However, as the galactic force function is expressed as the sum of individual gravitational force terms, we simply replace the Newtonian force term, and instead adopt the Paczy\'nski \& Wiita (1980) PNP, to capture the relativistic effect of the non-rotating BH; the corresponding force term given by \begin{eqnarray} \mathscr{F}_{\rm BH} = \frac{G \, M_{BH}}{\left(r- {2GM_{\rm BH}}/{c^2} \right)^2} \, , \label{4} \end{eqnarray} where $r_g = {GM_{\rm BH}}/{c^2}$, $M_{\rm BH}$ is the BH mass. To determine the gravitational force functions associated with stellar mass distribution, DM, and hot gas mass, one needs to know their corresponding density or mass distributions. For details about the density distribution profiles associated with each of these components in the elliptical galaxy readers are advised to see ML05b, and references therein. Following ML05b, here, we obtain the gravitational force functions associated with these three components: stellar, DM and hot gas, which we furnish in the following subsections. \subsection{Stellar mass gravitational field} The stellar mass density distribution can be obtained by deprojecting the S\'ersic surface brightness profile (S\'ersic 1968); the S\'ersic law is found to well describe the surface brightness distribution of most of all the large elliptical galaxies. The S\'ersic profile follows the relation (ML05b) \begin{eqnarray} I(r) = I_{0} \, {\rm exp} \left[-\left(r/r_s \right)^{1/n} \right] \, , \label{5} \end{eqnarray} where, $I$ is the surface brightness, $I_{0}$ is the normalization parameter, $r_s$ is the S\'ersic scale-radius and $n$ is the S\'ersic shape parameter or the `S\'ersic index'. The gravitational force associated with this distribution is then given by \begin{eqnarray} \mathscr{F}_{\rm star} \, (r) = \frac{G \, \mathit{f}_{\rm star} \, M_\nu}{r^2} \, \frac{\zeta \left[(3-\mu)n, \, \left(r/{r_s} \right)^{1/n} \right]}{\zeta \left[(3-\mu)n, \, \left({r_\nu}/{r_s} \right)^{1/n} \right]} \, , \label{6} \end{eqnarray} where $r_\nu$ represents the virial radius, which is defined to be the radius of that spherical region of the galaxy within which the mean total mass density is $200$ times the mean critical density of the Universe $\left(\rho_{\rm crit} \right)$, where $\rho_{\rm crit} = {3 H^2_0}/{8\pi G}$, this renders the virial radius $r_\nu \simeq 206.262 \, h^{-1}_{70} \, \left( {{h_{70} \, M_\nu} / {10^{12} \, M_\odot} } \right)^{1/3}$ Kpc. $M_\nu$ represents the total mass within the virial radius, $f_{\rm star}$ represents the stellar mass fraction within the virial radius. Here $\zeta (t,x)$ represents the standard incomplete gamma function, $\mu$ is related to S\'ersic shape parameter $n$ through the relation $\mu (n) \simeq 1.0 - 0.06097/n + 0.05463/n^2$. S\'ersic scale-radius $r_s$ is related to the effective (i.e., projected half-light) radius ${\mathscr R}_{\rm eff}$ through the relation $\mathscr{R}_{\rm eff} = b^{\mu} \, r_s$, with $b (n) \simeq 2n - 1/3 + 0.009876/n$. $\mathscr{R}_{\rm eff}$ and $n$ are given through the following relations based on the empirical fits to observations (see ML05b, and references therein). \begin{eqnarray} \log \, \left(h_{70} \mathscr{R}_{\rm eff} \right) = 0.34 + 0.54 \, \log L_{10} + 0.25 \, \left(\log L_{10}\right)^2 \, , \label{7} \end{eqnarray} \begin{eqnarray} \log \, n = 0.43 + 0.26 \, {\log L_{10}} - 0.044 \, \left(\log L_{10}\right)^2 \, , \label{8} \end{eqnarray} where $L_{10} = h^2_{70} \, L_B/{\left(10^{10} L_{\odot}\right)}$, $L_B$ is the luminosity of the galaxy in the blue-band. In Eqn. (7), $\mathscr{R}_{\rm eff}$ is measured in kpc. \subsection{DM gravitational field} A general version of the NFW type DM density distribution profile has been prescribed by Jing \& Suto (2000) which furnishes a double power-law with an outer slope of $\simeq -3$ and an arbitrary inner slope of $- \gamma$, with $1 \, \raisebox{-.4ex}{$\stackrel{<}{\scriptstyle \sim}$} \, \gamma \, \raisebox{-.4ex}{$\stackrel{<}{\scriptstyle \sim}$} \, 3/2$; the density profile is then given by \begin{eqnarray} {\rho}_{_{\rm DM}} \, (r) \propto \frac{1}{\left(r/r_d \right)^{\gamma} \, \left[1+ \left(r/r_d \right) \right]^{3- \gamma}} \, , \label{9} \end{eqnarray} where $r_d$ is some scale-radius which is related to the concentration parameter $c_o$ through the relation $c_o = {r_\nu}/r_d$. This above expression is a special case of a more generic $(\alpha, \beta, \gamma)$ model (see Merritt et al. 2006). With the choice of $(\alpha, \beta, \gamma) \equiv (1, 3, 1)$ one obtains the usual NFW model, and similarly with the choice of $(\alpha, \beta, \gamma) \equiv (1, 3, 3/2)$ one obtains the model described in Moore et al. (1999). Although the profile in Eqn. (9) has been referred to by various names in the literature, following ML05b, we refer to this profile as `JS' profile. In our study, we choose both the limits of $\gamma$; $\gamma = 1$, and $\gamma = 3/2$. The gravitational forces associated with this profile in the limits of $\gamma = 1$, and $\gamma = 3/2$, are then given by {\scriptsize \begin{equation} \mathscr{F}_{\rm DM} \, (r)= \begin{cases} \frac{G \, \mathit{f}_{\rm DM} \, M_{\nu}}{r^2} \, \frac{1}{\mathscr{G}(c_o)} \, \left[{\rm ln} \left(1+r/r_d \right) - \frac{r/r_d}{1+ r/r_d} \right] \, \, \, \, \, \, \, \, \, \, \, \, \, \, \, \, \, \, \, \, \, \, \, \, \, ({\rm NFW}) \, , \\ \frac{G \, \mathit{f}_{\rm DM} \, M_{\nu}}{r^2} \, \frac{1}{\mathscr{G}(c_o)} \, \, 2 \left[{\rm sinh}^{-1} \, \left(\sqrt{r/r_d} \right) - \sqrt{\frac{r/r_d}{(1+r/r_d)}} \right] \, \, ({\rm JS}- 3/2) \, , \end{cases \label{10} \end{equation} } where $\mathit{f}_{\rm DM}$ represents the DM mass fraction within the virial radius, and \begin{equation} \resizebox{.497 \textwidth}{!} { $\mathscr{G}(c_o) = \begin{cases} {\rm ln} \left(1+c_o\right) - {c_o}/{\left(1+ c_o \right)} \, \, \, \, \, \, \, \, \, \, \, \, \, \, \, \, \, \, \, \, \, \, \, \, \, \, ({\rm NFW}) \, , \\ 2 \left[{\rm sinh}^{-1} \, \left(\sqrt{c_o} \right) - \sqrt{{c_o}/{\left(1+c_o \right)}} \right] \, \, ({\rm JS}- 3/2) \, , \end{cases}$ } \label{11} \end{equation} where the concentration parameter $c_o$ can be obtained from the $\Lambda$CDM simulations (see Jing \& Suto 2000) through the following fitting relations \begin{equation} c_o \simeq \begin{cases} 10.2 \, \left( {{h \, M_\nu} / {10^{12} \, M_\odot} } \right)^{-0.08} \, \, \, \, \, \, \, \, \, \, \, ({\rm NFW}) \, , \\ 4.9 \, \left( {{h \, M_\nu} / {10^{12} \, M_\odot} } \right)^{-0.13} \, \, \, \, \, \, \, \, \, \, \, \, \, ({\rm JS}- 3/2) \, . \end{cases} \label{12} \end{equation} \subsection{Hot gas mass gravitational field} It is being generally assumed, that the hot X-ray emitting gas present in groups and clusters of galaxies, and in isolated early-type massive ellipticals, is in hydrostatic equilibrium in the overall gravitational potential (see Capelo et al. 2010; Capelo et al. 2012; and references in them). An isothermal $\beta$-model which provides a good fit to the X-ray observations of the early-type massive ellipticals, is being widely considered to describe the density distribution or the mass distribution of the hot gas in these systems (e.g., Brown \& Bregman 2001; ML05b, and references therein). In our analysis we adopt this $\beta$-model following ML05b, to describe the gas profile. The gravitational force associated with this model is given by \begin{align} \mathscr{F}_{\rm gas} \, (r) = \frac{G \, \mathit{f}_{\rm gas} \, M_\nu}{r^2} \, \frac{ \left[ \left(\frac{1}{3} \, \left({r}/{r_b} \right)^3 \, \right)^{-\delta} + \left(\frac{2}{3} \, \left({r}/{r_b} \right)^{\frac{3}{2}} \, \right)^{-\delta} \right]^{-1/{\delta}} }{ \left[ \left(\frac{1}{3} \, \left({r_\nu}/{r_b} \right)^3 \, \right)^{-\delta} + \left(\frac{2}{3} \, \left({r_\nu}/{r_b} \right)^{\frac{3}{2}} \, \right)^{-\delta} \right]^{-1/{\delta}} } \label{13} \end{align} where $\mathit{f}_{\rm gas}$ represents the mass fraction of the hot gas within the virial radius. $\delta = 2^{1/8}$, $r_b $ is some scale-radius which is related to the effective radius $\mathscr{R}_{\rm eff}$ through the relation $r_b \simeq {\mathscr{R}_{\rm eff}}/{q}$, with $q \simeq 10$ (ML05b). However, owing to the divergence of the associated gravitational potential at large radii, it has been assumed (ML05b) that beyond the virial radius (i.e, for $r > r_\nu$), the ratio of local baryon mass density to the local total mass density of the galaxy is approximately equal to the mean baryon fraction of the Universe. This then leads to the following definition of gravitational force associated with the hot gas for $r > r_\nu$, \begin{align} \mathscr{F}_{\rm gas} \, (r) \, \, \vert_{r \, > \, r_\nu} = \frac{G \, M_{\nu}}{r^2} \, \left(\mathit{f}_{\rm gas} - \mathit{f}_{\rm DM} \, \frac{\overline{\mathit{f}}_b}{1 - \overline{\mathit{f}}_b} \right) \, + \, \frac{\overline{\mathit{f}}_b}{1 - \overline{\mathit{f}}_b} \, \mathscr{F}_{\rm DM} \, (r) \, \label{14} \end{align} where the stellar mass contribution has been neglected, as the stellar luminosity almost converges at the virial radius. \vspace{3mm} \par\noindent\rule{85mm}{0.7pt} \vspace{0.0mm} For the quantitative estimate of the force function $\mathscr{F}_{\rm Gal} \, (r)$ of the elliptical galaxy [given by Eqn. (3)], one needs to provide the values for the following quantities: $L_B$, $M_\nu$, $M_{\rm BH}$, $\mathit{f}_{\rm star}$, $\mathit{f}_{\rm DM}$, and $\mathit{f}_{\rm gas}$. We define mass-to-light ratio bias $\mathit{b}_{\Upsilon} ={\Upsilon_B}/{\overline{\Upsilon}}_{B} $, i.e., the ratio of the galactic mass-to-light ratio in the blue-band within the virial radius ($\Upsilon_B$) to the universal mass-to-light ratio (${\overline{\Upsilon}}_{B}$). Note that we always express mass-to-light ratios in the units of $M_{\odot}/L_{\odot}$. Following ML05b, (also see, Capelo et al. 2010), $M_\nu$ can be written as $M_\nu = \mathit{b}_{\Upsilon} \, {\overline{\Upsilon}}_{B} \, L_B$. In expressing the above relation for $M_\nu$ it is being considered that the luminosity of the galaxy almost converges at the virial radius. A common widely used technique (although through indirect means) to estimate the central SMBH mass in massive early type galaxies (see HB14), is based on a fit to the relationship between $M_{\rm BH}$ and the stellar velocity dispersion ($\sigma$) of the surrounding galactic bulge (e.g., Ferrarese \& Merritt 2000; Gebhardt et al. 2000; Tremaine et al. 2002; Graham \& Scott 2013; McConnell \& Ma 2013), or using the correlation between $M_{\rm BH}$ and the stellar mass of the bulge ($M_{\rm bulge}$) (e.g., Marconi \& Hunt 2003, H\"aring \& Rix 2004). The estimated BH mass from the fitting relation of \& Rix (2004) is quite close to that obtained from the relation given in McConnell \& Ma (2013). In the present study, we choose the fitting relation of Haring \& Rix (2004) to estimate the central SMBH mass, given by \begin{align} \log \, \left(M_{\rm BH}/M_{\odot} \right) = \left(8.20 \pm 0.10 \right) \, + \, \left(1.12 \pm 0.06 \right) \, \nonumber \\ \times \, \log \, \left(M_{\rm bulge}/10^{11} M_{\odot} \right), \label{15} \end{align} where $M_{\rm bulge}$ can be written as $M_{\rm bulge} = \mathit{f}_{\rm star} \, M_\nu$. Following e.g., ML05b, the virial stellar mass fraction $\mathit{f}_{\rm star}$ can be written as \begin{eqnarray} \mathit{f}_{\rm star} = \frac{\Upsilon_{\star\, B}}{{\mathit{b}}_{\Upsilon} {\overline{\Upsilon}}_{B}} \, , \label{16} \end{eqnarray} where $\Upsilon_{\star\, B}$ is the stellar mass-to-light ratio in the blue-band. We define the baryon fraction bias $\mathit{b}_b = {\mathit{f}_b}/{\overline{\mathit{f}}_b}$, i.e, the ratio of baryon mass fraction within the virial radius ($\mathit{f}_b$) to the mean baryon fraction of the Universe ($\overline{\mathit{f}}_b$). One can then write $\mathit{f}_{\rm DM} = 1- \mathit{b}_b \, \overline{\mathit{f}}_b$, and $\mathit{f}_{\rm gas} = 1 - \left(\mathit{f}_{\rm star} + \mathit{f}_{\rm DM} \right) $, where it has been assumed that the fraction of BH mass to the stellar mass is much less than unity (e.g., ML05b, Capelo et al. 2010). In our present study, following for e.g., ML05b, Mamon \& Lokas (2005a), Capelo et al. 2010, we adopt the fiducial value for $L_B \simeq 2 \times 10^{10} \, L_{\odot}$, which has been used as a standard value for this parameter by these authors. It has been argued that $\Upsilon_{\star\, B}$ of elliptical galaxies lay roughly in the range from $\sim$ 5 - 8 (e.g., Mamon \& Lokas 2005a). Following for e.g., ML05b, Capelo et al. (2010), in the present work we adopt the mean value of $\Upsilon_{\star\, B} = 6.5$. Had the Universe been unbiased, $\Upsilon_B$ would have been always equals to ${\overline{\Upsilon}_B} (= 390)$. For a comprehensive analysis of the dynamical behaviour of the flow relevant for our purpose, following ML05b, we adopt four fiducial values for the galactic mass-to-light ratio ($\Upsilon_B$) within a wide range $\sim (14-390)$, as depicted in Table 1. The lower limit of this range corresponds to the typical choice made by ML05b for the special case of negligible or no DM scenario. In fact, for NGC 821, an intermediate luminous elliptical, which has been predicted to have little or no DM content, Romanowsky et. al (2003) have estimated the value of $\Upsilon_B$ in the range $\sim 13 - 17$. Predictions from many previous studies (for e.g., Benson et al. 2000; Marinoni \& Hudson 2002; Yang et al. 2003) indicate that for galaxy-sized virialized halos, the value of $\Upsilon_B$ could exceed $300$, however, unlikely to surpass ${\overline{\Upsilon}}_B$. Following ML05b, and without loss of generality, we adopt $\Upsilon_B \simeq {\overline{\Upsilon}}_B = 390$ as our typical upper bound limit. Following Marinoni \& Hudson (2002) and Yang et al. (2003), the particular value of $\Upsilon_B = 100$ was adopted as a standard value in ML05b (also see Capelo et al. 2010), which we also adopt in our present study. The value of $\Upsilon_B = 33$ was considered earlier by ML05b based on the findings of Romanowsky et al. (2003) for the nearby giant elliptical galaxy, NGC 3379; this particular value of $\Upsilon_B = 33$ corresponds to the scenario of low content of DM. In this paper we examine our numerical results for all the above values of $\Upsilon_B$. For $\Upsilon_B = 100$, one can assume that the baryon fraction would remain unaffected, with $\mathit{f}_b = \overline{\mathit{f}}_b \simeq 0.14$ (ML05b). For the case with $\Upsilon_B = 33$, we adopt similar value for the gas mass-to-stellar mass ratio as that obtained for $\Upsilon_B = 100$ (ML05b). For the above values of $\Upsilon_{B}$, using Eqn. 16, and the relations furnished in the previous paragraph, one may easily estimate $\mathit{f}_{\rm star}$, $\mathit{f}_{\rm DM}$, and $\mathit{f}_{\rm gas}$. In Table 1, we enlist in detail, the relevant values for different physical quantities used to compute the galactic force function $\mathscr{F}_{\rm Gal} \, (r)$. For clarity, in Table 2, we enlist the various parameters used in this section. In the next section, we briefly describe the hydrodynamical model for spherical accretion flow in the elliptical galaxy gravitational field. \begin{table} \centering \centerline{\bf Table 1} \vspace{0.3cm} \centerline{\large $L_B = 2 \times 10^{10} \, L_{\odot} $, $\Upsilon_{\star\, B} = 6.5 \, M_{\odot}/L_{\odot}$ } \begin{tabular}{|c|c|c|c|c|c|c|c|c|c} \hline $\Upsilon_B \, \left({M_\odot}/{L_\odot} \right)$ & ${\mathit{b}}_{\Upsilon}$ & $\mathit{f}_{\rm star}$ & $\mathit{b}_b$ & $\mathit{f}_{\rm DM}$ & $\mathit{f}_{\rm gas}$ \\ [1ex] \hline 390 & 1.0 & 0.0167 & 1.0 & 0.86 & 0.1233 \\ [1ex] \hline 100 & 0.25641 & 0.065 & 1.0 & 0.86 & 0.075 \\ [1ex] \hline 33 & 0.08462 &0.1969 & 3.0307 & 0.5757 & 0.2272 \\ [1ex] \hline 14 & 0.0359 & 0.4643 & 7.1429 & 0.0 & 0.5357 \\ [1ex] \hline \end{tabular} { \footnotesize For the choice of these fiducial parameters see Mamon \& Lokas (2005b) and references therein.} \end{table} \begin{table*} \centering {{\bf Table 2:}} {Glossary of the various parameters used in section 2.} \begin{tabular}{|c|c|c|c|c|c|c|c|c|c} \hline $H_0$ & Hubble constant & $ $ & $ $ & $L_B$ & Luminosity of the galaxy in the blue-band \\ [0.1ex] $h$ & Reduced Hubble constant & $ $ & $ $ & $\Upsilon_{\star\, B}$ & Stellar mass-to-light ratio in the blue-band \\ [0.1ex] $\Lambda$ & Cosmological constant & $ $ & $ $ & ${\overline{\Upsilon}}_{B}$ & Mass-to-light ratio of the Universe\\ [0.1ex] $\rho_{\rm crit}$ & Mean critical density of the Universe & $ $ & $ $ & ${\Upsilon}_{B}$ & Galactic mass-to-light ratio \\ [0.1ex] $r_\nu$ & Virial radius & $ $ & $ $ & $\mathit{b}_{\Upsilon}$ & Ratio of ${\Upsilon}_{B}$ to ${\overline{\Upsilon}}_{B}$\\ [0.1ex] $M_\nu$ & Virial mass & $ $ & $ $ & ${\overline{\mathit{f}}_b}$ & Mean baryon fraction of Universe\\ [0.1ex] $\mathscr{R}_{\rm eff}$ & Projected half-life radius & $ $ & $ $ & $\mathit{b}_b$ & Baryon fraction bias\\ [0.1ex] $r_s$ & S\'ersic scale-radius & $ $ & $ $ & $f_{b}$ & Baryon mass fraction within the virial radius\\ [0.1ex] $n$ & S\'ersic shape parameter & $ $ & $ $ & $f_{\rm star}$ & Stellar mass fraction within the virial radius\\ [0.1ex] $c_o$ & Concentration parameter & $ $ & $ $ &$f_{\rm DM}$ & Dark matter mass fraction within the virial radius\\ [0.1ex] $\gamma$ & - Inner slope of DM profile & $ $ & $ $ &$f_{\rm gas}$ & Hot gas mass fraction within the virial radius\\ [0.1ex] \hline \end{tabular} \end{table*} \section{Hydrodynamical model for spherical accretion in the elliptical galaxy gravitational field and the solution procedure} Throughout our analysis, we actually express the radial coordinate $r$ in units of $r_g = {GM_{\rm BH}}/c^2$. The radial velocity of the flow $v_r$ is expressed in units of speed of light $(c)$. As the accretion flow is considered to be spherically symmetric onto a nonrotating BH traversing through the gravitational field associated with the different components of the elliptical galaxy, the dynamical flow variables are expressed only in functions of $r$, and as usual, flow is assumed to be inviscid in nature. Hence heat generation and radiative heat loss from the system are neglected. We consider a generic polytropic flow consisting of fully ionized Hydrogen and Helium plasma having galactic abundance. The equation of state of a polytropic flow follows a relation $P = K \rho^{1+1/N}$, where $P$ is the gas pressure, $\rho$ is the density, of the accreting plasma, $N$ is the polytropic index, and $K$ carries the information of the entropy of the flow. The sound speed $c_s$ follows the relation $c_s^2 = {\left(1+1/N \right) P}/\rho ={\left(1+1/N \right) k_B T}/{\mu m_p}$, where $k_B$ is the Boltzmann constant, $T$ the temperature of the flow, $m_p$, the usual mass of proton, and $\mu = 0.592$ is the mean molecular weight for the galactic abundance of Hydrogen and Helium with Hydrogen mass fraction $X = 0.75$. We also assume a quasi stationary accretion flow. A point needs to be noted here: In the usual viscous accretion flow theory, viscosity is generally introduced in the system through the `$r\phi$' component of viscous stress tensor in the angular momentum balance equation, which is required for the outward transport of angular momentum. The other components like `$rr$' component of viscous stress tensor which ought to have appeared in the radial momentum equation is neglected given the fact that $v_r$ is much less than $c_s$. It has been, however, pointed out by NF11, that for spherical type accretion flows in which case $v_r$ is sufficiently large, the `$rr$' component of viscous stress tensor could not altogether be wished away in the radial momentum equation, and hence ought to be incorporated in self consistent modelling of spherical accretion flows. Nonetheless, in the present work, we neglect this term in the radial momentum equation following the similar argument given in NF11. It needs to be noted, however, that the effect of viscosity on the spherically symmetric transonic flows have been discussed in the literature (e.g., Ray 2003; Turolla \& Nobili 1989; Summers 1980, and references therein). It would be then quite interesting to analyse the effect of this viscous stress term on the spherical accretion solution in the context of our system, which is left for future work. \\ The basic conservation equations for an inviscid steady state spherical accretion flow in the presence of elliptical galaxy gravitational field are then given by \\ (a) Mass conservation equation: \begin{eqnarray} \dot M = - 4 \pi r^2 \rho \, v_r \, , \label{17} \end{eqnarray} where, $\vert \dot M \vert$ is the mass accretion rate of the flow. \\ (b) Radial momentum conservation equation: \\ \begin{eqnarray} v_r \frac{d v_r}{dr} + \frac{1}{\rho} \frac{dP}{dr} + \mathscr{F}_{\rm Gal} (r) = 0 \, . \label{18} \end{eqnarray} Following the procedure adopted in previous works for studying transonic accretion flow around BH/compact objects (e.g., Chakrabarti 1990, 1996; Narayan et al. 1997; Mukhopadhyay \& Ghosh 2003; GB15) we combine Eqns. (17) and (18) and obtain \begin{eqnarray} \frac{d v^2_r}{dr} = 2 v^2_r \frac{\left[\frac{2 c^2_s}{r} - \mathscr{F}_{\rm Gal} (r) \right]}{v^2_r -c^2_s} = \frac{N1 \, (v_r, c_s, r)}{D \, (v_r, c_s)} \, \label{19} \end{eqnarray} and \begin{eqnarray} \frac{d c^2_s}{dr} = - \frac{1}{N} c^2_s \frac{\left[\frac{2 v^2_r}{r} - \mathscr{F}_{\rm Gal} (r) \right]}{v^2_r -c^2_s} = \frac{N2 \, (v_r, c_s, r)}{D \,(v_r, c_s)} \, , \label{20} \end{eqnarray} respectively. Here `$N1 \, (v_r, c_s, r)$' and `$N2 \,(v_r, c_s, r)$' represent the numerators of Eqns. (19) and (20) respectively, and `$D \, (v_r, c_s)$' represents the denominator which is identical in both the Eqns. (19) and (20). The dynamics of the fluid flow is then governed by the Eqns. (19) and (20). The corresponding equations show that to guarantee a smooth solution, the following identity $N1=N2=D=0$ should be satisfied at a particular radius called `critical radius', or in this case the `sonic radius' ($r_c$). Thus at critical radius or the sonic radius, i.e., at $r_c$, the above criteria renders \begin{eqnarray} v_{\rm rc} = c_{\rm sc} = \sqrt{\frac{ r_c \, \mathscr{F}_{\rm Gal} (r_c)}{2}}\, . \label{21} \end{eqnarray} where, $v_{\rm rc}$ and $c_{\rm sc}$ are the radial velocity and the sound speed at the sonic location ($r_c$). The existence of the sonic location(s) determines the transonic nature of the accretion flow. In order to describe the transonic behaviour of the accreting system, and to analyze the flow velocity profiles, one needs to find the solutions of the Eqns. (19) and (20). At sonic location(s), $\left.\frac{d v^2_r}{dr} \right\vert_{r_c} = \left.\frac{d c^2_s}{dr} \right\vert_{r_c} = \frac{0}{0}$. Hence we apply l'Hospital's rule to Eqns. (19) and (20) respectively. Both these equations at sonic location are then given by \begin{eqnarray} \left.\frac{d v^2_r}{dr} \right\vert_{r_c} = \frac{- \, \mathcal{Q}_1 \, \pm \, \sqrt{{\mathcal{Q}_1}^2 - 4 \, \mathcal{P}_1 \mathcal{R}_1 }}{2 \mathcal{P}_1 } \label{22} \end{eqnarray} and \begin{eqnarray} \left.\frac{d c^2_s}{dr} \right\vert_{r_c} = - \frac{1}{N} \left[\mathscr{F}_{\rm Gal} (r_c) + \frac{1}{2} \left.\frac{d v^2_r}{dr} \right\vert_{r_c} \right] \, , \label{23} \end{eqnarray} respectively, where \begin{equation} \begin{rcases*} {\mathcal{P}}_1 = \frac{1}{2} \, (2N + 1)/N , \\ {\mathcal{Q}}_1 = \frac{1}{N} \left[\frac{2 v^2_{rc}}{r_c} + \mathscr{F}_{\rm Gal} \, (r_c) \right] , \\ {\mathcal{R}}_1 = 2 v^2_{rc} \left[\frac{2 c^2_{sc}}{r^2_c} + \frac{1}{N}\frac{2}{r_c} \mathscr{F}_{\rm Gal} (r_c) + \left.\frac{d \mathscr{F}_{\rm Gal} (r)}{dr}\right\vert_{r_c} \right] . \end{rcases*} \label{24} \end{equation} Dynamically, Bondi solution is transonic in nature comprising of two solutions: accretion and wind, described by Eqns. (19) and (20). `$-$' sign in the `$\pm$' in Eqn. (22) represents the accretion solution, whereas the `$+$' sign represents the wind solution. At sonic location $r_c$, both the flow velocity $v_r$ and sound speed $c_s$ correspond to both accretion and wind solutions, coincide. Integrating Eqns. (18) and (17) we can write the specific energy and entropy of the flow at sonic location (see GB15, and references therein), given by \begin{eqnarray} E_c = \left(\frac{1}{2} + N \right) \, \frac{ r_c \, \mathscr{F}_{\rm Gal} (r_c)} {2} + \Psi_{\rm Gal} \, (r_c) \label{25} \end{eqnarray} and \begin{eqnarray} \dot {\mathcal{M}}_c = 4 \pi r^2_c\left[ \frac{ r_c \, \mathscr{F}_{\rm Gal} (r_c)} {2} \right ]^{(2N+1)/2} \, , \label{26} \end{eqnarray} respectively, where the specific entropy of accretion flow is simply related to the mass accretion rate through the relation $\dot {\mathcal{M}} = (\Gamma K)^N {\dot M}$ (see, Chakrabarti 1989b, 1990). Here, $\Gamma$ is the adiabatic index which is related to the polytropic index through the relation $N = 1/(\Gamma -1)$. In case of locally adiabatic flow $\Gamma$ varies between $4/3$ for a relativistic flow to $5/3$ for a nonrelativistic flow. While $\dot M$ is always a conserved quantity for the particular accretion flow in the steady state, however, in general, $\dot {\mathcal{M}}$ may not always be the so, owing to the fact that $\dot {\mathcal{M}}$ contains $K$ which carries the information of the entropy of the flow. For a dissipative system $\dot {\mathcal{M}}$ is not a conserved quantity, however for a nondissipative system $\dot {\mathcal{M}}$ remains conserved in the flow, unless a shock appears in the system. To solve the dynamical equations and study the global family of solutions, we have to provide appropriate value of $E_c$ as the boundary condition of the flow which is a conserved quantity (for our case) throughout the accretion regime. Thus one can write the conserved energy of the flow $E \equiv E_c \equiv E_{\rm out}$, where $E_{\rm out}$ is the specific energy of the flow at the outer accretion boundary which is simply related to the outer accretion radius $r_{\rm out}$ and the corresponding temperature at the outer radius (or the ambient temperature) $T_{\rm out}$. Hence, given a value of $E_c$, or equivalently for a corresponding choice of the outer boundary values (outer boundary conditions) of the inflow, i.e., values of ($r_{\rm out}, T_{\rm out}$), one would be able to compute the corresponding sonic location $r_{c}$ using Eqn. (25). Using $r_{c}$, the corresponding radial velocity and the sound speed at the sonic location would then be evaluated. These would then act as further boundary conditions of the flow to compute $v_r$ and $c_s$ from Eqns. (19) and (20). We solve the Eqns. (19) and (20) using the fourth order Runge-kutta method integrating from the sonic location $r_{c}$ in both inward and outward directions. In the next section we will analyse the transonic behaviour (i.e., to carry out the sonic-point analysis) of the accretion flow and perform the global analysis of the parameter space, for an inviscid spherically symmetric, steady adiabatic flows. \section{Sonic-point analysis for spherically symmetric accretion flow in the elliptical galaxy gravitational field} In the inviscid spherically symmetric, steady adiabatic (or polytropic) Bondi-type accretion onto the gravitational field of an isolated BH, or even for the case with isolated BH in the presence of $\Lambda$ (e.g., GB15; Mach et al. 2013), the dynamical flow behaviour of the flow is always characterized by a a single sonic transition, where the flow makes a transition from subsonic speed to supersonic speed through a single `saddle-type' sonic point (or critical point) in the region close to the central object. However, in case of the accretion flow traversing through the entire gravitational field of the elliptical galaxy onto the central SMBH, the transonic behaviour of the flow and consequently the nature of flow dynamics may substantially deviate from that of the classical Bondi-type solution. The transonic behaviour or the transonicity of the fluid flow can be determined using Eqn. (25) and/or Eqn. (26), which describe the `sonic energy-sonic radius', and `sonic entropy-sonic radius' profiles, respectively. In figures 1a,c,e, we show the variation of sonic energy ($E_c$) of the accretion flow as a function of sonic location ($r_c$) for our five-component elliptical galaxy (BH + stellar + DM + hot gas + $\Lambda$). Here we consider the standard value of $\Upsilon_B = 100$, with JS-3/2 DM matter profile. Owing to the incorporation of galactic contribution to the potential through different galactic mass-components (stellar, DM, hot gas) in the presence of $\Lambda$, the accretion flow exhibits a remarkable behaviour, with the appearance of {\textit{multi-transonicity}} or {\it{multi-criticality}} in the fluid flow, as is being displayed in the $E_c - r_c$ profiles in Fig. 1. This emergence of {\it{multi-transonicity}} or {\it{multi-criticality}} in a spherically symmetric, steady adiabatic flow, indicates a significant departure from the classical Bondi solution. Although, there may be instances when more than one critical point may also appear in the spherical accretion flow onto an isolated BH, if, however, the flow deviates from being strictly adiabatic (see paragraph 5 in \S 1). To check the relative contributions of different galactic components to the transonicity of the flow, as an example, in Fig. 1a, we show the profiles corresponding to the contributions from only (BH + stellar) components as well due to contributions from (BH + stellar + DM + hot gas) components neglecting the effect of $\Lambda$. Figure 1a reveals that stellar mass component dominates the central pc to kpc-scale regions, whereas the DM and the hot gas components dominate the regions in the scales of $\sim$ few kpc to few hundreds of kpc. The effect of $\Lambda$ becomes dominant in the region $\gtrsim$ 100 kpc. Let us focus on Fig. 1a, corresponding to our five component case. The nature of the profile reflects that within a certain range in the value of $E_c$, i.e., from $E_{\rm min}$ to $E_{\rm max}$ (where the curve peaks), the flow comprises of three sonic locations for any particular choice in the value of $E_c$ \footnote{Note that for any particular accretion flow, $E_c$ is equivalent to the total energy $E$ of the flow.}. To exemplify, we have marked a representative line of constant energy $E_c \simeq 2.24 \times 10^{-6}$ on the figure which intersects at three sonic locations. The inner and outer sonic points with the negative slopes of the curve are the `saddle type' or `X type' sonic points through which the subsonic to supersonic transition takes place, with the matter attaining supersonic speed. On the contrary, in-between two X-type sonic points, one with the positive slope of the curve is the `centre-type' or `O-type' sonic point. $E_{\rm min}$ actually corresponds to the radial location where the profile curve gets truncated. This radial location is referred to as the static radius ($r_{\rm stat})$; the radius, at which the gravitational attraction due to galactic mass distribution is counterbalanced by the $\Lambda$ \footnote{$r_{\rm stat}$ can be determined using the limiting condition, that at $r_c > r_{\rm stat}$ as $\mathscr{F}_{\rm Gal}$ becomes negative, sonic velocities become imaginary.}. Static radius is the radius, in the vicinity of which the effect of $\Lambda$ strongly starts to dominate. Figure 1a reveals that with the increase in the value of $E_{c}$, as $E_c$ approaches $E_{\rm max}$, the outer X-type and O-type sonic points tend to coincide. And with the further increase in the value of $E_c$, for $E_c > E_{\rm max}$, the flow will only have one sonic transition through the inner X-type sonic point, resembling the classical Bondi-type solution. On the other hand, for $E_c < E_{\rm min}$, the flow comprises of only two sonic locations, with inner X-type and centre-type. Figures 1c,e are to be interpreted in a similar fashion. The figures reveal that with the increase in the value of $\Gamma$ the energy range for which one obtains three sonic locations gets reduced, with the decrease in the corresponding values of $E_{\rm max}$. It needs to be however noted that the value of $E_{\rm min}$ remains the same, as the static radius is independent of $\Gamma$. A similar multi-transonic behavior (as is being revealed in Fig. 1) appears in the case for advective accretion flows onto isolated BHs, which has been extensively studied in the astrophysical literature (e.g., Abramowicz \& Chakrabarti 1990; Chakrabarti 1996; Mukhopadhyay \& Ghosh 2003; Mukhopadhyay 2003). The reason for the appearance of multi-transonicity or multi-criticality in advective accretion flows is owing to the existence of centrifugal barrier in the vicinity of the BH. This centrifugal barrier occurs if the angular momentum of the flow is sufficiently high (albeit sub-Keplerian). Bondi-type spherical accretion onto the BH, on the other hand, is devoid of any such angular momentum in the flow. However, in case of the accretion flow traversing through the entire gravitational field of the elliptical galaxy onto the central SMBH, the galactic gravitational potential actually provides the necessary centrifugal barrier for the occurrence of multi-transonicity, in spherical accretion. It is to be noted that unlike the scenario in advective accretion onto an isolated BH, where the multi-transonicity appears in the region close to the BH, here, in our case, multi-transonic behaviour arises predominantly in the central to the outer regions of the accretion flow, where the galactic contribution to the gravitational potential becomes dominant. \begin{figure*} \centering \includegraphics[width=150mm]{f1.eps} \caption{Variation of sonic energy ($E_c$) as a function of sonic location ($r_c$) (figures 1a,c,e), and function of sonic entropy ($\dot {\mathcal{M}}_c$) (figures 1b,d,f), for spherical accretion in five-component elliptical galaxy, for various values of $\Gamma$. The curves are generated for standard value of $\Upsilon_B = 100$, and corresponding to JS-3/2 DM profile. Solid curves in all the figures correspond to the profile only with the BH contribution representing the classical Bondi case. Dotted curves in all the figures correspond to the profile for our five-component case (BH + stellar + DM + hot gas + $\Lambda$). To check the relative contributions of different galactic components to the transonicity of the flow, as an example, in Fig. 1a, we show $E_c - r_c$ profiles for (BH + stellar) case (long-dashed curves) as well as for (BH + stellar + DM + hot gas) case (short-dashed curves). In figures 1b,d,f, `I' indicates inner X-type sonic point branch, whereas `O' indicates outer X-type sonic point branch, for our five-component case. The truncation of dotted curves in figures 1a,c,e at $r_c \simeq 1.9168 \times 10^{11} \, r_g$, indicates `static radius' $(r_{\rm stat})$. Note that $r_{\rm stat}$ is independent of $\Gamma$. As an example, in Fig. 1a, we have marked $(r_{\rm stat})$ with vertical double-dashed line. At $r_{\rm stat}$, the corresponding value of $E_c \equiv E_{\rm min} \simeq 2.2248 \times 10^{-6}$. The horizontal dotted-dashed line in Fig. 1a is a representative line of constant energy $E_c \simeq 2.24 \times 10^{-6}$ which intersects the dotted curve at three sonic locations, with two `X-type' sonic points with negative slopes, and in-between two X-type sonic points one with the positive slope of the curve is the `O-type' sonic point. $I_2$ denotes the inner X-type sonic point for five-component case, whereas $I_1$ corresponds to the sonic point for classical Bondi case. The inset image in Fig. 1a depicts the zoomed view corresponding to our five-component case in the outer regions, denoting minimum energy $E_{\rm min}$ and maximum energy $E_{\rm max}$; the energy range for which the flow will have three sonic points. {\it Rest of the panels in Fig. 1, and figures 2 and 3, are to be interpreted in a similar fashion}. For $\Upsilon_B = 100$, the virial radius $r_\nu \simeq 2.554 \times 10^{10} \, r_g$. Note that for our case, $1 \, {\rm pc} \sim 10^5 r_g$. } \label{Fig1} \end{figure*} \begin{figure*} \centering \includegraphics[width=150mm]{f2.eps} \caption{Comparison of $E_c - r_c$ and $E_c - \dot {\mathcal{M}}_c$ profiles for different values of $\Upsilon_B$, corresponding to our five-component elliptical galaxy. In all the figures, dotted, short-dashed, and long-dashed curves correspond to $\Upsilon_B \equiv (390, 100, 33)$, respectively. These curves are generated with JS-3/2 DM profile. Solid curves in all the figures correspond to $\Upsilon_B = 14$ for no DM case. The truncation of curves in figures 2a,b indicates the corresponding static radii $(r_{\rm stat})$. For the cases with $\Upsilon_B \equiv (390, 33)$ the corresponding values of $r_{\rm stat}$ and the corresponding values of $E_c$ at $r_{\rm stat}$ [i.e., $E_{c (\rm min)}$] are \, $[r_{\rm stat}, \, E_{c (\rm min)}] \simeq [3.0792 \times 10^{11} \, r_g, \, 5.1062 \times 10^{-6}], \, \, [1.208 \times 10^{11} \, r_g, \, 7.434 \times 10^{-7}]$, respectively. The inset image in Fig. 2a depicts the zoomed view corresponding to $\Upsilon_B = 14$ in the outer regions. The radial location where the second peak (the more sharper) appears in this inset image is the corresponding virial radius. Similarly in Fig. 2c, the inset image depicts the zoomed view corresponding to $\Upsilon_B = 14$ for higher values of $\dot {\mathcal{M}}_c$. Note that for $\Upsilon_B = 14$, the corresponding $E_c$ at $r_{\rm stat}$ attains a negative value. On the other hand, for $\Gamma = 5/3$, corresponding to $\Upsilon_B = 14$, the $E_c - r_c$ profile shows that the corresponding values of sonic energy always remain negative for $r_c \, \gtrsim \, 2 \times 10^3 \, r_g$, implying that the flow will only have one sonic transition through the inner X-type sonic point. The virial radii for $\Upsilon_B \equiv (390, 33, 14)$ are $ \simeq (4.0202 \times 10^{10} \, r_g, \, 1.7649 \times 10^{10} \, r_g, \, 1.3262 \times 10^{10} \, r_g)$, respectively. For our case, $1 \, {\rm pc} \sim 10^5 r_g$. } \label{Fig2} \end{figure*} \begin{figure*} \centering \includegraphics[width=150mm]{f3.eps} \caption{Comparison of $E_c - r_c$ and $E_c -\dot {\mathcal{M}}_c$ profiles for JS-3/2 and NFW DM profiles, for $\Upsilon_B = 100$, corresponding to our five-component elliptical galaxy. Solid and long-dashed curves in all the figures correspond to JS-3/2 and NFW DM profile, respectively. The truncation of curves in figures 3a,b indicates the corresponding static radii $(r_{\rm stat})$. For NFW DM case, with $\Upsilon_B = 100$, the corresponding value of $r_{\rm stat} \simeq 1.8548 \times 10^{11} \, r_g$. Note that corresponding to NFW DM profile, the corresponding $E_c$ at $r_{\rm stat}$ attains a negative value. On the other hand, corresponding to $\Gamma = 5/3$, for NFW DM case, the $E_c - r_c$ profile shows that the corresponding values of sonic energy always remain negative for $r_c \, \gtrsim \, 1.3 \times 10^3 \, r_g$, implying that the flow will only have one sonic transition through the inner X-type sonic point. For our case, $1 \, {\rm pc} \sim 10^5 r_g$. } \label{Fig3} \end{figure*} \begin{figure*} \centering \includegraphics[width=160mm]{f4.eps} \caption{Transonic flow profiles (radial variation) for both accretion and wind solutions with the variation of $\Gamma$ for our five-component elliptical galaxy, corresponding to various values of $\Upsilon_B$. Figures 4a,d,g correspond to accretion solution; Figures 4b,e,h correspond to wind solution; Figures 4c,f,i correspond to Mach number profiles for both accretion and wind. In Fig. 4a, thin line curves correspond to accretion sound speed, thick line curves correspond to accretion velocity: solid curve correspond to usual Bondi case; long-dashed, dotted, and short dotted-dashed curves correspond to $\Upsilon_B \equiv (100, 390, 33)$ for JS-3/2 DM case, respectively; short-dashed, and long dotted-dashed curves correspond to $\Upsilon_B \equiv (100, 390)$ for NFW DM case, respectively. Curves in figures 4d,g are similar to that of Fig. 4a, however for a comparison, shown only for the standard value with $\Upsilon_B = 100$. Curves in figures 4b,e,h are similar to that of figures 4a,d,g, however, in figures 4b,e,h, the corresponding thin line curves are for wind velocity, whereas thick line curves are for sound speed corresponding to wind solution. Curves in figures 4c,f,i are similar to that of the above figures, with thin line curves are for wind, whereas thick line curves are for accretion. It needs to be mentioned that the profiles corresponding to $\Upsilon_B = 14$ almost coincide with that of $\Upsilon_B = 33$, we do not show them here. The transonic solutions are generated corresponding to a fixed value of $E \equiv E_c \equiv E_{\rm out} = 6 \times 10^{-6}$, as the boundary condition of the accretion flow. In Fig. 4a, the inner X-type sonic points corresponding to usual Bondi case, and corresponding to $\Upsilon_B = 390$ for NFW DM case, have been marked with circles. } \label{Fig4} \end{figure*} \begin{figure*} \centering \includegraphics[width=160mm]{f5.eps} \caption{Variation of the quantity $\chi$ with $E \equiv (E_c \equiv E_{\rm out})$, corresponding to our five-component elliptical galaxy. Solid, long-dashed, and short-dashed curves in Fig. 5a are for $\Gamma \equiv (4/3, 1.5, 5/3)$, respectively, corresponding to JS-3/2 DM profile. Similarly, dotted, long dotted-dashed, and short dotted-dashed curves are for $\Gamma \equiv (4/3, 1.5, 5/3)$, respectively, but corresponding to NFW DM profile. The profiles in Fig. 5a are generated with the standard value of $\Upsilon_B = 100$. Figure 5b is similar to that of Fig. 5a, however generated for $\Upsilon_B \equiv (390, 33)$. For a comparison with the case for $\Upsilon_B = 100$, in Fig. 5b, the profiles are shown only for JS-3/2 DM case, for $\Gamma \equiv (4/3, 5/3)$. In Fig. 5b, solid and long-dashed curves are for $\Gamma \equiv (4/3, 5/3)$, respectively, corresponding to $\Upsilon_B = 390$, while short-dashed and dotted curves are for $\Gamma \equiv (4/3, 5/3)$, respectively, corresponding to $\Upsilon_B = 33$. It needs to be mentioned that the profiles corresponding to $\Upsilon_B = 14$ almost coincide with that of $\Upsilon_B = 33$, we do not show them here. } \label{Fig5} \end{figure*} \begin{figure*} \centering \includegraphics[width=160mm]{f6.eps} \caption{Transonic flow profiles (radial variation) for both accretion and wind solutions with the variation of $\Gamma$ for our five-component elliptical galaxy, corresponding to various values of $\Upsilon_B$, but generated for outer accretion boundary conditions with ($r_{\rm out}, T_{\rm out}) \equiv (6 \times 10^{10} \, r_g, \, 2 \times 10^7 \, K$). Figures 6a,d,g correspond to accretion solution; (b,e,h) correspond to wind solution; (c,f,i) correspond to density ($\rho$) profiles for both accretion and wind, $\rho_{\rm out}$ represents the density at the outer boundary ($r_{\rm out}$). All the curves in figures 6a,d,g and 6b,e,h resemble the curves in figures 4a,d,g and 4b,e,h, respectively. Figures 6c,f,i are similar to that of the above figures, with thin line curves are for wind, whereas thick line curves are for accretion. It is seen that flow profiles corresponding to JS-3/2 and NFW DM cases almost coincide. } \label{Fig6} \end{figure*} \begin{figure*} \centering \includegraphics[width=160mm]{f7.eps} \caption{Similar to that in Fig. 6, but generated for outer accretion boundary conditions with ($r_{\rm out}, T_{\rm out}) \equiv (\sim 10^{7} \, r_g, \, 6.5 \times 10^6 \, K$). Figures 7a,b correspond to accretion solution, and wind solution, respectively. In Fig. 7a, thick line curves correspond to accretion velocity and thin line curves correspond to accretion sound speed, whereas in 7b, thick line curves correspond to wind sound speed and thin line curves correspond to wind velocity. In both these figures, solid curve corresponds to usual Bondi flow case and long dashed and short dashed are $\Upsilon_B \equiv (100, 33)$, JS-3/2 DM case, respectively. Dotted curve corresponds to $\Upsilon_B = 14$ for no DM case. In Fig. 7a, it is seen that the flow profiles corresponding to $\Upsilon_B \equiv (100, 33, 14)$ almost coincide. Here we do not show the case for $\Upsilon_B = 390$, as the flow behaviour is almost similar to that for $\Upsilon_B = 100$. Here the curves are generated only for $\Gamma = 4/3$, as corresponding to the stated outer accretion boundary conditions, higher values of $\Gamma = (1.5, 5/3)$ render the corresponding values of $E$ to be negative. Similarly is the case with NFW DM profile, for which, irrespective of the values of $\Upsilon_B$ and $\Gamma$, the stated outer accretion boundary conditions always render the corresponding values of $E$ to be negative. Figure 7c corresponds to Mach number profiles for the case with $\Upsilon_B \equiv (100, 33)$, displaying the corresponding flow topologies. Thick line curves with inward arrow direction correspond to accretion branch solution, while the thin line curves with outward arrow direction correspond to wind branch solution. The flow topologies with arrows in the curves indicate that while initially the wind flow makes an outward journey passing through the inner X-type sonic point, the matter does not find any physical path to further continue its outward journey, the matter subsequently follows the accretion branch and enters the BH. } \label{Fig7} \end{figure*} \begin{figure*} \centering \includegraphics[width=160mm]{f8.eps} \caption{Variation of quantity $\xi$ with radial distance $r$ for our five-component elliptical galaxy. Figures 8a,b,c are for wind velocity, wind temperature, and accretion temperature, respectively, corresponding to outer accretion boundary conditions with ($r_{\rm out}, T_{\rm out}) \equiv (6 \times 10^{10} \, r_g, \, 2 \times 10^7 \, K$). Figures 8d,e,f are similar to figures 8a,b,c, however corresponding to outer accretion boundary conditions with ($r_{\rm out}, T_{\rm out}) \equiv (\sim 10^{7} \, r_g, \, 6.5 \times 10^6 \, K$). For a comparison, in figures 8a,b,c, we only show the cases for standard value with $\Upsilon_B = 100$, and for no DM case with $\Upsilon_B = 14$, corresponding to $\Gamma \equiv (4/3, 5/3)$. In 8a,b,c solid and short-dashed curves are for $\Upsilon_B \equiv (100, 14)$, respectively, corresponding to $\Gamma = 4/3$, whereas long-dashed and dotted curves are for $\Upsilon_B \equiv (100, 14)$, respectively, corresponding to $\Gamma = 5/3$. In figures 8a,b,c, the profiles are shown for JS-3/2 DM case, as the profiles for NFW DM case almost coincide with that for the JS-3/2 DM case. In the context of figures 8d,e,f, note that corresponding to the stated outer accretion boundary conditions, for $\Gamma \equiv (1.5, 5/3)$, and NFW DM profile, one does not obtain physical solutions for accretion and wind (see Fig. 7). In figures 8d,e we show the profiles associated with the wind flow corresponding to only $\Upsilon_B = 14$ for JS-3/2 DM case, as corresponding to other values of $\Upsilon_B$, the actual wind flow is not physically possible (see Fig. 7). Figure 8f is similar to that of figures 8d,e, but corresponding to accretion temperature (note that for accretion temperature, the corresponding profile for $\Upsilon_B = 100$ almost coincides with that for $\Upsilon_B = 14$). The negative values in the quantity $\xi$ indicate that the corresponding values of the physical quantities for the usual Bondi flow case is larger than that for our five-component galaxy. } \label{Fig8} \end{figure*} \begin{figure*} \centering \includegraphics[width=160mm]{f9.eps} \caption{Variation of Mach number representing global flow topologies for multi-transonic flows (with both inner and outer X-type sonic points), corresponding to the spherical accretion for our five-component elliptical galaxy, depicting a few sample cases of shock formation in the flow. Figures 9a,b,c correspond to the case with $\Upsilon_B = 100$, for JS-3/2 DM profile. For a comparison, in Fig. 9d we show the flow topology correspond to $\Upsilon_B = 100$, but for NFW DM profile. Similarly in Fig. 9e we show the flow topology corresponding to case with $\Upsilon_B = 390$ for JS-3/2 DM profile. Figure 9f corresponds to $\Upsilon_B = 14$ for no DM case, consisting of all five sonic points (three saddle-types and two centre-types). The corresponding values of $E \equiv E_c \equiv E_{\rm out}$ for which the profiles are generated are given in the respective figures. Note that for these values of $E_c$, corresponding to the respective cases in Fig. 9, the corresponding outer sonic branch (long-dashed curves) is at higher entropy than the corresponding inner sonic branch (solid curves). This can be verified from the respective $E_c - \mu_c$ profiles in figures 1,2,3. The vertical dotted lines with arrows in figures 9a,b,e indicate the respective shock transitions in the corresponding wind flows. In these respective figures, initially the wind flow passes through the inner X-type sonic point, then after encountering a shock (satisfying Rankine-Hugoniot conditions), jumps to the outer sonic branch of higher entropy along the dotted line, and then continue its outward journey passing trough the outer X-type sonic point. } \label{Fig9} \end{figure*} \begin{figure} \includegraphics[width=85mm]{f10.eps} \caption{Temperature profiles corresponding to wind flows having shocks (as described in Fig. 9). Solid, long-dashed and short-dashed curves are for flows having shocks corresponding to the cases in figures 9a,b,e, respectively.} \label{Fig10} \end{figure} \begin{figure*} \centering \includegraphics[width=150mm]{f11.eps} \caption{Transonic flow behavior and flow profiles for isothermal flows, corresponding to our five-component elliptical galaxy, for different values of $\Upsilon_B$. Figure 11a shows the variation of temperature $T$ with sonic location $r_c$ corresponding to our five-component elliptical galaxy. Solid curve corresponds to classical Bondi flow onto an isolated BH. Long-dashed and short-dashed curves correspond to the standard value with $\Upsilon_B = 100$, for JS-3/2 and NFW DM profiles, respectively. Dotted and long dotted-dashed curves correspond to $\Upsilon_B = 390$, for JS-3/2 and NFW DM profiles, respectively. For a comparison, we show the profile for $\Upsilon_B = 33$, only for JS-3/2 DM case, represented by short dotted-dashed curve. The horizontal double dotted-dashed line (upper horizontal line) in Fig. 11a is a representative line of constant temperature $T \simeq 2 \times 10^{6}$ which intersects the corresponding curves for our five-component case at three sonic locations. The inner and outer sonic points with negative slopes of the curves are the X-type sonic points, and in-between two X-type sonic points with positive slopes of the curves are the O-type sonic points. The horizontal double-dashed line (lower horizontal line) is the representative line of constant (minimum) temperature $T \equiv T_{\rm min} \simeq 1.242 \times 10^{6}$ which touches the curves corresponding to $\Upsilon_B = (100, 390)$ with NFW DM profile. Below this temperature $T_{\rm min} \simeq 1.24 \times 10^{6}$, corresponding to these cases, no inner X-type sonic points appear in the corresponding $T-r_c$ profiles. In the context of this minimum temperature $T_{\rm min}$, rest of the curves for our five-component case are to be interpreted in a similar fashion. Corresponding to $\Upsilon_B = (33, 100, 390)$ with JS-3/2 DM profile, $T_{\rm min} \simeq (1.27 \times 10^{6}, 1.32 \times 10^{6}, 1.38 \times 10^{6} )$, respectively. Figure 11b depicts the Mach number profiles for both accretion and wind solutions for isothermal flows, for our five-component elliptical galaxy, corresponding to $T \sim 6.5 \times 10^6 \, K$. All the curves in Fig. 11b resemble the curves in Fig. 11a, however thin-line curves (top in the figure) correspond to wind solutions, whereas thick-line curves (below in the figure) correspond to accretion solutions. } \label{Fig11} \end{figure*} \begin{figure} \includegraphics[width=87mm]{f12.eps} \caption{Variation of quantity $\chi$ with $T$ for isothermal flows, corresponding to our five-component elliptical galaxy, for different values of $\Upsilon_B$. Solid and long dashed curves are for $\Upsilon_B \equiv 100 $ for JS-3/2 and NFW profile respectively, while the short-dashed and dotted are for $\Upsilon_B \equiv 390 $ for JS-3/2 and NFW profile respectively. For a comparison we show the profile for $\Upsilon_B = 33$, only for JS-3/2 DM case, represented by the long dotted-dashed curve. Note that the long-dashed curve and dotted curve (i,e., for NFW cases) almost coincide (the bottom-most line). } \label{Fig12} \end{figure} \begin{figure*} \centering \includegraphics[width=160mm]{f13.eps} \caption{ Variation of the quantity $\frac{\dot M_{B}}{\dot M_{B} (\rm BH)}$ with the ambient temperature $T_{\rm out}$, corresponding to different values of $\Gamma$. In Figures 13a,b,c the profiles are generated with the outer accretion radius $r_{\rm out} \simeq 6 \times 10^{10} \, r_g$, resembling an accretion flow from ICM/IGM, whereas figures 13d,e,f correspond to the accretion flow from the hot phase of ISM at the centre of the galaxy with $r_{\rm out} \simeq 10^{7} \, r_g$. In figures 13a,b,c, solid and long-dashed curves correspond to $\Upsilon_B = 100$, for JS-3/2 and NFW DM profiles, respectively; short-dashed and dotted curves correspond to $\Upsilon_B = 33$, for JS-3/2 and NFW DM profiles, respectively; long dotted-dashed curve correspond to $\Upsilon_B = 14$ for no DM case. We do not show the corresponding profiles for $\Upsilon_B = 390$, as their behaviour is similar to that for the case with $\Upsilon_B = 100$. For a comparison, in figures 13d,e,f, the profiles are only shown corresponding to the standard value with $\Upsilon_B = 100$, and with $\Upsilon_B = 14$ for no DM case, where solid and long-dashed curves correspond to $\Upsilon_B = 100$, for JS-3/2 and NFW DM profiles, respectively; long dotted-dashed curve in the figures correspond to $\Upsilon_B = 14$. The truncation of curves indicate that at those corresponding values of $T_{\rm out}$, the corresponding values of $E_{\rm out}$ become negative. For a comprehensive understanding of the dependence of $\dot M_{B}$ on $T_{\rm out}$, in our analysis we choose a wide range of the value of $T_{\rm out}$ in the X-axis. } \label{Fig13} \end{figure*} In figures 1b,d,f we show the corresponding variation of sonic energy ($E_c$) as a function of sonic entropy ($\dot {\mathcal{M}}_c$), for our five-component elliptical galaxy. `I' indicates inner X-type sonic point branch, whereas `O' indicates outer X-type sonic point branch. One of the interesting implications of multi-transonicity in the fluid flow is the possible formation of shocks in the flow. Shocks can form in an accretion flow if there is a possibility of the matter to jump from the outer X-type sonic point branch of lower entropy region to the inner X-type sonic point branch of higher entropy region, whereas corresponding to wind solution, shocks can occur if there is a possibility of the matter to jump from the inner X-type sonic point branch of lower entropy region to the outer X-type sonic point branch of higher entropy region. It is seen from the figures (figures 1b,d,f) that for certain range in the value of $\Gamma$ ($\Gamma \raisebox{-.4ex}{$\stackrel{<}{\scriptstyle \sim}$} 1.5$), inner sonic branch and the outer sonic branch intersects. The point of intersection is that point where the flow can pass through the inner and outer X-type sonic points simultaneously. This aspect of intersection of both branch points is particularly significant in the context of the formation of shocks in the flow. Nonetheless, with the increase in the value of $\Gamma$ as ($\Gamma > 1.5$), although the system shifts to higher entropy region, with the flow becoming more stable, the possibility of intersection between inner and outer sonic point branches decreases, with the outer X-type sonic points tend to shift to higher entropy region (see Fig. 1f). This indicates that although shocks can possibly occur in the flow for $\Gamma \raisebox{-.4ex}{$\stackrel{<}{\scriptstyle \sim}$} 1.5$, however, for $\Gamma > 1.5$ the possibility of shock formation gets diminished, with the complete disappearance of possible shocks in the flow as $\Gamma \to 5/3$. In Fig. 2 , we show the comparison of the transonic behaviour of the flow for different values of galactic mass-to-light ratio $\Upsilon_B$ corresponding to our five-component elliptical galaxy, with JS-3/2 DM profile. Figure 2 is to be interpreted in a similar fashion as that of Fig. 1. It is seen that with the increase in the value of $\Upsilon_B$, the energy range for which the multi-transonicity (three sonic points) occurs in the flow increases (Figures 2a,b), with the possibility of shock formation in the flow gets enhanced. It is found that corresponding to the case $\Upsilon_B = 14$ with negligible DM content, for a certain range of energy $E_c$, five sonic points appear in $E_c - r_c$ profile (see the inset image in Fig. 2a; the additional sonic points appear around the radial location where the second (more sharper) peak is visible, with the outermost sonic point, the saddle or X-type). This indicates that, in principle, there may be a possibility of having double shocks in the flow for this particular case. However, the values of energy corresponding to which multi-transonicity appears in this case are much less; the possible formation of either of the shocks in the flow is not expected to materialize. With the increase in the value $\Gamma$, as the flow tends to become nonrelativistic, the transonic behaviour of the flow corresponding to $\Upsilon_B \equiv (390, 33, 14)$ remains largely similar as that of the case with $\Upsilon_B = 100$ (Fig. 1). In figures 2b,d, we depict the transonic behaviour of the flow for $\Gamma = 5/3$ (see the caption of Fig. 2 for more details). In Fig. 3, we show the comparison of the transonic behaviour of the flow for JS-3/2 and NFW DM profiles. As an example we show the comparison for standard value of $\Upsilon_B = 100$. Figure 3 is to be interpreted in a similar fashion as that of figures 1 and 2. Although, the transonic behaviour of the flow with NFW DM profile largely resembles the case with JS-3/2 profile, however, the relevant values of energy for which one obtains three sonic points in the flow are much less as compared to that of the case with JS-3/2 profile (see the caption of Fig. 3 for more details). Note that, for $\Gamma = 4/3$, corresponding to NFW DM profile, although inner sonic branch and outer sonic branch intersects (Fig. 1c), however, at the point of intersection, $E_c$ remains negative. This indicates that corresponding to NFW DM profile, for the case with $\Upsilon_B = 100$, the possibility of the shocks to occur in the flow is unlikely. Our sonic-point analysis thus reveals that owing to the galactic contribution to the potential, not only multi-transonicity appears in the flow, but also for certain parameter regime, depending on the values of $\Gamma$, $\Upsilon_B$ and nature of DM profile, there can be possible generation of shocks in the adiabatic spherical accretion, indicating substantial departure from the classical Bondi solution. Such occurrence of multi-transonicity and shocks in spherical accretion may have interesting physical implications, which we will discuss as we proceed through the later sections. In our context, when we mention shocks, we always mean Rankine-Hugoniot shocks. Rankine-Hugoniot shock conditions in the flow (see Chakrabarti 1989a,b; Abramowicz \& Chakrabarti 1990) are given by: {\scriptsize \begin{equation} \begin{rcases*} \frac{1}{2} M^2_{+} \, c^2_{s+} \, + \, N \, {c^2_{s+}} + \Psi_{\rm Gal} \, (r_{\rm sck}) \, = \, \frac{1}{2} M^2_{-} \, c^2_{s-} \, + \, N \, {c^2_{s-}} + \Psi_{\rm Gal} \, (r_{\rm sck}) \, , \\ P_{+} \, + \, \rho_{+} \, M^2_{+} \, c^2_{s+} \, = \, P_{-} \, + \, \rho_{-} \, M^2_{-} \, c^2_{s-} \, , \\ M_{+} \, c_{s+} \, \rho_{+} \, r^2_{\rm sck} \, = \, M_{-} \, c_{s-} \, \rho_{-} \, r^2_{\rm sck} \, , \\ {\dot {\mathcal{M}}}_{+} > {\dot {\mathcal{M}}}_{-} \, , \end{rcases*} \label{27} \end{equation} } where subscripts `$-$' and `+' symbolize the quantities just before and after the shock, respectively. $r_{\rm sck}$ represents shock location. Using first three relations of the above equation, one can compute the shock invariant quantity given by \begin{eqnarray} C = \frac{\left[1/M_{+} + \Gamma M_{+} \right]^2}{M^2_{+} \, (\Gamma -1) + 2} = \frac{\left[1/M_{-} + \Gamma M_{-} \right]^2}{M^2_{-} \, (\Gamma -1) + 2} \label{28} \end{eqnarray} For the shocks to occur in the flow, it is thus necessary to simultaneously satisfy all the relations of Eqn. (27) and Eqn. (28). In the next section, we will analyse in details about the aspect of shock formation in the context of our spherical flow. \section{Fluid properties of spherical accretion in the elliptical galaxy gravitational field} In the previous section we elucidated the transonic behaviour of spherical accretion in the elliptical galaxy gravitational field. Owing to the accretion flow traversing through the gravitational field of the elliptical galaxy onto the central SMBH, the galactic contribution to the potential through different galactic mass-components in the presence of $\Lambda$, significantly affect the transonic properties of the flow. In this section, we analyze the dynamical behaviour of the fluid flow in context of our spherical accretion for our five-component elliptical galaxy, to check how the galactic contribution to the potential in the presence of $\Lambda$ influence the fluid properties of the flow, in both adiabatic and isothermal paradigms, however predominantly focusing on adiabatic flows. \subsection{Adiabatic case} In Fig. 4, we show the radial profiles of the flow velocity $v_r$ and the sound speed $c_s$ for both accretion and wind solutions, corresponding to different values $\Upsilon_B$ and $\Gamma$, for a fixed value of energy $E \equiv E_c \equiv E_{\rm out} = 6 \times 10^{-6}$. This typical choice in the value of $E$ ensures that for spherical accretion (for both accretion and wind solutions) corresponding to our five-component elliptical galaxy, the flow always makes a single sonic transition through the inner X-type sonic point, irrespective of the values of $\Upsilon_B$, $\Gamma$, and relevant DM profiles (see the figures for $E_c - r_c$ profiles in the previous section). It needs to be remembered that $E$ is simply related to the outer accretion boundary conditions ($r_{\rm out}, T_{\rm out}$). Thus corresponding to different cases considered in Fig. 4, a combination of different values of $T_{\rm out}$ and $r_{\rm out}$, would render the stated value of $E \sim 6 \times 10^{-6}$. By meticulously checking, we make a (rough) lower bound estimates of $T_{\rm out} > 7 \times 10^6 \, K$ and $r_{\rm out} > 10^{10} \, r_g$ (or equivalently $> 100 \, {\rm kpc}$); a combination of these $T_{\rm out}$ and $r_{\rm out}$ corresponding to different cases considered in Fig. 4, would approximately render a lower bound of $E \gtrsim 6 \times 10^{-6}$. This lower bound value of $r_{\rm out} \sim 100$ kpc approximately corresponds to the X-ray halo radius of giant elliptical galaxy M87 (Bahcall \& Sarazin 1977, also see Quataert \& Narayan 2000). This roughly indicates that for typical giant elliptical galaxies, this particular choice of $E$ would possibly resemble an accretion flow directly from the ICM or intergalactic medium (IGM). The profiles show that, owing to the galactic contribution to the potential, the corresponding inner X-type sonic points always shift inwards, as compared to the case for usual Bondi flow onto an isolated BH. As an example, in Fig. 4a, we have marked the inner X-type sonic points corresponding to usual Bondi case, and corresponding to $\Upsilon_B = 390$ for NFW DM case. For more clarity, one can see the $E_c - r_c$ profiles in Fig. 1. Also, with the increase in the value $\Gamma$, as the flow tends to be nonrelativistic, the corresponding inner X-type point sonic locations, in general, always shift inwards (as also being reflected from the figures in the previous section). The figure shows that for relativistic flows the corresponding flow profiles for different $\Upsilon_B$ as well for different DM cases, tend to spread apart, while with the increase in $\Gamma$, the corresponding profiles tend to merge with each other as well as with the usual Bondi case, indicating that the galactic contribution to the potential has more effect on relativistic flows, as compared to the flows tending to be nonrelativistic. The profiles show that the wind velocity and accretion sound speed (or equivalently the temperature of the accretion flow) substantially deviate in the outer regions (at $r > 10^{11} \, r_g $), attaining values several orders of magnitude higher than that of the usual Bondi case, owing to the effect of $\Lambda$. On the contrary, the wind temperature substantially decreases in the outer regions as compared to that of the usual Bondi case due to the effect of $\Lambda$ (for clarity, in figures 4b,e,h, we do not show this region in Y-axis). Moreover, the profiles indicate that for a fixed value of energy, the galactic contribution to the potential corresponding to elliptical galaxies with higher galactic mass-to-light ratios as well as corresponding to DM profiles with steeper inner slope (e.g., JS-3/2), has greater influence on the dynamical behaviour of the flows. In Fig. 5, we show the percentage deviation of the inner X-type sonic locations for our five-component case from that of the usual Bondi case, denoted by the quantity $\chi$, as a function of energy $E$. $\chi = \frac{\vert r_{\rm in(BH)} - r_{\rm in(Gal)} \vert}{r_{\rm in(BH)}} \times 100$. Here, $r_{\rm in(Gal)}$ is the inner X-type sonic location corresponding to our five-component elliptical galaxy, whereas, $r_{\rm in(BH)}$ is the inner X-type sonic location corresponding to the usual Bondi flow onto an isolated BH. It is seen that with the increase in $E$, for all different cases considered here, the quantity $\chi$ steadily decreases. This can be understood from the fact that with the increase in $E$, the corresponding inner sonic locations, in general, always shift inwards. Owing to which, the effect of the galactic potential on the inner sonic point diminishes, while the gravitational influence of the BH on the flow increases. Note that, for a particular fixed accretion outer boundary ($r_{\rm out}$), increase in the value of $E$ implies increase in the value of outer accretion temperature or the ambient temperature ($T_{\rm out}$). The figure also indicates that NFW DM profile has a greater influence on $r_{\rm in(Gal)}$ as compared to the case with JS-3/2 DM distribution. Also it is being found that, in general, for relativistic flows, as well as for higher values of $\Upsilon_B$, the corresponding inner sonic locations for our five-component case shift more inwards. Contrary to the scenarios in Fig. 4, where the transonic flow behaviour has been studied for a fixed value of $E$, in Fig. 6, we analyze the fluid properties of the corresponding transonic solutions for a fixed outer accretion boundary conditions, i.e., for a fixed $r_{\rm out}$ and $T_{\rm out}$. Here, we choose typical values of the outer accretion boundary conditions as ($r_{\rm out} = 6 \times 10^{10} \, r_g, \, T_{\rm out} = 2 \times 10^{7} \, K$), resembling an accretion flow directly from the ICM/IGM. This value of $r_{\rm out} = 6 \times 10^{10} \, r_g$ \, (or equivalently $ \sim 600 \, {\rm kpc}$) may correspond to CD galaxies at the centre of rich galaxy clusters (e.g., Seigar et al. 2007; Uson et al. 1991). For e.g., IC 1101, a CD galaxy at the centre of Abell 2029 galaxy cluster, have an extended envelope whose radius may exceed $\sim 600$ kpc (e.g., Uson et al. 1991). The stated outer accretion boundary conditions would render the conserved energy of the flow $E \equiv E_c \equiv E_{\rm out}$ to be different for different values of $\Upsilon_B$, $\Gamma$, and different DM profiles, for which the flow always makes a single sonic transition through the inner X-type sonic point. It is being found that corresponding to NFW DM profile, the energy $E$ of the flow is always less than that corresponding to JS-3/2 DM profile, irrespective of the values of $\Upsilon_B$ and $\Gamma$. For e.g., with $\Upsilon_B = 100$ and $\Gamma = 4/3$, for NFW DM case $E \simeq 5.9 \times 10^{-6}$, for JS-3/2 DM case $E \simeq 8.3 \times 10^{-6}$; with $\Upsilon_B = 100$ and $\Gamma = 5/3$, for NFW DM case $E \simeq 3.9 \times 10^{-6}$, for JS-3/2 DM case $E \simeq 6 \times 10^{-6}$. Similarly, with $\Upsilon_B = 390$ and $\Gamma = 4/3$, for NFW DM case $E \simeq 3.62 \times 10^{-6}$, for JS-3/2 DM case $E \simeq 1.075 \times 10^{-5}$. Note that for the usual Bondi flow onto an isolated BH, for $\Gamma = 4/3$, $E \simeq 6.18 \times 10^{-6}$; for $\Gamma=5/3$, $E \simeq 3.89 \times 10^{-6}$. The profiles show that the transonic properties of the flows for the case with fixed $r_{\rm out}$ and $T_{\rm out}$ as outer accretion boundary conditions, resemble the scenarios in Fig. 4. For the wind solutions, we have extended our study beyond the accretion boundary $r_{\rm out}$, as the wind flows may well exceed the outer accretion boundary. It is being found that the $\Lambda$ has a similar effect on the wind solutions as that of the case in Fig. 4. In Fig. 7, we do a similar study as that corresponding to Fig. 6, however with a different outer accretion boundary conditions. Here we choose typical values of $r_{\rm out} = 10^{7} \, r_g$ and $T_{\rm out} = 6.5 \times 10^{6} \, K$, which would then approximately correspond to an accretion flow from the hot X-ray emitting phase of the ISM at the centre of the galaxy (for e.g., see NF11, where they have used similar boundary conditions). Unlike the previous boundary conditions (described in Fig. 6), for which the values of $E$ corresponding to different $\Upsilon_B$, $\Gamma$ and relevant DM profiles, always remain positive, here, however, the stated boundary conditions render the corresponding values of $E$ to remain positive only for a limited cases (see the caption in Fig. 7). With JS-3/2 DM profile, and $\Gamma=4/3$, the corresponding values of $E$ for $\Upsilon_B \equiv (390, 100, 33)$ are ($ 5.364 \times 10^{-7}, \, 4.878 \times 10^{-7}, \, 4.48 \times 10^{-7}$), respectively. For $\Upsilon_B = 14$, the corresponding value of $E = 4.16 \times 10^{-7}$. Note the for usual Bondi flow onto an isolated BH, for $\Gamma = 4/3, E \simeq 3.92 \times 10^{-6}$. The corresponding values of $E$ for $\Upsilon_B \equiv (390, 100, 33)$ render two sonic points (inner X-type and O-type) for the flow (also see Fig. 2), whereas for $\Upsilon_B = 14$, the corresponding $E$ generates a single inner X-type sonic location for the flow. Fig. 7 shows that with the stated boundary conditions, the corresponding accretion flows always find a physical path to enter the BH passing through the corresponding inner X-type sonic points. However, in the context of wind solutions, for those cases where one have two sonic points, the matter does not find any physical path to continue its outward journey. Instead, after passing through the inner X-type point the matter eventually follows the accretion branch and enters the BH (see Fig. 7c). This behaviour of spherical accretion has a very interesting consequence. While for usual Bondi flow onto an isolated BH, there would be a wide range in the values of $r_{\rm out}$ and $T_{\rm out}$, for which physical flow for both accretion and wind is possible, however, this may not be case for spherical accretion in the context of our five-component elliptical galaxy. The galactic contribution to the potential limits the range of $r_{\rm out}$ and $T_{\rm out}$, or more precisely, limits the choice of outer accretion boundary conditions for which physical flows for accretion and wind can occur. We discuss in more details on this aspect in \S 6. To comprehend the actual extent to which the galactic contribution to the potential in the presence of $\Lambda$ can influence the spherical accretion flow onto the central SMBH in the elliptical galaxy, we estimate the percentage deviation of various relevant physical quantities associated with spherical accretion for our five-component elliptical galaxy from that of the case for usual Bondi flow onto an isolated BH, denoted by $\xi = \frac{\mathscr{Q}_{\rm Gal} - \mathscr{Q}_{\rm BH}}{\mathscr{Q}_{\rm BH}} \times 100$. Here, $\mathscr{Q}_{\rm Gal}$ represents any arbitrary physical quantity corresponding to our five-component elliptical galaxy, whereas, $\mathscr{Q}_{\rm BH}$ represents the same physical quantity corresponding to the usual Bondi flow onto an isolated BH. In the context of spherical Bondi-type flow for our five-component elliptical galaxy, the most relevant physical quantities with which $\xi$ can be associated are wind velocity, wind temperature, and the corresponding accretion temperature. In Fig. 8, we show the variation of the quantity $\xi$ with the radial distance $r$ corresponding to different values of $\Upsilon_B$, $\Gamma$ and relevant DM profiles, for our five-component elliptical galaxy. We choose similar outer accretion boundary conditions as that used in figures 6 and 7, corresponding to the accretion flow from the ICM/IGM and ISM, respectively. The figure shows that the galactic contribution to the potential has a significant effect on the flow profiles. We found that apart from the substantial increase in the wind velocities in the outer regions due to the influence of $\Lambda$, the galactic potential, too, enhances the wind flow velocity in the central to inner regions of the flow. For relativistic flows, wind velocities may even get enhanced by several hundred percent in the inner regions of the flow (Fig. 8a). Also, for relativistic flows, wind temperatures may increase by $\sim 50 \, \%$ in the outer regions of the flow (Figures 8b,e). The profiles shows that in general, for relativistic flows as well as for higher values of $\Upsilon_B$, galactic contribution to the potential has greater effect on flow profiles. It is also being found that the cosmic repulsion which dominates the outer regions of the flows has an opposite effect on the velocity and the respective temperature profiles. \subsubsection{Global flow topology and shocks} In the previous scenarios (described in figures 4, 6, and 7), the flow profiles have been obtained for those cases, for which we have only a single X-type sonic location (i.e, the inner X-type sonic point) for the flow. In Fig. 9, we show the flow topologies for a few sample cases, for which one can have multi-transonicity with both inner and outer saddle-types (or X-types) in the corresponding spherical flows. A very interesting scenario appears here: for certain cases, especially corresponding to moderate to higher values of $\Upsilon_B$ \, ($\Upsilon_B \, \geq \, 100$), one obtain possible Rankine-Hugoniot shocks in the corresponding wind flows, indicated by vertical dotted lines in figures 9a,b,e. However, in the context of accretion solutions, possible generation of shocks are unlikely. Nonetheless, this occurrence of shocks in the context of spherically symmetric steady adiabatic flows, is quite noteworthy, as from the point of view of a conventional scenario, it is quite unlikely to have shocks in the flows associated with adiabatic spherical accretion. In an earlier work, however, Chang \& Ostriker (1985), while investigating the spherical accretion flow with the inclusion of local heating and cooling effects with the flow deviating from being strictly adiabatic, found solutions with spherical shocks in the flow. Nonetheless, the nature of flow topology in Fig. 9 is quite similar to that of the case for advective flows onto isolated BHs, resembling their `$x\alpha$'-type trajectories (see for e.g., Abramowicz \& Chakrabarti 1990). The properties of their shock solutions show similar behaviour with that obtained corresponding to our spherical flow. In the advective accretion flows, the reason for the appearance of shocks in the flow close to the BH is owing to the presence of angular momentum in the system, which provides the necessary centrifugal barrier. Here, in the context of our spherical accretion, the necessary centrifugal barrier in the flow is actually provided by the galactic gravitational potential in the presence of $\Lambda$. While in case for advective flows onto isolated BHs, possible shocks appear in the region close to the BH, here, however, they possibly occur in the central to outer regions of the flows where the galactic contribution to the gravitational potential becomes dominant. Here, we do not obtain shocks in the flow for values of $\Gamma > 1.5$. This aspect of not obtaining shocks for $\Gamma > 1.5$ resembles the scenario in advective flows onto isolated BHs (e.g., Chakrabarti 1996). The non-appearance of possible shocks in advective flows for $\Gamma > 1.5$ is owing to the absence of outer X-type sonic points in the flow. In the context of our spherical flow (for our five-component case), although the outer X-type points do exist for $\Gamma > 1.5$, the possibility of intersection between outer and inner X-type points decreases (see \S 4), owing to which the possibility of shock formation gets diminished for $\Gamma > 1.5$, with the complete disappearance of possible shocks in the flow as $\Gamma \to 5/3$. In Fig.10, we show the temperature profiles corresponding to wind flows having shocks. The profiles show that across the shock the temperature of wind flow rises by orders of magnitude. This aspect of shock formation in the the central to outer regions of the wind flow may have interesting implications, possibly in the context of outflows/jets. We comment on this aspect in a greater detail in \S 7 of this paper. Nonetheless, a fact needs to be noted here: in the present analysis, we obtain shocks in the wind flows corresponding to the case with only JS-3/2 DM distribution profile. It would be then quite interesting to check, whether, such possibilities would also occur for other DM models available in the literature. More detailed study of global flow topology and shocks with the inclusion of other DM profiles in context of our spherical accretion will be pursued elsewhere in the near future. \subsection{Isothermal case} The equation of state of an isothermal gaseous flow is described through the relation $P = K \rho$. For an isothermal flow, the temperature or equivalently the sound speed of the accretion flow remains constant throughout the accretion regime. This then indicates that the sound speed of the accretion flow at any radii is always equivalent to the sound speed at sonic point $r_c$ (i.e., $c_{s (\rm out)} \equiv c_s \equiv c_{\rm sc}$). Hence if the temperature of the flow is known, one can compute $r_c$ using the relation \, $T \propto { r_c \, \mathscr{F}_{\rm Gal} (r_c)}/{2} $, and $r_c$ in that case will be independent of the information of the outer accretion boundary radius $r_{\rm out}$, unlike that in the case for adiabatic flows. In Fig. 11a, we show the variation of temperature $T$ of the accretion flow as a function of sonic location $r_c$, corresponding to our five-component elliptical galaxy. Here too, resembling the scenario in adiabatic flows, for certain range in the value of $T$, multi-transonicity appears in the isothermal flows. To exemplify, we have marked a representative line of constant temperature $T \simeq 2 \times 10^{6}$ which corresponds to three sonic-point scenarios. Nonetheless, unlike the scenario in adiabatic flows, where we generally obtain three sonic points, here, one may even obtain five sonic points in the flow, corresponding to higher values $\Upsilon_B$, as depicted in Fig. 11a for $\Upsilon_B = 390$. Figure 11a exhibits a notable feature: for each of the different cases corresponding to our five-component elliptical galaxy, there is a corresponding minimum value of temperature (say $T_{\rm min}$), below which, no inner X-type sonic point appears in the corresponding $T-r_c$ profiles (for details see the caption of Fig. 11a). This then indicates that for $T < T_{\rm min}$, either no physical flows would be possible, or any physical plausible flows would only pass through the outer X-type sonic points. This is in contrary to the adiabatic case, in which, the physical plausible flows towards the central object would always make a sonic transition through the inner X-type sonic point, irrespective of the nature of transonicity in the flow. In Fig. 11b, we show the Mach number profiles for both accretion and wind solutions for different values of $\Upsilon_B$ and relevant DM models, corresponding to our five-component elliptical galaxy. For our analysis, we choose the temperature of the flow $T \sim 6.5 \times 10^6 \, K$, which is a reasonable choice corresponding to inflows from ISM, as well as corresponding to inflows from ICM/IGM. The temperature of the flow is such for which one obtains a single (inner X-type) sonic point irrespective of the values of $\Upsilon_B$, through which the physical flow makes a sonic transition. Figure 11a reveals that contrary to the scenario for adiabatic flows, for isothermal flows, the galactic contribution to the potential renders the inner X-type sonic location to shift outwards compared to that of the usual Bondi flow case onto an isolated BH. In Fig. 12, we show the variation of the percentage deviation of the inner X-type sonic locations for our five-component elliptical galaxy from that of the usual Bondi flow case corresponding to different values of $T$ (denoted by the quantity $\chi$), as a function of flow temperature $T$, for isothermal flows. The figure shows that with the increase in the value of $T$, for all different cases considered here, the quantity $\chi$ steadily decreases, resembling a scenario for adiabatic flows. The truncation of the curves at different values of $T$ corresponding to different values of $\Upsilon_B$ and DM models, actually corresponds to those values of $T_{\rm min}$, below which no inner X-type sonic points appear in the flow. More detailed study of global flow topology and shocks corresponding to the isothermal case in the context of our five-component elliptical galaxy will be pursued elsewhere in the imminent future. \section{Bondi accretion rate} Here we investigate how the galactic contribution to the potential in the presence of $\Lambda$ influence the Bondi accretion rate. As discussed in \S 1 in the introduction, the central SMBHs in low-luminous, low-excitation radio-loud AGNs (or the jet-mode AGNs), have been widely argued to be fuelled by the hot gas from their associated hot X-ray emitting gaseous medium, through a spherical or a quasi-spherical accretion, at near-Bondi accretion rates (see the references in paragraph 3 in \S 1), with the accreting gas traversing through the host elliptical galaxy gravitational field. In these jet-mode AGNs, the total jet powers seem to correlate well with the Bondi accretion rates (e.g., Allen et al. 2006; N07). It would then be quite interesting to estimate the Bondi accretion rates corresponding to different values of $\Gamma$ for our five-component elliptical galaxy, and to compare them with that for the usual Bondi flow onto an isolated BH. In the steady state, Bondi accretion rate ($\dot M_B$) can be defined in terms of the transonic quantities of the accretion flow, given by \begin{eqnarray} \vert \dot M_{B} \vert = 4 \pi r^2_c \, c_{\rm sc} \, \rho_c \, , \label{29} \end{eqnarray} where $\rho_c$ is the density at the sonic location. Using the relation $\rho_c = \rho_{\rm out} \, \left(\frac{c_{\rm sc}}{c_{\rm out}}\right)^{2/(\Gamma -1)}$, where $\rho_{\rm out}$ represents the density of the ambient medium, i.e., the density at the outer accretion boundary $r_{\rm out}$, one can easily compute the quantity ${\dot M_{B}}/{\dot M_{B} (\rm BH)}$, where $\dot M_{B} (\rm BH)$ denotes the usual Bondi accretion rate corresponding to the accretion flow onto an isolated BH. $\dot M_{B}$ then denotes the Bondi accretion rate corresponding to our five-component elliptical galaxy. In Fig. 13, we show the variation of the quantity ${\dot M_{B}}/{\dot M_{B} (\rm BH)}$ with the temperature of the ambient medium or the outer accretion boundary temperature $T_{\rm out}$. The profiles show that owing to the galactic contribution to the potential in the presence of $\Lambda$, there is an enhancement in the value of Bondi accretion rate, as compared to the corresponding case for an isolated BH. This is contrary to the scenario, when only an isolated BH is considered in the presence of $\Lambda$ (i.e., by ignoring the galactic mass contributions), in which case, the Bondi accretion rate gets suppressed (e.g., GB15; Mach et al. 2013). It is being found that for relativistic flows from ICM/IGM, the galactic contribution to the potential with $\Upsilon_B \, \raisebox{-.4ex}{$\stackrel{>}{\scriptstyle \sim}$} \, 100$ in the presence of $\Lambda$, may enhance the Bondi accretion rate by $\sim 10$ times corresponding to the ambient temperature $T_{\rm out} \sim 10^{6.5} \, K$, or by $\sim 50$ times corresponding to $T_{\rm out} \sim 10^{6} \, K$. A very interesting feature being found from the profiles that, corresponding to appropriate choice in the values of $r_{\rm out}$ (i.e., the location of the ambient medium), the galactic contribution to the potential limits the range in the values of $T_{\rm out}$ (or the ambient temperature), for which physical flows for accretion and wind can occur. This is being reflected from the figure where the curves get truncated. At those values of $T_{\rm out}$ where the corresponding curves get truncated, the corresponding values of $E_{\rm out}$ become negative. This precisely indicates that, corresponding to our five-component elliptical galaxy, there is a strict limit in the choice of outer accretion boundary conditions, for which, one can have Bondi-type spherical accretion onto the central BH. It is also being interestingly found that this temperature constraint is more stringent for the case when the ambient medium is located closer to the central SMBH (for instance, if the accretion flow begins from the ISM, rather than from the ICM/IGM), with the physical flow being possible only at relatively higher values of ambient temperature. The profiles also show that, in general, corresponding to NFW DM case (i.e., with less steeper inner slope) as well as with an increase in the value of $\Gamma$ (as $\Gamma \to 5/3$), the limiting values of the ambient temperature below which no Bondi-type accretion can occur, steadily increases. This aspect of the minimum ambient temperature required to trigger Bondi-type spherical accretion in the five-component elliptical galaxy can be actually attributed to the multi-transonic nature of the flow. Unlike the scenario here, for classical Bondi case onto an isolated BH, there would be wide range of ambient temperature for which the corresponding values of $E_{\rm out}$ remain positive, and consequently such minimum temperature criteria does not strictly arise in the classical Bondi case. Let us focus on figures 13d,e,f corresponding to the spherical flows from the hot X-ray emitting phase of the ISM. Figure 13d reveals that for relativistic adiabatic flows with $\Gamma = 4/3$, corresponding to galactic mass-to-light ratio $\Upsilon_B =100$ (which is considered to be a standard value in the literature in the context of elliptical galaxy), and with JS-3/2 DM model, the value of the ambient temperature ($T_{\rm out}$) below which Bondi-type spherical accretion would not be possible is $T_{\rm out} \sim 6 \times 10^6 \, K$. From our analysis it is also being found that the corresponding profiles with universal mass-to-light ratio ($\Upsilon_B = 390$) almost coincide with that for the case with $\Upsilon_B = 100$. Again, for lower values of $\Upsilon_B$, it is found from the figures that the corresponding values of $T_{\rm out}$ below which physical flows are not possible, generally, increases. A similar observation can be made for the case with NFW DM model, however, the corresponding limiting values of $T_{\rm out}$ further increases; with $\Upsilon_B = 100$ and for $\Gamma = 4/3$, this limiting value of $T_{\rm out} \sim 10^7 \, K$. On a similar note, for nonrelativistic adiabatic flows with $\Gamma = 5/3$, corresponding to $\Upsilon_B \, \raisebox{-.4ex}{$\stackrel{>}{\scriptstyle \sim}$} \, 100$, and with JS-3/2 DM model, the corresponding limiting value of $T_{\rm out} \sim 9 \times 10^6 \, K$, whereas, with NFW DM model, this limiting value of $T_{\rm out} \sim 1.45 \times 10^7 \, K$. It needs to be noted that JS-3/2 and NFW DM profiles describe two limiting cases of a more general $(1,3,\gamma)$ DM density distribution model, described by Eqn. (9), with inner slopes of $-3/2$ and $-1$ respectively. This then indicates that, depending upon the outer boundary radius $r_{\rm out}$ of the ISM, and the value of $\Gamma$, there should be a lower-bound in the value of ambient ISM temperature, for which a Bondi-type spherical accretion onto the central SMBH can occur in an elliptical galaxy. For our case with the typical choice of $r_{\rm out} \sim 10^7 \, r_g$, we can provide a very conservative (theoretical) estimate of lower-bound limit of temperature; for relativistic adiabatic flows this limiting value of $T_{\rm out} \sim 6 \times 10^6 \, K$, and for nonrelativistic adiabatic flows the corresponding limiting value of $T_{\rm out} \sim 9 \times 10^6 \, K$, despite the fact that the hot phase of ISM at the center of galaxy may have a temperature in the range of $\sim (10^{5.5} - 10^7) \, K$. Nonetheless, several other relevant DM models do exist in the literature, and it would be quite interesting to check, whether they would provide a different (theoretical) lower-bound limit of the temperature. This is unlike the scenario when Bondi-type spherical accretion is assumed to occur only onto an isolated BH. Such enhanced lower-bound limits of the temperature for which a Bondi-type spherical accretion can occur, may have interesting physical implications. We comment on this in the next section. \section{Discussion} LERGs, predominantly hosted by massive ellipticals, and which mostly dominate the local radio-loud population as well as centre of cool-core clusters, are being widely argued to be powered by direct hot mode accretion, with their central SMBHs fuelled directly by hot gas from their surrounding hot X-ray emitting phase through a spherical or a quasi-spherical accretion, at Bondi or at near-Bondi accretion rates. The radio-mode feedback that typically operates in these LERGs leads to mechanical heating of the surrounding gaseous medium (ISM/IGM/ICM) and prevents its radiative cooling, thereby keeping the ambient gas hot; this hot phase directly controls the fuelling of host active nucleus. The situation corresponds to a giant Bondi-type spherical/quasi-spherical accretion onto the central SMBH with the accretion flow region extending well beyond the Bondi radius exceeding several hundred pc to kpc length-scale; in the context of giant ellipticals residing at the centre of clusters, the flow region may even exceed hundreds of kpc length-scale. Thus, in the context of massive ellipticals, in addition to the gravitational field of the central SMBH, the flow is expected to be influenced by the gravitational field due to galactic mass components (stellar, DM, hot gas), along from the effect of repulsive cosmological constant $\Lambda$. In the context of (Bondi-type) hot mode accretion, most of the previous studies have been undertaken considering the flow onto an isolated BH (i.e., assuming a single point source of gravitation), restricting to classical Bondi solution (see \S 1 for references). In the present work, we performed a detailed study of the Bondi-type spherical accretion onto the central SMBH by incorporating the entire galactic contribution to the potential in the presence of $\Lambda$, considering a five-component elliptical galaxy (BH + stellar + DM + hot gas + $\Lambda$). The primary goal of this paper was to investigate, to what extent the galactic contribution to the potential impact the dynamics of spherical accretion, relative to the classical Bondi solution. Owing to the galactic contribution to the potential, the inviscid, adiabatic spherical flow displays a remarkable behavior, with the appearance of {\textit{multi-transonicity}} or {\it{multi-criticality}} in the flow, thus violating the `criticality-condition' of the classical Bondi solution. The galactic potential significantly changes the flow properties as well as the flow topology and flow structure, relative to the classical Bondi solution, with the flow topology resembling the `$x\alpha$'-type trajectories of advective accretion flows onto isolated BHs. Below we enlist some of the major findings of our study: \begin{enumerate} \item Our study reveals that there is a strict lower limit of ambient temperature below which Bondi-type accretion can not be triggered. This temperature constraint is more stringent for the case when the ambient medium is located closer to the central SMBH. For instance, if the accretion flow begins from the hot phase of ISM at the centre of the galaxy, this temperature limit can be as high as $\sim 9 \times 10^6 \, K$ below which no physical plausible Bondi-type flow can occur, despite the fact that the hot phase of ISM may have a temperature in the range of $\sim (10^{5.5} - 10^7) \, K$. This implies that Bondi-type accretion may not occur from any arbitrary location (or radius) of ambient medium. It can occur from those radii, at which the ambient temperature should be equal to or higher than the corresponding `minimum temperature limit', indicating that the Bondi accretion strictly depends on ambient boundary conditions. This is unlike the scenario when Bondi-type accretion is assumed to occur only onto an isolated BH (i.e., for classical Bondi solution), in which case, such minimum temperature criteria does not strictly arise. It needs to be again remember that it is the radio-mode AGN feedback that operates in these galaxies, actually maintains the surrounding hot phase. In our context, it would then imply that the associated radio-mode feedback should maintain the required `minimum ambient temperature limit', to enable the Bondi-type accretion to occur from the corresponding ambient location. For instance, if the Bondi-type accretion needs to occur from the hot ISM-phase at the centre of the galaxy, the radio-AGN feedback should be sufficiently strong to maintain a minimum temperature of $\sim 9 \times 10^6 \, K$. This indicates a tight coupling between the associated radio-AGN feedback and the hot mode accretion, with the surrounding hot phase tightly regulating the fuelling of host active nucleus. Nonetheless, based on the current observations, it is hard to ascertain the precise locations of ambient medium from where Bondi-type flow can occur and the corresponding ambient temperatures. Unless one has a better knowledge of them, one would not be able to properly quantify the Bondi accretion rate that is required for any quantitative modelling of maintenance mode feedback. \item Owing to the galactic contribution to the potential there is an enhancement in the value of Bondi accretion rate, relative to the classical Bondi case. This is contrary to the scenario when only an isolated BH is considered in the presence of $\Lambda$ (i.e., by ignoring the galactic mass contributions), in which case, the Bondi accretion rate gets suppressed (e.g, GB15). \item The galactic contribution to the potential has a significant effect on the velocity profile of spherical wind flows. We found that apart from the substantial increase in the wind velocities in the outer regions due to the influence of $\Lambda$, the galactic potential, too, enhances the wind flow velocity in the central to inner regions of the flow (Figures 8a,b). For relativistic flows, wind velocities may even get enhanced by several hundred percent in the inner regions of the flow (Fig. 8a). \item More notably, corresponding to moderate to higher values of $\Upsilon_B$, we obtain possible Rankine-Hugoniot shocks in the central to outer regions of the spherical wind flows, that is explicitly due to the effect of galactic potential, with the temperature of the wind flow across the shock region rises by orders of magnitude. In a simplistic scenario, spherical wind flow can be visualized as spherical outflow of matter, which then corresponds to spherical expansion of gas into a vacuum. Most of the studies regarding the dynamical evolution of radio sources and their feedback energetics, is based solely on the interaction of the radio sources with the ambient gaseous medium through which they expand, without considering the explicit effect of galactic potential on their flow dynamics. As our analysis show that galactic potential significantly impact the spherical wind flow dynamics, it would be then interesting to explore, to what extent the galactic contribution to the potential in the presence of $\Lambda$ actually affects the dynamics of collimated outflows and jets, and consequently, the energetics of radio-AGN feedback. It has already been previously suggested (Stuchl\'ik et al. 2000) that $\Lambda$ can have a strong collimation effect on jets. Recently Vyas \& Chattopadhyay (2017), while investigating transonic jet flow, found internal shocks in the inner regions of jet, that are explicitly due to the effect of the geometry of the jet. The other possible shock scenario emerges, when these jets interact with the external ambient gaseous medium. A relevant question can then be put forward: can galactic potential, too, induce shocks in the jets, in similarity to that being found in spherical wind flows? If such galactic induced shocks occur in the central to outer regions of jets, it could possibly lead to abrupt deceleration of jet, thus reducing the jet terminal speed; the shocked region would be associated with strong flares, and this flaring region could be a strong site for particle acceleration. Galactic induced shocks could thus play a prominent role in controlling the dynamical evolution of radio sources, and may also be potentially linked to the observed morphological dichotomy (i.e., the Fanaroff-Riley dichotomy) in radio sources. However, this needs thorough investigation. \end{enumerate} In general, our analysis shows that, for flows tending to be more relativistic, as well as for elliptical galaxies with higher galactic mass-to-light ratios, and corresponding to DM profiles with steeper inner slope, the galactic contribution to the potential has greater influence on the overall dynamical behaviour of the adiabatic spherical flows. For completeness, in the present study, we also briefly analysed the behaviour of isothermal spherical flows in the context of our five-component elliptical galaxy, where one again obtains multi-transonicity in the flow. However, unlike the scenario in adiabatic flows, where one generally obtains three sonic points, in the case for isothermal flows, one may even obtain five sonic points in the flow corresponding to higher values of $\Upsilon_B$. Nonetheless, more detailed study of global flow topology and shocks corresponding to isothermal case would be pursued elsewhere in the near future. Here, it needs to be pointed out that, although in the present study our choice of DM model may seem to be reasonable good that provides a good fit to simulated DM halos, however, many other DM models exist in literature which also perform relatively well in describing simulated DM halos. It would be then worthy to check whether the main findings of our work remain consistent with other relevant DM models. This could lead to explore the feasibility to constrain DM density profiles in giant elliptical galaxies. Such an analysis is, however, beyond the scope of the present work, and would be pursued in the near future. Few authors have conducted numerical simulations of magnetized spherical accretion flows. Igumenshchev \& Narayan (2002), in their three-dimensional magnetohydrodynamic simulation found that in the presence of large-scale magnetic field, the flow becomes convection-dominated that drastically changes the flow structure relative to the classical Bondi solution, and the mass accretion rate onto the BH gets significantly reduced (also see Pen et al. 2003 in this regard). On the other hand, Igumenshchev (2006), while carrying out three-dimensional simulations of spherical accretion flows with small-scale magnetic fields, concluded that stationary supersonic accretion flows cannot form in the presence of small-scale magnetic fields. Nonetheless, it would be then worthy to undertake numerical as well as analytical studies of magnetized spherical accretion in the context of our five-component galactic system, to check how the galactic potential would impact the dynamics of the magnetized spherical flow. Another interesting scenario would be to incorporate the information of the radiative cooling in the spherical accretion. Although such studies of spherical accretion with the inclusion of radiative processes have been performed on previous occasions (see \S 1), in recent times, Ghosh et al. (2011) found that owing to the inclusion of the effect of Comptonization, spherically symmetric Bondi flow loses its symmetry and becomes axisymmetric. It would be then quite interesting to study Bondi-type spherical accretion with the inclusion of radiative cooling in the context of our five-component elliptical galaxy, which is left for future work. In essence, the present study indicates that galactic potential may plausibly play an important role in controlling the dynamics of the hot mode accretion as well as outflows/jets in massive ellipticals. Thus, in any realistic (numerical and analytical) modelling of accretion and/or outflow/jet dynamics, one should not ignore the possible contribution of the galactic potential. This would then be expected to shed more light on the energetics of AGN feedback in the context of these massive galaxies in the contemporary Universe. \section*{Acknowledgments} The authors are thankful to the anonymous reviewer for providing insightful comments and suggestions to vastly improve the quality of the manuscript. The authors also thank Drs. Sankhasubhra Nag and Banibrata Mukhopadhyay for helpful discussions.
\section{Introduction} \label{sec:intro} Video classification is a fundamental problem in many video-based tasks. Applications such as autonomous driving technology, controlling drones and robots are driving the demand for new video processing methods. An effective way to extend the usage of Convolutional Neural Networks (CNNs) from the image to the video domain is by expanding the convolution kernels from 2D to 3D~\cite{carreira2017quo,hara2018can,taylor2010convolutional,tran2015learning}. Since the progress made by I3D~\cite{carreira2017quo}, the main research effort in the video area has been directed towards designing new 3D architectures. However, 3D CNNs are more computationally intensive than 2D CNNs. Some recent works \cite{feichtenhofer2020x3d,lin2019tsm,qiu2017learning,tran2019video,tran2018closer,xie2018rethinking} increase the efficiency of 3D CNNs by reducing the redundancy in the model parameters. However, these works have ignored another important factor that causes the heavy computation in video processing: natural video data contains substantial redundancy in the spatio-temporal dimensions. \begin{figure}[!t] \centering \resizebox{.4\textwidth}{!}{\includegraphics{mbpm.pdf}} \caption{Motion Band-Pass Module (MBPM) distills busy information from the frame sequences. For every three consecutive RGB frames, the MBPM generates a one-frame output, which substantially reduces the redundancy.} \label{fig:mbpm} \vspace{-0.35cm} \end{figure} In video data, busy information describes fast-changing motion happening in the boundaries of moving regions which is crucial for defining movement in video. Meanwhile, the quiet information, such as smooth background textures whose information is shared by neighboring locations, contains substantial redundancy. For efficient processing, we disentangle a video into busy and quiet components. Subsequently, we would separately process the busy and quiet components, by allocating high-complexity processing for the busy information and low-complexity processing for the quiet information. In this study we propose a lightweight, end-to-end trainable motion feature extraction mechanism called Motion Band-Pass Module (MBPM), which can distill the motion information conveyed within a specific frequency bandwidth in the frequency domain. As illustrated in Figure~\ref{fig:mbpm}, by applying the MBPM to a video of 3 segments the number of representative frames is reduced from 9 to 3 whilst retaining the essential motion information. Our experiments demonstrate that by simply replacing the RGB frame input with the motion representation extracted by our MBPM, the performance of existing video models can be boosted. Secondly, we design a two-pathway multi-scale architecture, called the Busy-Quiet Net (BQN), the processing pipeline of which is shown in Figure~\ref{fig:framework}. One pathway, called Busy, is responsible for processing the busy information distilled by the MBPM. The other pathway, called Quiet, is devised to process the quiet information encoded with global smooth spatio-temporal structures. In order to fuse the information from different pathways, we design the Band-Pass Lateral Connection (BPLC) module, which is set up between the Busy and Quiet pathways. During the experiments, we demonstrate that the BPLC is the key factor to the overall model optimization success. Compared with the frame summarization approaches~\cite{bilen2017action,wang2018video}, MBPM retains the strict temporal order of the frame sequences, which is considered essential for long-term temporal relation modeling. Compared with optical flow-based motion representation methods~\cite{fan2018end,ilg2017flownet,wang2016temporal,zach2007duality,zhang2019pan}, the motion representation captured by MBPM has a smaller temporal size (\eg for every 3 RGB frames, the MBPM encodes only one frame), and can be employed on the fly. Meanwhile, efficient video models such as Octave Convolution~\cite{chen2019drop}, bL-Net~\cite{chen2018big} and SlowFast networks~\cite{feichtenhofer2019slowfast} only reduce the input redundancy along either the spatial or temporal dimensions. Instead, the proposed BQN reduces the redundancy in the joint spatio-temporal space. Our contributions can be summarized as follows: \begin{itemize} \vspace*{-0.23cm} \item A novel Motion Band-Pass Module (MBPM) is proposed for busy motion information distillation. The new motion cue extracted by the MBPM is shown to reduce temporal redundancy significantly. \item \vspace*{-0.23cm} We design a two-pathway Busy-Quiet Net (BQN) that separately processes the busy and quiet information in videos. By separating the busy information using MBPM, we can safely downsample the quiet information to further reduce redundancy. \item \vspace*{-0.23cm} Extensive experiments demonstrate the superiority of the proposed BQN over a wide range of models on four standard video benchmarks: Kinetics400~\cite{carreira2017quo}, Something-Something V1~\cite{goyal2017something}, UCF101~\cite{soomro2012ucf101}, HMDB51~\cite{kuehne2011hmdb}. \end{itemize} \section{Related Work} \label{Related Work} \noindent \textbf{Spatio-temporal Networks.} Early works~\cite{donahue2015long,feichtenhofer2016convolutional,simonyan2014two,wang2016temporal,yue2015beyond} attempt to extend the success of 2D CNNs~\cite{he2016deep,huang2017densely,krizhevsky2012imagenet,simonyan2014very,szegedy2015going,tan2019efficientnet} in the image domain to the video domain. Representatively, the two-stream model~\cite{simonyan2014two} and its variants~\cite{feichtenhofer2016convolutional,wang2016temporal} utilize optical flow as an auxiliary input modality for effective temporal modeling. Other works~\cite{carreira2017quo,hara2018can,taylor2010convolutional,tran2015learning}, given the progress in GPU performance, tend to exploit the computationally intensive 3D convolution. Meanwhile, some studies focus on improving the efficiency of 3D CNN, such as P3D~\cite{qiu2017learning}, R(2+1)D~\cite{tran2018closer}, S3D~\cite{xie2018rethinking}, TSM~\cite{lin2019tsm}, CSN~\cite{tran2019video}, X3D~\cite{feichtenhofer2020x3d}. Non-local Net~\cite{wang2018non} and its variants~\cite{cao2019gcnet,huang2021icpr} introduce self-attention mechanisms to CNNs in order to learn long-range dependencies in the spatio-temporal dimension. Our study is complementary to these methods: our Busy-Quiet Net (BQN) can benefit from the efficiency of these CNNs by simply adopting them as backbones. \noindent \textbf{Motion Representation.} Optical flow as a short-term motion representation has been widely used in many video applications. However, the optical flow estimation in large-scale video datasets is inefficient. Some recent works use deep learning to improve the optical flow estimation quality, such as FlowNet ~\cite{dosovitskiy2015flownet,ilg2017flownet}. Some other methods aim to explore new end-to-end trainable motion cues, such as OFF~\cite{sun2018optical}, TVNet~\cite{fan2018end}, EMV~\cite{zhang2018real}, Flow-of-Flow~\cite{piergiovanni2019representation}, Dynamic Image~\cite{bilen2017action}, Squeezed Image~\cite{huang2020learning} and PA~\cite{zhang2019pan}. Compared with these approaches, our MBPM is rather as a basic video architecture component which results in higher accuracy while requiring less computation. \noindent \textbf{Enforcing Low Information Redundancy.} In the image field, bL-Net~\cite{chen2018big} adopts a downsampling strategy that operates at the block level aiming to reduce the spatial redundancy of its feature maps. Octave Convolution~\cite{chen2019drop} replaces the convolutions in existing CNNs to decompose the low and high-frequency components in images, representing the former with lower resolution. In the video field, bLV-Net~\cite{fan2019more} extends the idea of bL-Net~\cite{chen2018big} to the temporal dimension. SlowFast networks~\cite{feichtenhofer2019slowfast} introduce two pathways for slow and fast motion decomposition along the temporal dimension. However, the generalization of SlowFast to existing CNN architectures is poor, as it requires two specially customized CNNs to be its backbones. Unlike the previous methods, BQN reduces the feature redundancy in the joint spatio-temporal space by using a predefined trainable filter module, MBPM, to disentangle a video into busy and quiet components. Unlike SlowFast, BQN architecture shows excellent generalization to existing CNNs. \begin{figure*}[!t] \centering \includegraphics[width=17cm,height=6.2cm]{arch.pdf} \caption{BQN is made up of two parallel pathways: Busy and Quiet. `lc' indicates Band-Pass Lateral Connection. The backbone networks from the two pathways respectively take as inputs two complementary data components (\ie busy and quiet), which are disentangled by the MBPM. The outputs of the two pathways are fused at various processing stages and the final prediction is obtained by averaging the prediction scores across multiple segments.} \label{fig:framework} \end{figure*} \section{Motion Band-Pass Module (MBPM)} \label{sec:mbpm} Firstly, we introduce a 3D band-pass filter, which can distill the video motion information conveyed within a specific spatio-temporal frequency bandwidth. A video clip of $T$ frames can be defined as a function with three arguments, $\boldsymbol{I}^{(t)}(x, y)$, where $x$, $y$ indicate the spatial dimensions, while $t$ is the temporal dimension. The value of $\boldsymbol{I}^{(t)}(x, y)$ corresponds to the pixel value at position $(x,y)$ in $t$-th frame of an arbitrary channel in the video. When considering the multi-channel case, we repeat the same procedure for each color channel, which is omitted here for the sake of simplification. The output $\boldsymbol{\Gamma}$ of the 3D band-pass filter is given by: \begin{equation} \begin{aligned} \boldsymbol{\Gamma}(x,y,t) &= \frac{\partial^2}{\partial t^2} \left[ \boldsymbol{I}^{(t)}(x,y) * LoG_\sigma(x,y) \right], \\ &\approx \sum\limits_{t-1\leq i\leq t+1} h{\scriptstyle(i)} \cdot [\boldsymbol{I}^{(i)}(x,y) * LoG_\sigma(x,y)],\\ & \qquad \qquad \qquad \qquad \qquad h{\scriptstyle(i)} = \begin{cases} \frac{2}{3} & \text{if} \quad i = t, \\ -\frac{1}{3} & \text{otherwise}, \end{cases} \end{aligned} \label{eq: mbpm} \end{equation} for $t= 1,\ldots,T$ and `$*$' represents the convolution operation. In equation~\eqref{eq: mbpm}, the second derivative with respect to $t$ is numerically approximated by finite differences, literally implemented by function $h{\scriptstyle(i)}$. Meanwhile, $LoG_\sigma(x,y)$ is a two-dimensional Laplacian of Gaussian with the scale parameter $\sigma$: \begin{equation} \begin{aligned} LoG_\sigma(x,y) &= \triangledown^2G_\sigma(x,y) = -\frac{e^{-\frac{x^2+y^2}{2\sigma^2}}}{\pi \sigma^4} \left[ 1- \frac{x^2+y^2}{2\sigma^2} \right]. \end{aligned} \label{eq:log} \end{equation} From equations \eqref{eq: mbpm} and \eqref{eq:log} we can observe that the 3D filtering function is fully-differentiable. In order to make the 3D band-pass filtering compatible with CNNs, we approximate it with two sequential channel-wise\footnote{Also referred to as “depth-wise". We use the term “channel-wise" to avoid confusions with the network depth.} convolutional layers~\cite{sandler2018mobilenetv2}, as shown in Figure~\ref{fig:mbpm}. We name the discrete approximation Motion Band-Pass Module (MBPM) which can be expressed in an engineering form as follows: \begin{equation} \begin{aligned} \boldsymbol{\Gamma} \approx \textup{MBPM}(\boldsymbol{I}) = H_{s\times 1 \times 1}^{3\times 1 \times 1}(LoG_\sigma^{1\times k \times k}(\boldsymbol{I})), \end{aligned} \label{eq:mbpm_engi} \end{equation} where $LoG_\sigma^{1\times k \times k}$ is referred to as a spatial channel-wise convolutional layer~\cite{sandler2018mobilenetv2} with a $k \times k$ kernel, each channel of which is initialized with a Laplacian of Gaussian distribution with scale $\sigma$. The sum of kernel values is normalized to 1. Meanwhile, $H_{s\times 1 \times 1}^{3\times 1 \times 1}$ is referred to as a temporal channel-wise convolutional layer with a temporal stride $s$. In each channel, the kernel value of $H_{s\times 1 \times 1}^{3\times 1 \times 1}$ is initialized with $[-\frac{1}{3}, \frac{2}{3}, -\frac{1}{3}]$ , which is a high-pass filter. In order to let the MBPM kernel parameters fine-tune on video streams, we embed the MBPM within a CNN for end-to-end training, optimized with the video classification loss. \section{Busy-Quiet Net (BQN)} \label{sec:BQN} As illustrated in Figure~\ref{fig:framework}, the BQN architecture contains two pathways, Busy and Quiet, operating in parallel on two distinct video data components, which are separated by the MBPM. The Busy and Quiet pathways are bridged by multiple Band-Pass Lateral Connections (see Section~\ref{sec:lc}). These lateral connections enable information fusion between the two processing pathways. \subsection{Busy and Quiet pathways} \label{sec:BusyandQuiet} \noindent \textbf{Busy pathway.} The Busy pathway is designed to learn fine-grained movement features. It takes as input the information filtered by the MBPM, which contains critical motion information located at the boundaries of objects or regions that have significant temporal change. The stride of $H_{s\times 1 \times 1}^{3\times 1 \times 1}$ from equation~\eqref{eq:mbpm_engi} is set to $s=3$, which means that for every three consecutive RGB frames, the MBPM generates one-frame output. The MBPM output preserves the temporal order of the video frames while significantly reducing the redundant temporal information. We intend to utilize larger spatial input sizes for the Busy pathway to extract more distinct textures. \noindent \textbf{Quiet pathway.} The Quiet pathway focuses on processing quiet information, representing the characteristics of large regions of movement, such as the movement happening in the plain-textured background regions. The input to the Quiet pathway is considered to be the complementary of the MBPM output: \begin{equation} \begin{aligned} \textup{2D-DownSamp}(\textup{Avg}_{3\times 1 \times 1}^{3\times 1 \times 1} (\boldsymbol{I}) - \boldsymbol{\Gamma}), \end{aligned} \label{eq:quiet_input} \end{equation} where $\textup{Avg}_{3\times 1 \times 1}^{3\times 1 \times 1}$ is a temporal average pooling with a stride of 3. In the spatial dimensions, we perform bilinear downsampling (\ie $\textup{2D-DownSamp}$) to reduce the redundant spatial information shared by neighboring locations. In Section~\ref{sec:ablation_BQN}, we explore the effect on performance when varying the input size of the Quiet pathway. \subsection{Band-Pass Lateral Connection (BPLC)} \label{sec:lc} \vspace*{-0.2cm} In the proposed BQN, we include a novel Band-Pass Lateral Connection (BPLC) module which has an MBPM embedded. The BPLCs established between the two pathways, Busy and Quiet, provide a mechanism for information exchange, enabling an optimal fusion of video information characterized by different frequency bands. Different from the lateral connections in~\cite{feichtenhofer2019slowfast,feichtenhofer2016spatiotemporal,feichtenhofer2016convolutional,lin2017feature}, the BPLC, enabled by MBPM, performs feature fusion and feature selection simultaneously, which shows higher performance than other lateral connection designs, according to the experimental results. We denote the two inputs of BPLC from the $i$-th residual blocks in the Busy and Quiet pathways, as $\mathbf{x}_f^i$ and $\mathbf{x}_c^i$, respectively. For simplifying the notation, we assume that $\mathbf{x}_f^i$ and $\mathbf{x}_c^i$ are of the same size. When their sizes are different, we adopt bilinear interpolation to match them in size. The output $\mathbf{y}_f^i$ and $\mathbf{y}_c^i$ for the Busy and Quiet, respectively, is given by \begin{equation} \vspace*{-0.2cm} \begin{aligned} \mathbf{y}_f^i &= \begin{cases} \mathrm{BN}(\textup{MBPM}(\mathbf{x}_c^i)) + \mathbf{x}_f^i & \text{if} \quad \text{mod}(i,2) = 0, \\ \mathbf{x}_f^i & \text{otherwise}, \end{cases} \\ \mathbf{y}_c^i &= \begin{cases} \mathbf{x}_c^i & \quad \,\,\,\,\,\,\,\,\,\,\text{if} \quad \text{mod}(i,2) = 0,\\ \mathrm{BN}(\mathbf{\phi}(\mathbf{x}_f^i)) + \mathbf{x}_c^i & \quad \,\,\,\,\,\,\,\,\,\, \text{otherwise}, \end{cases} \\ & \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \,\,\,\,\, i = 1,2,\ldots,B \end{aligned} \label{eq:bplc} \vspace*{+0.1cm} \end{equation} where $B$ denotes the number of residual blocks in the backbone network (considered as the network with residual block designs in the experiments). $\mathbf{\phi}(\cdot)$ is the linear transformation that can be implemented as a $1\times1 \times 1$ convolution, or alternatively, when the channel number is very large, as a bottleneck MLP for reducing computation. $\mathrm{BN}$ indicates Batch Normalization~\cite{szegedy2015bn}, the weights of which are initialized to zero. For the MBPM in BPLC, the convolutional stride of $H_{s \times 1 \times 1}^{3\times 1 \times 1}$ from equation~\eqref{eq:mbpm_engi} is set to $s=1$, maintaining the same temporal size. The fusion direction of BPLC reverses back and forth, as indicated in Figure~\ref{fig:framework}, providing better communication for the two pathways than the unidirectional lateral connections in~\cite{feichtenhofer2019slowfast,lin2017feature} whose information fusion direction is fixed always fusing the information from a certain pathway to the other. By default, we place a BPLC between the two pathways right after each pair of residual blocks. The MBPM embedded in BPLC acts as a soft feature selection gate, which allows only for the busy information from the Quiet pathway to flow to the Busy pathway during the information fusion process. The exploration of various lateral connection designs is provided in Section~\ref{sec:ablation_BQN} and this setting is shown to give the best performance in our experiments. \begin{figure}[t] \centering \includegraphics[width=.93\linewidth]{sigma_kernel_ss.pdf} \vspace{-6pt} \caption{Results on SS V1 when varying the scale $\sigma$ and kernel size $k \times k$ of the spatial channel-wise convolution in MBPM. The results represent averages of multiple runs.} \label{fig:sima_eva} \vspace{-10pt} \end{figure} \section{Experiments} In this section, we provide the results of the experiments for the proposed MBPM and BQN. Then, we compare these results with the state-of-the-art. Unless otherwise stated, we use ResNet50 (R50) with TSM ~\cite{lin2019tsm}, as the backbone of our model. \begin{table}[t] \small \caption{MBPM \vs other motion representation methods. $\dagger$ denotes our reimplementation. The additional parameters and the required computation (FLOPs) are reported.} \vspace{-0.3cm} \label{table:compar_mbpm} \begin{center} \setlength{\tabcolsep}{0pt} \begin{tabular}{l c c c c c} \toprule \multirow{2}{2cm}{\bfseries Rep. Method} & \multicolumn{2}{c}{ \bfseries Efficiency Metrics} & \multirow{2}{1.3cm}{ \bfseries UCF101} & \multirow{2}{1cm}{ \bfseries SS V1} & \multirow{2}{1cm}{ \bfseries K400}\\ \cmidrule{2-3} & \bfseries FLOPs & \bfseries \#Param. & & &\\ \midrule RGB (baseline) &- &- & 87.1 & 46.5 & 71.2\\ RGB Diff~\cite{wang2016temporal} &- & - & 87.0 & 46.6 & 71.4 \\ TV-L1 Flow~\cite{zach2007duality} &- & - & 88.5 & 37.4 & 55.7\\ \midrule DI$\dagger$~\cite{bilen2017action} & - & - & 86.2 & 43.4& 68.3\\ FlowNetC$\dagger$~\cite{ilg2017flownet} & 444G & 39.2M & 87.3 & 26.3 & - \\ FlowNetS$\dagger$~\cite{ilg2017flownet} & 356G & 38.7M & 86.8 & 23.4 & - \\ TVNet$\dagger$~\cite{fan2018end} & 3.3G & 0.2K & 88.6 & 45.2 & 58.5 \\ PA~\cite{zhang2019pan} & 2.8G&1.1K & 89.5 & 45.1 & 57.3 \\ \midrule \textbf{MBPM} &0.3G & 0.2K & \textbf{90.3} & \textbf{48.0} & \textbf{72.3}\\ \bottomrule \end{tabular} \vspace{-8pt} \end{center} \end{table} \begin{table}[!t] \small \caption{Using different CNNs as backbones on SS V1. ResNet50 and MobileNetV2 have TSM~\cite{lin2019tsm} embedded.} \vspace{-0.3cm} \label{tab:diff_cnns} \begin{center} \setlength{\tabcolsep}{2.5pt} \begin{tabular}{l c c c c } \toprule \bfseries CNN backbone & \bfseries Modality & \bfseries pretrain & \bfseries Seg. ($N$) & \bfseries Acc. \\ \midrule \multirow{4}*{ResNet50~\cite{he2016deep}} & RGB & \multirow{4}*{ImageNet} & \multirow{4}*{8} & 46.5 \\ & RGB+Flow & & & 49.8 \\ & MBPM & & & 48.0 \\ & RGB+MBPM & & & 50.3 \\ \midrule \multirow{2}*{MobileNetV2~\cite{sandler2018mobilenetv2} }& RGB & \multirow{2}*{ImageNet} & \multirow{2}*{8} & 38.7 \\ & MBPM & & & 39.8 \\ \midrule \multirow{2}*{X3D-M~\cite{feichtenhofer2020x3d} } & RGB & \multirow{2}*{None} & \multirow{2}*{16} & 45.5 \\ & MBPM & & & 46.9 \\ \bottomrule \end{tabular} \vspace{-0.4cm} \end{center} \end{table} \begin{figure*}[t] \vspace*{-0.1cm} \centering \resizebox{1.\textwidth}{!}{\includegraphics{example_mbpm.pdf}} \vspace*{-0.6cm} \caption{Videos and their MBPM outputs. The video clips (1)-(4) are from Kinetics, SS V1, UCF and HMDB, respectively. } \label{fig:example_mbpm} \vspace*{-0.4cm} \end{figure*} \subsection{Datasets and Implementation Details} \noindent \textbf{Datasets}. We evaluate our approach on Something-Something V1~\cite{goyal2017something}, Kinetics400~\cite{carreira2017quo}, UCF101~\cite{soomro2012ucf101} and HMDB51~\cite{kuehne2011hmdb}. Most of the videos in Kinetics400 (K400), UCF101 and HMDB51 can be accurately classified by only considering their background scene information, while the temporal relation between frames is not very important. In Something-Something (SS) V1, many action categories are symmetrical ({\em e.g.} ``Pulling something from left to right'' and ``Pulling something from right to left''). Discriminating these symmetric actions requires models with strong temporal modeling ability. \noindent \textbf{Training \& Testing.} Aside from X3D-M~\cite{feichtenhofer2020x3d}, the backbone networks are pretrained on ImageNet~\cite{imagenet_cvpr09}. For training, we utilize the dense sampling strategy~\cite{wang2018non} for Kinetics400. As for the other datasets, we utilize the uniform sampling strategy as shown in Figure~\ref{fig:framework}, where a video is equally divided into $N$ segments, and 3 consecutive frames in each segment are randomly sampled to constitute a video clip of length $T=3N$. Unless specified otherwise, a default video clip is composed of $N=8$ segments with a spatial size of $224^2$. During the tests, we sample a single clip per video with center cropping for efficient inference~\cite{lin2019tsm}, which is used in our ablation studies. When pursuing high accuracy, we consider sampling multiple clips\&crops from the video and averaging the prediction scores of multiple space-time ``views'' (spatial crops$\times$temporal clips) used in~\cite{feichtenhofer2019slowfast}. More training details can be found in Appendix~A. \subsection{Ablation Studies for MBPM} \label{sec: Ablation Studies for MBPM} \noindent \textbf{Instantiations and Settings.} In the MBPM, the scale $\sigma$ from equation~\eqref{eq:log} and the kernel size of the spatial channel-wise convolution $LoG_\sigma^{1\times k \times k}$ have a significant impact on the performance. We vary the scale $\sigma $ and the kernel size to search for the optimal settings. Meanwhile, in order to highlight the importance of the training for the MBPM, we compare the performance when using trained MBPM with that of untrained MBPM whose kernel weights are not optimized with the classification loss. The results on SS V1 are shown in Figure~\ref{fig:sima_eva}. We summarize two facts: 1) the optimal value of $\sigma$ for the MBPM changes when the kernel size changes, and the MBPM with $\sigma=1.1$ and a spatial kernel size $9\times9$ gives the best performance within the searching range. 2) optimizing the parameters of MBPM with the video classification loss generally produces higher prediction accuracy. In our preliminary work, we have verified that different datasets share the same optimal settings of MBPM. More results on other datasets are provided in Appendix~B. In the following experiments, we set MBPM in the Busy pathway as trainable with the scale $\sigma=1.1$ and the kernel size of $9\times9$, unless specified otherwise. \begin{table*}[t!] \centering \small \captionsetup[subfloat]{labelformat=parens, labelsep=space, skip=7pt, position=bottom} \caption{ Ablation Studies for BQN on Something-Something V1. We show top-1 and top-5 prediction accuracy (\%), as well as computational complexity measured in GFLOPs for a single crop \& single clip.} \subfloat[\textbf{Complementarity of Quiet and Busy.} ``Quiet'' and ``Busy'' refer to that the Quiet and Busy pathways are trained separately. \label{tab:abl_fcnet:fusion}]{ \setlength{\tabcolsep}{3pt} \begin{tabularx}{0.31\linewidth}{l l c c c} \toprule & \bfseries Model & \bfseries Top-1 & \bfseries Top-5 & \bfseries GFLOPs\\ \midrule &Quiet & 46.5 & 75.3 & 32.8\\ &Busy & 48.0 & 76.8 & 32.8\\ &Quiet+Busy& 50.3 & 79.0 & 65.7\\ &BQN & \textbf{51.6} & \textbf{80.5} & 65.9\\ \bottomrule \end{tabularx}}\hspace{2mm} \subfloat[\textbf{Effect of BPLCs.} The BQN model with more BPLCs has higher accuracy. \label{tab:abl_fcnet:num_lc}]{ \setlength{\tabcolsep}{3pt} \begin{tabularx}{0.28\linewidth}{c c c c} \toprule \bfseries \# BPLC & \bfseries \bfseries Top-1 & \bfseries \bfseries Top-5 & \bfseries GFLOPs\\ \midrule 0 & 49.6 & 78.9 & 65.7\\ 4 & 50.2 & 79.2 & 65.8\\ 8 & 50.7 & 79.7 & 65.8\\ 16 & \textbf{51.6} & \textbf{80.5} & 65.9\\ \bottomrule \end{tabularx}}\hspace{2mm} \subfloat[\textbf{Fusion Strategies.} The fully-connected layers of the two pathways share the parameters. \label{tab:abl_fcnet:fusion_strategy}]{ \setlength{\tabcolsep}{3pt} \begin{tabularx}{0.31\linewidth}{l c c c} \toprule \bfseries Fusion Method & \bfseries Position & \bfseries \bfseries Top-1 & \bfseries Top-5 \\ \midrule Average & before fc & 50.9 & 79.8 \\ Average & after fc & \textbf{51.6} & \textbf{80.5} \\ Max & after fc & 50.1 & 78.7 \\ Concatenation & before fc & 51.3 & 80.2 \\ \bottomrule \end{tabularx}} \subfloat[\textbf{Spatio-temporal input size.} The input size is formatted with ($\textup{width}^2 \times \textup{time}$). \label{tab:abl_fcnet: size}]{ \setlength{\tabcolsep}{3pt} \begin{tabularx}{0.365\linewidth}{l c c c c} \toprule \tabincell{c}{\bfseries Input size \\ \bfseries for Quiet } & \tabincell{c}{\bfseries Input size \\ \bfseries for Busy } & \bfseries Top-1 & \bfseries Top-5 & \bfseries GFLOPs\\ \midrule $224^2 \times 8$ & $224^2 \times 8$ & 51.6 & 80.5 & 65.9\\ $160^2 \times 8$ & $224^2 \times 8$ & 51.3 & 80.1 & 50.5 \\ $\mathbf{160^2\times8}$ & $\mathbf{256^2 \times 8}$ & \bfseries 51.7 & \bfseries 80.5 & \bfseries 60.7 \\ $160^2 \times 6$ & $256^2 \times 8$ & 49.6 & 78.3 & 55.5 \\ \bottomrule \end{tabularx}}\hspace{2mm} \subfloat[\textbf{Various LC designs.} 16 LCs are set in the BQN. \label{tab:abl_fcnet: lc_variants}]{ \setlength{\tabcolsep}{5pt} \begin{tabularx}{0.21\linewidth}{l c c c c} \toprule \bfseries Design & \bfseries Top-1 & \bfseries Top-5 \\ \midrule LC-I & 50.9 & 79.8 \\ LC-II & 50.9 & 79.7 \\ LC-III & 51.5 & 80.2 \\ BPLC & \bfseries 51.6 & 80.5 \\ LC-V & 51.3 & 79.9 \\ \bottomrule \end{tabularx}}\hspace{2mm} \subfloat[\textbf{Stage for adding BPLCs.} In each stage, we set one BPLC after its first residual block. \label{tab:abl_fcnet: lc_stage}]{ \setlength{\tabcolsep}{2pt} \begin{tabularx}{0.33\linewidth}{l c c c} \toprule \bfseries Stages & \bfseries \# BPLC & \bfseries Top-1 & \bfseries Top-5\\ \midrule res2 & 1 & 49.8 & 79.1 \\ res2,res3 & 2 & 50.1 & 78.7 \\ res2,res3,res4 & 3 & 50.2 & 79.0 \\ res2,res3,res4,res5 & 4 & 50.2 & 79.2 \\ \\ \bottomrule \end{tabularx}} \label{tab: ablation_fcnet} \end{table*} \begin{figure*}[!t] \centering \resizebox{1.\textwidth}{!}{\includegraphics{lc-variants.pdf}} \vspace{-0.5cm} \caption{Diagrams of various lateral connection (LC) designs. Bilinear interpolation is used for resizing the feature maps when $\mathbf{x}^i_c$ and $\mathbf{x}^i_f$ do not have the same spatial size. $i$ refers to the index of the residual block. $\mathbf{W}_\phi$ and $\mathbf{W}_1$ denote the weights of the linear transformation.} \vspace{-0.5cm} \label{fig:lc_variant} \end{figure*} \noindent \textbf{Efficiency and Effectiveness of the MBPM.} We draw an apple-to-apple comparison between the proposed MBPM and other motion representation methods \cite{bilen2017action,fan2018end,ilg2017flownet,wang2016temporal,zach2007duality,zhang2019pan}. The comparison results are shown in Table~\ref{table:compar_mbpm}. The motion representations produced by these methods are used as inputs to the backbone network. The prediction scores are obtained by the average consensus of eight temporal segments~\cite{wang2016temporal}. More details about the implementations can be found in Appendix~C. The proposed MBPM outperforms the other motion representation methods by big margins, while its computation is nearly negligible, which strongly demonstrates the high efficiency and effectiveness of the MBPM. Moreover, the two-stream fusion of ``RGB+MBPM" has higher accuracy than the fusion of ``RGB+Flow", according to the results in Table~\ref{tab:diff_cnns}. \noindent \textbf{Generalization to different CNNs.} The proposed MBPM is a generic plug-and-play unit. The performance of existing video models could be boosted by simply placing an MBPM after their input layers. Table~\ref{tab:diff_cnns} show that MobileNetV2~\cite{sandler2018mobilenetv2} and X3D-M~\cite{feichtenhofer2020x3d} have steady performance improvement after being equipped with our MBPM. \noindent \textbf{Visualization Analysis.} We provide the visualization results of four videos and their corresponding MBPM outputs in the top and bottom rows from Figures~\ref{fig:example_mbpm} (1)-(4). From these results it can be observed that the extracted representations are stable when jittering and other camera movements are present. Also the results from Figures~\ref{fig:example_mbpm} (1)-(4) show that MBPM not only suppresses the stationary information and the background movement, but also highlights the boundaries of moving objects, which are of vital importance for action discrimination. For example, in the ``spinning poi'' video, from Figure~\ref{fig:example_mbpm}-(1), MBPM highlights the poi's movement rather than the movement of the background or that of the performer. More visualization results and visual comparison with other motion representation methods are provided in Appendix~D. \subsection{Ablation Studies for BQN} \label{sec:ablation_BQN} \begin{table*}[!t] \small \caption{\label{tab:sota_something} Results on Something V1. ``N/A'' indicates the numbers are not available. $\dagger$ denotes our reimplementation. } \vspace{-0.5cm} \begin{center} \setlength{\tabcolsep}{5pt} \begin{tabular}{l c c c c c c c} \toprule \bfseries Method & \bfseries Pretrain &\bfseries Backbone & \bfseries Frames$\times$Crops$\times$Clips & \bfseries FLOPs & \bfseries \#Param. & \bfseries Top-1 (\%) & \bfseries Top-5 (\%) \\ \midrule NL I3D GCN~\cite{wang2018videos} & \multirow{6}*{ImageNet} & 3D R50 & 32$\times$3$\times$2 & 303G$\times$3$\times$2 &62.2M & 46.1 & 76.8\\ TRN$_{\textup{RGB+Flow}}$~\cite{zhou2018temporal} & & BNInception & (8$+$48)$\times$1$\times$1 & N/A & 36.6M& 42.0 & -\\ TSM$_{\mathrm{En}}$~\cite{lin2019tsm} & & R50 & (16$+$8)$\times$1$\times$1 & 98G & 48.6M& 49.7 & 78.5\\ TEA~\cite{li2020tea} & & R50 & 16$\times$3$\times$10 & 70G$\times$3$\times$10 & 24.4M& 52.3 & 81.9\\ bLVNet-TAM~\cite{fan2019more}& & bLR50 & 8$\times$1$\times$2 & 12G$\times$1$\times$2 & 25M & 46.4 & 76.6\\ PAN$_{\mathrm{Full}}$~\cite{zhang2019pan} & & TSM R50 & 40$\times$1$\times$2 &67.7G$\times$1$\times$2 & - & 50.5 & 79.2\\ ir-CSN~\cite{tran2019video} & None & 3D R152 & 32$\times$1$\times$10 &96.7G$\times$1$\times$10 & - & 49.3 & - \\ \midrule TSM R50~\cite{lin2019tsm} & \multirow{5}*{ImageNet} & R50 & 16$\times$1$\times$1 & 65G$\times$1$\times$1& 24.3M & 47.2 & 77.1\\ \textbf{BQN}& & TSM R50 & 24$\times$1$\times$1 & 60G$\times$1$\times$1& 47.4M & 51.7 & 80.5 \\ \textbf{BQN}& & TSM R50 & 24$\times$3$\times$2 & 60G$\times$3$\times$2& 47.4M & 53.3 & 82.0 \\ \textbf{BQN}& & TSM R50 & 48$\times$3$\times$2 & 121G$\times$3$\times$2& 47.4M & 54.3 & 82.0 \\ \textbf{BQN}& & TSM R101 & 48$\times$3$\times$2 & 231G$\times$3$\times$2 & 85.4M& 54.9 & 81.7 \\ \midrule X3D-M$\dagger$~\cite{feichtenhofer2020x3d} & None & - & 16$\times$3$\times$2 &6.4G$\times$3$\times$2 & 3.3M & 46.7 & 75.5\\ \textbf{BQN}& None & X3D-M & 48$\times$3$\times$2 & 9.7G$\times$3$\times$2 & 6.6M & 50.6 & 79.2 \\ \textbf{BQN}& K400 & X3D-M & 48$\times$3$\times$2 & 9.7G$\times$3$\times$2 & 6.6M & 53.7 & 81.8 \\ \midrule \multirow{2}*{\textbf{BQN$_{\mathrm{En}}$}} & ImageNet & TSM R101 & \multirow{2}*{(48+48)$\times$3$\times$2} & \multirow{2}*{241G$\times$3$\times$2} & \multirow{2}*{92M} & \multirow{2}*{\textbf{57.1}} & \multirow{2}*{\textbf{84.2}} \\ & + K400 & +X3D-M & & & & & \\ \bottomrule \end{tabular} \end{center} \vspace{-0.8cm} \end{table*} \noindent \textbf{BQN \vs Quiet+Busy.} In order to evaluate the effectiveness of the proposed BQN architecture, we compare BQN with the simple fusion (Quiet+Busy), which mimics the two-stream model~\cite{simonyan2014two} by averaging the predictions of two pathways trained separately. Table~\ref{tab:abl_fcnet:fusion} shows that the simple fusion of two individual pathways (Quiet+Busy) generates higher top-1 accuracy (50.3\%) than the individual pathways, which indicates that the features learned by the Quiet pathway and by the Busy pathway are complementary. Surprisingly, BQN has 51.6\% top-1 accuracy, which is 1.3\% better than the Quiet+Busy fusion. The high-performance gain strongly demonstrates the advantages of the proposed BQN architecture. \noindent \textbf{Fusion strategies} applied at the end of the Busy and Quiet pathways also influence the performance of BQN. Table~\ref{tab:abl_fcnet:fusion_strategy} shows the results of different fusions. We observe that the average fusion gives the best result among the listed methods, while the concatenation fusion is second only to the averaging. Besides, placing the average fusion layer after the fully-connected layer is better than placing it before. \noindent \textbf{Effectiveness of the BPLC.} We can set a maximum of up to 16 BPLCs in the BQN architecture when using TSM R50~\cite{lin2019tsm} as the backbone\footnote{ResNet50 contains four stages, named res2, res3, res4, res5, respectively. These stages are composed of 3, 4, 6, 3 residual blocks, respectively.}. For the BPLCs in stage res2, res3 and res4, we set the spatial kernel size of MBPM as $7\times7$, and the scale $\sigma = 0.9$. As for the stage res5, whose feature size is relatively small, the kernel size is therefore set to $3\times3$. Table~\ref{tab:abl_fcnet: lc_stage}, illustrates that adding BPLCs to all processing stages is helpful for improving performance. From Table~\ref{tab:abl_fcnet:num_lc}, we can observe that the model performance improves gradually as the number of BPLCs increases. The substantial performance gains demonstrate the importance of using BPLCs for BQN. \noindent \textbf{Lateral Connection (LC) Designs.} In order to illustrate the rationality of the proposed BPLC design, we compare it with other LC designs. The diagrams of different LC designs are illustrated in Figure~\ref{fig:lc_variant}, where LC-I and LC-II are unidirectional, and LC-III is bidirectional. The results from Table~\ref{tab:abl_fcnet: lc_variants} show that the bidirectional design LC-III has higher accuracy than the unidirectional designs LC-I and LC-II. Among the listed designs, the proposed BPLC, which reverses the information fusion direction back and forth, provides the highest accuracy. We also compare the BPLC with LC-V that does not contain an MBPM. As a result, LC-V shows lower accuracy than the BPLC, which demonstrates the importance of MBPM for the BPLC. \noindent \textbf{Spatial-temporal input size.} In BQN, the Busy pathway takes as input the MBPM output, which has the same spatial size as the raw video clip, while the temporal size is one-third of the raw video clip length. Meanwhile, the Quiet pathway takes as input the complementary of the MBPM output, given by equation~\eqref{eq:quiet_input}. Table~\ref{tab:abl_fcnet: size} shows that with the same temporal size of 8 for the inputs, the spatial size combination of $160^2$ and $256^2$ for the Quiet and Busy, respectively, has slightly better top-1 accuracy (+0.1\%) than the combination of $224^2$ and $224^2$ but saves 5.2 GFLOPs in computational cost. We also attempt to reduce the temporal input size of the Quiet pathway. However, this would result in a performance drop. One possible explanation is that due to the temporal average pooling in the Quiet pathway, the input's temporal size is already reduced to one-third of the raw video clip. An even smaller temporal size could fail to preserve the correct temporal order of the video, and therefore harms the temporal relation modeling. \begin{table}[t] \small \caption{\label{tab:sota_kinetics} Comparison results on Kinetics400. We report the inference cost of multiple ``views'' (spatial crops × temporal clips). $\dagger$ denotes our reimplementation.} \vspace{-0.3cm} \begin{center} \setlength{\tabcolsep}{1.3pt} \begin{tabular}{l c c c c c c} \toprule \bfseries Method &\bfseries Backbone & \tabincell{c}{\bfseries Frames \\ \bfseries $\times$ views} & \bfseries FLOPs & \tabincell{c}{\bfseries Top-1 \\ \bfseries (\%)} & \tabincell{c}{\bfseries Top-5 \\ \bfseries (\%)} \\ \midrule bLVNet-TAM~\cite{fan2019more} & bLR50 & 16$\times$9 & 561G & 72.0 & 90.6\\ TSM~\cite{lin2019tsm}& R50 & 16$\times$30 & 2580G & 74.7 & - \\ STM~\cite{jiang2019stm}& R50 & 16$\times$30 & 2010G & 73.7 & 91.6\\ X3D-M$\dagger$~\cite{feichtenhofer2020x3d} & - & 16$\times$30 & 186G & 75.1 & 92.2\\ \midrule SlowFast$_{4\times16}$~\cite{feichtenhofer2019slowfast} & 3D R50 & 32$\times$30 & 1083G & 75.6 & 92.1\\ ip-CSN~\cite{tran2019video} & 3D R101 & 32$\times$30& 2490G & 76.7 & 92.3\\ SmallBigNet~\cite{li2020smallbignet} & R101 & 32$\times$12 & 6552G & 77.4 & 93.3\\ \midrule PAN$_{\mathrm{Full}}$ & TSM R50 & 40$\times$2 & 176G & 74.4 & 91.6\\ I3D$_{\mathrm{RGB}}$~\cite{carreira2017quo} & Inc. V1 & 64$\times$N/A & N/A & 71.1 & 89.3\\ Oct-I3D~\cite{chen2019drop} & - & N/A$\times$N/A & N/A & 74.6 & - \\ NL I3D~\cite{wang2018non} & 3D R101 & 128$\times$30 & 10770G & 77.7 & 93.3\\ \midrule \textbf{BQN} & TSM R50 & 48$\times$10 & 1210G & 76.8 & 92.4 \\ \textbf{BQN} & TSM R50 & 72$\times$10 & 1820G & 77.3 & 93.2 \\ \textbf{BQN} & X3D-M & 48$\times$30 & 291G & 77.1 & 92.5 \\ \bottomrule \end{tabular} \vspace{-0.4cm} \end{center} \end{table} \subsection{Comparisons with the State-of-the-Art} We compare BQN with current state-of-the-art methods on the four datasets. In BQN, the Quiet and Busy pathways' spatial input size is set to $160^2$ and $256^2$, respectively. \noindent \textbf{Results on Something-Something V1.} Table~\ref{tab:sota_something} summarizes the comprehensive comparison, including the inference protocols, corresponding computational costs (FLOPs) and the prediction accuracy. Our method surpasses all other methods by good margins. For example, the multi-clip accuracy of BQN$_{24f}$ with TSM R50 is 7.2\% higher than NL I3D GCN$_{32f}$~\cite{wang2018videos} while requiring $5\times$ fewer FLOPs. Among the models based on ResNet50, BQN$_{48f}$ has the highest top-1 accuracy (54.3\%), which surpasses the second-best, TEA$_{16f}$~\cite{li2020tea}, by a margin of +2\%. Furthermore, our signal-clip BQN$_{24f}$ has higher accuracy (51.7\%) than most other multi-clip models, requiring only 60 GFLOPs. By adopting a deeper backbone (TSM R101), BQN$_{48f}$ has 54.9\% top-1 accuracy, higher than any single model. When using X3D-M as the backbone, BQN achieves the ultimate efficiency, possessing very low redundancy in both feature channel and spatio-temporal dimensions. BQN with X3D-M processes 4$\times$ more video frames than vanilla X3D-M, with only 50\% additional FLOPs. Compared with TSM R50$_{16f}$, BQN with X3D-M trained from scratch produces 3.4\% higher top-1 accuracy with the computation complexity of 14\% of TSM R50$_{16f}$. The ensemble version \textbf{BQN$_{\mathrm{En}}$} achieves the state-of-the-art top-1/5 accuracy (57.1\%/84.2\%). \begin{table}[tp] \small \caption{\label{tab: ucf_hmdb} Results on HMDB51 and UCF101. We report the mean class accuracy over the three official splits.} \vspace{-0.3cm} \begin{center} \setlength{\tabcolsep}{4pt} \begin{tabular}{l c c c} \toprule \bfseries Method & {\bfseries Backbone} & \bfseries HMDB51 & \bfseries UCF101 \\ \midrule StNet~\cite{he2019stnet} & R50 & - & 93.5 \\ TSM~\cite{lin2019tsm} & R50 & 73.5 & 95.9 \\ STM~\cite{jiang2019stm} & R50 & 72.2 & 96.2 \\ TEA~\cite{li2020tea} & R50 & 73.3 & 96.9 \\ DI Four-Stream~\cite{bilen2017action} & ResNeXt101 & 72.5 & 95.5 \\ TVNet~\cite{fan2018end} & BNInception & 71.0 & 94.5 \\ TSN$_{\textup{RGB+Flow}}$~\cite{wang2016temporal} & BNInception & 68.5 & 94.0 \\ I3D$_{\textup{RGB+Flow}}$~\cite{carreira2017quo} & 3D Inception & {\bfseries 80.7} & {\bfseries 98.0} \\ PAN$_{\textup{Full}}$~\cite{zhang2019pan} & TSM R50 & 77.0 & 96.5 \\ \midrule \textbf{BQN} & \textbf{TSM R50} & \textbf{77.6} & \textbf{97.6}\\ \bottomrule \end{tabular} \vspace{-0.6cm} \end{center} \end{table} \noindent \textbf{Results on Kinetics400, UCF101 and HMDB51.} Table~\ref{tab:sota_kinetics} shows the comparison results on Kinetics400. For fair comparison, we only list the models with the spatial input size of $256^2$. BQN$_{72f}$ with TSM R50 achieves 77.3\%/93.2\% top-1/5 accuracy, which is better than the 3D CNN-based architecture, I3D~\cite{carreira2017quo}, by a big margin of +6.2\%/3.9\%. When BQN uses TSM R50 or X3D-M as the backbone, it consistently shows higher accuracy than SlowFast$_{4\times16}$. Particularly, BQN with X3D-M has 1.5\% higher top-1 accuracy than SlowFast$_{4\times16}$, while requiring $3.7\times$ fewer FLOPs. Meanwhile, BQN$_{72f}$ with TSM R50 is 2.7\% better than Oct-I3D~\cite{chen2019drop} for top-1 accuracy. The results on two smaller datasets, UCF101 and HMDB51, are shown in Table~\ref{tab: ucf_hmdb}, where we report the mean class accuracy over the three official splits. We pretrain our model on Kinetics400 to avoid overfitting. The accuracy of our method is obtained by the inference protocol (3 crops$\times$2 clips). BQN with TSM R50 outperforms most other methods except for I3D$_{\textup{RGB+Flow}}$, which uses additional optical flow input modality. \vspace*{-0.2cm} \section{Conclusion} \vspace*{-0.1cm} This paper develops a novel video representation learning mechanism called Motion Band-Pass Module (MBPM). The MBPM can distill important motion cues corresponding to a set of band-pass spatio-temporal frequencies. We design a spatio-temporal architecture called Bus-Quiet Net (BQN), enabled by MBPM, to separately process busy and quiet video data information. The busy-quiet disentangling enables efficient video processing by allocating additional resources to the Busy stream and less to the Quiet. Our methods can also be used for video processing and analysis in various applications. \vspace*{-0.2cm} \section*{Acknowledgments} \vspace*{-0.1cm} This work made use of the facilities of the N8 Centre of Excellence in Computationally Intensive Research (N8 CIR) provided and funded by the N8 research partnership and EPSRC (Grant No. EP/T022167/1). {\small \bibliographystyle{ieee_fullname}
\section{Motivation} ``How can we engage a person X in joining the cause Y, which may be perceived as time consuming, tedious, or out of X's interests? How can we locate and build-up appropriate (micro-)communities to maximise the engagement to cause Y by members of that community? What methods can we adopt to recognise and avoid behavioural tricks from playing against the system through unwanted interactions? How do we trade-off people's behaviours so to accommodate individuals' interests and abilities while still achieving competing causes, within the same environment?'' Those simple questions underpin the bold general objective of our vision: advanced technologies leveraging social networking and its impacts for enabling communities to \textbf{collaboratively reach the common good} by \textit{sharing} people's strengths while \textit{improving} their weaknesses related to their \textbf{social capital} \cite{morrison_2013,Ostrom2000,PetruzziPB17}. Social capital, in this paper, is a set of characteristics that describes each individual’s capability and contribution to solve specific \textit{societal challenges} (i.e. improve inclusion, reduce environmental impact, have healthy habits)\cite{RR-479-EC}. Societal challenges can, ideally, be aligned to the Sustainable Development Goals set by the UN \footnote{\url{https://sustainabledevelopment.un.org/post2015/transformingourworld}} (e.g., climate action, sustainable cities and communities, and good health and well-being). We consider striving for the common good as a way to empower each individual, by taking advantage of potentials of collaborations while creating awareness of antagonistic interests. Some antagonistic interests may arrive to unwanted effects that may need to be removed at least up to a point \cite{morrison_2013,BucchiaroneDPCS20}. \textbf{Gamification mechanisms} have the general merit of stimulating behavioural changes in a lightweight manner, that is by involving people in game-like scenarios where a certain task accomplishment is rewarded with a virtual or physical prize \cite{HervasRMB17}. Gamification is highly more effective when \textbf{personalisation} and \textbf{adaptivity} are included. Adaptive (or tailored) gamification~\cite{Klock2020TailoredLiterature}, rather than motivating users with solely external rewards, is designed to make the experience engaging for the specific user by also taking into account and adapting to individual traits according to necessary trade-offs. Nevertheless, adaptation withing a single gamification campaign might not be enough. People may still be uninterested regarding the activity promoted, or they might even be more useful for the community if actively engaged (also) in another initiative. Given the issues described so far, we envision a new paradigm defined as \textbf{multi-challenge motivational systems}: by this paradigm, (micro-)communities participate to multiple campaigns devoted to common societal goals~\cite{DafflonGOD20}. Moreover, since participants' engagement owns a central and critical aspect, they form communities based on appropriate combinations of social capital contributed by each individual. To develop multi-campaigns motivational systems, a new methodological paradigm and software platform is required. The paradigm combines multi-agent systems, gamification, and self-adaptive systems research field. In fact, the systems should be able to: cater for groups and group phenomena such as smart communities (i.e. smart cities); facilitate and foster collective action; make citizen providers and consumers (prosumers) of collectively provisioned services; serve citizens in terms of social capital and needs, and make the \textit{collaboration of multiple citizens} the enabler to reach a common good, while detrimental (side) effects are detected and hopefully avoided. The new methodological paradigm we propose is to ground the design of motivational digital systems in theories of multi-agent systems in which agents are more likely to perform certain actions as based on motivational/engagement factors (i.e. through gamification). Moreover, the new platform we propose is based on the idea of \textbf{``Continuous Engagement''} \cite{RICHARD201880}, and is founded on formalisation of computational models derived from empirical analysis of psychological processes and social practices. The effects of different campaigns should be continuously evaluated to adapt the ongoing challenges to societal fluctuations and upcoming goals (hence, self-adaptive systems). The resulting platform provides the enablers for developing radically innovative \textbf{tools to motivate} in smart(er) communities and societies. We argue that the role of agents' capacity to support trade-off strategies should be capitalised~\cite{BencomoMoDRE2018}. \section{Scientific Context} \label{subsec:intro} Multi-Agent Systems (MAS) address the process of how a community of agents with a joint interest work together in satisfying a high-level goal/objective in a specific context. The agents should be able to reflect on the current state of achievement of their goals, reason about how their actions might contribute to achieving their community-wide goal \cite{MeloMG18,MeirP18,PinheiroS18} and, how they can adapt the overall behaviours taking into account the preferences and the needs expressed by each single participant \cite{Bucchiarone19}. Research challenges in MAS cover the provision of models and techniques for \textbf{engagement}, \textbf{action}, \textbf{learning} and \textbf{adaptation} such that they perform and are interconnected as a community. This includes \textbf{micro-level modelling} pertaining to the individual actors, but also \textbf{macro-level modelling} of how group practices emerge from composition of activities at the individual level. The representation of composition operators and how to apply them represent another open research challenge. We need mechanisms to handle how different individuals become part of the same emergent community, how they collectively devise and provide services to the community, and how they collectively adapt to changes in context, interests, incentives and opportunities. If we want to facilitate and foster continuous engagement and collective actions of citizens using MAS, we need to understand how psychological and social processes can combine to pursue \textbf{self-organisation}. Dynamic Social Psychology (DSP) defines social groups as complex systems \cite{Vallacher97}, where the interaction between heterogeneous individuals or subgroups results in self-organisation and emergent properties at the system level. DSP incorporates social, psychological and cognitive mechanisms, which are empirically verified, in order to study how different psychological and social variables acting as control parameters have an impact the macro, group-level properties. Applying the DSP allows us to integrate findings on micro-level, individual determinants that have specific roles, capabilities and effects in social practices, as well as insights from system-level analysis, which can point to engagement policies that would optimise collective action to make it sustainable. Based on motivational digital systems, citizens can share their “social capital” with the community. Social capital is an attribute of individuals that enhances their ability to improve a specific societal challenge taking actions in their daily life\cite{PetruzziBP15}. These attributes may take different forms, for example reputation, participation, influence, support, among others. Each of these forms is also a subjective indicator (or metric) of one individual’s expectations about how other individuals will behave in an n -player cooperative context. In the pursuit of successful and sustainable actions, it is necessary to understand and capture the social practices that lead to the creation of social capital, the group psychology that provides an evaluation of social capital, and the mechanisms by which social capital contributes to reach the common good. We envision to build upon and extend gamification approaches, because they facilitate capturing sustainable practices in an algorithmic form, together with persuasion potentials to promote and incentivize the participation in those practices by citizens. A research challenge related to this aspect is \textbf{the automatic generation of personalised game experiences and mechanics} that are tailored to the user profile (e.g., preferences, habits, game status and history) and to the sustainability objectives promoted by the application. In fact, these techniques shall keep end-users engaged and interested in the long-term with a diversified and enhanced game experience, and at the same time incentivize sustainable behaviours . There exists already a relevant body of research about modelling gamification applications \cite{KOIVISTO2019191}, in general they introduce processes to support a certain gamification solution, or they target a particular application domain (education, e-banking, health, etc.). However, the issues related to engagement and multi-objective games are scarcely addressed. Notably, Toda et al. \cite{TodaVI17} discuss in their survey major problems detected in gamified education and the most critical elements of the games construction. Consistently, the authors noted that the ranking approach and the game elements associated with it, shall be carefully designed to avoid counterproductive behaviours (e.g. performance degradation). From a more technical perspective, modelling gamification mechanisms poses challenges to language design \cite{BucchiaroneCM20}. In fact, each game can be conceived as a set of rules through which each participant interacts with the environment: moves, actions, rewards, etc. are woven together to create an appropriate playground. If we consider the coordination of multiple gamified applications as proposed in our vision, then these rules are expected to grow even more. The recurrent solution of letting domain experts specify the game rules in requirement documents and then hard-code the rules in a corresponding application does not scale-up, especially if frequent adaptations are needed. On the other hand, giving domain experts the possibility of defining themselves game rules and generating automatically the corresponding application raises usability problems: diagrammatic solutions become quickly intractable with the number of variables involved in the game, while expressing constraints in logic formulas would be comparable to writing directly the implementation code. From a broader perspective, the rendering of modelling concepts to the user is an open research problem, and this vision can contribute with appropriate solutions for the gamification domain. In this regard, HCI (Human-Computer Interaction) researchers strongly argue for the benefits of adaptive experiences in gamification~\cite{Orji2017TowardsSystems}. Delivering ad-hoc content to players enhances engagement, and can contribute in the fulfilment of the system’s underlying goal~\cite{Kaptein2012AdaptiveSnacking}. Following hard-coded approaches, on the other hand, can lead to neutral or even detrimental results~\cite{Aldenaini2020TrendsReview}. Although the proven advantages of tailored game content, many gameful applications still rely on the ``one-size-fits-all'' approach~\cite{Hamari2014a}. Even when some kind of adaptation is applied, scholars and practitioners mostly employ hard-coded (i.e., rule-based) adaptation using survey-based profiling~\cite{Klock2020TailoredLiterature}. Nevertheless, players’ behaviours and preferences can change overtime. As such, dynamic (run-time) adaptation approaches are preferable, which better adapt to unforeseen behavioural changes. Those changes are even more likely to happen in persuasive gameful systems, where modifying behaviours is the goal. Towards this, players’ in-game activity and interaction patters can be exploited~\cite{Hooshyar2018Data-drivenReview}. While data has been used to learn specific preferences~\cite{loria2020reading}, adjust difficulty~\cite{khoshkangini2020automatic}, or provide recommendations~\cite{toda2019planning}, those studies tackled specific adaptation problems, often context-dependent. A tentative of a more elaborated adaptation framework was done by Loria~\cite{loria2019framework}. Yet, the framework presented is conceptual, and thus concrete solutions are still needed. Additionally, the framework is designed to adapt a single gameful application. Therefore, an approach to integrate knowledge on players' experiences deriving from several gamification is still lacking. \section{Our Vision} \label{sec:vision} \begin{figure*}[h!] \centering \fbox{\includegraphics[width=.6\linewidth]{vision}} \caption{The Role of Multi-Agent Systems in Motivational Digital Systems.} \label{fig:vision} \end{figure*} Our vision (depicted in Figure \ref{fig:vision}) is of a future where the "value'' of people will be based on their \textit{“contribution” to the society}. A society where many people will not have a job, instead they will voluntarily offer services to other people because they can and they like doing that (see as an example Uber, AirBnB, etc.). Other contributions to society can be having low impact behaviours (e.g. avoiding personal transportation, eating more vegetarian food due to lower carbon emissions, etc.), having healthy habits (exercise is not only a personal matter, active people have a lower cost on healthcare and have less ageing-related problems), sharing resources with others (not only cars). In short, the tendency is that society \textit{would shift from competition to cooperation}. As depicted in Figure \ref{fig:vision}, our vision is based on a societal challenges-based approach that bring together resources and needs (i.e., \textbf{knowledge}) across different challenges (i.e., \textit{Sustainable Mobility, Carbon Neutrality, Health and Well-being}). This knowledge reflects the policy priorities of each city/country strategy and addresses major concerns shared by citizens in their own communities. All activities done by a wide community (i.e. a city or a country) in a specific challenge shall take a \textit{continuous feedback loop} approach with the main purpose of improving the society, identifying specific initiatives capable to solve the contradictions of current societal problems and aiming at having a positive impact on the quality of life of citizens. To realise this, we exploit the powerful concepts and methods defined in the multi-agent systems research field. In particular we exploit the MAPE-K loop, the most influential reference control model for autonomic and self-adaptive systems \cite{Kephart2003}. We envision a motivation digital system as a Multi-Agent System able to support the execution of the following flows: a \textit{top-down} flow able to manage from the city government to the citizens, and a \textit{bottom-up} flow that cover the emergent and evolving behaviours from the citizens to the overall city. The motivational digital systems implementing these two flows are composed by agents that see a smaller community, for example a city, inside a more general community, such as the society, from two different perspectives: the city and the citizenship. The first flow is composed by the following processes: \begin{itemize} \item \textbf{Monitor} is a process devoted to ensure more effective monitoring and decision capabilities in cities exploiting local raw data about the specific societal challenge collected from heterogeneous sources (citizens, sensors, devices, and other city assets) to enable a pervasive, multi-source and multi-level analysis of the city and \textit{to help administrators, companies and citizens understand their city and how it evolves}. \item \textbf{Analyse} takes the results of monitoring, digesting them according to the challenge needs, and providing a set of “alert” values spotting the relevant events that should trigger some adaptation; typically it includes mechanisms such as information fusion, complex correlation of information, identification of patterns, etc. For instance, sentiment analysis of twitter feeds could \textit{allow designers to see what people currently think and say about a specific societal challenge}. \item \textbf{Plan} is a process taking the results of analysis, crossing it with available adaptation resources, and providing a set of plans to subgroups of citizen (micro-communities), in terms of a sets of plans; it typically includes mechanisms such as network partitioning, distributed consensus, local deliberation of plans, etc. \item \textbf{Execute} is a process fed with sets of plans, and able to interpret each as an aggregate process to be carried on by the associated communities of citizens; typically it includes all actuation mechanisms as for example \textit{citizen engagement and incentives for behaviour change}. \end{itemize} As soon as the various plans identified at the city level have been identified and executed, they have an effect on the city micro-communities. For the second flow, we envision a set of \textit{internal feedback loops} that involve different micro-communities in each specific societal challenge. Each loop is composed by: \begin{itemize} \item \textbf{Engage}. The key objective of this phase is encouraging citizens to significantly change their daily habits, making them able to make more environmentally friendly and conscious choices. This can be done exploiting methods and tools (i.e., co-design) to bring the voice of the people into the discussion as part of the democratic process \cite{codesign}, or exploiting the motivational and persuasive power of games (gamification techniques) \cite{XI2019210}. \item \textbf{Act}. A main focus in such a motivational digital systems is to foster the ability and opportunity of citizens to self-organise in the form of collectively provided services (like in the sharing economy), through which citizens can act offering their expertise and facilitate the exchange, diffusion and adoption of virtuous practices by other fellow citizens. Another important focus is the exploration of gamification, as a way to incentivize and boost virtuous behaviours in a collaborative/competitive fashion. This phase is introduced to provide innovative mechanisms computer-supported collective action in smart(er) communities and societies \cite{CA2014}. \item \textbf{Learn}. The goal of this process is to learn about the impact of the actions done by the different micro-communities in order to have a real time image of the city sustainability considering the different societal challenge (e.g., sustainable mobility, carbon neutrality, health and well-being). This is necessary to understand the health status of city-patient, its metabolism. It is possible thanks to new technologies \cite{CitySensing} and the attention paid by the \textit{Local Administration} to them. \item \textbf{Adapt}. The outcomes provided by the learning process will show the pros and cons of each city, the \textit{critical issues} and the strong points of the actions executed by their citizens. Based on this, the aim of this process is to adapt the engagement strategies and to define new challenges for their citizens. These adaptations will be useful for generating challenges for the micro-communities, taking into account both the city's objectives and the citizens' past performances and skills \cite{khoshkangini_2020}, that if realised will help to solve the problems highlighted. \end{itemize} A key aspect that characterises our approach is the provision of a unified way \textit{to manage different societal challenges as a combination of inter-operating motivational applications}. As a matter of fact, the existing research efforts address one societal challenge at a time (i.e., smart mobility, green, health, etc..); on the contrary, we believe that multiple challenges should be tackled simultaneously to maximise citizens potentials and benefits. \section{Open Research Challenges} The vision presented in this article introduces several research challenges, which are discussed next. \begin{itemize}[leftmargin=*] \item \textbf{Inclusive and Supportive engagement.} Our research vision includes the realization of an engagement framework sensitive to personal profiles. Profiling promotes \textit{inclusive} and \textit{supportive} engagement with citizens with diverse profiles and backgrounds (e.g. age, demographics, education, gender, disability, etc.), in order to fully understand the impact of diversity. Based on non-private info associated profiles, our vision allows for creating a positive snowball effect in society, by leveraging the most motivated or active groups in society to progressively involve all the segments of local communities and help make first-person participation, individual commitment and citizen science more appealing, visible, and, eventually, conducive to change. To nurture citizens’ motivation to volunteer and act, specific models and tools are used to sustain the extended aspects of volunteering and its impact on society. These include \textit{Citizen Science} and technology-based \textit{crowdsensing} envisage the participation of the general public in societal challenges using an open and inclusive approach \cite{irwin_citizen_2002,10.11457}. Motivational systems that properly exploit and embed game concepts and elements (gamification~\cite{DeterdingDKN11}) can support an engagement framework sensitive to diverse user profiles and backgrounds. Different types of incentives (e.g., monetary vs. non-monetary) and nudges are instead based on the fact that citizens tend to be strongly influenced by their family, friends and peers or (local) champions, and even wider through network effects\cite{canton_2014}, as such they should be used. \textit{Communities of practice}, \textit{living labs}, and \textit{crowdfunding} are further examples of the different approaches to citizen engagement that can be exploited \cite{0028914}. \item \textbf{Adaptive and Continuous Engagement.} The advertised value of gamification is the ability to turn unpleasant tasks into entertaining ones and improve users' experiences by fostering internal motivation to perform the task~\cite{Morschheuser2019TheCrowdsourcing}. Although successful gamification examples do exist, positive outcomes cannot be always assumed, as the effects vary with the contexts and implementations~\cite{hamari2014does}. The biggest critique to unsuccessful gamification applications is the ``one-size-fits-all'' approach, in which a static set of gamification elements are implemented (e.g., points, badges or leaderboards). Rather, researchers argue for the acknowledgement of players' diversity~\cite{Klock2020TailoredLiterature}. Studying gamification's effects have proved that gamification needs to be adaptive to reach its full potential in several domains (e.g., health, sport, and learning). Interpersonal differences contribute to the perception of game elements, as users are motivated by different elements~\cite{ryan2006motivational}. Consequently, designers and practitioners should prioritize the diversifications of the motivational affordances implemented towards the development of more inclusive gameful experiences~\cite{KOIVISTO2019191}. For instance, as different people are motivated by different things, personalizing the incentives and rewards can be highly beneficial~\cite{vassileva2012motivating}. As a consequence, tailoring at the level of social influence strategies may contribute in a positive way to the effects of persuasive technologies~\cite{Kaptein2012AdaptiveSnacking}. When individuals' preferences are neglected, in static gamification, researchers observed inconclusive or even negative results~\cite{Aldenaini2020TrendsReview,hamari2014does}. Thus, how to adapt and personalize gamified applications became an essential research area. Many adaptation strategies rely on static adaptation (i.e. hard-coded or rule-based adaptations), using survey-based profiling approaches grounded in the Psychology literature. Although techniques aimed at understanding players’ preferences exist, adaptive gamification is still an under-investigated topic, especially for what concerns dynamic, automatic adaptation~\cite{Hallifax2019AdaptiveDevelopments,Klock2020TailoredLiterature}. Towards this, telemetry datalogs can be precious for learning players' specific preferences~\cite{loria2020reading}, adjust difficulty, and predict churn~\cite{loria2019exploiting}. Nevertheless, adaptive gamification research still misses consolidated research models and theoretical foundations~\cite{KOIVISTO2019191}. Researchers should further exploit implicit telemetry data ~\cite{Heilbrunn2017GamificationDesigns} to cyclically enhance the adaptation model~\cite{Klock2020TailoredLiterature}, leading to the periodical generation of novel content~\cite{KOIVISTO2019191}. While an initial tentative in the definition of a conceptual adaptation framework exist~\cite{loria2019framework}, this is only a step towards the right direction and still lacks a concrete, implemented solution. \item \textbf{Evaluate the positive behavioural change.} A problem of gamification as a persuasive technology derives from the difficulty in ensuring a behavioural change. Players can either omit communicating activities misaligned with the system’s goal or the the application may even allow a partial recording of players’ actions. Consequently, a global view on players’ habits is lacking. For instance, if we consider an application for sustainable mobility pushing users to reduce car movements in favour of greener transportation means, we can measure a usage increase but cannot argue for players’ reduced car trips. In fact, an increase in green mobility does not imply less kilometres with other means. Our suggested framework also aims at moving forward in the solution direction. In the context of smart cities, knowledge retrieved from several gamification campaigns can be integrated to expand the understanding on players’ activity and (positive/negative) contribution to the society. Nevertheless, this is still a complex and challenging task. Researchers and practitioners need to develop algorithms to integrate this knowledge, while also avoiding bias. Positively transforming the way people behave for the benefit of society requires a deep transformation of their habits and behaviours, which must be based on comprehensive impact assessments and simulations that take into account social, health, environmental and climate impacts, as well as economic impact. This challenge aims to propose innovative solutions that provides data analytics, information, recommendations and simulations for city managers to assess, also through what-if analysis, the environmental impact, to evaluate changes as a result of specific measures and actions and to plan optimal and sustainable strategies. The global pandemic COVID-19 is an excellent example for this context. \\ \item \textbf{Privacy and Ethical Issues.} The applications targeted provide collective behaviour by making use of shared knowledge (as depicted in Figure \ref{fig:vision}), and profile-based data as explained above. Privacy and ethical issues, therefore, have to become first-class citizens when designing and evaluating this kind of systems. Hartswood \textit{et al.}~\cite{Hartswood:2015} discuss these issues in the context of peer profiling. They propose to return the control of data to users, supporting the principles of privacy and transparency. Other privacy-preserving mechanisms based on decentralized data ownership are proposed in the literature as a way to enhance privacy~\cite{Pournaras:2016}. However, in a world dominated by centralized platforms making profits out of the users' personal data, designers face a major socio-technical challenge in executing such a paradigm shift. The centralized/decentralized dichotomy affects the scalability of the proposed solutions too, of course, and so centralization may contain within itself the seeds of a move towards more decentralized solutions on technical grounds~\cite{deLemos:2013}. A lot of work has been done at the European level on ethical and privacy guidelines for technology development with respect to this topic\footnote{\url{https://tinyurl.com/y36sq92q}}. We argue that by having a formal and explicit approach to define engagement policies can serve better as a means to define citizens rights in these contexts (in the same way it is done for e.g. in law). As part of our vision, engagement mechanisms should intrinsically support diversity, ethics, etc. The feedback supported by MAPEK-loops is relevant to underpin the above, including approaches to protect users by mediating their interactions with the digital world according to their own sense of ethics about actions and privacy of data \cite{Inverardi19}. \end{itemize} \section{Conclusion} We believe that the vision presented here provides relevant steps towards the democratization of digital platforms for social coordination. Clearly, such a kind of research challenges can only be successfully tackled if addressed from a combined socio-technical perspective and if performed as an inherently multi-disciplinary research effort. Indeed, the practical implementation of motivational mechanisms needs continuous feedback from its theoretical counterpart to be found in sociology and psychology. The SEAMS community could play a potential relevant role in this multi-disciplinary undertaking. Therefore, we have identified the following set of interrelated software engineering issues in his ambitious vision, which we hope are picked up by the SEAMS community: \begin{itemize} \item The introduction of a \textit{generic, multi-agent based, modelling methodology} to specify motivational digital systems in terms of targeted persons/communities and expected improvements. \item Propose appropriate modelling concepts to define the interactions between different motivational digital systems, to avoid conflicting scenarios~\cite{BencomoMoDRE2018} and/or abuse, to respect privacy and take care of ethics . \item The vision involves negotiation and coordination from different parties, which might lead to conflicting interests (e.g., widespread technology that promotes well-being can be a trade-off with low carbon emission, sustainability or financial return). This is closely related to requirements negotiation~\cite{SALAMA2017249} and the previous issue. \item The introduction of mechanisms to handle the way how different individuals become part of the same emergent community, how they collectively devise and provide services to the community, and how they collectively adapt to changes in policies, context, incentives and opportunities. \item Develop mechanisms to simulate, automatically derive and adapt multifaceted motivational means. \end{itemize} \section*{Acknowledgement} This work was partially funded by the AIR BREAK project (UIA05-177), the Swedish Knowledge Foundation (KKS) Synergy project SACSys, the UK Lerverhulme Trust Fellowship "QuantUn" (RF-2019-548/9), and the UK EPSRC Project Twenty20Insight (EP/T017627/1). \bibliographystyle{unsrt}
\section{Introduction} The mapping class group of a subshift was introduced in \cite{Bo02a}, and studied extensively in \cite{BoCh17} (also see \cite{ScYa21}). By embedding suitable groups as subgroups, it was in particular shown that this group is non-amenable and non-residually finite. It was asked in \cite[Question~6.3]{BoCh17} whether this group is sofic. We showed in \cite{Sa21} that solving this question would necessarily solve an open problem, by embedding Thompson's $V$ (and also the Brin-Thompson $2V$). In particular the following theorem was obtained. \begin{theorem} \label{thm:V} Thompson's group $V$ embeds in the mapping class group of the vertex shift defined by the matrix $\left[\begin{smallmatrix} 1 & 1 & 0 \\ 1 & 1 & 1 \\ 1 & 1 & 1 \\ \end{smallmatrix}\right]$. \end{theorem} This is a technical note, where we give a more elaborate discussion of this example: we give explicit piecewise linear local rules implementing the generating set for $V$ given in \cite{BlQu17}, show some example computations and check the defining relations. It turns out that the total flow distortion of each defining relation is trivial, and we obtain the following stronger theorem. \begin{theorem} \label{thm:strongV} The embedding constructed in the proof of Theorem~\ref{thm:V} can be realized with an action of piecewise linear homeomorphisms. \end{theorem} We mean that the map from the group of orientation-preserving homeomorphisms on the mapping torus, defined by quotienting by isotopy, splits on the subgroup we define, by a homomorphism with only piecewise linear homeomorphisms in its image. We are not aware of a theoretical justification for this fact, we found it experimentally and verified it by computation. The theorem is somewhat reminiscent of the Nielsen embedding problem \cite{Ni32,Ke83}. We assume familiarity with symbolic dynamics \cite{LiMa95}, mapping class groups of SFTs \cite{BoCh17}, and Thompson's group $V$ \cite{BlQu17}. As the present note is a technical supplement to \cite{Sa21}, we use notation from \cite{Sa21} and recommend that the reader starts there. The minor difference is that, to be in line with \cite{BlQu17}, groups act from the right in this note, while they act on the left in \cite{Sa21}. \section{A concrete implementation of $V$} Recall that we consider the mapping class group of the vertex shift $X$ defined by the matrix $\left[\begin{smallmatrix} 1 & 1 & 0 \\ 1 & 1 & 1 \\ 1 & 1 & 1 \\ \end{smallmatrix}\right]$ where the dimensions are indexed by the symbols $0,1,2$ in this order. We very briefly recall the basic idea of the embedding in \cite{Sa21}. The leftmost point on an interval representing a $2$ in a point of the mapping class torus is called an \emph{anchor}. We interpret the continuation to the right from an anchor as a point in Cantor space $\{0,1\}^\mathbb{N}$: If the mapping torus' natural flow never reaches another anchor, then we directly interpret the continuation as a point of Cantor space, and if we run into an anchor, then (because $02$ is forbidden) the continuation is in a natural correspondence with some finite-support point in Cantor space, and we act on this finite-support configuration. By stretching the flow suitably, we can make sure that far to the right of an anchor the content of the configuration is fixed, and we obtain an embedding of $V$ into the mapping class group. The mapping class group elements that we will use are then of the following form: In some subwords $uvw$ appearing in the configuration, we replace $v$ by another word $v'$, and stretch the flow linearly so that the time it takes to flow over $v$ is the same as flowing over $v'$ in the image. If in every configuration $x \in X$, every cell is the $v$-piece of exactly one such word $uvw$, then such a rule describes an element of the mapping class group (see \cite{BoCh17} and its references for another approach to local rules). To describe explicit elements of $\mathrm{MCG}(X)$, it then suffices to list the mappings $(u,v,w) \mapsto v'$, and of course we only list words that actually appear in the vertex shift $X$. We write such a mapping briefly as $u(v)w:v'$, and the set of such mappings is called the \emph{local rule}. Let $a, b, c$ be the generators of $V$ from \cite{BlQu17}. These elements respectively perform the \emph{prefix-permutations} $(00 \;\; 01), (01 \;\; 10 \;\; 11), (00 \;\; 1)$ on the prefix when applied to $x \in \{0,1\}^\mathbb{N}$. For $a$ we pick the following local rule, where $\alpha,\beta,\gamma$ range over $\{0,1\}$: \[ \alpha\beta(\gamma):\gamma, (2)2:201, (200):201, (201)\alpha:200, (201)2:2, (21)2:21, (21\alpha):21\alpha. \] For $b$ we pick the following local rule, where $\alpha,\beta,\gamma$ range over $\{0,1\}$: \[ \alpha\beta(\gamma):\gamma, (2)2:2, (200):200, (201)\alpha:210, \] \[ (201)2:21, (21)2:211, (210)\alpha:211, (211):201. \] For $c$ we pick the following local rule, where $\alpha,\beta$ range over $\{0,1\}$: \[ \alpha0(\beta):\beta, 1(\alpha):\alpha, (2)2:21, (200):21, (201):201, (21)\alpha:200, (21)2:2. \] The idea behind these choices is that we ``fix the anchors'', and to the right of them, we look for the prefix we know how to rewrite. If this would rewrite the entire word visible (or we do not see enough bits to apply a rewrite), then we use a different logic, and we interpret the continuation instead as a finite-support configuration followed by infinitely many zeros, and in this case we apply the prefix-permutation to this finite-support configuration, remove the trailing zeroes and write the resulting finite word in place of the rewritten word. The rewrite is always performed with a constant slope. This is perhaps best internalized by looking at the spacetime diagrams in the following section and in Appendix~\ref{sec:LookHomeo}. An abstract version of this logic (for a general prefix-rewriting bijection) is implemented as part of the program in Appendix~\ref{sec:CheckHomeo} (this is the function {\color{blue}\texttt{apply}}). Now, to see that this is a representation by homeomorphisms, it suffices to check that every trivial element is not just isotopic to the identity, but is actually the identity map. It suffices to check the relations of any finite presentation. We check the relations \[ aa, bbb, cc, abababab, cacaca, cabbabacabbabacbcababbacababba, acbcbabbcbbcbcabcbbcabbacbbcbcbabb, \] \[ abbcbcabbabbcbcbbabbcbbcbabcbbcabb, cabbcbbcbacabacbcbbcabbcabcbbcbbacbacbcbbcabb. \] These relations are essentially (2.4) in \cite{BlQu17}; the only difference is that we have removed inverses using $a^{-1} = a$, $b^{-1} = b^2$ and $c^{-1} = c$, and have added the third relation $cc$ so that the last substitution is safe. Observe that indeed all the generators fix the anchors, so the same is true for the compositions. Thus we only need to analyze the action of each relation $g$ on the list above on words of the form $2w$, where $w \in \{0,1\}^*$ does not end in $0$. More precisely, we can look at their actions on the points of the mapping class torus corresponding to the bi-infinite words $(2w)^\mathbb{Z}$. This reduces the problem to checking the distortion of the action of relations on a countable set of words. To reduce to a finite set of words, observe that each relation will only look a finite distance into a long word $w \in \{0,1\}^*$. Thus, it is enough to check the distortion of the relations when applied to $2w$ for longer and longer words, until the last symbol is not actually touched. Code for checking this is included in Appendix~\ref{sec:CheckHomeo}. Diagrams for checking lack of distortion by visual inspection are in Appendix~\ref{sec:LookHomeo}. After inspecting and running the code, or carefully scrutinizing these diagrams, we conclude that Theorem~\ref{thm:strongV} holds. \section{Spacetime diagrams} \label{sec:Spacetime} In this section, we show some pictures of what the action of $V$ looks like, with the local rules chosen in the previous section. This section serves no precise mathematical purpose, but the pictures may help understand the construction, and we found Theorem~\ref{thm:strongV} by looking at them and observing that the elements that the theory guarantees are isotopic to the identity actually act trivially on uniformly random finite words with high probability (we first assumed this was a bug in our program). We use the convention that a configuration of the mapping class group is shown on the top row, and below it we show the successive images when a sequence of generators $a,b,c$ are applied. We distort the flow in the image configurations for each partial application $g$, so that $t + (x \cdot g) = (t + x) \cdot g$ holds (where $t+y$ denotes the $\mathbb{R}$-flow by $t \in \mathbb{R}$); we refer to this as \emph{cocycle distortion}. We use the following bitmaps to represent the numbers $0, 1, 2$: \begin{center} \includegraphics[scale=0.25]{symbolpicA} \;\;\;\;\;\; \includegraphics[scale=0.25]{symbolpicB} \;\;\;\;\;\;\; \includegraphics[scale=0.25]{symbolpicC} \end{center} \noindent Cocycle distortion shows up as literal distortion of these bitmap images. Note that the actual images can be read off by undoing the cocycle distortion (outwards from the chosen origin), by undistorting the bitmaps. These can be thought of as \emph{spacetime diagrams} for a mapping class group element (more precisely, for the local rule of one), analogously to spacetime diagrams as defined in cellular automaton theory -- indeed reversible cellular automata give elements of mapping class groups, and with the natural choice of local rule, their classical spacetime diagram is the same as that of the corresponding mapping class group element. Note that the natural flow on the mapping torus should be thought of as the flow of \emph{space}, and the mapping class group element gives the (discrete) flow of time. The following shows the spacetime diagram for the action of $cbcabb$ (composing left to right, thus top to bottom). \begin{center} \begin{tikzpicture} \node [anchor=south west] (label) at (0,0) { \includegraphics[scale=0.3,trim={3.85cm 6.5cm 6.45cm 2.5cm},clip]{kiisseli.png}}; \draw (0,4.8) edge[bend left,<-] node[left] {$c$} (0,5.4); \draw (0,3.97) edge[bend left,<-] node[left] {$b$} (0,4.57); \draw (0,3.14) edge[bend left,<-] node[left] {$c$} (0,3.74); \draw (0,2.31) edge[bend left,<-] node[left] {$a$} (0,2.91); \draw (0,1.48) edge[bend left,<-] node[left] {$b$} (0,2.08); \draw (0,0.65) edge[bend left,<-] node[left] {$b$} (0,1.25); \end{tikzpicture} \end{center} In the suffix $2000000...$, we simulate the natural action of $V$ with only minor distortion in the flow. The piece $2001$ in the pattern $20012$ represents the infinite word $x = 2001000...$, and $x \cdot cbcabb= 2000...$, so this pattern disappears in the application of $cbcabb$ (thus we shrink this part by a factor of four, i.e.\ the cocycle moves quickly in this part). The first symbol $2$ in a pattern $22$ represents the configuration $y = 2000...$ and $y \cdot cbcabb = 2111000...$, so the run of $2$s becomes a run of $2111$s (thus we stretch them by a factor of four, i.e.\ the cocycle moves slowly in this part). By Theorem~\ref{thm:strongV}, any composition of $a,b,c$ which evaluates to identity in $V$, also gives the identity in the mapping class group. It is, however, possible for an element to fix the flow orbit of a configuration while acting non-trivially on it, even on the configurations $...00012000...$ where we simulate the natural action of $V$. An example of this is the following computation corresponding to $0^\mathbb{N} \cdot cbba = 0^\mathbb{N}$. \begin{center} \includegraphics[scale=0.18,trim={0 1.3cm 0 1.2cm},clip]{dilation} \end{center} The explanation is that the natural action of the (non-trivial) $V$-element $cbba$ does not fix the ``germ'' of $0^\mathbb{N}$; intuitively, the cocycle is actually shifting all the zeroes to the left. In the mapping class group, the zeroes far from the ``origin'' $2$ cannot possibly know they are being shifted, meaning we must implement the movement by dilating the prefix of the configuration. This is illustrated in the following figure, which shows the same action with more context. \begin{center} \includegraphics[scale=0.3,trim={0 1.4cm 0 1.2cm},clip]{dilation_aha} \end{center} A piece of a spacetime diagram for the reverse of the penultimate relation, namely \[ bbacbbcbabcbbcbbabbcbcbbabbacbcbba \] (which is also a relation) is shown on a random configuration in the following figure. \begin{center} \includegraphics[scale=0.75,trim={4cm 0 10cm 0},clip]{spacetime} \end{center} \section{Discussion} We note that even having the generators $a,b,c$ act the same way on Cantor space but changing their distortion can break the embedding, for example preserving $a$ and $b$ and replacing $c$ by $000 \mapsto 10, 001 \mapsto 11, 1 \mapsto 00, 01 \mapsto 01$ breaks the embedding of $V$: the action of $cc$ distorts the configuration $(211)^\mathbb{Z}$, thus even breaks the embedding of $\mathbb{Z}_2 \cong \langle c \rangle$. One possible explanation is that our rule for turning a prefix permutation into an MCG element is not the most natural one. It is open whether the entire mapping class group splits by homeomorphisms in the same sense as our embedding of $V$ does, see \cite[Question~2.1]{BoCh17}. It is also open whether the (Bowen-Franks kernel of the) mapping class group itself is finitely-generated \cite[Question~3.10]{BoCh17} or finitely-presented. If it turns out to be, one could imagine using a similar computational approach to splitting it, although admittedly it seems likely that proving it is finitely presented (if it is) is more difficult than finding a split (if there is one). It seems unlikely that the present computational approach is really needed to prove Theorem~\ref{thm:strongV}, and it seems likely that there exists a simple explanation. In particular, a more careful analysis of the deduction of this presentation in \cite{BlQu17} might explain this phenomenon. Because of the point raised in the previous paragraph, and the fact carefully checking the embedding of $V$ was already lot of work, we have not carefully looked at our representation of $2V$ in the mapping class group of a mixing SFT (defined in \cite{Sa21}), to see if it also splits. In theory, the same approach could work, since this group is also finitely presented. \begin{question} Does the embedding of $2V$ defined in \cite{Sa21} split by homeomorphisms? If not, does $2V$ admit a split embedding into the mapping class group of a mixing SFT? \end{question} \section*{Acknowledgements} We thank Matt Brin for pointing out the similarity to the Nielsen embedding problem and Laurent Bartholdi for his comments. The author was supported by Academy of Finland project 2608073211. \bibliographystyle{plain}
\section{Introduction} \label{sec:Introduction} The stochastic nature of turbulence and the statistical behaviors of velocity fluctuations have been widely investigated, in order to understand and then reproduce its properties on reduced turbulence models (Large Eddy Simulation) (see \cite{Minier2014}). The inertial scales of many turbulent flows are correctly described by the classical image of Richardson's energy cascade \cite{Richardson1922}. Kolmogorov formalized this universality of turbulence with a self-similar description of velocity fluctuations in the inertial range (see \cite{Kolmogorov1941}, hereafter referred as K41). However, it was pointed out in Ref.~\cite{Landau1944} that this theory is flawed at small scales by the phenomenon of intermittent energy dissipation, in contradiction with the homogeneity assumed in K41. \\ Kolmogorov and Obukhov developed, in response to that concern, a vision based on local and scale-dependent observables which are more relevant to describe velocity fluctuations (see \cite{Kolmogorov1962}, hereafter referred as K62). Since the publication of the refined similarity hypotheses, many studies have been devoted to data analysis, most of them focusing on energy dissipation. Consistently with these hypotheses, it was observed that the dissipation has a log-normal distribution and presents long-range power-law correlation (see Refs.~\cite{Yeung1989, Pope1990, Yeung2006a, Dubrulle2019}). Reproducing such behaviors in turbulence simulations is still an open problem and we are interested in the derivation of models that retrieve this intermittency in Reynolds Averaged Navier-Stokes (RANS) modelings or Large Eddy Simulation (LES) contexts, in particular for modeling phenomena related to the small scales, such as combustion instabilities or the atomization of droplets in industrial burners...\\ Multifractal random fields are of primary interest for modeling intermittent fields since they possess high variability on a wide range of time or space scales, associated with intermittent fluctuations and long-range power-law correlations \cite{Borgas1993,Frisch1995,Sreenivasan1997}. As opposed to monofractal, self-similar fields that correspond to the K41 description of turbulence, complex structures observed in DNS and experimental studies are well reproduced by multifractal random fields. \\ The multiplicative cascade model of Yaglom \cite{Yaglom1966} is at the basis of most cascade models introduced later to account for turbulent intermittency. It was able to reproduce both experimental facts and Kolmogorov's log-normal hypothesis. Discrete models picture turbulence as an ensemble of discrete length-scales, in which the energy transfers from a “mother" to a “daughter" eddy in a recursive and multiplicative manner. In this way, large fluctuations recursively generate correlations over long distances. Other discrete models were also formulated later and the reader is referred to the exhaustive review of \cite{Seuront2005}. However, in \cite{Mandelbrot1968}, Mandelbrot criticized these models for being based on a discrete and arbitrary ratio of length scales. They suggested to consider continuous models such as Gaussian Multiplicative Chaos which was later formalized in Refs.~\cite{Kahane1985, Robert2010}. The second criticism of \cite{Mandelbrot1968} concerns the early cascade models that were developed in the Eulerian framework, and therefore do not exhibit a spatio-temporal structure, which was then introduced by mean of stochastic causal models. The Lagrangian framework of intermittency was proposed in \cite{Borgas1993} and equivalent behavior of multifractal properties were observed for dissipation along particle trajectories. Causal and sequential multifractal stochastic processes were developed in response (see Refs.~\cite{Biferale1998, Schmitt2001, Muzy2002, Chevillard2017a, Pereira2018}). However, most of them rely on long-term memory stochastic processes and can be computationally expensive. \\ The first objective of this work is to establish a list of criteria for modeling intermittent dissipation. This characterization is based on observations of experimental data and is in accordance with the phenomenology developed by Kolmogorov. We show to what extent the Gaussian Multiplicative Chaos formalism is relevant for the proposed requirements. \\ Secondly, this work aims at developing a general framework for causal stochastic models based on the Gaussian Multiplicative Chaos. In particular, the novelty lies in the construction of a log-correlated stochastic process $X_t^\infty$. Introducing the inverse Laplace transform of kernel functions of fractional Brownian motions \cite{Mandelbrot1968}, it is possible to express such stochastic processes by mean of an infinite sum of Ornstein-Uhlenbeck processes. Such formulation is discussed and regularizations are proposed to ensure multifractal properties of the stochastic process $X_t^\infty$ in the inertial range. We eventually show that the newly introduced formulation encompasses most of the existing models. \\ Finally, we develop a numerical method for simulating this process, based on a quadrature of the infinite sum, i.e. on a finite sum of Ornstein-Uhlenbeck processes. This method is a discrete version of the process $X_t^\infty$ and has the benefit of being computationally affordable and versatile. This discretization can be seen as the selection of representative time-scales for the few Ornstein-Uhlenbeck processes all along the inertial range. The densification of these time-scales corresponds to the continuous model $X_t^\infty$: with an infinity of time-scales, each one assigned to a turbulent structure and thus offers a natural physical interpretation. \\ Let us underline that stochastic calculus plays a crucial role in introducing and analyzing this modeling process as well as the asymptotic and singular limits. The purpose and scope of the present paper is related to the physical relevance of the introduced concepts and their impact in terms of numerical simulations of intermittent turbulent flows. Since the mathematical foundations of the results we use are out of the scope of the paper, we refer to a companion paper \cite{Goudenege2021}, where we propose a synthesis of the mathematical key results and their justification in terms of stochastic calculus. \\ The paper is organized as follows: in section \ref{sec:Multifractal_intermittency} we discuss the origins and the properties of intermittent dissipation for turbulent flows and we provide a characterization of it. We also recall the Gaussian Multiplicative Chaos formalism. Section \ref{sec:Infinite_sum_OU} presents the procedure to express any fractional Brownian motion by an infinite sum of Ornstein-Uhlenbeck processes. Inspired by this formulation, we examine this new process and introduce necessary conditions to ensure its intermittency. We point out that this general formulation encompasses previous causal stochastic models. Then, in section~\ref{sec:Infinite_sum_OU}, the numerical procedure to simulate the proposed stochastic process is described and we discuss the benefits and the physical grounds of such modeling. \section{Properties of intermittency in turbulence and multifractal models} \label{sec:Multifractal_intermittency} \subsection{Origins and properties of the intermittency} \label{subsec:Characterization_Intermittency} In Ref.~\cite{Kolmogorov1941}, Kolmogorov first formalized the vision of Richardson cascade: “Big whirls have little whirls that feed on their velocity, and little whirls have lesser whirls and so on to viscosity" by introducing the “Similarity hypothesis". He stated that for high Reynolds numbers $\mathrm{Re}_L = \dfrac{\sigma_u L}{\nu}$, where $\sigma_u$ is the velocity standard deviation, $L$ the characteristic length-scale of fluid stirring, and $\nu$ the viscosity, turbulence is universal and velocity fluctuations statistics are expected to be independent of the large scales. Based on these two parameters, Kolmogorov scales can be introduced: $\eta \equiv \left( \nu^3 / \mean{\varepsilon} \right)^{1/4}$, $u_\eta \equiv \left( \mean{\varepsilon} \nu \right)^{1/4}$, $\tau_\eta \equiv \left( \nu / \mean{\varepsilon} \right)^{1/2}$. \\ The K41 states that in the inertial range, there is a complete similarity, and velocity increments statistics along Lagrangian trajectories are independent on viscosity and therefore only determined by the mean dissipation $\mean{\varepsilon}$ and the time scale $\tau$: \begin{equation} \mean{[\Delta_\tau u]^2} = C_0 \mean{\varepsilon} \tau, \quad \text{for } \tau_\eta \ll \tau \ll T_L \end{equation} where $\Delta_\tau u = u(t+\tau) - u(t)$ is the velocity increment along a fluid particle trajectory and $C_0$ the universal Lagrangian velocity structure function constant. The inertial range lies from the Kolmogorov time scale $\tau_\eta$ and the integral time scale $T_L = (1/\sigma_u^2) \int_0^\infty \mean{u(t)u(t+\tau)}\diff \tau$ which is the characteristic time of correlation of fluid particle velocity. Similar arguments with Eulerian velocity structure functions, defined with space increments, lead to the well-known theoretical “-5/3" power law of the spatial energy Spectrum.\\ The conservation of the rate of energy transfer in the inertial range, given by the Kolmogorov scaling $\mean{\varepsilon} \sim \dfrac{\sigma_u^2}{T_L} \sim \dfrac{\sigma_u^3}{L} \sim \dfrac{u_\eta^2}{\tau_\eta} $, allows us to obtain: \begin{equation} \dfrac{L}{\eta} \sim \mathrm{Re}_L^{3/4}, \quad \dfrac{T_L}{\tau_\eta} \sim \mathrm{Re}_L^{1/2} \end{equation} \begin{figure} \includegraphics[height=5cm]{FIG/Pseudo-dissipation_3_examples.eps} \caption{Temporal evolution of the pseudo-dissipation $\varphi$ along 3 particle trajectories from DNS of \cite{Toschi2009}.} \label{3_realization_epsilon} \end{figure} However, their is some inconsistency in this theory \cite{Landau1963,Monin1975,Yeung1989}: $C_0$ was found not to be universal but Reynolds-dependent. Furthermore this scaling could not be extended to higher order moments of the velocity increments because the instantaneous dissipation intermittently reaches very high values and so the global average of $\varepsilon$ is not the relevant scale. This is illustrated in Fig.~\ref{3_realization_epsilon} where the pseudo-dissipation along fluid particle paths $\varphi$, an analogous variable to $\varepsilon$ that we define later in Eq.~\ref{eq:varphi}, is plotted and exhibits brief and sudden high fluctuations. The long-range correlation of the dissipation indicates that the large scales of the flow influence the local dissipation rate thus raising the question of the universality of the flow \cite{Bos2019}. These remarks (raised in \cite{Landau1944}) led Kolmogorov and Obukhov to the refined similarity hypothesis with the consideration of a locally-averaged dissipation \cite{Kolmogorov1962}. The subscript $\tau$ represents the time-scale of the locally-averaged variable. \begin{equation} \varepsilon_\tau(t) = \frac{1}{\tau} \int_t^{t+\tau} \varepsilon(s) \mathrm{d}s \end{equation} The refined similarity hypothesis of K62 state that the statistics of velocity increments $\Delta_\tau u$ conditioned by local dissipation $\varepsilon_\tau$ is universal: \begin{equation} \mean{[\Delta_\tau u]^p| \varepsilon_\tau} = C_p \tau^{p/2} \varepsilon_\tau^{p/2} \end{equation} The unconditional statistics of the velocity increments therefore depend on the statistics of the locally-averaged dissipation: \begin{equation} \mean{[\Delta_\tau u]^p} = C_p \tau^{p/2} \mean{\varepsilon_\tau^{p/2}} \end{equation} Such velocity structure functions have been studied and characterized in \cite{Mordant2004,Xu2006,Biferale2008,Arneodo2008}. In K62, it was also suggested a log-normal distribution for $\varepsilon_\tau$, with a logarithm scaling for the variance of $\log \varepsilon_\tau$: \begin{equation} \sigma^2_{\log \varepsilon_\tau} \sim \log \dfrac{T_L}{\tau} \end{equation} This prediction is in reasonable agreement with experimental data \cite{Mordant2002} and was also obtained in \cite{Yaglom1966} with the discrete cascade model. These equations are not technically formulated in Kolmogorov's theory, which is instead expressed in a Eulerian framework by spatially averaging $\varepsilon$. However, considering a time average along the trajectory of particles is a natural extension of K62 theory for Lagrangian increments and this formalism have already been adopted before \cite{Sawford2015,Chevillard2012,Borgas1993}. \\ The PDF of the pseudo-dissipation is in better agreement with the log-normal distribution than the classical dissipation, as shown in \cite{Pope1990}. It is defined as: \begin{equation} \varphi(\mathbf{x},t) \equiv \nu \frac{\partial u_i}{\partial x_j} \frac{\partial u_i}{\partial x_j} \label{eq:varphi} \end{equation} For an isotropic flow, we have $\mean{\varphi} = \mean{\varepsilon}$. The Lagrangian variable is related to the Eulerian field by: $\varphi(t) = \varphi(\mathbf{x}_f(t),t)$, where $\mathbf{x}_f(t)$ denotes the position of a fluid particle at time $t$. Figure~\ref{PDF_chi_St0} compares the pdf of $\log \varphi$ obtained from the data of \cite{Toschi2009} with a normal distribution and we find good agreement. As suggested in K62 and measured in DNS by \cite{Yeung2006b}, we have $\sigma^2_{\log \varphi} = A + B \log \mathrm{Re}$. \begin{figure} \includegraphics[height=5cm]{FIG/pdf_logphi.eps} \caption{PDF of normalized $\log \varphi$ compared to Gaussian distribution at different times.} \label{PDF_chi_St0} \end{figure} The locally averaged dissipation (also called coarse-grained dissipation) can be defined by: \begin{equation} \varphi_\tau(t) =\frac{1}{\tau} \int_t^{t+\tau} \varphi(s) \diff s \end{equation} This is the Lagrangian equivalent for the dissipation averaged over a ball of size $\ell$ considered by \cite{Kolmogorov1962} in their refined similarity hypothesis. It is introduced in \cite{Borgas1993} to characterize multifractal scaling properties for flow with large Reynolds numbers. Numerous studies on data analysis of intermittency in turbulence reveal the multifractal nature of the pseudo-dissipaton. The seminal work of Frisch \cite{Frisch1995} to characterize intermittency based on Kolmogorov theories was followed among others by \cite{Chevillard2009,Chevillard2011, Chevillard2017a, Schmitt2001,Schmitt2003,Pereira2018}. Combining all the properties of intermittency mentioned in their work, we suggest the following list of criteria for the pseudo-dissipation to exhibit intermittency. \begin{tcolorbox} \begin{enumerate}[label=(\roman*)] \item \label{list:K41} Kolmogorov 1941 scaling: $\mean{\varphi} = \nu \tau_\eta^{-2}$ \item \label{list:lognormal } Kolmogorov 1962: $\varphi$ is log-normal with $\sigma^2_{\log \varphi} \sim \log \dfrac{T_L}{\tau_\eta}$ \item\label{list:K62_onepoint_scaling} Multiscaling of the one-point statistics: $\mean{\varphi^p} \sim \left( \dfrac{T_L}{\tau_\eta}\right)^{\xi(p)}$, where $\xi(p)$ is a non-linear function. \item \label{list:K62_twopoints_scaling} Power-law scaling for the coarse-grained dissipation, in the inertial range: for $\tau_\eta \ll \tau \ll T_L, \quad\mean{\varphi_\tau^p} \sim \left( \dfrac{T_L}{\tau} \right)^{\xi(p)}$ \end{enumerate} \end{tcolorbox} The last two points \ref{list:K62_onepoint_scaling} and \ref{list:K62_twopoints_scaling} are precisely the main characteristics of multifractal systems, which were considered for the modeling of the dissipation. \subsection{Modeling of the pseudo-dissipation} \label{subsec:Modeling_dissipation} \subsubsection{Multifractal models} \label{subsubsec:Multifractal_processes} In the Eulerian framework, discrete cascade models and later continuous random fields were developed. Yaglom proposed a model of multiplicative cascade where eddies can be seen as an ensemble of cells \cite{Yaglom1966}. The largest scale is represented by a unique cell of size $L$ and is then divided into smallest cells of size $\ell_1 = L/\lambda$ where $\lambda$ is the constant scale ratio of the cascade model. This process is repeated until the smallest scales are reached, with the subdivision $\ell_N = \eta = L/\lambda^N$. The energy is transferred from one cell generation to the next with a positive ratio given by a random variable $\alpha_{i}$ with $\mean{\alpha_i} = 1$ that are independent and identically distributed. We can define for each cell of size $\ell_n$ the energy dissipation rate through it: \begin{equation} \varphi_{\ell_n} = \alpha_{1}\alpha_{2}...\alpha_{n} \mean{\varphi} \label{eq:discrete_cascade} \end{equation} Following the independence of the random variables $\alpha_i$, it is straightforward to calculate the moments of any coarse-grained dissipation $\varphi_{\ell_n}$: \begin{equation} \begin{array}{ll} \mean{(\varphi_{\ell_n} )^p} &= \displaystyle \mean{\varphi}^p \prod_{i=1}^n \mean{(\alpha_i)^p} \\ &= \mean{\varphi}^p \mean{\alpha_i^p}^n \\ &= \mean{\varphi}^p \left( \dfrac{L}{\ell_n}\right)^{\xi(p)} \end{array} \end{equation} where we used $n = \log_\lambda (L/\ell_n)$ and $\xi(p) = \log_\lambda \mean{\alpha^p}$. Depending on the distribution of the $\alpha_i$, different forms of $\xi(p)$ are found (see Refs.~\cite{Frisch1978, Benzi1984, Meneveau1987}). Such construction ensures immediately \ref{list:K62_onepoint_scaling} and \ref{list:K62_twopoints_scaling}, and $\varphi = \varphi_{\eta} = \alpha_{1}\alpha_{2}...\alpha_{N} \mean{\varphi}$ is log-normal according to the Central Limit Theorem, assuming it applies.\\ Two main criticisms of these models are made in Ref.~\cite{Mandelbrot1968}. The first concerns the absence of spatio-temporal structure in these Eulerian representations of the dissipation fields which lacks causality, a necessary ingredient. Equivalent Lagrangian models were then proposed, following the formalism of Lagrangian intermittency developed in \cite{Borgas1993}. The model of \cite{Biferale1998} is defined via a multiplicative process of independent stationary random processes with given correlation times. Properties \ref{list:K62_onepoint_scaling} and \ref{list:K62_twopoints_scaling} can here again only be verified for a finite number of scales depending on the constant scale ratio of the model $\lambda$.\\ This brings us to the second critic raised in Ref.~\cite{Mandelbrot1968} who suggested to consider continuous cascade models such as Gaussian Multiplicative Chaos \cite{Kahane1985, Robert2010} for which no arbitrary scale is chosen. Stochastic integrals can be interpreted as an infinite sum, with continuous values of scales. Taking the exponential of stochastic integrals gives a “continuous product" instead of the discrete one defined in Eq.~\ref{eq:discrete_cascade}. Several models \cite{Schmitt2001, Muzy2002, Chevillard2017a, Pereira2018} are based on this formalism which allows to combine the continuous vision of a cascade and a causal structure of the process. Specific properties of the stochastic integrals must be defined to ensure intermittency of the dissipation and we present them in the following section. \subsubsection{Gaussian Multiplicative Chaos} \label{subsubsec:GMC} This section therefore reviews the Gaussian Multiplicative Chaos (GMC) formalism, introduced by Kahane \cite{Kahane1985} which allows to build a process for the pseudo-dissipation $\varphi(t)$ and we show that it is in in agreement with the criteria of intermittency defined in section~\ref{subsec:Characterization_Intermittency}. The GMC involves the following form for the pseudo-dissipation: \begin{equation} \varphi (t) = \mean{\varphi} \exp(\chi_t) \end{equation} where $\chi_t$ is a Gaussian process of variance $\sigma_\chi^2$. Its mean ${\mu_\chi = -\frac{1}{2}\sigma_\chi^2}$ is determined with the constraint that $\mean{\exp (\chi_t) } = 1$. We can parameterize this process by a zero-average Gaussian process $X_t$ and the intermittency coefficient $\mu^\ell$: \begin{equation} \chi_t = \sqrt{\mu^\ell} X_t - \dfrac{\mu^\ell}{2} \sigma_X^2 \label{eq:normalization_chi} \end{equation} where $\mu^\ell$ is given by $\mu^\ell = \sigma_\chi^2/ \sigma_X^2$ and the process $X_t$ is constructed to be approximately log-correlated: \begin{equation} \mean{X_t X_s} \approx \log_+ \dfrac{1}{|t-s|} + g(t,s) \label{eq:log_autocorr} \end{equation} where $g$ is a bounded function and ${ \log_+(u) = \max(\log u,0)}$. The covariance kernel thus possesses a singularity and a standard approach consists in regularizing the distribution $X_t$ by applying a “cut-off", based on a small parameter $\tau_\eta$ such that, in the limit of $\tau_\eta \rightarrow 0$, $\varphi(t)$ is a GMC in a well-posed abstract framework. Further details and proof of convergence are derived in the complementary paper \cite{Goudenege2021} which rigorously formalizes the construction of such a process as a limit of $\tau_\eta$-regularized processes.\\ Let us show how the GMC is adapted to meet the intermittency criteria we have defined. \\ The mean value $\mean{\varphi}$ is chosen accordingly with requirement \ref{list:K41} and the formalism of this model (i.e. exponential of a Gaussian variable) naturally ensures the log-normality of $\varphi$. Based on this formalism, it is possible to derive the moments of the dissipation and the coarse-grained dissipation from the log-normal moments. Calculations are detailed in appendix~\ref{sec:Moments_dissipation_calculations}. We obtain Eq.~\ref{eq:varphi_moments} for the moments of the dissipation: \begin{equation*} \mean{\varphi^p} = \mean{\varphi}^p \exp \left(\mu^\ell p(p-1) \dfrac{\sigma_X^2}{2} \right) \end{equation*} We can show that prescribing $\sigma_X^2 \sim \log \dfrac{T_L}{\tau_\eta}$, which corresponds to the last part of requirement~\ref{list:lognormal }, readily ensures requirement~\ref{list:K62_onepoint_scaling}: \begin{equation} \begin{array}{ll} \mean{\varphi^p} &\sim \mean{\varphi}^p \exp \left( \frac{\mu^\ell}{2}p(p-1) \log \dfrac{T_L}{\tau_\eta} \right) \\ &\sim \left( \dfrac{T_L}{\tau_\eta} \right)^{\xi(p)} \end{array} \label{eq:moments_dissipation} \end{equation} with the non-linear scaling power law $\xi(p) = \frac{\mu^\ell}{2}p(p-1) $.\\ This scaling is consistent with the large-scale dependency (related to the Reynolds number) of the pseudo-dissipation. \\ Finally, the multifractal property of the coarse-grained dissipation \ref{list:K62_twopoints_scaling} is ensured by the log-correlated auto-correlation of $X_t$. Indeed, prescribing $\mean{X_t X_{t+\tau}} \sim \log \dfrac{T_L}{\tau}$ gives in Eq.~\ref{eq:varphi_tau_moments}: \begin{equation} \begin{array}{ll} \mean{\varphi_\tau^p} &= \mean{\varphi}^p \displaystyle \int_{[0,1]^p} \exp \left( \mu^\ell \sum\limits_{i<j} \mean{X_{\tau s_i} X_{\tau s_j}} \right) \prod\limits_{i=1}^p \diff s_i \\ \dfrac{\mean{\varphi_\tau^p} }{ \mean{\varphi}^p }&= \displaystyle \int_{[0,1]^p} \exp \Big( \mu^\ell \sum\limits_{i<j} \log \frac{T_L}{\tau (s_j - s_i)} \Big) \prod\limits_{k=1}^p \diff s_k \\ &= \displaystyle \int_{[0,1]^p} \exp \Big( \mu^\ell \frac{p(p-1)}{2}\log \frac{T_L}{\tau} - \mu^\ell\sum\limits_{i<j}^p \log (s_j - s_i) \Big) \prod\limits_{k=1}^p \diff s_k \\ &= \left( \dfrac{T_L}{\tau} \right)^{\xi(p)} \displaystyle \int_{[0,1]^p} \prod\limits_{i<j}^p \dfrac{1}{(s_j - s_i)^{\mu^\ell}} \prod\limits_{k=1}^p \diff s_k \end{array} \label{eq:moments_coarse-grained_dissipation} \end{equation} Taking the limit $\mathrm{Re}\rightarrow \infty$, the moments of $\varphi$ diverge in Eq.~\ref{eq:moments_dissipation} because $\varphi$ is correlated over the large energy containing scales, whereas at a given scale $\tau$, moments of $\varphi_\tau$ converge in Eq.~\ref{eq:moments_coarse-grained_dissipation}, fulfilling the statistical properties required by the K62 phenomenology. It becomes independent of the Reynolds number and behaves as power law at small scales. \begin{figure} \includegraphics[height=5cm]{FIG/autocorrelation_X_Toschi.eps} \caption{Auto-correlation of $X_t^{T}$ full blue line compared with expected logarithmic behavior in black dotted line. } \label{auto-correlation_X_Toschi} \end{figure} \subsubsection{Illustration from DNS data} \label{subsubsec:Illustration} We illustrate this logarithmic behavior of the auto-correlation on DNS realizations obtained by \cite{Toschi2009}. Their simulations were run at $\tau_\eta = 0.02$. The integral Lagrangian time is found to be $T_L = 0.64$ which gives, according to Ref.~\cite{Zhang2019a}, $\mathrm{Re}_\lambda = (T_L/\tau_\eta)/0.08 = 400$. For each fluid particle, the process $\chi_t$ is obtained by taking the logarithm of the pseudo-dissipation along the particle trajectory. $X_t^T$ is retrieved with the normalization of Eq.~\ref{eq:normalization_chi}, ignoring the multiplicative factor $\mu^\ell$ and we plot in Fig.~\ref{auto-correlation_X_Toschi} its auto-correlation. One can easily verified by comparison with the logarithmic behavior in dotted line that the auto-correlation follows a logarithmic behavior in the inertial range, i.e. between the $\tau_\eta$ and $T_L$ of the simulation. \\ \subsubsection{Conclusion} A characterization of the intermittency has been proposed in section~\ref{subsec:Characterization_Intermittency} and we have checked that the proposed criteria are verified by a GMC modeling for the pseudo-dissipation. The remaining question to be addressed concerns the construction of the stochastic process $X_t$. Its variance must scale as the logarithm of the Reynolds number and its auto-correlation must be logarithmic in the inertial range. In the following, we summarize how such processes have been constructed in the literature. \subsection{Design of the $X_t$ process} \label{subsec:Long-range_correlation} Pope originally suggested to represent $\varphi$ as a log-normally correlated process by mean of Ornstein-Uhlenbeck process \cite{Pope1990}. The stochastic equation they proposed for $\chi(t) = \log \left( \varphi(t)/\langle \varphi \rangle \right) $ is the following: \begin{equation} \diff \chi_t = -\left( \chi_t + \frac{1}{2}\sigma_\chi^2 \right) \frac{\diff t}{T_\chi}+ \left( 2 \frac{\sigma_\chi^2 }{T_\chi} \right)^{1/2} \diff W_t \label{eq:PopeOU} \end{equation} where $W_t$ is a Wiener process, $T_\chi$ is the integral time scale of $\chi$, extracted from DNS and found to be close to the Lagrangian Integral time scale $T_L$. The parameter $\sigma_\chi^2$ is Reynolds number dependent and is also chosen accordingly to DNS data. The corresponding stochastic process $X_t^{OU}$ in this case is driven by: \begin{equation} \diff X_t^{OU} = - X_t^{OU} \frac{\diff t}{T_\chi} + \left( 2 \frac{\sigma_X^2 }{T_\chi} \right)^{1/2} \diff W_t \end{equation} The auto-correlation of this process is well-know and has an exponential decay in the form $\mean{X_t X_{t+\tau}} \sim \mathrm{e}^{-t/T_\chi}$. It is plotted in blue in Fig.~\ref{auto-correlation_X_All} and compared to the logarithmic behavior in the inertial range $[\tau_\eta, T_L] = [10^{-3}, 10^0]$. As expected, the exponential decay does not reproduce a long-range correlation. As a matter of fact, Pereira et al. showed in \cite{Pereira2018} that this model do not present the required multifractality for the coarse-grained process $\varphi_\tau(t)$. \\ \begin{figure} \includegraphics[height=5cm]{FIG/autocorrelation_X_All.eps} \caption{Comparison of auto-correlation of processes of (a) Pope \cite{Pope1990} $X_t^{OU}$, (b) Schmitt \cite{Schmitt2003} $X_t^S$ and (c) Pereira \cite{Pereira2018} $X_t^P$ with logarithmic behavior. Processes are rescaled for comparable variance of $\log({T_L}/{\tau_\eta})$} \label{auto-correlation_X_All} \end{figure} Inspired by the stochastic process of Chevillard \cite{Chevillard2017a}, they proposed to replace the Ornstein-Uhlenbeck process by a fractional Ornstein-Uhlenbeck process, which consists in replacing the Gaussian Noise $ \diff W_t$ in the Langevin equation by a fractional Gaussian noise $\diff W^H_t$. Appropriate formalism for fractional Brownian motion (hereafter denoted fBm) was proposed in \cite{Mandelbrot1968}. They defined the fBm of exponent $H$ as a “moving average of $\diff W_t$, in which past increments of $W_t$, a Brownian motion, are weighted by the kernel $(t-s)^{H-1/2}$”. $H \in(0,1)$ is called the Hurst parameter and defines the roughness of the path. Standard Brownian motion corresponds to $H=1/2$ and is noted $W^{1/2}(t) = W_t$. A classic expression for the Holmgren-Riemann-Liouville fractional Brownian motion is the following one: \begin{equation} W^H(t) = \dfrac{1}{\Gamma(H+1/2)} \displaystyle \int_0^t (t-s)^{H-1/2} \diff W_s \label{eq:fBM} \end{equation} The particular case of Hurst parameter $H=0$ has a logarithmic auto-correlation \cite{Chevillard2017a} but as mentioned in section~\ref{subsubsec:GMC}, it is not well-defined because of the singularity of its auto-correlation in $0$. Mandelbrot \cite{Mandelbrot1968} proposed a regularization of this fBm: \begin{equation} W^0_{\tau_\eta}(t) = \dfrac{1}{\sqrt{\pi}} \displaystyle \int_0^t (t-s+\tau_\eta)^{-1/2} \diff W_s \label{eq:regularized_fBM} \end{equation} The calculation of its covariance gives, for any $t \geq s \geq 0$, \begin{equation} \begin{array}{ll} \mean{W^0_{\tau}(t) W^0_{\tau}(s) } &= \displaystyle \int_{0}^{s } (t-u+\tau)^{-\frac{1}{2}} \, (s-u+\tau)^{-\frac{1}{2}}\, du \\ &= \displaystyle \int_{\tau}^{s+\tau} \frac{1}{\sqrt{u}\, \sqrt{t-s+u}}\, du \\ &= \displaystyle \left[ 2 \log \left(\sqrt{u} + \sqrt{u+t-s} \right) \right]_{\tau}^{s+\tau} \\ &=\displaystyle 2\log\left(\frac{\sqrt{s+\tau}+\sqrt{t+\tau}}{\sqrt{\tau}+\sqrt{\tau+|t-s|}}\right) \end{array} \end{equation} It is shown in \cite{Goudenege2021} that the family of processes $\{ W^0_{\tau}(t) \}_{\tau>0}$ converges weakly in law to a Gaussian log-correlated process $W^0(t)$ with covariance expressed in Eq.~\ref{eq:log_autocorr}.\\ In his work, Schmitt \cite{Schmitt2001,Schmitt2003} developed the following causal stochastic process, inspired by this regularized process \begin{equation} X_t^S = \int_{t+\tau_\eta - T_L}^t (t-s+\tau_\eta)^{-1/2}\diff W_s \label{eq:Schmitt} \end{equation} and showed its multifractal properties (scaling laws of the random process, of the coarse-grained process, logarithmic correlation of the logarithm of the procces etc.). Pereira \cite{Pereira2018}, also used the increments of the regularized process in a fractional Ornstein-Uhlenbeck process to ensure stationarity of the process: \begin{equation} \diff X_t^P=-\frac{1}{T_L} X_t^P \diff t+ \diff W^0_{\tau_\eta} (t) \label{eq:Pereira} \end{equation} Figure~\ref{auto-correlation_X_All} compares the three processes described above with the logarithmic prediction of the auto-correlation in the inertial range ($[\tau_\eta , T_L] = [10^{-3}, 10^0]$). Both processes based on the fBm display long-range power-law correlation, as opposed to the Ornstein-Uhlenbeck process of Pope \cite{Pope1990}. \\ Subsequently, we will propose a new stochastic model for $X_t$, also inspired by a regularized fBm. Beyond a purely mathematical construction of such a process, we would also like to introduce a natural physical interpretation before showing that it also allows a handy and efficient numerical implementation. \section{Infinite sum of correlated Ornstein-Uhlenbeck processes} \label{sec:Infinite_sum_OU} We have seen that fBm present interesting auto-correlation properties with long-range behavior. The objective of this section is to propose a formalism different from that of Eq.~\ref{eq:fBM}, which does not involve a moving average because its simulation would require large memory. The expression we derive in the following, however, relies on a combination of Ornstein-Uhlenbeck processes which are markovian processes. This representation also makes it possible to make calculations (of moments and auto-correlation) easily, and to generate them by very simple calculation algorithms. \subsection{Approximation of fractional Brownian motion} \label{subsec:Approximation_fBM} The fractional Brownian motion as defined in Eq.~\ref{eq:fBM} is a moving average and can be written in the following form: \begin{equation} B_t = \int_{0}^t K(t-s) \diff W_s \end{equation} Inspired by conventional techniques on Linear Time Invariant systems, we introduce the “spectral" representation of the kernel $K$. This transformation is also proposed in Ref~\cite{Carmona1998,Harms2020}. \begin{equation} K(u) = \int_0^\infty e^{-ux} k(x) \diff x \end{equation} where $k$ is the inverse Laplace transform of $K$. If $K$ satisfies certain measurability properties, stochastic Fubini theorem allows us to exchange the two integrals after replacing the kernel by its spectral representation. \begin{equation} \begin{array}{ll} B_t &= \displaystyle\int_{0}^t K(t-s) \diff W_s \\ &= \displaystyle\int_{0}^t \left( \int_0^\infty e^{-x (t-s)} k(x) \diff x \right) \diff W_s \\ &= \displaystyle \int_0^\infty \left( \int_{0}^t e^{-x (t-s)} \diff W_s \right) k(x) \diff x \\ &= \displaystyle \int_0^\infty \tilde{Y}_t^x k(x) \diff x \end{array} \label{eq:Infinite_sum_OU} \end{equation} where $\tilde{Y}_t^x = \int_{0}^t e^{-x (t-s)} \diff W_s $ is a standardized Ornstein-Uhlenbeck process of parameter $x$ and initial value ${\tilde{Y}^x_0 = 0}$, solution of the stochastic differential equation: \begin{equation} \diff \tilde{Y}_t^x = -x \tilde{Y}_t^x\diff t + \diff W_t \label{eq:dYtx} \end{equation} Let us insist on the fact that all the Ornstein-Uhlenbeck processes appearing in the integrand are driven by the same Wiener increments $\diff W_t$ and are thus correlated to each other. Figure~\ref{Ytx_vs_time_shifted} shows $5$ correlated processes $Y_t^x$ with time-scales ranging from $\tau_\eta = 0.02$ to $T_L = 0.64$. The process $B_t$ is therefore a linear combination of standard Ornstein-Uhlenbeck processes, weighted by the kernel $k$.\\ \begin{figure} \includegraphics[height=6cm]{FIG/Ytx_vs_time_shifted.eps} \caption{5 correlated Ornstein-Uhlenbeck processes, driven by the same Wiener increments. Plots are shifted up for a better visualization and the color shades are darker with increasing characteristic times $x^{-1}$.} \label{Ytx_vs_time_shifted} \end{figure} We apply this technique to the fBm of Hurst parameter $H \in (0,1)$ as defined in Eq.~\ref{eq:fBM}. The corresponding kernel is $K(t) = \Gamma \left( H+ 1/2 \right)^{-1} t^{H-1/2}$ and its inverse Laplace transform is $k(x) = \Gamma \left( H+1/2 \right)^{-1} \Gamma \left( -H-1/2 \right)^{-1} x^{-H-1/2}$. The fBm can finally be written: \begin{equation} W^H(t) = \dfrac{1}{\Gamma \left( H+1/2 \right) \Gamma \left( -H-1/2 \right) } \int_{0}^\infty \tilde{Y}_t^x x^{-H-1/2} \diff x \label{eq:fBM_OU} \end{equation} And introducing the increments of the Ornstein-Uhlenbeck processes defined in Eq.~\ref{eq:dYtx}, we readily obtain: \begin{equation} \diff W^H(t) \propto \int_{0}^\infty \diff \tilde{Y}_t^x x^{-H-1/2} \diff x \label{eq:increments_fBM_OU} \end{equation} We have shown that the fBm can be expressed as an infinite sum of correlated Ornstein-Uhlenbeck processes, weighted by $k$, the inverse Laplace transform of the initial kernel function $K$ in the moving average of Eq.~\ref{eq:fBM}. This formulation has the advantage that no convolution product appears, and therefore the simulation of such a process does not require long-term memory. Inspired from this formalism, we propose a new process for $X_t$. \subsection{A new stochastic process with appropriate regularizations} \label{subsec:Regularization} As shown in section~\ref{subsec:Long-range_correlation}, fBm have been successfully used to reproduce multifractal properties and we therefore use the expression derived in Eq.~\ref{eq:Infinite_sum_OU} to suggest the following stochastic model for $X_t$: \begin{equation} X_t = \displaystyle \int_0^\infty Y^x_t k(x) \diff x \label{eq:New_Xt} \end{equation} where $Y_t^x$ is an Ornstein-Uhlenbeck process of parameter $x$ and $k(x)$ has to be determined. We now give the constraints on such model to ensure the stationarity, the finite variance and the logarithmic auto-correlation of $X_t$.\\ \textbf{Stationarity}: A sufficient condition of stationarity for $X_t$ is to impose stationarity for all the Ornstein-Uhlenbeck processes $Y_t^x$. \begin{equation} Y_t^x = \displaystyle \int_{-\infty}^t \mathrm{e}^{-x(t-s)} \diff W_s \end{equation} \textbf{Logarithmic auto-correlation}: The auto-correlation of this process is: \begin{equation} \begin{array}{ll} \mean{X_t X_{t+\tau}} &= \displaystyle \int_0^\infty \int_0^\infty \mean{Y^x_t Y^y_{t+\tau}} k(x) k(y) \diff x \diff y \\ &= \displaystyle \int_0^\infty \int_0^\infty \dfrac{\mathrm{e}^{-\tau y}}{x+y} k(x) k(y) \diff x \diff y \end{array} \label{eq:auto-correlation_X} \end{equation} Where the term $\mean{Y^x_t Y^y_{t+\tau}}$ is developped in appendix~\ref{sec:N_points_correlation_OU}. \\ We have seen that a fBm of Hurst $H=0$ has a logarithmic auto-correlation, at least approximately i.e., apart from the singularity. Based on the inverse Laplace transformation of the kernel $K(t) \sim t^{-1/2}$, we propose $k(x) \sim x^{-1/2}$. However, this kernel possesses a singularity at $0$ and we need to introduce regularizations to ensure a finite variance. \\ \textbf{Finite variance}: $X_t$ is zero-averaged and its auto-correlation function only depends on the delay $\tau$ because of stationarity. The variance of the process can be expressed as: \begin{equation} \displaystyle \int_0^\infty \int_0^\infty \dfrac{k(x) k(y)}{x+y} \diff x \diff y < \infty \label{eq:finite_var} \end{equation} To satisfy and combine these three requirements, we propose to regularize the kernel $k$ in the following way. One can see on the auto-correlation of Eq.~\ref{eq:auto-correlation_X} that any contribution of the function $k(y)$ for $y \gg 1/\tau$ will vanish because of the term $\mathrm{e}^{-\tau y}$. Therefore, we introduce $\tau_\eta$ and we can assume $k(x) \sim x^{-1/2}$ only for $x \ll \tau_\eta^{-1} $, which is now compliant with the integrability on $\mathbb{R}^+$. From a physical point of view, this regularization can be thought as a viscous cut-off.\\ A second regularization step is needed to ensure a finite variance of the process $X_t$, which corresponds to the need to introduce a large scale. More precisely, the second requirement \ref{list:K62_onepoint_scaling} specifies $\mean{X_t^2} \sim \log \frac{T_L}{\tau_\eta}$. It implies the integrability of $(x,y) \rightarrow \frac{k(x)k(y)}{x+y}$ on $(\mathbb{R^+})^2$ and the logarithmic behavior in the inertial range is ensured by the requirement of $k(x) \sim x^{-1/2}$ for $T_L^{-1} \ll x \ll \tau_\eta^{-1}$. \\ In light of these regularizations, we propose a new model for the process $X_t^\infty$. Note that we use the superscript “$\infty$" because it highlights the use of an infinite sum of Ornstein-Uhlenbeck processes. \begin{equation} X_t^\infty = \displaystyle \int_0^\infty Y^x_t \dfrac{1}{\sqrt{x}} \left( g_{T_L}(x) - g_{\tau_\eta}(x) \right) \diff x \label{eq:New_Xt_regularized} \end{equation} where $g$ is such that the integral defined by the auto-correlation in Eq.~\ref{eq:finite_var} converges. A sufficient condition would be: \begin{equation} g_\alpha(x) \rightarrow \left\lbrace \begin{array}{ll} 0 & \text{if } x \ll 1/\alpha \\ 1 & \text{if } x \gg 1/\alpha \end{array} \right. \end{equation} The calculations of the auto-correlation is given in appendix~\ref{sec:Calculations_Xt} where we show that $\mean{(X_t^\infty)^2} \sim \log \dfrac{T_L}{\tau_\eta}$ and $\mean{X_t^\infty X^\infty_{t+\tau}} \sim \log \dfrac{T_L}{\tau}$. \\ Examples of possible regularizations of the kernel $k(x) \sim x^{-1/2}$ are shown in Fig.~\ref{Regularizations_hx}: Cutting functions are $g_\alpha(x) = 1-\mathrm{e}^{-\alpha x}$ or $g_\alpha(x) = H(x-1/\alpha)$ where $H$ is the heaviside function. \begin{figure} \includegraphics[height=5cm]{FIG/Regularizations_hx.eps} \caption{Possible regularizations} \label{Regularizations_hx} \end{figure} The following section presents other type of regularizations in the spectral representation that can lead to existing processes. \subsection{A framework encompassing existing processes} \label{subsec:Framework_encompassing_processes} In this section, we show that previous stochastic processes can be obtained from Eq.~\ref{eq:New_Xt} with appropriate regularizations. The regularized fBm introduced in Ref.~\cite{Mandelbrot1968} in Eq.~\ref{eq:regularized_fBM} can be expressed as an infinite sum of Ornstein-Uhlenbeck processes, introducing the inverse Laplace transorm and applying the Fubini's theorem (as it is done in section~\ref{subsec:Approximation_fBM}). The inverse Laplace transform of $K(t) =\pi^{-1/2} (t+\tau_\eta)$ is $k_{\tau_\eta}(x) =\pi^{-1} \mathrm{e}^{-\tau_\eta x} x^{-1/2}$. We obtain: \begin{equation} W^0_{\tau_\eta}(t) = \dfrac{1}{\sqrt{\pi}} \displaystyle \int_{0}^t (t-s+\tau_\eta)^{-1/2} \diff W_s = \dfrac{1}{\pi} \displaystyle \int_{0}^\infty \tilde{Y}_t^x k_{\tau_\eta}(x)\diff x \end{equation} This exponential cutting function $\mathrm{e}^{-\tau_\eta x}$ allows the process to be well-defined, as opposed to the fBm of Hurst $0$. \\ This process is now well-defined, and with logarithmic auto-correlation, inherited from the behavior of the kernel $\sim x^{-1/2}$. However, it is not stationary and no large scales have been introduced: its variance is $\log \frac{t+\tau_\eta}{\tau_\eta}$. This is why Pereira \cite{Pereira2018} and Schmitt \cite{Schmitt2003} introduced another regularization on the process. \\ \begin{table*} \begin{ruledtabular} \begin{tabular}{ccc} Process & Definition &Spectral representation \\ \hline fBm: $ W^0_{{\tau_\eta}}(t)$ & $\displaystyle \dfrac{1}{\sqrt{\pi}} \int_0^t (t-s+{\tau_\eta})^{-1/2} \diff W_s$ & $\displaystyle \dfrac{1}{\pi} \int_0^\infty Y_t^x \dfrac{\textcolor{red}{\mathrm{e}^{-\tau_\eta x}}}{ \textcolor{olive}{\sqrt{x}}} \diff x$ \\ Schmitt: $X_t^S $ & $ \displaystyle \int_{t+\tau_\eta - T_L}^t (t-s+\tau_\eta)^{-1/2}\diff W_s$ & $\displaystyle \int_0^\infty \textcolor{blue}{\left( \int_{t+\tau_\eta \textcolor{red}{- T_L}}^t\mathrm{e}^{-(t-s)x} \diff W_s \right)} \dfrac{\textcolor{red}{\mathrm{e}^{-\tau_\eta x}}}{ \textcolor{olive}{\sqrt{x}}} \diff x$ \\ Pereira: $X_t^P$ & $\displaystyle \int_{-\infty}^t \mathrm{e}^{-(t-s)/T_L} \diff W^0_{\tau_\eta} (t) $ & $\displaystyle \int_{0}^\infty \textcolor{blue}{\left( \int_{-\infty}^t \textcolor{red}{\mathrm{e}^{-(t-s)/T_L}} \diff Y_s^x \right)} \dfrac{\textcolor{red}{\mathrm{e}^{-\tau_\eta x}}}{ \textcolor{olive}{\sqrt{x}}}\diff x$ \\ Pope: $X_t^{OU} $ & $ \displaystyle \int_{-\infty}^t \omega \mathrm{e}^{-(t-s)/T_\chi} \diff W_s $ & $\displaystyle \int_0^\infty \textcolor{blue}{Y_t^{x}} \omega \textcolor{red}{\delta(x-T_\chi^{-1})} \diff x$ \\ $ X_t^{\infty} $ & $\displaystyle \int_{-\infty}^t \left( t-s+\tau_\eta \right)^{-1/2} - \left( t-s+T_L \right)^{-1/2} \diff W_s$ & $ \displaystyle \int_0^\infty \textcolor{blue}{Y_t^{x}} \dfrac{\left( \textcolor{red}{g_{T_L}(x)} - \textcolor{red}{g_{\tau_\eta}(x)} \right)}{\textcolor{olive}{\sqrt{x}}} \diff x $ \\ \end{tabular} \end{ruledtabular} \caption{\label{table:summarize_regularization}Regularizations applied on the spectral representation of different processes. The logarithmic behavior of the auto-correlation of the process comes from the kernel behavior $x^{-1/2}$ in brown, its stationarity comes from the blue term and the red terms ensures the finite variance. } \end{table*} Let us examine the process defined by Schmitt \cite{Schmitt2003} and apply once again the same procedure than in section~\ref{subsec:Approximation_fBM}. For clarity, we omit the scaling factor $\pi^{-1/2}$. \begin{equation} \begin{array}{ll} X_t^S &= \displaystyle \int_{t+\tau_\eta - T_L}^t (t-s+\tau_\eta)^{-1/2}\diff W_s \\ &= \displaystyle \int_{t+\tau_\eta - T_L}^t \left( \int_0^\infty \mathrm{e}^{-(t-s)x} k_{\tau_\eta}(x) \diff x \right) \diff W_s \\ &= \displaystyle \int_0^\infty \left( \int_{t+\tau_\eta - T_L}^t\mathrm{e}^{-(t-s)x} \diff W_s \right) k_{\tau_\eta}(x) \diff x \end{array} \end{equation} To ensure finiteness of the variance, the Ornstein-Uhlenbeck processes must have a finite memory. In this case, the integral is truncated and the regularization consists in replacing the Ornstein-Uhlenbeck $Y_t^x$ of Eq.~\ref{eq:New_Xt}, by $\int_{t-T_L+\tau_\eta}^t e^{-x (t-s)} \diff W_s$. \\ The process of Pereira \cite{Pereira2018} is based on the increments of the regularized fBm: First, it is interesting to show that we can easily retrieve Chevillard's expressio of increments when applying the technique to the infinitesimal increment of $W^0_{\tau_\eta}$ \cite{Chevillard2017a}: \begin{equation} \begin{array}{ll} \diff W^0_{\tau_\eta} &= \displaystyle \int_{0}^\infty \diff \tilde{Y}_t^x k_{\tau_\eta}(x)\diff x \\ &= \displaystyle \int_{0}^\infty (-x \tilde{Y}_t^x \diff t + \diff W_t) k_{\tau_\eta}(x)\diff x \\ &= \displaystyle \int_{0}^\infty -x k_{\tau_\eta}(x) \int_{0}^t \mathrm{e}^{-(t-s)x} \diff W_s \diff x \diff t + \displaystyle \int_{0}^\infty k_{\tau_\eta}(x) \diff x \diff W_t \\ \end{array} \end{equation} Using the Laplace transform for the first integral, we have: $\mathcal{L} \left( x k_{\tau_\eta}(x) \right) = \mathcal{L} \left( \sqrt{x} \mathrm{e}^{-\tau_\eta x} \right) = \Gamma \left( {3}/{2}\right) t^{-3/2}$. And the second integral is $\int_{0}^\infty k_{\tau_\eta}(x) \diff x = \tau_\eta^{-1/2}$. This yields: \begin{equation} \begin{array}{ll} \diff W^0_{\tau_\eta} &= \displaystyle \int_{0}^t \dfrac{-1}{2} (t-s+\tau_\eta)^{-3/2} \diff W_s \diff t + \tau_\eta^{-1/2} \diff W_t \\ &= \tilde{\beta}_{\tau_\eta}(t) \diff t + \tau_\eta^{-1/2}\diff W_t \end{array} \end{equation} where $ \tilde{\beta}_{\tau_\eta}(t) = \dfrac{-1}{2} \displaystyle \int_{0}^t (t-s+\tau_\eta)^{-3/2} \diff W_s $. In \cite{Pereira2018} they rather use the stationary version of this increment with $\beta_{\tau_\eta}(t) = \dfrac{-1}{2} \displaystyle \int_{-\infty}^t (t-s+\tau_\eta)^{-3/2} \diff W_s$ and based on that increment, they regularize the process with: \begin{equation} \begin{array}{ll} X_t^P &= \displaystyle \int_{-\infty}^t \mathrm{e}^{-(t-s)/T_L} \diff W^0_{\tau_\eta}(s) \\ &= \displaystyle \int_{-\infty}^t \mathrm{e}^{-(t-s)/T_L} \int_{0}^\infty \diff Y_s^x k_{\tau_\eta}(x) \diff x \\ &= \displaystyle \int_{0}^\infty \left( \int_{-\infty}^t \mathrm{e}^{-(t-s)/T_L} \diff Y_s^x \right) k_{\tau_\eta}(x) \diff x \end{array} \end{equation} Therefore, the regularization for stationarity consists in replacing the Ornstein-Uhlenbeck $Y_t^x$ of Eq.~\ref{eq:New_Xt}, by $\int_{-\infty}^t \mathrm{e}^{-(t-s)/T_L} \diff Y_s^x$. \\ Finally, we can see that taking a Dirac function for $k(x)$ corresponds to Pope's process \cite{Pope1990}: \begin{equation} X_t^{OU} = \displaystyle \int_{-\infty}^t \omega \mathrm{e}^{-(t-s)/T_\chi} \diff W_s = \int_0^\infty Y_t^{x} \omega \delta(x-T_\chi^{-1}) \diff x \end{equation} where $\omega = \left( 2 \frac{\sigma_\chi^2 }{T_\chi} \right)^{1/2} $ is the scaling factor in front of the Gaussian Noise in Eq.~\ref{eq:PopeOU}. This kernel representation does not exhibit a behavior in $x^{-1/2}$, and we already know that the single Ornstein-Uhlenbeck process is not log-correlated. \\ Table~\ref{table:summarize_regularization} summarizes the different regularizations for all these processes. It shows that the general formalism of Eq.~\ref{eq:New_Xt} is a framework that encompasses existing processes depending on the three criteria for the regularization. If the general formalism proposed in Eq.~\ref{eq:New_Xt} gives the possibility to represent and simulate these processes using Ornstein-Uhlenbeck processes, one can see that their simulation is not equivalent. Processes of Schmitt \cite{Schmitt2003} and Pereira \cite{Pereira2018} require to keep in memory the history of the process since at each instant $t$, the set of realizations of $W_s$ and $Y_s^x$ respectively, for $s$ in the intervals $[t+\tau_\eta-T_L, t]$ and $]-\infty,t]$ respectively should be involved in the computation (it is actually truncated for the numerical simulation). It is not the case for the one we propose in Eq.~\ref{eq:New_Xt_regularized} and we develop in the following section a numerical approach to implement such process with no long-term memory. \FloatBarrier \section{Finite sum of correlated Ornstein-Uhlenbeck processes} \label{sec:Finite_sum_OU} \subsection{Quadrature} \label{subsec:quadrature} Following the idea of \cite{Harms2020}, with an appropriate quadrature, the integral can be replaced by a system of finite number of Ornstein-Uhlenbeck processes. We call $X_t^\infty$ the process defined with the infinite sum and $X_t^N$ the one obtained with $N$ points of quadrature. \begin{equation} X_t ^\infty \equiv \displaystyle \int_0^\infty Y^x_t \dfrac{1}{\sqrt{x}} \left( g_{T_L}(x) - g_{\tau_\eta}(x) \right) \diff x \approx X_t^N \equiv \sum_{i=1}^N \omega_i Y^{x_i}_t \end{equation} Because of the regularizing functions $g_{T_L} - g_{\tau_\eta}$ , it is useless to compute quadrature points far outside the inertial range $[T_L^{-1};\tau_\eta^{-1}]$. For simplicity, we use in the following examples Heaviside functions for $g$. Considering the logarithmic shape of the kernel, we propose a geometric partition of this domain, along with a middle-Riemann sum for the weights: \begin{equation} \text{for} \quad i=1,...,N_{x_i} \left\lbrace \begin{array}{ll} x_i &= \dfrac{1}{T_L} \left( \dfrac{T_L}{\tau_\eta}\right)^{\frac{i-1/2}{N_{x_i}}} \\ \omega_i &= \dfrac{1}{\sqrt{x_i}} \Delta x_i \end{array} \right. \label{eq:Quadrature} \end{equation} Where $\Delta x_i = \dfrac{1}{T_L} \left( \dfrac{T_L}{\tau_\eta}\right)^{\frac{i}{N_{x_i}}} - \dfrac{1}{T_L} \left( \dfrac{T_L}{\tau_\eta}\right)^{\frac{i-1}{N_{x_i}}} $. Figure~\ref{Quadrature_hx} shows the kernel approximation with $N=10$ points of quadrature. The kernel $x^{-1/2}$ is approached by step functions all along the inertial range. The weights can be normalized to match the variance of the analytic process $\mean{(X_t^\infty)^2}$. The normalizing factor $R$ is given by: \begin{equation} R = \dfrac{\sigma_{X_t^\infty}}{\sigma_{X_t^N}} = \sqrt{\mean{(X_t^\infty)^2}} \left( \displaystyle \sum_{i=1}^N \dfrac{\omega_i \omega_j}{x_i + x_j} \right)^{-1/2} \end{equation} \begin{figure} \includegraphics[height=5cm]{FIG/Quadrature_hx.eps} \caption{\label{Quadrature_hx} The kernel behavior $k(x) \sim x^{-1/2}$ in dotted line is regularized with Heaviside cutting functions in red and compared to its quadrature representation in yellow.} \end{figure} \begin{figure} \includegraphics[height=5cm]{FIG/Comparison_Nxi_5decades.eps} \caption{\label{Comparison_Nxi_5decades} Comparison of the auto-correlations of the analytical process and the discrete one for a finite number of modes. The inertial range covers $5$ decades. All the processes are normalized by a unit variance. } \end{figure} Figure~\ref{Comparison_Nxi_5decades} shows the auto-correlation of the process $X_t^\infty$ compared with the discrete one $X_t^N$. As demonstrated in appendix~\ref{sec:Calculations_Xt}, it is clear that the infinite sum has indeed a logarithmic auto-correlation, it follows the dotted line all along the inertial range. A one point quadrature, corresponding to a single Ornstein-Uhlenbeck process is plotted in green in the figure. As discussed above, this specific process corresponds to $X_t^1 = X_t^{OU}$ and does not have a long-range correlation all along the inertial range. With two points of quadrature, the auto-correlation, in blue, displays two bumps, around the two time-scales of the Ornstein-Uhlenbeck processes. The auto-correlation range has been extended but it is not yet clear that it follows a logarithmic behavior. With more quadrature points, the auto-correlation of $X_t^N$ is getting closer to the analytical one. \\ This convergence of the auto-correlation can be explicit introducing the relative difference between the analytical auto-correlation $\rho^\infty(\tau)$ and the one obtained from the quadrature $\rho^N(\tau)$: \begin{equation} \begin{array}{ll} \rho^\infty(\tau) &\equiv \displaystyle \int_{T_L^{-1}}^{\tau_\eta^{-1}} \int_{T_L^{-1}}^{\tau_\eta^{-1}} f(\tau,x,y) \diff x \diff y \\ \rho^N(\tau) &\equiv \displaystyle \sum_{i=1}^N \sum_{j=1}^N f(\tau,x_i,x_j) \Delta x_i \Delta x_j \end{array} \end{equation} where $f(\tau,x,y) = \dfrac{\mathrm{e}^{-\tau y}}{(x+y) \sqrt{xy}}$. The numerical convergence is verified in Fig.~\ref{Relative_error_quadrature} with the error defined as: \begin{equation} \mathrm{Error} = \displaystyle \sqrt{\int_{\tau_\eta}^{T_L} \left( \dfrac{\rho^\infty(\tau) - \rho^N(\tau)}{\rho^\infty(\tau)}\right)^2 \diff \tau } \end{equation} The order of convergence is $2$. The value of the error is shifted when increasing the inertial range. With one Ornstein-Uhlenbeck per decade, the relative error is below $10\%$. We can therefore postulate that an acceptable number of processes would be one or two per decade. Figure \ref{Quadrature_1OU_per_decade} illustrates this choice, with different inertial ranges. The number of points for the discrete process is chosen accordingly and we verify the logarithmic behavior of such processes all along the inertial range. For instance, with an inertial range covering 20 decades (purple line in Fig.~\ref{Quadrature_1OU_per_decade}), that corresponds to $\mathrm{Re}_\lambda \sim 10^{11}$, only 20 Ornstein-Uhlenbeck processes are needed to approach a logarithmic behavior of the auto-correlation all along the inertial range. \begin{figure} \includegraphics[height=5cm]{FIG/Relative_error_quadrature.eps} \caption{\label{Relative_error_quadrature} Numerical convergence of the auto-correlation of $X_t^{N_{x_i}}$ towards the expected correlation of $X_t^\infty$.} \end{figure} \begin{figure} \includegraphics[height=5cm]{FIG/Quadrature_1OU_per_decade.eps} \caption{\label{Quadrature_1OU_per_decade} Auto-correlation of $X_t$ for different inertial ranges. The number of points chosen in the quadrature corresponds to the number of decades covered by the inertial range.} \end{figure} \subsection{Discussion} \label{subsec:Discussion} A new log-correlated process $X_t^\infty$ and its discrete version with $N$ Ornstein-Uhlenbeck processes $X_t^N$ have been presented. In this section, we will discuss their physical interpretation and their advantage over existing processes. \subsubsection{Physical interpretation} $X_t^N$ can be seen as an extension of Pope's process \cite{Pope1990}. We recall that the latter corresponds to $N=1$ with quadrature points taken as \begin{equation} x_1 = \dfrac{1}{T_\chi}, \quad \text{ and } \omega_1 = \sqrt{\dfrac{2 \sigma_\chi^2}{\mu^\ell T_\chi}} \end{equation} \cite{Pope1990} observed that $T_\chi$ scales with the integral time scale $T_L$ and $\sigma_\chi$ scales with logarithm of Reynolds number. By comparison with our proposition of quadrature, we would suggest to use: $T_\chi = \sqrt{T_L \tau_\eta}$, and $\sigma_\chi$ is indeed scaling as $\sigma_\chi \sim \log \frac{T_L}{\tau_\eta}$ to ensure requirement \ref{list:K62_onepoint_scaling}. \\ For Reynolds number $\mathrm{Re}_\lambda \sim \frac{T_L}{0.08 \tau_\eta} \lessapprox 125$, we have seen that a single Ornstein-Uhlenbeck is enough to cover the entire inertial range and the exponential decay mimics the logarithmic behavior in such small interval. However, for larger Reynolds number, it is necessary to extend the long-range of the auto-correlation by adding other Ornstein-Uhlenbeck processes, evenly distributed all along the inertial range. A perfect logarithmic scaling is retrieved with an infinity of Ornstein-Uhlenbeck processes. \\ This new process also makes a very simple link between “continuous" processes with no time scale (or here, an infinity), corresponding to $X_t^\infty $ and “discrete” cascade models $X_t^N$, where arbitrary time-scales are chosen to each represent a turbulent structure. A turbulent cascade is often represented as a product of independent processes defined at each scale, each one presenting a characteristic time scale. The approximation of $X_t^\infty$ by $X_t^N$ exactly consists in selecting representative time-scales, and the coherence of the whole cascade is ensured by the fact that every Ornstein-Uhlenbeck process is correlated to each other because driven by the exact same Gaussian Noise. \subsubsection{Implementation} Unlike the models of \cite{Schmitt2003, Pereira2018}, the process has no 'self-memory'. It is the combination of several Ornstein-Uhlenbeck processes, with adapted characteristic time-scales that can mimic this long-range correlation. The closer are the characteristic times of the Ornstein-Uhlenbeck processes, the better is the logarithmic approximation (quadrature with a large number of points) but we show that one time scale per decade is already enough to retrieve the approximate long-range behavior. This considerably reduce the computational cost of the simulation of such process. Simulating Ornstein-Uhlenbeck processes is very common, rapid and does not require to keep a memory of the history of the path, as opposed to the convolution form used in Refs.~\cite{Schmitt2003, Pereira2018}. \subsubsection{A causal multifractal process for pseudo-dissipation} An analytical stochastic equation can be derived for the pseudo-dissipation, which is the variable of interest used in Lagrangian stochastic models. First, we can retrieve an analogous formulation for the incremenents of $X_t^\infty$, introducing the $\beta$ function already used in \cite{Pereira2018}. \begin{equation} \begin{array}{ll} \diff X_t^\infty &= \displaystyle \int_0^\infty \diff Y_t^x \dfrac{\mathrm{e^{-x\tau_\eta}-e^{-x T_L}}}{\sqrt{x}} \diff x \\ &= \displaystyle\int_0^\infty (-x Y_t^x \diff t + \diff W_t) \dfrac{\mathrm{e^{-x\tau_\eta}-e^{-x T_L}}}{\sqrt{x}} \diff x \\ &= \displaystyle \dfrac{-1}{2} \int_{-\infty}^t \Big( (t-s+\tau_\eta)^{-3/2} - (t-s+T_L)^{-3/2} \Big) \diff W_s \diff t \left(\dfrac{1}{\sqrt{\tau_\eta}} - \dfrac{1}{\sqrt{T_L}}\right) \diff W_t \\ &= \left( \beta_{\tau_\eta}(t) - \beta_{T_L}(t)\right) \diff t + \left(\dfrac{1}{\sqrt{\tau_\eta}} - \dfrac{1}{\sqrt{T_L}}\right) \diff W_t \end{array} \end{equation} We recall that the Lagrangian multiplicative chaos, which is causal and stationary, is readily obtained while exponentiating the Gaussian process $X_t^\infty$: ${\varphi = \mean{\varphi} \exp \left( \sqrt{\mu^\ell} X_t^\infty - \dfrac{\mu^\ell \sigma_X^2}{2}\right)}$. Application of Ito’s lemma gives the Lagrangian stochastic dynamics of the pseudo-dissipation, namely: \begin{equation} \begin{array}{l} \dfrac{\diff \varphi }{\varphi} = \Big[ \sqrt{\mu^\ell} \left(\beta_{\tau_\eta}(t) - \beta_{T_L}(t)\right) + \dfrac{\mu^\ell}{2}\left(\dfrac{1}{\sqrt{\tau_\eta}} - \dfrac{1}{\sqrt{T_L}}\right)^2 \Big] \diff t \\ \hspace*{1cm} + \sqrt{\mu^\ell} \left(\dfrac{1}{\sqrt{\tau_\eta}} - \dfrac{1}{\sqrt{T_L}}\right) \diff W_t \end{array} \label{eq:sto_pseudo-dissipation} \end{equation} Of course, the implementation of this stochastic equation preferentially uses the expression of $\beta$ in the Laplace domain and we recall that the same Wiener process is used in the $N$ Ornstein-Uhlenbeck processes $Y_t^{x_i}$ but also in $\diff W_t$ in Eq.~\ref{eq:sto_pseudo-dissipation}. Numerically, we replace the $\beta$-functions by its quadrature: \begin{equation} \begin{array}{ll} \beta_{\tau_\eta}(t) - \beta_{T_L}(t) &= \displaystyle \int_0^\infty -x Y_t^x \dfrac{g_{T_L}(x) - g_{\tau_\eta}(x)}{\sqrt{x}} \diff x \\ & \displaystyle \approx \sum_{i=1}^N -x_i \omega_i Y_t^{x_i} \end{array} \end{equation} \section{Conclusion} \label{sec:Conclusion} Intermittency in turbulence can be characterized by multifractal properties of the dissipation. A Gaussian Multiplicative Chaos formalism allows us to model such dissipation process, but relies on the introduction of a zero-average Gaussian and log-correlated process, $X_t$. In the literature, such processes were defined based on a regularized fBm ; they lack physical interpretation and can be computationally expensive in simulations.\\ In this contribution, we have introduced another way to build such processes, with a general form (Eq.~\ref{eq:New_Xt}) that requires regularizations. We have shown that specific regularizations yield existing processes, and we propose a new one, which has the benefits of relying on an infinite combination of Ornstein-Uhlenbeck processes. Characteristic time-scales of those Ornstein-Uhlenbeck are covering the inertial range, between Kolmogorov time-scale and the Integral time-scale. Each of them represents a specific turbulence structure, this corresponds to a continuous cascade model where no arbitrary time-scale is needed. \\ We have presented only essential ingredients of stochastic calculus for the purpose of presenting the new framework form a physical perspective but the details of the mathematical foundations can be found in a companion paper \cite{Goudenege2021}. A discrete version of this process is proposed, based on a selection of few specific modes, corresponding to representative characteristic time-scales. The quadrature of the infinite sum is therefore a finite sum of Ornstein-Uhlenbeck processes, logarithmically distributed in the inertial range. This corresponds to a discrete cascade model. \\ Beside the simplicity of simulation, this model has the benefit to be very adaptable and can be envisioned to be useful for future perspectives: dissipation along trajectory of solid inertial particles is not logarithmic anymore but the model can actually fit any auto-correlation function. \\ Thanks to the versatility of the process, application to LES can also be considered, with different regularizing functions, where the cut-off could be based on the subgrid time-scale for instance. \section*{Acknowledgements} This work was supported by grants from Region Ile-de-France DIM MATHINNOV. Support from the French Agence Nationale de la Recherche in the MIMETYC project (grant ANR-17-CE22-0003) is also acknowledged.
\section{Introduction} \subfile{1introduction} \section{Context Modeling: A Unified Perspective } \subfile{3general_study} \section{ContextPose} \subfile{4ContextPose} \section{Experiments} \subfile{5experiments} \section{Conclusion} \subfile{6conclusion} \section*{Acknowledgement} \subfile{7ack} {\small \bibliographystyle{ieee_fullname} \subsection{Overview} Figure \ref{fig:overview} shows how ContextPose is leveraged by the state-of-the-art method \cite{Iskakov_2019_ICCV} for $3$D pose estimation. Given an input image, it first estimates $2$D features by a $2$D network (CNN). Then it inversely projects them to the $3$D voxels using camera parameters and uses a $3$D network to estimate $3$D heatmaps representing the likelihood of each voxel having each body joint. ContextPose can be inserted into the $3$D network to fuse features from different joints at different locations. Specifically, \emph{it updates the features of a joint at a voxel by a linear combination of the features of its contextual joints at all voxels}. The weights in linear combination are determined by their spatial relation (pairwise attention) and appearance (global attention) of the contextual joints. The bottom section of Figure \ref{fig:overview} shows more details of how we compute global attention and pairwise attention with the knee joint as an example. In summary, we make three contributions: \begin{itemize} \item [1)] We develop a general formula for context modeling methods in $3$D human pose estimation which allows us to clearly understand their pros and cons. We also empirically compare them in a rigorous way. \item [2)] We propose \emph{ContextPose} on top of the general formula which combines the advantages of PSM and GNN. In particular, it allows leveraging limb length constraints and can be leveraged by $3$D pose estimation networks for end-to-end training. \item [3)] We demonstrate the state-of-the-art performance on two benchmark datasets. More importantly, ContextPose shows better generalization results on out-of-distribution data. The code and models will be released in order to inspire more research in this direction. \end{itemize} \subsection{Notations} As shown in Figure \ref{fig:general_formula}, we represent human body by a graph $\mathcal{G} = (\mathcal{J}, \mathcal{E})$ where $\mathcal{J} = \{J_{0}, J_{1}, \dotsb, J_{N-1}\}$ represents $N$ body joints. The set $\mathcal{E}$ represents edges that connect pairs of joints. We define the joints that are connected by edges to be \textbf{contextual joints} of each other. The goal of monocular $3$D pose estimation is to estimate the $3$D locations of the joints from a single image. \subsection{Reformulate PSM} PSM is commonly used in multiview $3$D pose estimation \cite{PavlakosZDD17,qiu2019cross}. It first divides the $3$D space by regular voxels $\Omega$ with each having a discrete location $\bm{q} \in \mathcal{R}^{3}$. The goal of PSM is to assign each joint to one of the voxels by minimizing an energy function defined on all joints. When the human graph is acyclic, PSM can be optimized by dynamic programming in which messages are sequentially passed from child nodes. In particular, the likelihood of a sub-tree with root joint $J_u$ at voxel $\bm{q}$ is computed as \begin{equation} \begin{small} \label{eq:psm} \begin{aligned} y_{u,\bm{q}} = x_{u,\bm{q}} \cdot \prod_{J_v \in \text{child}(J_u)} (\max_{\bm{k} \in \Omega} \{ \psi(\bm{q},\bm{k}, \bm{e}_{u,v}) \cdot y_{v,\bm{k}} \}), \end{aligned} \end{small} \end{equation} where $\text{child}(J_u)$ denotes the children of $J_u$ and $x_{u,\bm{q}}$ is the confidence of $J_u$ at $\bm{q}$ determined by appearance. The formula can be interpreted by three steps: (1) for each non-leaf node $J_u$, it first collects features from each of its children $J_v$ by $\psi(\bm{q},\bm{k}, \bm{e}_{u,v}) \cdot y_{v,\bm{k}}$ where $y_{v,\bm{k}}$ represents $J_v$'s likelihood of being at $\bm{k} \in \mathcal{R}^{3}$ which in turn is determined by its own children. The pairwise term $\psi(\bm{q},\bm{k}, \bm{e}_{u,v})$ encodes the limb length constraint measuring whether the distance between $\bm{q}$ and $\bm{k}$ satisfies the limb length prior in $\bm{e}_{u,v}$. The maximum score over all voxel locations $\Omega$ represents the message passed from joint $J_v$ to $J_u$. This step collects such information from all of its children; (2) then the context features collected from its children are aggregated by $\prod$; (3) finally, it updates $y_{u,\bm{q}}$ by multiplying the aggregated context with the confidence $x_{u,\bm{q}}$. \subsection{Reformulate GNN} Ci \etal \cite{Ci_2019_ICCV} present a formula which unifies FCN \cite{martinez2017simple}, GNN \cite{zhao2019semantic}, and LCN \cite{Ci_2019_ICCV}. We further reformulate it such that it has a similar form as PSM \begin{equation} \label{eq:lcn} \begin{aligned} \bm{y}_u = f(\bm{x}_u, \sum_{J_v \in \mathcal{J}} (\bm{e}_{u,v} \cdot \bm{W}_{u, v} \bm{x}_v)), \end{aligned} \end{equation} where $\bm{x}_u \in \mathcal{R}^{M_{input}}$ represents the features of $J_u$ obtained from the previous layer or input, and $\bm{y}_u \in \mathcal{R}^{M_{output}}$ denotes the updated features of $J_u$. It is important to note that these methods do not discretize the $3$D space but directly estimate continuous locations. So we do not compute features for each discrete location $\bm{q}$ as in Eq. (\ref{eq:psm}). The binary scalar $\bm{e}_{u,v}$ encodes the pairwise relation between joint $J_u$ and $J_v$, and is set to be one if $J_v$ is a contextual joint of $J_u$. $\bm{W}_{u, v} \in \mathcal{R}^{M_{output} \times M_{input}}$ is a learnable weight matrix. We can also interpret the formula by three steps in a similar way as PSM. It first collects features by $\bm{e}_{u,v} \cdot \bm{W}_{u, v} \bm{x}_v$ from its contextual joints, then aggregates them using the sum operator $\sum$ and finally uses multilayer perceptron (MLP) $f$ to update the joint of interest. The difference between FCN, GNN and LCN lies in how to compute $\bm{e}_{u,v}$ and $\bm{W}_{u, v}$. \emph{FCN} \cite{martinez2017simple} does not use human graph when collecting features. Instead, $\bm{e}_{u,v}$ is set to be one for every joint pair $(J_u, J_v)$. In contrast, in \emph{GNN} \cite{zhao2019semantic} and \emph{LCN} \cite{Ci_2019_ICCV}, $\bm{e}_{u,v}$ is set with special consideration. Generally, $\bm{e}_{u,v}$ is non-zero only when the two joints are connected according to the human graph. In other words, they only collect features from contextual joints. So their main difference lies in the collection step. Please refer to \cite{Ci_2019_ICCV} for more details. \subsection{General Formula} We introduce a general context modeling formula, which updates features $\bm{y}_{u}$ of joint $J_u$ by \begin{equation} \label{eq:general_formulaion} \begin{aligned} \bm{y}_{u} = f(\bm{x}_{u}, \: \text{AGG}(\{\: \phi(\bm{x}_{v}, \bm{e}_{u, v}) \: | \: \forall (J_u, J_v) \in \mathcal{E} \})\:), \end{aligned} \end{equation} where $\bm{x}_u$ denotes the features of joint $J_u$ before updating, and $\bm{e}_{u, v}$ encodes the spatial relation prior (\eg limb length) between $J_u$ and $J_v$. There are three steps in the formula as will be detailed in the following. \paragraph{1. Collection} For each joint of interest, it collects features from its contextual joints as represented by $\phi(\cdot, \cdot)$ in the formula. This is the most complex step in context modeling which determines where and how to collect features from the graph nodes. \vspace{-0.5em} \paragraph{2. Aggregation} This is denoted by $\text{AGG}(\cdot)$ in the formula. It is a permutation invariant function, \eg sum or product function, defined on a set of contextual features. It aims to aggregate the collected features. \vspace{-0.5em} \paragraph{3. Update} This is denoted by $f(\cdot,\cdot)$ in the formula. It updates the feature of a joint by transforming its own as well as the aggregated features. \vspace{0.5em} It is straightforward to verify that both PSM and GNN can be interpreted by the formula. The advantage of PSM is that it can explicitly enforce limb length constraints while GNN can learn implicit priors from a large amount of data. In the following, we present an approach to combine their advantages on top of the general formula. \subsection{Architecture Overview} \label{sec:arch_overview} We adopt the state-of-the-art $3$D pose estimator \cite{Iskakov_2019_ICCV} as our baseline. As shown in Figure \ref{fig:overview}, it first constructs a $3$D feature volume by inversely projecting image features to the $3$D space using camera parameters. Then the feature volume is fed to an encoder-decoder network to estimate $3$D heatmaps. In particular, it predicts $N$ scores for each voxel representing the likelihood of $N$ joints. Finally, we compute expectation over the $3$D heatmaps of each joint to obtain its $3$D location \cite{sun2018integral}. ContextPose is inserted between the encoder and decoder network. \subsection{ContextPose} \label{sec:detail_ContextPose} Denote the input tensor of ContextPose as $\bm{V}^{input}_{cont} \in \mathcal{R}^{NM \times D \times H \times W}$ which represents the features of $N$ joints at $D \times H \times W$ voxels. We split $\bm{V}^{input}_{cont}$ into $N$ groups along the channel dimension such that each group corresponds to the features of one joint. Inspired by the attention mechanism \cite{vaswani2017attention}, ContextPose updates the features of a joint $J_u$ at voxel $\bm{q}$ by a linear combination of the features of its contextual joints at all voxels \begin{equation} \begin{small} \label{eq:contextpose_general} \begin{aligned} \bm{y}_{u,\bm{q}} = \bm{x}_{u,\bm{q}} + \sum_{J_v \in \mathcal{J}}[\sum_{\bm{k} \in \Omega}( G_v(\bm{x}_{v,\bm{k}}) \cdot P(\bm{q},\bm{k}, \bm{e}_{u,v}) \cdot \bm{W}_{u, v} \bm{x}_{v,\bm{k}})], \end{aligned} \end{small} \end{equation} where $\Omega$ denotes the set of voxels, $\bm{x}_{v,\bm{k}} \in \mathcal{R}^{M}$ denotes the features of joint $J_v$ at voxel $\bm{k}$. The global attention $G_v(\bm{x}_{v,\bm{k}})$ and pairwise attention $P(\bm{q},\bm{k}, \bm{e}_{u,v})$ determines the weight in linear combination. $\bm{W}_{u, v} \in \mathcal{R}^{M \times M} $ is a learnable matrix to transform features. \\ \noindent\textbf{Global Attention (GA)} We estimate a confidence score for each joint $J_v$ at a voxel $\bm{k}$ representing to what extent should this feature contribute to other joints. Intuitively, we expect a lower score for non-person voxels in order to reduce the risk of corrupting good features. In other words, we expect large scores for voxels that are likely to include joint $J_v$. As a result, joint $J_u$ can focus on features from high likelihood voxels of joint $J_v$ (see Figure \ref{fig:overview} \textbf{(a)} and \textbf{(b)}). The GA for joint $J_v$ is defined as \begin{equation} \begin{aligned} G_v(\bm{x}_{v,\bm{k}}) \propto \emph{exp}(\bm{d}^{T}_{v}\bm{x}_{v,\bm{k}}), \end{aligned} \label{eq:global} \end{equation} which is normalized such that $\sum_{\bm{k} \in \Omega} G_v(\bm{x}_{v,\bm{k}}) = 1$. $\bm{d}_{v} \in \mathcal{R}^{M}$ is a learnable vector. \\ \noindent\textbf{Pairwise Attention (PA)} PA explores spatial relation between a pair of joints. The general idea is to give larger weights to features passed from locations of a joint that satisfy the pre-defined spatial relation. In this work, we focus on limb length constraints. But this can be extended to other priors such as limb orientations. If joint $J_v$ is connected to $J_u$ by a rigid bone, then their distance in the $3$D space is fixed for the same person which is independent of human postures. Offline, we compute the average distance $\mu_{u,v}$ and the standard deviation $\sigma_{u,v}$ in the training set as the limb length distribution prior and let $\bm{e}_{u,v} = (\mu_{u,v}, \sigma_{u, v})$ as the limb pre-defined parameters. The pairwise attention for the joint pair is defined as \begin{equation} \begin{aligned} P(\bm{q},\bm{k}, \bm{e}_{u,v}) \propto \emph{exp}(- \frac{ (||\bm{q}-\bm{k}||_2-\mu_{u,v})^2}{2\alpha\sigma_{u,v}^2 + \epsilon}). \end{aligned} \label{eq:pairwise} \end{equation} The pairwise attention is normalized over all voxels such that $\sum_{\bm{k} \in \Omega} G_v(\bm{x}_{v,\bm{k}}) \cdot P(\bm{q},\bm{k}, \bm{e}_{u,v}) = 1$. The hyper-parameter $\alpha$ is used to adjust the tolerance to limb length errors, which is empirically set to be $1500$ in this work. The parameter $\epsilon$ is used to improve numerical robustness. See Figure \ref{fig:overview} {{\textbf{(c)}-\textbf{(f)}}}. Besides, if joint $J_v$ is not connected to $J_u$ by a rigid bone, the features from joint $J_v$ may also be helpful to $J_u$. For example, left hand may also help the detection of right hand. In this case, we simply set the pairwise term to be $P(\bm{q},\bm{k}, \bm{e}_{u,v})=1$ and completely rely on the global attention to determine the weights. \subsection{Regression of 3D Human Pose} \label{sec:losses} The decoder network transforms the output of ContextPose $\bm{V}^{output}_{cont} \in \mathcal{R}^{NM \times D \times H \times W}$ to $3$D heatmaps $\bm{V}^{output} \in \mathcal{R}^{N \times D\textprime \times H\textprime \times W\textprime}$ of $N$ body joints which represents the likelihood of each joint at each location. Then the $3$D location $\bm{J}_u$ for joint $J_u$ is obtained by computing the expectation of $\bm{V}^{output}_u \in \mathcal{R}^{D\textprime \times H\textprime \times W\textprime}$ with the common integral technique \cite{sun2018integral} according to the following formula \begin{equation} \label{eq:loss} \begin{aligned} \bm{J}_u = \sum_{x=1}^{D\textprime}\sum_{y=1}^{H\textprime}\sum_{z=1}^{W\textprime}(x, y, z) \cdot \bm{V}_{u}^{output}(x, y, z). \end{aligned} \end{equation} \subsection{Training} The parameters in ContextPose are jointly learned with the $2$D CNN and the encoder-decoder network by enforcing two losses: \begin{equation} \label{eq:loss} \begin{aligned} \mathcal{L} = \mathcal{L}_{3D} + \lambda \mathcal{L}_{GA}, \end{aligned} \end{equation} in which $\mathcal{L}_{3D}$ and $\mathcal{L}_{GA}$ are the loss functions enforced on the $3$D joint locations and global attention maps, respectively. Same as \cite{Iskakov_2019_ICCV}, we compute the $L_1$ loss between the ground-truth $3$D pose $\bm{J}^{gt}$ and the estimated $3$D pose $\bm{J}$ with a weak heatmap regularizer which promotes Gaussian shape distribution for the estimated $3$D heatmaps as \begin{equation} \label{eq:3D loss} \begin{aligned} \mathcal{L}_{3D} = \frac{1}{N} \sum_{J_u \in \mathcal{J}} (||\bm{J}_{u} - \bm{J}_{u}^{gt}||_1 - \beta \cdot log(\bm{V}_{u}^{output}(\bm{J}_{u}^{gt}))). \end{aligned} \end{equation} In addition, to help the GA focus on the voxels that are likely to have joint $J_u$, we enforce an $L_2$ loss: \begin{equation} \label{eq:GA loss} \begin{aligned} \mathcal{L}_{GA} = \frac{1}{NDHW} \sum_{J_u \in \mathcal{J}} ||\bm{G}_u - \bm{G}_u^{gt}||^2_2, \end{aligned} \end{equation} where $\bm{G}_u \in \mathcal{R}^{D \times H \times W}$ is the GA map for joint $J_u$ and $\bm{G}_u^{gt} \in \mathcal{R}^{D \times H \times W}$ is the ground-truth heatmap generated by applying a $3$D Gaussian centered at the ground truth location of the joint $J_u$. In our experiment, we set $\beta$ and $\lambda$ to be $10^{-2}$ and $10^6$. \subsection{Comparison of PSM, GNN and ContextPose} \label{sec:comparison} It is easy to verify that PSM, GNN, and ContextPose are all special cases of the general formula Eq. (\ref{eq:general_formulaion}). The main difference between them lies in the \emph{collection} step which includes the structures of human graph $\mathcal{G}$, pairwise relation $\bm{e}_{u,v}$, the collection function $\phi(\cdot, \cdot)$, and training scheme. We will compare them side by side from the above aspects hoping to clearly understand their advantages and disadvantages. \\ \noindent\textbf{Graph Structures} PSM often uses acyclic graphs in order to get optimum solution. In contrast, ContextPose is not subject to this restriction. Cyclic graph offers greater flexibility to represent more powerful and natural context. For example, in ContextPose, we can add connections between left and right shoulders to the human graph and require that they cannot be at the same location which helps solve the ``double counting'' problem. We can even add connections between joints in neighboring frames to promote smoothness in future work. GNN can also use cyclic graphs but it cannot explicitly express and enforce natural rules on the joints. It is not clear what kind of pairwise relation does GNN learns from data which makes it a black box. \\ \noindent\textbf{Pairwise Relation} In PSM, the pairwise relation is often implemented as limb length constraints. As discussed in Eq. (\ref{eq:psm}), it encourages detections of a pair of joints that satisfy the limb length prior. In GNN, the pairwise term reflects the similarity between the features of two nodes. Although the features also encode some location information, it is hardly possible that GNN will implicitly learn limb length constraints. ContextPose does not enforce hard limb length constraints as PSM. But it encourages pose estimates to have reasonable limb length by focusing on features that are passed between locations that satisfy limb length constraints. \\ \noindent\textbf{End-to-End Learning} PSM requires solving a discrete optimization problem in order to obtain optimal locations for all joints. In particular, it uses the argmax operator to identify optimal voxels for each joint which makes the approach non-differentiable. In contrast, the GNN-based methods can be trained end-to-end because all operators in the collection, aggregation and update functions are differentiable. ContextPose can also be trained end-to-end which combines the advantages of PSM and GNN. \\ \noindent\textbf{Quantization Error} The PSM-based methods and ContextPose both work on discrete voxels. So their accuracy depends on the size of each voxel. Using a smaller voxel decreases quantization error but meanwhile increases computation time. In \cite{Iskakov_2019_ICCV}, the authors propose to compute expectation over the heatmaps to obtain continuous $3$D locations which notably decreases the impact of quantization. \subsection{Datasets} \noindent\textbf{Human3.6M (H36M)\cite{h36m_pami}} Following \cite{Ci_2019_ICCV}, we use the subjects S$1$, S$5$, S$6$, S$7$, and S$8$ for training, and S$9$, S$11$ for testing. The Mean Per Joint Position Error (MPJPE) metric is computed under two protocols: Protocol \#1 computes MPJPE between the ground-truth (GT) and the estimated $3$D poses after aligning their root (mid-hip) joints; Protocol \#2 reports MPJPE after the $3$D estimate is aligned with the GT via a rigid transformation. Additionally, we present two new metrics to comprehensively measure the quality of the $3$D pose estimates: (1) Mean Per Limb Length Error (MPLLE) computes the average limb length error between the GT and estimated poses over $16$ limbs (\ie the purple edges in Figure \ref{fig:general_formula}), and (2) Mean Per Limb Angle Error (MPLAE) measures the average limb angle error between the GT and the estimated poses.\\ \noindent\textbf{MPI-INF-3DHP (3DHP) \cite{mehta2017monocular}} This dataset provides monocular videos of six subjects acting in three different scenes which include green screen indoor scenes, indoor scenes and outdoor scenes. This dataset is often used to evaluate the generalization performance of different models. Following the convention, we directly apply our model trained on the H36M dataset to this dataset without re-training. We report results using two metrics: Percentage of Correctly estimated Keypoints (PCK) \cite{andriluka14cvpr} and Area Under the Curve (AUC) \cite{mehta2017monocular}. \subsection{Implementation Details} \label{sec:implementation} We use the state-of-the-art $3$D pose estimator \cite{Iskakov_2019_ICCV} as our baseline to estimate $3$D poses. We insert ContextPose between the encoder and decoder networks as shown in Figure \ref{fig:overview}. To reduce GPU memory cost, we decrease the number of layers in the $3$D network from five to two. The modification slightly improves the results of the baseline. For the ContextPose network, $M$ is set to be $3$. We jointly train the $2$D and $3$D networks for $30$ epochs with the Adam \cite{kingma2015adam} optimizer. The learning rates are set to be $0.0001$ and $0.001$ for the $2$D and $3$D networks, respectively. To prevent from over-fitting to the human appearance in the H36M dataset, we fix the $2$D network and train the $3$D network for $20$ epochs before end-to-end training. \begin{table*}[] \center \small \setlength{\tabcolsep}{2pt} \resizebox{6.7in}{!}{ \begin{tabular}{l c c c c c c c c c c c c c c c c} \thickhline \textbf{Protocol \#1} & Dire. & Disc. & Eat & Greet & Phone & Photo & Pose & Purch. & Sit & SitD & Smoke & Wait & WalkD & Walk & WalkT & Avg \\ \hline Zhou \etal \cite{zhou2017towards} ICCV'17 & 54.8 & 60.7 & 58.2 & 71.4 & 62.0 & 65.5 & 53.8 & 55.6 & 75.2 & 111.6 & 64.2 & 66.1 & 51.4 & 63.2 & 55.3 & 64.9 \\ Martinez \etal (\textbf{FCN}) \cite{martinez2017simple} ICCV'17 & 51.8 & 56.2 & 58.1 & 59.0 & 69.5 & 78.4 & 55.2 & 58.1 & 74.0 & 94.6 & 62.3 & 59.1 & 65.1 & 49.5 & 52.4 & 62.9 \\ Pavlakos \etal \cite{pavlakos2018ordinal} CVPR'18 & 48.5 & 54.4 & 54.4 & 52.0 & 59.4 & 65.3 & 49.9 & 52.9 & 65.8 & 71.1 & 56.6 & 52.9 & 60.9 & 44.7 & 47.8 & 56.2 \\ Yang \etal \cite{Yang_2018_CVPR} CVPR'18 & 51.5 & 58.9 & 50.4 & 57.0 & 62.1 & 65.4 & 49.8 & 52.7 & 69.2 & 85.2 & 57.4 & 58.4 & 43.6 & 60.1 & 47.7 & 58.6 \\ Zhao \etal (\textbf{GNN}) \cite{zhao2019semantic} CVPR'19 & 47.3 & 60.7 & 51.4 & 60.5 & 61.1 & 49.9 & 47.3 & 68.1 & 86.2 & \textbf{55.0} & 67.8 & 61.0 & 42.1 & 60.6 & 45.3 & 57.6 \\ Qiu \etal (\textbf{PSM}) \cite{qiu2019cross} ICCV'19 & 223.1 & 231.8 & 273.0 & 237.3 & 248.1 & 243.9 & 209.0 & 279.7 & 280.9 & 296.3 & 241.9 & 234.0 & 230.8 & 217.8 & 220.4 & 244.8\\ Iskakov \etal \cite{Iskakov_2019_ICCV} ICCV'19 & 41.9 & 49.2 & 46.9 & 47.6 & 50.7 & 57.9 & 41.2 & 50.9 & 57.3 & 74.9 & 48.6 & 44.3 & \textbf{41.3} & 52.8 & 42.7 & 49.9 \\ Wang \etal \cite{wang2019not} ICCV'19 & 44.7 & 48.9 & 47.0 & 49.0 & 56.4 & 67.7 & 48.7 & 47.0 & 63.0 & 78.1 & 51.1 & 50.1 & 54.5 & 40.1 & 43.0 & 52.6 \\ Ci \etal (\textbf{LCN}) \cite{Ci_2019_ICCV} ICCV'19 & 46.8 & 52.3 & 44.7 & 50.4 & 52.9 & 68.9 & 49.6 & 46.4 & 60.2 & 78.9 & 51.2 & 50.0 & 54.8 & 40.4 & 43.3 & 52.7 \\ Pavllo* \etal \cite{pavllo:videopose3d:2019} CVPR'19 & 47.1 & 50.6 & 49.0 & 51.8 & 53.6 & 61.4 & 49.4 & 47.4 & 59.3 & 67.4 & 52.4 & 49.5 & 55.3 & 39.5 & 42.7 & 51.8* \\ Cai* \etal \cite{cai2019exploiting} ICCV'19 & 46.5 & 48.8 & 47.6 & 50.9 & 52.9 & 61.3 & 48.3 & 45.8 & 59.2 & 64.4 & 51.2 & 48.4 & 53.5 & 39.2 & 41.2 & 50.6* \\ Xu* \etal \cite{Xu_2020_CVPR} CVPR'20 & 40.6 & 47.1 & 45.7 & 46.6 & 50.7 & 63.1 & 45.0 & 47.7 & 56.3 & 63.9 & 49.4 & 46.5 & 51.9 & 38.1 & 42.3 & \underline{49.2}* \\ \rowcolor{mygray} Ours & \textbf{36.3} & \textbf{42.8} & \textbf{39.5} & \textbf{40.0} & \textbf{43.9} & \textbf{48.8} & \textbf{36.7} & \textbf{44.0} & \textbf{51.0} & 63.1 & \textbf{44.3} & \textbf{40.6} & 44.4 & \textbf{34.9} & \textbf{36.7} & \textbf{43.4} \\ \thickhline \textbf{Protocol \#2} & Dire. & Disc. & Eat & Greet & Phone & Photo & Pose & Purch. & Sit & SitD & Smoke & Wait & WalkD & Walk & WalkT & Avg \\ \hline Martinez \etal (\textbf{FCN}) \cite{martinez2017simple} ICCV'17 & 39.5 & 43.2 & 46.4 & 47.0 & 51.0 & 56.0 & 41.4 & 40.6 & 56.5 & 69.4 & 49.2 & 45.0 & 49.5 & 38.0 & 43.1 & 47.7 \\ Pavlakos \etal \cite{pavlakos2018ordinal} CVPR'18 & 34.7 & 39.8 & 41.8 & 38.6 & 42.5 & 47.5 & 38.0 & 36.6 & 50.7 & 56.8 & 42.6 & 39.6 & 43.9 & 32.1 & 36.5 & 41.8 \\ Yang \etal \cite{Yang_2018_CVPR} CVPR'18 & \textbf{26.9} & \textbf{30.9} & 36.3 & 39.9 & 43.9 & 47.4 & 28.8 & \textbf{29.4} & \textbf{36.9} & 58.4 & 41.5 & \textbf{30.5} & \textbf{29.5} & 42.5 & 32.2 & \underline{37.7} \\ Qiu \etal (\textbf{PSM}) \cite{qiu2019cross} ICCV'19 & 117.0 & 123.2 & 128.0 & 121.7 & 126.1 & 128.7 & 105.3 & 130.1 & 145.1 & 170.2 & 125.1 & 114.5 & 128.9 & 115.3 & 117.1 & 126.7 \\ Wang \etal \cite{wang2019not} ICCV'19 & 33.6 & 38.1 & 37.6 & 38.5 & 43.4 & 48.8 & 36.0 & 35.7 & 51.1 & 63.1 & 41.0 & 38.6 & 40.9 & 30.3 & 34.1 & 40.7 \\ Ci \etal (\textbf{LCN}) \cite{Ci_2019_ICCV} ICCV'19 & 36.9 & 41.6 & 38.0 & 41.0 & 41.9 & 51.1 & 38.2 & 37.6 & 49.1 & 62.1 & 43.1 & 39.9 & 43.5 & 32.2 & 37.0 & 42.2 \\ Pavllo* \etal \cite{pavllo:videopose3d:2019} CVPR'19 & 36.0 & 38.7 & 38.0 & 41.7 & 40.1 & 45.9 & 37.1 & 35.4 & 46.8 & 53.4 & 41.4 & 36.9 & 43.1 & 30.3 & 34.8 & 40.0* \\ Cai* \etal \cite{cai2019exploiting} ICCV'19 & 36.8 & 38.7 & 38.2 & 41.7 & 40.7 & 46.8 & 37.9 & 35.6 & 47.6 & \textbf{51.7} & 41.3 & 36.8 & 42.7 & 31.0 & 34.7 & 40.2* \\ Xu* \etal \cite{Xu_2020_CVPR} CVPR'20 & 33.6 & 37.4 & 37.0 & 37.6 & 39.2 & 46.4 & 34.3 & 35.4 & 45.1 & 52.1 & 40.1 & 35.5 & 42.1 & 29.8 & 35.3 & 38.9* \\ \rowcolor{mygray} Ours & 30.5 & 34.9 & \textbf{32.0} & \textbf{32.2} & \textbf{35.0} & \textbf{37.8} & \textbf{28.6} & 32.6 & 40.8 & 52.0 & \textbf{35.0} & 31.9 & 35.6 & \textbf{26.6} & \textbf{28.5} & \textbf{34.6} \\ \thickhline \end{tabular}} \caption{The MPJPE (mm) of the state-of-the-art methods on the H36M dataset under protocol \#1 and protocol \#2, respectively. \emph{*} means the method uses temporal information in videos.} \label{tab:state_of_the_art_h36m} \end{table*} \subsection{Comparison to the State-of-the-arts} \noindent\textbf{Results on the H36M Dataset} Table \ref{tab:state_of_the_art_h36m} shows the results of the state-of-the-art methods on the H36M dataset. Our approach outperforms the state-of-the-art methods by a notable margin under both protocols. This includes methods that explore temporal information in videos (labeled by * in the table). In particular, our method outperforms PSM \cite{qiu2019cross}, FCN \cite{martinez2017simple}, GNN \cite{zhao2019semantic}, and LCN \cite{Ci_2019_ICCV} by an even larger margin which validates the effectiveness of our context modeling strategy. We discover in our experiment that PSM \cite{qiu2019cross} gets very poor results in the monocular setting. To investigate the reasons, we project the estimated $3$D poses back to $2$D images and find that, for most cases, the projections perfectly match the $2$D people although their $3$D estimates are very different from the GT poses. We show an example in Figure \ref{fig:PSM_result}. This is mainly because PSM alone has limited capability to resolve ambiguity. Note that a $3$D pose estimate may be inaccurate even when its limb lengths are correct. In contrast, the deep learning-based methods such as GNN \cite{martinez2017simple,zhao2019semantic,Ci_2019_ICCV} have strong capability to reduce ambiguity because they can fit a large amount of data. We will discuss in more details on why our approach gets more accurate estimates than PSM and GNN in the subsequent ablative study.\\ \noindent\textbf{Results on the 3DHP Dataset} Table \ref{tab:state_of_the_art_3dhp} shows the results of different methods on the 3DHP dataset. Our approach achieves significantly better PCK and AUC scores than other methods including FCN, LCN, and PSM for almost all scenes. The result suggests that ContextPose has strong generalization performance which we think is due to the leverage of limb length priors in deep networks. FCN \cite{martinez2017simple} gets a low accuracy because the dense connections degrade the generalization capability which has already been discussed in \cite{Ci_2019_ICCV}. LCN \cite{Ci_2019_ICCV} gets better results by fusing features of contextual joints but it is still worse than ours. The result validates the importance of combining deep networks and limb length priors. \begin{figure} \centering \includegraphics[width=3.1in]{imgs/experiments/PSM_align.pdf} \caption{Visualization of a $3$D pose estimated by PSM \cite{qiu2019cross}. The left figure shows the projection of the estimated $3$D pose. The right figure shows the estimated (solid lines) and GT (dashed lines) $3$D poses. The estimated $3$D pose has correct $2$D projection but it is very different from GT $3$D pose. It means PSM suffers from severe ambiguity when it is used in the monocular setting.} \label{fig:PSM_result} \end{figure} \begin{table} \centering \resizebox{3.3in}{!}{ \begin{tabular}{l|SMLMM} \thickhline Method & GS (PCK) & noGS (PCK) & Outdoor (PCK) & ALL (PCK) $\uparrow$ & ALL (AUC) $\uparrow$ \\ \hline \multicolumn{6}{c}{Trained on: H36M+MPII \cite{andriluka14cvpr}} \\ \hline \rowcolor{mygray} Zhou \etal \cite{zhou2017towards} & 71.1 & 64.7 & 72.7 & 69.2 & 32.5 \\ \rowcolor{mylightergray} Yang \etal \cite{Yang_2018_CVPR} & - & - & - & 69.0 & 32.0 \\ \rowcolor{mygray} Wang \etal \cite{wang2019not} & - & - & - & 71.9 & 35.8 \\ \hline \multicolumn{6}{c}{Trained on: H36M+MPII+LSP \cite{Johnson10}} \\ \hline \rowcolor{mygray} Pavlakos \etal \cite{pavlakos2018ordinal} & 76.5 & 63.1 & 77.5 & 71.9 & 35.3 \\ \hline \multicolumn{6}{c}{Trained on: H36M} \\ \hline \rowcolor{mygray} Martinez \etal (\textbf{FCN}) \cite{martinez2017simple} & 49.8 & 42.5 & 31.2 & 42.5 & 17.0 \\ \rowcolor{mylightergray} Qiu \etal (\textbf{PSM}) \cite{qiu2019cross} & 26.4 & 22.6 & 19.6 & 23.3 & 8.0 \\ \rowcolor{mygray} Ci \etal (\textbf{LCN}) \cite{Ci_2019_ICCV} & 74.8 & 70.8 & \textbf{77.3} & \underline{74.0} & \underline{36.7} \\ \rowcolor{mylightergray} Baseline & 75.2 & 73.3 & 62.2 & 71.3 & 35.0 \\ \hline \rowcolor{mygray} Ours & \textbf{82.6} & \textbf{80.5} & \textbf{77.3} & \textbf{80.5} & \textbf{42.7} \\ \thickhline \end{tabular}} \caption{The results of the state-of-the-art methods on the 3DHP dataset. GS represents the green screen background scene. The results of \cite{martinez2017simple} are taken from \cite{luo2018orinet}.} \label{tab:state_of_the_art_3dhp} \end{table} \subsection{Ablation Study} \begin{table} \centering \resizebox{3.3in}{!}{ \begin{tabular}{l|c|c|c|c|c|c|c|c} \thickhline \multirow{2}{*}{Method} & \multirow{2}{*}{GA} & \multirow{2}{*}{PA} & \multicolumn{3}{c|}{S9} & \multicolumn{3}{c}{S11} \\ \cline{4-9} & & & MPJPE $\downarrow$ & MPLLE $\downarrow$ & MPLAE $\downarrow$ & MPJPE $\downarrow$ & MPLLE $\downarrow$ & MPLAE $\downarrow$ \\ \hline Baseline & \textcolor{red}{\text{\ding{55}}} & \textcolor{red}{\text{\ding{55}}} & 54.38 & 15.03 & 0.1600 & 35.12 & 10.16 & 0.1250 \\ Ours w/o PA & \textcolor{mygreen}{\text{\ding{51}}} & \textcolor{red}{\text{\ding{55}}} & 52.00 & 14.58 & 0.1517 & 35.16 & 9.78 & 0.1240 \\ Ours w/o GA & \textcolor{red}{\text{\ding{55}}} & \textcolor{mygreen}{\text{\ding{51}}} & 52.46 & 14.16 & 0.1524 & 34.98 & 9.67 & 0.1224 \\ \cellcolor{mygray}{Ours} & \cellcolor{mygray}{\textcolor{mygreen}{\text{\ding{51}}}} & \cellcolor{mygray}{\textcolor{mygreen}{\text{\ding{51}}}} & \cellcolor{mygray}{\textbf{50.24}} & \cellcolor{mygray}{\textbf{14.13}} & \cellcolor{mygray}{\textbf{0.1509}} & \cellcolor{mygray}{\textbf{34.10}} & \cellcolor{mygray}{\textbf{9.50}} & \cellcolor{mygray}{\textbf{0.1217}} \\ \thickhline \end{tabular}} \caption{Ablative study on the global attention and pairwise attention in ContextPose. We show the MPJPE (mm), MPLLE (mm) and MPLAE (radian) on each test subject separately. ContextPose achieves large improvement on the more challenging subject of S$9$.} \label{tab:ablation_effect} \end{table} \noindent\textbf{Effect of ContextPose} \label{sec:ablation_effect} We first compare our approach to the baseline w/o ContextPose. The results on the H36M dataset are shown in Table \ref{tab:ablation_effect}. We can see that ContextPose notably decreases MPJPE of the baseline from $54.38$mm to $50.24$mm on the challenging subject S$9$. MPLLE decreases by nearly $6\%$ meaning that the limb lengths of the estimated $3$D poses are more accurate than the baseline. The improvement for S$11$ in terms of MPJPE is marginal because the baseline is already very accurate. However, we can see that there is still clear improvement in terms of limb lengths and angles. The result of the baseline is different from the number in Table \ref{tab:state_of_the_art_h36m} because we use a smaller $3$D network in Table \ref{tab:ablation_effect} to reduce memory usage as stated in Section \ref{sec:implementation}. We plot the MPLLE of the baseline and our method for each sample in H36M dataset in Figure \ref{fig:delta_error}. We can see that ContextPose gets smaller errors than baseline for about $80\%$ of the test data. In particular, the improvement is larger for hard cases where the baseline gets large errors (see the left side of the figure). It indicates that ContextPose reduces the chance of getting absurd poses by exploring context. There are few cases where ContextPose gets worse results. This usually happens when multiple body joints are occluded which makes estimating global attention a very challenging task. Table \ref{tab:state_of_the_art_3dhp} shows the results on the 3DHP dataset. We can see that using ContextPose significantly improves the PCK of the baseline from $71.3\%$ to $80.5\%$. The result represents that ContextPose is very important to improve the generalization performance of the $3$D pose estimator. This is a big advantage for actual deployment. In fact, we can see that our approach even outperforms the methods which use even more training data. \\ \noindent\textbf{Effect of GA and PA} We report results when we add one of the two modules (GA and PA) to the baseline in Table \ref{tab:ablation_effect}. Adding only the GA module makes little difference on the ultimate results measured by MPJPE, MPLLE, and MPLAE. In contrast, if we add the PA module, the results are improved by a notable margin which validates the importance of pairwise compatibility in context modeling. \\ \begin{figure} \centering \includegraphics[width=3.1in]{imgs/experiments/delta_limb_error.pdf} \caption{MPLLE (mm) of individual samples. The gray line shows the errors of the baseline. The blue line represents the error difference between ContextPose and baseline (below zero means our method gets smaller error).} \label{fig:delta_error} \end{figure} \begin{figure} \centering \includegraphics[width=3.3in]{imgs/experiments/quality_results.pdf} \caption{Example $3$D pose estimates. The last four columns show the projected $2$D poses and the weights in linear combination for some random joints (highlighted by small blue boxes). Row (d) and (e) show two failure cases.} \label{fig:quality_results} \end{figure} \subsection{Qualitative Results} Figure \ref{fig:quality_results} shows some $3$D poses estimated by ContextPose. The last four columns show the predicted weights (\ie the product of the GA and PA) for some random joints. In the first case of (a), the approach pays more attention to the features around the right knee when estimating the right ankle. Similarly, in the third case of (b), it focuses on features from right elbow when estimating right wrist. We show two failure cases in row (d) and (e). In particular, in (e) our estimate has correct limb lengths but inaccurate limb angles for the left leg. In addition, the projection of the $3$D pose is also reasonable. This is a common error for monocular $3$D pose estimation because it has severe ambiguity. \subsection{Optimization Problem of PSM} PSM for $3$D pose estimation \cite{PavlakosZDD17,qiu2019cross} aims to determine optimal joint locations by maximizing the following energy function with random variables $\bm{J} \in \mathcal{R}^{N \times 3}$ \begin{equation} \begin{aligned} \label{eq:psm_opt} Energy(\bm{J}) = \prod_{i = 0}^{N-1} x_{i, \bm{J}_i} \prod_{(J_u, J_v) \in \mathcal{E}} \psi(\bm{J}_u, \bm{J}_v, \bm{e}_{u,v}), \end{aligned} \end{equation} where $\bm{J}_u \in \mathcal{R}^{3}$ represent the $3$D position of a voxel, $x_{u,\bm{J}_u}$ is the likelihood of joint $J_u$ being at $\bm{J}_u$. The pairwise term $\psi(\bm{J}_u, \bm{J}_v, \bm{e}_{u,v})$ encodes the limb length constraints measuring whether the distance between $\bm{J}_u$ and $\bm{J}_v$ satisfies the limb length prior in $\bm{e}_{u,v}$, and is defined as \begin{small} \begin{equation} \psi(\bm{J}_u, \bm{J}_v, \bm{e}_{u,v}) =\left\{ \begin{array}{rcl} 1, & & ||\bm{J}_u - \bm{J}_v||_2 \in [\mu_{u, v} - \epsilon, \mu_{u, v} + \epsilon]\\ 0, & & otherwise\\ \end{array} \right. \end{equation} \end{small} in \cite{PavlakosZDD17,qiu2019cross}, where $\mu_{u, v}$ is the limb length prior encoded in $\bm{e}_{u,v}$, and $\epsilon > 0$ is a tolerance threshold. \subsection{Reformulate GNN} Ci \etal \cite{Ci_2019_ICCV} factor the Laplacian operator in GNN \cite{defferrard2016convolutional} into the product of a prior \emph{structure} matrix $\bm{S}$ and a learnable \emph{weight} matrix $\bm{W}$. In particular, $\bm{S}$ encodes dependence among graph nodes, according to the pre-defined human body structure. If joint $J_v$ is a contextual joint of $J_u$, then $\bm{S}^{(u, v)}$ is set to be $1$, otherwise $0$. The output features of a node $J_u$ is defined as \begin{equation} \label{eq:lcn_layer} \bm{y}_u = \sum_{v=0}^{N-1} (\bm{S}^{(u, v)} \odot \bm{W}^{(u, v)}) \bm{x}_v, \end{equation} where $\bm{x}_v \in \mathcal{R}^{M_{\text{input}}}$, and $\bm{y}_u \in \mathcal{R}^{M_{\text{output}}}$. $\bm{W}^{(u, v)} \in \mathcal{R}^{M_{output} \times M_{input}}$ is the learnable weight matrix. \subsection{3D Network Architecture} \begin{figure}[ht] \centering \includegraphics[width=3.2in]{imgs/v2v.pdf} \caption{Detailed architecture of the encoder and decoder.} \label{fig:v2v} \end{figure} \subsection{Pseudocode of TransPose} \begin{algorithm}[htb] \caption{} \label{alg:framework} \KwIn{$\{\bm{x}_{u,\bm{q}} \in \mathcal{R}^{M} | J_u \in \mathcal{J}, \bm{q} \in \Omega\}$ ($\bm{x}_{u,\bm{q}}$ denotes the input feature of joint $J_u$ at voxel $\bm{q}$) and known limb length priors $\{\bm{e}_{u,v} = (\mu_{u, v}, \sigma_{u, v}) | (J_u, J_v) \in \mathcal{E}\}$.} \KwOut{$\{\bm{y}_{u,\bm{q}} \in \mathcal{R}^{M} | J_u \in \mathcal{J}$, $\bm{q} \in \Omega\}$ ($\bm{y}_{u,\bm{q}}$ denotes the output feature of joint $J_u$ at voxel $\bm{q}$).} \KwParam{$\{\bm{W}_{u, v} \in \mathcal{R}^{M \times M} | J_u, J_v \in \mathcal{J}\}$ and $\{\bm{d}_v \in \mathcal{R}^{M} | J_v \in \mathcal{J}\}$.} \tcp{Compute GA for all joints} \For{$J_v \in \mathcal{J}$}{ $Z^{G}_{v} \gets \sum_{\bm{k} \in \Omega} \emph{exp}(\bm{d}^{T}_{v}\bm{x}_{v,\bm{k}})$ \For{$\bm{k} \in \Omega$}{ \tcp{GA $G_v(\bm{x}_{v,\bm{k}})$, Eq. \ref{eq:global}} $G_{v, \bm{k}} \gets \emph{exp}(\bm{d}^{T}_{v}\bm{x}_{v,\bm{k}}) / Z^{G}_{v}$ } } \tcp{Message passing between joints} \For{$J_u \in \mathcal{J}$}{ \For{$\bm{q} \in \Omega$}{ \For{$J_v \in \mathcal{N}_u$}{ $Z^{P}_{u, v, \bm{q}} \gets \sum_{\bm{k} \in \Omega} A^{g}_{v, \bm{k}}\emph{exp}(- \frac{ (||\bm{q}-\bm{k}||_2-\mu_{u,v})^2}{2\alpha\sigma_{u,v}^2 + \epsilon})$ \For{$\bm{k} \in \Omega$}{ \tcp{PA $P(\bm{q},\bm{k}, \bm{e}_{u,v}$), Eq. \ref{eq:pairwise}} $P_{u,v,\bm{q},\bm{k}} \gets \emph{exp}(- \frac{ (||\bm{q}-\bm{k}||_2-\mu_{u,v})^2}{2\alpha\sigma_{u,v}^2 + \epsilon}) / Z^{P}_{u,v, \bm{q}}$ } } \tcp{Update $\bm{y}_{u,\bm{q}}$, Eq. \ref{eq:transpose_general}} $\bm{y}_{u,\bm{q}} \gets \bm{x}_{u,\bm{q}} + \sum_{J_v \in \mathcal{J}} \sum_{\bm{k} \in \Omega} G_{v, \bm{k}} \cdot P_{u,v, \bm{q},\bm{k}} \cdot \bm{W}_{u, v} \bm{x}_{v,\bm{k}}$ } } \end{algorithm}
\section{Introduction} A digital twin (DT) is a digital/virtual representation of a physical system, often referred to as the physical twin. The virtual model resides in the cloud and is connected to the physical counterpart through internet of things (IoT) \cite{souza2019digital}; the key premise here is to achieve temporal synchronization between the physical and digital twins. This necessitates continuous updation of the DT based on sensor data. It may be noted that the DT can also actuate the physical counter part through actuators. Once a DT is in sync with the physical counterpart, it can be used to do a number of tasks including decision making \cite{stassopoulou1998application}, remaining useful-life estimation \cite{si2011remaining} and preventive maintenance optimization \cite{tan1997general}. The possibilities offered by the DT technology are immense, evident from the recent applications of this technology in prognostics and health monitoring \cite{wang2019digital,booyse2020deep}, manufacturing \cite{lu2020digital,debroy2017building}, automotive and aerospace engineering \cite{li2017dynamic,kapteyn2020toward}, to mention a few. In this paper, the primary objective is the development of a DT for nonlinear dynamical systems. Developing DTs for dynamical systems is challenging because of the presence of, at least, two different time-scales. The responses of dynamical systems are governed by external excitations and their fluctuations thereof; and typically encode the characteristic time period of a system. On the other hand, the operational life of a dynamical system is rather large. To put things into perspective, for example, consider a wind turbine, where the characteristic time period is of the order of tens (10s) of seconds \cite{adhikari2012dynamic} while the operational life is in tens of years. Incorporating this fundamental mismatch within a DT is non-trivial. In \cite{ganguli2020digital}, a digital twin framework for dynamical systems that decouples the two timescales was presented. Simple analytical formulae for capturing variation of mass and stiffness with operational time-period were proposed. The framework was later extended in \cite{chakraborty2021role} wherein, a Gaussian Process (GP) \cite{williams1995gaussian,nayek2019gaussian,chakraborty2019graph} was employed for tracking the time evolution of the system parameters. However, both these frameworks are only applicable when the underlying system is of linear single-degree-of-freedom type. In practice, most real-life dynamical systems are nonlinear with multiple degrees-of-freedom \cite{tripura2020ito,bhowmik2019first}. DT for multi-timescale dynamical systems \cite{chakraborty2021machine} and bars \cite{ritto2021digital} can also be found in literature. From the discussion above, it is evident that the literature on DT for dynamical systems is quite sparse. In fact, to the best of the knowledge of the authors, there exists no work on digital twin for nonlinear MDOF dynamical systems. In order to fill this apparent void, a novel algorithm for building DT of stochastic nonlinear MDOF dynamical systems is proposed. Following \cite{ganguli2020digital}, the proposed framework also decouples the fast and the slow-timescales. We propose to use nonlinear Bayesian filters \cite{sarkka2013bayesian,chen2003bayesian,yuen2011bayesian} and machine learning \cite{goswami2020transfer,chakraborty2021transfer,chakraborty2016modelling,chakraborty2017polynomial,bilionis2012multi,bilionis2013multi} for estimating the system parameters in the fast and slow timescales, respectively. It may be noted that the use of Bayesian filters is already quite prevalent for state and parameter estimation. Works carried out in \cite{nayek2019gaussian,dertimanis2019input,ching2006bayesian,brewick2016probabilistic,saha2009extended} illustrate use of Bayesian filters for state and parameter estimation of linear/non-linear MDOF systems subjected to deterministic loading; however, such filters are only effective over a short time-scale (a few seconds). The objective here is to develop a DT that can operate over the operational life of a system and hence, directly usage of a Bayesian filter is not an option. This motivates the coupling Bayesian filter with an appropriate machine learning algorithm. Among different Bayesian filtering algorithms present in literature, we propose to use unscented Kalman Filter (UKF) \cite{wan2000unscented}. On the other hand, among different machine learning algorithms existing in the literature, Gaussian process (GP) \cite{nayek2019gaussian,chakraborty2019graph,bilionis2012multi,bilionis2013multi} is used as the machine learning algorithm. The advantage of GP resides in the fact that it is a probabilistic machine learning algorithm and hence, immune from overfitting. Additionally, it also provides a confidence interval, which is useful in the decision making process. However, one must note that the proposed approach is generic in nature and can be used with any choice of Bayesian filtering and ML algorithms. The rest of the paper is organized as follows. The dynamic model for the digital twin of nonlinear dynamical systems is discussed in Section \ref{dm}. The problem statement is also stated clearly in this section. UKF and GP are briefly discussed in Sections \ref{bf} and \ref{gpr} respectively. The proposed algorithm along with a clear flow-chart is discussed in Section \ref{sec:pa}. Results illustrating the performance of the proposed approach is provided in Section \ref{ni}. Finally, Section \ref{conclusion} provides the concluding remarks. \section{Dynamic model of the digital twin}\label{dm} In this section, we present the nominal dynamic system and the DT corresponding to this model. The nominal model is the `initial model' of a DT. For structural engineering, we can consider a nominal model to be a numerical model of the system when it is manufactured. A DT encapsulates the journey from the nominal model to its updates based on the data collected from the system. In this section, the key ideas for developing DT of nonlinear MDOF systems are explained. \subsection{Stochastic nonlinear MDOF system: the nominal model}\label{subsec:nominal_model} Consider an $N-$DOF stochastic nonlinear system having governing equations as follows: \begin{equation}\label{eq:nominal} \textbf M_0 \ddot {\bm X} + \mathbf C_0 \dot {\bm X} + \mathbf K_0 \bm X + \bm G \left( \bm X, \bm \alpha \right) = \bm F + \bm \Sigma {\bm {\dot{W}}}, \end{equation} where $\mathbf M_0 \in \mathbb R^{N\times N}$, $\mathbf C_0 \in \mathbb R^{N\times N}$ and $\mathbf K_0 \in \mathbb R^{N\times N}$, respectively, represent the mass, damping and (linear) stiffness matrix of the system. $\bm G \left( \cdot , \cdot \right) \in \mathbb R^{N}$, on the other hand, represents the nonlinearity present in the system. $\bm F$ in Eq. (\ref{eq:nominal}) represents the deterministic force and and $ {\bm {\dot{W}}}$ (Wiener derivative) is the stochastic load vector with noise intensity matrix $\bm \Sigma$. $\bm \alpha$ in Eq. (\ref{eq:nominal}) represents the parameters corresponding to the nonlinear stiffness model. Note that $\mathbf M_0$, $\mathbf C_0$ and $\mathbf K_0$ are the nominal parameters and represents the pristine system. \subsection{The digital twin} The DT for the N-DOF nonlinear system discussed above can be represented as: \begin{equation}\label{eq:dt} \textbf M(t_s) \frac{\partial^2 \bm X (t,t_s)}{\partial t^2} + \mathbf C(t_s) \frac{\partial \bm X (t,t_s)}{\partial t} + \mathbf K (t_s) \bm X (t,t_s) + \bm G \left( \bm (t,t_s), \bm \alpha \right) = \bm F(t, t_s) + \bm \Sigma {\bm {\dot{W}}}, \end{equation} where $t$ represents the system's time and $t_s$ is the service time (operational time-scale). Note that the response vector $\bm X$ is function of both the time-scales and hence, partial derivatives have been used in Eq. (\ref{eq:dt}). Eq. (\ref{eq:dt}) is considered to be the DT for the nominal system in Section \ref{subsec:nominal_model}. Eq. (\ref{eq:dt}) has two time-scales, $t$ and $t_s$. For all practical purposes the service time-scale $t_s$ is much slower (in months) as compared to the time-scale of the system dynamics. \subsection{Problem statement}\label{subsec:ps} Although a physics-based DT for MDOF nonlinear system is defined in Eq. (\ref{eq:dt}), for using it in practice, one needs to estimate the system parameters $\mathbf M(t_s)$, $\mathbf C(t_s)$ and $\mathbf K(t_s)$. For estimating these parameters, the connectivity between the physical twin and the DT is the key. Recent developments in IoT provides several new technologies that ensure the connectivity between the two twins. To be specific, the two-way connectivity between the DT and its counterpart is created by using sensors and actuators. Given the huge difference in the two times-scales in Eq. (\ref{eq:dt}), it is reasonable to assume that the temporal variation in $\mathbf M(t_s)$, $\mathbf C(t_s)$ and $\mathbf K(t_s)$ are so slow that the dynamics is practically decoupled from these parametric variations. The sensor collects data intermittently at discrete time instants $t_s$. At each time instant $t_s$, time history measurements of acceleration response in $t_s \pm \Delta t$ is available. For this study, it is assumed that there is no practical variation in the mass matrix and hence, $\mathbf M(t_s) = \mathbf M_0$. Variation in damping matrix is also not considered. With this setup, the objective is to develop a DT for nonlinear MDOF system. It is envisioned that the DT should be able to track the variation in the system parameters, $\mathbf K(t_s)$ at current time $t$ and is also able to predict future degradation/variation in system parameters. Last but not the least, a DT should be continuously updated as and when it receives data. \section{Bayesian Filters}\label{bf} One of the key components in development of DT is estimating $\mathbf K(t_s)$ given the observations until time $t_s$. This is a classical parameter estimation problem and this work proposes the use of Bayesian filter to accomplish the goal. However, one must note that development of DT and parameter estimation are not same; instead, parameter estimation is only a component of the the overall DT. Bayesian filters use Bayesian inference to develop a framework which can then be used for state-parameter estimation. Bayesian inference differs from conventional frequentist approach of statistical inference because it takes probability of an event as the uncertainty of the event in a single trial, as opposed to the proportion of the event in a probability space. For filtering equations, let the unknown vector be given as $\bm Y_{0:T}=\{\bm Y_0,\bm Y_1,\ldots,\bm Y_T\}$ which is observed through a set of noisy measurements $\bm Z_{1:T}=\{\bm Z_1,\bm Z_2,\ldots, \bm Z_T\}$. Using Bayes's rule, \begin{equation} \label{BAYES} p(\bm Y_{0:T} | \bm Z_{1:T})={\displaystyle\frac{p(\bm Z_{1:T} | \bm Y_{0:T})p(\bm Y_{0:T})}{p(\bm Z_{1:T})}}. \end{equation} This full posterior formulation although accurate is computationally heavy and is often intractable. The computational complexity is simplified by using the first order Markovian assumption. First order Markov model assumes (i) the state of system at time step $k$ (i.e. $\bm Y_k$) given the state at time step $k-1$ (i.e. $\bm Y_{k-1}$) is independent of anything that has happened before time step $k-1$ and (ii) The measurement at time step $k$ (i.e. $\bm Z_k$) given the state at time step $k$ (i.e. $\bm Y_k$) is independent of any measurement or state histories. Mathematically, this is represented as: \begin{equation} p(\bm Y_k | \bm Y_{1:k-1}, \bm Z_{1:k-1})=p(\bm Y_k | \bm Y_{k-1}), \label{mp1} \end{equation} \begin{equation*} \text{and} \end{equation*} \vspace{-0.45cm} \begin{equation} p(\bm Z_k | \bm Y_{1:k},\bm Z_{1:k-1})=p(\bm Z_k | \bm Y_k). \label{mp2} \end{equation} A probabilistic graphical model representing the first-order Markov assumption is shown in Fig. \ref{fig:pgm}. In literature, this is also known as the state-space model (if the state is continuous) or the hidden Markov model (if the state is discrete). Using assumptions of Markovian model, the recursive Bayesian filter can be set up, and Kalman Filter arises \cite{sarkka2013bayesian, welch1995introduction}, which is a special case of recursive Bayesian filter used for linear models. Extended Kalman Filter \cite{sarkka2013bayesian}, Unscented Kalman Filter (UKF) \cite{sarkka2013bayesian,wan2000unscented} are improvements over Kalman filter, which are used for non-linear models. In this work, UKF is used as the Bayesian filtering algorithm of choice. It is to be noted that UKF is computationally expensive as compared to the EKF algorithm; however, the performance of UKF for systems having higher order of non-linearity is superior \cite{wan2000unscented}. \begin{figure}[ht!] \centering \includegraphics[width=0.9\textwidth]{SS.pdf} \caption{Probabilistic graphical model for state space model. We have considered first order Markovian assumption for the hidden variable $\bm Y$; this ensures that $\bm Y_t$ is only dependent on $\bm Y_{t-1}$.} \label{fig:pgm} \end{figure} \subsection{Unscented Kalman Filter} UKF uses concepts of unscented transform to analyze non-linear models and directly tries to approximate the mean and co-variance of the targeted distribution instead of approximating the non-linear function. To that end, weighted sigma points are used. The idea here is to consider some points on the source Gaussian distribution which are then mapped onto the target Gaussian distribution after passing through non-linear function. These points are refereed to as the sigma points and are considered to be representative of the transformed Gaussian distribution. Considering $L$ to be the length of the state vector, $2L + 1$ sigma points are selected as \cite{wan2000unscented}, \begin{equation}\label{eq:sigma} \begin{aligned} \mathcal{Y}^{(0)} &= \bm \mu\\ \mathcal{Y}^{(i)} &= \bm \mu+\sqrt{(L+\lambda)}\left[\sqrt{\bm \Sigma}\right],\quad\quad i = 1,.....,L\\ \mathcal{Y}^{(i)} &= \bm \mu-\sqrt{(L+\lambda)}\left[\sqrt{\bm \Sigma}\right]\quad\quad i = L+1,.....,2L, \end{aligned} \end{equation} where, $\mathcal{Y}$ are the required sigma points, $\bm \mu$ and $\mathbf \Sigma$ are, respectively the mean vector and co-variance matrix. $\lambda$ and $L$ in Eq. (\ref{eq:sigma}) represent the scaling parameter and length of state vector respectively. Details on how to compute $\lambda$ is explained while discussing the UKF algorithm. Once the mean $m_k$ and covariance $p_k$, are computed using the UKF, we approximate the filtering distribution as: \begin{equation} p(y_k|z_{1:k})\simeq N(y_k|m_k,p_k), \end{equation} where $m_k$ and $p_k$ are the mean and co-variance computed by the algorithm discussed next. A schematic representation of how sigma points are used within the UKF algorithm is shown in Fig. \ref{fig:sigma} \begin{figure}[ht!] \centering \includegraphics[width=0.8\textwidth]{sigma.pdf} \caption{Schematic representation of functionality of sigma points within the UKF framework.} \label{fig:sigma} \end{figure} \subsubsection{Algorithm}\label{sec_ukfa} \noindent \textbf{Step 1} Weights calculation for sigma points\par \quad Select UKF parameters : $\alpha_f = 0.001$, $\beta = 2$, $\kappa = 0$ \begin{equation} \begin{aligned} &W_m^{(i = 0)}={\frac{\lambda}{L+\lambda}}\\ &W_c^{(i = 0)}={\frac{\lambda}{L+\lambda}}+(1-\alpha_f^2+\beta),&&i = 1,.....,2L\\ &W_m^{(i)}={\frac{1}{2(L+\lambda)}}\\ &W_c^{(i)}=W_m^{(i)},&&i = 1,.....,2L, \end{aligned} \label{ukfw} \end{equation} \quad\quad\,\,\,where, $L$ is the length of state vector and scaling parameter $\lambda = \alpha_f^2(L+\kappa)-L$.\\ \textbf{Step 2 : }For k = 0\par Initialize mean and co-variance i.e. $m_k = m_0$,\,\,$p_k = p_0$.\\ \textbf{Step 3 : }For k = 1,2,.....,$t_n$\par \textbf{Step 3.1 : }Prediction\par \quad Getting Sigma points $\mathcal{Y}^{(i)}, i = 0,.....,2L$ \begin{equation} \begin{aligned} \mathcal{Y}_{k-1}^{(0)}&=m_{k-1}\\ \mathcal{Y}_{k-1}^{(i)}&=m_{k-1}+\sqrt{L+\lambda}\,\left[\sqrt{P_{k-1}}\right]\\ \mathcal{Y}_{k-1}^{(i+L)}&=m_{k-1}-\sqrt{L+\lambda}\,\left[\sqrt{P_{k-1}}\right],\,\,\,\,\,\,\,\,\,\, i = 1,.....,L. \end{aligned} \end{equation} \quad\quad\,\,\,Propagate sigma points through the dynamic model \begin{equation} \mathcal{Y}_k^{(i)}=f(\mathcal{Y}_{k-1}^{(i)}),\,\,\,\,\,\,\,\,\,\,i = 0,.....,2L. \end{equation} \quad\quad\,\,\,The predicted mean $m_k^-$ and co-variance $P_k^-$ is then given by \begin{equation} \begin{aligned} m_k^-&=\sum_{i=0}^{2L}W_m^{(i)}\mathcal{Y}_k^{(i)},\\ P_k^-&=\sum_{i=0}^{2L}W_c^{(i)}(\mathcal{Y}_k^{(i)}-m_k^-)(\mathcal{Y}_k^{(i)}-m_k^-)^T+Q_{k-1}. \end{aligned} \label{pm-ukf} \end{equation} \quad\,\,\,\textbf{Step 3.2 : }Update\par \quad Getting Sigma points \begin{equation} \begin{aligned} \mathcal{Y}_{k}^{-(0)}&=m_k^-\\ \mathcal{Y}_{k}^{-(i)}&=m_k^-+\sqrt{L+\lambda}\,\left[\sqrt{P_k^-}\right]\\ \mathcal{Y}_{k}^{-(i+L)}&=m_k^--\sqrt{L+\lambda}\,\left[\sqrt{P_k^-}\right],\,\,\,\,\,\,\,\,\,\, i = 1,.....,L. \end{aligned} \end{equation} \quad\quad\,\,\,Propagating sigma points through the measurement model \begin{equation} \mathcal{Z}_k^{(i)}=h(\mathcal{Y}_k^{-(i)}),\,\,\,\,\,\,\,\,\,\,i = 0,.....,2L. \end{equation} \quad\quad\,\,\,Getting mean $\mu_k$, predicted co-variance $S_k$ and cross co-variance $C_k$ \begin{equation} \begin{aligned} \mu_k^-&=\sum_{i=0}^{2L}W_m^{(i)}\mathcal{Z}_k^{(i)},\\ S_k^-&=\sum_{i=0}^{2L}W_c^{(i)}(\mathcal{Z}_k^{(i)}-\mu_k)(\mathcal{Z}_k^{(i)}-\mu_k)^T+R_k,\\ C_k^-&=\sum_{i=0}^{2L}W_c^{(i)}(\mathcal{Y}_k^{-(i)}-m_k^-)(\mathcal{Z}_k^{(i)}-\mu_k)^T. \end{aligned} \end{equation} \quad\,\,\,\textbf{Step 3.3 : }Getting filter gain $K_k$, filtered state mean $m_k$ and co-variance $P_k$ \par \quad\quad\quad\quad\quad\, conditional on measurement $y_k$. \begin{equation} \begin{aligned} K_k&=C_kS_k^{-1},\\ m_k&=m_k^-+K_k[y_k-\mu_k],\\ P_k&=P_k^--K_kS_kK_k^T. \end{aligned} \end{equation} Within the DT framework, the UKF algorithm is used for parameter estimation at a given time-step, $t_k$. \section{Gaussian Process Regression}\label{gpr} In this section, we briefly discuss the other component of the proposed DT framework, namely Gaussian process regression (GPR). GPR \cite{nayek2019gaussian,bilionis2012multi}, along with neural network \cite{kumar2021state,chakraborty2020simulation} are perhaps the most popular machine learning techniques in today's time. Unlike conventional frequentist machine learning techniques, GPR doesn't assume a functional form to represent input-output mapping; instead, a distribution over a function is assumed in GPR. Consequently, GPR has the inherent capability of capturing the epistemic uncertainty \cite{hullermeier2021aleatoric} arising due to limited data. This feature of GPR is particularly useful when it comes to decision making. Within the proposed DT framework, we use GPR to track the temporal evolution of the system parameters. We consider $\bm v_k$ to be the systems parameters and time $\tau_k$. In GPR, we represent $\bm v_k$ as \begin{equation}\label{eq:gpr} \bm v_k \sim \mathcal G \mathcal P \left( \bm \mu (\tau_k; \bm \beta), \bm \kappa (\tau_k, \tau_k'; \sigma^2, \bm l) \right), \end{equation} where $\bm \mu (\cdot; \bm \beta)$ and $\bm \kappa (\cdot, \cdot; \sigma^2, \bm l)$, respectively represent the mean function and the covariance function of the GPR. The mean function is parameterized by the unknown coefficient vector $\bm \beta$ and the covariance function is parameterized by the process variance $\sigma^2$ and the length-scale parameters $\bm l$. All the parameters combined, $\bm \theta = \left[ \bm \beta, \bm l, \sigma ^2 \right]$ are known as hyperparamters of GPR. It is worthwhile to note that choice of $\bm \mu (\cdot; \bm \beta)$ and $\bm \kappa (\cdot, \cdot; \sigma^2, \bm l)$ has significant influence on the performance of GP; this naturally allows an user to encode prior knowledge into the GPR model and model complex functions \cite{nayek2019gaussian}. In case there is no prior knowledge about the mean function, it is a common practice to use zero mean Gaussian process, \begin{equation}\label{eq:zero_gpr} \bm v_k \sim \mathcal G \mathcal P \left( \bm 0, \bm \kappa (\tau_k, \tau_k'; \sigma^2, \bm l) \right). \end{equation} The covariance function $\bf \kappa (\cdot, \cdot; \sigma^2, \bm l)$, on the other hand, should result in a positive, semi-definite matrix. For using the GPR in practice, one needs to compute the hyperparameters $\bm \theta$ based on training samples $\mathcal D = \left[ \tau_k, \bm v_k \right]_{k=1}^{N_s}$ where $N_s$ is the number of training samples. The most widely used method in this regards is based on the maximum likelihood estimation where the negative log-likelihood of GPR is minimized. For details on MLE for GPR, interested readers may refer \cite{rasmussen2003gaussian}. The other alternative is to compute the posterior distribution of hyperparameter vector $\bm \theta$ \cite{bilionis2012multi,bilionis2013multi}. This although a superior alternative, renders the process computationally expensive. In this work, we have used the MLE based approach because of this simplicity. For ease of readers, the steps involved in training a GPR model are shown in Algorithm \ref{alg:gpr_train}. \begin{algorithm}[ht!] \caption{Training GPR}\label{alg:gpr_train} \textbf{Pre-requisite: }Form of mean function $\bm \mu(\cdot; \bm \beta)$ and covariance function, $\bf \kappa (\cdot, \cdot; \sigma^2, \bm l)$. Provide training data, $\mathcal D = \left[ \tau_k, \bm v_k \right]_{k=1}^{N_s}$, initial values of the parameters, $\bm \theta_0$, maximum allowable iteration $n_{max}$ and error threshold $\epsilon_t$. \\ $\bm \theta \leftarrow \theta_0$; $iter \leftarrow 0$; $\epsilon \leftarrow 10 \epsilon_t$ \\ \Repeat{$iter \ge n_{max}$ and $\epsilon > \epsilon_t$}{ $iter \leftarrow iter + 1$ \\ $\bm \theta _ {iter - 1} \leftarrow \bm \theta$. \\ Compute the negative log-likelihood by using the training data $\mathcal D$ and $\bm \theta$ \[ f_{ML} \propto \frac{1}{N}\left| \mathbf K \left( \bm \theta \right) + \log \left( \bm v^T \mathbf R \left( \bm \theta \right)^{-1} \bm v \right) \right|,\] where $\mathbf K \left( \bm \theta \right)$ is the covariance matrix computed by using the training data and covariance function $\bf \kappa (\cdot, \cdot; \sigma^2, \bm l)$. $\bm v$ represents the observation vector. \\ Update hyperparameter $\bm \theta$ based on the gradient information. \\ $\bm \theta_{iter} \leftarrow \bm \theta$. \\ $\epsilon \leftarrow \left\| \bm \theta_{iter} - \bm \theta_{iter - 1} \right\|_2^2$ } \textbf{Output: }Optimal hyper-parameter, $\bm \theta^*$ \end{algorithm} Once the hyper-parameters $\bm \theta$ are computed, predictive mean and predictive variance corresponding to new input $\tau^*$ are computed as \begin{equation}\label{eq:pred_mean} \bm \mu^* = \bm \Phi \bm \beta^* + \bm \kappa^*(\tau^*;(\sigma^*)2, \bm l^*)\mathbf K^{-1}\left( \bm v - \bm \Phi \bm \beta^* \right), \end{equation} \begin{equation}\label{eq:pred_sd} s^2(\tau^*) = (\sigma^*)^2\left\{ 1 - \bm \kappa^*(\tau^*;(\sigma^*)2, \bm \theta^*) \mathbf K^{-1} \bm \kappa^*(\tau^*;(\sigma^*)2, \bm l^*)^T + \frac{\left[ 1 - \bm \Phi^T \mathbf K^{-1} \bm \kappa^*(\tau^*;(\sigma^*)2, \bm l^*)^T \right]}{\bm \Phi^T \mathbf K^{-1} \bm \Phi} \right\}, \end{equation} where $\bm \beta^*$, $\bm l^*$ and $\sigma^*$ represents the optimized hyper-parameters. $\bm \Phi$ in Eqs. (\ref{eq:pred_mean}) and (\ref{eq:pred_sd}) represents the design matrix. $\bm \kappa^*(\tau^*;(\sigma^*)2, \bm l^*)^T$ in Eqs. (\ref{eq:pred_mean}) and (\ref{eq:pred_sd}) are the covariance vector between the input training samples and $\tau^*$ and computed as \begin{equation} \bm \kappa^*(\tau^*;(\sigma^*)2, \bm l^*)^T = \left[ \kappa(\tau^*, \tau_1; ;(\sigma^*)2, \bm \theta^*), \ldots, \kappa(\tau^*, \tau_{N_s}; ;(\sigma^*)2, \bm \theta^*) \right]. \end{equation} \section{Proposed approach}\label{sec:pa} Having discussed UKF and GP, the two ingredients of the proposed approach, we proceed to discussing the proposed DT framework for nonlinear dynamical systems. A schematic representation of the proposed DT is shown in Fig. \ref{fig:dt}. It has four primary components, namely (a) selection of nominal model, (b) data collection, (c) parameter estimation at a given time-instant and (d) estimation of the temporal variation in parameters. The selection of nominal model has already been detailed in Section \ref{dm} and hence, here the discussion is limited to data collection, parameter estimation and estimation of temporal variation of the parameters only. \begin{figure}[ht!] \centering \includegraphics[width=0.9\textwidth]{schematic_DT.pdf} \caption{Schematic representation of the proposed digital twin framework. It comprises of low-fidelity model as nominal model, UKF for parameter estimation, GP for learning temporal evolution of parameters and predicting future values of system parameters, and high-fidelity model for estimating future responses.} \label{fig:dt} \end{figure} One major concern in DT is its connectivity with the physical counterpart; in absence of which, a DT will be of no practical use. To ensure connectivity, sensors are placed on the physical system (physical twin) for data collection. The data is communicated to the DT by using cloud technology. With the substantial advancements in IoT, the access to different types of sensors is straightforward for collecting different types of data. In this work, we have considered that accelerometers are mounted on the physical system and the DT receives acceleration measurements. To be specific, one can consider that the acceleration time-history are available to the DT intermittently at discrete time-instant $t_s$. Note that the proposed approach is equally applicable (with trivial modifications) if instead of acceleration, displacement or velocity measurements are available. The framework can also be extended to function in tandem with vision based sensors. However, from a practical and economic point-of-view, it is easiest to collect acceleration measurements and hence, the same has been considered in this study. Once the data is collected, the next objective is to estimate the system parameters (stiffness matrix to be specific), assuming that at time-instant $t_s$, acceleration measurements are avilable in $\left[t_s - \Delta t, t_s \right]$, where $\Delta t$ is time interval over which acceleration measurement is available at $t_s$. It is to be noted that $t_s$ is a time-step in the slow time-scale whereas $\Delta t$ is time interval in the fast time-scale. With this setup, the parameter estimation objective is to estimate $\mathbf K(t_s)$. In this work, we estimate $\mathbf K(t_s)$ by using the UKF. Details on how parameter estimation is carried out using UKF is elaborated in Section \ref{bf}. The last step within the proposed DT framework is to estimate the temporal evolution of the parameters. This is extremely important as it enables the DT to predict future behavior of the physical system. In this work, we propose to use a combination of GPR and UKF for learning the temporal evolution of the system parameters. To be specific, consider $\bm t = \left[t_1, t_2,\ldots, t^N \right]$ to be time-instants in slow-scale. Also, assume that using UKF, the estimated the system parameters are available at different time-instants as $\bm v = \left[ \bm v_1, \bm v_2, \ldots, \bm v_N \right]$, where $\bm v_i$ includes the elements of stiffness matrix. The proposed work trains a GPR model between $\bm t$ and $\bm v$, \begin{equation}\label{eq:gp_dt} \bm v \sim \mathcal G \mathcal P (\bm \mu, \bm \kappa). \end{equation} Note that for brevity, the hyperparameters in Eq. (\ref{eq:gp_dt}) are omitted. The GPR is trained by following the procedure discussed ion Algorithm \ref{alg:gpr_train}. Once trained, the GPR can predict the system parameters at future time-steps. Note that GPR being a Bayesian machine learning model also provides the predictive uncertainty which can be used to judge the accuracy of the model. For the ease of readers, the overall DT framework proposed is shown in Algorithm \ref{alg:dt}. \begin{algorithm}[ht!] \caption{Proposed DT}\label{alg:dt} Select nominal model \Comment*[r]{Section \ref{dm}}. Use data (acceleration measurements) $\mathcal D_s$ collected at time $t_s$ to compute the parameters $\mathbf K(t_s)$ \Comment*[r]{Section \ref{bf}}. Train a GP using $\mathcal D = \left[ t_n, \bm v_n\right]_{n=1}^{t_s}$ as training data, where $\bm v_n$ represents the system parameter \Comment*[r]{Algorithm \ref{alg:gpr_train}}. Predict $\mathbf K(\tilde t)$ at future time $\tilde t$\Comment*[r]{Section \ref{gpr}} Substitute $\mathbf K(\tilde t)$ into the governing equation (high-fidelity model) and solve it to obtain responses at time $\tilde t$. \\ Take decisions related to maintenance, remaining useful life and health of the system. \\ Repeat steps $2-6$ as more data become available \end{algorithm} \section{Numerical Illustrations}\label{ni} In this section, we present two examples to illustrate the performance of the proposed DT framework. The first example selected is a 2-DOF system with duffing oscillator attached at the first floor. As the second example, a 7-DOF system is considered. For this example, the nonlinearity in the system arises because of a duffing van der pol oscillator attached between the third and the fouth DOF. As stated earlier, we have considered that acceleration measurements at different time-steps are available. The objective here is to use the proposed DT to compute the time-evolution of the system parameters. Once the time-evolution of the parameters are known, the proposed DT can be used for predicting the responses of the system at future time-steps ($t_s$) (see Algorithm \ref{alg:dt} for details). In this section, we have illustrated how the proposed approach can be used for predicting the time-evolution of the system parameters in the past as well as in the future. \subsection{2-DOF system with duffing oscillator}\label{subsec:duffing} As the first example, we consider a 2-DOF system as shown in Fig. \ref{fig:2dof}. The nonlinear duffing oscillator is attached with the first degree of freedom. The coupled governing equations for this system are represented as \begin{equation}\label{2dof-dynamic} \begin{aligned} &m_1\ddot{x}_1+c_1\dot{x}_1+k_1x_1+\alpha_{DO} {x_1}^3+c_2(\dot{x}_1-\dot{x}_2)+k_2(x_1-x_2)=\sigma_1\dot{W}_1+f_1, \\ &m_2\ddot{x}_2+c_2(\dot{x}_2-\dot{x}_1)+k_2(x_2-x_1)=\sigma_2\dot{W}_2+f_2, \end{aligned} \end{equation} where $m_i$, $c_i$ and $k_i$, respectively, represent the mass, damping and stiffness of the $i-$th degree of freedom. Although not explicitly shown, it is to be noted that $k_i$ changes with the slow time-scale $t_s$. $F_i$ and $\sigma_i\dot{W}_i$, respectively, represents the deterministic and the stochastic force acting on the $i-$th floor. $\alpha_{DO}$ controls the nonlinearity in the system. The parametric values considered for this example are shown in Table \ref{tab:param_eg1}. \begin{figure}[ht!] \centering \includegraphics[width = 0.4\textwidth]{2dof.pdf} \caption{Schematic representation of the 2-DOF System with duffing oscillator considered in example 1. The nonlinear duffing oscillator is attached with the first degree of freedom (shown in magenta).} \label{fig:2dof} \end{figure} \begin{table}[ht!] \caption{System Parameters for 2-DOF System}\label{tab:param_eg1} \centering \resizebox{1\linewidth}{!}{ \begin{tabular}{|c|c|c|c|c|} \hline Mass&Stiffness&Damping&Force(N)&Stochastic Noise\\ (Kg)&Constant (N/m)&Constant (Ns/m)&$F_i=\lambda_i sin(\omega_i t)$&Parameters\\ \hline $m_1 = 20$&$k_1 = 1000$&$c_1 = 10$&$\lambda_1 = 10,\,\,\omega_1 = 10$&$s_1 = 0.1$\\ $m_2 = 10$&$k_2 = 500$&$c_2 = 5$&$\lambda_2 = 10,\,\,\omega_2 = 10$&$s_2 = 0.1$\\ \hline \multicolumn{5}{|c|}{DO Oscillator Constant, $\alpha_{DO}=100$}\\ \hline \end{tabular} } \end{table} \noindent The system states are defined as: \begin{equation} \begin{matrix}x_1 = y_1, & x_2 = y_2,\\ \dot{x}_1 = y_3, & \dot{x}_2 = y_4,\end{matrix} \end{equation} and the governing equation in Eq. (\ref{2dof-dynamic}) is represented in the form of Ito-diffusion equations to obtain the drift and dispersion coefficients: \begin{equation}\label{eq:ito} d \bm y= \bm a\,dt + \mathbf b\,d\bm W, \end{equation} where \begin{subequations} \begin{equation} \bm a=\left[\begin{array}{c} y_{3}\\ y_{4}\\ \frac{f_1}{m_1}-\frac{1}{m_1}\left(c_{1}\,y_{3}+c_{2}\,y_{3}-c_{2}\,y_{4}+k_{1}\,y_{1}+k_{2}\,y_{1}-k_{2}\,y_{2}+\alpha_{do} \,{y_{1}}^3\right)\\ \frac{1}{m_2}\left({c_{2}\,y_{3}-c_{2}\,y_{4}+k_{2}\,y_{1}-k_{2}\,y_{2}}{m_{2}}\right)+\frac{f_2}{m_2} \end{array}\right] \end{equation} \begin{equation} \mathbf{b}=\left[\begin{matrix}0 & 0 \\ 0 & 0\\ \frac{{\sigma}_{1}}{m_{1}} & 0\\ 0 & \frac{{\sigma}_{2}}{m_{2}}\end{matrix}\right]. \end{equation} \end{subequations} For illustrating the performance of the proposed digital twin, we generate synthetic data by simulating Eq. (\ref{eq:ito}). The data simulation is carried out using Taylor 1.5 strong scheme \cite{tripura2020ito,roy2017stochastic} \begin{equation} \begin{aligned} \bm y_{k+1}=(\bm y + \bm a \Delta t+&\mathbf{b}\Delta \bm w+0.5L^j(\mathbf{b}) \left( {\Delta {w^2} - \Delta t} \right) + L^j(\bm a)\Delta \bm z\\ &+L^0(\mathbf{b}) \left( {\Delta {w}\Delta t - \Delta {z}} \right) +0.5L^0(\bm a){\Delta t}^2)_k \label{eq:T1.5} \end{aligned} \end{equation} where, $L^0$ and $L^j$ are Kolmogorov operators \cite{roy2017stochastic} evaluated on drift and diffusion coefficients i.e. on elements of $\bm a$ and $\textbf{b}$. $\bm \Delta w$ and $\bm \Delta z$ are the Brownian increments \cite{roy2017stochastic} evaluated at each time step $\Delta t$. Before proceeding with the performance of the proposed DT, we investigate the performance of UKF in joint parameter state estimation. To avoid the so called `inverse crime' \cite{wirgin2004inverse}, Euler Maruyama (EM) integration scheme is used during filtering. \begin{equation}\label{eq:em} \bm y_{k+1} = \left( \bm y + \bm a \Delta t + \mathbf b \Delta \bm w \right)_k. \end{equation} It may be noted that EM integration scheme provides a lower-order approximation as compared to Taylor's 1.5 strong integration scheme. In other words, the data is generated using a more accurate scheme as compared to the filtering. This helps in emulating a realistic scenario. For combined state-parameter estimation, the state space vector is modified as $ \bm {y}=\left[ y_{1}\,\, y_{2} \,\, y_{3} \,\, y_{4} \,\, k_{1} \,\, k_{2} \right]^T$. Consequently, $\bm a$ and $\mathbf b$ are also modified as: \begin{subequations} \begin{equation} \bm a=\left[\begin{array}{c} y_{3}\\ y_{4}\\ \frac{f_1}{m_1}-\frac{1}{m_1}\left({c_{1}\,y_{3}+c_{2}\,y_{3}-c_{2}\,y_{4}+k_{1}\,y_{1}+k_{2}\,y_{1}-k_{2}\,y_{2}+\alpha_{do} \,{y_{1}}^3}\right)\\ \frac{1}{m_2}\left({c_{2}\,y_{3}-c_{2}\,y_{4}+k_{2}\,y_{1}-k_{2}\,y_{2}}\right)+\frac{f_2}{m_2}\\0\\0\end{array}\right], \end{equation} \begin{equation} \mathbf b=\left[\begin{matrix} 0 &0\\ 0 &0\\ \frac{\sigma_1}{m_1} &0\\ 0 &\frac{\sigma_2}{m_2}\\0 &0\\0 &0\end{matrix}\right]. \end{equation} \end{subequations} For obtaining the dynamic model function for UKF model, first two terms of EM algorithm are used. \begin{equation} \bm f(\bm y)= \bm y + \bm a \Delta t. \label{EM1} \end{equation} For estimating the noise covariance $\mathbf Q$, $q$ is expressed as: \begin{equation} \bm q = \mathbf q_c \bm {RV}, \label{pnc:Q} \end{equation} where $\mathbf q_c$ is a constant diagonal matrix which is multiplied by vector of random variables $\bm {RV}$ to compute $\bm q$. The basic form for $\mathbf q_c$ is extracted from the remaining terms of EM algorithm i.e., $\mathbf{b}\Delta \bm w$. \begin{equation} \begin{array}{c} \mathbf {q_c} = diag\left[\begin{array}{cccccc} 0& 0& \frac{\sigma_1\sqrt{dt}}{m_1}& \frac{\sigma_2\sqrt{dt}}{m_2}& 0& 0\end{array}\right],\\ \mathbf Q = \mathbf q_c \mathbf q_c^T. \end{array} \end{equation} The individual terms of $\mathbf Q$ can then be modified by any suitable factor to improve the accuracy of the filter. Considering that the acceleration measurements are available to the DT, the simulated acceleration measurements are obtained as: follows: \begin{equation}\label{eq:acc} \bm A = -\mathbf{M}^{-1}(\bm G+\mathbf{K}X+\mathbf{C}\dot{X}), \end{equation} where $\mathbf M$, $\mathbf C$ and $\mathbf K$ are the mass, damping and stiffness matrices. $\bm G$, as already discussed in Eq. (\ref{eq:nominal}) is the contribution due to the nonlinearity in the system. Eq. (\ref{eq:acc}) can be written in the state-space form as \begin{equation}\label{eq:acc_2dof} \bm A=\left[\begin{matrix}-\frac{1}{m_1}\left({c_{1}\,y_{3}+c_{2}\,y_{3}-c_{2}\,y_{4}+k_{1}\,y_{1}+k_{2}\,y_{1}-k_{2}\,y_{2}+\alpha_{do} \,{y_{1}}^3}\right)\\ \frac{1}{m_2}\left({c_{2}\,y_{3}-c_{2}\,y_{4}+k_{2}\,y_{1}-k_{2}\,y_{2}}\right)\end{matrix}\right]. \end{equation} Using Eq. \ref{eq:acc_2dof}, the observation/measurement model for the UKF can be written as \begin{equation} \bm h(\bm y)=\left[\begin{matrix}-\frac{1}{m_1}\left({c_{1}\,y_{3}+c_{2}\,y_{3}-c_{2}\,y_{4}+k_{1}\,y_{1}+k_{2}\,y_{1}-k_{2}\,y_{2}+\alpha_{do} \,{y_{1}}^3}\right)\\ \frac{1}{m_2}\left({c_{2}\,y_{3}-c_{2}\,y_{4}+k_{2}\,y_{1}-k_{2}\,y_{2}}\right)\end{matrix}\right]. \end{equation} The simulated acceleration measurements are corrupted by white Gaussian noise having a signal-to-noise ratio (SNR) of 50, where SNR is defined as: $\text{SNR} = {{\sigma _{\text{signal}}^2} \mathord{\left/ {\vphantom {{\sigma _{data}^2} {\sigma _{noise}^2}}} \right. \kern-\nulldelimiterspace} {\sigma _{\text{noise}}^2}}$ and $\sigma$ is the standard deviation. The deterministic force vector is also corrupted by white Gaussian noise having SNR of 20. Representative examples of acceleration and deterministic force for this problem are shown in Fig. \ref{fig:samp_f_acc_2dof}. We use UKF along with the acceleration and deterministic force measurements, $\bm f(\bm y)$ and $\bm h(\bm y)$ for combined parameter state estimation. \begin{figure}[ht!] \centering \includegraphics[scale = 0.35]{acc_force_2.pdf} \caption{Sample Acceleration and deterministic component of the force for the 2-DOF problem. The stochasticity observed for the force is due to the noise present. Note that there is an additional stochastic component of force as shown in Eq. (\ref{eq:em}).}\label{fig:samp_f_acc_2dof} \end{figure} Fig. \ref{fig:2dof-1dp} shows the combined state parameter estimation results for first data point i.e. $t_{s(i)} = t_{s(1)}$ of 2- DOF system. This is a relatively simple case where measurements at both degrees of freedom are available (see Fig. \ref{fig:fa-2dof-1dp}). It can be observed that UKF provides highly accurate estimates of the state vectors. As for parameter estimation (see Fig. \ref{fig:2dof-1dp}(b)), we observe that UKF provides highly accurate estimate for $k_1$. As for $k_2$, compared to the ground truth ($k_2 = 500$N/m), the proposed approach ($k_2 = 487.5$N/m) provides an accuracy of around 98\%. \begin{figure}[ht!] \centering \includegraphics[scale = 0.35]{fa_1dp_2dof_1.pdf} \caption{ Deterministic component of force and acceleration vectors at the two DOFs. The noisy acceleration vectors are provided as measurement to the UKF model.} \label{fig:fa-2dof-1dp} \end{figure} \begin{figure}[ht!] \begin{subfigure}{1\textwidth} \centering \includegraphics[scale = 0.35]{dv_1dp_2dof_1.pdf} \caption{ State (Displacement And Velocity) Estimation} \end{subfigure} \begin{subfigure}{1\textwidth} \centering \includegraphics[scale = 0.35]{k_1dp_2dof_1.pdf} \caption{ Parameter (Stiffness) Estimation} \end{subfigure} \caption{ Combined state and parameter estimation results for the 2DOF system. Noisy measurements of acceleration at both the DOFs are provided as input to the UKF algorithm. The results corresponds to the initial measurement data.} \label{fig:2dof-1dp} \end{figure} Fig. \ref{2dof-1dp-91} shows the result for an intermediate data point i.e. at time $t_{s(i)} = t_{s(91)}$. The initial values of parameter while filtering are taken as the final values of parameter obtained from previous data point. Similar to that observed for the initial data point, Fig. \ref{2dof-1dp-91} shows that the filter manages to estimate the states accurately and also improves upon the parameter estimation. \begin{figure}[ht!] \centering \includegraphics[scale = 0.35]{fa_1dp_2dof_91.pdf} \caption{ Force (deterministic part) and acceleration vectors at an intermediate time-step. The noisy accelerations at the 2DOFs are provided as measurements to the UKF algorithm.} \end{figure} \begin{figure}[ht!] \begin{subfigure}{1\textwidth} \centering \includegraphics[scale = 0.35]{dv_1dp_2dof_91.pdf} \caption{ State (Displacement And Velocity) Estimation} \end{subfigure} \begin{subfigure}{1\textwidth} \centering \includegraphics[scale = 0.35]{k_1dp_2dof_91.pdf} \caption{ Parameter (Stiffness) Estimation} \end{subfigure} \caption{ Combined state and parameter estimation results for the 2DOF system. Noisy measurements of acceleration at both the DOFs are provided as input to the UKF algorithm. The results corresponds to an intermediate measurement data.} \label{2dof-1dp-91} \end{figure} \noindent Next, we consider a more challenging scenario where data at only one DOF is available. To be specific, acceleration measurements at DOF-1 is considered to be available (see Fig. \ref{fa-2dof-1dp-1acc}). This changes the measurement model $h(.)$ while filtering and reduce it to, \begin{equation} h(y) = -\frac{1}{m_1}\left({c_{1}\,y_{3}+c_{2}\,y_{3}-c_{2}\,y_{4}+k_{1}\,y_{1}+k_{2}\,y_{1}-k_{2}\,y_{2}+\alpha_{do} \,{y_{1}}^3}\right) . \end{equation} Fig. \ref{2dof-1dp-1acc} shows the state and parameter estimation results for this case. Similar to previous case, it can be observed that the state estimate and the estimate for $k_1$ are obtained with high degree of accuracy (see Fig. \ref{2dof-1dp-1acc}). Estimate for $k_2$ also approaches the ground truth ($k_2 = 500N/m$) giving an accuracy of approximately 98\%.\noindent \begin{figure}[ht!] \centering \includegraphics[scale = 0.35]{one_acc_fa_1dp_2dof.pdf} \caption{Deterministic component of force and acceleration vector used in UKF. For this case, only acceleration measurements at first degree of freedom is available.} \label{fa-2dof-1dp-1acc} \end{figure} \begin{figure}[ht!] \begin{subfigure}{1\textwidth} \centering \includegraphics[scale = 0.35]{one_acc_dv_1dp_2dof.pdf} \caption{State (Displacement And Velocity) Estimation} \end{subfigure} \begin{subfigure}{1\textwidth} \centering \includegraphics[scale = 0.35]{one_acc_k_1dp_2dof.pdf} \caption{Parameter (Stiffness) Estimation} \end{subfigure} \caption{Combined state and parameter estimation results for the 2DOF system estimated from only one acceleration measurements. The noisy acceleration measurement at DOF 1 is provided to the UKF as measurement.} \label{2dof-1dp-1acc} \end{figure} Finally, we focus on the other objective of the DT, which is to compute the time-evolution of the parameters, considering the stiffness to vary with slow time-scale $t_s$ as follows. \begin{equation}\label{eq:degradation} k(t_s) = k_0\delta, \end{equation} where \begin{equation} \delta = e^{-0.5\times10^{-4}\times t_s}. \label{del} \end{equation} We consider that acceleration measurements are available for 5 seconds every 50 days. UKF is utilized as discussed before for computing the stiffness at each time-steps. The resulting data obtained is shown in Fig. \ref{f2}. Once the data points are obtained, GP is employed to evaluate the temporal evolution of the parameters. \begin{figure}[ht!] \centering \begin{subfigure}{0.45\textwidth} \centering \includegraphics[width=\textwidth]{k1_2dof_multi_dp_combined.pdf} \caption{Stiffness ($k_1$)} \end{subfigure} \begin{subfigure}{0.45\textwidth} \centering \includegraphics[width=\textwidth]{k2_2dof_multi_dp_combined.pdf} \caption{Stiffness ($k_2$)} \end{subfigure} \caption{Estimated stiffness in slow-time-scale using the UKF algorithm for the 2DOF example. State estimations at selected time-steps are also shown. Good match between the ground truth and the filtered result is obtained. These data act as input to the Gaussian process (GP).} \label{f2} \end{figure} Fig. \ref{gp2} shows results obtained using GP. The vertical lines in Fig. \ref{gp2} indicate the time until which data is provided to the GP. It is observed that GP yields highly accurate estimate of the two stiffness. Interestingly, results obtained using GP are not only accurate in the time-window (indicated by the vertical line) but also outside. This indicates the the proposed DT can be used for predicting the system parameters at future time-step which in-turn can be used for predicting the future responses and solving remaining useful life and predictive maintenance optimization problems. Additionally, GP being a Bayesian machine learning algorithm provides an estimate of the confidence interval. This can be used for collecting more data and in decision making. \begin{figure}[ht!] \centering \includegraphics[width=0.8\textwidth]{gp_2dof.pdf} \caption{Results representing the performance of the proposed digital twin for the 2DOF system. The GP is trained using the data generated using UKF. Data upto the horizontal line is available to the GP. The digital twin performs well even when predicting system parameters at future time-steps.} \label{gp2} \end{figure} \subsection{7-DOF system with duffing van der pol oscillator} As our second example we consider a 7-DOF system as shown in Fig. \ref{7dof}. The 7-DOF system is modeled with a DVP oscillator at fourth DOF. The governing equations of motion for the 7-DOF system are given as, \begin{figure}[ht!] \centering \includegraphics[scale = 0.35]{7dof.pdf} \caption{Schematic representation of the 7-DOF System with duffing Van-der Pol oscillator considered in example 2. The nonlinear DVP oscillator is attached with the fourth degree of freedom (shown in red).} \label{7dof} \end{figure} \begin{equation}\label{7dof-dynamic} \textbf M \ddot {\bm X} + \mathbf C \dot {\bm X} + \mathbf K \bm X + \bm G \left( \bm X, \bm \alpha \right) = \bm F + \bm \Sigma {\bm {\dot{W}}}, \end{equation} where $\mathbf M = diag\left[m_1,\ldots, m_7\right] \in \mathbb R^{7\times 7}$, $\bm X = \left[x_1,\ldots, x_7\right]^T \in \mathbb R^{7}$, $\bm \Sigma = diag\left[\sigma_1, \ldots, \sigma_7\right] \in \mathbb R^{7\times 7}$, $\bm {\dot{W}} = \left[\dot{W}_1, \ldots, \dot{W}_7\right]^T \in \mathbb R^{7}$, $\bm F = \left[f_1, \ldots, f_7\right]^T \in \mathbb R^{7}$ and \[\bm G = \alpha_{DVP}\left[\begin{matrix}\bm 0_{1\times3}& (x_3-x_4)^3& (x_4-x_3)^3& \bm 0_{1\times2}\end{matrix}\right]^T \in \mathbb R^7.\] $\mathbf C$ and $\mathbf K$ in Eq. (\ref{7dof-dynamic}) are tri-diagonal matrices representing damping and stiffness (linear component), \begin{equation} \mathbf C = \left[\begin{matrix}c_1+c_2 & -c_2 & & & & & \\ -c_2 & c_2+c_3 & -c_3 & & & & \\ & -c_3 & c_3+c_4 & -c_4 & & & \\ & & -c_4 & c_4+c_5 & -c_5 & & \\ & & & -c_5 & c_5+c_6 & -c_6 & \\ & & & & -c_6 & c_6+c_7 & -c_7\\ & & & & & -c_6 & c_7\end{matrix}\right], \end{equation} \begin{equation} \mathbf K = \left[\begin{matrix}k_1+k_2 & -k_2 & & & & & \\ -k_2 & k_2+k_3 & -k_3 & & & & \\ & -k_3 & k_3-k_4 & k_4 & & & \\ & & k_4 & -k_4+k_5 & -k_5 & & \\ & & & -k_5 & k_5+k_6 & -k_6 & \\ & & & & -k_6 & k_6+k_7 & -k_7\\ & & & & & -k_6 & k_7\end{matrix}\right], \end{equation} where $m_i$, $c_i$ and $k_i$, respectively, represent the mass, damping and stiffness of the $i-$th degree of freedom. We have considered the stiffness of all, but the fourth DOF to vary with the slow time-scale $t_s$. The rationale behind not varying the stiffness corresponding to the 4th DOF resides in the fact that nonlinear stiffness is generally used for vibration control \cite{das2021robust} and energy harvesting \cite{cao2019novel} and hence, is kept constant. Parametric values for the 7-DOF system are shown in Table \ref{7dof-t1}. \begin{table}[ht!] \centering \resizebox{1\linewidth}{!}{ \begin{tabular}{|c|c|c|c|c|c|} \hline Index&Mass&Stiffness&Damping&Force(N)&Stochastic Noise\\ i&(Kg)&Constant (N/m)&Constant (Ns/m)&$F_i=\lambda_i sin(\omega_i t)$&Parameters\\ \hline i = 1,2&$m_i = 20$&$k_i = 2000$&\multirow{3}{*}{$c_i = 20$}&\multirow{3}{*}{$\lambda_i = 10,\,\,\omega_i = 10$}&\multirow{3}{*}{$s_i = 0.1$}\\ \cline{1-3} i = 3,4,5,6&$m_i = 10$&$k_i = 1000$&&&\\ \cline{1-3} i = 7&$m_i = 5$&$k_i = 500$&&&\\ \hline \multicolumn{6}{|c|}{DVP Oscillator Constant, $\alpha_{DVP}=100$}\\ \hline \end{tabular} } \caption{System Parameters -- 7-DOF System -- Data Simulation} \label{7dof-t1} \end{table} To convert the governing equations for 7 DOF system to state space equations, the following transformations are considered: \begin{equation} \begin{matrix}x_1 = y_1, & \dot{x}_1 = y_2, & x_2 = y_3, & \dot{x}_2 = y_4, & x_3 = y_5, & \dot{x}_3 = y_6, & x_4 = y_7\\ \dot{x}_4 = y_8, & x_5 = y_9, & \dot{x}_5 = y_{10}, & x_6 = y_{11}, & \dot{x}_6 = y_{12}, & x_7 = y_{13}, & \dot{x}_7 = y_{14}\end{matrix} \end{equation} Using Eq. (\ref{eq:ito}), dispersion and drift matrices for 7-DOF system are identified as follows: \begin{equation}\label{7bm} b_{ij} = \left\{\begin{array}{ll} \frac{\sigma_i}{m_i},&\text{ for }i = 2j\text{ and }j=(1,2,3,5,6,7)\\ \frac{\sigma_i}{m_i}y_{2j-1},&\text{ for }i = 2j\text{ and }j = 4\\ 0,&\text{ elsewhere} \end{array}\right. \end{equation} \begin{equation} \bm a=\left[\begin{array}{c} y_{2}\\ \frac{f_1}{m_1}-\frac{1}{m_1}\left({y_{1}\,\left(k_{1}+k_{2}\right)-c_{2}\,y_{4}-k_{2}\,y_{3}+y_{2}\,\left(c_{1}+c_{2}\right)}\right)\\ y_{4}\\ \frac{f_2}{m_2}+\frac{1}{m_2}\left({c_{2}\,y_{2}-y_{3}\,\left(k_{2}+k_{3}\right)+c_{3}\,y_{6}+k_{2}\,y_{1}+k_{3}\,y_{5}-y_{4}\,\left(c_{2}+c_{3}\right)}\right)\\ y_{6}\\ \frac{f_3}{m_3}-\frac{1}{m_3}\left({k_{4}\,y_{7}-c_{4}\,y_{8}-k_{3}\,y_{3}-c_{3}\,y_{4}+y_{5}\,\left(k_{3}-k_{4}\right)+\alpha_{DVP} \,{\left(y_{5}-y_{7}\right)}^3+y_{6}\,\left(c_{3}+c_{4}\right)}\right)\\ y_{8}\\ \frac{f_4}{m_4}+\frac{1}{m_4}\left({c_{4}\,y_{6}+c_{5}\,y_{10}-k_{4}\,y_{5}+k_{5}\,y_{9}+y_{7}\,\left(k_{4}-k_{5}\right)+\alpha_{DVP} \,{\left\{y_{5}-y_{7}\right\}}^3-y_{8}\,\left(c_{4}+c_{5}\right)}\right)\\ y_{10}\\ \frac{f_5}{m_5}+\frac{1}{m_5}\left({c_{5}\,y_{8}-y_{9}\,\left(k_{5}+k_{6}\right)+c_{6}\,y_{12}+k_{5}\,y_{7}+k_{6}\,y_{11}-y_{10}\,\left(c_{5}+c_{6}\right)}\right)\\ y_{12}\\ \frac{f_6}{m_6}+\frac{1}{m_6}\left({c_{6}\,y_{10}-y_{11}\,\left(k_{6}+k_{7}\right)+c_{7}\,y_{14}+k_{6}\,y_{9}+k_{7}\,y_{13}-y_{12}\,\left(c_{6}+c_{7}\right)}\right)\\ y_{14}\\ \frac{f_7}{m_7}+\frac{1}{m_7}\left({c_{7}\,y_{12}-c_{7}\,y_{14}+k_{7}\,y_{11}-k_{7}\,y_{13}}\right) \end{array}\right] \label{7am} \end{equation} Similar to previous example data simulation is carried out using Taylor-1.5-Strong algorithm shown in Eq. (\ref{eq:T1.5}) and filtering model is formed using EM equation shown in Eq. (\ref{eq:em}). For performing combined state parameter estimation state vector is modified to: \begin{equation} \bm y = \left[\bm y_{1:14}, \bm k_{1:7} \right]^T \end{equation} Consequently $\bm a$ and $\bm b$ matrices are changed as: $\bm a = [\bm a_{state}^T, \bm 0_{1\times 6}]^T$ and $\bm b = [\bm b_{state}^T,\,\,\bm 0_{7\times 7}]^T$ where $\bm a_{state}$ and $\bm b_{state}$ are equal to $\bm a$ and $\bm b$ from Eq. (\ref{7am}) and Eq. (\ref{7bm}) respectively. Note that although the value $k_4$ is a-priori known, we have still considered it into the state vector. It was observed that such a setup helps in regularizing the UKF estimates. Dynamic model function, $\bm f(y)$ is obtained using Eq. (\ref{EM1}) and acceleration measurements are obtained using Eq. (\ref{eq:acc}). Since for measurement, accelerations of all DOF are considered, measurement model for the UKF remains same as acceleration model and can be written as, \begin{equation} \bm {h(y)} = \left[\begin{matrix}-\frac{1}{m_1}\left({y_{1}\,\left(k_{1}+k_{2}\right)-c_{2}\,y_{4}-k_{2}\,y_{3}+y_{2}\,\left(c_{1}+c_{2}\right)}\right)\\ \frac{1}{m_2}\left({c_{2}\,y_{2}-y_{3}\,\left(k_{2}+k_{3}\right)+c_{3}\,y_{6}+k_{2}\,y_{1}+k_{3}\,y_{5}-y_{4}\,\left(c_{2}+c_{3}\right)}\right)\\ -\frac{1}{m_3}\left({k_{4}\,y_{7}-c_{4}\,y_{8}-k_{3}\,y_{3}-c_{3}\,y_{4}+y_{5}\,\left(k_{3}-k_{4}\right)+\alpha_{DVP} \,{\left(y_{5}-y_{7}\right)}^3+y_{6}\,\left(c_{3}+c_{4}\right)}\right)\\ \frac{1}{m_4}\left({c_{4}\,y_{6}+c_{5}\,y_{10}-k_{4}\,y_{5}+k_{5}\,y_{9}+y_{7}\,\left(k_{4}-k_{5}\right)+\alpha_{DVP} \,{\left(y_{5}-y_{7}\right)}^3-y_{8}\,\left(c_{4}+c_{5}\right)}\right)\\ \frac{1}{m_5}\left({c_{5}\,y_{8}-y_{9}\,\left(k_{5}+k_{6}\right)+c_{6}\,y_{12}+k_{5}\,y_{7}+k_{6}\,y_{11}-y_{10}\,\left(c_{5}+c_{6}\right)}\right)\\ \frac{1}{m_6}\left({c_{6}\,y_{10}-y_{11}\,\left(k_{6}+k_{7}\right)+c_{7}\,y_{14}+k_{6}\,y_{9}+k_{7}\,y_{13}-y_{12}\,\left(c_{6}+c_{7}\right)}\right)\\ \frac{1}{m_7}\left({c_{7}\,y_{12}-c_{7}\,y_{14}+k_{7}\,y_{11}-k_{7}\,y_{13}}\right)\end{matrix}\right] \end{equation} Process noise co-variance matrix $\mathbf{Q}$ is obtained using the same process as discussed for 2-DOF system (refer Eq. (\ref{pnc:Q})) and is written as, \begin{equation} \begin{array}{c} \bm {q_c} = \sqrt{dt}\,\, diag\Large\left[\begin{smallmatrix}0& \frac{\sigma_1}{m_1}& 0& \frac{\sigma_2}{m_2}& 0& \frac{\sigma_3}{m_3}& 0& \frac{m_k^-(7)\,\,\sigma_4}{m_4}& 0& \frac{\sigma_5}{m_5}& 0& \frac{\sigma_6}{m_6}& 0& \frac{\sigma_7}{m_7}& 0& 0& 0& 0& 0& 0& 0\end{smallmatrix}\right]\\ \mathbf{Q} = q_cq_c^T \end{array} \end{equation} \noindent Where, $m_k^-(7)$ is the seventh element of UKF's predicted mean calculated from Eq. (\ref{pm-ukf}). The acceleration measurements and applied force are corrupted with a Gaussian noise having SNR values of 50 and 20 respectively. A comparison of the acceleration response obtained from data simulation and used in filtering is presented in Fig. \ref{acc-f-7dof}. \begin{figure}[ht!] \centering \includegraphics[scale = 0.4]{acc_force_7.pdf} \caption{Sample Acceleration and deterministic component of the force for the 7-DOF problem. The stochasticity observed for the force is due to the noise present. Note that there is an additional stochastic component of force as shown in Eq. (\ref{eq:em}).} \label{acc-f-7dof} \end{figure} Similar to the previous example, we first examine the performance of the UKF algorithm. To that end, the acceleration vectors (noisy) shown in Fig. \ref{fa-7dof-1dp-1} is considered as the measurements. The state and parameter estimation results obtained using the UKF algorithm are shown in Fig. \ref{7dof-1dp-1}. It can be observed that the proposed approach yields highly accurate estimate of the state vectors. As for the parameter estimation, $k_2$, $k_3$ and $k_5$ converge exactly towards their respective true values. As for $k_1$, $k_6$ and $k_7$, UKF yields an accuracy of around 95\%. A summary of the estimated parameters in the slow time-scales is shown in Fig. \ref{f7-1} and Fig. \ref{f7-2}. We observe that the estimates for new data points improve as our initial guess of system parameter improves (which for our case is the final parameters obtained from previous data points). Similar to Fig. \ref{7dof-1dp-1}, we observe that the estimates for stiffness $k_2$, $k_3$ and $k_5$ are more accurate than those obtained for $k_1$, $k_6$ and $k_7$. These data is used for training the GP model. \begin{figure}[ht!] \centering \includegraphics[scale = 0.4]{fa_1dp_7dof_1.pdf} \caption{Deterministic component of force and acceleration vector corresponding to DOF 1, 4 and 7 used in UKF. The noisy acceleration vectors are provided as measurements to the UKF algorithm.} \label{fa-7dof-1dp-1} \end{figure} \begin{figure}[ht!] \begin{subfigure}{0.45\textwidth} \centering \includegraphics[scale = 0.35]{dv_1dp_7dof_1.pdf} \caption{State (Displacement And Velocity) Estimation} \end{subfigure} \begin{subfigure}{0.45\textwidth} \centering \includegraphics[scale = 0.35]{k_1dp_7dof_1.pdf} \caption{Parameter (Stiffness) Estimation} \end{subfigure} \caption{Combined state and parameter estimation results for the 7-DOF van der pol system.} \label{7dof-1dp-1} \end{figure} \begin{figure}[ht!] \begin{subfigure}{0.45\textwidth} \centering \includegraphics[scale = 0.25]{k1_7dof_multi_dp_combined.pdf} \caption{k1} \end{subfigure} \begin{subfigure}{0.45\textwidth} \centering \includegraphics[scale = 0.25]{k2_7dof_multi_dp_combined.pdf} \caption{k2} \end{subfigure} \caption{Estimated stiffness ($k_1$ and $k_2$) in slow-time-scale using the UKF algorithm for the 7DOF example. State estimations at selected time-steps are also shown. Good match between the ground truth and the filtered result is obtained. These data act as input to the Gaussian process (GP).} \label{f7-1} \end{figure} Fig. \ref{gp7} shows the results obtained using the GP. The vertical line in Fig. \ref{gp7} indicate the point until which data is available to the GP. For $k_1, k_2, k_3$ and $k_5$, the results obtained using GP matches exactly with the true solution. For $k_7$, the GP predicted results are found to diverge from the true solution. However, the divergence is observed approximately after 3.5 years from the last observation, which for all practical purpose is sufficient for condition based maintenance. For stiffness $k_6$ also, even though the filter estimates are less accurate at earlier time steps, the predicted results manage to give a good estimates of actual value which goes to show that if digital twin is given a regular stream of data, it has the capacity for self correction which in-turn helps better representation of the physical systems. \begin{figure}[ht!] \begin{subfigure}{1\textwidth} \centering \includegraphics[scale = 0.35]{ks_7dof_multi_dp.pdf} \end{subfigure} \caption{Estimated stiffness ($k_3$, $k_5$, $k_6$ and $k_7$) in slow-time-scale using the UKF algorithm for the 7DOF example. Good match between the ground truth and the filtered result is obtained. These data act as input to the Gaussian process (GP).} \label{f7-2} \end{figure} \begin{figure}[ht!] \centering \includegraphics[scale = 0.35]{gp_7dof.pdf} \caption{Results representing the performance of the proposed digital twin for the 7DOF system. The GP is trained using the data generated using UKF. Data upto the horizontal line is available to the GP. The digital twin performs well even when predicting system parameters at future time-steps.} \label{gp7} \end{figure} \section{Conclusions}\label{conclusion} The potential of digital twin in dynamical systems is immense; it can be used for health-monitoring, diagnosis, prognosis, active control and remaining useful life computation. However, practical adaptation of this technology has been slower than expected, particularly because of insufficient application-specific details. To address this issue, we propose a novel digital twin framework for stochastic nonlinear multi degree of freedom dynamical systems. The proposed digital twin has four components -- (a) a physics-based nominal model (low-fidelity), (b) a Bayesian filtering algorithm a (c) a supervised machine learning algorithm and (d) a high-fidelity model for predicting future responses. The physics-based nominal model combined with Bayesian filtering is used for combined parameter-state estimation, and the GP is used for learning the temporal evolution of the parameters. While the proposed framework can be used with any choice of Bayesian filtering and machine learning algorithm, the proposed approach uses unscented Kalman filter and Gaussian process in this paper. Applicability of the proposed digital twin is illustrated with two stochastic nonlinear MDOF systems. For both examples, we have assumed availability of acceleration measurements and the stochasticity is present in the applied force. In order to simulate a realistic scenario, a high-fidelity model (Taylor 1.5 strong) is used for data generation and a low-fidelity model (Euler Maruyama) is used for filtering. The synthetic measurement data generated are corrupted with white Gaussian noise. Cases pertaining to partial measurements (measurement at only selected degrees of freedom) and complete measurement (measurements at all degrees of freedom) are shown. For all the cases, the proposed digital twin is found to yield highly accurate results with accuracy of 95\% and above, indicating its possible application to other realistic systems. \section*{Acknowledgements} AG and BH gratefully acknowledges the financial support received from Science and Engineering Research Board (SERB), Department of Science and Technology (DST), Government of India, (under the project no. IMP/2019/000276). SC acknowledges the financial support received from I-Hub foundation for Cobotics (IHFC) through seed funding.
\section{Introduction} \label{sec:intro} Learning representations that encode graph structural information is increasingly complex as we seek to model real-world graph data. In many applications, graph data are heterogeneous in nature. These heterogeneous graphs are innately ingrained with rich semantics and are more complex than their homogeneous counterparts \cite{zhang2019heterogeneous,cao2017meta}. Thus, existing approaches \cite{kipf2016semi,velivckovic2017graph} developed for homogeneous graphs have to be adapted or re-formularized to cater to the disparity and to capture the semantics present in a heterogeneous graph. A typical approach is to use meta-paths \cite{hong2019attention,shi2016survey,yun2019gtn}. A meta-path \cite{sun2011pathsim} is a predefined sequence of vertex types. It is utilized to transform heterogeneous graphs into homogeneous graphs \cite{hong2019attention,yun2019gtn}, to guide random walks \cite{dong2017metapath2vec} or to capture the rich semantics \cite{sun2011pathsim}. This can be seen in techniques such as Heterogeneous graph Attention Network (HAN) \cite{han2019}, metapath2vec \cite{dong2017metapath2vec} and MEIRec \cite{fan2019metapath}. Meta-paths are widely utilized as they express different semantics, which help to mine the semantics information present \cite{han2019}. For instance, in a bibliographic graph, a meta-path ``APVPA'' , which refers to the vertex sequence ``author-paper-venue-paper-author'', conveys the idea that the authors published papers in the same venue. Meanwhile, ``APA'' indicates co-authorship relationship between two authors. However, selecting the optimal meta-paths for a specific task or dataset is a non-trivial task. It requires specialized domain knowledge regarding the relationships between different vertex types and edge types in a heterogeneous graph as well as the learning task at hand \cite{yun2019gtn,hu2020heterogeneous}. Constructing meta-paths based on domain knowledge becomes inefficient for graphs with a large number of vertex and edge types as the number of possible meta-paths grows exponentially with the number of vertex and edge types \cite{cao2017meta}. In this paper, we propose an approach to learn on heterogeneous graphs that does not use meta-paths. Instead, it leverages on the heterogeneity and directions of edges to build high-order relations that span multiple hops. An edge type in the graph is a first order relation-type. The heterogeneous graph is first decomposed into subgraphs with homogeneous first order relation-types. The adjacency matrices of these subgraphs are then multiplied together to form (weighted) adjacency matrices that represent higher-order relation-types amongst the vertices. Learning, together with attention mechanisms, is then performed on the set of higher-order relation-types. We call our approach lea\textbf{R}ning h\textbf{E}terogeneous \textbf{G}r\textbf{A}phs wi\textbf{T}h \textbf{H}igh-ord\textbf{E}r \textbf{R}elations (REGATHER). The acronym REGATHER invokes the idea of decomposing a difficult problem into basic units that can be combined to facilitate learning. \begin{figure}[!htb] \centering \includegraphics[width=0.74\linewidth]{DBLP_fig1graph.png} \caption{Structure of DBLP graph: a) Schema, b) An illustration of DBLP graph, c)-f) First order relation-type subgraphs, g)-j) Reversed first order subgraphs. }\label{fig:DBLP} \end{figure} Taking DBLP dataset as example, the first order relation-type subgraphs are shown in \cref{fig:DBLP}c)-j). We consider the schema edge directions and their reverse directions as independent first order relation-types. In many existing studies \cite{kipf2016semi,velivckovic2017graph,chen2018fastgcn}, it is common to consider directed graphs as undirected \cite{gong2019exploiting,wu2020comprehensive}. However, this undesirably discards information captured in edge directions. By treating the reversed edge direction as an independent edge-type, we can learn different weights for an edge's forward and backward directions. \section{Related Work} \label{sec:related work} Learning on heterogeneous graphs with meta-paths have shown good results as seen in \cite{fan2019metapath, han2019,dong2017metapath2vec}. Yet, given the limitations of manually designing meta-paths, methods to automate the discovery of relevant meta-paths have been developed such as using greedy strategies \cite{meng2015discovering}, enumerating meta-paths within a fixed length \cite{lao2010relational}, using reinforcement learning \cite{yang2018similarity} and stacking multiple graph transformer layers \cite{yun2019gtn}. Learning on heterogeneous graphs based upon graph neural network (GNN) approaches that do not utilize meta-paths include Heterogeneous Graph Transformer (HGT) \cite{hu2020heterogeneous} and Heterogeneous Graph Neural Network (HetGNN) \cite{zhang2019heterogeneous}. These methods differ from our approach in their ways to incorporate information from multi-hop neighbors. HGT uses cross-layer information transfer to obtain information of neighbors that are multi-hop apart and HetGNN applies random walk with restart (RWR) strategy to sample all types of neighbor nodes from each node which implicitly learns higher-order relations. Moreover, HetGNN focuses on integrating heterogeneous content information of each node which differs from REGATHER that learns without incorporating content information. Performing random walks on heterogeneous graphs without the use of meta-paths for guidance is also seen in \cite{just2018}. JUmp and STay (JUST) \cite{just2018} introduced a way to perform random walk on heterogeneous graphs without using meta-paths by using its jump and stay strategy to probabilistically balance \emph{jumping} to a different vertex type and \emph{staying} in the same vertex type during random walk. The whole process of JUST projects the vertices from different domains into a common vector space, generating vertex embeddings that are simply based upon structural information. The attention mechanism is also evident in its usage in learning of graphs as seen in \cite{velivckovic2017graph,han2019,yun2019gtn}. Heterogeneous graph Attention Network (HAN) proposed by \cite{han2019} is a GNN designed for heterogeneous graphs employing hierarchical attention. Nevertheless, it uses a set of predefined meta-paths to transform a heterogeneous graph into a set of meta-path based homogeneous graphs. REGATHER employs dual-level attention like HAN but differs from HAN in three main ways. Firstly, instead of transforming a heterogeneous graph into meta-path based graphs, it transforms the heterogeneous graph into a set of relation-type subgraphs. Secondly, the heterogeneity of edges and their directions are retained, viewing the reverse edge direction as an independent first order relation-type. This is because even if two vertices are only connected via one direction semantically, they are related in the reverse direction from an information theoretic viewpoint. Lastly, in order to encode information from higher-order relations, which are again typically performed using customized meta-paths in the literature \cite{han2019}, REGATHER uses higher-order relations, which are discussed in \cref{subsec:relation-type}. \section{Methodology} In this section, we introduce the notion of relation-type subgraphs and present REGATHER's architecture. Throughout, we consider a heterogeneous directed graph $G = (V,E)$ where $V$ is the vertex set consisting of multiple vertices types, and $E$ is the set of edges consisting of multiple directed edge types. \subsection{Relation-type subgraphs}\label{subsec:relation-type} Each edge-type is defined to be a first order relation. We decompose the graph $G$ into a set of subgraphs $H_{1},\ldots, H_{c}$, where $c$ is the total number of edge-types and each subgraph $H_i$ has $|V|$ vertices and only one edge-type such that \begin{align*} \bigcup_{1\leq i \leq c} H_{i} = G. \end{align*} For each $H_{i}$, there is an associated adjacency or relation matrix $M_{i}$. As the graph $G$ is directed, each matrix $M_i$ may not be symmetric. To consider edges with reversed directions, we take the transpose of each of the relation matrices of $H_{1}, \ldots, H_{c}$. Let $S$ be the set of matrices $\{M_{i} : 1\leq i \leq c\}$ and $S\T$ be the set of transposed matrices $\{M_{i}\T : 1\leq i \leq c\}$. We take their union as the first order relation matrices on $G$: \begin{align*} S^{1} = S\cup S\T. \end{align*} Each first order relation-type captures only partial information contained in the heterogeneous graph. For example, consider the DBLP graph in \cref{fig:DBLP}. There are no edges of the form ``author-author''. The fact that two authors may have co-authored a paper together, or attended the same conference previously, may contribute to our learning task. To capture such relationships, we consider higher-order relations by combining, e.g., ``author-paper'' and ``paper-author'' relation-type graphs. This is achieved by multiplication of the respective subgraph relation matrices together to obtain a (weighted) relation matrix. Nevertheless, it is possible to have some trivial resulting matrices given that some consecutive relation-types are unrealizable traversals. The trivial matrices are removed from the set. The $k$-th order relation-type is defined as \begin{align*} S^k = \braces*{ N_1N_2\cdots N_k : N_i \in S^1,\ 1\leq i \leq k}. \end{align*} We see that each meta-path of length $k$ corresponds to an edge in one of the relation matrices in $S^k$. Our goal is to perform learning over \begin{align*} D = \bigcup_{k=1}^K S^k, \end{align*} for some $K\geq 1$. As an additional step, we add self-loops to each of the matrices in $D$ by adding an identity matrix $I$ to obtain the set of relation matrices \begin{align} \Phi =\braces*{A+I: A\in D}. \end{align} Using high-order relation-type subgraphs, we eliminate the need to predefine meta-paths. Instead, these are exhaustively included in $\Phi$. In the following, we show how to use attention mechanisms to capture the importance of each relation-type in a data-driven fashion. \subsection{Attention for relation-type based neighbors}\label{subsec:att-relation-type} The relation matrices in $\Phi$ reflect the adjacency between vertices via the specific relation. Two vertices are considered adjacent if the entry in the matrix corresponding to the vertices is non-zero. The neighborhood of a vertex is the set of vertices adjacent to it. The different neighborhoods reflect the different aspects of a vertex. It is crucial to determine the importance of each of the adjacent vertices in a specific neighborhood because different adjacent vertices in a neighborhood can contribute differently to a vertex's representation. Hence, a single headed attention is applied to each of the relation matrices to determine the importance of a vertex's neighboring features specific to each relation matrix in $\Phi$. By using single headed graph attention, the number of parameters that have to be learned is reduced significantly. It is observed that reducing the attention heads to one did not negatively impact the performance of REGATHER. In some cases, it even improves REGATHER's performances. This is aligned with observations that multi-headedness plays an important role when dealing with specialized heads but most of the time, can be pruned for self-attention heads \cite{voita2019analyzing,michel2019sixteen}. The input to each of the single headed graph attention layer is an relation matrix $\phi \in \Phi$ and a set of vertex features, $\mathbf{h} = \braces{h_{1}, h_{2},\ldots, h_{|V|}}$ where $h_i$ is the feature vector of vertex $i$ for $i=1,\ldots,|V|$. Given a vertex pair $(i,j)$, the unnormalized attention score between them can be learned as follows: \begin{align} e_{ij}^{\phi} = \mathrm{LeakyReLU}\parens*{\mathbf{a}_{\phi}\T\brk*{\mathbf{W}_{\phi}h_{i} \parallel \mathbf{W}_{\phi} h_{j}}}, \end{align} where $\parallel$ is the concatenation operation, $\mathbf{a}_{\phi}$ represents the learnable attention vector for the respective $\phi$ and $\mathbf{W}_{\phi}$ is the weight matrix for a linear transformation specific to the relation-type matrix $\phi$ and is shared by all the vertices. The attention vector $\mathbf{a}_{\phi}$ depends on the input features, $\mathbf{W}_{\phi}$ as well as the relation matrix $\phi$ that are input into the layer of single headed graph attention. The attention scores are then normalized by applying the softmax function to obtain the weight coefficients \begin{align} \alpha_{ij}^{\phi} = \mathrm{softmax}_{j}(e_{ij}^{\phi}) = \frac{\exp(e_{ij}^{\phi})}{\sum_{k\in N_{i}^{\phi}}\exp(e_{ik}^{\phi})}, \end{align} where $N_{i}^{\phi}$ is the neighborhood of vertex $i$ in the specific relation-type matrix $\phi$. After the normalized weight coefficients are obtained, we can then employ these coefficients along with the corresponding neighbors' features to generate the output features. These output features are specific to $\phi$ for each of the vertices $i=1,\ldots,|V|$, and given as \begin{align} z_{i}^{\phi} = \sigma\parens*{\sum_{j\in N_{i}^{\phi}} \alpha_{ij}^{\phi} \mathbf{W}_{\phi}h_{j}}, \end{align} where $\sigma$ denotes an activation function. For each $\phi\in\Phi$, the output is a set of relation-type specific vertex embeddings, $Z_{\phi} = \braces*{z_{1}^\phi,\ldots,z_{|V|}^\phi}$. \subsection{Attention to fuse different relation-types} The new vertex embeddings $\braces{Z_{\phi} : \phi\in\Phi}$ reflect the different aspects of the vertices under different relation-types $\phi$ and have to be fused. A second attention layer accounts for the different contribution of each relation-type in describing the vertices, giving more weight to the more crucial relation-type and less weights to the less salient relation-type. For each $\phi\in\Phi$, the relation-type specific vertex embeddings are transformed via a linear transformation consisting of a weight matrix $\mathbf{F}$ and a bias vector $\mathbf{b}$, then followed by a $\tanh$ function. The unnormalized attention score for each of the relation-type specific embeddings is then learnt as follows: \begin{align} w_{\phi} = \ofrac{|V|}\sum_{i \in V} \mathbf{q}\T \tanh(\mathbf{F}z_{i}^{\phi}+\mathbf{b}), \end{align} where $\mathbf{q}$ refers to the learnable relation-type specific attention vector. The second attention layer employs averaging instead of concatenation which means that the importance of each of the relation-type $w_{\phi}$ where $\phi\in\Phi$, is generated as a weighted average of all the vertex embeddings within a group of relation-type specific embeddings. After $w_{\phi}$ is obtained, the softmax function is then applied. The normalized values are the weights of the respective relation-type denoted as $\beta_{\phi}$: \begin{align} \beta_{\phi} = \frac{\exp(w_{\phi})}{\sum_{\phi'\in\Phi} \exp(w_{\phi'})}. \end{align} The different relation-type specific vertex embeddings are then fused to generate the final vertex embedding via linear combination using the learned weights as follows: \begin{align}\label{eq:Z} Z = \sum_{\phi\in\Phi} \beta_{\phi} Z_{\phi}. \end{align} The vertex embedding $Z$ can then be applied to various tasks, optimising the model via backpropagation. Suppose that $|\Phi| = P$, the architecture of REGATHER is as shown in \cref{fig:REGATHER}. \begin{figure}[!htb] \centering \includegraphics[width=1\linewidth]{model_new.png} \caption{Overall architecture of REGATHER. }\label{fig:REGATHER} \end{figure} \section{Experiments} We perform experiments on three heterogeneous graph datasets, similar to those utilized in \cite{just2018} and evaluate REGATHER on vertex classification tasks. Our objective is to predict the labels of a target vertex type. The statistics of the datasets utilised are as shown in \cref{table:stats}. For the loss function, cross-entropy loss is employed. Only the vertices belonging to the target type is considered when measuring cross entropy $L$ \begin{align*} L = - \sum_{l\in y_{L}} Y(l)\ln(\sigma{(Z(l))}), \end{align*} where $\sigma$ denotes an activation function, $y_{L}$ is the set of target vertex type's indices with labels, $Y(l)$ and $Z(l)$ are the labels and learned embeddings of the labeled vertex $l$, respectively. \begin{table}[!htb] \caption{Statistics of the heterogeneous graph datasets utilized.}\label{table:stats} \centering \resizebox{\columnwidth}{!}{ \begin{tabular}{llcccccc} \hline Dataset & Relations (A-B) & Feature & \#Label & \#Vertex & \#Edge & \#Heterogeneous Edge & \#Homogeneous Edge \\ \hline \multirow{4}{*}{DBLP} & Paper-Paper & \multirow{4}{*}{334} & \multirow{4}{*}{4} & \multirow{4}{*}{15,649} & \multirow{4}{*}{51,377} & \multirow{4}{*}{44,379} & \multirow{4}{*}{6,998} \\ & Author-Paper & & & & & & \\ & Venue-Paper & & & & & & \\ & Paper-Term & & & & & & \\ \hline \multirow{5}{*}{Movie} & Movie-Movie & \multirow{5}{*}{334} & \multirow{5}{*}{5} & \multirow{5}{*}{21,345} & \multirow{5}{*}{89,038} & \multirow{5}{*}{34,354} & \multirow{5}{*}{54,684} \\ & Actor-Actor & & & & & & \\ & Actor-Movie & & & & & & \\ & Director-Movie & & & & & & \\ & Composer-Movie & & & & & & \\ \hline \multirow{4}{*}{Foursquare} & User-User & \multirow{4}{*}{128} & \multirow{4}{*}{10} & \multirow{4}{*}{29,771} & \multirow{4}{*}{83,407} & \multirow{4}{*}{77,712} & \multirow{4}{*}{5,695} \\ & User-Check\_in & & & & & & \\ & Check\_in-Time\_slot & & & & & & \\ & Check\_in-Point\_of\_interest & & & & & & \\ \bottomrule \end{tabular}} \end{table} We compare our model with JUST \cite{just2018}, GAT \cite{velivckovic2017graph} and HAN \cite{han2019}, which are state-of-the-art methods to demonstrate the effectiveness of our proposed model. For GAT, the heterogeneity in vertex types and edge types are ignored. JUST is evaluated using the same settings as in \cite{just2018}. For the observed vertex feature vectors, we use the JUST pre-trained embeddings for all methods to enable fair comparison as this ensures that each method's performance is not due to engineered features that might have incorporated additional information. Nevertheless, we note that engineered features like those used in \cite{han2019} can also be used with REGATHER. The input to JUST is the heterogeneous graph and it outputs embeddings that are used as the initial features for all the other methods under comparison. The parameters in JUST like the embeddings' dimension $d$ , the SkipGram model's window size $k$, the memorized domains $m$ and the initial stay parameter $\gamma$, are optimized for the different datasets. For REGATHER, GAT and HAN, we evaluated all of them using the same setting as in \cite{han2019}. The differences are that REGATHER uses single head attention and the highest order of relation-type $K$ in REGATHER is set to 3. In brief, we trained the models for a maximum of 200 epochs using Adam with a learning rate of 0.005 and early stopping with a window size of 100. The relation-type specific attention vector $\mathbf{q}$ in HAN and REGATHER is set to a dimension of 128. The experimental results are summarised in \cref{table:results}. We report the average Macro-F1 and Micro-F1 scores (with standard deviation) from 10 repeated trials. Our results demonstrate that our method considerably improves JUST pre-trained embeddings and in most cases, yield better results in vertex classification tasks compared to other baselines. \begin{table}[!htb] \caption{Quantitative results (\%) of vertex classification task.}\label{table:results} \centering \resizebox{\columnwidth}{!}{ \begin{tabular}{@{}llccccc@{}} \toprule Datasets & Metrics & Training Size & JUST & GAT & HAN & REGATHER \\ \midrule \multirow{8}{*}{DBLP} & \multirow{4}{*}{Macro-F1} & 20\% & 84.41 $\pm$ 0.68 & 88.25$\pm$1.15 & 87.15$\pm$0.90 & {\bf 89.04$\pm$0.51} \\ & & 40\% & 84.52 $\pm$ 0.90 & 89.22$\pm$1.03 & 88.51$\pm$1.72 & {\bf 90.87$\pm$0.95} \\ & & 60\% & 85.06 $\pm$ 1.07 & 89.40$\pm$1.70 & 89.21$\pm$2.02 & {\bf 92.25$\pm$2.00} \\ & & 80\% & 85.28 $\pm$ 1.63 & 89.54$\pm$2.61 & 90.13$\pm$1.26 & {\bf 92.66$\pm$1.70} \\ \cmidrule(l){2-7} & \multirow{4}{*}{Micro-F1} & 20\% & 84.41 $\pm$ 0.67 & 88.23$\pm$1.15 & 87.15$\pm$0.89 & {\bf 89.04$\pm$0.52} \\ & & 40\% & 84.53 $\pm$ 0.90 & 89.20$\pm$1.05 & 88.53$\pm$1.72 & {\bf 90.85$\pm$0.97} \\ & & 60\% & 85.09 $\pm$ 1.07 & 89.41$\pm$1.71 & 89.25$\pm$2.04 & {\bf 92.25$\pm$2.01} \\ & & 80\% & 85.29 $\pm$ 1.67 & 89.53$\pm$2.61 & 90.16$\pm$1.35 & {\bf 92.62$\pm$1.73} \\ \midrule \multirow{8}{*}{Movie} & \multirow{4}{*}{Macro-F1} & 20\% & 35.88 $\pm$ 0.86 & 40.64$\pm$1.29 & 39.36$\pm$2.82 & {\bf 46.87$\pm$4.04} \\ & & 40\% & 39.12 $\pm$ 0.86 & 45.87$\pm$2.07 & 49.62$\pm$2.43 & {\bf 54.68$\pm$3.03} \\ & & 60\% & 40.18 $\pm$ 0.64 & 47.07$\pm$4.09 & 53.22$\pm$2.71 & {\bf 57.94$\pm$2.72} \\ & & 80\% & 41.07 $\pm$ 1.18 & 48.68$\pm$2.49 & 54.40$\pm$3.03 & {\bf 58.44$\pm$3.82} \\ \cmidrule(l){2-7} & \multirow{4}{*}{Micro-F1} & 20\% & 38.19 $\pm$ 0.67 & 49.67$\pm$0.72 & 48.35$\pm$1.33 & {\bf 55.07$\pm$2.05} \\ & & 40\% & 42.74 $\pm$ 0.67 & 54.08$\pm$1.33 & 56.88$\pm$2.05 & {\bf 60.93$\pm$2.25} \\ & & 60\% & 44.11 $\pm$ 0.64 & 56.63$\pm$2.83 & 60.09$\pm$2.13 & {\bf 65.29$\pm$1.99} \\ & & 80\% & 45.11 $\pm$ 0.94 & 58.81$\pm$2.38 & 62.84$\pm$3.07 & {\bf 66.50$\pm$3.08} \\ \midrule \multirow{8}{*}{Foursquare} & \multirow{4}{*}{Macro-F1} & 20\% & 32.53 $\pm$ 2.14 & 46.74$\pm$1.46 & {\bf 56.11$\pm$2.42} & 49.47$\pm$2.88 \\ & & 40\% & 38.09 $\pm$ 1.73 & 59.49$\pm$2.78 & {\bf 64.33$\pm$2.25} & 61.13$\pm$3.79 \\ & & 60\% & 41.65 $\pm$ 2.99 & 67.76$\pm$3.16 & 66.73$\pm$4.82 & {\bf 68.55$\pm$5.34} \\ & & 80\% & 46.49 $\pm$ 3.41 & 68.24$\pm$4.75 & 66.39$\pm$5.48 & {\bf 69.19$\pm$6.13} \\ \cmidrule(l){2-7} & \multirow{4}{*}{Micro-F1} & 20\% & 40.17 $\pm$ 1.73 & 52.12$\pm$1.28 & {\bf 61.48$\pm$1.44} & 56.29$\pm$1.56 \\ & & 40\% & 44.13 $\pm$ 1.60 & 63.94$\pm$1.91 & {\bf 68.80$\pm$1.78} & 66.45$\pm$2.46 \\ & & 60\% & 47.08 $\pm$ 3.17 & 71.36$\pm$2.73 & 70.29$\pm$4.17 & {\bf 72.77$\pm$4.12} \\ & & 80\% & 51.76 $\pm$ 2.28 & 72.00$\pm$3.56 & 71.04$\pm$2.96 & {\bf 73.68$\pm$4.34} \\ \bottomrule \end{tabular}} \end{table} \section{Conclusion} In this paper, we explored learning on heterogeneous graphs without using meta-paths as optimal meta-path selection is problematic especially when the dataset is complex and has many vertex types. Our method REGATHER uses relation-type subgraphs to learn representations and to capture interactions multiple hops apart. We also use dual-level attention to learn the importance of neighboring vertices and different relation-types. Experimental results demonstrated REGATHER's effectiveness in improving JUST pre-embeddings compared to GAT and HAN across three datasets. \vfill\pagebreak \bibliographystyle{IEEEbib}
\section{Introduction} The extended state observer (ESO) is an inherent component of the robust control framework that relies on the cancellation of disturbances using their lumped estimate in the feedforward component of the robust control law. The general idea of such control structure was utilized in many specific robust algorithms such as active disturbance rejection control (ADRC) \cite{han2009,gao2006}, disturbance observer based control (DOBC) \cite{chen2016,li2014}, or robust observer based control \cite{isidori2017}, while its applicability has been proven in many fields including power electronics \cite{lakomy2021,madonski2019,yang2018}, temperature control \cite{zheng2018}, motion control \cite{ramirez2014,xue2017}, and robotics \cite{neria2014,lakomy2021ejc}. Besides the fact that there is a wide variety of ESO architectures that deal with disadvantages of a most commonly used Luenberger-like extended high-gain observer (HGO) \cite{zheng2012, freidovich2006} in terms of the general disturbance observation quality \cite{sun2016_2}, transient performance \cite{wei2019}, or the robustness to measurement noise \cite{wang2017,lakomy2021isat}, the final characteristics of the control system performance depend greatly on the appropriate tuning of particular observer parameters. The most common parametrization of HGOs utilized within the robust control scheme is the so-called bandwidth parametrization \cite{gao2006scaling} that is based on the choice of a single parameter value interpreted as an eigenvalue of the designed closed-loop observation subsystem. Despite its indisputable advantages, like intuitiveness and easy implementation, tuning with bandwidth parameterization may lead to suboptimal performance, in terms of control errors, energy consumption, and the impact of measurement noise, as only one degree of freedom is available. In the literature, many methods have been proposed for tuning bandwidth-parameterized observers. In \cite{zhang2019} and \cite{wang2021}, the authors presented an analytical tuning method providing the best performance of the ADRC structure expressed solely upon the control-error-dependent criteria in a noiseless environment. In \cite{wang2019} and \cite{deboon2021}, the authors considered also the control cost as a factor that needs to be minimized to reduce the energy consumption of the robust control process, while in \cite{madonski2013} the observation error of the measured signals was taken into account. Tuning procedures described in \cite{nowak2020} and \cite{grelewicz2020} have utilized prior knowledge about the plant structure and some known or identified model parameters to obtain assumed control performance requirements. In \cite{nowak2020} and \cite{herbst2020}, the authors presented an observer tuning method that is relative to gains of the selected ADRC controller. Some methods consider automatic tools designed for tuning the overall ADRC structure, including observer gains, to satisfy some predefined criteria determining the robustness of the control structure \cite{sun2016}. Whereas \cite{xue2016} describes the constraints that should be satisfied by the observer gains to achieve stability in a discrete-time ADRC control structure. For a few decades neural networks have been utilized along with the classical control solutions as a part of the overall control system \cite{nn_control_survey}. In \cite{nn_speed_estimation} and \cite{gaining_sense_of_touch} authors used neural networks to estimate quantities that are hard to measure directly from other readily available measurements. The same idea is the essence of the neural network-based observers \cite{nn_observer_1, nn_observer_2}, which adaptively track signals that are crucial for controlling the system. Neural networks, which are proven to be universal approximators, are also used to approximate the dynamics of the systems that are difficult to model or parts thereof \cite{nn_model_1, nn_model_2}, allowing the use of the well established model-based methods. Furthermore, neural networks can serve as a standalone adaptive controller \cite{nn_control_1, nn_control_2}, however, they usually come with no warranties about their control performance or robustness to noise and external disturbances, limiting their use in safety-critical applications. Instead of relying on a standalone neural network based controller, neural networks can be used to tune some well known control schemes, like PID \cite{nn_tuning_pid} or ADRC \cite{nn_tuning_adrc_1, nn_tuning_adrc_2, nn_tuning_adrc_3}. This allows taking advantage of their robustness while improving the control quality by a data-driven choice of the controller or observer gains. Authors of \cite{nn_tuning_adrc_2} proposed a reinforcement learning based approach to tune the gains in the nonlinear state error feedback control law. Whereas in \cite{nn_tuning_adrc_1} a radial basis function neural network was used to estimate the ESO gains in an online manner to minimize the square of the difference between the actual and desired output of the system. A similar application of neural networks was presented in \cite{nn_tuning_adrc_3}, where a fully connected neural network was used. However, both \cite{nn_tuning_adrc_1} and \cite{nn_tuning_adrc_3} did not consider measurement noise, what hinders appropriate choice of observer gains. Most of the aforementioned tuning methods minimize some predefined cost function that determines which performance criteria should be optimized. In this work, we propose a different approach to tune the extended state observer using a neural network. Instead of training a neural network to choose gains directly, our method uses a neural network as a performance estimator of the closed-loop system. We train a neural network performance estimator on a dataset of experiments, to estimate values of several performance criteria, which take into account not only a tracking quality but also a control effort and measurement noise suppression. The proposed performance assessment network, estimates the expected performance of the system given the specific observer gains, within some used-defined regions of the state, control signals, and initial conditions. Using this estimator for multiple different proposed sets of the ESO gains that are not limited to the previously described bandwidth-parametrization, it is possible to choose the one which minimizes chosen criterion and assures near-optimal performance. The introduced method allows quickly tuning the ESO gains according to a user-defined criterion based on a single closed-loop experiment, without the need for multiple system simulations nor open-loop model identification. The main contribution of this paper is threefold: \begin{enumerate} \item a novel application of neural networks to estimate the multi-criteria performance of the control system, \item a new ESO tuning method that selects a set of near-optimal gains using the estimates of the expected performance, without the constraints of bandwidth parameterization, \item an intense numerical verification of the proposed method, its generalization abilities, as well as the impact of the criterion formula on the resultant behavior of the considered systems. \end{enumerate} In the course of our analysis, we showed that bandwidth parametrization captures the entire spectrum of the performance for the considered systems and performance criteria. This implies that bandwidth parametrization allows choosing near-optimal gains for the user-defined performance criterion, however one has to carefully tune the bandwidth value. Moreover, we developed a publicly available dataset\footnote{\url{https://drive.google.com/file/d/1I2iVfog2ovytaaElmCYD6arFoj_8weHy/view}} of closed-loop systems simulations for two different control object structures with changing parameters, initial conditions, noise standard deviation, and ESO gains. \textbf{Notation:} Throughout this paper, we use $\mathbb{R}$ as a set of real numbers, $\mathbb{R}_{\geq0}$ as a set of non-negative real numbers, $\mathbb{R}_-$ as a set of negative real numbers, $\mathbb{Z}_+$ as a set of positive integers, and $\mathbb{C}$ as a set of complex numbers. A ball $\ballDomain{r}$ of radius $r>0$ is defined as $\ballDomain{r}\triangleq\{\pmb{x}\in\mathbb{R}^n: \|\pmb{x}\|\leq r\}$ for $n\in\mathbb{Z}_+$, while set $\continuousFunctionSet{1}$ represents a class of locally Lipschitz continuously differentiable functions. Zero and identity matrices are, respectively, represented as $\pmb{0}\in\mathbb{R}^{m\times n}$ and $\pmb{I}\in\mathbb{R}^{n\times n}$ for $m>0$ and $n>0$, while $\stateMatrix{n} \triangleq \begin{bmatrix} \pmb{0}^{(n-1) \times 1} & \pmb{I}^{(n-1)\times (n-1)} \\ 0 & \pmb{0}^{1\times (n-1)}\end{bmatrix}\in\mathbb{R}^{n\times n}$, $\inputVector{n} \triangleq \left[\pmb{0}^{\color{black}1\times (n-1)\color{black}} \ 1\right]^\top\in\mathbb{R}^n$, $\outputVector{n} \triangleq \left[1 \ \pmb{0}^{\color{black}1\times (n-1)\color{black}}\right]^\top\in\mathbb{R}^n$, and $\inputVectorExtendedState{n+1} \triangleq \left[\pmb{0}^{\color{black}1\times (n-1)\color{black}} \ 1 \ 0\right]^\top\in\mathbb{R}^{n+1}$. Symbol $\eigenvalue{i}(\pmb{A})$ represents the $i$-th eigenvalue of matrix $\pmb{A}$, $\realPart{x}$ is the real part of a complex number $x\in\mathbb{C}$, $\pmb{A}\succ0$ means that matrix $\pmb{A}\in\mathbb{R}^{n\times n}$ is positive definite in the sense that $\pmb{x}^\top\pmb{A}\pmb{x}>0$ for all $\pmb{x}\in\mathbb{R}^n$. Throughout the paper, accent $\hat{x}$ corresponds to the estimated value of signal $x$, while accent $\tilde{x}$ determines the observation error of signal $x$, i.e., $\tilde{x}\triangleq x-\hat{x}$. \section{Preliminaries} \label{sec:prelims} \subsection{Control plant description and conventional robust control design} Let us consider a second-order nonlinear model of the dynamical system, described with a general equation \begin{align} \begin{cases} \dot{\pmb{x}}(t) = \stateMatrix{2}\pmb{x}(t) + \inputVector{2}\left[f(\pmb{x},t) + g(\pmb{x},t)u(t) + d^{*}(t)\right] \\ y(t) = \outputVector{2}^\top\pmb{x}(t) + n(t), \end{cases} \label{eq:originalSystem} \end{align} where $\pmb{x}\triangleq[\stateVectorElement{1} \ \stateVectorElement{2}]^\top\in\mathbb{R}^2$ is the state vector, $f(\pmb{x},t)$ is the drift vector field describing system dynamics, $g(\pmb{x},t)$ is the vector field representing the input gain, $u(t)\in\mathbb{R}$ is the control signal, $d^{*}(t)\in\mathbb{R}$ is a bounded external disturbance affecting the system, $y(t)\in\mathbb{R}$ is the system output, and $n(t)\in\mathbb{R}$ is the measurement noise. \begin{assumption} \label{ass:1} The state domain of system \eqref{eq:originalSystem} is bounded to an arbitrarily large compact domain, such that $\pmb{x}\in\ballDomain{\bar{x}}$, for $0<\bar{x}<\infty$. \end{assumption} \begin{assumption} External disturbance $d^{*}(t)\in\continuousFunctionSet{1}$ and its derivative belong to the bounded domains $d^{*}(t)\in\ballDomain{\bar{d}^*}$ and $\dot{d}^{*}\in\ballDomain{\bar{D}^*}$ for $0<\bar{d}^*,\bar{D}^*<\infty$. \end{assumption} \begin{assumption} \label{ass:noiseBoundedness} The measurement noise has zero-mean and is bounded, i.e., $n\in\ballDomain{\bar{n}}$ for $0<\bar{n}<\infty$. \end{assumption} \begin{assumption} Drift vector field $f(\pmb{x},t):\ballDomain{\bar{x}}\times\mathbb{R}_{\geq0}\rightarrow\ballDomain{\bar{f}}$ and input gain vector field $g(\pmb{x},t):\ballDomain{\bar{x}}\times\mathbb{R}_{\geq0}\rightarrow\ballDomain{\bar{g}}$ are locally Lipschitz continuous functions, i.e. $f,g\in\continuousFunctionSet{1}$, for $0<\bar{f},\bar{g}<\infty$. \end{assumption} \begin{remark} In this paper, we will be modelling the measurement noise with a zero-mean truncated normal distribution $n\sim\mathcal{N}(0,\sigma_n^2)$, where $\sigma_n$ is a measurable standard deviation, while the truncation borders are determined by $\bar{n}$ introduced in Assumption \ref{ass:noiseBoundedness}. \end{remark} System \eqref{eq:originalSystem} can be rewritten as: \begin{align} \begin{cases} \dot{\pmb{x}}(t) = \stateMatrix{2}\pmb{x}(t) + \inputVector{2}[\wenchaoInputVectorFieldEstimateu(t) + \underbrace{f(\pmb{x},t) + [g(\pmb{x},t)-\hat{g}]u(t) + d^{*}(t)}_{d(\pmb{x},t)}] \\ y(t) = \outputVector{2}^\top\pmb{x}(t) + n(t), \end{cases} \label{eq:rewrittenOriginalSystem} \end{align} where $\hat{g}$ is a constant approximation of the input gain $g(\pmb{x},t)$, while $d(\pmb{x},t)$ represents the so-called total disturbance that lumps external disturbances, unmodeled dynamics, and the impact of the parametric uncertainty of the input gain. \begin{assumption} \label{ass:5} Following the results presented in \cite{xue2018} and \cite{chen2020}, the input parameter estimate $\hat{g}$ is a rough approximation of $g(\pmb{x},t)$, satisfying % \begin{align} \forall_{t\geq0}\frac{g(\pmb{x},t)}{\hat{g}}\in\left(0,2+\frac{2}{n}\right), \label{eq:inputGeinRelation} \end{align} % where $n=2$ is the order of system \eqref{eq:originalSystem}. \end{assumption} To adjust the representation of system dynamics into a form allowing the design of a disturbance observer based control structure, let us introduce an extended state \begin{align} \label{eq:extendedStateVector} \pmb{z}=[\extendedStateVectorElement{1} \ \extendedStateVectorElement{2} \ \extendedStateVectorElement{3}]^\top\triangleq[\pmb{x}^\top \ d]^\top\in\mathbb{R}^3, \end{align} which dynamic behavior is represented by \begin{align} \begin{cases} \dot{\pmb{z}}(t) = \stateMatrix{3}\pmb{z}(t) + \inputVector{3}\dot{d}(\pmb{z},t) + \inputVectorExtendedState{3}\wenchaoInputVectorFieldEstimateu(t) \\ y(t) = \outputVector{3}^\top\pmb{z}(t) + n(t). \end{cases} \label{eq:extendedStateDynamics} \end{align} \begin{remark} \label{rem:totalDisturbance} Upon Assumptions \ref{ass:1}-\ref{ass:5}, we may claim that total disturbance and its derivative are bounded, i.e., $d\in\ballDomain{\bar{d}}$ and $\dot{d}\in\ballDomain{\bar{D}}$ for $0<\bar{d},\bar{D}<\infty$. \end{remark} In this work, we will focus on the performance of a closed-loop system designed for stabilization around the equilibrium at point $\stateVector^*\triangleq[0 \ 0]^\top$. In \eqref{eq:extendedStateDynamics}, we find that only a first element of the extended state vector can be measured. Thus, to properly design a robust controller described by a generalized formula \begin{align} u(\hat{\pmb{z}},t) \triangleq \frac{1}{\hat{g}}\left[v(\hat{\pmb{x}},t) - \hat{d}(t)\right], \label{eq:genericController} \end{align} that consists of a stabilizing feedback controller $v:\mathbb{R}^2\times\mathbb{R}_{\geq0}\rightarrow\mathbb{R}$ and the feedforward component compensating total disturbance, we need to estimate the extended state vector $\hat{\pmb{z}}\triangleq[\hat{\pmb{x}}^\top \hat{d}]^\top$. The Luenberger-like extended state observer structure, that is most commonly utilized along the existing literature \cite{madonski2019,xue2017} and has a proven track of industrial applicability \cite{sun2021,sun2005}, has the form \begin{align} \dot{\hat{\pmb{z}}}(t) = \stateMatrix{3}\hat{\pmb{z}}(t) + \inputVectorExtendedState{3}\wenchaoInputVectorFieldEstimateu(\hat{\pmb{z}},t) + \pmb{l}\left[y(t)-\outputVector{3}^\top\hat{\pmb{z}}(t)\right], \label{eq:esoObserver} \end{align} where the observer gain vector $\pmb{l}=[\observerGainVectorElement{1} \ \observerGainVectorElement{2} \ \observerGainVectorElement{3}]^\top\in\mathbb{R}^3$ is designed such that the state matrix of the estimation error dynamics is Hurwitz. In other words, for the estimation error defined as $\tilde{\pmb{z}}\triangleq\pmb{z}-\hat{\pmb{z}}$ which dynamics, derived from \eqref{eq:extendedStateDynamics} and \eqref{eq:esoObserver}, is represented by \begin{align} \dot{\tilde{\pmb{z}}}(t) = \underbrace{(\stateMatrix{3}-\pmb{l}\outputVector{3}^\top)}_{\pmb{H}}\tilde{\pmb{z}}(t) + \inputVector{3}\dot{d}(\pmb{z},t) - \pmb{l}n(t), \label{eq:observationErrorDynamics} \end{align} and the matrix $\pmb{H}$ is Hurwitz. The observer gains are calculated using the pole-placement procedure, by selecting the real negative eigenvalues of the state matrix in the closed-loop observation subsystem \eqref{eq:observationErrorDynamics}, i.e. $\eigenvalue{i}:=\eigenvalue{i}(\pmb{H})\in\mathbb{R}_-$ for $i\in\{1,2,3\}$, implying \begin{align} \observerGainVectorElement{1} &= -(\eigenvalue{1} + \eigenvalue{2} + \eigenvalue{3}) \label{eq:observerTuning1}\\ \observerGainVectorElement{1} &= \eigenvalue{1}\eigenvalue{2} + \eigenvalue{1}\eigenvalue{3} + \eigenvalue{2}\eigenvalue{3} \\ \observerGainVectorElement{3} &= -\eigenvalue{1}\eigenvalue{2}\eigenvalue{3}. \label{eq:observerTuning3} \end{align} The chosen gain parametrization allows us to formulate following theorem, which we prove in \ref{app:proofTheorem1}. \begin{theorem} \label{th:1} Under Assumptions \ref{ass:1}-\ref{ass:5} and Remark \ref{rem:totalDisturbance}, the observation error subsystem \eqref{eq:observationErrorDynamics}, subject to the observer gain parametrization from \eqref{eq:observerTuning1}-\eqref{eq:observerTuning3}, locally satisfies % \begin{align} \|\tilde{\pmb{z}}(t)\| \leq c_1\|\tilde{\pmb{z}}(0)\|e^{-c_2t} + c_3\left[\bar{D} + \|\pmb{l}\|\bar{n}\right], \label{eq:th1} \end{align} % for some constants $c_1,c_2,c_3>0$. \end{theorem} The result presented in Theorem \ref{th:1} shows that as $t\rightarrow\infty$, the first component of \eqref{eq:th1} resulting from the non-zero initial conditions converges to zero, while the norm of the overall estimation error is bounded around some vicinity of zero dependent on the values $\bar{D}$ and $\bar{n}$. Although the general parametrization from \eqref{eq:observerTuning1}-\eqref{eq:observerTuning3} did not allow us to analytically present a direct correlation between the observer gains and the convergence speed or the disturbance rejection impact, result \eqref{eq:th1} proved that an increase of observer gains decrease the estimation robustness with respect to the measurement noise. The most commonly utilized bandwidth-parametrization of vector $\pmb{l}$, originally introduced in \cite{gao2006scaling}, locates all eigenvalues of matrix $\pmb{H}$ at the same place, i.e., $\eigenvalue{i}=-\omega_o$ for $i\in\{1,2,3\}$, resulting in \begin{align} \label{eq:bandwidthParametrization} \pmb{l} = [3\omega_o \ 3\omega_o^2 \ \omega_o^3]^\top, \quad \omega_o>0. \end{align} Such parametrization allows us to provide a stronger analytical result, comparing to the one presented in Theorem \ref{th:1}, formulated within the following theorem, which we prove in \ref{app:proofTheorem2}. \begin{theorem} \label{th:2} Under Assumptions \ref{ass:1}-\ref{ass:5} and Remark \ref{rem:totalDisturbance}, the observation error subsystem \eqref{eq:observationErrorDynamics}, subject to the observer gain parametrization from \eqref{eq:bandwidthParametrization}, locally satisfies % \begin{align} \|\tilde{\pmb{z}}(t)\|\leq & \max\{\omega_o^{-2},\omega_o^{2}\}e^{-c_4\omega_o t}c_5\|\tilde{\pmb{z}}(0)\| \nonumber\\ &+ \max\{\omega_o^{-2},1\}\frac{1}{\omega_o}c_6\left[\bar{D} + 3\omega_o^3\bar{n}\right], \label{eq:th2} \end{align} % for some constants $c_4,c_5,c_6>0$. \end{theorem} The result presented in Theorem~\ref{th:2} is consistent with the result from Theorem~\ref{th:1} in terms of the increase of potential impact that measurement noise has on the estimation quality with increasing $\omega_o$. Additionally, the total disturbance affects the norm of observation error less for higher $\omega_o$, reaching the ideal compensation of total disturbance $d$ for $\omega_o\rightarrow0$. In the transient stage, the increase of $\omega_o$ provides faster convergence of initial errors towards zero, but may result in the higher values of $\|\tilde{\pmb{z}}(t)\|$ while the observer peaking due to the dependency of the first component of \eqref{eq:th2} on factor $\max\{\omega_o^{-2},\omega_o^{2}\}$. A popular choice of the feedback controller, introduced within the general control law \eqref{eq:genericController}, takes the form of a state feedback \begin{align} v(\hat{\pmb{x}},t) = -\underbrace{[\controllerGainElement{1} \ \controllerGainElement{2}]}_{\pmb{k}}\hat{\pmb{x}}, \label{eq:feedbackController} \end{align} where $\controllerGainElement{1},\controllerGainElement{2}$ were chosen in such a way, that matrix $\stateMatrix{2}-\inputVector{2}\pmb{k}$ is Hurwitz. For the sake of conciseness of presented results, we introduce a parametrization of $\pmb{k}$ in a way to place the obtained eigenvalues $\forall_{i\in\{1,2\}}\eigenvalue{i}(\stateMatrix{2}-\inputVector{2}\pmb{k})=-k$, resulting in \begin{align} \controllerGainElement{1} = k^2, \label{eq:par0}\\ \controllerGainElement{2} = 2k, \label{eq:par1} \end{align} for some $k>0$. The closed-loop system, after substitution of \eqref{eq:genericController} and \eqref{eq:feedbackController} into \eqref{eq:rewrittenOriginalSystem}, is given by: \begin{align} \dot{\pmb{x}}(t) &= \stateMatrix{2}\pmb{x}(t) + \inputVector{2}\left[-\pmb{k}\hat{\pmb{x}}(t)-\hat{d}(t)+d(t)\right] \nonumber \\ &= (\stateMatrix{2}-\inputVector{2}\pmb{k})\pmb{x}(t) + \inputVector{2}\begin{bmatrix} \pmb{k} \ 1 \end{bmatrix}\tilde{\pmb{z}}(t). \label{eq:closedloop} \end{align} The time response of \eqref{eq:closedloop} satisfies the following theorem which we prove in \ref{app:proofTheorem3}. \begin{theorem} \label{th:3} Under Assumptions \ref{ass:1}-\ref{ass:5}, the response of \eqref{eq:rewrittenOriginalSystem} with controller described by \eqref{eq:genericController} and \eqref{eq:feedbackController}, parametrized by \eqref{eq:par0}-\eqref{eq:par1}, locally satisfies % \begin{align} \|\pmb{x}(t)\|\leq \max\{k^{-1},k\}c_1e^{-c_2k t}\|\pmb{x}(0)\| + \frac{1}{k}c_3\max\{k^{-1},k\}\sup_{t\geq0}\|\tilde{\pmb{z}}(t)\| \label{eq:th3} \end{align} % for some constants $c_1,c_2,c_3>0$. \end{theorem} From \eqref{eq:th3}, we can see that the estimation error norm, which value is highly dependent on the appropriate tuning of ESO parameters according to the Theorems \ref{th:1} and \ref{th:2}, is a perturbing component that pulls the state vector $\pmb{x}$ away from the equilibrium point $\pmb{x}^*$. \begin{remark} A set-point stabilization of the state $\pmb{x}$ in a directly specified equilibrium $\pmb{x}^* \triangleq [0 \ 0]^\top$ may seem as a control task with a very limited application range. In fact, the generalized set-point tracking and trajectory tracking control tasks can be treated as a zero-stabilization control problem if system \eqref{eq:originalSystem} express the dynamics of trajectory/set-point tracking error. Examples of such approach were presented in \cite{lakomy2021ejc} and \cite{madonski2019}. \end{remark} \section{Benchmark systems} \label{sec:models} Throughout this paper, we will refer to the closed-loop features of the control structure introduced in Section \ref{sec:prelims}, based on the performance of two benchmark systems. \subsection{Nonlinear system (NS)} \label{sec:wenchaoBenchmark} The first chosen benchmark system is the nonlinear model introduced in \cite{xue2011} that, using the representation of a dynamic system from \eqref{eq:originalSystem}, is defined by \begin{align} \label{eq:wenchao_1} f(\pmb{x},t) &= \sin(\wenchaoBenchmarkParameter{1}t)\stateVectorElement{1}+\stateVectorElement{2}^2 \\ \label{eq:wenchao_2} g(\pmb{x}) &= \wenchaoBenchmarkParameter{4} + \wenchaoBenchmarkParameter{5}\sin(\wenchaoBenchmarkParameter{6}\stateVectorElement{2}) \\ \label{eq:wenchao_3} d^{*}(t) &= \wenchaoBenchmarkParameter{2}\cos(\wenchaoBenchmarkParameter{3}t), \end{align} where $a_1,a_2, ..., a_6 \in \mathbb{R}$ represent the system parameters. Such artificial system, due to the multiple nonlinearities of $f$, $g$, and $d^{*}$, is a good representation of the generic model from \eqref{eq:originalSystem}. \subsection{Manipulator with 1 degree of freedom (M1D)} \label{sec:M1D} A second model utilized within this article considers the motion of a DC-motor driven 1 DoF manipulator, used as a benchmark in \cite{xue2017} and \cite{zhao2021}. The dynamics of the selected object can be represented as \begin{align} \ddot{\theta}(t) = -\frac{RC_b+K_EK_I}{JR}\dot{\theta}(t)-\frac{K_I}{JR}u(t)+d^{*}(t), \label{eq:manipulatorDynamics} \end{align} where $\theta(t)$ is the angular position of the manipulator, $u(t)$ corresponds to the reversed voltage put on the DC-motor input, $R$ is the armature resistance, $C_b$ represents the friction coefficient, $K_I$ is a torque constant, $K_E$ is a speed motor constant, and $J$ is the inertia of manipulator. To represent \eqref{eq:manipulatorDynamics} in framework \eqref{eq:originalSystem}, we need to define a state vector $\pmb{x}\triangleq[\theta \ \dot{\theta}]$, and then, we can write that \begin{align} f(\pmb{x}) &= \pmxrBenchmarkParameter{1}\stateVectorElement{2} \\ g &= \pmxrBenchmarkParameter{2}, \end{align} where $\pmxrBenchmarkParameter{1} = -\frac{RC_b+K_EK_I}{JR}$ and $\pmxrBenchmarkParameter{2} = -\frac{K_I}{JR}$. External disturbance applied to the system is designed as \begin{align} d^{*}(t) &= \begin{cases} 0, \ &\textrm{for} \ t\in[0, 2.5) \\ -\frac{K_I}{JR}\pmxrBenchmarkParameter{3}, \ &\textrm{for} \ t\in[2.5,5) \\ -\frac{K_I}{JR}\left[\pmxrBenchmarkParameter{3} + \pmxrBenchmarkParameter{4}\textrm{saw}(2\pi\pmxrBenchmarkParameter{5}(t-5))\right], \ &\textrm{for} \ t\in[5,7.5) \\ -\frac{K_I}{JR}\left[\pmxrBenchmarkParameter{3} + \pmxrBenchmarkParameter{6}\sin(2\pi\pmxrBenchmarkParameter{7}(t-7.5))\right], \ &\textrm{for} \ t\in[7.5,10) \end{cases}, \label{eq:manipulatorExternalDisturbance} \end{align} where $\pmxrBenchmarkParameter{1}, \pmxrBenchmarkParameter{2},..., \pmxrBenchmarkParameter{7} \in \mathbb{R}$ are system parameters, and $\textrm{saw}(2\pi\pmxrBenchmarkParameter{5},t-5)$ is a sawtooth function with period equal to $1/\pmxrBenchmarkParameter{5}$. Function \eqref{eq:manipulatorExternalDisturbance}, visualized in Fig. \ref{fig:disturbance}, consists of a selected set of different function types (constant, sawtooth, and sinusoidal), which could be met during practical operation of manipulator working under varying load. \begin{figure}[th] \centering \includegraphics[width=1.0\linewidth]{img/disturbance_cut.pdf} \caption{En example of external disturbance \eqref{eq:manipulatorExternalDisturbance} applied to system \eqref{eq:manipulatorDynamics} for parameters $\pmxrBenchmarkParameter{3}=0.25$, $\pmxrBenchmarkParameter{4}=0.25$, $\pmxrBenchmarkParameter{5}=2$, $\pmxrBenchmarkParameter{6}=1$, and $\frac{K_I}{JR}=20.169$ } \label{fig:disturbance} \end{figure} \section{Problem formulation} \label{sec:problem} \subsection{Generic ESO tuning task} The problem considered in this paper is to propose a tuning procedure for the extended state observer \eqref{eq:esoObserver}, with gains parametrized as in \eqref{eq:observerTuning1}-\eqref{eq:observerTuning3}, according to the specified set of user-defined quality criteria. For the bandwidth-parametrization-based tuning introduced in \eqref{eq:bandwidthParametrization} and described in Theorem \ref{th:2}, one can observe that the increase of eigenvalues $\eigenvalue{i}:=\omega_o, \ i\in\{1,2,3\}$ results in (i) faster convergence of the component caused by the initial estimation error $\|\tilde{\pmb{z}}(t)\|$, (ii) reduced maximal value of the estimation error caused by the total disturbance, and (iii) increased impact of the measurement noise on the estimation errors. Although the analysis of the observation error without placing all $\eigenvalue{i}, \ i\in\{1,2,3\}$ at the same point, concluded with Theorem \ref{th:1}, does not present direct analytical relation between the eigenvalues of matrix $\pmb{H}$ and the convergence speed and/or the impact of disturbances and measurement noise, it is reasonable to assume that the control performance visible in the simulations may show similar tendencies with decreasing $\eigenvalue{i}$-s and with increasing $\omega_o$ for the bandwidth-parametrized observer. Allowing the eigenvalues of $\pmb{H}$ to have different values introduces an additional degree of freedom in the observer design that potentially can improve the desired closed-loop characteristics. \subsection{Performance-based ESO tuning task} To achieve a practically appealing control performance of the observer-based robust control structure, the tuning procedure of ESO parameters should take into account at least several properties, for example, control errors describing the control tracking precision, energy consumption that usually affects the operation costs of the process, and/or the jittering of control signals that can affect the lifetime length of the actuators. Since the robust controller \eqref{eq:genericController} rely directly on the estimation quality of total disturbance, the quality criterion describing the disturbance estimation error \begin{align} \label{eq:IADEE} \IADEE = & \int_0^T \left|d(t) - \hat{d}(t)\right| dt \end{align} should be the natural selection to consider. Unfortunately, the use of the disturbance observer most frequently means that we cannot calculate the total disturbance, and thus, criterion $\IADEE$ is impossible to calculate. Because of that, we need to rely on other quality criteria. Most frequently, see \cite{zhang2019} and \cite{wang2021}, the observer is tuned in a way to minimize the value of mean control error \begin{align} \label{eq:IAE} \IAE = & \int_0^T \left|x_1(t)\right| dt, \end{align} which, based on the results presented Theorem \ref{th:3}, should also be affected by the estimation errors. In Fig. \ref{fig:qualityCriteriaw0}, we presented the $\IAE$ criterion obtained for the closed-loop performance of the manipulator described in section \ref{sec:M1D} with the observer parametrized as in \eqref{eq:bandwidthParametrization} and the controller \eqref{eq:feedbackController} for $\omega_o\in[1,80]$, $k_1 = 16$, $k_2 = 8$, $\hat{g} = -20$, $\pmxrBenchmarkParameter{3}-\wenchaoBenchmarkParameter{6}$ as in the description of Fig. \ref{fig:disturbance}, $\pmxrBenchmarkParameter{1} = -8.8255$, $\pmxrBenchmarkParameter{2} = -20.169$, $\sigma_n=0.0059$, $\pmb{x}(0) = [1 \ 0]^\top$, and $\hat{\pmb{z}}(0) = [1 \ 0 \ 0]^\top$. One can see that the $\IAE$ value decreases monotonically with the increase of the observer gains, but the estimation quality expressed with IADEE criterion, and the criteria connected with the mean control signal value and control signal jiterring expressed, respectively, as \begin{align} \label{eq:IAC} \IAC = & \int_0^T \left|u(t)\right| dt, \\ \label{eq:IACD} \IACD = & \int_0^T \left|\frac{du(t)}{dt}\right| dt \end{align} start to grow in the range of large values of $\omega_o$. The aim of this work is to propose a tool which estimates values of $\IADEE$, $\IAE$, $\IAC$ and $\IACD$ criteria for a given control system and a specified set of $\eigenvalue{i}$-s, and allow to select the eigenvalues satisfying $\min_{\eigenvalue{1},\eigenvalue{2},\eigenvalue{3}}J$, where \begin{align} J = \costFunctionWeight{1}\widehat{\IAE}+\costFunctionWeight{2}\widehat{\IAC}+\costFunctionWeight{3}\widehat{\IACD}+\costFunctionWeight{4}\widehat{\IADEE}, \label{eq:J} \end{align} represents the cost function, while $\costFunctionWeight{i} > 0$ are the user-defined values that determine what features should the algorithm prioritize. \begin{figure}[th] \centering \includegraphics[width=0.9\linewidth]{img/qualityCriteria_cut.pdf} \caption{The values of chosen quality criteria for different values of $\omega_o$ parameter} \color{black} \label{fig:qualityCriteriaw0} \end{figure} \FloatBarrier \section{Proposed solution} \label{sec:solution} \subsection{Proposed ESO tuning method} \label{sec:tuning_procedure} There are several ways to approach the problem described in Section \ref{sec:problem}. One can propose tuning rules for some specific types of objects or derive heuristics, which will help an engineer to tune the ESO by hand. However, none of these methods offer a general solution for the ESO tuning for ADRC performance improvement, and they usually require to perform multiple experiments to find satisfactory observer gains. Disregarding the limitation of the existing tuning methods, let's consider a general form of the solution to the ESO tuning problem -- an \textit{ideal ESO tuner}. Such a tuner should have the following property: given the controlled object, noise parameters, ADRC controller parameters, initial error, and some performance criterion, it calculates the optimal (with the reference to the given criterion) observer gains. In practice, for nontrivial examples, it is hard to define such an \textit{ideal ESO tuner}, because we do not have access to the exact model of the system. However, we conjecture that it is possible to approximate the behavior of such an optimal tuner in a specified range of its parameters. f In order to limit the information needed by the tuner, we propose an alternative formulation that does not need to be aware of the specific performance criterion defined by the control engineer. Thus, instead of searching for an \textit{ideal ESO tuner}, we focus on finding an \textit{ideal performance estimator}. Let's observe, that having a function which for a given controlled object, noise parameters, ADRC controller parameters, initial error, and ESO gains, returns its expected performance in terms of several important criteria, we are able to obtain similar results to the ones obtained with an \textit{ideal ESO tuner}. Using an \textit{ideal performance estimator} multiple times with different ESO gains enables to find which one satisfies required properties, for example minimizing some weighted sum of the criteria (see \eqref{eq:J}) or even some hard constraints set on them. Note, that the range of the reasonable gains to check is bounded based on theoretical considerations presented in Theorem \ref{th:1} and Theorem \ref{th:2}. In this way, we reformulated the problem of finding an ideal ESO tuner, to the problem of first finding a performance estimator and then using a search algorithm to find observer gains that result in satisfactory performance of the control system. The general scheme of the proposed neural network-based ESO tuning method is presented in Figure~\ref{fig:nn_all}. Given the description of the control system and multiple candidate sets of the observer gains $\Lambda \triangleq [\lambda_1 \ \lambda_2 \ \lambda_3]^\top$, the neural network estimates the performance criteria values. Based on those estimates, the gain selector selects the gains set, which minimizes user-defined criterion $J$. \begin{figure}[th] \centering \includegraphics[width=\linewidth]{img/general_solution_scheme.pdf} \caption{Block diagram of the overall control structure including the NN-based tuning tool.} \label{fig:nn_all} \end{figure} \subsection{Neural network-based performance estimator} In this paper, we will omit the search algorithm part, as there are many appropriate optimization algorithms \cite{random_search, local_greedy_search, genetic_search}, and focus on developing an approximator for the ideal performance estimator. To find such an approximator we follow a data-driven approach and use a neural network, as neural networks are known to be universal approximators with significant representational power, as well as notable generalization properties. The proposed neural network based performance estimator predicts four, in our opinion most representative, integral performance criteria: integral of absolute error (IAE), integral of control effort (IAC), integral of absolute control derivative (IACD), and integral of disturbance estimation error (IADEE), which are defined in \eqref{eq:IADEE}--\eqref{eq:IACD}. However, we presume that the proposed approach will also work for other criteria. Crucial for the proposed learning system is to feed it with input data, based on which it will be able to determine the values of the aforementioned criteria. While it is relatively easy to feed the neural network with the data such as noise standard deviation, ADRC controller parameters, or ESO gains, the core difficulty is to provide a representation of the controlled system. The simplest idea is to describe it with a set of its parameters, however, such an approach is very inflexible and requires the perfect knowledge of the model structure and identification of its parameters, which can be hard to perform or introduce some additional errors to the tuning procedure. Therefore, we describe the system by its transient state estimated by an ESO in some predefined experiment, which we call \textit{basic experiment} or \textit{test experiment}. In this experiment we assume that the system starts from some random initial state $\pmb{x}_{test_0}$, and it is controlled in closed loop by the ADRC based controller defined in \eqref{eq:genericController}, with an ESO defined in \eqref{eq:esoObserver} with the gains set according to bandwidth parametrization (see \eqref{eq:bandwidthParametrization}) with $\omega_0 = 25$. Such a choice of the observer gains seems to be large enough to track the evolution of the system, and small enough to not over-amplify sensor noise, for the objects and noise parameters ranges we consider. As a result, the neural network is fed with a transient of the estimated system extended state $\hat{\pmb{z}} \in \mathbb{R}^{1000 \times 3}$ sampled at $\SI{100}{\hertz}$ through $\SI{10}{\second}$. With both inputs and outputs defined, we now define the neural network architecture. The general scheme of the proposed neural network-based performance estimator is presented in Figure~\ref{fig:nn}. Each of the blocks (except the concatenation operation) is a neural network designed to process different types of data. Here we describe the general purpose of those blocks, as well as their processing structure, inputs, and outputs, while the detailed architectures of those neural networks are presented in the \ref{sec:appendix_nn}. \begin{figure}[th] \centering \includegraphics[width=0.99\linewidth]{img/performance_estimator_nn.pdf} \caption{General scheme of the proposed neural network-based performance estimator.} \label{fig:nn} \end{figure} The goal of the $\Lambda$ processing block is to create a higher-dimensional representation of the $\lambda_i$ values. An important feature of this processing block is to capture the permutation invariance of the inputs, as the ordering of $\Lambda$ vector has no impact on the observer gains calculated based on them (see \eqref{eq:observerTuning1}--\eqref{eq:observerTuning3}). To achieve that, each of the $\lambda_i$ values is processed separately by a fully connected neural network (FC-NN), and then resultant feature vectors are summed together to achieve permutation invariance built in the architecture. The Basic experiment processing block creates an embedded representation of the control object from the evolution of the system state estimates during the basic experiment. This signature is crucial in the process of estimation of the performance, as it carries out the information about the specific system controlled by ADRC. The time series of the state estimate is processed by a stack of 1D convolutional neural networks (1D-CNN) in order to extract local features of the signal and then passed to a FC-NN to produce an output feature vector. The Noise and initial states processing block is used to process other important information about the experiments such as noise standard deviation $\sigma_n$, initial states both in test $\pmb{x}_{test_0}$ and final $\pmb{x}_0$ experiments and create from them another feature vector suitable for further processing. To do so we use standard FC-NN. Finally, representations built from those three sources of information about the system are concatenated together to form a common feature vector, that contains the entire information needed by the Performance estimator block to predict the values of performance criteria in the final experiment. \subsection{Datasets} To use the predictive models, such as the one presented in the previous section, one has to train them using data. In this paper, we train the neural network in a supervised learning paradigm, as the input and output data can be easily gathered from simulations. In this section, we describe the datasets created to train, validate and test our model. All these datasets, for each controlled object type, were created using the same distribution of parameters, but the created dataset elements always appear only in one of them. For both NS and M1D models, described in Section \ref{sec:models}, the general scheme of gathering data was the same. Firstly, we draw object parameters, noise standard deviation, and initial states for both experiments from the predefined distributions, while setting the rest of the closed-loop system parameters constant. Secondly, we simulate the closed-loop system using a predefined set of observer gains $\lambda_1 = \lambda_2 = \lambda_3 = -25$, from the state $\pmb{x}_{test_0}$, and save the trajectory of the estimated extended state of the system $\hat{\pmb{z}}$. Then, we draw new $\lambda_i$ values from the predefined range and simulate the system once again, from the state $\pmb{x}_0$, and save the resultant performance criteria values. Finally, we save all artifacts from those experiments which are necessary for neural network training. While the general procedure of data generation is the same for both NS and M1D objects, the ranges of their parameters resulting from the given structure of the control plant are different. In Table \ref{tab:params} we present the ranges of parameters from which we uniformly draw samples to create the NS and M1D datasets. For the definitions of those parameters, please see the detailed descriptions of those objects in Section \ref{sec:prelims}. Besides those, there are some common constants such as sampling and noise frequency both equal to $\SI{1}{\kilo\hertz}$ and simulation time equal to $\SI{10}{\second}$. \begin{table}[!htb] \caption{Parameters used to create (a) NS and (b) M1D datasets.} \label{tab:params} \begin{subtable}{.5\linewidth} \centering \caption{} \begin{tabular}{|c|c|} \hline Parameter & Value\\ \hline $\lambda_i$ & [-80; -1] \\ $a_1$ & [0; 2]\\ $a_2$ & [0; 1]\\ $a_3$ & [0; 2]\\ $a_4$ & [0.5; 1.5]\\ $a_5$ & [0; 0.3]\\ $a_6$ & [0; 2]\\ $\pmb{x}_{test_0}$ & $[-1; 1]^2$\\ $\pmb{x}_0$ & $[-1; 1]^2$\\ $\sigma_n$ & [0; 0.01]\\ $\hat{g}$ & -1\\ \hline \end{tabular} \end{subtable}% \begin{subtable}{.5\linewidth} \centering \caption{} \begin{tabular}{|c|c|} \hline Parameter & Value\\ \hline $\lambda_i$ & [-80; -1] \\ $\pmxrBenchmarkParameter{1}$ & [-20; -4]\\ $\pmxrBenchmarkParameter{2}$ & [-30; -10]\\ $\pmxrBenchmarkParameter{3}$ & [0; 0.5]\\ $\pmxrBenchmarkParameter{4}$ & [0; 0.5]\\ $\pmxrBenchmarkParameter{5}$ & [0; 2]\\ $\pmxrBenchmarkParameter{6}$ & [0; 0.5]\\ $\pmxrBenchmarkParameter{7}$ & [0; 2]\\ $\sigma_n$ & [0; 0.02]\\ $\pmb{x}_{test_0}$ & $[-\pi; \pi]^2$\\ $\pmb{x}_0$ & $[-\pi; \pi]^2$\\ $\hat{g}$ & -20\\ \hline \end{tabular} \end{subtable} \end{table} Using this procedure, we created three datasets for each object type: (i) training set with 80000 samples, (ii) validation set with 20000 samples, and (iii) test set with 12000 samples. The training set was used to train the neural network, validation set was used to control the training process and limit overfitting to training data, whereas the test set contains \textit{fresh data}, not used in the training process, to evaluate the performance of the predictive model. In Figures~\ref{fig:wenchao_ds} and \ref{fig:M1D_ds}, we present the histograms of the performance criteria both in NS and M1D training sets. It can be seen that for both datasets the shapes of the criteria distributions are similar. Most of the experiments result in lower values of the criteria, and the number of the outliers is relatively small. Based on these observations, we apply a more aggressive normalization of the neural network outputs, as in the end, for the tuning purposes accurate estimation of the highest values of the performance criteria is not so important. \begin{figure}[th] \centering \includegraphics[width=0.99\linewidth]{img/wenchao_ds.pdf} \caption{Histograms of the criteria values from the training part of the NS dataset.} \label{fig:wenchao_ds} \end{figure} \begin{figure}[th] \centering \includegraphics[width=0.99\linewidth]{img/pmxr_ds.pdf} \caption{Histograms of the criteria values from the training part of the M1D dataset.} \label{fig:M1D_ds} \end{figure} \section{Results} \label{sec:experiments} In order to experimentally validate the approach presented in Section \ref{sec:solution}, we trained the proposed performance estimation neural network using Adam optimizer \cite{adam} with a learning rate of $10^{-4}$, and a batch size of 128 on both M1D and NS datasets. The models were trained for 100 epochs, and the models with the best performance on the validation set were chosen for further tests. It took about an hour to train each of the models using NVIDIA GTX1660 GPU. It is important to note that before feeding the data to the network we normalized them into $[0; 1]$ range, according to the ranges listed in Table \ref{tab:params} by a linear transformation. Similarly, we normalized the output performance criteria based on the dataset statistics presented in Figures~\ref{fig:wenchao_ds} and \ref{fig:M1D_ds}. As the distributions of the criteria differ between M1D and NS datasets, we used different normalization formulas. For NS dataset: (i) IAE was divided by 3.7, (ii) IAC was divided by 80, (iii) IACD was transformed using following expression $\textrm{IACD}_{norm} = (\log(\textrm{IACD} - 4) - 3) / 8$, and (iv) IADEE was divided by 50. Similarly, for the M1D dataset: (i) IAE was divided by 8, (ii) IAC was divided by 10, (iii) IACD was divided by 4000, and (iv) IADEE was divided by 100. For both datasets, the resulting values were finally clipped to the $[0; 1]$ range. While such an operation may lead to some distortions in the case of extremely high values of the criteria, they can be neglected as typically in the tuning procedure highest values of any of the aforementioned criteria are undesirable, as they lead to pathological behaviors, such as extremely high errors or control effort. \subsection{Performance estimation} Firstly, we validate the performance estimation capabilities of the proposed neural networks, as a precise performance estimation leads to the accurate tuning of the ESO gains. In Table \ref{tab:accuracy} we present the mean absolute errors (MAE) as well as mean absolute percentage errors (MAPE) obtained by our models on the test set (this part of data was not used for training nor model selection), for all considered criteria. Presented results show that the proposed neural networks can estimate each criterion in both datasets with reasonable accuracy, however, the worst results are obtained for IADEE. For a more detailed view of the errors made by the performance estimators, one can analyze the plots in Figures \ref{fig:M1D_errors} and \ref{fig:wenchao_errors}. In those charts we present predicted values for all criteria plotted against their true values. The red line visualizes the ideal estimator performance. One can see, that the obtained results, in general, lie very close to the red lines. The thinnest plots almost without outliers are obtained for IACD, whereas thickest for IADEE. In the case of IAE and IAC, there are some outliers, however, the main mass of the predictions lies in the close neighborhood of the ideal estimator line. \begin{table*}[!th] \centering \caption{Mean absolute errors (MAE) and mean absolute percentage errors (MAPE) on the test sets, for all considered criteria. Mean for MAE was omitted due to the different units of each criterion.} \vspace{0.3cm} \begin{tabular}{c|cc|cc} & \multicolumn{2}{c}{M1D} & \multicolumn{2}{c}{NS}\\ Criterion & MAE & MAPE & MAE & MAPE\\ \hline IAE & 0.02 $\pm$ 0.04 & 1.74 $\pm$ 3.48 & 0.01 $\pm$ 0.02 & 2.48 $\pm$ 6.47\\ IAC & 0.05 $\pm$ 0.06 & 1.38 $\pm$ 1.68 & 0.36 $\pm$ 0.5 & 3.15 $\pm$ 3.82\\ IACD & 6.11 $\pm$ 9.42 & 3.15 $\pm$ 12.46 & 52.21 $\pm$ 87.95 & 1.88 $\pm$ 5.90 \\ IADEE & 0.79 $\pm$ 1.27 & 3.43 $\pm$ 3.72 & 0.53 $\pm$ 0.89 & 8.40 $\pm$ 12.29\\ \hline MEAN & & \textbf{ 2.43 $\pm$ 6.84} & & \textbf{3.98 $\pm$ 8.20}\\ \end{tabular} \label{tab:accuracy} \end{table*} \begin{figure}[th] \centering \includegraphics[width=0.99\linewidth]{img/pmxr_crits_xy.pdf} \caption{Citeria values predicted by the neural network ploted against the true values form the M1D test set. Red lines denotes the ideal estimator performance ($y = x$).} \label{fig:M1D_errors} \end{figure} \begin{figure}[th] \centering \includegraphics[width=0.99\linewidth]{img/wenchao_crits_xy.pdf} \caption{Citeria values predicted by the neural network ploted against the true values form the NS test set. Red lines denotes the ideal estimator performance ($y = x$).} \label{fig:wenchao_errors} \end{figure} \subsection{Neural network based ESO tuning} Results obtained in the previous experiments show that the proposed approach can be used to estimate the performance of the closed-loop system with reasonable accuracy. In the following experiments, we validate whether the ESO tuning method utilizing the proposed performance estimators is able to propose reasonable observer gains, and lead to the near-optimal performance in terms of the given criterion. Moreover, we present how mixing the IAE, IAC, IACD, and IADEE criteria leads to different behaviors of the tuned system. As guessing the $\omega_0$ is a popular way of tuning ESO gains, we use random values of $\omega_0 \in [-1; -80]$ as a baseline for our tuning method. Firstly, we show the results of the proposed tuning procedure for a few example systems. The tuning procedure with the use of a neural network-based performance estimator is described in detail in Section \ref{sec:tuning_procedure}. Here, we are searching for the best ESO gains using a three dimensional uniform grid of the eigenvalues of the state matrix in the closed-loop observation subsystem~\eqref{eq:observationErrorDynamics}: $\Lambda \in \{[-1 - 79s, \ -1 - 79t, \ -1 - 79u]^\top \quad | \quad s, t, u\in\{0, \frac{1}{20}, ..., 1\}\}$. We first, consider an NS system \eqref{eq:wenchao_1}--\eqref{eq:wenchao_3} with the model parameters $(\wenchaoBenchmarkParameter{1}, \wenchaoBenchmarkParameter{2}, \ldots, \wenchaoBenchmarkParameter{7}) = (1, 0.5, 1, 1, 0.15, 1)$, noise standard deviation $\sigma_n = 0.007$, initial state in the basic experiment run $\pmb{x}_{test_{0}} = [0.2 \quad 0.1]^T$ and initial state in the target run $\pmb{x}_0 = [-0.9 \quad -0.5]^T$, which was not present in any dataset used for training. In Table \ref{tab:wenchao_tuning} we present several sets of $\Lambda$ values chosen with the use of our tuning solution for a few different performance criteria, together with the particular criterion values. For reference, we also reported the smallest possible criterion value with corresponding $\Lambda$ in general, and for the bandwidth parametrization (for the chosen quantization of $\lambda_i$ values). One can see that for all tested criteria our proposed solution achieves near-optimal performance. Similarly, bandwidth parametrization allows for finding a near-optimal solution for all tested criteria definitions, however, the optimal solutions are found for two $\lambda_i$ values equal, while the third may be different. \begin{table*}[!th] \footnotesize \renewcommand{\arraystretch}{1.6} \centering \caption{Comparison of the tuning results achieved by the proposed solution (NN-based estimator) with the best achievable tuning in general (Ideal estimator) and using bandwidth parametrization, predicts near-optimal $\Lambda$ for all considered criteria.} \vspace{0.3cm} \begin{tabular}{cccc|cc|cc|cc} \hline \hline \multicolumn{4}{c}{Criteria weights} & \multicolumn{2}{c}{\makecell{NN-based\\ estimator}} & \multicolumn{2}{c}{\makecell{Ideal\\ estimator}} & \multicolumn{2}{c}{\makecell{Bandwidth\\ parametrization}}\\ \hline $\alpha_1$ & $\alpha_2$ & $\alpha_3$ & $\alpha_4$ & $J$ & $\Lambda$ & $J$ & $\Lambda$ & $J$ & $\omega_o$ \\ \hline 10 & 1 & 0 & 0 & 7.01 & [-17.6, -17.6, -13.5] & 6.99 & [-25.9, -13.5, -13.5] & 7.04 & -17.6\\ \hline 20 & 1 & 0.005 & 0 & 11.46 & [-13.5, -13.5, -9.3] & 11.46 & [-13.5 -13.5 -9.3] & 11.48 & -13.5 \\ \hline 50 & 0 & 0 & 0.1 & 7.7 & [-38.4, -38.4, -34.3] & 7.54 & [-34.3, -34.3, -34.3] & 7.54 & -34.3 \\ \hline \hline \end{tabular} \label{tab:wenchao_tuning} \end{table*} Next, we evaluate the influence of the tuning on the control quality by simulating a hundred random models with the ESO gains selected with the proposed method and compare their transients with the ones obtained for observers with randomly chosen $\omega_0$. Results of those comparisons, for four different performance criteria, are presented in Figures~\ref{fig:M1D_1_IAE}, \ref{fig:M1D_0_5_IAE_0_5_IAC}, \ref{fig:M1D_0_9_IAE_0_0998_IAC_0_0002_IACD} and \ref{fig:wenchao_IADEE_1}. It is clearly visible in Figure~\ref{fig:M1D_1_IAE}, that optimizing only for IAE ($\alpha_1 = 1, \alpha_2=\alpha_3=\alpha_4=0$), which is a popular control objective \cite{zhang2019, wang2021}, with the use of the proposed method is possible and effective. Even though $x_1$ is driven to the close vicinity of zero very quickly, this requires an enormous control effort, which is presented in the rightmost plot. In order to limit that undesirable behavior, we choose a different criterion IAE + IAC ($\alpha_1 = \alpha_2 = 1, \alpha_3=\alpha_4=0$), and perform the same experiment, which results are presented in Figure~\ref{fig:M1D_0_5_IAE_0_5_IAC}. We can observe a slight decrease in the $x_1$ tracking but at the same time a strong improvement in the case of the absolute values of the control signal $u$. In order to also limit the sudden changes of the control signal, we add IACD to the criterion ($\alpha_1 = 0.9, \alpha_2 = 0.0998, \alpha_3=0.0002, \alpha_4=0$) and present the results of this experiment in Figure~\ref{fig:M1D_0_9_IAE_0_0998_IAC_0_0002_IACD}. Without lowering the $x_1$ and $u$ signals suppression performance, we were able to obtain a much smoother control signal, which is beneficial for the controller life span. In Figure~\ref{fig:wenchao_IADEE_1} we present a tuning performance of our method with a very different criterion -- IADEE only, for a different set of control objects -- NS. It is interesting that disregarding crucial performance metrics like IAE or IAC, and optimizing gains only for the tracking of the total disturbance, we obtain a reasonable quality of $x_1$ suppression (in almost all the cases), as well as limited and smoothed control signal $u$. Surprisingly, if one has no idea what kind of criterion suits the best for its purposes, the choice of IADEE appears to be a safe initial guess. \begin{figure*}[h!] \centering \includegraphics[width=0.8\linewidth]{img/mc_pmxr_1_IAE.pdf} \caption{Transient states for a hundred of random M1D objects. Top row contains transients for ADRC with ESO tuned with the proposed method for the performance criterion $J = \widehat{IAE}$, while bottom with random $\omega_0$ value.} \label{fig:M1D_1_IAE} \end{figure*} \begin{figure*}[h!] \centering \includegraphics[width=0.84\linewidth]{img/mc_pmxr_0_5_IAE_0_5_IAC.pdf} \caption{Transient states for a hundred of random M1D objects. Top row contains transients for ADRC with ESO tuned with the proposed method for the performance criterion $J = \widehat{\IAE} + \widehat{\IAC}$, while bottom with random $\omega_0$ value.} \label{fig:M1D_0_5_IAE_0_5_IAC} \end{figure*} \begin{figure*}[h!] \centering \includegraphics[width=0.84\linewidth]{img/mc_pmxr_0_9_IAE_0_0998_IAC_0_0002_IACD.pdf} \caption{Transient states for a hundred of random M1D objects. Top row contains transients for ADRC with ESO tuned with the proposed method for the performance criterion $J = 0.9 \cdot \widehat{\IAE} + 0.0998 \cdot \widehat{\IAC} + 0.0002 \cdot \widehat{\IACD}$, while bottom with random $\omega_0$ value.} \label{fig:M1D_0_9_IAE_0_0998_IAC_0_0002_IACD} \end{figure*} \begin{figure*}[h!] \centering \includegraphics[width=0.8\linewidth]{img/mc_wenchao_IADEE_1.pdf} \caption{Transient states for a hundred of random NS objects. Top row contains transients for ADRC with ESO tuned with the proposed method for the performance criterion IADEE, while bottom with random $\omega_0$ value.} \label{fig:wenchao_IADEE_1} \end{figure*} Obtained results show that by using our tuning method one can greatly improve the behavior of the ADRC control with a very low effort, as the only thing one needs to do is to perform a single closed-loop experiment with the reasonable ESO gains calculated for the $\lambda_1 = \lambda_2 = \lambda_3 = -25$. Moreover, presented results show how the construction of the criterion affects the behaviors of the controlled system. In those experiments, we considered previously unseen models drawn from the distribution on which the neural network based performance estimators were trained, however, it may not be the case in real-world applications. Therefore, we will next focus on the much harder cases where neural networks will be working outside of the training data distributions. \subsection{Generalization abilities} In order to show the generalization abilities of the proposed ESO tuning solution we tested the neural network based performance estimators in some challenging setups, which do not belong to the distribution of the training, validation and test sets. As a reference we use a M1D model with the following parameters: $(\pmxrBenchmarkParameter{1}, \pmxrBenchmarkParameter{2}, \ldots, \pmxrBenchmarkParameter{7}) = (-12, -20, 0.5, 0.5, 1, 0.5, 1)$, noise standard deviation $\sigma_n = 0.01$, initial state in the basic experiment run $\pmb{x}_{test_{0}} = [-0.5 \quad -0.5]^\top$ and initial state in the target run $\pmb{x}_0 = [0.5 \quad 0.5]^\top$. As an example of the M1D model from outside of the training set distribution we choose M1D with: $(\pmxrBenchmarkParameter{1}, \pmxrBenchmarkParameter{2}, \ldots, \pmxrBenchmarkParameter{7}) = (-30, -40, 1, 1, 3, 1, 3)$, noise standard deviation $\sigma_n = 0.03$, initial state in the basic experiment run $\pmb{x}_{test_{0}} = [0.5 \quad 0.5]^\top$ and initial state in the target run $\pmb{x}_0 = [1 \quad 1]^\top$. To present the generalization power of the proposed approach we plot a ground truth model performance criterion, as well as, predicted criterion value, depending on the chosen values of $\lambda_1, \lambda_2, \lambda_3$. For visualization purposes, we assume that $\lambda_3 = \lambda_2$, which allows us to plot the resultant performance landscapes in 3D. For this experiment, we chose the criterion to be an arithmetic mean of the IAE and IAC. Performance surfaces are presented in Figure~\ref{fig:generalization}. Obtained results show that even the performance estimator makes some errors in terms of the criterion value, it can estimate the shape of the performance landscape with reasonable precision, based on the information about the model gained from the test run. This allows the proposed approach to tune the ESO in a near-optimal way even far beyond the scope of the training set. Even a predictor trained on a completely different system (NS vs. M1D) produces reasonable hints for observer gains tuning. Analysis of the shapes of the ground truth performance landscapes for these two systems suggests that, while bandwidth parametrization allows for obtaining the whole spectrum of the performances for analyzed criteria, optimal solutions are achievable even when only two eigenvalues $\lambda_i$ are equal, and the third one may be different. Interestingly, the valley of the near-optimal performance lies on the line $\lambda_{1,2} + \lambda_3 = c$, where $c$ is some constant. \begin{figure*}[h!] \centering \includegraphics[width=0.85\linewidth]{img/generalization_final.pdf} \caption{Performance landscapes obtained for 3 setups: A) reference M1D model from the distribution of the training set (however not included in it); B) M1D model from outside of the training set distribution; C) reference M1D model, however, the predictor was trained only on the NS dataset. In all 3 cases, the shape of the predicted surfaces resembles the ground truth, which makes it possible to use the proposed predictor for ADRC tuning even for the object from outside of the training set. } \label{fig:generalization} \end{figure*} A closer look at the performance of the ESO tuned with the use of the neural network trained on the different dataset is presented in Figure~\ref{fig:generalization_monte_carlo}. Here, we used a neural network trained on the M1D dataset to predict the observer gains for the set of 100 random NS systems. Resultant transients, compared with a random bandwidth parametrization, suggest that the proposed method can outperform the naive approach to ESO tuning, even when trained for a different system. \begin{figure*}[h!] \centering \includegraphics[width=0.8\linewidth]{img/mc_wenchao_pmxr_0_989_IAE_0_01_IAC_0_001_IACD.pdf} \caption{Transient states for a hundred of random NS objects. Top row contains transients for ADRC with ESO tuned with the proposed method for the performance criterion 0.989 IAE + 0.01 IAC + 0.001 IACD, while bottom with random $\omega_0$ value. Notice that, the neural network used to tune ESO gains was trained on M1D dataset.} \label{fig:generalization_monte_carlo} \end{figure*} \section{Conclusions} \label{sec:conclusions} We presented a novel extended state observer tuning method for application in ADRC. The proposed solution uses a neural-network as a performance estimator of the closed loop system, which allows reasoning about the effects of the different choices of ESO gains. This method allows for multi-criteria ESO tuning, which takes into account not only the absolute error but also the control effort and the measurement noise suppression abilities. The proposed tuning solution enables cheap checking of many possible parameter sets, without the need to repeatedly simulate or run the whole system, which saves time of the control engineer and avoids possibly costly tuning rehearsals on the real system. The important advantage of this solution is that it requires a single run of the closed-loop system to estimate its performance at any number of different ESO gains. Our method was validated throughout several simulation experiments on two different, challenging control objects. Obtained results show that the proposed neural-network was able to estimate four integral performance metrics (IAE, IAC, IACD, IADEE), for previously unseen systems, with a mean absolute percentage error less than 4\%. This allowed us to show that our method can produce ESO gains that are near-optimal, in terms of the user-defined criterion. To demonstrate the quality of the tuning, we compared the transients of the systems tuned with the use of the proposed method, with the random choice of $\omega_0$ in the bandwidth parametrization, or several criteria combinations. As the criterion is a user-defined combination of the selected integral control quality indicators, we analyzed their impact on the resultant eigenvalues of the state matrix in the closed-loop observation subsystem and the transients of the system tuned according to their combinations. The results showed that it is important to include the criteria related to the control effort in the tuning process, as it results in much more practically applicable control systems, and if one is not sure about the shape of the criterion, the Integral of Absolute Disturbance Estimation Error itself is a safe initial guess. Moreover, as the proposed tuning method is data-driven, we showed its generalization abilities. Not only it works in a near-optimal fashion for the systems of the same structure with parameters out of the training data distribution, but even for systems of the very different structure it provides reasonably well tuning. Analysis of the performance landscapes for several different settings shows, that while the neural-network based performance estimator makes bigger errors for objects out of the training distributions, it still preserves the shape of the landscape, which is crucial for appropriate, near-optimal ESO tuning. \vspace{-\baselineskip} In future work, we would like to analyze the possibility to use the proposed system in an on-line fashion, to change the ESO gains every time the working conditions change. Moreover, the analysis of the performance landscapes suggests that, even though the bandwidth parametrization captures the near-optimal solution for the ESO tuning problem, one can propose a parametrization that will have better average performance and still lies near the optimal solution. This may be beneficial for the tuning ESO manually and seems like a promising future work direction. \section{Acknowledgement} The article was created thanks to participation in program PROM of the Polish National Agency for Academic Exchange. The program is co-financed from the European Social Fund within the Operational Program Knowledge Education Development, non-competitive project entitled “International scholarship exchange of PhD students and academic staff” executed under the Activity 3.3 specified in the application for funding of project No. POWR.03.03.00-00-PN13/18.
\section{Introduction} The Cahn--Hilliard equation was originally introduced in \cite{cahn-hilliard} to describe spinodal decomposition in binary alloys. Meanwhile, it has become one of the most popular models to describe various kinds of phase separation phenomena arising, for instance, in materials science, life sciences and image processing. The standard Cahn--Hilliard equation as proposed in \cite{cahn-hilliard} reads as follows: \begin{subequations} \label{CH} \begin{alignat}{2} \label{CH:1} &\delt u = \mom \Lap \mu &&\quad\text{in } Q := \Omega\times (0,\infty),\\ \label{CH:2} &\mu = -\eps \Lap u + \eps^{-1} F'(u) &&\quad\text{in } Q,\\ \label{CH:3} &u\vert_{t=0}=u_0 &&\quad\text{in } \Omega. \end{alignat} \end{subequations} Here, $\Omega\subset\R^d$ stands for a bounded domain (usually $d\in\{2,3\}$) with boundary $\Gamma$, $\Lap$ stands for the Laplace operator acting on $\Omega$, and $\mo$ denotes a mobility parameter. For simplicity, it is assumed to be a non-negative constant, although non-constant mobilities find a use in some situations (see, e.g., \cite{elliotgarcke}). In order to describe a binary mixture, the phase-field variable $u$ represents the difference in volume fractions of both materials. After a short period of time, the solution $u$ will attain values close to $\pm 1$ in most parts of the domain $\Omega$. These regions, which correspond to the pure phases of the materials, are separated by a diffuse interface whose thickness is proportional to the parameter $\eps>0$ appearing in \eqref{CH:2}. In most applications this interface will be very thin and thus, the parameter $\eps$ is usually chosen to be very small. The time evolution of the mixture described by $u$ is driven by the chemical potential $\mu$ in the bulk (i.e., in $\Omega$). It is given as the derivative of the following Ginzburg--Landau type free energy: \begin{align} E_\text{bulk}(u) = \int_\Omega \frac \eps 2|\grad u|^2 + \frac 1 \eps F(u) \dx. \end{align} The bulk potential $F$ is usually double-well shaped. Typically, it attains its minimum at $-1$ and $1$ and has a local maximum in between at $0$. From a mathematical point of view, $F$ is responsible for the phase separation since it is energetically favorable for $u$ to attain values close to $\pm 1$. A physically relevant choice is the \emph{logarithmic potential} \begin{align} \label{POT:LOG} F_\text{log}(s)= \frac\vartheta 2 \big((1+s)\ln(1+s) + (1-s)\ln(1-s)\big) - \frac{\vartheta_c}{2} s^2, \quad s\in (-1,1) \end{align} with constants $0<\vartheta<\vartheta_c$. It is often approximated by the \emph{smooth double-well potential} \begin{align} \label{POT:SMOOTH} F_\text{sdw}(s) = \frac{1}{4}(s^2-1)^2, \quad s\in\R \end{align} which is easier to handle in terms of mathematical analysis. In this paper, we will deal with general smooth potentials satisfying certain polynomial growth conditions such that \eqref{POT:SMOOTH} fits into our setting. However, singular potentials like \eqref{POT:LOG} cannot be taken into account in our approach. To ensure well-posedness of the system \eqref{CH}, certain boundary conditions on $u$ and $\mu$ need to be imposed. The classical choices are the homogeneous Neumann conditions \begin{alignat}{2} \label{HNC:1} \del_\n u &= 0 &&\quad\text{on}\;\; \Sigma:=\Gamma\times(0,\infty),\\ \label{HNC:2} \del_\n \mu &= 0 &&\quad\text{on}\;\; \Sigma. \end{alignat} The \emph{no-flux condition} $\eqref{HNC:2}$ implies mass conservation in the bulk, meaning that (sufficiently regular) solutions satisfy \begin{align} \int_\Omega u(t) \dx = \int_\Omega u(0) \dx, \quad t\in [0,\infty). \end{align} Moreover, due to \eqref{HNC:1} and \eqref{HNC:2}, we obtain the following energy dissipation law: \begin{align} \frac{d}{dt} E_\text{bulk}\big(u(t)\big) + \mom \intO |\grad\mu(t)|^2 \dx = 0, \quad t\in [0,\infty). \end{align} Furthermore, $\eqref{HNC:1}$ can be regarded as a \emph{contact angle condition} as it enforces the diffuse interface separating the regions of pure materials to intersect the boundary at a perfect right angle. The Cahn--Hilliard equation \eqref{CH} with the homogeneous Neumann conditions \eqref{HNC:1} and \eqref{HNC:2} is already very well understood and has been studied from many different viewpoints (see, e.g., \cite{Abels-Wilke,Bates-Fife,Cherfils,elliotgarcke,elliotzheng}). In particular, we refer to \cite{zheng,rybka,miranville-lt,GY,EMZ} for the investigation of long-time behavior. However, in many situations the contact angle condition \eqref{HNC:1} turned out to be very restrictive as in many applications the contact angle of the interface will not only deviate from ninety degrees but also change dynamically over the course of time. In certain situations (e.g., in hydrodynamic applications), it also turned out to be essential to model short-range interactions between the mixture of materials and the solid wall of the container more precisely. To this end physicists (see \cite{Fis1,Fis2,Kenzler}) proposed that the total free energy should contain an additional contribution on the surface being also of Ginzburg--Landau type: \begin{equation}\label{DEF:ENS} E_\text{surf}(u) = \intG \frac{\kappa \delta }{2} \abs{\gradg u}^2 + \frac{1}{\delta} G(u) \dG. \end{equation} Here, $\gradg$ denotes the surface gradient operator, the constant $\kappa\ge 0$ acts as a weight for surface diffusion effects and the parameter $\delta>0$ is related to the thickness of the diffuse interface on the boundary. Moreover, the function $G$ is an additional surface potential. If phase separation processes are expected to also occur on the boundary it makes sense to assume that $G$ exhibits a double-well structure similar to $F$. In this paper, we will thus impose similar conditions on $G$ as on $F$ such that the choice $G=F_\mathrm{sdw}$ is admissible. The total free energy $E=E_\text{bulk}+E_\text{surf}$ then reads as \begin{equation}\label{DEF:EN} E(u) = \int_\Omega \frac \eps 2|\grad u|^2 + \frac 1 \eps F(u) \dx + \intG \frac{\kappa \delta }{2} \abs{\gradg u}^2 + \frac{1}{\delta} G(u) \dG. \end{equation} Associated with this total free energy, various Cahn-Hilliard type systems with dynamic boundary conditions have been proposed and investigated in the literature (see,e.g., \cite{colli-fukao-ch,colli-gilardi,Gal1,GalWu,colli-gilardi-sprekels,liero,mininni,miranville-zelik,motoda,racke-zheng,WZ, FukaoWu, Wu,GalGra, CGG, CGW, CFW, MW}). In recent times, dynamic boundary conditions which also exhibit a Cahn--Hilliard type structure have become very popular. Therefore, we want to highlight the Cahn--Hilliard equation subject to a class of dynamic boundary conditions of Cahn--Hilliard type depending on a parameter $L\in[0,\infty]$: \begin{subequations}\label{CH:INT} \begin{alignat}{3} & \delt u = \mo \Delta\mu, &&\mu = - \eps \Lap u + \eps^{-1} F'( u) &&\quad \text{in } Q, \label{CH:INT:1}\\ & \delt v = \mg \Lapg \theta - \beta \mo \pdnu\mu,\quad &&\theta = - \delta \kappa\Lapg v + \delta^{-1} G'(v) + \eps \pdnu u &&\quad \text{on } \Sigma, \label{CH:INT:2}\\ & u\vert_\Sigma = v &&&&\quad \text{on } \Sigma, \label{CH:INT:3}\\[1ex] &\left\{ \begin{aligned} \mu\vert_\Si &= \beta \theta \\ L \pdnu\mu\vert_\Si &= \beta \theta - \mu\vert_\Si \\ \pdnu\mu\vert_\Si &= 0 \\ \end{aligned} \right. && \begin{aligned} &\text{if}\; L=0,\\ &\text{if}\; L\in(0,\infty),\\ &\text{if}\; L=\infty,\\ \end{aligned} &&\quad \text{on } \Sigma, \label{CH:INT:4} \\[1ex] & (u,v)\vert_{t=0} = (u_0,v_0) &&\text{with}\; u_0\vert_\Si = v_0 &&\quad \text{in } \Omega \times \Gamma. \label{CH:INT:5} \end{alignat} \end{subequations} The chemical potentials $\mu$ and $\theta$ which are coupled by the boundary condition $\eqref{CH:INT:4}$ describe the chemical interaction between the materials in the bulk and the materials on the surface. The constant $1/L$ is related to a \emph{kinetic rate}, and the term $L\deln\mu$ describes adsorption and desorption processes. Here, the mass flux $-\mo \deln \mu$ (which describes the motion of the materials towards and away from the boundary) is directly influenced by differences in the chemical potentials through the condition \eqref{CH:INT:4}. As the models corresponding to the cases $L=0$, $L=\infty$ and $0<L<\infty$ were introduced separately in different articles in the literature, we are now going to briefly highlight their most important features. \paragraph{The case $L=0$ (GMS model).} The system \eqref{CH:INT} was first introduced with $L=0$ in \eqref{CH:INT:4} by G.~Goldstein, A.~Miranville and G.~Schimperna \cite{GMS}. In view of the authors' initials we will refer to this system as the \textit{GMS model}. It can be regarded as an extension of a model that was previously introduced by Gal \cite{Gal1} where the equation $ \delt v = -\beta \pdnu \mu + \gamma \mu $ on $\Sigma$ (for some additional constant $\gamma$) was proposed instead of $\eqref{CH:INT:2}$. Here, the chemical potentials in the bulk and on the boundary can differ only by the factor $\beta$, i.e., they are directly proportional. In other words, this means that the chemical potentials $\mu$ and $\theta$ are always in chemical equilibrium. It is worth mentioning that in \cite{GMS}, $\beta$ is even allowed to be a uniformly positive function in $L^\infty(\Ga)$. However, in this paper we restrict ourselves to the case where $\beta$ is a positive constant. We observe that any (sufficiently regular) solution to the GMS system satisfies the mass conservation law \begin{align} \label{GMS:MASS} \beta \intO u(t) \dx + \intG v(t) \dG = \beta \intO u(0) \dx + \intG v(0) \dG, \quad t\in [0,\infty), \end{align} meaning that the parameter $\beta$ can be interpreted as a weight for the bulk mass compared to the surface mass. Moreover, the energy dissipation law \begin{align} \label{GMS:NRG} \frac{d}{dt} E\big(u(t),v(t)\big) + \mom \intO |\grad\mu(t)|^2 \dx + \mga \intG|\gradg \theta(t)|^2 \dG = 0 \end{align} is satisfied for all $t\in[0,\infty)$. In particular, we observe that the dissipation rate is strongly influenced by the values of the mobilities $\mom$ and $\mga$. The weak well-posedness and some results on long-time behavior were established in \cite{GMS}. We will present the well-posedness result as well as some additional important properties of weak solutions in Section~\ref{sec:wellposedGMS}. A summary of the results on long-time behavior is given in Section~\ref{LT:GMS}. We further point out that numerical analysis for the GMS model as well as some numerical simulations can be found in \cite{Harder2020}. A nonlocal variant of the GMS model (including a nonlocal dynamic boundary condition) was proposed and analyzed in \cite{KS}. \paragraph{The case $L=\infty$ (LW model).} Some time after the introduction of the GMS model, the system \eqref{CH:INT} with $L=\infty$ in \eqref{CH:INT:4} was derived by C.~Liu and H.~Wu \cite{LW} via an energetic variational approach. We will thus call this system the \textit{LW model}. The crucial difference to the GMS model is that the Dirichlet type boundary condition $\beta\theta = \mu$ is replaced by the no mass flux condition $\deln\mu = 0$. This means that the chemical potentials $\mu$ and $\theta$ are not directly coupled. However, mechanical interactions between the bulk and the surface materials are still taken into account through the trace condition \eqref{CH:INT:3} for the phase-field variable. Mathematically speaking, the elliptic subproblems $\big(\eqref{CH:INT:1}_1,\eqref{CH:INT:3}\big)$ and $\eqref{CH:INT:2}_1$ are coupled only through the trace relation \eqref{CH:INT:3}. Compared to \eqref{GMS:MASS}, we obtain the very different mass conservation law \begin{align} \label{LW:MASS} \intO u(t) \dx = \intO u(0) \dx \quad\text{and}\quad \intG v(t) \dG = \intG v(0) \dG, \quad t\in [0,\infty), \end{align} meaning that the bulk mass and the surface mass are conserved \textit{separately}. However, the energy dissipation law \eqref{GMS:NRG} is still satisfied by solutions of this system. The well-posedness of the LW model was addressed in~\cite{LW,GK}, and its long-time behavior was investigated in~\cite{LW,MW}. For numerical analysis and some simulations we refer to~\cite{Metzger2019,BaoZhangLW}. Moreover, a variant of the LW model \eqref{CH:INT} was proposed and investigated in \cite{KL} where the relation between $u$ and $v$ is given by the Robin type transmission condition \begin{align*} K\deln u = H(v) - u \quad \text{ on } \Sigma \end{align*} with $K>0$ and a function $H\in C^2(\R)$ satisfying suitable growth conditions. In particular, it was rigorously established in \cite{KL} that in the case $H(s) = s$, solutions of this model converge to solutions of the LW model in the limit $K\to 0$ in some suitable sense. \paragraph{The case $0<L<\infty$ (KLLM model).} For $0<L<\infty$, the system \eqref{CH:INT} was recently proposed and analyzed by the second author in collaboration with K.F.~Lam, C.~Liu and S.~Metzger \cite{KLLM}. It will thus be referred to as the \textit{KLLM model}. The Robin type condition \eqref{CH:INT:3} establishes a connection between the GMS model (\eqref{CH:INT} with $L=0$) and the LW model (\eqref{CH:INT} with $L=\infty$) despite their very different chemical and physical properties. Suppose that $\beta>0$ and that $(u^L, v^L, \mu^L, \theta^L)$ is a solution of the system \eqref{CH:INT} corresponding to the parameter $L>0$. Let $(u^0, v^0, \mu^0, \theta^0)$ denote its formal limit as $L\to 0$ and let $(u^\infty, v^\infty, \mu^\infty, \theta^\infty)$ denote its formal limit as $L\to\infty$. Passing to the limit in the Robin boundary condition, we deduce that \begin{align*} \beta\theta^0 = \mu^0 \quad\text{on } \Sigma \quad\text{and}\quad \deln \mu^\infty = 0\quad\text{on } \Sigma. \end{align*} This corresponds to the limit cases of instantaneous relaxation to chemical equilibrium ($1/L\to\infty$), and the absence of adsorption and desorption ($1/L\to0$). We infer that $(u^0, v^0, \mu^0, \theta^0)$ is a solution to the GMS model while $(u^\infty, v^\infty, \mu^\infty, \theta^\infty)$ is a solution to the LW model. These formal considerations are rigorously verified in \cite{KLLM}. In this regard, the Cahn--Hilliard system \eqref{CH:INT} with $L\in(0,\infty)$ can be interpreted as an interpolation between the GMS model and the LW model where the interpolation parameter $L$ corresponds to positive but finite kinetic rates. We observe that solutions of the KLLM model satisfy the same mass conservation law \eqref{GMS:MASS} as solutions of the GMS model. However, we obtain an additional term in the dissipation rate depending on the relaxation parameter $L$. To be precise, it holds that \begin{align} \label{INT:NRG} \frac{d}{dt} E\big(u(t)\big) + \mom \intO |\grad\mu(t)|^2 \dx + \mga \intG |\gradg \theta(t)|^2 \dG + \frac{\mom}{L} \intG \big(\beta\theta(t)-\mu(t)\big)^2 \dG = 0 \end{align} for all $t\in [0,\infty)$. In particular, this implies that the total free energy $E$ is decreasing along solutions, and as $E$ is bounded from below (at least for reasonable choices of $F$ and $G$), we infer that $\frac{d}{dt} E(u(t))$ tends to zero as $t\to\infty$. As a consequence, the chemical potentials will converge to the chemical equilibrium $\mu = \beta \theta$ as $t\to\infty$. We further point out that weak and strong well-posedness of the KLLM model was established in \cite{KLLM}. As already mentioned above, the asymptotic limits $L\to 0$ and $L\to \infty$ were also discussed in \cite{KLLM}. We will exploit some of these results for the limit $L\to 0$ in Section~5, Lemma~\ref{LEM:CONV:GMS}. For simulations and numerical analysis concerning the KLLM model, we refer to \cite{KLLM,BaoZhangKLLM}. A nonlocal variant of the KLLM model (including a nonlocal dynamic boundary condition) was proposed and investigated in \cite{KS}. \paragraph{Contents of this paper.} This paper is structured as follows. In Section~\ref{SEC:PIT}, we first introduce some notation and assumptions which will be used throughout the paper. We further define some suitable spaces and operators and we introduce several important interpolation inequalities. In Section~\ref{SEC:WPP}, we present the well-posedness results for both the KLLM model and the GMS model for the reader's convenience. Furthermore, we establish some properties of the weak solutions to both models which are essential to investigate their long-time behavior. Subsection~\ref{sec:long-time} is devoted to the long-time analysis of the KLLM model. We first characterize the set of stationary points containing the time-independent solutions to the KLLM model. Next, we establish the existence of a (unique) global attractor and we prove convergence of weak solutions to a single stationary point as $t\to\infty$ by means of a \L ojasiewicz--Simon inequality. Eventually, we show that the global attractor can be represented as the union of the unstable manifolds of all stationary points. In Subsection~\ref{LT:GMS}, supported by the results on long-time behavior that have already been established in \cite{GMS}, we sketch how all results we proved in Subsection~\ref{sec:long-time} for the KLLM model can be obtained also for the GMS model in a similar fashion. Next, in Section~\ref{sec:contglbatt}, we show that the global attractor of the GMS model (i.e., $L=0$) is stable with respect to perturbations of the kinetic rate (i.e., $L>0$ being small). Ultimately, in Section~\ref{SEC:EXP}, we show that there exists a family $\{\mathfrak M^L\}_{L\ge 0}$ of exponential attractors for the system \eqref{CH:INT} such that the attractor $\mathfrak M^0$ associated with the GMS model is robust in some certain sense against perturbations of the kinetic rate (i.e., $L>0$ being small). \paragraph{Comparison of the GMS/KLLM dynamics with the LW dynamics.} We point out that we do not see any possibility of transferring the results of Section~\ref{sec:contglbatt} and Section~\ref{SEC:EXP} to the scenario $L\to\infty$. This is mainly due to the different mass conservation law of the LW model. Roughly speaking, the mass conservation law \eqref{GMS:MASS} of the GMS/KLLM model fixes only one degree of freedom, whereas the mass conservation law \eqref{LW:MASS} of the LW model already fixes two degrees of freedom. As a consequence, the GMS/KLLM model and the LW model exhibit a different behavior regarding energy dissipation. Namely, as only one degree of freedom is fixed by the mass conservation law, the free energy can usually be decreased much further by the GMS/KLLM model than by the LW model. This phenomenon can also be observed in numerical simulations, see, e.g., \cite[Fig.~4]{KLLM} or \cite[Fig.~16]{BaoZhangKLLM}. This already indicates that the GMS/KLLM model and the LW model differ in their long-time behavior. For more details why our analysis in Section~\ref{sec:contglbatt} and Section~\ref{SEC:EXP} fails in the situation $L\to\infty$, we refer to Remark~\ref{REM:FAIL}. \paragraph{Further related results in the literature.} For further results on long-time behavior for Cahn--Hilliard models with dynamic boundary conditions, we refer to \cite{pruss-wilke,GMS-lt,Gal-lt,MW,GMS,CFP}. We also want to mention \cite{israel-lt} where the long-time dynamics of an Allen--Cahn model with dynamic boundary conditions were studied, and \cite{israel-lt,CFP} where the long-time behavior of a Caginalp phase field model with dynamic boundary conditions was analyzed. \section{Preliminaries and important tools}\label{SEC:PIT} We will now fix some notation and assumptions that are supposed to hold throughout this paper. \paragraph{Notation.} \begin{enumerate}[label=$(\mathrm{N \arabic*})$, ref = $\mathrm{N \arabic*}$] \item Sometimes, we will use the notation $\RP:=[0,\infty)$. The symbol $\N_0$ denotes the set of natural numbers including zero and $\N = \N_0\setminus\{0\}$. \item For any real numbers $k \geq 0$ and $1 \leq p \leq \infty$, the standard Lebesgue and Sobolev spaces over a domain $\Omega$ are denoted as $L^p(\Omega)$ and $W^{k,p}(\Omega)$. We write $\norm{\cdot}_{L^p(\Omega)}$ and $\norm{\cdot}_{W^{k,p}(\Omega)}$ to denote the standard norms on these spaces. If $p = 2$, these spaces are Hilbert spaces and we use the notation $H^k(\Omega) = W^{k,2}(\Omega)$. We point out that $H^0(\Omega)$ can be identified with $L^2(\Omega)$. An analogous notation is used for Lebesgue and Sobolev spaces on $\Gamma:=\partial\Omega$, provided that the boundary is sufficiently regular. \item For any Banach space $X$, we write $X'$ to denote its dual space. The associated duality pairing of elements $\phi\in X'$ and $\zeta\in X$ is denoted as $\inn{\phi}{\zeta}_X$. If $X$ is a Hilbert space, we write $(\cdot, \cdot)_X$ to denote its inner product. \item We define \begin{align*} \mean{u}_\Omega := \begin{cases} \frac{1}{\abs{\Omega}} \inn{u}{1}_{H^1(\Omega)} & \text{ if } u \in H^1(\Omega)', \\ \frac{1}{\abs{\Omega}} \int_\Omega u \dx & \text{ if } u \in L^1(\Omega) \end{cases} \end{align*} to denote the (generalized) spatial mean of $u$. Here, $\abs{\Omega}$ denotes the $d$-dimensional Lebesgue measure of $\Omega$. The spatial mean of a function $v \in H^1(\Gamma)'$ (or $v \in L^1(\Gamma)$, respectively) is defined analogously. \item Let $(X,d)$ be a metric space. Then for any sets $A,B\subset X$, the \emph{Hausdorff semidistance} is defined as \begin{align} \label{DEF:SEMIDIST} \dist_{X}(A,B) :=\underset{a\in A}{\sup } \; \underset{b\in B}{\inf } \; d \left( a,b\right), \end{align} and the \emph{symmetric Hausdorff distance} is given by \begin{align} \label{DEF:SYMDIST} \dist_{\mathrm{sym},X}(A,B) := \max\big( \dist_{X}(A,B) \,{,}\, \dist_{X}(B,A) \big). \end{align} For any compact set $K\subset X$, the \emph{fractal dimension of $K$} is defined as \begin{align} \label{DEF:DIMFRAC} \dim_{\mathrm{frac},X}(K) := \underset{r\to 0}{\lim\sup} \frac{\ln\big(\mathcal N_r(K;X)\big)}{-\ln(r)}, \end{align} where $\mathcal N_r(K;X)$ denotes the minimal number of balls in $X$ with radius $r$ that are necessary to cover the set $K$. \end{enumerate} \paragraph{Assumptions. We make the following general assumptions. \begin{enumerate}[label=$(\mathrm{A \arabic*})$, ref = $\mathrm{A \arabic*}$] \item \label{ass:dom} We assume that $\Omega\subset \R^d$ with $d\in\{2,3\}$ is a bounded domain whose boundary $\Gamma:=\del\Omega$ is of class $C^3$. We further use the notation \begin{align*} Q:=\Omega\times(0,\infty),\quad \Si:=\Ga\times(0,\infty). \end{align*} \item \label{ass:const} In general, we assume that the constants occurring in the system \eqref{CH:INT} satisfy $T$, $\beta$, $\kappa$, $\mo$, $\mg>0$ and $L\in[0,\infty)$. Since the choice of $\delta$, $\eps$, $\kappa$, $\mo$ and $\mg$ has no impact on the mathematical analysis, we will simply set $\delta=\eps=\kappa=\mo=\mg=1$ for convenience in the mathematical analysis. \item \label{ass:pot} We assume that the potentials $F$ and $G$ are non-negative functions which can be written as $F=F_1+F_2$ and $G=G_1+G_2$ with $F_1,F_2,G_1,G_2 \in C^2(\R)$ such that the following properties hold: \begin{enumerate}[label=$(\mathrm{A 3.\arabic*})$, ref = $\mathrm{A 3.\arabic*}$] \item \label{ass:pot:1} There exist exponents $2<p\le 4$ and $q>2$, as well as constants $a_{F},a_{F'},c_{F},c_{F'}>0$ and $b_{F},b_{F'}\ge 0$ such that for all $s\in\R$, \begin{subequations} \begin{alignat}{3} \label{GR:F} a_{F}\abs{s}^p - b_{F} &\le F(s) &&\le c_{F}(1+\abs{s}^p), \\ \label{GR:G} a_{G}\abs{s}^q - b_{G} &\le G(s) &&\le c_{G}(1+\abs{s}^q), \\ a_{F'}\abs{s}^{p-1} - b_{F'} &\le \abs{F'(s)} &&\le c_{F'}(1+\abs{s}^{p-1}), \\ a_{G'}\abs{s}^{q-1} - b_{G'} &\le \abs{G'(s)} &&\le c_{G'}(1+\abs{s}^{q-1}). \end{alignat} \end{subequations} \item \label{ass:pot:2} The functions $F_1$ and $G_1$ are convex and non-negative. There further exist positive constants $c_{F''}$ and $c_{G''}$ such that the second order derivatives satisfy the growth conditions \begin{align} 0\le F_1''(s) \leq c_{F''}(1 + |s|^{p-2}), \quad 0\le G_1''(s) \leq c_{G''} (1 + |s|^{q-2}) \end{align} for all $s\in\R$. \item \label{ass:pot:3} The derivatives $F_2'$ and $G_2'$ are Lipschitz continuous. Consequently, there exist positive constants $d_F$, $d_G$, $d_{F'}$ and $d_{G'}$ such that for all $s\in\R$, \begin{alignat}{3} &\abs{F_2'(s)} \le d_{F'}(1+\abs{s}), \quad &&\abs{G_2'(s)} \le d_{G'}(1+\abs{s}), \\ &\abs{F_2(s)} \le d_F(1+\abs{s}^2), \quad &&\abs{G_2(s)} \le d_G(1+\abs{s}^2). \end{alignat} \end{enumerate} \end{enumerate} In the analysis of the long-time dynamics, we will frequently have to use the following additional assumption: \begin{enumerate}[label=$(\mathrm{A\arabic*})$, ref = $\mathrm{A\arabic*}$, start=4] \item \label{ass:ana} We assume that $F,G\in C^\infty(\R)$ are analytic functions. \end{enumerate} \bigskip \begin{remark}\label{REM:ASS}\normalfont We point out that the polynomial double-well potential \begin{align*} W_\text{dw}(s)=\tfrac 1 4 (s^2-1)^2,\quad s\in\R, \end{align*} is a suitable choice for $F$ and $G$ as it satisfies \eqref{ass:pot} with $p = 4$ and $q = 4$, and obviously also \eqref{ass:ana}. However, singular potentials like the logarithmic potential or the obstacle potential are not admissible as they do not even satisfy \eqref{ass:pot}. \end{remark} \bigskip \paragraph{Preliminaries.} We next introduce several function spaces, products, norms and operators that will be used throughout this paper. \begin{enumerate}[label=$(\mathrm{P \arabic*})$, ref = $\mathrm{P \arabic*}$] \item For any $k\in\N_0$ and any real number $p\in[1,\infty]$, we set \begin{align*} \LL^p := L^p(\Omega)\times L^p(\Gamma), \quad\text{and}\quad \HH^k := H^k(\Omega) \times H^k(\Gamma), \end{align*} and we identify $\LL^2$ with $\HH^0$. Note that $\HH^k$ is a Hilbert space with respect to the inner product \begin{align*} \bigscp{(\phi,\psi)}{(\zeta,\xi)}_{\HH^k} := \bigscp{\phi}{\zeta}_{H^k(\Omega)} + \bigscp{\psi}{\xi}_{H^k(\Gamma)} \quad\text{for all $(\phi,\psi),(\zeta,\xi)\in\HH^k$,} \end{align*} and its induced norm $\norm{\cdot}_{\HH^k}:= \scp{\cdot}{\cdot}_{\HH^k}^{1/2}$. \item \label{pre:V} For any $k\in\N$, we introduce the Hilbert space \begin{align*} \Vk := \big\{ (\phi,\psi) \in \HH^k \suchthat \phi \vert_\Gamma = \psi \;\text{a.e.~on}\; \Gamma\big\} \end{align*} endowed with the inner product $\scp{\cdot}{\cdot}_{\Vk}:=\scp{\cdot}{\cdot}_{\HH^k}$ and the norm $\norm{\cdot}_{\Vk}:=\norm{\cdot}_{\HH^k}$. \item \label{pre:W} For any $m\in\R$, $\beta>0$ and $k\in\N$, we set \begin{align*} \Wmk &:= \big\{ (\phi,\psi) \in \Vk \suchthat \beta\abs{\Omega}\mean{\phi}_\Om + \abs{\Gamma}\mean{\psi}_\Ga = m\big\}. \end{align*} Endowed with the inner product \begin{align*} \scp{\cdot}{\cdot}_{\WW_{\beta,0}^k} := \scp{\cdot}{\cdot}_{\HH^k} \end{align*} and the induced norm, the space $\WW_{\beta,0}^k$ is a Hilbert space. \item \label{pre:D} For $\beta>0$, we introduce the subspace \begin{align*} \Db := \left\{ (\phi,\psi) \in \HH^1 \;\big\vert\; \phi\vert_\Ga = \beta\psi \;\; \text{a.e. on}\; \Ga \right\} \subset \HH^1. \end{align*} Endowed with the inner product \begin{align*} \scp{\cdot}{\cdot}_\Db := \scp{\cdot}{\cdot}_{\HH^1} \end{align*} and its induced norm, the space $\Db$ is a Hilbert space. Moreover, we define the product \begin{align*} \biginn{(\phi,\psi)}{(\zeta,\xi)}_{\Db} := \scp{\phi}{\zeta}_{L^2(\Omega)} + \scp{\psi}{\xi}_{L^2(\Gamma)} \end{align*} for all $(\phi,\psi), (\zeta,\xi)\in \LL^2$. By means of the Riesz representation theorem, this product can be extended to a duality pairing on $(\Db)'\times \Db$, which will also be denoted as $\inn{\cdot}{\cdot}_{\Db}$. In particular, the spaces $\big(\Db,\LL^2,(\Db)'\big)$ form a Gelfand triplet, and the operator norm on $(\Db)'$ is given by \begin{align*} \norm{(\phi,\psi)}_{(\Db)'} := \sup\Big\{\, \big|\inn{(\phi,\psi)}{(\zeta,\xi)}_{\Db}\big| \;\Big\vert\; (\zeta,\xi)\in\Db \text{ with } \norm{(\zeta,\xi)}_{\Db} = 1 \Big\}, \end{align*} for all $(\phi,\psi) \in(\Db)'$. Note that the mapping \begin{align*} \mathfrak{I}:\VV^1\to\Db,\quad (\phi,\psi) \mapsto (\beta\phi,\psi) \end{align*} is an isomorphism. \item \label{pre:H} Let $L\ge 0$, $\beta> 0$ and $m\in\R$ be arbitrary. We define the space \begin{align*} \HLB &:= \begin{cases} \left\{ (\phi,\psi) \in \HH^1 \suchthat \beta\abs{\Omega}\mean{\phi}_\Om + \abs{\Gamma}\mean{\psi}_\Ga = 0\right\}, &\text{if}\; L>0,\\[2ex] \left\{ (\phi,\psi) \in \Db \suchthat \beta\abs{\Omega}\mean{\phi}_\Om + \abs{\Gamma}\mean{\psi}_\Ga = 0\right\}, &\text{if}\; L=0, \end{cases} \end{align*} along with the inner product \begin{align*} \bigscp{(\phi,\psi)}{(\zeta,\xi)}_{L,\beta} &:= \intO \nabla \phi \cdot \nabla \zeta \dx + \intG \gradg \psi \cdot \gradg \xi\dG \\ &\qquad + \sigma(L) \intG(\beta \psi-\phi)(\beta\xi-\zeta) \dG, \end{align*} for all $(\phi,\psi),(\zeta,\xi) \in \HLB$, where \begin{align} \label{DEF:SIG} \sigma(L) = \begin{cases} L^{-1} &\text{if}\; L>0,\\ 0 &\text{if}\; L=0. \end{cases} \end{align} This is indeed an inner product since $\scp{(\phi,\psi)}{(\phi,\psi)}_{L,\beta}=0$ already entails that $\phi$ and $\psi$ are constant almost everywhere and satisfy $\phi\vert_\Gamma = \beta \psi$ almost everywhere on $\Gamma$. Then, the mean value constraint of $\HLB$ directly yields $(\phi,\psi)=(0,0)$ almost everywhere. The induced norm is given as $\norm{\,\cdot\,}_{L,\beta}:= \scp{\cdot}{\cdot}_{L,\beta}^{1/2}$. \item \label{pre:lin:L} Let $L,\beta> 0$ be arbitrary. We define the space \begin{align*} \HH_{\beta}^{-1} &:= \big\{ (\phi,\psi) \in (\HH^1)' \suchthat \beta\abs{\Omega}\mean{\phi}_\Om + \abs{\Gamma}\mean{\psi}_\Ga = 0 \big\} \subset (\HH^1)'. \end{align*} We conclude from \cite[Thm.~3.3]{knopf-liu} that for any $(\phi,\psi)\in \HH_{\beta}^{-1}$, there exists a unique weak solution $\SS^L(\phi,\psi) = (\SS^L_\Omega(\phi,\psi),\SS^L_\Gamma(\phi,\psi))\in \HLB $ to the elliptic proble \begin{subequations} \label{EQ:LIN} \begin{align} - \Lap \SS^L_\Om &= - \phi && \text{ in } \Omega, \\ - \Lapg \SS^L_\Ga + \beta \pdnu \SS^L_\Om &= - \psi && \text{ on } \Gamma, \\ \label{EQ:LIN:3} L\pdnu \SS^L_\Om &= (\beta \SS^L_\Ga - \SS^L_\Om) && \text{ on } \Gamma. \end{align} \end{subequations} This means that $\SS^L(\phi,\psi)$ satisfies the weak formulation \begin{align} \label{WF:LIN} \bigscp{\SS^L(\phi,\psi)}{(\zeta,\xi)}_{L,\beta} = - \biginn{(\phi,\psi)}{(\zeta,\xi)}_{\HH^1} \end{align} for all test functions $(\zeta,\xi)\in \HH^1$. As in \cite[Thm.~3.3 and Cor.~3.5]{knopf-liu}, we can thus define the solution operator \begin{align*} \SS^L: \HH_{\beta}^{-1} \to \HLB,\quad (\phi,\psi) \mapsto \SS^L(\phi,\psi) = (\SS^L_\Omega(\phi),\SS^L_\Gamma(\phi,\psi)) \end{align*} as well as an inner product and its induced norm on the space $\HH_{\beta}^{-1}$ by \begin{align*} \bigscp{(\phi,\psi)}{(\zeta,\xi)}_{L,\beta,*} &:= \bigscp{\SS^L(\phi,\psi)}{\SS^L(\zeta,\xi)}_{L,\beta}, \\ \norm{(\phi,\psi)}_{L,\beta,*} &:=\scp{(\phi,\psi)}{(\phi,\psi)}_{L,\beta,*}^{1/2} \end{align*} for all $(\phi,\psi),(\zeta,\xi)\in \HH_{\beta}^{-1}$. This norm is equivalent to the standard operator norm on $\HH_{\beta}^{-1}$. Since $\HH_{L,\beta}^1 \subset \HH_{\beta}^{-1}$, the product $\scp{\cdot}{\cdot}_{L,\beta,*}$ can also be used as an inner product on $\HH_{L,\beta}^1$. Moreover, $\norm{\cdot}_{L,\beta,*}$ is also a norm on $\HH_{L,\beta}^1$ but $\HH_{L,\beta}^1$ is not complete with respect to this norm. \item \label{pre:lin:0} Let $\beta>0$ be arbitrary. We define the space \begin{align*} \DD_{\beta}^{-1} &:= \Big\{ (\phi,\psi) \in (\Db)' \;\big\vert\; \biginn{(\phi,\psi)}{(\beta,1)}_\Db = 0\, \Big\} \subset (\Db)'. \end{align*} Proceeding exactly as in \cite[Proof of Thm.~3.3]{knopf-liu}, we use the Lax--Milgram theorem to show that for any $(\phi,\psi)\in\DD_{\beta}^{-1}$, there exists a unique weak solution $\SS^0(\phi,\psi) = (\SS^0_\Omega(\phi),\SS^0_\Gamma(\phi,\psi))\in \HH^1_{0,\beta} \subset \Db$ to the elliptic problem \begin{subequations} \label{EQ:LIN} \begin{align} - \Lap \SS^0_\Om &= - \phi && \text{ in } \Omega, \\ - \Lapg \SS^0_\Ga + \beta \pdnu \SS^0_\Om &= - \psi && \text{ on } \Gamma, \\ \label{EQ:LIN:3} \SS^0_\Om \vert_\Ga &= \beta \SS^0_\Ga && \text{ on } \Gamma. \end{align} \end{subequations} This means that $\SS^0(\phi,\psi)$ satisfies the weak formulation \begin{align} \label{WF:LIN} \biginn{ \SS^0(\phi,\psi) }{ (\zeta,\xi) }_{0,\beta} = - \biginn{(\phi,\psi)}{(\zeta,\xi)}_{\Db} \end{align} for all test functions $(\zeta,\xi)\in \Db$. Similar to \cite[Thm.~3.3 and Cor.~3.5]{knopf-liu}, we can thus define the solution operator \begin{align*} \SS^0: \DD_{\beta}^{-1} \to \HH^1_{0,\beta},\quad (\phi,\psi) \mapsto \SS^0(\phi,\psi) = (\SS^0_\Omega(\phi),\SS^0_\Gamma(\phi,\psi)) \end{align*} as well as an inner product and its induced norm on the space $\DD_{\beta}^{-1}$ by \begin{align*} \bigscp{(\phi,\psi)}{(\zeta,\xi)}_{0,\beta,*} &:= \bigscp{\SS^0(\phi,\psi)}{\SS^0(\zeta,\xi)}_{0,\beta}, \\ \norm{(\phi,\psi)}_{0,\beta,*} &:=\scp{(\phi,\psi)}{(\phi,\psi)}_{0,\beta,*}^{1/2} \end{align*} for all $(\phi,\psi),(\zeta,\xi)\in \DD_{\beta}^{-1}$. Since $\HH_{0,\beta}^1 \subset \DD_\beta^{-1}$, the product $\scp{\cdot}{\cdot}_{L,\beta,*}$ can also be used as an inner product on $\HH_{0,\beta}^1$. Moreover, $\norm{\cdot}_{L,\beta,*}$ is also a norm on $\HH_{0,\beta}^1$ but $\HH_{0,\beta}^1$ is not complete with respect to this norm. \end{enumerate} We next show that for functions in $\Wo$, the norm $\norm{\cdot}_{L,\beta,*}$ can be bounded by the norm $\norm{\cdot}_{(\HH^1)'}$ uniformly in $L\in[0,1]$. \begin{lemma}\label{LEM:LBS} Let $\beta>0$ be arbitrary. Then, there exists a constant $C>0$ depending only on $\beta$ and $\Omega$ such that for all $L\in[0,1]$ and all $(\phi,\psi)\in \Wo$, we have \begin{align*} \norm{(\phi,\psi)}_{L,\beta,*} \le C \norm{(\phi,\psi)}_{(\HH^1)'}. \end{align*} \end{lemma} \begin{proof} Let $\beta>0$, $L\in[0,1]$ and $(\phi,\psi)\in \Wo$ be arbitrary. In the following, the letter $C$ will denote generic positive constants depending only on $\beta$ and $\Omega$. Recalling \eqref{pre:lin:L} and \eqref{pre:lin:0}, we obtain \begin{align} \label{LBS:1} \norm{(\phi,\psi)}_{L,\beta,*}^2 &= \norm{\SS^L(\phi,\psi)}_{L,\beta}^2 = - \bigscp{\SS^L(\phi,\psi)}{(\phi,\psi)}_{\LL^2} \notag\\ &\le \norm{\SS^L(\phi,\psi)}_{\HH^1}\, \norm{(\phi,\psi)}_{(\HH^1)'}. \end{align} We can now apply \cite[Cor.~7.2]{knopf-liu} (with $\alpha=\beta$ and $K=1$) to deduce that \begin{align} \label{LBS:2} \norm{\SS^L(\phi,\psi)}_{\HH^1} \le C\, \norm{\SS^L(\phi,\psi)}_{1,\beta} \; . \end{align} Plugging this estimate into \eqref{LBS:1}, and recalling that $L\in[0,1]$, we conclude that \begin{align} \label{LBS:3} \norm{(\phi,\psi)}_{L,\beta,*}^2 &\le C\, \norm{\SS^L(\phi,\psi)}_{1,\beta}\, \norm{(\phi,\psi)}_{(\HH^1)'} \le C\, \norm{\SS^L(\phi,\psi)}_{L,\beta}\, \norm{(\phi,\psi)}_{(\HH^1)'} \notag\\ &= C\, \norm{(\phi,\psi)}_{L,\beta,*}\, \norm{(\phi,\psi)}_{(\HH^1)'}. \end{align} Since $(\phi,\psi)\in \Wo$ was arbitrary, the assertion directly follows and the proof is complete. \end{proof} \paragraph{Interpolation inequalities.} We will further need the following interpolation estimates. It will turn out to be essential that the constants in these estimates are independent of the parameter $L$. \begin{lemma} \label{LEM:INT} Suppose that \eqref{ass:dom} holds and let $L\ge 0$ and $\beta>0$ be arbitrary. Then there exists a constant $c>0$ depending only on $\beta$, such that for all $(u,v)\in \Wo\,$, \begin{align} \label{IEQ:INT:1} \norm{(u,v)}_{\LL^2}^2 \le c\, \norm{(\grad u,\gradg v)}_{\LL^2} \left\|(u,v)\right\|_{L,\beta,*}. \end{align} Moreover, for any $\alpha>0$ and all $(u,v)\in \Wo\,$, it holds that \begin{align} \label{IEQ:INT:2} \norm{(u,v)}_{\LL^2}^2 \le \alpha \norm{(\grad u,\gradg v)}_{\LL^2}^2 + \frac{c^2}{4\alpha} \norm{(u,v)}_{L,\beta,*}^2 . \end{align} \end{lemma} \begin{proof} Let $L\in [0,\infty)$ and $(u,v)\in \Wo$ be arbitrary. Recalling the definition of the operator $\SS^L$ (see \eqref{pre:lin:L} and \eqref{pre:lin:0}) and that $u\vert_\Gamma = v$ almost everywhere on $\Gamma$, we obtain \begin{align*} &\min\{\beta,1\}\, \norm{(u,v)}_{\LL^2} \le \beta \left\| u\right\|^{2}_{L^{2}(\Omega)} +\left\| v\right\|^{2}_{L^{2}(\Gamma)} \\ &\quad =\scp{u}{\beta u}_{L^2(\Omega)} +\scp{v}{v}_{L^2(\Omega)} \\[1ex] &\quad= - \int _{\Omega}\grad \big( \SS^L_{\Omega}(u,v) \big) \cdot \grad(\beta u) \dx - \int _{\Gamma}\gradg\big(\SS^L_{\Gamma}(u,v)\big)\cdot \gradg v \dG \\ &\qquad\quad - \sigma(L) \int _{\Gamma}(\beta\SS^L_{\Gamma}(u,v)-\SS^L_{\Omega}(u,v))(\beta v-\beta v) \dG\\[1ex] &\quad\leq \beta \bignorm{ \grad \big( \SS^L_{\Omega}(u,v) \big) }_{L^{2}(\Omega)} \bignorm{\grad u}_{L^{2}(\Omega)} + \bignorm{ \gradg \big( \SS^L_{\Gamma}(u,v) \big) }_{L^{2}(\Gamma)} \bignorm{ \gradg v }_{L^{2}(\Gamma)}\\ &\quad\leq \max\{\beta,1\}\, \norm{(\grad u,\gradg v)}_{\LL^2} \,\norm{\SS^L(u,v)}_{L,\beta}\\ &\quad= \max\{\beta,1\}\, \norm{(\grad u,\gradg v)}_{\LL^2} \,\norm{(u,v)}_{L,\beta,*}\;. \end{align*} This proves \eqref{IEQ:INT:1} and thus, \eqref{IEQ:INT:2} direcly follows by means of Young's inequality. \end{proof} \medskip \begin{lemma}\label{LEM:INT:2} Suppose that \eqref{ass:dom} holds. Then there exist constants $C_1,C_2,C_3,C_4>0$ such that \begin{alignat}{2} \label{INT:H1} \norm{(u,v)}_{\HH^1} &\le C_1 \norm{(u,v)}_{\HH^2}^{\frac 12} \norm{(u,v)}_{\LL^2}^{\frac 12} &&\quad\text{for all $(u,v) \in \HH^2$}, \\ \label{INT:H2} \norm{(u,v)}_{\HH^2} &\le C_2 \norm{(u,v)}_{\HH^3}^{\frac 12} \norm{(u,v)}_{\HH^1}^{\frac 12} &&\quad\text{for all $(u,v) \in \HH^3$}, \\ \label{INT:H1:ALT} \norm{(u,v)}_{\HH^1} &\le C_3 \norm{(u,v)}_{\HH^3}^{\frac 13} \norm{(u,v)}_{\LL^2}^{\frac 23} &&\quad\text{for all $(u,v) \in \HH^3$},\\ \label{INT:H2:ALT} \norm{(u,v)}_{\HH^2} &\le C_4 \norm{(u,v)}_{\HH^3}^{\frac 23} \norm{(u,v)}_{\LL^2}^{\frac 13} &&\quad\text{for all $(u,v) \in \HH^3$}. \end{alignat} \end{lemma} \begin{proof} To prove \eqref{INT:H1}, let $(u,v)\in\HH^2$ be arbitrary. It obviously holds that \begin{align} \label{EST:L2} \norm{(u,v)}_{\LL^2}^2 \le \norm{(u,v)}_{\HH^2} \norm{(u,v)}_{\LL^2}. \end{align} Using the Gagliardo--Nierenberg inequality, we obtain \begin{align} \label{EST:H1:BULK} \norm{\grad u}_{L^2(\Omega)}^2 \le \norm{u}_{H^2(\Omega)} \norm{u}_{L^2(\Omega)} \le \norm{(u,v)}_{\HH^2} \norm{(u,v)}_{\LL^2}. \end{align} Moreover, the Gagliardo--Nierenberg inequality for compact Riemannian manifolds (see, e.g., \cite[Thm.~3.70]{Aubin}) implies that \begin{align} \label{EST:H1:SURF} \norm{\gradg v}_{L^2(\Gamma)}^2 \le \norm{v}_{H^2(\Gamma)} \norm{v}_{L^2(\Gamma)} \le \norm{(u,v)}_{\HH^2} \norm{(u,v)}_{\LL^2}. \end{align} Now, adding \eqref{EST:L2}, \eqref{EST:H1:BULK} and \eqref{EST:H1:SURF} proves \eqref{INT:H1}. The inequality \eqref{INT:H2} follows by applying \eqref{INT:H1} on the components $\big([\grad u]_i,[\gradg v]_i\big)$, $i=1,2,3$. Eventually, the estimates \eqref{INT:H1:ALT} and \eqref{INT:H2:ALT} are direct consequences of \eqref{INT:H1} and \eqref{INT:H2}. This completes the proof. \end{proof} The following result is a direct consequence of Lemma~\ref{LEM:INT} and Lemma~\ref{LEM:INT:2}. \begin{corollary} \label{COR:INT} Suppose that \eqref{ass:dom} holds and let $L\ge 0$ and $\beta>0$ be arbitrary. Then there exist positive constants $c_1$ and $c_2$ depending only on $\beta$ such that \begin{alignat}{2} \norm{(u,v)}_{\HH^1} &\le c_1\, \norm{(u,v)}_{\HH^2}^{\frac 23} \norm{(u,v)}_{L,\beta,*}^{\frac 13} &&\quad \text{for all $(u,v)\in \WW_{\beta,0}^2$,}\\ \norm{(u,v)}_{\HH^1} &\le c_2\, \norm{(u,v)}_{\HH^3}^{\frac 12} \norm{(u,v)}_{L,\beta,*}^{\frac 12} &&\quad \text{for all $(u,v)\in \WW_{\beta,0}^3$.} \end{alignat} \end{corollary} \section{Well-posedness and further essential properties}\label{SEC:WPP} In this section, we present the weak well-posedness results for the problem \eqref{CH:INT} with $L\in [0,\infty)$, and we show that these weak solutions satisfy a certain parabolic smoothing property. For simplicity, and as their choice has no impact on the analysis we will carry out, the positive constants $m_\Omega$, $m_\Gamma$, $\eps$, $\delta$ and $\kappa$ are set to one. By this choice, the system \eqref{CH:INT} can be restated as follows. \begin{subequations}\label{CH:INT.} \begin{alignat}{3} & \delt u = \Delta \mu, &&\mu = - \Lap u + F'( u) &&\quad \text{in } Q, \label{CH:INT:1.}\\ & \delt v = \Lapg \theta - \beta \pdnu\mu, &&\theta = - \Lapg v + G'(v) + \pdnu u &&\quad \text{on } \Sigma, \label{CH:INT:2.}\\ & u\vert_\Gamma = v &&&&\quad \text{on } \Sigma, \label{CH:INT:3.}\\[1ex] &\left\{ \begin{aligned} \mu\vert_\Si &= \beta \theta \\ L \pdnu\mu\vert_\Si &= \beta \theta - \mu\vert_\Si \end{aligned} \right. &&\quad \begin{aligned} &\text{if}\; L=0,\\ &\text{if}\; L\in(0,\infty), \end{aligned} &&\quad \text{on } \Sigma, \label{CH:INT:4.} \\[1ex] & (u,v)\vert_{t=0} = (u_0,v_0) &&\text{with}\; u_0\vert_\Si = v_0 &&\quad \text{in } \Omega \times \Gamma. \label{CH:INT:5.} \end{alignat} \end{subequations} The total free energy associated with this system is given as \begin{align} \label{DEF:EN} E(u,v) = \intO \frac 12 \abs{\grad u}^2 + F(u) \dx + \intG \frac 12 \abs{\gradg v}^2 + G(v) \dG. \end{align} In the following, we will discuss the cases $0<L<\infty$ (KLLM~model) and $L=0$ (GMS~model) separately. \subsection{The KLLM model ($0<L<\infty$)} \begin{theorem}[Weak well-posedness and smoothing property for the KLLM model] \label{THM:WP:KLLM} Suppose that \eqref{ass:dom}--\eqref{ass:pot} hold and that $L\in(0,\infty)$. Let $m\in\R$ be arbitrary and let $(u_0,v_0) \in \Wm$ be any initial datum. Then there exists a unique global weak solution $(u^L,v^L,\mu^L,\theta^L)$ of the system \eqref{CH:INT.} existing on the whole time interval $\RP$ and having the following properties: \begin{enumerate}[label=$(\mathrm{\roman*})$, ref = $\mathrm{\roman*}$] \item For every $T>0$, the solution has the regularity \begin{subequations} \label{REG:KLLM} \begin{align} \label{REG:KLLM:1} &\begin{aligned} \big(u^L,v^L\big) & \in C^{0,\frac{1}{4}}([0,T];\LL^2) \cap L^\infty(0,T;\VV^1) \\ & \qquad \cap L^2(0,T;\HH^3) \cap H^1\big(0,T;(\HH^1)'\big), \end{aligned} \\ \label{REG:KLLM:2} &\big(\mu^L,\theta^L\big) \in L^2(0,T;\HH^1). \end{align} \end{subequations} \item The solution satisfies \begin{subequations} \label{WF:KLLM} \begin{align} \label{WF:KLLM:1} \biginn{\delt u^L}{ w}_{H^1(\Omega)} &= - \intO \grad\mu^L \cdot \grad w \dx + \intG \tfrac 1 L(\beta\theta^L-\mu^L) w \dG, \\ \label{WF:KLLM:2} \biginn{\delt v^L}{ z}_{H^1(\Gamma)} &= - \intG \gradg\theta^L \cdot \gradg z \dG - \intG \tfrac 1 L (\beta\theta^L-\mu^L) \beta z \dG, \end{align} a.e.~on $\RP$ for all test functions $(w,z)\in\HH^1$, and \begin{alignat}{2} \label{WF:KLLM:3} &\mu^L = -\Lap u^L + F'(u^L) &&\quad\text{a.e.~in Q},\\ \label{WF:KLLM:4} &\theta^L = -\Lapg v^L + G'(v^L) + \deln u^L , &&\quad\text{a.e.~in $\Sigma$},\\ \label{WF:KLLM:TR} &u^L\vert_\Sigma = v^L , &&\quad\text{a.e.~in $\Sigma$},\\ \label{WF:KLLM:5} &(u^L,v^L)\vert_{t=0} = (u_0,v_0) &&\quad \text{a.e.~in } \Omega \times \Gamma. \end{alignat} \end{subequations} \item The solution satisfies the global mass conservation law \begin{align} \label{MASS:KLLM} \beta\intO u^L(t) \dx + \intG v^L(t) \dG = \beta\intO u_0 \dx + \intG v_0 \dG = m \quad \end{align} for all $t\in\RP$, i.e., $\big(u^L(t),v^L(t)\big)\in\Wm$ for almost all $t\in\RP$. \item The solution satisfies the energy inequality \begin{align} \label{ENERGY:KLLM} E\big(u^L(t),v^L(t)\big) + \frac 1 2 \int_0^t \bignorm{\big(\mu^L(s),\theta^L(s)\big)}_{L,\beta}^2 \ds \le E(u_0,v_0) \end{align} for almost all $t\ge 0$. \item The solution satisfies the smoothing property, i.e., there exists a constant $C_*>0$ depending only on $\Omega$, $\beta$, $F$, $G$ and $\norm{(u_0,v_0)}_{\HH^1}$, such that \begin{align} \label{SMOOTH:KLLM} \bignorm{ \big(u^L(t),v^L(t)\big) }_{\HH^3} \leq C_* \left( \dfrac{1+t}{t}\right)^{\frac{1}{2}} \end{align} for almost all $t\ge 0$. \end{enumerate} \end{theorem} \medskip \begin{remark}\normalfont We point out that the above results of Theorem~\ref{THM:WP:KLLM} hold true, if the bounds from below in the conditions \eqref{GR:F} and \eqref{GR:G} are omitted. This means, it would be sufficient to demand that \begin{align*} F(s) \le c_F(1+\abs{s}^p) \quad\text{and}\quad G(s) \le c_G(1+\abs{s}^q) \end{align*} for all $s\in\R$, even though the stronger assumptions were used in \cite{KLLM} to which we will refer in the subsequent proof. This is because instead of \cite[Lem.~2.1]{KLLM}, the stronger Poincaré type inequality \begin{align} \label{POINC:ALT} \norm{(u,v)}_{\LL^2} \le C_P \norm{\grad u}_{L^2(\Omega)} \quad\text{for all $(u,v)\in \Wo$} \end{align} could be used to prove the existence of a weak solution. The proof of \eqref{POINC:ALT} can be done similarly to the proof of \cite[Lem.~2.1]{KLLM} via a contradiction argument. It relies on the fact that if $\grad u = 0$ a.e. in $\Omega$, then the functions $u$ and $v=u\vert_\Gamma$ must be constant a.e. in $\Omega$ and a.e. on $\Gamma$, respectively. Then, the mean value condition $\beta\abs{\Omega}\mean{u}_\Omega + \abs{\Gamma}\mean{v}_\Gamma = 0$ ensures that $u = 0$ a.e. in $\Omega$ and $v=0$ a.e. on $\Gamma$. Nevertheless, in Assumption~\ref{ass:pot}, we stick to the stronger conditions as demanded in \cite{KLLM} since such kind of estimates are very useful in the proof of Lemma~\ref{LM.boundedstat} (see \eqref{EST:F1P} and \eqref{EST:G1P}). We further point out that the above comments also apply for the GMS model ($L=0$) whose well-posedness will be discussed in Subsection~\ref{sec:wellposedGMS}. \end{remark} \begin{proof}[Proof of Theorem~\ref{THM:WP:KLLM}] The existence and uniqueness of a global unique weak solution which satisfies the assertions (i)--(iv) has already been established in \cite[Thm.~3.1]{KLLM}. Hence, only the smoothing property (v) remains to be proved. In the following, we omit the superscript $L$ to provide a cleaner presentation. Let us fix arbitrary test functions $(w,z)\in\HH^1$ be arbitrary. Adding \eqref{WF:KLLM:1} and \eqref{WF:KLLM:2}, we obtain \begin{align} \label{sumweak1} \big\langle \delt u,w \big\rangle_{H^1(\Omega)} +\big\langle \delt v,z \big\rangle_{H^1(\Gamma)} = -\big((\mu,\theta),(w,z) \big)_{L,\beta} \quad\text{a.e.~on $\RP$} \end{align} for all test functions $(w,z)\in\HH^1$. In the following, let $C$ denote a generic positive constant depending only on $\Omega$, $\beta$, $F$, $G$ and $\norm{(u_0,v_0)}_{\HH^1}$ that may change its value from line to line. For any $\tau\in\RP$ and $h>0$, we will write \begin{align} \label{NOT:FDQ} \partial_{t}^{h}f(\tau)= \frac 1h \big(f(\tau+h)-f(\tau)\big) \end{align} to denote the forward-in-time difference quotient of a suitable function $f$. From \eqref{sumweak1}, we deduce that \begin{align} \big\langle\partial_{t}^{h}\delt u(\tau),w \big\rangle_{H^1(\Omega)} +\big\langle \partial_{t}^{h}\delt v(\tau),z \big\rangle_{H^1(\Gamma)} = -\Big(\big(\partial_{t }^{h}\mu(\tau),\partial_{t }^{h}\theta(\tau)\big),(w,z) \Big)_{L,\beta} \label{sumweak2} \end{align} for almost all $\tau\in\RP$ where \begin{alignat}{3} \partial_{t }^{h}\mu(\tau) &=-\Delta\partial_{t }^{h}u(\tau)+\frac{1}{h}\Big(F^{\prime}\big(u(\tau+h)\big)-F^{\prime}\big(u(\tau)\big)\Big)\label{mu} &&\quad\text{a.e.~in $\Om$,}\\ \partial_{t }^{h}\theta(\tau) &=-\Delta_{\Gamma}\partial_{t}^{h}v(\tau)+\frac{1}{h}\Big(G^{\prime}\big(v(\tau+h)\big)-G^{\prime}\big(v(\tau)\big)\Big) +\partial_{n }\partial_{t }^{h}u(\tau) \label{teta} &&\quad\text{a.e.~on $\Ga$} \end{alignat} due to \eqref{WF:KLLM:3} and \eqref{WF:KLLM:4}. Plugging $(w,z)=\SS^L\big(\partial_{t}^{h}u(\tau),\partial_{t}^{h}v(\tau)\big)$ into \eqref{sumweak2}, recalling \eqref{mu} and \eqref{teta}, and using integration by parts, we obtain \begin{align*} &-\dfrac{1}{2}\dfrac{\dd}{\dd \tau}\big\| \big(\partial_{t }^{h}u(\tau),\partial_{t }^{h}v(\tau) \big)\big\|_{L,\beta,*}^{2} = -\Big(\big(\partial_{t }^{h}\mu(\tau),\partial_{t }^{h}\theta(\tau)\big), \SS^L\big( \partial_{t }^{h}u(\tau), \partial_{t }^{h}v(\tau)\big) \Big)_{L,\beta}\\ &\quad=\big(\partial_{t }^{h}\mu(\tau),\partial_{t }^{h}u(\tau) \big)_{L^2(\Omega)} +\big(\partial_{t }^{h}\theta(\tau),\partial_{t }^{h}v(\tau) \big)_{L^2(\Gamma)}\\ &\quad =\big\|\nabla\partial_{t }^{h}u(\tau) \big\|^{2} _{L^{2}(\Omega)} +\dfrac{1}{h}\int_{\Omega } \Big(F^{\prime}\big(u(\tau+h)\big)-F^{\prime}\big(u(\tau)\big)\Big) \partial_{t }^{h}u(\tau) \dx\\ &\qquad +\big\|\gradg\partial_{t }^{h}v(\tau) \big\|^{2}_{L^{2}(\Gamma)} +\dfrac{1}{h}\int_{\Gamma } \Big(G^{\prime}\big(v(\tau+h)\big)-G^{\prime}\big(v(\tau)\big)\Big) \partial_{t }^{h}v(\tau) \dG \end{align*} for almost all $\tau\in\RP$. Hence, we have \begin{align*} &\dfrac{1}{2}\dfrac{\dd}{\dd \tau}\big\|\big(\partial_{t }^{h}u(\tau),\partial_{t }^{h}v(\tau) \big) \big\|_{L,\beta,*}^{2} +\big\|\nabla\partial_{t }^{h}u(\tau) \big\|^{2} _{L^{2}(\Omega)} +\big\|\gradg\partial_{t }^{h}v(\tau) \big\|^{2} _{L^{2}(\Gamma)}\nonumber\\ &\qquad +\dfrac{1}{h}\intO \Big(F_1^{\prime}\big(u(\tau+h)\big)-F_1^{\prime}\big(u(\tau)\big)\Big) \partial_{t }^{h}u(\tau)\dx \\ &\qquad +\dfrac{1}{h}\intG \Big(G_1^{\prime}\big(v(\tau+h)\big)-G_1^{\prime}\big(v(\tau)\big)\Big) \partial_{t }^{h}v(\tau)\dG \\ &=-\dfrac{1}{h}\intO\Big(F_2^{\prime}\big(u(\tau+h)\big)-F_2^{\prime}\big(u(\tau)\big)\Big) \partial_{t }^{h}u(\tau) \dx \\ &\qquad-\dfrac{1}{h}\intG\Big(G_2^{\prime}\big(v(\tau+h)\big)-G_2^{\prime}\big(v(\tau)\big)\Big) \partial_{t }^{h}v(\tau) \dG \end{align*} for all $\tau\in\RP$. Recall that $ F_{2} $, $ G_{2} $ are Lipschitz continuous, and that $ F_{1} $ and $ G_{1}$ are convex which directly implies that $ F_{1}^\prime $ and $ G_{1}^\prime$ are monotone. Hence, we obtain \begin{align} \label{est0} \begin{aligned} &\dfrac{1}{2}\dfrac{\dd}{\dd \tau}\big\| \big(\partial_{t }^{h}u(\tau),\partial_{t }^{h}v(\tau) \big) \big\|_{L,\beta,*}^{2} +\big\|\nabla\partial_{t }^{h}u(\tau) \big\|^{2} _{L^{2}(\Omega)} +\big\|\gradg\partial_{t }^{h}v(\tau) \big\|^{2} _{L^{2}(\Gamma)}\\ &\quad \leq C\big(\big\|\partial_{t }^{h}u(\tau) \big\|^{2} _{L^{2}(\Omega)} +\big\|\partial_{t }^{h}v(\tau) \big\|^{2} _{L^{2}(\Gamma)} \big) \end{aligned} \end{align} for all $\tau\in\RP$. Using Lemma~\ref{LEM:INT} we conclude that \begin{align} \label{est1} \begin{aligned} &\dfrac{\dd}{\dd \tau}\big\| \big(\partial_{t }^{h}u(\tau),\partial_{t }^{h}v(\tau) \big) \big\|_{L,\beta,*}^{2} +\big\|\nabla\partial_{t }^{h}u(\tau) \big\|^{2} _{L^{2}(\Omega)} +\big\|\gradg\partial_{t }^{h}v(\tau) \big\|^{2} _{L^{2}(\Gamma)} \\ &\quad\leq C\big\| \big(\partial_{t }^{h}u(\tau),\partial_{t }^{h}v(\tau) \big) \big\|_{L,\beta,*}^{2} \end{aligned} \end{align} for all $\tau\in\RP$. Multiplying both sides by $\tau$ and integrating the resulting inequality with respect to $\tau$ from $0$ to $t$, we obtain \begin{align} t\big\| \big(\partial_{t }^{h}u(t),\partial_{t }^{h}v(t) \big) \big\|_{L,\beta,*}^{2} \leq\int_{0}^{t} \big(C\tau+1 \big)\big\| \big(\partial_{t }^{h}u(\tau),\partial_{t }^{h}v(\tau) \big) \big\|_{L,\beta,*}^{2} \dtau \label{est2} \end{align} for all $t\in\RP$. Moreover, we have \begin{align} \label{est2.1} &\big\| \big(\partial_{t }^{h}u(\tau),\partial_{t }^{h}v(\tau) \big) \big\|_{L,\beta,*}^{2} \leq\dfrac{1}{h}\int_{\tau}^{\tau+h}\big\| \big(\delt u(s),\delt v(s)\big) \big\|_{L,\beta,*}^{2} \ds, \\ \label{est2.2} &\lim_{h\to 0}\dfrac{1}{h}\int_{\tau}^{\tau+h}\big\| \big(\delt u(s),\delt v(s)\big) \big\|_{L,\beta,*}^{2} \ds =\big\| \big(\delt u(\tau),\delt v(\tau)\big) \big\|_{L,\beta,*}^{2}. \end{align} Recalling the energy inequality \eqref{ENERGY:KLLM} and the fact that the energy $E$ is non-negative (since the potentials $F$ and $G$ are non-negative), we derive the estimate \begin{align} \int_{0}^{t} \big\Vert \nabla \mu(\tau) \big\Vert _{L^{2}(\Omega) }^{2} +\big\Vert \gradg \theta(\tau) \big\Vert _{L^{2}(\Ga) }^{2} +\frac{1}{L}\big\|\beta\theta(\tau)-\mu(\tau) \big\|^2_{L^{2}(\Ga) } \dtau \leq C. \label{est3} \end{align} By the definition of the solution operator $\SS^L$, we infer from \eqref{WF:KLLM:1} and \eqref{WF:KLLM:2} that \begin{align} \label{REP:MUTHETA} \mu(\tau) = \SS^L_\Om\big(\delt u(\tau),\delt v(\tau)\big) + c(\tau)\beta, \quad \theta(\tau) = \SS^L_\Ga\big(\delt u(\tau),\delt v(\tau)\big) + c(\tau) \end{align} for almost all $\tau\in\RP$ and some function $c=c(\tau)$. Testing \eqref{WF:KLLM:1} and \eqref{WF:KLLM:2} with $\SS^L\big(\delt u(\tau),\delt v(\tau)\big)$, and adding the resulting equations, we infer that \begin{align} \label{est3.5} \begin{aligned} &\bignorm{\big(\delt u(\tau),\delt v(\tau)\big)}_{L,\beta,*}^2 = \big\|\big(\mu(\tau),\theta(\tau)\big)\big\|_{L,\beta}^2 \\ &\quad = \big\Vert \nabla \mu(\tau) \big\Vert _{L^{2}(\Omega) }^{2} +\big\Vert \gradg \theta(\tau) \big\Vert _{L^{2}(\Ga) }^{2} +\frac{1}{L}\big\|\beta\theta(\tau)-\mu(\tau) \big\|^2_{L^{2}(\Ga) } \end{aligned} \end{align} for almost all $\tau\in\R$. Consequently, after integrating with respect to $\tau$ from $0$ to $t$, \eqref{est3} and \eqref{est3.5} imply \begin{align} \int_{0}^{t}\big\| \big(\delt u(\tau),\delt v(\tau)\big) \big\|_{L,\beta,*}^{2} \dtau \leq C \quad\text{for all $t\in\RP$.}\label{est4} \end{align} Therefore, recalling \eqref{est2.1}, \eqref{est2.2} and \eqref{est4}, we obtain from \eqref{est2} that \begin{align*} t\big\| \big(\partial_{t }^{h}u(t),\partial_{t }^{h}v(t)\big) \big\|_{L,\beta,*}^{2}\leq C\big(t+1 \big) \quad\text{for all $t\in\RP$.} \end{align*} Invoking Lebesgue's convergence theorem and passing to the limit $ h\to 0 $, we get \begin{align} \label{est:u*} \big\| \big(\delt u(t),\delt v(t)\big) \big\|_{L,\beta,*}^{2}\leq C\left(\dfrac{t+1}{t} \right) \quad\text{for all $t\in\RP$}, \end{align} which in turn yields \begin{align} \big\| \nabla\mu(t)\big\|_{L^{2}(\Omega)}^{2} +\big\| \gradg\theta(t)\big\|_{L^{2}(\Gamma)}^{2}\leq C\left(\dfrac{t+1}{t} \right)\label{est5} \quad\text{for almost all $t\in\RP$} \end{align} because of \eqref{est3.5}. Proceeding as in \cite[Proof of Thm.~3.1, Step 3]{KLLM} we obtain the estimates \begin{align} \label{est:mu} \big\|\mu(t) \big\|_{L^{2}(\Omega)} &\leq C\big( 1+\big\|\nabla\mu(t) \big\|_{L^{2}(\Omega)}\big),\\ \label{est:theta} \big\|\theta(t) \big\|_{L^{2}(\Gamma)} &\leq C\big( 1+\big\|\nabla\mu(t) \big\|_{L^{2}(\Omega)} +\big\|\gradg\theta(t) \big\|_{L^{2}(\Gamma)}\big) \end{align} for almost all $t\in\RP$. This directly implies that \begin{align} \label{est:mutheta} \bignorm{\big(\mu(t),\theta(t)\big)}_{\HH^1} \le C\left(\dfrac{t+1}{t} \right)^{\frac 12} \end{align} for almost all $t\in\RP$. Furthermore, recalling the growth assumptions on $F$ and $G$ imposed in \eqref{ass:pot}, we conclude from the energy inequality \eqref{ENERGY:KLLM} that \begin{align} \label{est:h1} \bignorm{\big(u(t),v(t)\big)}_{\HH^1} \le C + CE\big(u(t),v(t)\big) \le C + CE\big(u_0,v_0\big) \le C \end{align} for almost all $t\in\RP$. Since $(u,v) \in L^2(0,T;\HH^3)$ for all $T>0$, we have \begin{alignat}{3} \label{sf1} -\Delta u(t)&=\mu(t)-F^{\prime}\big(u(t)\big) &&\quad\text{a.e.~in $\Om$},\\ \label{sf2} - \Delta_{\Gamma} v(t) + \partial_{n }u(t) &=\theta(t)-G^{\prime}\big(v(t)\big) &&\quad\text{a.e.~on $\Ga$} \end{alignat} for almost all $t\in\RP$. Invoking the growth assumptions on $F$ and $G$ in \eqref{ass:pot}, recalling that $p\le 4$, and using the continuous embeddings $H^1(\Omega)\emb L^6(\Omega)$ and $H^1(\Gamma)\emb L^r(\Gamma)$ for all $r\in[1,\infty)$, we further deduce that for almost all $t\in\RP$, \begin{align*} \bignorm{F'\big(u(t)\big)}_{L^2(\Omega)} &\le C + C \norm{u(t)}_{H^1(\Omega)}^{p-1} \le C,\\ \bignorm{G'\big(v(t)\big)}_{L^2(\Gamma)} &\le C + C \norm{v(t)}_{H^1(\Gamma)}^{q-1} \le C,\\ \bignorm{F''\big(u(t)\big)}_{L^3(\Omega)} &\le C + C \norm{u(t)}_{H^1(\Omega)}^{p-2} \le C,\\ \bignorm{G''\big(v(t)\big)}_{L^3(\Gamma)} &\le C + C \norm{v(t)}_{H^1(\Gamma)}^{q-2} \le C. \end{align*} Using Hölder's inequality, the continuous embedding $H^2(\Omega)\emb W^{1,6}(\Omega)$, interpolation inequality \eqref{INT:H1:ALT}, estimate \eqref{est:h1}, and Young's inequality, we thus infer that for any $\alpha\in (0,1)$ and almost all $t\in\RP$, \begin{align} \label{est:f} &\bignorm{F'\big(u(t)\big)}_{H^1(\Omega)}^2 = \bignorm{F'\big(u(t)\big)}_{L^2(\Omega)}^2 + \bignorm{F''\big(u(t)\big) \grad u(t)}_{L^2(\Omega)}^2 \notag\\ &\le C + C \bignorm{F''\big(u(t)\big)}_{L^3(\Omega)}^2 \bignorm{\grad u(t)}_{L^6(\Omega)}^2 \le C + C \bignorm{u(t)}_{H^1(\Omega)}\, \bignorm{u(t)}_{H^3(\Omega)} \notag\\ &\le \frac{C}{\alpha} + \alpha \bignorm{u(t)}_{H^3(\Omega)}^2. \end{align} Proceeding similarly, we deduce that for any $\alpha\in (0,1)$ and for any $\alpha>0$ and almost all $t\in\RP$, \begin{align} \label{est:g} \bignorm{G'\big(v(t)\big)}_{H^1(\Gamma)}^2 \le \frac{C}{\alpha} + \alpha \bignorm{v(t)}_{H^3(\Gamma)}^2. \end{align} Furthermore, a regularity estimate for elliptic problems with bulk-surface coupling (see \cite[Thm.~3.3]{knopf-liu}) implies that for almost all $t\in\RP$, \begin{align*} \bignorm{\big(u(t),v(t)\big)}_{\HH^3}^2 &\le C \bignorm{\mu(t) - F'\big(u(t)\big)}_{H^1(\Omega)}^2 + C \bignorm{\theta(t) - G'\big(u(t)\big)}_{H^1(\Gamma)}^2 \\ &\le C \bignorm{\big(\mu(t),\theta(t)\big)}_{\HH^1}^2 + C\bignorm{F'\big(u(t)\big)}_{H^1(\Omega)}^2 + C\bignorm{G'\big(v(t)\big)}_{H^1(\Gamma)}^2 . \end{align*} Eventually, invoking the estimates \eqref{est:mutheta}, \eqref{est:f} and \eqref{est:g}, and choosing $\alpha\in(0,1)$ sufficiently small, we conclude that for almost all $t\in\RP$, \begin{align*} \bignorm{\big(u(t),v(t)\big)}_{\HH^3}^2 \le C + C \bignorm{\big(\mu(t),\theta(t)\big)}_{\HH^1}^2 \le C\left(\frac{t+1}{t}\right), \end{align*} which verifies the smoothing property \eqref{SMOOTH:KLLM}. Thus, the proof of Theorem~\ref{THM:WP:KLLM} is complete. \end{proof} \medskip Using the interpolation inequalities from Section~\ref{SEC:PIT} and the energy inequality \eqref{ENERGY:KLLM}, we further establish improved continuity results for the weak solution. \begin{proposition}[Improved continuity results] \label{PROP:IMP:KLLM} Suppose that \eqref{ass:dom}--\eqref{ass:pot} hold and that $L\in(0,\infty)$. Let $m\in\R$ be arbitrary, let $(u_{0},v_{0}) \in \Wm $ be any initial datum, and let $(u^L,v^L,\mu^L,\theta^L)$ denote the corresponding weak solution of the system \eqref{CH:INT.}. Then it holds tha \begin{align} \label{CONT:UV} (u^L,v^L) \in C([0,\infty);\HH^1) \cap C((0,\infty);\HH^2). \end{align} \end{proposition} \begin{proof} \textit{Step 1.} We first prove that $(u^L,v^L) \in C((0,\infty);\HH^2)$. Therefore, we fix an arbitrary time $t_0\in (0,\infty)$. Let further $t\in (0,\infty)$ with $\frac 12 t_0 < t < t_0+1$ be arbitrary. We already know from Theorem~\ref{THM:WP:KLLM} that $$(u^L,v^L) \in L^\infty\big(\tfrac 12 t_0, t_0+1 ;\HH^2\big) \cap C\big([\tfrac 12 t_0, t_0+1];\LL^2\big).$$ This entails that $(u^L,v^L)(t) \in \HH^2$ for all $t\in [\tfrac 12 t_0, t_0+1]$ (see, e.g., \cite[Chap.~III,\,§1,\,Lem.~1.4.]{temam}). Using Lemma~\ref{LEM:INT:2} and the smoothing property \eqref{SMOOTH:KLLM} we deduce that \begin{align*} &\bignorm{ \big(u^L(t),v^L(t)\big) - \big(u^L(t_0),v^L(t_0)\big) }_{\HH^2}^2 \\ &\quad \le C \bignorm{ \big(u^L(t),v^L(t)\big) - \big(u^L(t_0),v^L(t_0)\big) }_{\HH^3}^{\frac 43} \bignorm{ \big(u^L(t),v^L(t)\big) - \big(u^L(t_0),v^L(t_0)\big) }_{\LL^2}^{\frac 13} \\ &\quad \le C\left[\left(\frac{2(2+t_0)}{t_0}\right)^{\frac 12} + \left(\frac{1+t_0}{t_0}\right)^{\frac 12} \right]^{\frac 43} \bignorm{ \big(u^L(t),v^L(t)\big) - \big(u^L(t_0),v^L(t_0)\big) }_{\LL^2}^{\frac 13}. \end{align*} We now choose $T:= 1 + t_0$ and recall that $(u^L,v^L) \in C([0,T];\LL^2)$. Hence, the last line of the above estimate tends to zero as $t\to t_0$ which proves $(u^L,v^L) \in C((0,\infty);\HH^2)$. \textit{Step 2.} We now want to show that $(u^L,v^L) \in C([0,\infty);\HH^1)$. As $(u^L,v^L) \in C((0,\infty);\HH^1)$ is already established, only the continuity at $t=0$ needs to be investigated. To this end, let $\{t_k\}_{k\in\N}\subset (0,\infty)$ be an arbitrary sequence with $t_k\to 0$ as $k\to \infty$. From the growth conditions on $F$ and $G$ in \eqref{ass:pot}, we deduce that \begin{align} \bignorm{\big(u(t_k),v(t_k)\big)}_{\HH^1} \le C + C E\big(u(t_k),v(t_k)\big) \le C + C E(u_0,v_0) \le C \end{align} for all $k\in\N$. Hence, there exists a subsequence $\{t_k^*\}_{k\in\N}$ of $(t_k)_{k\in\N}$ and a pair $(u_*,v_*)\in \HH^1$ such that \begin{align} \label{CONV:UV:W*} \big(u^L(t_k^*),v^L(t_k^*)\big) \wto (u_*,v_*) \quad\text{in $\HH^1$.} \end{align} Since $(u^L,v^L) \in C([0,\infty);\LL^2)$, we also know that \begin{align} \label{CONV:UV:S} \big(u^L(t_{k}),v^L(t_{k})\big) \to (u_0,v_0) \quad\text{in $\LL^2$} \end{align} and thus $(u_*,v_*)=(u_0,v_0)$ a.e.~in $\Omega\times\Gamma$ due to uniqueness of the limit. This means that the weak limit in \eqref{CONV:UV:W*} does not depend on the subsequence extraction and thus, \eqref{CONV:UV:W*} holds true for the \emph{whole} sequence, that is \begin{align} \label{CONV:UV:W} \big(u^L(t_k),v^L(t_k)\big) \wto (u_0,v_0) \quad\text{in $\HH^1$.} \end{align} With some abuse of notation, we will write $E(t) := E\big(u(t),v(t)\big)$ for all $t\ge 0$. We further recall that $F_1$ and $G_1$ are convex, and that $F_2$ and $G_2$ have at most quadratic growth. Using Lebesgue's general convergence theorem (see \cite[Sect.~3.25]{Alt}) for the non-convex contributions, and lower-semicontinuity of the convex contributions, we obtain \begin{align} \label{LIMINF:E} E(t_0) \le \underset{k\to\infty}{\lim\inf}\; E(t_k). \end{align} Moreover, we infer from the energy inequality \eqref{ENERGY:KLLM} that the sequence $(E(t_k))_{k\in\N}$ is non-decreasing and bounded from above by $E(t_0)$. Hence, the limit $k\to \infty$ exists, and in combination with \eqref{LIMINF:E} we conclude that \begin{align} \label{LIM:E} E(t_k) \to E(t_0)\quad\text{as $k\to\infty$.} \end{align} By the definition of the energy functional $E$ (see \eqref{DEF:EN}), this implies that \begin{align} \label{ID:NRG} \begin{aligned} &\frac 12 \bignorm{ \big(\grad u^L(t_k), \gradg v^L(t_k)\big) }_{\LL^2}^2 - \frac 12 \bignorm{\big(\grad u_0, \gradg v_0\big)}_{\LL^2}^2 \\ &= E(t_k) - E(t_0) + \intO F\big(u_0\big) - F\big(u^L(t_k)\big) \dx + \intG G\big(v_0\big) - G\big(v^L(t_k)\big) \dG . \end{aligned} \end{align} Since $(u(t_k),v(t_k))\to (u_0,v_0)$ strongly in $\LL^2$, and $(u(t_k),v(t_k))_{k\in\N}$ is bounded in $\HH^1$, we also have $(u(t_k),v(t_k))\to (u_0,v_0)$ strongly in $L^p(\Omega)\times L^q(\Gamma)$ via interpolation. We can thus use Lebesgue's general convergence theorem (see \cite[Sect.~3.25]{Alt}) to infer that the right-hand side of \eqref{ID:NRG} tends to zero as $k\to\infty$. Along with \eqref{CONV:UV:S}, this yields \begin{align} \label{CONV:UV:NORM} \bignorm{ \big(u^L(t_k), v^L(t_k)\big) }_{\HH^1}^2 - \bignorm{\big(u_0, v_0\big)}_{\HH^1}^2 \to 0 \quad\text{$k\to\infty$.} \end{align} Combining \eqref{CONV:UV:W} and \eqref{CONV:UV:NORM}, we eventually conclude that $(u^L(t_k),v^L(t_k))$ converges to $(u_0,v_0)$ strongly in $\HH^1$ as $k\to\infty$. As the null sequence $(t_k)_{k\in\N}$ was arbitrary, this proves $(u^L,v^L)\in C([0,\infty);\HH^1)$. Thus, the proof is complete. \end{proof} \medskip Moreover, we deduce continuous dependence of the weak solutions on the initial data. \begin{proposition}[Continuous dependence on the initial data]\label{PROP:CD:KLLM} Suppose that \eqref{ass:dom}--\eqref{ass:pot} hold and that $L\in(0,\infty)$. Let $m\in\R$ be arbitrary. For $i\in\{1,2\}$, let $(u_{0,i},v_{0,i}) \in \Wm $ be any initial datum and let $(u_i^L,v_i^L,\mu_i^L,\theta_i^L)$ denote the corresponding weak solution of the system \eqref{CH:INT.}. Then there exist positive, non-decreasing functions $\Lambda_k^* \in C(\RP)$, $k\in\{-1,1,2\}$ depending only on $\Omega$, $\beta$, $F$ and $G$ such that the following statements hold: \begin{alignat}{2} \label{CD:KLLM:1} \bignorm{\big(u^L_{2},v_2^L\big)(t) - \big(u^L_{1},v_1^L\big)(t)}_{L,\beta,*} &\le \Lambda_{-1}^*(t) \bignorm{(u_{0,2},v_{0,2})-(u_{0,1},v_{0,1})}_{L,\beta,*}, &&\;\; t\ge 0, \\[0.5ex] \label{CD:KLLM:2} \bignorm{\big(u^L_{2},v_2^L\big)(t) - \big(u^L_{1},v_1^L\big)(t)}_{\HH^1} &\le \Lambda_1^*(t) \bignorm{(u_{0,2},v_{0,2})-(u_{0,1},v_{0,1})}_{L,\beta,*}, &&\;\; t\ge 1. \\ \label{CD:KLLM:3} \bignorm{\big(u^L_{2},v_2^L\big)(t) - \big(u^L_{1},v_1^L\big)(t)}_{\HH^2} &\le \Lambda_2^*(t) \bignorm{(u_{0,2},v_{0,2})-(u_{0,1},v_{0,1})}_{L,\beta,*}^{\frac 12}, &&\;\; t\ge 1. \end{alignat} \end{proposition} \begin{proof} Let $C$ denote generic positive constants depending only on $\Omega$, $\beta$, $F$ and $G$. For brevity, we write \begin{align*} (\bar u,\bar v,\bar \mu,\bar \theta) := (u^L_2,v^L_2,\mu^L_2,\theta^L_2) - (u^L_1,v^L_1,\mu^L_1,\theta^L_1), \quad (\bar u_0, \bar v_0) = ( u_{0,2} , v_{0,2}) - ( u_{0,1}, v_{0,1} ). \end{align*} From the weak formulation \eqref{WF:KLLM:1}--\eqref{WF:KLLM:4}, we directly obtain that \begin{align} \label{CD:EQ:1} \inn{\delt \bar u(t)}{w}_{H^1(\Omega)} + \inn{\delt \bar v(t)}{z}_{H^1(\Gamma)} = \Big(\big(\bar\mu(t),\bar\theta(t)\big),(w,z)\Big)_{L,\beta} \end{align} for almost all $t\in\RP$ and all $(w,z)\in\HH^1$, and \begin{alignat}{2} \label{CD:EQ:2} &\bar\mu(t) = -\Lap\bar u(t) + F'\big(u_2^L(t)\big) - F'\big(u_1^L(t)\big) &&\quad\text{a.e.~in $\Omega$} ,\\ \label{CD:EQ:3} &\bar\theta(t) = -\Lapg\bar v(t) + G'\big(v_2^L(t)\big) - G'\big(v_1^L(t)\big) + \deln\bar u(t) &&\quad\text{a.e.~in $\Gamma$} \end{alignat} for almost all $t\in\RP$. Arguing similarly as in the proof of Theorem~\ref{THM:WP:KLLM} (cf. the derivation of \eqref{est1}), we establish the estimate \begin{align} \label{EST:GW1} \dfrac{\dd}{\dd \tau} \bignorm{ \big(\bar u(\tau),\bar v(\tau)\big) }_{L,\beta,*}^{2} + \bignorm{ \big(\grad \bar u(\tau),\gradg \bar v(\tau)\big) }_{\LL^2}^{2} \leq C\, \bignorm{ \big(\bar u(\tau),\bar v(\tau)\big) }_{L,\beta,*}^{2} \end{align} for all $\tau\ge 0$. Hence, Gronwall's lemma implies that \begin{align} \label{EST:GW2} \bignorm{ \big(\bar u(t),\bar v(t)\big) }_{L,\beta,*}^{2} + \int_0^t \bignorm{ \big(\grad \bar u(\tau),\gradg \bar v(\tau)\big) }_{\LL^2}^{2} \ds \leq C e^{Ct}\, \bignorm{ \big(\bar u(0),\bar v(0)\big) }_{L,\beta,*}^{2} \end{align} for all $t\ge 0$. In particular, this proves \eqref{CD:KLLM:1}. Let now $T>1$ be arbitrary. Moreover, let $\varphi \in C^\infty_c(\R;\RP)$ with $\mathrm{supp}\, \varphi \subset (-1,0)$ and $\norm{\varphi}_{L^1(\R)}=1$ be an arbitrary function. For any $k\in\N$, we set \begin{align*} \varphi_k(s) := k \varphi(ks) \quad\text{for all $s\in\R$.} \end{align*} This defines functions $\varphi_k \in C^\infty_c(\R;\RP)$ with $\mathrm{supp}\, \varphi_k \subset (-\frac 1k,0)$ and $\norm{\varphi_k}_{L^1(\R)}=1$ for all $k\in\mathbb N$. For any Banach space $X$, any function $f\in L^1([0,T];X)$ and all $k\in\N$, we now define \begin{align*} \sm{f}_k:\RP \to X, \quad \sm{f}_k(t):= \int_t^{t+1} \varphi_k(t-s)\, f(s) \ds . \end{align*} It is well-known (cf.~\cite[Sect.~4.13]{Alt}) that if $f\in L^r([0,T+1];X)$ for any real number $r\in[1,\infty)$, then $\sm{f}_k \in C^\infty([0,T];X)\cap L^r([0,T];X)$ for all $k\in\N$, and $\sm{f}_k\to f$ in $L^r([0,T];X)$ as $k\to\infty$. Using this smooth approximation, we obtain \begin{align} \label{CD:EQ:1k} \biginn{ \sm{ \delt \bar u }_k(t) }{w}_{H^1(\Omega)} + \biginn{ \sm{ \delt \bar v }_k(t) }{z}_{H^1(\Gamma)} = \Big(\big( \sm{\bar\mu }_k(t), \sm{\bar\theta}_k (t)\big),(w,z)\Big)_{L,\beta}, \end{align} for almost all $t\in(0,T)$, where \begin{alignat}{2} \label{CD:EQ:2k} \sm{\bar\mu}_k &= -\Lap \sm{\bar u}_k + \big[F'(u_2^L) - F'(u_1^L)\big]_k &&\quad\text{a.e.~in $Q$} ,\\ \label{CD:EQ:3k} \sm{\bar\theta}_k &= -\Lapg \sm{\bar v}_k + \big[G'(v_2^L) - G'(v_1^L)\big]_k + \deln \sm{\bar u}_k &&\quad\text{a.e.~in $\Sigma$.} \end{alignat} Note that $\delt \sm{\bar u}_k = \sm{\delt \bar u}_k$ and $\delt \sm{\bar v}_k = \sm{\delt \bar v}_k$, which can be verified by using the change of variables $s\mapsto t-s$ and Leibniz's rule for differentiation under the integral sign. For more details, see \cite[Sect.~4.13]{Alt}. Let us now choose an arbitrary number $t_0\in(0,1)$, and let $C_0$ denote generic positive constants depending only on $\Omega$, $\beta$, $F$, $G$ and $t_0$. We thus obtain \begin{align*} &\frac 12 \frac{\mathrm d}{\mathrm d\tau} \Big( (\tau-t_0) \bignorm{\grad \sm{\bar u}_k (\tau)}_{L^2(\Omega)}^2 + (\tau-t_0) \bignorm{\gradg \sm{\bar v}_k (\tau)}_{L^2(\Gamma)}^2 \Big) \\[1ex] &= \frac 12 \bignorm{\grad \sm{\bar u}_k (\tau)}_{L^2(\Omega)}^2 + \frac 12 \bignorm{\gradg \sm{\bar v}_k (\tau)}_{L^2(\Gamma)}^2 \\ &\quad + (\tau-t_0) \bigscp{\grad \sm{\bar u}_k (\tau)}{\delt \grad \sm{\bar u}_k (\tau)}_{L^2(\Omega)} + (\tau-t_0) \bigscp{\gradg \sm{\bar v}_k (\tau)}{\delt \gradg \sm{\bar v}_k (\tau)}_{L^2(\Gamma)} \\[1ex] &= \frac 12 \bignorm{\grad \sm{\bar u}_k (\tau)}_{L^2(\Omega)}^2 + \frac 12 \bignorm{\gradg \sm{\bar v}_k (\tau)}_{L^2(\Gamma)}^2 \\ &\quad + (\tau-t_0) \bigscp{\sm{\bar \mu}_k (\tau)}{\delt \sm{\bar u}_k (\tau)}_{L^2(\Omega)} + (\tau-t_0) \bigscp{\sm{\bar \theta}_k (\tau)}{\delt \sm{\bar v}_k (\tau)}_{L^2(\Gamma)} \\ &\quad - (\tau-t_0) \bigscp{\big[F'(u_2^L) - F'(u_1^L)\big]_k(\tau)}{\delt \sm{\bar u}_k (\tau)}_{L^2(\Omega)}\\ &\quad - (\tau-t_0) \bigscp{\big[G'(v_2^L) - G'(v_1^L)\big]_k(\tau)}{\delt \sm{\bar v}_k (\tau)}_{L^2(\Gamma)} \\[1ex] &= \frac 12 \bignorm{\grad \sm{\bar u}_k (\tau)}_{L^2(\Omega)}^2 + \frac 12 \bignorm{\gradg \sm{\bar v}_k (\tau)}_{L^2(\Gamma)}^2 - (\tau-t_0) \bignorm{\big(\delt \sm{\bar u}_k (\tau),\delt \sm{\bar v}_k (\tau)\big)}_{L,\beta,*}^2\\ &\quad - (\tau-t_0) \bigscp{\big[F'(u_2^L) - F'(u_1^L)\big]_k(\tau)}{\delt \sm{\bar u}_k (\tau)}_{L^2(\Omega)} \\ &\quad - (\tau-t_0) \bigscp{\big[G'(v_2^L) - G'(v_1^L)\big]_k(\tau)}{\delt \sm{\bar v}_k (\tau)}_{L^2(\Gamma)} \end{align*} for all $t_0<\tau<T$. Integrating with respect to $\tau$ from $t_0$ to an arbitrary $t\in [t_0,T]$, we infer that \begin{align*} &\begin{aligned} &\frac 12 \Big( (t-t_0) \bignorm{\grad \sm{\bar u}_k (t)}_{L^2(\Omega)}^2 + (t-t_0) \bignorm{\gradg \sm{\bar v}_k (t)}_{L^2(\Gamma)}^2 \Big) \\ &\quad + \int_{t_0}^t (\tau-t_0) \bignorm{\big(\delt \sm{\bar u}_k (\tau), \delt \sm{\bar v}_k (\tau)\big)}_{L,\beta,*}^2 \dtau \end{aligned} \\[1ex] &\begin{aligned} &= \frac 12 \int_{t_0}^t \bignorm{\grad \sm{\bar u}_k (\tau)}_{L^2(\Omega)}^2 \dtau + \frac 12 \int_{t_0}^t \bignorm{\gradg \sm{\bar v}_k (\tau)}_{L^2(\Gamma)}^2 \dtau\\ &\quad - \int_{t_0}^t (\tau-t_0) \biginn{\delt \sm{\bar u}_k (\tau)}{\big[F'(u_2^L) - F'(u_1^L)\big]_k(\tau)}_{H^1(\Omega)} \dtau \\ &\quad - \int_{t_0}^t (\tau-t_0) \biginn{\delt \sm{\bar v}_k (\tau)}{\big[G'(v_2^L) - G'(v_1^L)\big]_k(\tau)}_{H^1(\Gamma)} \dtau \end{aligned} \end{align*} for all $t\in [t_0,T]$. Passing to the limit $k\to\infty$, we obtain \begin{align} \label{EST:CLIP:1} &\frac 12 \Big((t-t_0) \bignorm{\grad \bar u(t)}_{L^2(\Omega)}^2 + (t-t_0) \bignorm{\gradg \bar v(t)}_{L^2(\Gamma)}^2 \Big) \notag\\ &\;\; + \int_{t_0}^t (\tau-t_0) \bignorm{\big(\delt \bar u, \delt \bar v\big)(\tau)}_{L,\beta,*}^2 \dtau \notag\\[1ex] &= \frac 12 \int_{t_0}^t \bignorm{\grad \bar u(\tau)}_{L^2(\Omega)}^2 \dtau + \frac 12 \int_{t_0}^t \bignorm{\gradg \bar v(\tau)}_{L^2(\Gamma)}^2 \dtau \notag\\ &\;\; - \int_{t_0}^t (\tau-t_0) \biginn{\delt \bar u(\tau)}{F'\big(u_2^L(\tau)\big) - F'(u_1^L\big(\tau)\big)}_{H^1(\Omega)} \dtau \notag\\ &\;\; - \int_{t_0}^t (\tau-t_0) \biginn{\delt \bar v(\tau)}{G'\big(v_2^L(\tau)\big) - G'\big(v_1^L(\tau)\big)}_{H^1(\Gamma)} \dtau \notag\\[1ex] &= \frac 12 \int_{t_0}^t \bignorm{\grad \bar u (\tau)}_{L^2(\Omega)}^2 \dtau + \frac 12 \int_{t_0}^t \bignorm{\gradg \bar v (\tau)}_{L^2(\Gamma)}^2 \dtau \notag\\ &\;\; + \int_{t_0}^t (\tau-t_0) \Big( \SS^L \big( (\delt \bar u, \delt \bar v )(\tau)\big), \big[ F'\big(u_2^L(\tau)\big) - F'\big(u_1^L(\tau)\big), G'\big(v_2^L(\tau)\big) - G'\big(v_1^L(\tau)\big) \big] \Big)_{L,\beta} \mathrm d\tau \notag\\[1ex] &\le \frac 12 \int_{t_0}^t \bignorm{\grad \bar u (\tau)}_{L^2(\Omega)}^2 \dtau + \frac 12 \int_{t_0}^t \bignorm{\gradg \bar v (\tau)}_{L^2(\Gamma)}^2 \dtau \notag\\ &\;\; + C\int_{t_0}^t (\tau-t_0) \Big(\bignorm{ F'\big(u_2^L(\tau)\big) - F'\big(u_1^L(\tau)\big) }_{H^1(\Omega)}^2 + \bignorm{ G'\big(v_2^L(\tau)\big) - G'\big(v_1^L(\tau)\big) }_{H^1(\Gamma)}^2\Big) \dtau \notag\\ &\;\; + \frac 12 \int_{t_0}^t (\tau-t_0) \bignorm{\big( \delt \bar u , \delt \bar v \big)(\tau)}_{L,\beta,*}^2 \dtau \end{align} for all $t\in [t_0,T]$. Since $T>0$ was arbitrary, \eqref{EST:CLIP:1} actually holds true for all $t\ge t_0$. Invoking the smoothing property \eqref{SMOOTH:KLLM} and Sobolev's embedding theorem, we infer that \begin{align} \bignorm{ u_i^L(\tau) }_{W^{1,\infty}(\Omega)} + \bignorm{ v_i^L(\tau) }_{W^{1,\infty}(\Gamma)} \le C \bignorm{ \big(u_i^L(\tau),v_i^L(\tau)\big) }_{\HH^3} \leq C \left( \dfrac{1+t_0}{t_0}\right)^{\frac{1}{2}} \end{align} for almost all $\tau\ge t_0$. By a straightforward computation, this entails that \begin{align} \label{EST:F:DIFF} \bignorm{ F'\big(u_2^L(\tau)\big) - F'\big(u_1^L(\tau)\big) }_{H^1(\Omega)}^2 &\le C_0 \norm{\bar u(\tau)}_{H^1(\Omega)}^2,\\ \label{EST:G:DIFF} \bignorm{ G'\big(v_2^L(\tau)\big) - G'\big(v_1^L(\tau)\big) }_{H^1(\Gamma)}^2 &\le C_0 \norm{\bar v(\tau)}_{H^1(\Gamma)}^2, \end{align} for almost all $\tau \ge t_0$ and $i\in\{1,2\}$. Plugging the estimates \eqref{EST:F:DIFF} and \eqref{EST:G:DIFF} into \eqref{EST:CLIP:1}, and applying Lemma~\ref{LEM:INT}, we deduce that \begin{align} \label{EST:CLIP:2} &(t-t_0) \bignorm{\big(\grad \bar u, \gradg \bar v\big)(t)}_{\LL^2}^2 \notag\\ &\quad\le C_0 \int_0^t \bignorm{\big(\grad \bar u, \gradg \bar v\big)(\tau)}_{\LL^2}^2 \dtau + C_0 \int_{t_0}^t (\tau-t_0) \,\bignorm{\big(\grad \bar u, \gradg \bar v\big)(\tau)}_{\LL^2}^2 \dtau \notag\\ &\qquad + C_0 \int_{t_0}^t (\tau-t_0) \, \bignorm{\big(\bar u, \bar v\big) (\tau)}_{L,\beta,*}^2 \dtau \end{align} for all $t\ge t_0$. Recalling \eqref{EST:GW2}, we infer that \begin{align} \label{EST:CLIP:3} &(t-t_0) \bignorm{\big(\grad \bar u, \gradg \bar v\big)(t)}_{\LL^2}^2 \notag\\ &\quad\le C_0 \int_{t_0}^t (\tau-t_0) \,\bignorm{\big(\grad \bar u, \gradg \bar v\big)(\tau)}_{\LL^2}^2 \dtau + C_0\, e^{Ct}\, \big(1+ (t-t_0)^2\big)\, \bignorm{\big(\bar u, \bar v\big) (0)}_{L,\beta,*}^2 \end{align} for all $t\ge t_0$. We now fix $t_0:=\tfrac 12$. Hence, Gronwall's lemma eventually implies that \begin{align} \label{EST:CLIP:3} \bignorm{\big(\grad \bar u, \gradg \bar v\big)(t)}_{\LL^2}^2 \le C\, e^{Ct}\, \frac{\big(1+ (t-\tfrac 12)^2\big)}{t-\tfrac 12}\, \bignorm{\big(\bar u, \bar v\big) (0)}_{L,\beta,*}^2 \end{align} for all $t\ge \tfrac 12$. In view of \eqref{CD:KLLM:1} and Lemma~\ref{LEM:INT}, the compact Lipschitz estimate \eqref{CD:KLLM:2} now directly follows. Using Lemma~\ref{LEM:INT:2}, the smoothing property \eqref{SMOOTH:KLLM} and the estimate \eqref{CD:KLLM:2}, we further conclude that \begin{align*} \bignorm{ \big(\bar u(t),\bar v(t)\big) }_{\HH^2}^2 \le C\, \bignorm{ \big(\bar u(t),\bar v(t)\big) }_{\HH^3} \bignorm{ \big(\bar u(t),\bar v(t)\big) }_{\HH^1} \le C\, \Lambda_{1}^*(t) \bignorm{ \big(\bar u_0,\bar v_0\big) }_{L,\beta,*} \end{align*} for almost all $t\ge 1$. This proves \eqref{CD:KLLM:3} and thus, the proof is complete. \end{proof} We can further show that the weak solution is Hölder continuous in time with a Hölder constant being uniform in $L$. \begin{proposition}[Uniform Hölder estimate]\label{PROP:HLD:KLLM} Suppose that \eqref{ass:dom}--\eqref{ass:pot} hold and that $L\in(0,\infty)$. Let $m\in\R$ be arbitrary, let $(u_{0},v_{0}) \in \Wm $ be any initial datum, and let $(u^L,v^L,\mu^L,\theta^L)$ denote the corresponding weak solution of the system \eqref{CH:INT.}. Then there exists a positive constant $\Theta^*$ depending only on $\Omega$ and $E(u_0,v_0)$ such that \begin{alignat}{2} \bignorm{(u^L,v^L)(t) - (u^L,v^L)(s)}_{\HH^1} \le \Theta^*\, \abs{s-t}^{\frac{3}{16}}, \quad \text{for all $s,t\ge 1$.} \end{alignat} \end{proposition} \begin{proof} Let $C$ denote a generic positive constant depending only on $\Omega$ and $E(u_0,v_0)$ that may change its value from line to line. Let $s,t\ge 0$ be arbitrary, and without loss of generality we assume $t>s$. Moreover, let $w\in H^1_0(\Omega)$ (i.e., $w\vert_\Gamma = 0$) be an arbitrary test function. Integrating \eqref{WF:KLLM:1} with respect to time, we get \begin{align*} \biginn{u^L(t)-u^L(s)}{w}_{H^1(\Omega)} = - \int_s^t \grad\mu^L(\tau) \cdot \grad w \dtau. \end{align*} Now, taking the supremum over all test functions $w\in H^1_0(\Omega)$ with $\norm{w}_{H^1(\Omega)} = 1$, and recalling the energy inequality \eqref{ENERGY:KLLM}, we infer that \begin{align*} &\bignorm{u^L(t)-u^L(s)}_{H^{-1}(\Omega)} \le \int_s^t \bignorm{\grad\mu^L(\tau)}_{L^2(\Omega)} \dtau \\ &\quad \le \abs{t-s}^{\frac 12} \left(\int_0^t \bignorm{\grad\mu^L(\tau)}_{L^2(\Omega)}^2 \dtau\right)^{\!\frac 12} \le \sqrt{2E(u_0,v_0)}\, \abs{t-s}^{\frac 12}, \end{align*} where $H^{-1}(\Omega)$ stands for the dual space of $H^1_0(\Omega)$. We now suppose that $s,t\ge 1$. Interpolating $H^{3/2}(\Omega)$ between $H^{-1}(\Omega)$ and $H^3(\Omega)$ (see, e.g., \cite[Sec.~4.3.1]{Triebel}), and invoking the smoothing property \eqref{SMOOTH:KLLM}, we obtain \begin{align*} \bignorm{u^L(t)-u^L(s)}_{H^{3/2}(\Omega)} &\le C \bignorm{u^L(t)-u^L(s)}_{H^{-1}(\Omega)}^{\frac 38}\, \bignorm{u^L(t)-u^L(s)}_{H^{3}(\Omega)}^{\frac 58} \\ &\le C \abs{t-s}^{\frac{3}{16}}. \end{align*} Eventually, by means of the continuous embedding $H^{3/2}(\Omega)\emb H^1(\Gamma)$, we conclude that \begin{align*} \bignorm{(u^L,v^L)(t) - (u^L,v^L)(s)}_{\HH^1} \le C \abs{t-s}^{\frac{3}{16}}, \end{align*} which completes the proof. \end{proof} As a consequence of Theorem~\ref{THM:WP:KLLM}, Proposition~\ref{PROP:IMP:KLLM} and Proposition~\ref{PROP:CD:KLLM}, the weak solutions to the problem \eqref{CH:INT.} can be described via a strongly continuous semigroup. \begin{corollary} Suppose that \eqref{ass:dom}--\eqref{ass:pot} hold and that $L\in(0,\infty)$. Let $m\in\R$ be arbitrary. For any $(u_0,v_0)\in\Wm$ let $(u^L,v^L,\mu^L,\theta^L)$ denote the corresponding unique weak solution of the system \eqref{CH:INT.}. For any $t\ge 0$, we define the operator \begin{align} S_m^L(t):\Wm\to\Wm,\quad (u_0,v_0) \mapsto \big(u^L(t),v^L(t)\big). \end{align} Then the family $\big\{S_m^L(t)\big\}_{t\ge 0}$ defines a strongly continuous semigroup on $\Wm$. \end{corollary} \subsection{The GMS model ($L=0$)}\label{sec:wellposedGMS} \begin{theorem}[Strong well-posedness and smoothing property for the GMS model] \label{THM:WP:GMS} Suppose that \eqref{ass:dom}--\eqref{ass:pot} hold and that $L=0$. Let $m\in\R$ be arbitrary and let $(u_0,v_0) \in \Wm$ be any initial datum. Then there exists a unique global weak solution $(u^0,v^0,\mu^0,\theta^0)$ of the system \eqref{CH:INT.} existing on the time interval $\RP$ and having the following properties: \begin{enumerate}[label=$(\mathrm{\roman*})$, ref = $\mathrm{\roman*}$] \item For every $T>0$, the solution has the regularity \begin{subequations} \label{REG:GMS} \begin{align} \label{REG:GMS:1} &\begin{aligned} \big(u^0,v^0\big) & \in C^{0,\frac{1}{4}}([0,T];\LL^2) \cap L^\infty(0,T;\VV) \\ & \qquad \cap L^2(0,T;\HH^3) \cap H^1\big(0,T;(\Db)'\big), \end{aligned} \\ \label{REG:GMS:2} &\big(\mu^0,\theta^0\big) \in L^2(0,T;\HH^1). \end{align} \end{subequations} \item The solution satisfies \begin{subequations} \label{WF:GMS} \begin{align} \label{WF:GMS:1} \biginn{(\delt u^0,\delt v^0)}{(w,z)}_{\Db} &= - \intO \grad\mu^0 \cdot \grad w \dx - \intG \gradg\theta^0 \cdot \gradg z \dG \end{align} a.e.~on $\RP$ for all test functions $w\in\Db$, and \begin{alignat}{2} \label{WF:GMS:3} &\mu^0 = -\Lap u^0 + F'(u^0) &&\quad\text{a.e.~in Q}, \\ \label{WF:GMS:4} &\theta^0 = -\Lapg v^0 + G'(v^0) + \deln u^0 &&\quad\text{a.e.~in $\Sigma$}, \\ \label{WF:GMS:5} &\mu^0\vert_{\Si} = \beta\theta^0, \quad u^0\vert_{\Si} = v^0 &&\quad\text{a.e.~in $\Sigma$}, \\ \label{WF:GMS:6} &(u^0,v^0)\vert_{t=0} = (u_0,v_0) &&\quad \text{a.e.~in } \Omega \times \Gamma. \end{alignat} \end{subequations} \item The solution satisfies the mass conservation law \begin{align} \label{MASS:GMS} \beta \intO u^0(t) \dx + \intG v^0(t) \dG = \beta \intO u_0 \dx + \intG v_0 \dG = m,\quad \end{align} for all $t\in\RP$, i.e., $\big(u^0(t),v^0(t)\big)\in\Wm$ for almost all $t\in\RP$. \item The solution satisfies the energy inequality \begin{align} \label{ENERGY:GMS} E\big(u^0(t),v^0(t)\big) + \frac 12 \int_0^t \bignorm{\big(\mu^0(s),\theta^0(s)\big)}_{0,\beta}^2 \le E(u_0,v_0) \end{align} for almost all $t\ge 0$. \item The solution satisfies the smoothing property, i.e. there exists a constant $C_0>0$ depending only on $\Omega$, $\beta$, $F$, $G$ and $\norm{(u_0,v_0)}_{\HH^1}$, such that \begin{align} \label{SMOOTH:GMS} \bignorm{ \big(u^0(t),v^0(t)\big) }_{\HH^3} \leq C_0\left( \dfrac{1+t}{t}\right)^{\frac{1}{2}} \end{align} for almost all $t\ge 0$. \end{enumerate} \end{theorem} \begin{proof} For the existence and uniqueness of a weak solution satisfying the assertions (i)--(iv), we refer the reader to \cite[Prop.~3.4]{KLLM}. As the proof of the smoothing property (v) is very similar to the approach in the proof of Theorem~\ref{THM:WP:KLLM}, we only sketch the most important steps. To provide a cleaner presentation we omit the superscript $0$. Let $(w,z)\in\Db$ be arbitrary (i.e., $w\vert_\Gamma = \beta z$ a.e.~on $\Gamma$). Testing \eqref{WF:GMS:1} with $(w,z)$ and recalling the definition of the product $\inn{\cdot}{\cdot}_{\Db}$ (see \eqref{pre:D}), we obtain \begin{align} \begin{aligned} \big\langle (\delt u,\delt v), (w,z) \big\rangle_{\Db} &= - \big( \grad\mu, \grad w \big)_{L^2(\Omega)} - \big( \gradg \theta , \gradg z \big)_{L^2(\Gamma)}\\ &= -\big((\mu,\theta),(w,z) \big)_{0,\beta}. \end{aligned} \end{align} Hence, using the notation for the difference quotient introduced in \eqref{NOT:FDQ}, we infer that \begin{align} \label{sumweak:GMS} \begin{aligned} \big\langle (\partial_{t}^{h}\delt u(\tau),\partial_{t}^{h}\delt v(\tau)), (w,z) \big\rangle_{\Db} = -\Big(\big(\partial_{t}^{h}\mu(\tau),\partial_{t}^{h}\theta(\tau)\big),(w,z) \Big)_{0,\beta} \end{aligned} \end{align} for almost all $\tau\in\RP$, where $\del_t^h \mu(\tau)$ and $\del_t^h \theta(\tau)$ can be expressed by means of $\eqref{WF:GMS:3}$ and $\eqref{WF:GMS:4}$. Choosing the test function $ (w,z) =\SS^0\big(\partial_{t }^{h}u(\tau),\partial_{t }^{h}v(\tau)\big)$, a straightforward computation reveals that \begin{align*} &-\dfrac{1}{2}\dfrac{\dd}{\dd \tau}\big\| \partial_{t }^{h}u(\tau)\big\|_{0,\beta,*}^{2} \\ &\quad =\big\|\nabla\partial_{t }^{h}u(\tau) \big\|^{2} _{L^{2}(\Omega)} +\dfrac{1}{h}\int_{\Omega } \Big(F^{\prime}\big(u(\tau+h)\big)-F^{\prime}\big(u(\tau)\big)\Big) \partial_{t }^{h}u(\tau) \dx\\ &\qquad +\big\|\gradg\partial_{t }^{h}v(\tau) \big\|^{2}_{L^{2}(\Gamma)} +\dfrac{1}{h}\int_{\Gamma } \Big(G^{\prime}\big(v(\tau+h)\big)-G^{\prime}\big(v(\tau)\big)\Big) \partial_{t }^{h}v(\tau) \dG \end{align*} for almost all $\tau\in\RP$. Based on this identity, the smoothing property can be established by proceeding exactly as in the proof of Theorem~\ref{THM:WP:KLLM}. Note that the regularity estimates in \cite[Thm.~3.3]{knopf-liu} are also applicable for bulk-surface elliptic problems with Dirichlet type coupling conditions. \end{proof} \medskip As for the KLLM model, we obtain an improved continuity result, Lipschitz/Hölder continuous dependence of the weak solutions on the initial data, and a uniform Hölder estimate for times in $[1,\infty)$. \begin{proposition}[Improved continuity results]\label{PROP:ICR:GMS} Suppose that \eqref{ass:dom}--\eqref{ass:pot} hold and that $L=0$. Let $m\in\R$ be arbitrary, let $(u_{0},v_{0}) \in \Wm $ be any initial datum, and let $(u^0,v^0,\mu^0,\theta^0)$ denote the corresponding weak solution of the system \eqref{CH:INT.}. Then it holds tha \begin{align} \label{CONT:UV} (u^0,v^0) \in C([0,\infty);\HH^1) \cap C((0,\infty);\HH^2). \end{align} \end{proposition} \medskip \begin{proposition}[Continuous dependence on the initial data]\label{PROP:CD:GMS} Suppose that \eqref{ass:dom}--\eqref{ass:pot} hold and that $L=0$. Let $m\in\R$ be arbitrary. For $i\in\{1,2\}$, let $(u_{0,i},v_{0,i}) \in \Wm $ be any initial datum and let $(u_i^0,v_i^0,\mu_i^0,\theta_i^0)$ denote the corresponding weak solution of the system \eqref{CH:INT.}. Then there exist positive, non-decreasing functions $\Lambda_k^0 \in C(\RP)$, $k\in\{-1,1,2\}$ depending only on $\Omega$, $\beta$, $F$ and $G$ such that the following statements hold: \begin{alignat}{2} \label{CD:GMS:1} \bignorm{\big(u^0_{2},v_2^0\big)(t) - \big(u^0_{1},v_1^0\big)(t)}_{0,\beta,*} &\le \Lambda_{-1}^0(t) \bignorm{(u_{0,2},v_{0,2})-(u_{0,1},v_{0,1})}_{0,\beta,*}, &&\;\; t\ge 0, \\ \label{CD:GMS:2} \bignorm{\big(u^0_{2},v_2^0\big)(t) - \big(u^0_{1},v_1^0\big)(t)}_{\HH^1} &\le \Lambda_1^0(t) \bignorm{(u_{0,2},v_{0,2})-(u_{0,1},v_{0,1})}_{0,\beta,*}, &&\;\; t\ge 1, \\ \label{CD:GMS:3} \bignorm{\big(u^0_{2},v_2^0\big)(t) - \big(u^0_{1},v_1^0\big)(t)}_{\HH^2} &\le \Lambda_2^0(t) \bignorm{(u_{0,2},v_{0,2})-(u_{0,1},v_{0,1})}_{0,\beta,*}^{\frac 12}, &&\;\; t\ge 1. \end{alignat} \end{proposition} \medskip \begin{proposition}[Uniform Hölder estimate]\label{PROP:HLD:GMS} Suppose that \eqref{ass:dom}--\eqref{ass:pot} hold and that $L=0$. Let $m\in\R$ be arbitrary, let $(u_{0},v_{0}) \in \Wm $ be any initial datum, and let $(u^0,v^0,\mu^0,\theta^0)$ denote the corresponding weak solution of the system \eqref{CH:INT.}. Then there exists a positive constant $\Theta^0$ depending only on $\Omega$ and $E(u_0,v_0)$ such that \begin{alignat}{2} \bignorm{(u^0,v^0)(t) - (u^0,v^0)(s)}_{\HH^1} &\le \Theta^0\, \abs{s-t}^{\frac{3}{16}}, &&\quad t\ge 1. \end{alignat} \end{proposition} The proofs of Proposition~\ref{PROP:ICR:GMS}, Proposition~\ref{PROP:HLD:GMS} and Proposition~\ref{PROP:CD:GMS} are very similar to those of the corresponding results for the KLLM model. Therefore, they will not be presented. \medskip As a consequence of Theorem~\ref{THM:WP:GMS}, Proposition~\ref{PROP:ICR:GMS} and Proposition~\ref{PROP:CD:GMS}, the weak solutions to the problem \eqref{CH:INT.} can be described via a strongly continuous semigroup. \begin{corollary} Suppose that \eqref{ass:dom}--\eqref{ass:pot} hold and that $L=0$. Let $m\in\R$ be arbitrary. For any $(u_0,v_0)\in\Wm$ let $(u^0,v^0,\mu^0,\theta^0)$ denote the corresponding unique weak solution. For any $t\ge 0$, we define the operator \begin{align} S_m^0:\Wm\to\Wm,\quad (u_0,v_0) \mapsto \big(u^0(t),v^0(t)\big). \end{align} Then the family $\big\{S_m^0(t)\big\}_{t\ge 0}$ defines a strongly continuous semigroup on $\Wm$. \end{corollary} \section{Long-time dynamics and existence of a global attractor}\label{SEC:LTD} \subsection{Long-time dynamics of the KLLM model}\label{sec:long-time} In this section, we investigate the long-time behavior of the KLLM model \eqref{CH:INT.} for any fixed $L\in(0,\infty)$. We prove the existence of a global attractor for weak solutions of this system, and we establish the convergence of each weak solution to a single stationary point as $ t\rightarrow \infty$. To this end, we first analyze the set of stationary points of the problem \eqref{CH:INT.} with $L\in(0,\infty)$. \subsubsection{The set of stationary points} \label{sec:stat} For the semigroup $ {\left\lbrace S_{m}^{L}(t)\right\rbrace }_{t\geq0} $ on $ \Wm $ corresponding to the KLLM model with fixed $L\in(0,\infty)$, the corresponding set of stationary points of the problem \eqref{CH:INT.} can be expressed as follows: \begin{align} \mathcal{N}_{m}^L=\left\lbrace (u,v) \in \Wm:S_{m}^{L}(t) (u,v) = (u,v) \;\text{for all}\; t\geq 0\right\rbrace.\nonumber \end{align} We aim to show that the set $ \mathcal{N}_{m}^L $ is a nonempty and bounded subset of $ \Wmt $. To this end, let $ (u,v) \in \mathcal{N}_{m}^L$ be arbitrary, and let $\mu$ and $\theta$ denote the corresponding chemical potentials given by \eqref{WF:KLLM:3} and \eqref{WF:KLLM:4}. Then the energy inequality \eqref{ENERGY:KLLM} entails that \begin{equation*} \int_{0}^{T}\left( \left\Vert \nabla \mu \right\Vert _{L^{2}\left( \Omega \right) }^{2}+\left\Vert \nabla \theta \right\Vert _{L^{2}\left( \Gamma \right) }^{2}+\dfrac{1}{L}\left\| \beta\theta-\mu\right\|_{L^{2}\left( \Gamma \right) }^{2} \right) dt \leq0. \end{equation* Hence, there exists a constant $\lambda\in\R$ such that $\mu=\beta\lambda$ a.e.~in $\Omega$ and $\theta=\lambda$ a.e.~on $\Gamma$. Integrating \eqref{WF:KLLM:3} over $\Omega$ and \eqref{WF:KLLM:4} over $\Gamma$, we infer that \begin{equation} \lambda =\dfrac{\int_{\Omega }F ^{\prime }\left( u \right)\dx + \int_{\Gamma }G ^{\prime }\left( v \right) \dG}{\beta\left\vert \Omega\right\vert+\left\vert\Gamma\right\vert} \text{.}\label{5.33} \end{equation Therefore, we obtain that $\mathcal{N}_{m}^L$ consists of solutions to the following stationary problem \begin{subequations} \label{5.34} \begin{alignat}{2} \label{5.34:1} -\Delta u +F ^{\prime }\left( u \right) &=\beta\lambda &&\quad\text{ in } \Omega, \\ \label{5.34:2} -\Delta_{\Gamma}v+G ^{\prime }\left( v \right)+\partial _{n }u &=\lambda &&\quad\text{ on } \Gamma,\\ \label{5.34:3} u|_{\Gamma} &=v &&\quad \text{ on } \Gamma,\\ \label{5.34:4} \textstyle \beta\int_\Omega u \dx + \int_\Gamma v \dG &= m. \end{alignat} \end{subequations} Hence, in order to prove that $\mathcal{N}_{m}^L$ is nonempty, it suffices to show that \eqref{5.34} has at least one solution. Since the problem \eqref{5.34} does not depend on $ L $, we notice that the set of stationary points $\mathcal{N}_{m}^L$ is actually independent of $ L $. Thus, in the remainder of this section, we will just use the notation $\mathcal{N}_{m} := \mathcal{N}_{m}^{L}$. In the following, we interpret the total free energy as a continuous functional \begin{align} \label{DEF:ENF} E: \VV^1 \to [0,\infty), \quad (u,v) \mapsto E(u,v) \end{align} where for any $(u,v)\in\Wm$, the expression $E(u,v)$ is as defined in \eqref{DEF:EN}. We first prove that the energy functional $E$ has a global minimizer on the space $\Wm$. Next, we show that a minimizer of $E$ on $\Wm$ is actually a strong solution of the system $(\eqref{5.33},\eqref{5.34})$ meaning that it is a stationary point. \begin{lemma}\label{LM:minimizer} Suppose that the assumptions \eqref{ass:dom}-\eqref{ass:pot} hold. Then the functional $E\vert_{\Wm}$ has at least one minimizer $ (u_*,v_*) \in \Wm $, i.e., \begin{equation*} E(u_*,v_*)=\inf_{ (u,v)\in \Wm} E\left(u,v\right). \end{equation*} \end{lemma} \begin{proof} To prove the assertion, we employ the direct method of calculus of variations. From the assumptions \eqref{ass:pot} on $ F $ and $ G $, we obtain the lower bound \begin{equation} E\left( u,v \right) \geq \frac{1}{2}\left\Vert \nabla u \right\Vert _{L^{2}\left( \Omega \right) }^{2}+\frac{1}{2}\left\Vert\gradg v \right\Vert _{L^{2}\left( \Gamma \right) }^{2}+ a_{F}\left\| u\right\| _{L_{p}\left( \Omega \right)}^{p}+a_{G}\left\| v\right\| _{L_{q}\left( \Gamma \right)}^{q}-b_{F}-b_{G} \label{5.35} \end{equation} for all $(u,v) \in \Wm$. Hence, the infimum $${E}_{*}:=\underset{(u,v) \in \Wm}{\inf }E\left( u,v \right) $$ exists and thus, we can find a minimizing sequence $\left\{(u _{k},v _{k}) \right\}_{k\in\N}\subset $ $\Wm$ such tha \begin{equation}\label{5.36} \lim_{k\rightarrow \infty }E\left( u _{k},v _{k}\right)={E}_{*} \qquad\text{and}\qquad E\left( u_{k},v _{k}\right) \leq {E}_{*}+1 \quad\text{for all $k\in\N$.} \end{equation} Combining \eqref{5.35} and \eqref{5.36}, it follows that $\left\{ \left( u _{k},v _{k}\right) \right\}_{k\in\N}$ is bounded in ${\cal H}^{1} $. Then, according to the Banach-Alaoglu theorem, it holds that \begin{equation} (u_k, v_k)\wto ( {u }^{*},{u }^{*}) \quad \text{in $\HH^1$} \label{5.37} \end{equation} along a non-relabeled subsequence. Invoking Sobolev's embedding theorem we further deduce that \begin{align} \left( u _{k}, v _{k}\right)\rightarrow \left( {u }^{*},{v }^{*}\right) \quad\text{in } L^{p}\left( \Omega \right) \times L^{q}\left( \Gamma \right), \text{ and a.e.~in } \Omega \times \Gamma \label{5.39} \end{align after another subsequence extraction, where $p$ and $q$ are the exponents introduced in \eqref{ass:pot}. Since $F $ and $ G $ are continuous, \eqref{5.39} implie \begin{equation*} F \left( u _{k}\right) \rightarrow F \left( {u }^{*}\right) \quad\text{a.e.~in }\Omega, \quad\text{and}\quad G \left( v _{k}\right) \rightarrow G \left( {v }^{*}\right) \quad\text{a.e.~in }\Gamma. \end{equation* Recalling assumption \eqref{ass:pot}, it follows from Lebesgue's generalized convergence theorem \cite[Sect.\,3.25]{Alt} tha \begin{equation*} \lim_{k\rightarrow \infty } \int_{\Omega }F \left( u _{k}\right)\dx =\int_{\Omega }F \left( {u }^{*} \right)\dx , \quad\text{and}\quad \lim_{k\rightarrow \infty } \int_{\Gamma}G \left( v _{k}\right)\dG =\int_{\Gamma }G \left( {v }^{*} \right)\dG . \end{equation* As all the other terms in the energy functional are convex, they are lower semicontinuous, and we thus conclude that \begin{equation*} E\left( u^{*},v ^{*} \right) \leq \underset{m\rightarrow \infty }{\lim \inf }\; E\left( u _{k},v _{k}\right) ={E}_{*}. \end{equation* This proves that $ (u^{*},v ^{*}) $ is a minimizer of the functional $E$ on $\Wm$. \end{proof} \medskip\pagebreak[2] We further show that the energy functional is of class $C^2$. \begin{lemma}[Regularity of the energy functional] \label{LEM:ENC2} The energy functional $ E $ is twice continuously Fr\'echet differentiable. For every $ (u,v), (\zeta,\eta) \in \VV^1 $, we have \begin{align}\label{frstFrec.der} \left\langle E^{\prime}(u,v) ,(\zeta,\eta)\right\rangle_{\VV^1} &=\intO \nabla u \cdot \nabla \zeta + F^{\prime}(u) \zeta\dx + \intG \gradg v \cdot \gradg \eta + G^{\prime}(v) \eta \dG. \end{align} For every $ (u,v), (\zeta_{1},\eta_{1}), (\zeta_{2},\eta_{2}) \in \VV^1 $, we have \begin{align}\label{scndFrec.der} \begin{aligned} \left\langle E^{\prime \prime}(u,v)(\zeta_{1},\eta_{1}) ,(\zeta_{2},\eta_{2}) \right\rangle_{\VV^1} & =\intO \nabla \zeta_{1} \cdot \nabla \zeta_{2} + F^{\prime \prime}(u) \zeta_{1} \zeta_{2}\dx \\ &\quad + \intG \gradg \eta_{1} \cdot \gradg \eta_{2} + G^{\prime \prime}(v) \eta_{1} \eta_{2}\dG. \end{aligned} \end{align} \end{lemma} The proof of this lemma is straightforward and will thus not be presented. For a very similar result including a detailed proof, we refer to \cite[Lem.~6.2]{CFP}. \begin{lemma}[Critical points of $E$ are steady states] \label{LM:crtclpnt} Suppose that the assumptions \eqref{ass:dom}-\eqref{ass:pot} are satisfied and suppose that $( u_*,v_*)\in\Wm $. Then, the following statements are equivalent: \begin{enumerate}[label=$(\mathrm{\roman*})$, ref = $\mathrm{\roman*}$] \item $(u_*,v_*)$ is a critical point of $E\vert_{\Wm}$. \item $(u_*,v_*) \in \Wmt$ and $(u_*,v_*)$ is a strong solution of the problem $(\eqref{5.33},\eqref{5.34})$. In particular, this means that $(u_*,v_*)\in\mathcal N_m$. \end{enumerate} \end{lemma} \begin{proof} We first notice that (i) is equivalent to \begin{align} \begin{aligned} &\left\langle E^{\prime}(u_*,v_*) ,(\zeta,\xi)\right\rangle_{\VV^1} \\ &\quad= \int_{\Omega }\left( \nabla u_* \cdot \nabla \zeta +F^{\prime }\left( u_*\right) \zeta \right)\dx +\int_{\Gamma }\left( \gradg v_* \cdot \gradg \xi +G^{\prime }\left( v_*\right) \xi \right)\dG=0 \label{5.41} \end{aligned} \end{align} for all $ (\zeta,\xi) \in \Wo $. Now, for any $ (\overline{\zeta},\overline{\xi})\in \VV^1 $, we define $$\gamma=\dfrac{\beta\int_\Omega \overline{\zeta} \dx+\int_\Gamma \overline{\xi} \dG} {\beta\abs{\Omega} + \abs{\Gamma} } .$$ Hence, $ (\zeta,\xi)=(\overline{\zeta}-\gamma,\overline{\xi}-\gamma) \in \Wo\, $, and thus \eqref{5.41} is equivalent to \begin{align} \begin{aligned} &\int_{\Omega }\left( \nabla u_*\cdot\nabla \overline{\zeta} + F^{\prime }\left( u_*\right) \overline{\zeta} \right)\dx +\int_{\Gamma }\left( \gradg v_* \cdot \gradg \overline{\xi} +G^{\prime }\left( v_*\right) \overline{\xi} \right)\dG \\ &\qquad =\int_{\Omega }F^{\prime }\left( u_*\right)\gamma\dx +\int_{\Gamma }G^{\prime }\left( v_*\right)\gamma \dG =\int_{\Omega } \beta\lambda\, \overline{\zeta} \dx +\int_{\Gamma } \lambda\, \overline{\xi} \dG \end{aligned} \label{5.42} \end{align} for all $ (\overline{\zeta},\overline{\xi})\in \VV^1 $. This means that $(u_*,v_*) \in \Wm$ is a weak solution of the problem (\eqref{5.33},\eqref{5.34}). Moreover, recalling the growth assumption \eqref{ass:pot}, we can use elliptic regularity theory for problems with bulk-surface coupling (see \cite[Thm.~3.3]{knopf-liu}) to conclude that $(u_*,v_*)\in \mathcal{H}^{2} $. Therefore, $(u_*,v_*)$ is actually a strong solution of the problem (\eqref{5.33},\eqref{5.34}) which directly yields $(u_*,v_*)\in \mathcal N_m$. We conclude that (i) and (ii) are equivalent and thus, the proof is complete. \end{proof} \begin{lemma}\label{LM.boundedstat} Suppose that the assumptions \eqref{ass:dom}-\eqref{ass:pot} hold. Then, the set of stationary points $ \mathcal{N}_{m} $ is a nonempty and bounded subset of $\Wmt$. \end{lemma} \begin{proof} Let $C$ denote a generic constant depending only on $\Omega$, $F$, $G$, $\beta$ and $m$ which may change its value from line to line. We first notice that Lemma~\ref{LM:minimizer} and Lemma~\ref{LM:crtclpnt} directly imply that $ \mathcal{N}_{m} $ is nonempty. Let now $(u,v)\in \mathcal{N}_{m}$ be arbitrary and let $\lambda \in\R$ as defined in \eqref{5.33}. Testing \eqref{5.34:1} with $u $ and $ \eqref{5.34:2} $ with $v $, and summing the obtained identities we get \begin{align} \label{5.47} \begin{aligned} &\left\| \nabla u\right\|_{L^{2}\left( \Omega\right) }^{2} +\left\| \gradg v\right\|_{L^{2}\left( \Gamma\right) }^{2} + \int_{\Omega }F_1^{\prime }\left( u \right)u\dx + \int_{\Gamma }G_1^{\prime }\left( v \right)v \dG \\ &\qquad =m\lambda - \int_{\Omega }F_2^{\prime }\left( u \right)u\dx - \int_{\Gamma }G_2^{\prime }\left( v \right)v \dG. \end{aligned} \end{align} Performing a Taylor expansion, recalling that $F_1''$ and $G_1''$ are non-negative, and invoking the growth conditions \eqref{GR:F} and \eqref{GR:G} in \eqref{ass:pot}, we deduce that \begin{alignat}{2} \label{EST:F1P} F_1'(s)\, s &\ge F_1(s) - F_1(0) &&\ge a_{F'}\abs{s}^p - C,\\ \label{EST:G1P} G_1'(s)\, s &\ge G_1(s) - G_1(0) &&\ge a_{G'}\abs{s}^q - C \end{alignat} for all $s\in\R$. Moreover, recalling \eqref{5.33} and the growth assumptions in \eqref{ass:pot}, by means of Young's inequality we infer that for any $\alpha>0$ there exists a constant $C_\alpha$ depending only on $\Omega$, $F$, $G$, $\beta$, $m$ and $\alpha$ such that \begin{align} \label{EST:ML} \abs{m\lambda} + \int_{\Omega } \abs{F_2^{\prime}(u)} \abs{u} \dx + \int_{\Gamma } \abs{G_2^{\prime}(v)} \abs{v} \dG \leq C_\alpha + \alpha \big(\left \|u\right\|_{L^{p}\left( \Omega\right) }^{p} +\left\|v\right\|_{L^{q}\left( \Gamma\right) }^{q}\big) . \end{align} Fixing $\alpha = \frac 1 2 \min\{a_{F'},a_{G'}\}$ and using the estimates \eqref{EST:F1P}--\eqref{EST:ML}, we conclude from \eqref{5.47} that \begin{align} \label{5.48} \begin{aligned} & \left\| \nabla u\right\|_{L^{2}\left( \Omega\right) }^{2} + \left\| \gradg v\right\|_{L^{2}\left( \Gamma\right) }^{2} + \frac{a_{F'}}{2} \norm{u}_{L^p(\Omega)}^p + \frac{a_{G'}}{2} \norm{v}_{L^q(\Gamma)}^q \le C . \end{aligned} \end{align} This eventually yields $\left\| ( u,v)\right\|_{\HH^1}\leq C$. From the growth conditions in \eqref{ass:pot} we infer $\norm{F'(u)}_{L^2(\Omega)} \le C$ and $\norm{G'(v)}_{L^2(\Gamma)} \le C$. Hence, we can apply regularity theory for elliptic problems with bulk-surface coupling (see \cite[Thm.~3.3]{knopf-liu}) to conclude that $\norm{(u,v)}_{\HH^2} \le C$, which completes the proof. \end{proof} \subsubsection{Existence of a global attractor}\label{subsec:att} We first prove the following asymptotic compactness property by exploiting the smoothing estimate \eqref{SMOOTH:KLLM}. \begin{lemma}[Asymptotic compactness]\label{lm.asympcompact} Suppose that the assumptions \eqref{ass:dom}-\eqref{ass:pot} are satisfied, and let $B$ be a bounded subset of $ \Wm$. Then for any sequences $\left\{ (u_k,v_k) \right\}_{k\in\N}\subset B$ and $\{t_k\}_{k\in\N} \subset \RP$ with $t_k\to\infty$ as $k\to\infty$, the sequence $\left\{ S_{m}^{L}\left( t_k\right) (u_k,v_k) \right\}_{k\in\N}$ has a strongly convergent subsequence in $ \Wmt$. \end{lemma} \begin{proof} We first obtain from the smoothing property \eqref{SMOOTH:KLLM} that for all $k\in\N$ with $t_k\geq 1$, \begin{align*} \left\| S_{m}^{L}\left( t_k\right)(u_k,v_k) \right\| _{\HH^3}\leq C_* \left(\dfrac{t_k+1}{t_k} \right)^{1/2}\leq \sqrt{2}\, C_* . \end{align*} Recall that the constant $ C_* $ from \eqref{SMOOTH:KLLM} does not depend on $ t_k $. Hence, there exists $(u_*,v_*) \in \HH^3$ such that $S_{m}^{L}\left( t_k\right)(u_k,v_k)$ converges to $(u_*,v_*)$ weakly in $\HH^3$ as $k\to\infty$, up to extraction of a subsequence. As $\HH^3$ is compactly embedded in $\HH^2$, we further deduce that $S_{m}^{L}\left( t_k\right)(u_k,v_k)$ converges to $(u_*,v_*)$ strongly in $\HH^2$. Moreover, since $S_{m}^{L}\left( t_k\right)(u_k,v_k) \in \Wmt$ for all $k\in\N$, we eventually conclude that $(u_*,v_*)\in \Wmt$ which proves the claim. \end{proof} \begin{lemma}[Gradient system] \label{lm:gradient} Suppose that \eqref{ass:dom}-\eqref{ass:pot} hold. Then the energy functional $E$ that was defined in \eqref{DEF:EN} is a strict Lyapunov function for the dynamical system $(\Wm, \{S_{m}^{L}\left(t\right)\}_{t\ge 0})$. This means that the dynamical system is a so-called \emph{gradient system}. \end{lemma} \begin{proof} Let $(u^L,v^L,\mu^L,\theta^L)$ denote an arbitrary weak solution of the system \eqref{CH:INT.} on $\RP$ to the initial datum $(u_0,v_0)\in\Wm$ in the sense of Theorem~\ref{THM:WP:KLLM}. In particular, this means that $\big(u^L(t),v^L(t)\big) = S_m^L(t)(u_0,v_0)$ for all $t\ge 0$. Interpreting $(u^L,v^L,\mu^L,\theta^L)$ as a weak solution starting at any time $s\ge 0$ (instead of zero), the energy inequality \eqref{ENERGY:KLLM} yields that for almost all $t\in\RP$ with $t\ge s$, \begin{align} \label{5.29} \begin{aligned} &E\big( u^{L} (t),v^{L} (t) \big) \\ & \;\; + \frac{1}{2} \int_{s}^{t} \bignorm{\nabla \mu^{L}(\tau)}_{L^2(\Omega)}^{2} + \bignorm{\gradg \theta^{L}(\tau)}_{L^2(\Gamma)}^{2} +\frac{1}{L} \bignorm{ \beta\theta^{L}(\tau)-\mu^{L}(\tau) }_{L^2(\Gamma)}^{2} \dtau \\ &\leq E\left( u^{L}(s),v^{L}(s) \right). \end{aligned} \end{align This implies that $E$ is nonincreasing along weak solutions of the system \eqref{CH:INT.}. Hence, the energy functional $E$ is a Lyapunov function for the dynamical system $\{S_{m}^{L}\left(t\right)\}_{t\ge 0}$. To prove that the Lyapunov function $E$ is actually strict, we assume that there exists a weak solution $(u^L,v^L,\mu^L,\theta^L)$ as well as $s,t\in\RP$ with $s<t$ such that $(u^L,v^L) \notin \mathcal N_m$ and \begin{equation*} E \left(u ^{L}(t),v^{L}(t) \right) = E \left(u ^{L}(s),v^{L}(s) \right) . \end{equation* Since, $E$ is nonincreasing along weak solutions, this directly implies that $E(u^L(\cdot),v^L(\cdot))$ is constant on the time interval $[s,t]$. Thus, the inequality \eqref{5.29} entails that \begin{subequations} \label{5.30} \begin{alignat}{2} \label{5.30:1} \nabla \mu ^{L} &=0 &&\quad\text{a.e.~in }\Omega\times[s,t] , \\ \label{5.30:2} \gradg \theta^{L} &=0 &&\quad\text{a.e.~on }\Gamma\times[s,t] , \\ \label{5.30:3} \beta\theta^{L} &=\mu^{L} &&\quad\text{a.e.~on }\Gamma\times[s,t] . \end{alignat} \end{subequations} Plugging these relations into the weak formulations \eqref{WF:KLLM:1} and \eqref{WF:KLLM:2}, we infer that $u^L$ and $v^L$ are constant in time on $[s,t]$. It immediately follows that $\mu^L$ and $\theta^L$ are also constant on $[s,t]$, and from the uniqueness of weak solutions, we eventually conclude that $(u^L,v^L,\mu^L,\theta^L)$ is constant on the whole time interval $\RP$. This means that $(u^L,v^L)$ solves \eqref{5.34} and thus, $(u^L,v^L) \in \mathcal N_m$, which contradicts the assumptions. We have thus proven that the energy functional $E$ is strictly decreasing along non-stationary weak solutions of the system \eqref{CH:INT.} and thus, $E$ is a strict Lyapunov function for the dynamical system $(\Wm , \{S_{m}^{L}\left(t\right)\}_{t\ge 0} ) $. \end{proof} To prove the existence of a global attractor which is bounded in $\WW_{\beta,m}^3$, we first recall the following definitions. \begin{definition} [Global attractor, cf. {\cite[Def.~7.2.1.]{chueshov}}] \label{def:att} Let $\left( X,d\right)$ be a metric space and let $\left\{ S(t) \right\} _{t\geq 0}$ be a semigroup on $X$. A set $\mathcal{A}\subset X$ is called a global attractor for the dynamical system $(X,\{S(t)\} _{t\geq 0})$, if \begin{enumerate}[label=$(\mathrm{\roman*})$, ref = $\mathrm{\roman*}$] \item $\mathcal{A}$ is a compact subset of $X$, \item $\mathcal{A}$ is invariant, i.e. $S(t) \mathcal{A} \mathcal{A}$ for all $t\ge 0$, \item $\underset{t\rightarrow \infty }{\lim }\dist_{X}(S(t) B,\mathcal{A}) =0$ for every bounded set $B\subset X$. \end{enumerate} \end{definition} In particular, it follows directly from this definition that a global attractor is always unique. \medskip \begin{definition}[Unstable manifold, cf. {\cite[Def.~7.5.1.]{chueshov}}] \label{DEF:UM} Let $\mathcal{N}$ be the set of stationary points of the dynamical system $ \left(X, \{S(t)\}_{t\ge 0} \right) $. We define the unstable manifold $\mathcal{M}_\mathrm{u}\left( \mathcal{N}\right) $ emanating from the set $\mathcal{N}$ as the set of all $y\in X$ such that there exists a full trajectory $\gamma =\{u(t):t\in \R\}$ where $u$ satisfies the propertie \[ u(0)=y\text{ and }\lim_{t\rightarrow -\infty }\dist_{X}(u(t),\mathcal{N})=0. \] \end{definition} \medskip From the results established above, we now deduce the existence of a unique global attractor. \begin{theorem}[Existence of a unique global attractor] \label{thm.glbatt} Suppose that the assumptions \eqref{ass:dom}-\eqref{ass:pot} are satisfied. Then, the semigroup $\left\{ S_{m}^{L}(t) \right\} _{t\geq 0}$ generated by the weak solutions of the problem \eqref{CH:INT.} possesses a unique global attractor ${\mathcal{A}}_{m}^{L} \subset \Wm$, and it holds that \begin{align} \label{EQ:UNST} \mathcal{A}_{m}^{L}=\mathcal{M}^{L}_\mathrm{u}\left( \mathcal{N}_{m}\right). \end{align} Moreover, the global attractor ${\mathcal{A}}_{m}^{L}$ is a bounded subset of $\WW_{\beta,m}^3$. \end{theorem} \begin{proof} Due to Lemma~\ref{LM.boundedstat}, Lemma~\ref{lm.asympcompact} and Lemma~\ref{lm:gradient}, the existence of a unique global attractor ${\mathcal{A}}_{m}^{L} \subset \Wm$ to the dynamical system $(\Wm,S_{m}^{L}\left(t\right)) $ which can be expressed as $\mathcal{A}_{m}^{L}=\mathcal{M}^{L}_\mathrm{u}\left( \mathcal{N}_{m}\right) $ follows directly from \cite[Cor.~7.5.7]{chueshov}. The fact that $\mathcal{A}_{m}^{L}$ is bounded in $\HH^3$ is a direct consequence of the invariance property in Definition~\ref{def:att}(ii) and the smoothing property \eqref{SMOOTH:KLLM}. \end{proof} \subsubsection{Convergence to stationary points}\label{subsec:convstatpoints} The invariance property of the global attractor ensures that for any $ (u_0,v_0) \in \mathcal A_m^L $, the corresponding weak solution $(u^L,v^L,\mu^L,\theta^L)$ exists on $\R$ and it holds that \begin{align*} (u_0,v_0) \in \left\{ (u^{L}(t),v^{L}(t)) \,\big\vert\, t\in\R \right\} \subset \mathcal A_m^L. \end{align*} A detailed proof can be found, e.g., in \cite[Lem.~6.1]{chueshov-2}. In particular, due to Proposition~\ref{PROP:CD:KLLM}(b), this weak solution satisfies $(u^L,v^L)\in C(\R;\HH^2)$. This allows the following definition: \begin{definition}[$\omega$-limit set and $\alpha$-limit set] \label{DEF:LIMSET} For any initial datum $ (u_{0},v_{0}) \in \Wm\,$, let $(u^L,v^L,\mu^L,\theta^L)$ denote the corresponding weak solution of the system \eqref{CH:INT.}. We define the set \begin{align*} &\omega^{L} \left( u_{0} ,v_0\right) := \left\{ (u_*,v_*) \in \mathcal{A}_{m}^{L} \; \middle| \; \begin{aligned} & \text{$\exists \{t_k\}_{k\in\N} \subset \RP$ with $t_k\to \infty$ such that} \\ & \text{$S^{L}_{m}\left( t_{k}\right)(u_{0},v_0) \to (u_*,v_*)$ in $\Wmt$}\\ \end{aligned} \right\}, \end{align*} which is called the \emph{$\omega $-limit set} of $(u_{0},v_0)$. If $ (u_{0},v_{0}) \in \mathcal A^L_m$, we further define \begin{align*} &\alpha^{L} \left( u_{0} ,v_0\right) := \left\{ (u_*,v_*) \in \mathcal{A}_{m}^{L} \; \middle| \; \begin{aligned} & \text{$\exists \{t_k\}_{k\in\N} \subset \R$ with $t_k\to -\infty$ such that} \\ & \text{$\big(u^L(t_k),v^L(t_k)\big) \to (u_*,v_*)$ in $\Wmt$}\\ \end{aligned} \right\}, \end{align*} which is referred to as the \emph{$\alpha $-limit set} of $(u_{0},v_0)$. \end{definition} \pagebreak[2] For our purposes, the following properties will be essential. \begin{lemma}[Properties of the limit sets] \label{LEM:LIMSET} The limit sets have the following properties: \begin{enumerate}[label=$(\mathrm{\alph*})$, ref = $\mathrm{\alph*}$] \item For any $ (u_{0},v_{0}) \in \Wm\,$, the set $\omega^{L} \left( u_{0} ,v_0\right)$ is nonempty, compact in $\Wmt$, and invariant in the sense of Definition~\ref{def:att}(ii). Moreover, it holds that \begin{align} \label{LIM:OM} \lim_{t \to \infty} \dist_{\HH^2} \big(S^{L}_{m}(t)(u_{0},v_{0}),\omega^L(u_0,v_0)\big) =0, \quad \omega^{L} (u_{0},v_0) \subset \mathcal N_m \subset \Wmt. \end{align} \item For any $ (u_{0},v_{0}) \in \mathcal A^L_m\,$, the set $\alpha^{L} \left( u_{0} ,v_0\right)$ is nonempty, compact in $\Wmt$, and invariant in the sense of Definition~\ref{def:att}(ii). Moreover, it holds that \begin{align} \label{LIM:AL} \lim_{t \to -\infty} \dist_{\HH^2} \big(S^{L}_{m}(t)(u_{0},v_{0}),\alpha^L(u_0,v_0)\big) =0, \quad \alpha^{L} (u_{0},v_0) \subset \mathcal N_m \subset \Wmt. \end{align} \end{enumerate} \end{lemma} \begin{proof} The assertions in (a) follow directly from \cite[Thm.~4.3.3]{henry} and \cite[Thm.~9.2.7]{cazenave} thanks to the asymptotic compactness result established in Lemma~\ref{lm.asympcompact}. It is well-known that the $\alpha$-limit set can be expressed as \begin{align*} \alpha^L(u_0,v_0) = \bigcap_{n\in\N} \overline{\phantom{\Big|}\big\{ \big(u^L(t),v^L(t)\big) \;\big\vert\; t \le -n \big\}}^{\HH^2}, \end{align*} see, e.g., \cite[Eq.~(7.1.4)]{chueshov}. As the intersection of closed sets is also closed, we infer that $\alpha^L(u_0,v_0)$ is a closed subset of $\mathcal A^L_m$. Hence, since $\mathcal A^L_m$ is compact in $\Wmt$ so is $\alpha^L(u_0,v_0)$. Recalling Definition~\ref{DEF:UM}, the assertion \eqref{LIM:AL} follows directly from Theorem~\ref{thm.glbatt} since $\mathcal{A}_{m}^{L}=\mathcal{M}^{L}_\mathrm{u}\left( \mathcal{N}_{m}\right) $. This proves (b) and thus, the proof is complete. \end{proof} We will now show that for every $ (u_{0},v_{0}) \in \Wm\,$, the corresponding state $(u^L(t),v^L(t))=S_m^L(t)(u_0,v_0)$ converges to one single stationary point $(u_\infty,v_\infty) \in \mathcal N_m$ as $ t \rightarrow \infty $. In addtion, we will prove that for every $ (u_{0},v_{0}) \in \mathcal A_m^L\,$, the pair $(u^L(t),v^L(t))$ converges to a single stationary point $(u_{-\infty},v_{-\infty}) \in \mathcal N_m$ as $ t \rightarrow -\infty $. Arguing as in \cite[Prop.~6.6]{CFP} we next establish a \L ojasiewicz--Simon type inequality. Here, we restrict ourselves to dealing only with the case $m=0$. To see that this is not really a restriction, we introduce the constant $M:= m/(\beta\abs{\Omega}+\abs{\Gamma})$. If now $ (u^L,v^L,\mu^L,\theta^L)$ is a weak solution of the system \eqref{CH:INT.} with $(u^L(t),v^L(t)) \in \Wm$ for all $t\ge 0$, then the shifted quadruplet $$ (u^L_M,v^L_M,\mu^L_M,\theta^L_M) := (u^L - M,v^L - M,\mu^L,\theta^L)$$ is in fact a weak solution of the problem \eqref{CH:INT.} written for the modified potentials $F_M := F(\,\cdot\, + M)$ and $G_M := G(\,\cdot\, + M)$ instead of $F$ and $G$. By construction, this solution satisfies $(u_M^L(t),v_M^L(t)) \in \WW_{\beta,0}^1$ for all $t\ge 0$. Therefore, the choice $m=0$ does not mean any loss of generality. \begin{lemma}[\L ojasiewicz--Simon inequality] \label{LM.lojasiecwicz} Suppose that \eqref{ass:ana} holds, and that $ (u_*,v_*) \in \Wot$ is a critical point of the functional $E\vert_{\Wo} $. Then, there exist constants $ \gamma \in \left( 0, \frac{1}{2}\right] $ and $ C, \sigma>0 $ depending only on $L$, $\beta$, $\Omega$ and $(u_*,v_*)$ such that for all $ (u,v) \in \Wot$ with $ \norm{ (u,v)- (u_{*},v_{*})}_{\Wo}<\sigma $, the \L ojasiewicz--Simon inequality \begin{align} \label{lojasiecwicz} \abs{E(u,v)-E(u_{*},v_{*})}^{1-\gamma}\leq C\norm{E^{\prime}(u,v)}_{(\Wo)'} \end{align} is satisfied. \end{lemma} \textbf{Comment.} According to Lemma~\ref{LM:crtclpnt}, any critical point $ (u_*,v_*) \in \Wo$ of the energy $E$ is actually a stationary point, i.e., the regularity $(u_*,v_*) \in \mathcal N_0 \subset \Wot$ holds automatically. \begin{proof} To prove the lemma, we will show that the abstract result in \cite[Cor.~3.11]{Chill} can be applied. In the following, we consider the restriction of the energy functional to the linear subspace $\Wo$ of $\VV^1$, and we write $\bar E:= E\vert_{\Wo}$, $\bar E':= E'\vert_{\Wo}$ and $\bar E'':= E''\vert_{\Wo}$. We first notice that Sobolev's embedding theorem yields $ \Wot \subset \mathcal{L}^{\infty}$. Hence, the restriction of $ \bar E^{\prime} $ to $ \Wot $ is analytic with values in $ \mathcal{L}^{2}$. For more a more detailed reasoning in a similar situation we refer to \cite[Cor.~4.6]{Chill}. For arbitrary $(u,v)\in\Wot$, we regard the second-order Fr\'echet derivative $ \bar E''$ as the linearization of $ \bar E'$ which means \begin{align*} \bar E'' (u,v): \Wo \to (\Wo)', \quad (\zeta_1,\eta_1) \mapsto \bar E'' (u,v)(\zeta_1,\eta_1). \end{align*} In view of \eqref{scndFrec.der}, $ \bar E''(u,v)$ can be interpreted as a continuous, symmetric, elliptic differential operator associated with the bilinear form \begin{align*} &\left\langle \bar E^{\prime \prime}(u,v)(\zeta_{1},\eta_{1}) ,(\zeta_{2},\eta_{2}) \right\rangle_{\Wo} \\ &\quad =\intO \nabla \zeta_{1} \cdot \nabla \zeta_{2} + F^{\prime \prime}(u) \zeta_{1} \zeta_{2}\dx + \intG \gradg \eta_{1} \cdot \gradg \eta_{2} + G^{\prime \prime}(v) \eta_{1} \eta_{2}\dG, \quad (\zeta_1,\eta_1), (\zeta_2,\eta_2) \in \Wo, \end{align*} which results from \eqref{scndFrec.der}. We further interpret the restriction of $\bar E'' (u,v)$ to $\Wot$ as \begin{align*} \bar E'' (u,v)\vert_{\Wot}: \Wot \to \LL^2, \quad (\zeta_1,\eta_1) \mapsto \bar E''(u,v)(\zeta_1,\eta_1). \end{align*} Invoking the Lax--Milgram theorem, we deduce that the operator $ \bar E^{\prime \prime}(u,v) $ has a nontrivial resolvent set. In particular, there exists at least one $\lambda > 0$ such that the linear map \begin{align*} \big( \bar E^{\prime \prime}(u,v) + \lambda \text{id}\big)^{-1}: (\Wo)' \to (\Wo)' \end{align*} is well-defined. As the embedding $ \Wo \hookrightarrow (\Wo)'$ is compact, we conclude that this linear operator is compact. By regularity theory for elliptic problems with bulk-surface coupling (see \cite[Thm.~3.3]{knopf-liu}), we conclude that the kernel $ \text{Ker}\, \bar E^{\prime \prime}(u,v)$ belongs to $\Wot$. We further recall that the embedding $\Wot\emb \LL^2$ is compact. Now, proceeding as in \cite[Sect.~6.2,\,Thm.~4]{evans}, the Fredholm alternative implies that the kernel $ \text{Ker}\, \bar E^{\prime \prime}(u,v) $ is finite dimensional, and that the ranges $ \text{Rg}\, \bar E^{\prime \prime}(u,v) $ and $ \text{Rg}\, \bar E^{\prime \prime}(u,v)\big|\Index[-1pt]{\Wot} $ are closed in $ (\Wo)' $ and $ \mathcal{L}^{2} $, respectively. Furthermore, $ (\Wo)' $ can be expressed as the orthogonal sum of $ \text{Ker}\, \bar E^{\prime \prime}(u,v) $ and $ \text{Rg}\, \bar E^{\prime \prime}(u,v) $, whereas $ \mathcal{L}^{2} $ can be expressed as the orthogonal sum of $ \text{Ker}\, \bar E^{\prime \prime}(u,v) $ and $ \text{Rg}\, \bar E^{\prime \prime}(u,v)\big|\Index[-1pt]{\Wot} $. In particular, we can define a continuous orthogonal projection $ P:\Wo \rightarrow \Wo $ with $ \text{Rg}\, P=\text{Ker}\, \bar E^{\prime \prime}(u,v) $. Given these considerations, we can conclude the proof by applying the results in \cite[Cor.~3.11]{Chill} with $ X= \Wot$, $V=\Wo$, $ Y=\mathcal{L}^{2} $, and $ W= (\Wo)'$. \end{proof} \begin{theorem}[Convergence to a single stationary point as $t\to\infty$] \label{Theorem:omega} Suppose that the assumptions \eqref{ass:dom}--\eqref{ass:ana} are satisfied. Then, for any $ (u_{0},v_{0}) \in \Wm $ there exists a unique stationary point $ (u_{\infty},v_{\infty}) \in \mathcal{N}_m $ such that \begin{align} \label{CONV:OMEGA} \lim_{t \to\infty} \bignorm{S_m^{L}(t)(u_{0},v_{0}) - (u_{\infty},v_{\infty}) }_{\HH^2} =0. \end{align} In particular, this means that $\omega^L(u_0,v_0) = \{(u_{\infty},v_{\infty})\} \subset \mathcal N_m$. \end{theorem} \begin{proof} As discussed above, it suffices to handle the case $m=0$. Let $(u_0,v_0)\in \Wo$ be arbitrary, and let $(u^L,v^L,\mu^L,\theta^L)$ denote the corresponding weak solution of the system \eqref{CH:INT.}. To prove the existence of a unique limit $(u_\infty,v_\infty) \in \mathcal N_0$, it suffices to show that the $ \omega $-limit set of $ (u_{0},v_{0}) $ consists of one single point. Since $E$ is bounded from below and decreasing along weak solutions, we know that the limit \begin{align*} E_{\infty}:=\lim_{t \rightarrow \infty} E(u^{L}(t), v^{L}(t)) \end{align*} exists. Hence, recalling the definition of $\omega^L(u_0,v_0)$, we infer that \begin{align} \label{E_INF} E(u_*,v_*) = E_{\infty}\quad \text{for all}\; (u_*,v_*)\in \omega^{L}(u_{0},v_{0}). \end{align} Since $ E $ is nonincreasing along weak solutions, it holds that $ E(u^{L}(t), v^{L}(t))\geq E_{\infty}$ for all $ t\geq0 $. If there exists a time $ t_{*}\ge 0 $ such that $ E(u^{L}(t_{*}),v^{L}(t_{*}))= E_{\infty}$, then the existence of a unique limit $(u_\infty,v_\infty) \in \mathcal N_m$ is a direct consequence of Lemma~\ref{lm:gradient}. In particular, we have \begin{align*} \big(u_0,v_0\big) = \big(u^L(t),v^L(t)\big) = \big(u^L(t_*),v^L(t_*)\big) = \big(u_\infty,v_\infty\big) \end{align*} for all $t\ge 0$. In the following, we will thus assume that $ E(u^{L}(t),v^{L}(t))> E_{\infty}$ for all $ t\geq 0 $. From Lemma~\ref{LM.lojasiecwicz} we infer that for every critical point $ (u_*,v_*)\in \Wot $ of $E$ there exist constants $ \gamma(u_*,v_*) \in \left( 0, \frac{1}{2}\right] $ and $ C(u_*,v_*)$, $\sigma(u_*,v_*)>0 $ such that the the \L ojasiewicz--Simon inequality \eqref{lojasiecwicz} holds for all \begin{align*} (u,v) \in B_{\sigma(u_*,v_*)}(u_*,v_*) = \Big\{ (u,v) \in \Wot \,:\, \norm{(u,v) - (u_*,v_*)}_{\Wot} < \sigma(u_*,v_*) \Big\}. \end{align*} Obviously, the set $\omega^L(u_0,v_0)$ is covered by the union of all open balls $B_{\sigma(u_*,v_*)}(u_*,v_*)$ with $(u_*,v_*)\in \omega^L(u_0,v_0)$. Since $\omega^L(u_0,v_0)$ is compact in $\Wot$, we can select finitely many points $(u_n,v_n) \in \omega^L(u_0,v_0)$, $n=1,...,N$ such that \begin{align*} \omega^L(u_0,v_0) \subset \left(\,\bigcup_{n=1}^{N} B_{\sigma(u_n,v_n)}(u_n,v_n) \right) =: \mathcal U. \end{align*} Recalling \eqref{E_INF} and arguing as in \cite[Theorem 2.3]{CFP}, we can now find constants $\gamma\in(0,\frac 12]$ and $ C > 0 $ depending only on $L$, $\beta$ and $\Omega$ and $(u_0,v_0)$ but not on $n$ or $N$ such that for all $(u,v) \in \cal U $, \begin{align} \label{lojasiecwicz2} \abs{E(u,v)-E_{\infty}}^{1-\gamma} \leq C\norm{E^{\prime}(u,v)}_{(\Wo)'}\;. \end{align} We point out that $\gamma < \frac 12$ can be assumed without loss of generality. Since $\mathcal U$ is an open subset of $\Wot$, and $\omega^L(u_0,v_0) \subset \mathcal U$, there exists a time $t_0\ge 1$ such that $\big(u^L(t),v^L(t)\big) \subset \mathcal U$ for all $t\ge t_0$. In particular, this means that $\big(u^L(t),v^L(t)\big)$ satisfies the inequality \eqref{lojasiecwicz2} for all $t\ge t_0$. Let now $s\ge t_0$ be arbitrary, and without loss of generality we assume that $\mu^L$ and $\theta^L$ can be evaluated at the time $s$ with $\big(\mu^L(s),\theta^L(s)\big)\in \HH^1$. Now, applying integration by parts on \eqref{frstFrec.der}, we obtain \begin{align}\label{eq1} \left\langle E^{\prime}\big(u^L(s),v^L(s)\big) ,(\zeta,\xi) \right\rangle_{\Wo} =\intO \mu^L(s)\, \zeta\dx +\intG \theta^L(s)\, \xi \dG \end{align} for all $ (\zeta,\xi) \in \Wo $. We now define \begin{align*} c := \frac{\beta\int_\Omega \mu^L(s) \dx + \int_\Gamma \theta^L(s) \dG} {\beta^2\abs{\Omega} + \abs{\Gamma}}, \quad \bar\mu := \mu^L(s) - \beta c, \quad \bar\theta := \theta^L(s) - c, \end{align*} meaning that $(\bar\mu(s),\bar\theta(s))\in\Wo$. For any $(\zeta,\xi) \in \Wo $, we thus obtain \begin{align}\label{eq2} \intO \mu^L(s)\, \zeta\dx + \intG \theta^L(s)\, \xi \dG = \intO \bar\mu \zeta\dx + \intG \bar\theta \xi \dG. \end{align} Applying the bulk-surface Poincar\'e type inequality presented in \cite[Lem.~7.1]{knopf-liu} (with $K:=L$ and $\alpha:=\beta$), we conclude that \begin{align}\label{ineq1} \bignorm{E^{\prime}\big(u^L(s),v^L(s)\big)}_{(\Wo)'} \le \norm{(\bar\mu,\bar\theta)}_{\LL^2} \le c_P \norm{(\bar\mu,\bar\theta)}_{L,\beta} = c_P \bignorm{\big(\mu^L(s),\theta^L(s)\big)}_{L,\beta}\;, \end{align} where the constant $c_P>0$ depends only on $L$, $\beta$ and $\Omega$. Recalling that $(u,v)\in C([1,\infty);\HH^2)$ and interpreting $(u^L,v^L,\mu^L,\theta^L)$ as a weak solution starting at time $s$ (instead of zero), the energy inequality \eqref{ENERGY:KLLM} yields that \eqref{5.29} holds for all $t\in\RP$ with $t\ge s$. As the right-hand side of this inequality does not depend on $t$, we may pass to the limit $t\to \infty$ on the left-hand side, which gives \begin{align} \label{EST:EN} \dfrac{1}{2}\int_{s}^{\infty} \bignorm{\big(\mu^L(\tau),\theta^L(\tau)\big)}_{L,\beta}^2 \dtau \leq E(u^{L}(s),v^{L}(s))-E_{\infty}. \end{align} Hence, combining \eqref{lojasiecwicz2}, \eqref{ineq1} and \eqref{EST:EN}, we infer that \begin{align*} \int_{s}^{\infty} \bignorm{\big(\mu^L(\tau),\theta^L(\tau)\big)}_{L,\beta}^2 \dtau \leq C \bignorm{\big(\mu^L(s),\theta^L(s)\big)}_{L,\beta}^{1/(1-\gamma)} \end{align*} for some constant $C\ge 0$ depending only on $L$, $\beta$ and $\Omega$, and almost all $s \ge t_0$. We recall that $\gamma<\frac 12$ was assumed without loss of generality. As the expression on the left hand side can also be bounded by a constant via the energy inequality \eqref{ENERGY:KLLM}, we invoke \cite[Lem.~7.1]{FS} to deduce that \begin{align*} \nabla\mu^{L}\in L^{1}(t_{0},\infty;L^{2}(\Omega)), \text{ \ } \nabla\theta^{L}\in L^{1}(t_{0},\infty;L^{2}(\Gamma)),\text{ \ } \beta\theta^{L}-\mu^{L}\in L^{1}(t_{0},\infty;L^{2}(\Gamma)). \end{align*} (Alternatively, one could also argue as in \cite[Proof of Thm.~2.3]{CFP} to obtain the same result.) Recalling the weak formulations \eqref{WF:KLLM:1} and \eqref{WF:KLLM:2}, we further obtain $(\delt u^L, \delt v^L) \in L^{1}\big(t_{0},\infty;\HH_\beta^{-1}\big)$. Consequently, for any $t_0<t_1<t_2$, we have \begin{align*} \bignorm{\big(u^L(t_2),v^L(t_2)\big) - \big(u^L(t_1),v^L(t_1)\big)}_{L,\beta,*} \le \int_{t_1}^{t_2} \bignorm{\big(\delt u^L(\tau),\delt v^L(\tau)\big)}_{L,\beta,*} \dtau\;, \end{align*} and the right-hand side converges to zero as $t_2>t_1\to \infty$. Using the interpolation inequalities from Lemma~\ref{LEM:INT:2} and Corollary~\ref{COR:INT} along with the smoothing property \eqref{SMOOTH:KLLM}, we conclude that \begin{align*} &\bignorm{\big(u^L(t_2),v^L(t_2)\big) - \big(u^L(t_1),v^L(t_1)\big)}_{\HH^2} \\ &\quad\le C\left(\frac{t+1}{t}\right)^{\frac 38}\bignorm{\big(u^L(t_2),v^L(t_2)\big) - \big(u^L(t_1),v^L(t_1)\big)}_{L,\beta,*}^{\frac 14} \\ &\quad\longrightarrow 0, \quad \text{as $t_2>t_1\to\infty$}. \end{align*} Invoking the Cauchy criterion, this implies the existence of a unique limit $(u_{\infty},v_{\infty}) \in \Wot$ such that the convergence assertion \eqref{CONV:OMEGA} is satisfied. In particular, it holds that $(u_{\infty},v_{\infty}) \in \omega^L(u_0,v_0) \subset \mathcal N_0$ which completes the proof. \end{proof} \medskip We will now see that solutions starting in $\mathcal A^L_m$ converge to a stationary point also for $t\to -\infty$. \begin{theorem}[Convergence to a single stationary point as $t\to -\infty$] \label{Theorem:alpha} Suppose that the assumptions \eqref{ass:dom}-\eqref{ass:ana} hold. Then, for any $ (u_{0},v_{0}) \in \mathcal A_{m}^{L} $, the corresponding state $(u^{L}(t),v^{L}(t))$ exists for all $t\in\R$, and there exists a unique stationary point $ (u_{-\infty},v_{-\infty}) \in \mathcal{N}_{m} $ such that \begin{align} \label{CONV:ALPHA} \lim_{t \to -\infty} \norm{\big(u^{L}(t),v^{L}(t)\big) - (u_{-\infty},v_{-\infty})}_{\HH^2} = 0. \end{align} In particular, this means that $\alpha^L(u_0,v_0) = \{(u_{-\infty},v_{-\infty})\} \subset \mathcal N_m$. \end{theorem} \begin{proof} As in the proof of Theorem~\ref{Theorem:omega}, it suffices to address the case $m=0$. Let $(u_{0},v_{0}) \in \mathcal A_0^L$ be arbitrary, and let $(u^L,v^L,\mu^L,\theta^L)$ denote the corresponding weak solution of the system \eqref{CH:INT.}. We recall that the state $\big(u^L(t),v^L(t) \big)$ associated with $ (u_{0},v_{0}) $ exists for all times $t\in \R$ and lies in $A^L_0$. According to Definition~\ref{def:att} and Theorem~\ref{thm.glbatt}, the global attractor $\mathcal A^L_0$ is a compact subset of $\Wot$. Hence, since $E$ is continuous, we know that $E(\mathcal A^L_0)\subset \R$ is compact. As $E$ is nonincreasing along weak solutions, we infer that the limit \begin{align*} E_{-\infty}:=\lim_{t \rightarrow -\infty} E(u^{L}(t),v^{L}(t)) \end{align*} exists. Recalling the definition of $\alpha^L(u_0,v_0)$, we conclude that \begin{align*} E(u_*,v_*) = E_{-\infty} \quad\text{for all $(u_*,v_*) \in \alpha^L(u_0,v_0)$}. \end{align*} Based on this, the claim of Theorem~\ref{Theorem:alpha} can be established by proceeding analogously to the proof of Theorem~\ref{Theorem:omega}. \end{proof} As a consequence, we obtain the following result which provides further information of the geometric structure of the global attractor. \begin{corollary} \label{gradient-like} Under the assumptions \eqref{ass:dom}-\eqref{ass:ana}, the global attractor $ {\cal{A}}_{m}^{L} $ of the dynamical system $ (\Wm, S_{m}^{L}(t)) $ can be defined as the union of the unstable manifolds of all stationary points, i.e., \begin{align} \label{ATT:KLLM} {\cal{A}}_{m}^{L}=\underset{(u_*,v_*) \in \mathcal{N}_{m}}{\bigcup}\mathcal{M}^L_\text{u}\big(\{(u_*,v_*)\}\big). \end{align} \end{corollary} The assertion follows directly from Theorem~\ref{Theorem:alpha} and Definition~\ref{DEF:UM}. \medskip \begin{remark} \normalfont If the set of stationary points were finite, Corollary~\ref{gradient-like} could also be established without the \L ojasiewicz--Simon inequality. However, as the set of stationary points is usually infinite, we would merely get ${\cal{A}}_{m}^{L}=\mathcal{M}^L_\text{u}( \mathcal{N}_{m})$ (see \eqref{EQ:UNST}) instead of \eqref{ATT:KLLM} if we disregard the \L ojasiewicz--Simon inequality. \end{remark} \subsection{Long-time dynamics of the GMS model}\label{LT:GMS} Based on a result from \cite{PZ} on closed semigroups, the existence of a global attractor in the ``finite-energy phase space'' has already been established for the GMS model ($L=0$) in \cite[Cor.~3.11]{GMS}. However, it is also possible to obtain the existence of a global attractor for the dynamical system $ \big( \Wm,S_{m}^{0}(t) \big) $ by using the same arguments as in Section~\ref{sec:long-time}. It is worth mentioning that the GMS model has the same set of stationary points $ \mathcal{N}_{m} $ as the KLLM model. Hence, we already know from Subsection~\ref{sec:stat} that the stationary point set of the GMS model is nonempty and bounded in $ \Wm $. The smoothing property \eqref{SMOOTH:GMS} implies the asymptotic compactness of the dynamical system $ \big( \Wm,S_{m}^{0}(t) \big) $, meaning that an analogue of Lemma~\ref{lm.asympcompact} can be established. Furthermore, it can be shown that the energy functional $E$ is a strict Lyapunov function for the dynamical system $ \big( \Wm,S_{m}^{0}(t) \big) $ and consequently, the existence of a unique global attractor $\mathcal A_m^0$ can be proved analogously as in Subsection~\ref{subsec:att}. It was further established in \cite[Thm.~3.22]{GMS} that the $\omega$-limits set consists of one single stationary point. We point out that Theorem~\ref{Theorem:alpha} could be adapted to the case $L=0$ and thus, Corollary~\ref{gradient-like} remains true for the GMS model. \section{Stability of the global attractor for the GMS model} \label{sec:contglbatt} We intend to study the stability of the global attractor $\mathcal A^0_m$ of the GMS model ($L=0$) with respect to perturbations $\mathcal A^L_m$ with small $L>0$. At least formally, this means we have to investigate the asymptotic limit $L\to 0$ of the family $\{ \mathcal A^L_m \}_{L>0}$ of global attractors for the KLLM model. To provide a rigorous notion of such a limit, we recall the following definition which is included in \cite[Thm.~7.2.8]{chueshov}. \begin{definition}[Upper semicontinuity of global attractors] \label{DEF:USA} Let $X$ be a Banach space, and let $\Lambda$ be a metric space. Suppose that for any $\lambda \in \Lambda$, $ (X,\{S^{\lambda}(t)\}_{t\ge 0}) $ is a dynamical system possessing a global attractor $\mathcal A^\lambda \subset X$. Then, the family $ \{\mathcal A^\lambda \}_{\lambda\ge 0} $ is called \emph{upper semicontinuous at the point $ \lambda_* \in \Lambda$} if \begin{align*} \lim_{\lambda\rightarrow \lambda_* } \dist_X\big(\mathcal A^{\lambda},\mathcal A^{\lambda_*} \big) =0. \end{align*} \end{definition} To prove that the family $ \{ \mathcal A_{m}^L\}_{L\ge 0} $ is upper semicontinuous at $L=0$, we need to know how a weak solution $(u^L,v^L,\mu^L,\theta^L)$ to the KLLM model behaves in the asymptotic limit $L\to 0$. \begin{lemma}[The asymptotic limit $L \to 0$] \label{LEM:CONV:GMS} Suppose that \eqref{ass:dom}--\eqref{ass:pot} hold, let $L>0$ and $m\in\R$ be arbitrary, and let $(u_0,v_0) \in \Wm$ be any initial datum. Let $(u^L,v^L,\mu^L,\theta^L)$ denote the corresponding unique weak solution to the KLLM model, and let $(u^0,v^0,\mu^0,\theta^0)$ denote the corresponding weak solution of the GMS model. Then, for any $T_*>0$, it holds that \begin{align}\label{CONV:GMS} (u^L,v^L) \to (u^0,v^0) \quad \text{strongly in $C([0,T_*];\LL^2) $ as $L\to 0$}. \end{align} Moreover, there exist constants $A,B>0$ depending (monotonically increasingly) on $\norm{(u_0,v_0)}_{\HH^1}$ but not on $L$ such that for all $L>0$, \begin{align}\label{cnvrg.rateLW} \bignorm{(u^L,v^L) - (u^0,v^0)}_{C([1,T_*];\LL^2)} \leq A e^{BT_*}\, L^{\frac 14}. \end{align} \end{lemma} \begin{proof} The convergence \eqref{CONV:GMS} has already been established in \cite[Thm.~4.1]{KLLM}. Moreover, is was also shown that there exists a positive constant $c(T_*)$ depending (monotonically increasingly) on $\norm{(u_0,v_0)}_{\HH^1}$ and $T_*$ but not on $L$ such that for all $L>0$, \begin{align*} \bignorm{(u^L,v^L) - (u^0,v^0)}_{C([1,T_*];\LL^2)} \leq c(T_*)\, L^{\frac 14}. \end{align*} Studying the proof of \cite[Thm.~4.1]{KLLM} carefully, we find that the constant $c(T_*)$ depends (at most) exponentially on $T_*$. This results from the application of Gronwall's lemma. We can thus find constants $A,B>0$ independent of $L$ such that $c(T_*) = A e^{BT_*}$. Thus, the proof is complete. \end{proof} By means of the smoothing properties \eqref{SMOOTH:KLLM} and \eqref{SMOOTH:GMS}, we can further generalize this convergence result to higher order norms. \begin{corollary}[Convergence rates for the limit $L\to 0$] \label{COR:CONV:GMS} Suppose that \eqref{ass:dom}--\eqref{ass:pot} hold, let $L>0$ and $m\in\R$ be arbitrary, and let $(u_0,v_0) \in \Wm$ be any initial datum. Let $(u^L,v^L,\mu^L,\theta^L)$ denote the corresponding unique weak solution to the KLLM model, and let $(u^0,v^0,\mu^0,\theta^0)$ denote the corresponding weak solution of the GMS model. Then, for any $T_*>1$, \begin{align} \label{CONV} (u^L,v^L) \to (u^0,v^0) \quad \text{strongly in $C([1,T_*];\HH^2) $ as $L\to 0$}. \end{align} Moreover, for any $T_*>1$, there exist constants $C_1(T_*),C_2(T_*)>0$ depending (monotonically increasingly) on $\norm{(u_0,v_0)}_{\HH^1}$ but not on $L$ such that \begin{align} \label{CRATE:1} \bignorm{(u^L,v^L) - (u^0,v^0)}_{C([1,T_*];\HH^1)} \leq C_1(T_*)\, L^{\frac{1}{6}},\\ \label{CRATE:2} \bignorm{(u^L,v^L) - (u^0,v^0)}_{C([1,T_*];\HH^2)} \leq C_2(T_*)\, L^{\frac{1}{12}}. \end{align} \end{corollary} \begin{proof} Let $T_*>1$ be arbitrary. We first recall that $(u^L,v^L), (u^0,v^0) \in C([1,T_*];\HH^2)$ according to Lemma~\ref{PROP:CD:KLLM} and Lemma~\ref{PROP:CD:GMS}. Using the interpolation inequality \eqref{INT:H1:ALT} from Lemma~\ref{LEM:INT:2}, and the smoothing properties \eqref{SMOOTH:KLLM} and \eqref{SMOOTH:GMS}, we deduce that \begin{align*} &\underset{t\in[1,T_*]}{\sup}\; \norm{(u^L,v^L)(t) - (u^0,v^0)(t)}_{\HH^1} \\ &\quad \le C \underset{t\in[1,T_*]}{\sup}\; \norm{(u^L,v^L)(t) - (u^0,v^0)(t)}_{\LL^2}^{\frac 23} \left[ (C_* + C_0) (1+T_*)^{\frac 12} \right]^{\frac 13}. \end{align*} Invoking the convergence rate \eqref{cnvrg.rateLW} we directly conclude \eqref{CRATE:1} from the above estimate. The estimate \eqref{CRATE:2} can be established similarly. In particular, this proves \eqref{CONV} and thus, the proof is complete. \end{proof} We now intend to establish the following stability result which is the main result of this section. Here, the term ``stability'' is to be understood as semicontinuity of the family of perturbed global attractors. \begin{theorem}[Stability of the global attractor $\mathcal A^0_m$] \label{uppercont.GMS} Suppose that the assumptions \eqref{ass:dom}-\eqref{ass:ana} hold and let $m\in\R$ be arbitrary. Then, the family of global attractors $\{ \mathcal A_{m}^{L}\} _{L\geq0} $ is upper semicontinuous at $L=0$ in the sense of Definition~\ref{DEF:USA}. \end{theorem} To prove this theorem, we will exploit the following abstract result which can be found in \cite[Thm.~7.2.8]{chueshov}. \begin{proposition}[A criterion for upper semicontinuity of global attractors] \label{PROP:CRIT} Let $X$ be a Banach space, and let $\Lambda$ be a metric space. Suppose that for any $\lambda \in \Lambda$, $ (X,\{S^{\lambda}(t)\}_{t\ge 0}) $ is a dynamical system possessing a global attractor $\mathcal A^\lambda \subset X$. We further assume that the following conditions hold \begin{enumerate}[label = $\mathrm{(\roman*)}$] \item There exists a compact set $ K \subset X$ such that $\mathcal A^\lambda \subset K $ for all $\lambda\ge 0$. \item If $(x_k)_{k\in\N} \subset X$ and $ \lambda_{k} \in \Lambda$ are sequences satisfying \begin{itemize} \item $x_k \in \mathcal A^{\lambda_k}$ for all $k\in\N$, \item $x_k \to x_*$ as $k\to\infty$, \item $\lambda_k \to \lambda_*$ as $k\to\infty$, \end{itemize} then there exists $t_*>0$ such that $ S^{\lambda_{k}}(t)x_{k} \rightarrow S^{\lambda_*}(t)x_* $ in $X$ for all $t>t_*$. \end{enumerate} Then the family $ \{\mathcal A^\lambda \}_{\lambda\ge 0} $ is upper semicontinuous at the point $ \lambda_* $. \end{proposition} \begin{proof}[Proof of Theorem~\ref{uppercont.GMS}] In order to apply Proposition~\ref{PROP:CRIT}, we need to verify the conditions (i) and (ii) imposed therein. \textit{Step 1:} To verify Condition (i), we show that there exists a compact set $\mathcal K_m \subset \Wm$ independent of $L$ such that $\mathcal A^L_m \subset \mathcal K_m$ for all $L\ge 0$. For the KLLM model ($L>0$), Lemma~\ref{LEM:LIMSET} implies that for every $(u_0,v_0)\in\Wm$, the set $\omega^L(u_0,v_0)$ is included in the set of stationary points. As discussed Subsection~\ref{LT:GMS}, the same holds true for the GMS model ($L=0$). We further recall that the set $\mathcal N_m$ is a bounded subset of $\Wmt$ which does not depend on the parameter $L$. Hence, we can choose an open, bounded set $\mathcal U \subset \HH^2$ such that for all $L\ge 0$, \begin{align*} \omega^L(u_0,v_0) \subseteq \mathcal N_m \subset \mathcal U \end{align*} for all $(u_0,v_0)\in \Wm$. Consequently, for every $L\ge 0$ and every initial datum $(u_0,v_0)\in\Wm$, there exists a time $ t^L_{(u_0,v_0)} \ge 1$ such that \begin{align}\label{pointdiss} S^L_{m}\left(t\right)(u_0,v_0)\in \mathcal U \quad \text{for all $ t\geq t^L_{(u_0,v_0)} $.} \end{align} Now, we define the set \begin{align}\label{absorb} \mathcal K_{m} := \overline{\underset{L \in[0,\infty)}{\bigcup} \; \underset{t\geq 1}{\bigcup} \; S^L_{m}\left(t\right) \mathcal U}^{\HH^1} . \end{align} Since $ \mathcal U $ is bounded in $\Wmt$ uniformly in $L\ge 0$, the smoothing property \eqref{SMOOTH:KLLM} of the KLLM model implies that $S^L_{m}\left(t\right) \mathcal U$ is bounded in $\HH^3$ uniformly in $L>0$ and $t\ge 1$. Moreover, using the smoothing property \eqref{SMOOTH:GMS} of the GMS model, we conclude that $S^{\infty}_{m}\left(t\right)\mathcal U$ is bounded in $\HH^3$ uniformly in $t\ge 1$. This entails that $ \mathcal K_{m}\subset \Wm $ is bounded in $\HH^{3}$, closed in $\HH^1$, and thus compact in $\Wm$. We further infer from \eqref{pointdiss} that $ \mathcal K_{m} $ is an \emph{absorbing set} for every semigroup $S^L_{m}(t)$ with $L\ge 0$ (i.e., for every $L\ge 0$ and every bounded set $B\subset \Wm$, there exists a time $t_B^L\ge 1$ such that $S^L_m(t)B \subset \mathcal K_{m}$ for all $t\ge t_B^L$). Recall that for all $L\ge 0$, the global attractor $A_m^L$ is a bounded subset of $\Wm$. We thus conclude that there exists a time $t^L\ge 1$ such that \begin{align*} \mathcal A_m^L = S_m^L(t^L) \mathcal A_m^L \subset \mathcal K_m \end{align*} due to the invariance property of the global attractor. This directly proves that $\mathcal A^L_m \subset \mathcal K_m$ for all $L\ge 0$. \textit{Step 2:} To verify Condition (ii) of Proposition~\ref{PROP:CRIT}, let $\{(u_k,v_k)\}_{k\in\N} \subset \Wm$ be any sequence with $(u_k,v_k) \in \mathcal A^{L_k}_m$ and $(u_k,v_k) \to (u_*,v_*)$ in $\HH^1$ as $k\to\infty$, and let $\{L_k\}_{k\in\N} \subset \RP$ be any sequence with $L_k\to 0$ as $k\to\infty$. Let now $t\ge t_*:=1$ and $\eps>0$ be arbitrary. Using the continuous dependence estimate from Lemma~\ref{PROP:CD:GMS}, we deduce that \begin{align} &\bignorm{S^{L_k}_m(t)(u_k,v_k) - S^0_m(t)(u_*,v_*)}_{\HH^1} \notag\\ &\le \bignorm{S^{L_k}_m(t)(u_k,v_k) - S^0_m(t)(u_k,v_k)}_{\HH^1} + \bignorm{S^0_m(t)(u_k,v_k) - S^0_m(t)(u_*,v_*)}_{\HH^1} \notag \\ \label{RHS} &\le \underset{(u,v)\in \mathcal{K}_{m}}{\sup} \; \bignorm{S^{L_k}_m(\cdot)(u,v) - S^0_m(\cdot)(u,v)}_{C([0,t];\HH^1)} + \Lambda_1^0(t) \bignorm{(u_k,v_k) - (u_*,v_*)}_{L,\beta,*}. \end{align} Since $L_k\to 0$ as $k\to\infty$, and since $\mathcal{K}_{m}$ is bounded, Corollary~\ref{COR:CONV:GMS} implies the existence of a number $K_1\in\N$ such that for all $k\ge K_1$, the first summand in \eqref{RHS} is smaller than $\eps/2$. Furthermore, the convergence $(u_k,v_k) \to (u_*,v_*)$ in $\HH^1$ directly implies that \begin{align*} \bignorm{(u_k,v_k) - (u_*,v_*)}_{L,\beta,*} \to 0 \quad\text{as $k\to\infty$}. \end{align*} Hence, there exists a number $K_2\in\N$ such that for all $k\ge K_2$, the second summand in \eqref{RHS} is smaller than $\eps/2$. In summary, we get \begin{align*} \bignorm{S^{L_k}_m(t)(u_k,v_k) - S^0_m(t)(u_*,v_*)}_{\HH^1} < \eps \quad \text{for all $k\ge K:=\max\{K_1,K_2\}$,} \end{align*} and since $\eps>0$ was arbitrary, this verifies Condition (ii) of Proposition~\ref{PROP:CRIT}. Eventually, Proposition~\ref{PROP:CRIT} can be applied on the family $\{\mathcal A^L_m\}_{L\ge 0}$ which proves the assertion of Theorem~\ref{uppercont.GMS}. \end{proof} \begin{remark} \label{REM:FAIL} \normalfont We point out that Proposition~\ref{PROP:CRIT} cannot be used to prove the stability of the global attractor associated with $L=\infty$. This because the semigroups associated with $L<\infty$ and the semigroup associated with $L=\infty$ would have to be defined on the same domain $X$. However, due to the different mass conservation law of the LW model, its solution operator $S^0_{(m_1,m_2)}$ would have to be defined on the linear subspace \begin{align*} \VV_{(m_1,m_2)} = \big\{ (u,v) \in \VV^1 \suchthat \mean{u}_\Omega = m_1 \;\text{and}\; \mean{v}_\Gamma = m_2\big\}. \end{align*} This entails that the only reasonable choice for $X$ in Proposition~\ref{PROP:CRIT} would be $X := \Wm \cap \VV_{(m_1,m_2)}$. Thus, $X$ is nonempty only if $m = \beta m_1 + m_2$. However, even in this case, we cannot ensure that $S^L_m X \subseteq X$ for any $L<\infty$, which means that $S^L_m$ does not define a semigroup on the space $X$. Consequently, Proposition~\ref{PROP:CRIT} is not applicable and thus, the results of Section~\ref{sec:contglbatt} cannot be transferred to the scenario $L\to\infty$. In particular, for the aforementioned reasons, we cannot find a compact set $\mathcal K_m$ which acts as an absorbing set the semigroup corresponding to $L=\infty$ but also for the semigroups associated with $L<\infty$. (Note that if $\mathcal K_m$ were a compact absorbing set, it also would have to absorb itself.) As such a set $\mathcal K_m$ will play a crucial role in the subsequent section, it is also not possible to adapt the results of Section~\ref{SEC:EXP} to the situation $L\to\infty$. \end{remark} \section{Existence of a robust family of exponential attractors} \label{SEC:EXP} In this section, for every $L\in [0,1]$, we intend to construct an exponential attractor for the dynamical system $(\WW^1_{\beta,m} , \{S^{L}_{m}\left(t\right)\}_{t\ge 0})$. We further show that the exponential attractor associated with $L=0$ is robust against perturbations $L>0$ in some certain sense. We first recall the definition of exponential attractors (see, e.g., \cite[Def.~4.1]{EMZ} in the discrete case and \cite[Def.~7.4.4]{chueshov} in the continuous case). \begin{definition}[Exponential attractors] \label{DEF:EXP:ATT} Let $ M $ be a metric space, let $I=[0,\infty)$ or $I=\N_0$, and let $ \{S(i)\}_{i\ge 0} $ be a semigroup on $M$. Then, a compact set $ {\mathfrak{M}} \subset M $ is called an exponential attractor for the dynamical system $\big(M,\{S(i)\}_{i\in I}\big)$ if the following properties hold: \begin{enumerate}[label = $\mathrm{(\roman*)}$] \item The set $ {\mathfrak{M}} $ is compact in $M$ and has finite fractal dimension, i.e., $$\dim_{\mathrm{frac},M}(\mathfrak M)<\infty.$$ \item The set $ {\mathfrak{M}} $ is forward invariant under the semigroup $ \{S(i)\}_{i\ge 0} $, i.e., $$ S(i){{\mathfrak{M}}}\subset {{\mathfrak{M}}} \quad\text{for all $i\in I$.}$$ \item The set $ {\mathfrak{M}} $ is an exponentially attracting set for the dynamical system $\big(M,\{S(i)\}_{i\in I}\big)$, i.e., for every bounded subset $ B \subset M $, there exist constants $C,a>0$ such that \begin{align*} \dist_{M} \left( S(i)B,{{\mathfrak{M}}}\right) \leq C e^{-a i} \quad \text{for all $i\in I$.} \end{align*} \end{enumerate} \end{definition} \medskip In the proof of Theorem~\ref{uppercont.GMS}, we obtained the existence of a compact absorbing set $\mathcal K_{m} $ (that does not depend on $L$) such that for all $L\ge 0$ and every bounded set $ B\subset \Wm $ there exists a time $ t_0^L(B) \ge 1$ such that \begin{align*} S_{m}^{L}(t)B \subset \mathcal K_{m} \quad \text{for all $t\geq t_0^L(B)$.} \end{align*} As for any $t\ge 0$ the state $S_{m}^{L}(t)$ depends continuously on the parameter $L$, we infer that also the time $t_0^L(B)$ depends continuously on $L$. We thus obtain \begin{align*} \bigcup_{L\in[0,1]} S_{m}^{L}(t)B \subset \mathcal K_{m} \quad \text{for all $t\geq t_0(B) := \underset{L\in[0,1]}{\max}\, t_0^L(B)$.} \end{align*} It is worth mentioning that the set $ \mathcal K_{m} $ might not be forward invariant under the semigroup $ \{S_{m}^{L}(t)\}_{t\geq0} $ for any $L\ge 0$. However, as $ \mathcal K_{m} $ is a bounded absorbing set, it also absorbs itself. Thus, defining $ T_{0} := t_0(\mathcal K_m)\ge 1$, we conclude that \begin{align} \label{EX:T0} \bigcup_{L\in[0,1]}S_{m}^{L}(t)\mathcal K_{m} \subset\mathcal K_{m} \quad\text{for all $t\geq T_0$.} \end{align} The next step is to construct a family $\{\mathfrak M^L_D\}_{L\in[0,1]}$ of exponential attractors for the discrete dynamical systems \begin{align} \left( \mathcal K_{m}, \{D_{m}^{L}(n)\}_{n\in\N_0} \right), \quad\text{where}\quad D^L_m(n) := S^L_m(nT_0) \quad\text{for all $n\in\N_0$}, \end{align} with $L\in[0,1]$. We further show that the exponential attractor associated with $L=0$ is robust against perturbations of the parameter $L$. Eventually, we will extend these results to the continuous dynamical systems $ \big( \mathcal K_{m}, S_{m}^{L}(t)\big) $ with $L\in[0,1]$. It obviously holds that for all $(u,v)\in\mathcal K_m$, \begin{align} D^L_m(n)(u,v) = \big[ \underbrace{ D^L_m(1) \circ ... \circ D^L_m(1)}_{\text{$n$ times}} \big] (u,v) =: \big[ D^L_m(1) \big]^n(u,v). \end{align} Therefore, the operator $D^L_m(1) = S^L_m(T_0)$ will play a crucial role in the analysis. \subsection{Robust exponential attractors for discrete dynamical systems} To prove the existence of a robust family of exponential attractors for the discrete dynamical system $(\mathcal K_{m}, \{D_{m}^{L}(n)\}_{n\in\N_0})$ we first present a simple generalization of the abstract result \cite[Thm.~4.4.]{EMZ}, which can be established by a rescaling argument. \begin{lemma}[Robust exponential attractors for general discrete dynamical systems] \label{LEM:GEN:DISC} Suppose that $X$ and $Y$ are Banach spaces such that $Y$ is compactly embedded in $X$, and let $M$ be a bounded subset of $X$. Let $L_*>0$ be arbitrary. We further assume that there exists a family $\{\mathcal F^L\}_{L\in[0,L_*]}$ of operators $\mathcal F^L:M\to M\cap Y$ which satisfies the following assumptions. \begin{enumerate}[label = $\mathrm{(\roman*)}$] \item There exist a constant $\Lambda\ge 0$ such that for all $x_1,x_2\in M$ and all $L\in [0,L_*]$, \begin{align}\label{Lipcomp.LW} \bignorm{\mathcal F^L(x_1) - \mathcal F^L(x_2)}_Y \le \Lambda \norm{x_1-x_2}_X \; . \end{align} \item There exists constants $\Theta>0$ and $\zeta\in(0,1]$ such that for all $x\in M$, $L\in [0,L_*]$ and $n\in\N_0$, \begin{align}\label{asymlmt.LW} \bignorm{\big[\mathcal F^L\big]^{n}(x) - \big[\mathcal F^0\big]^{n}(x)}_X \leq \Theta^n\, L^\zeta \; , \end{align} where $\big[\mathcal F^L\big]^{n}$ denotes the $n$-fold composition $\mathcal F^L \circ ... \circ \mathcal F^L$. \end{enumerate} Then, for every $ L \in [0,L_*] $, there exists an exponential attractor $ \mathcal{M}^L \subset M$ for the discrete semigroup $(M,\{\mathcal D^L(n)\}_{n\in\N_0})$ with $\mathcal D^L(n):=[\mathcal F^L]^n$, $n\in\N_0$ in the sense of Definition~\ref{DEF:EXP:ATT}. Moreover, these exponential attractors can be chosen in such a way that the following properties hold: \begin{enumerate}[label = $\mathrm{(\alph*)}$, ref = $\mathrm{(\alph*)}$ ] \item There exists constants $C_1>0$ and $0<\gamma<1$ such that for all $L\ge 0$, \begin{align}\label{tend.LW} \dist_{\mathrm{sym},X}(\mathcal{M}^L,\mathcal M^0)\leq C_1 L^{\zeta\gamma}. \end{align} \item The fractal dimension of $ \mathcal{M}^L $ is uniformly bounded, i.e., there exists a constant $C_2> 0$ such that for all $ L \in [0,L_{0}]$: \begin{align}\label{expunibd.LW} \dim_{\mathrm{frac},X}(\mathcal{M}^L)\leq C_2. \end{align} \item There exist constants $C_3,A>0$ such that for all $L\in [0,L_*]$ and all $n\in\N_0$, \begin{align} \dist_X\big(\mathcal D^L(n) M\,,\, \mathcal M^L\big) \le C_3 e^{-A n}, \end{align} meaning that the rate of convergence to these attractors is uniform in $L$. \end{enumerate} \end{lemma} \medskip \begin{proof} We first assume that (ii) holds with $\zeta=1$. In this case, the assertions of Lemma~\ref{LEM:GEN:DISC} have already been established in \cite[Thm.~4.4.]{EMZ}. We point out that the assertion (c) is not explicitly stated in \cite[Thm.~4.4.]{EMZ} but follows directly from its proof, in which the authors showed that \begin{align*} \dist_X\big(\mathcal D^L(n) M\,,\, \mathcal M^L\big) = \dist_X\big([\mathcal F^L]^n M\,,\, \mathcal M^L\big) \le 2^{1-n} R \quad\text{for all $n\in\N_0$.} \end{align*} Here, $R>0$ denotes the radius of a fixed ball $B_R(x_0)$ in $X$ with some center $x_0\in M$ such that $M\subset B_R(x_0)$. Hence, choosing $C_3 = 2R$ and $A=\ln(2)$, we obtain (c). Let us now assume that (ii) holds with $\zeta\in(0,1)$. In this case, the assertions can be established by slightly modifying the proof of \cite[Thm.~4.4.]{EMZ}. Alternatively, the change of variables $L\mapsto K:=L^\zeta$ could be used to transform back to the already known situation $\zeta=1$. \end{proof} We now want to apply this abstract result on the discrete dynamical system $(\mathcal K_m,\{D^L_m(n)\}_{n\in\N_0})$. To this end, we first need a compact Lipschitz estimate that is uniform in $L\in[0,1]$. \begin{lemma}[Uniform compact Lipschitz estimate]\label{LEM:CLE} Suppose that \eqref{ass:dom}--\eqref{ass:pot} hold, and let $m\in\R$ and $L\in[0,1]$ be arbitrary. Moreover, for any $i\in\{1,2\}$, let $(u_{0,i},v_{0,i}) \in \Wm $ be an arbitrary initial datum, and let $(u_i^L,v_i^L,\mu_i^L,\theta_i^L)$ denote the corresponding weak solution of the system \eqref{CH:INT.}. Then there exists a positive, non-decreasing function $\Lambda\in C(\RP)$ depending only on $\Omega$, $\beta$, $F$ and $G$, such that for all $L\in[0,1]$, \begin{align*} \bignorm{\big(u^L_{2},v_2^L\big)(t) - \big(u^L_{1},v_1^L\big)(t)}_{\HH^1} \le \Lambda(t) \bignorm{(u_{0,2},v_{0,2})-(u_{0,1},v_{0,1})}_{(\HH^1)'}\,, \quad\text{for all $t\ge 1.$} \end{align*} \end{lemma} \begin{proof} Recall that the functions $\Lambda_1^*$ in Proposition~\ref{PROP:CD:KLLM} and $\Lambda_1^0$ in Proposition~\ref{PROP:CD:GMS} are independent of $L$. Along with Lemma~\ref{LEM:LBS}, we obtain \begin{align*} \bignorm{\big(u^L_{2},v_2^L\big)(t) - \big(u^L_{1},v_1^L\big)(t)}_{\HH^1} &\le \max\{\Lambda^*_1(t),\Lambda^0_1(t)\} \, \bignorm{(u_{0,2},v_{0,2})-(u_{0,1},v_{0,1})}_{L,\beta,*}\\ &\le C \max\{\Lambda^*_1(t),\Lambda^0_1(t)\} \, \bignorm{(u_{0,2},v_{0,2})-(u_{0,1},v_{0,1})}_{(\HH^1)'}, \end{align*} for all $L\in[0,1]$ and all $t\ge 1$. This directly proves the claim. \end{proof} \medskip Lemma~\ref{LEM:GEN:DISC} and Lemma~\ref{LEM:CLE} can now be used to establish the following result. \begin{corollary}[Robust exponential attractors for $(\mathcal K_m,\{D^L_m(n)\}_{n\in\N_0})$] \label{COR:REA:DIST} Suppose that the assumptions \eqref{ass:dom}-\eqref{ass:pot} are satisfied and let $m\in\R$ be arbitrary. Then, for every $ L \in[0,1]$, there exists an exponential attractor $ {\mathfrak M}^{L}_D \subset \mathcal K_m$ for the dynamical system $( \mathcal K_{m}, D_{m}^{L}(n))_{n\in\N_0} $ in the sense of Definition~\ref{DEF:EXP:ATT}, where $M=\mathcal K_m$ is to be understood as a metric subspace of $X=(\HH^1)'$. Moreover, these exponential attractors can be chosen in such a way that the following properties hold: \begin{enumerate}[label = $\mathrm{(\alph*)}$, ref = $\mathrm{(\alph*)}$ ] \item The fractal dimension of $ \mathfrak{M}^L_D $ is uniformly bounded, i.e., there exists a constant $c_1\ge 0$ such that for all $L \in[0,1]$: \begin{align} \dim_{\mathrm{frac},{(\HH^1)'}}(\mathfrak{M}^L_D)\leq c_{1}. \end{align} \item There exist constants $c_2>0$ and $0<\gamma<1$ such that for all $L \in[0,1]$, \begin{align} \dist_{\mathrm{sym},{(\HH^1)'}}(\mathfrak{M}^L_D,\mathfrak M^0_D)\leq c_{2} L^{\gamma/4}. \end{align} \item There exist constants $c_3,a >0$ such that for all $L \in[0,1]$ and all $n\in\N_0$, \begin{align} \dist_{{(\HH^1)'}}\big(D^L(n)\mathcal K_m\,,\,\mathfrak M^L_D\big) \le c_3 e^{-a n}, \end{align} meaning that the rate of convergence to these attractors is uniform in $L$. \end{enumerate} \end{corollary} \begin{proof} To prove the assertion we intend to apply Lemma~\ref{LEM:GEN:DISC} with $Y=\Wm$, $X=(\HH^1)'$, $M=\mathcal K_m$, $\mathcal F^L = D^L_m(1)$ and $\mathcal D^L = D^L_m$. This means that only the conditions (i) and (ii) of Lemma~\ref{LEM:GEN:DISC} need to be verified. \textit{Condition (i):} We first recall that $D^L_m(1) = S^L_m(T_0)$ with $T_0\ge 1$ as constructed in \eqref{EX:T0}. Hence, Lemma~\ref{LEM:CLE} implies that \begin{align*} \bignorm{D^L_m(1)(u_2,v_2) - D^L_m(1)(u_1,v_1)}_{\HH^1} &\le \Lambda(T_0) \bignorm{(u_2,v_2) - (u_1,v_1)}_{(\HH^1)'} \end{align*} for all $L\in[0,1]$. This verifies condition (i) of Lemma~\ref{LEM:GEN:DISC}. \textit{Condition (ii):} Furthermore, using the continuous embedding $\LL^2\emb (\HH^1)'$ and applying Lemma~\ref{LEM:CONV:GMS} with $T_*=nT_0$, we infer that for all $L\in [0,1]$ and $(u,v)\in \mathcal K_m$, \begin{align*} &\bignorm{D^L_m(n)(u,v) - D^0_m(n)(u,v)}_{(\HH^1)'} \le C \bignorm{D^L_m(n)(u,v) - D^0_m(n)(u,v)}_{\LL^2} \\ &\quad \le C e^{Cn T_0}\, L^{\frac{1}{4}} \le \big[ (C+1) e^{C T_0} \big]^n \, L^{\frac{1}{4}}. \end{align*} Here, $C$ is a positive constant independent of $L$. Hence, condition (ii) of Lemma~\ref{LEM:GEN:DISC} with $\zeta=1/4$ and $\Theta=(C+1) e^{C T_0}$ is fulfilled. This allows us to apply Lemma~\ref{LEM:GEN:DISC} as described above which directly proves the assertions and thus, the proof is complete. \end{proof} \subsection{Robust exponential attractors for the continuous dynamical system\mbox{}} We are now ready to present the main result of this section, which is the existence of a robust family of exponential attractors for the continuous dynamical system $(\mathcal K_m,\{S^L_m(t)\}_{t\ge 0})$. \begin{theorem}[Robust exponential attractors for $(\mathcal K_m,\{S^L_m(t)\}_{t\ge 0})$] Suppose that the assumptions \eqref{ass:dom}-\eqref{ass:pot} are satisfied, and let $m\in\R$ be arbitrary. Then, for every $ L \in [0,1]$, there exists an exponential attractor $ {\mathfrak M}^{L} \subset \mathcal K_m$ for the dynamical system $(\mathcal K_m,\{S^L_m(t)\}_{t\ge 0})$ in the sense of Definition~\ref{DEF:EXP:ATT}, where $M=\mathcal K_{m}$ is to be understood as a metric subspace of $\HH^1$. Moreover, these exponential attractors can be chosen in such a way that the following properties hold: \begin{enumerate}[label = $\mathrm{(\alph*)}$, ref = $\mathrm{(\alph*)}$ ] \item The fractal dimension of $ \mathfrak{M}^L $ is uniformly bounded, i.e., there exists a constant $C_1\ge 0$ such that for all $ L \in [0,1]$: \begin{align} \dim_{\mathrm{frac},\HH^1}(\mathfrak{M}^L)\leq C_{1}. \end{align} \item There exist constants $C_2>0$ and $0<\gamma<1$ such that for all $L\in [0,1]$, \begin{align} \dist_{\mathrm{sym},\HH^1}(\mathfrak{M}^L,\mathfrak M^0) \leq C_{2} \big( L^{1/6} + L^{\gamma/4}). \end{align} \item There exists constants $C_3,\alpha >0$ such that for all $L\in [0,1]$ and all $t\ge 0$, \begin{align} \dist_{\HH^1}\big(S^L_m(t)\mathcal K_m,\mathfrak M^L\big) \le C_3\, e^{-\alpha t}, \end{align} meaning that the rate of convergence to these attractors is uniform in $L$. \end{enumerate} \end{theorem} \begin{proof} To establish the assertion, we proceed similarly as in the proof of \cite[Thm.~5.1]{EMZ} (which in turn is based on the proof of the general result \cite[Thm.~3.1]{eden}). Let $T_0\ge 1$ denote the number introduced in \eqref{EX:T0}. Since $\mathcal K_m$ is a compact subset of $\HH^1$, we can find a radius $K>0$ (independent of $L$) such that $\norm{(u,v)}_{\HH^1}\le K$ for all $(u,v) \in \mathcal K_m$. Let now $C$ denote a generic positive constant, depending only on $T_0$ and $K$ that may change its value from line to line. For any $L\in [0,1]$, we set \begin{align} \label{CONST:MLW} \mathfrak M^L := \bigcup_{t \in [T_{0},2T_{0}]} S_{m}^{L}(t) \mathfrak M^L_D. \end{align} We now intend to show that $\{\mathfrak M^L\}_{L\in[0,1]}$ is a family of exponential attractors with respect to the $\HH^1$-metric which satisfies the assertions (a), (b) and (c). Invoking the compact Lipschitz estimate from Lemma~\ref{LEM:CLE}, we infer that $\mathfrak M^L$ is compact in $\HH^1$ for every $L\in [0,1]$. We next show that the fractal dimension of $\mathfrak M^L$ is bounded uniformly in $L$. To this end, we consider the mapping \begin{align*} \mathcal F^L: [T_0,2T_0] \times \mathcal K_m \to \mathcal K_m,\quad (t,u,v) \mapsto S^L(t)(u,v). \end{align*} It obviously holds that $\mathfrak M^L = \mathcal F^L([T_0,2T_0]\times \mathfrak M^L_D)$. Hence, invoking Proposition~\ref{PROP:CD:KLLM}, Proposition~\ref{PROP:HLD:KLLM}, Proposition~\ref{PROP:CD:GMS}, Proposition~\ref{PROP:HLD:GMS} and Lemma~\ref{LEM:CLE}, we infer that there exists some constant $h \ge 0$ depending only on $T_0$ and $K$, such that \begin{align*} &\bignorm{ \mathcal F^L(t_1,u_1,v_1) - \mathcal F^L(t_2,u_2,v_2) }_{\HH^1} = \bignorm{ S_{m}^{L}(t_{1})(u_1,v_1)-S_{m}^{L}(t_{2})(u_2,v_2) }_{\HH^1} \\ &\quad \le C\big( \bignorm{(u_1,v_1)-(u_1,v_2)}_{\HH^1} + \left|t_{1}-t_{2} \right|^{\frac{3}{16}}\big) \le h \bignorm{(t_1,u_1,v_1)-(t_2,u_1,v_2)}_{\R\times\HH^1}^{\frac{3}{16}} \end{align*} for all $t_1,t_2 \in [T_0,2T_0]$ and all $(u_1,v_1),(u_2,v_2)\in \mathcal K_m$, where $\R$ is endowed with the Euclidean norm. This means that $\mathcal F^L$ is Hölder continuous with exponent $3/16$ and Hölder constant $h$. \pagebreak[2] Note that $h r^{3/16} \le r^{1/8}$ if $r>0$ is sufficiently small. Hence, recalling the definition of the fractal dimension (see \eqref{DEF:DIMFRAC}), we obtain \begin{align*} &\dim_{\mathrm{frac},\HH^1}\big(\mathfrak M^L\big) = \dim_{\mathrm{frac},\HH^1}\big(\mathcal F^L([T_0,2T_0]\times \mathfrak M^L_D)\big) \\[1ex] &\quad = \underset{r\to 0}{\lim\sup}\; \frac{\mathcal N_{h r^{3/16}}\big(\mathcal F^L([T_0,2T_0]\times \mathfrak M^L_D)\,;\,\HH^1\big)}{-\ln\big(h\, r^{3/16} \big)} \\[1ex] &\quad \le \underset{r\to 0}{\lim\sup}\; \frac{\mathcal N_{r}\big([T_0,2T_0]\times \mathfrak M^L_D\,;\,\R\times\HH^1\big)}{-\ln\big(r^{1/8} \big)} \\[1ex] &\quad = 8 \dim_{\mathrm{frac},\R\times \HH^1} \big([T_0,2T_0]\times \mathfrak M^L_D\big) \\ &\quad \le 8 \big( \dim_{\mathrm{frac},\HH^1} \big(\mathfrak M^L_D\big) + 1 \big) \le 8\big(c_1 + 1\big), \end{align*} where $c_1>0$ is the constant from Corollary~\ref{COR:REA:DIST}(a). This verifies (a). Proceeding as in the proof of \cite[Thm.~3.1]{eden}, it is straightforward to check that the set $\mathfrak M^L$ is forward invariant, i.e., $S^L(t) \mathfrak M^L \subset \mathfrak M^L$ for all $t\ge 0$. Let now $L\in (0,1]$, $t>0$ and $(u,v)\in\mathcal K_m$ be arbitrary. Without loss of generality, we assume that $t\ge T_0$. Then there exist $s\in[T_0,2T_0)$ and $n\in\N_0$ such that $t = nT_0 + s$. Due to Corollary~\ref{COR:REA:DIST}, and since $\mathfrak M^L_D$ is compact in $(\HH^1)'$, we can further find $(\bar u,\bar v) \in \mathfrak M^L_D$ such that \begin{align*} \bignorm{ D^L(n)(u,v) - (\bar u,\bar v) }_{(\HH^1)'} \le c_3 e^{-a n}. \end{align*} Then, recalling $1\le T_0\le s<2T_0$ and $n=(t-s)/T_0$, we can use the compact Lipschitz estimate from Lemma~\ref{LEM:CLE} to conclude that \begin{align*} &\bignorm{S^L_t (u,v) - S^L_s(\bar u,\bar v)}_{\HH^1} = \bignorm{S^L_s D^L(n) (u,v) - S^L_s(\bar u,\bar v)}_{\HH^1} \\ &\quad \le C \bignorm{D^L(n) (u,v) - (\bar u,\bar v)}_{(\HH^1)'} \le C e^{-an} \\ &\quad = C e^{-at/T_0} e^{as/T_0} \le C e^{-\alpha t} \end{align*} with $\alpha := a/T_0$. Since $S_s^L(\bar u,\bar v) \in \mathfrak M^L$, this implies \begin{align*} \dist_X\big(S^L_m(t)\mathcal K_m,\mathfrak M^L\big) \le C e^{-\alpha t} \end{align*} which proves (c). In particular, we have thus shown that for all $L\in [0,1]$, $\mathfrak M^L$ is indeed an exponential attractor for the dynamical system $( \mathcal K_{m}, S_{m}^{L}(t)) $ with respect to the $\HH^1$-metric. It remains to prove (b). Therefore, let $L\in (0,1]$ and $(u_*,v_*)\in\mathfrak M^L$ be arbitrary. Hence, there exist $t\in[T_0,2T_0]$ and $(u_0,v_0) \in \mathfrak M^L_D$ such that $(u_*,v_*) = S^L(t)(u_0,v_0)$. According to Corollary~\ref{COR:REA:DIST}(b), there exists $(\bar u_0,\bar v_0) \in \mathfrak M^0_D$ such that \begin{align*} \bignorm{(u_0,v_0) - (\bar u_0,\bar v_0)}_{(\HH^1)'} \le c_2 L^{\gamma/4}. \end{align*} We now set $(\bar u_*,\bar v_*) := S^0(t)(\bar u_0,\bar v_0) \in \mathfrak M^0$. Hence, using the Hölder estimate from Proposition~\ref{PROP:CD:GMS}, the convergence estimate from Corollary~\ref{COR:CONV:GMS}, and Lemma~\ref{LEM:LBS}, we conclude that \begin{align*} &\bignorm{(u_*,v_*) - (\bar u_*,\bar v_*)}_{\HH^1} = \bignorm{ S^L(t)(u_0,v_0) - S^0(t)(\bar u_0,\bar v_0)}_{\HH^1} \\ &\quad \le \bignorm{ S^L(t)(u_0,v_0) - S^0(t)(u_0,v_0) }_{\HH^1} + \bignorm{ S^0(t)(u_0,v_0) - S^0(t)(\bar u_0,\bar v_0) }_{\HH^1} \\ &\quad \le \bignorm{ S^L(t)(u_0,v_0) - S^0(t)(u_0,v_0) }_{\HH^1} + C \bignorm{ (u_0,v_0) - (\bar u_0,\bar v_0) }_{(\HH^1)'} \\ &\quad \le C L^{1/6} + C L^{\gamma/4}. \end{align*} This directly implies \begin{align*} \dist_{\HH^1}\big(\mathfrak M^L,\mathfrak M^0\big) \le C \big( L^{1/6} + L^{\gamma/4} \big). \end{align*} Proceeding analogously, we derive the same estimate for $\dist_{\HH^1}(\mathfrak M^0,\mathfrak M^L) $. Combining both estimates, we obtain (b). Thus, the proof is complete. \end{proof} \section*{Acknowledgement} Sema Yayla was supported by the Scientific and Technological Research Council of Turkey (TUBITAK). Harald Garcke and Patrik Knopf were partially supported by the RTG 2339 ``Interfaces, Complex Structures, and Singular Limits'' of the German Science Foundation (DFG). The support is gratefully acknowledged. \footnotesize \bibliographystyle{plain}
\section{Introduction} Recent years have evidenced a surge in magnetic nanoparticles (MNPs) based research due to their numerous technological applications~\cite{bader2006,gloag2019,koplovitz2019,akbarzadeh2012,guimaraes2009,gu2016,patra2018,anand2018,Aldewachi2018,anand12021}. MNPs have also received significant attention due to their application in magnetic hyperthermia~\cite{berry2019,moise2018}. In such a case, the malignant cells are exposed to nanoparticles, and an alternating magnetic field is applied. Due to hysteresis, they release heat which is used to burn the cancerous cells~\cite{moise2018}. The heating efficiency of these nanosystems depends critically on various factors, such as particle size and its distribution, anisotropy constant, magnetic interaction, frequency and strength of the external magnetic field, etc.~\cite{martinez2013,perigo2015,abu2020}. Therefore, there is a growing interest to understand how heat release from nanoparticles can be enhanced and manipulated in a more controlled manner. The various aspects of magnetic hyperthermia are well understood in the case of non-interacting MNPs~\cite{rosensweig2002,raikher2014}. However, MNPs interact due to dipolar interaction. Therefore, their heating capability is drastically modified even for low concentrations of nanoparticles~\cite{ruta2015}. The dipolar interaction is long-ranged and anisotropic. Depending on the relative orientation and position of the particles, it can favour ferromagnetic or antiferromagnetic interaction~\cite{de1997}. As a consequence, it has a far-reaching effect on various magnetic properties of crucial importance such as modified energy barriers, frustrations of spins, changed magnetic dynamics, unique morphology, etc.~\cite{iglesias2004,plumer2010,anand2016,usov2018,anand2021}. For instance, in the case of randomly distributed particles and anisotropy axes, the magnetic properties of the system can have similarities to those of spin glasses~\cite{djurberg1997}. In other cases, if the MNPs form a linear chain, the dipolar interaction favours head to the tail arrangement of magnetic moments~\cite{barrett2011}. In these contexts, there are several works which have incorporated the effect of dipolar interaction~\cite{vargas2005,souza2019,allia1999,tan2014,fu2018}. For example, using experiments and analytical methods, Allia {\it et al.} studied the dipolar interaction effect on hysteresis in granular magnetic systems~\cite{allia1999}. Dipolar interaction was found to determine the magnetic hysteresis in the high-temperature limit. Tan {\it et al.} probed the heating mechanism in the isotropic assembly of MNPs using kinetic Monte Carlo (kMC) simulation~\cite{tan2014}. They obtained spatial distribution of heat dissipation due to dipolar interaction. Fu {\it et al.} also studied the dipolar interaction effect on the heating efficiency of MNPs~\cite{fu2018} using computer simulations and experiments. They found the detrimental effect of magnetic interaction on the heat dissipation in the case of isotropic assembly of MNPs. In general, superparamagnetic nanoparticles are used for magnetic hyperthermia due to their easy controllability, superior magnetic and physicochemical properties~\cite{ha2018,bao2011}. Although, the major disadvantage associated with such particles is their agglomeration, which reduces their dispersibility and hence their intrinsic stability for a more extended period~\cite{chantrell1982,lima2012}. The amount of heat dissipation is significantly reduced due to the dipolar interaction in the isotropic assembly of these ultrafine nanoparticles~\cite{fu2018,branquinho2013,usov2017,guibert2015}. Usov {\it et al.} analysed the heating performance in a three-dimensional assembly of nanoparticles~\cite{usov2017}. The dipolar interaction lowered the heat dissipation significantly. Using experiments, Guibert {\it et al.} have also shown that the dipolar interaction is detrimental to the heating efficiency of MNPs~\cite{guibert2015}. While in the case of highly anisotropic assembly such as linear chain and columnar geometry; the dipolar interaction improves the heating efficiency of the nanoparticles~\cite{serantes2014,valdes2020,mehdaoui2013,anand2020}. For example, Mehdaoui {\it et al.} found that dipolar interaction improved the heating performance in a columnar arrangement of MNPs~\cite{mehdaoui2013}. In a recent study, using kMC simulations, we have shown that dipolar interaction improves the heating capability of nanoparticles in a linear chain with perfectly aligned anisotropy~\cite{anand2020}. The arrangement of MNPs in a particular shape depends on various factors such as dipolar interaction, temperature, etc.~\cite{anderson2016,chuan2012}. Therefore, we should find a way to maximize the heat dissipation and reduces the adverse effect of dipolar interaction even in the case of isotropic assembly. In this context, there are few recent works which indicate that ferromagnetic nanoparticles can be an excellent alternative to the superparamagnetic counterpart as former has higher heating capability~\cite{kita2008,abu2019,mehdaoui2011,carrey2011,le2016}. For instance, using experiments and numerical simulations, Mehdaoui {\it et al.} investigated the heating performance of an assembly of MNPs. Ferromagnetic particles were found to be the best candidate for hyperthermia as they displayed the highest specific losses reported in the literature~\cite{mehdaoui2011}. Carrey {\it et al.} also obtained a more substantial heating efficiency of ferromagnetic nanoparticles~\cite{carrey2011}. Using experiments, Chang {\it et al.} studied the heating efficiency in human-like collagen protein-coated MNPs~\cite{le2016}. They also found that ferromagnetic nanoparticles are a better-suited candidate for magnetic hyperthermia. Thus motivated, we extensively investigate the hysteresis mechanism in ordered arrays of nanoparticles of various sizes ranging from superparamagnetic to ferromagnetic using kinetic Monte Carlo (kMC) simulation. We also probe the dependence of hysteresis on dipolar interaction strength and temperature. The one-dimensional array is chosen as it is the building block of a variety of possible geometries. We have assumed random orientations of anisotropy axes. kMC simulation is able to simulate the thermodynamic and non-equilibrium processes more efficiently~\cite{ruta2015,tan2014,anand2019}. The organization of the paper is as follows. The model used in the simulation and various energy terms are discussed in Sec.~II. We present and discuss the numerical results in Sec.~III. Finally, we provide the summary and conclusion of the work Sec.~IV \section{Model} We have considered a linear arrangement of $n$ single-domain particles without any positional disorder as depicted in Fig.~\ref{figure1}(a). The particles are monodisperse and spherical shaped with volume V=$\pi D^3/6$, where $D$ is the diameter of the particle. Each nanoparticle has a magnetic moment $\mu^{}=\mu\hat{\mu}^{}$ with $\mu=M^{}_sV$, where $\hat{\mu}$ is the unit vector corresponding to $\mu$, and $M^{}_s$ is the saturation magnetization. To vary the dipolar interaction strength, a control parameter $\lambda=D/d$ is defined, $d$ is the separation between two nearest neighbours in the array, as shown in the schematic Fig.~\ref{figure1}(a). The MNPs are non-interacting with $\lambda=0.0$. On the other hand, the strength of the dipolar interaction is the maximum for $\lambda=1.0$. The energy associated with the single superparamagnetic nanoparticle because of uniaxial anisotropy is given as~\cite{carrey2011,tan2014,anand2019} \begin{equation} E=K_{\mathrm {eff}}V\sin^2\theta, \label{anisotropy} \end{equation} here $K_{\mathrm {eff}}$ is the anisotropy constant, and $\theta$ is the angle between the magnetic moment and anisotropy axis. It is clear that $E$ has minima $E^{}_1$ and $E^{}_2$ positioned at $\theta=0$ and $\pi$, respectively [Eq.~(\ref{anisotropy})]. There is also an energy maximum of strength $E^{}_3=K_{\mathrm {eff}}V$ at $\theta=\pi/2$, also known as the energy barrier. If thermal energy $k^{}_BT$ is strong enough as compared to $K_{\mathrm {eff}}V$, the direction of magnetic moment fluctuates between $E^{}_1$ and $E^{}_2$ with a characteristic time scale, also known as N\'eel relaxation time $\tau^{}_N$. It is related to the energy barrier and thermal energy as~\cite{anand2019,manish2020} \begin{equation} \tau^{}_N=\tau^{}_o\exp(K_\mathrm {eff} V/k^{}_BT), \end{equation} where $\tau_o=(2\nu^{}_o)^{-1}$ with $\nu^{}_o=10^{10}$ $s^{-1}$, $k^{}_B$ is the Boltzmann constant and $T$ is the temperature. When $\tau^{}_N$ becomes comparable to the experimental measuring time $\tau^{}_m$, i.e. $\tau^{}_N\approx \tau^{}_m$, the nanoparticle is said to be in the blocked state. In this case, the magnetic behaviour of the MNPs is characterized by blocking temperature $T^{}_B$ below which the magnetic moments appear frozen. It is approximated as~\cite{bedanta2008} \begin{equation} T^{}_B\approx\frac{K_{\mathrm {eff}} V}{k^{}_B \ln(\tau_m/\tau_o)}, \label{blocking} \end{equation} where $\tau^{}_m\approx(2\pi\nu)^{-1}$. Eq.~(\ref{blocking}) is suitable for non-interacting particles with the same size and anisotropy. In an assembly, MNPs interact because of dipolar interaction. As a consequence, the single-particle energy barrier is significantly modified. The dipolar field associated with this interaction is given by the following expression~\cite{tan2014,anand2019} \begin{equation} \mu^{}_{o}\vec{H}^{}_{\mathrm {dip}}=\frac{\mu\mu_{o}}{4\pi}\sum_{j,j\neq i}\frac{3(\hat{\mu}^{}_j \cdot \hat{e}_{ij})\hat{e}_{ij}-\hat{\mu^{}_j} }{r^3_{ij}}. \label{dipolar} \end{equation} Here $\mu^{}_o$ is the vacuum permeability, $\hat{\mu}^{}_j$ is the unit vector for the $j\mathrm{th}$ $\mu$ in the underlying system, $r^{}_{ij}$ is the distance between the two nanoparticles at $i\mathrm{th}$ and $j\mathrm{th}$ positions in the array, and $\hat{e}_{ij}$ is the unit vector corresponding to $r^{}_{ij}$. To obtain the hysteresis response of the underlying system, we apply an oscillating magnetic field ${\mu^{}_{o}H}$ along the array-axis of MNPs as shown below \begin{equation} \mu^{}_{o}H=\mu^{}_oH^{}_{\mathrm {o}}\cos\omega t, \label{magnetic} \end{equation} where $\mu^{}_{o}H_{\mathrm {o}}$ and $\omega=2\pi\nu$ are the magnitude and angular frequency of the external magnetic field, respectively, and $t$ is the time. In the presence of long-ranged dipolar field and externally applied magnetic field, the total energy of the $i\mathrm{th}$ magnetic nanoparticle is given by the following expression~\cite{tan2014,anand2019} \begin{equation} E(\theta^{}_i,\phi^{}_i)=K_{\mathrm {eff}}V\sin^2 \theta^{}_i-\mu\mu^{}_{o}H^{}_{\mathrm {total}}\cos(\theta^{}_i-\phi^{}_i). \end{equation} Here $\phi^{}_i$ is the angle between the anisotropy field and the total magnetic field $ H^{}_{\mathrm {total}}$ (dipolar and external field). We have implemented the kMC simulation technique to simulate the hysteresis curves as a function of dipolar interaction strength and the temperature for the particle sizes ranging from superparamagnetic to ferromagnetic. We have used the same kMC algorithm, which is explained in the references~\cite{tan2014,anand2019}. We have calculated heat released because of hysteresis using the following formula~\cite{carrey2011} \begin{equation} E^{}_H=\int \displaylimits_{-\mu^{}_{o}H_{\mathrm{o}}}^{\mu^{}_{o}H^{}_{\mathrm{o}}}M(H)dH, \label{heat_dissipation} \end{equation} where $M(H)$ is the magnetic field dependent magnetization of the uderlying system. \section{Simulation results} We have used the following values of parameters: $D=8-64$ nm, $K^{}_{\mathrm {eff}}=13\times10^3$ Jm$^{-1}$, $M^{}_s=4.77\times10^5$ Am$^{-1}$, $\nu=10^3$ Hz and $T=0-300$ K. We have also taken three values of magnetic field strength $\mu^{}_oH^{}_{\mathrm {o}}= 0.05$, 0.075 and 0.1 T, which is about 0.92, 1.38 and 1.84 times the anisotropy field $H^{}_K=2K^{}_{\mathrm {eff}}/M^{}_s$, respectively. These values of the magnetic field and frequency meet the criteria $\mu^{}_oH^{}_{\mathrm {o}} \nu<5\times10^{9}$ Am$^{-1}$s$^{-1}$, a safer limit suited for magnetic hyperthermia applications~\cite{he2018}. The total number of nanoparticles in the array is taken as $n = 100$, and dipolar interaction strength $\lambda$ has been changed between 0.0 and 1.0. $K^{}_{\mathrm {eff}}$ and $M^{}_s$ value considered in the present work is for the bulk magnetite (Fe$_3$O$_4$), which is one of the most promising candidates for magnetic hyperthermia applications due to its bio-compatibility and driving accumulations features~\cite{hachani2017}. We first study the hysteresis behaviour and its dependence on dipolar interaction strength and temperature for a particle of size well within the superparamagnetic regime. In Fig.~(\ref{figure1}), we study the hysteresis behaviour as a function of dipolar interaction strength with $T=0$ and 300 K for $D=8$ nm. We have considered five representative values of $\lambda$= 0.0, 0.4, 0.6, 0.8, and 1.0. The externally applied field axis (x-axis) has been rescaled by $H^{}_K$ and $M$ (y-axis) by $M^{}_s$ in the hysteresis figures shown in this article. In the absence of thermal fluctuations and magnetic interaction ($\lambda=0.0$), the hysteresis curve resembles the Stoner and Wohlfarth model~\cite{stoner1948}. In this case, coercive field $\mu^{}_oH^{}_c\approx0.479H^{}_K$ and remanent magnetization $M^{}_r$ is close to 0.5, as expected for Stoner and Wohlfarth particle with randomly oriented anisotropy axis~\cite{stoner1948}. The hysteresis loop area is extremely small for weakly or non-interacting MNPs with $T=300$ K indicating superparamagnetic behaviour. It can be explained from the fact that particle size being in the superparamagnetic regime, the blocking temperature $T^{}_B$ is minimal $\approx 16.86$ K [using Eq.~(\ref{blocking})] as compared to simulation temperature $T$ ($=300$ K). Therefore, thermal energy overcomes the energy barrier, instigating the magnetic moments to change their orientations randomly, which results in extremely weak hysteresis. By solving Fokker–Planck equation, Usov and Grebenshchikov also obtained minimal hysteresis loop area for Cobalt particle in the superparamagnetic regime at $T=250$ K~\cite{usov2009}. Due to enhancement in the ferromagnetic coupling between the magnetic moments with an increase in dipolar interaction strength, the hysteresis loop area increases with $\lambda$, irrespective of temperature. Mohapatra {\it et al.} also obtained higher hysteresis loss for the linear array as compared to isotropic assembly using experiments~\cite{mohapatra2020}. Next, we study the dependence of magnetic hysteresis properties on dipolar interaction strength for the particle sizes varied from superparamagnetic to the ferromagnetic regime. In Fig.~(\ref{figure2}), we analysed the hysteresis properties with particle size $D$ four typical values of $\lambda=0.0$, 0.6, 0.8 and 1.0 in the absence of temperature. We have considered six representative values of $D=8$, 12, 16, 24, 32 and 64 nm. The profile of the hysteresis curve is the same as that of Stoner and Wohlfarth particle for $T=0$ K and $\lambda=0.0$, as expected~\cite{stoner1948}. As thermal fluctuations are absent in the present case, the system behaves like a blocked state, irrespective of $D$. Therefore, the hysteresis loop area is significant even for superparamagnetic nanoparticle with negligible dipolar interaction. The hysteresis loop area also does not depend on $D$ for a fixed value of $\lambda$. The dipolar interaction of enough strength induces ferromagnetic coupling between the MNPs. Therefore, the area under the hysteresis curve increases with dipolar interaction $\lambda$. To see the thermal effects on the hysteresis for these particles, we plot the hysteresis curves as a function of $D$ and $\lambda$ at room temperature in Fig.~(\ref{figure3}). We have used the same set of parameters as that of Fig.~(\ref{figure2}). In the absence of dipolar interaction ($\lambda=0.0$), there is an extremely small hysteresis loop area for $D\approx8-16$ nm, indicating the dominance of superparamagnetic character. As far as the role of blocking temperature is concerned for such behaviour, $T^{}_B$ lies in the range $\approx 17-135$ K for $D=8-16$ nm, which is well below the simulation temperature $T=300$ K. As a consequence, thermal fluctuations dictate the hysteresis of superparamagnetic nanoparticles in the non-interacting case, resulting in extremely weak hysteresis. Our observation for superparamagnetic nanoparticle ($D=8$ nm) is in qualitative agreement with the numerical work of Usov and Grebenshchikov~\cite{usov2009}. We could not compare for the entire range of $D$ as they concentrated on $D=8$ nm only. So, our results are more generic in this context. The hysteresis loop area is significant for $D>16$ nm even with $\lambda=0.0$. It means that particle with size greater than $16$ nm shows the ferromagnetic character. It is further strengthened from the fact that $T^{}_B$ is close to $300$ K for $D>16$ nm. Therefore, we observe Stoner and Wohlfarth-like behaviour even with $T=300$ K and negligible dipolar interaction ($\lambda=0.0$). Using experiments, Li {\it et al.} also obtained a large hysteresis loop area for ferromagnetic nanoparticles even in the non-interacting case~\cite{li2011}. We could not compare our results for the dipolar interacting nanoparticles for the whole range of particle size as they studied with a single value of particle size and $\lambda\approx0.0$ only. So, our results are more generic and can be used as a benchmark in this context. The dipolar interaction increases the hysteresis loop area as it induces ferromagnetic coupling between the MNPs. For the closest packing ($\lambda=1.0$), there is less dependence of hysteresis on $D$ because of huge ferromagnetic coupling as dipolar interaction is the maximum. These results suggest that ferromagnetic nanoparticles could be one of the best candidates to achieve significant heat dissipation which is essential for magnetic hyperthermia applications. The appreciable hysteresis loop area in the case of weak or negligible dipolar interaction with $D>16$ nm suggests that heating efficiency can be much improved with ferromagnetic nanoparticles even in the isotropic assembly of MNPs. It is equally important to investigate the effect of external magnetic field strength $\mu^{}_oH^{}_o$ on the hysteresis loop area as a function of particle size. In Fig.~(\ref{figure4}), we plot the hysteresis curves for three values of $\mu^{}_oH^{}_o=0.05$, 0.075 and 0.1 T with various values of $D$, $\lambda$ at room temperature. In the absence of magnetic coupling ($\lambda=0.0$), there is an extremely small value of hysteresis loop area for $D\leq16$ nm irrespective of $\mu^{}_oH^{}_o$, indicating superparamagnetic behaviour. There is a significant hysteresis loop area for the ferromagnetic particle ($D>16$ nm) even for non-interacting nanoparticles, which is robust with respect to the field strength. The hysteresis loop also increases with external magnetic field strength. It is in qualitative agreement with the experimental work of Avugadda {\it et al.}~\cite{avugadda2019}. The rise in the hysteresis loop area with external magnetic field strength is also in qualitative agreement with experimental and numerical works of Kita {\it et al.}~\cite{kita2010}. There is always an increase in hysteresis loop area as dipolar interaction strength, and particle size are increased. These results also indicate that we can have considerable heat dissipation with ferromagnetic nanoparticles even in an isotropic assembly and in the absence of magnetic interaction. So, it can be used for efficient application of magnetic hyperthermia. These results should also help choose precise values of magnetic field strength, dipolar interaction, and particle size to obtain desired heat dissipation, which is essential for magnetic hyperthermia application. To probe further, we then study the hysteresis behaviour of ferromagnetic nanoparticle as a function of temperature for various values of dipolar interaction strength. In Fig.~(\ref{figure5}), we plot hysteresis curves for $D=24$ nm with six representative values of $T= 0$, 20, 40, 100, 200 and 300 K. We have also considered four distinct values of $\lambda=0.0$, 0.6, 0.8 and 1.0. As the blocking temperature $T^{}_B\approx455$ K exceeds the maximum simulation temperature $T=300$ K considered in the present work; an appreciable hysteresis is observed for negligible dipolar interaction even at room temperature. There is a sharp decrease in the hysteresis loop area as $T$ is changed between 0 and 300 K for $\lambda\leq0.6$. The hysteresis loop area depends weakly on temperature for large $\lambda$, which can be attributed to enhanced $T^{}_B$ because of large magnetic interaction. Due to the rise in ferromagnetic coupling with $\lambda$, there is always an increase in hysteresis loop area with dipolar interaction strength. These observations also strengthen the fact the ferromagnetic nanoparticles can have significant heating efficiency, irrespective of the shape of the assembly. To quantify the hysteresis mechanism, we then study the variation of coercive field $\mu_oH^{}_c$ as a function of temperature $T$, particle size $D$ and dipolar interaction strength $\lambda$. In Fig.~(\ref{figure6}), we plot simulated coercive field $\mu^{}_oH^{}_c$ as a function of $T$ for three values of $D=8, 12$ and 16 nm and three representative values of $\lambda=0.0$, 0.3 and 0.5. We have not considered larger values of $D$ ($>16$ nm), as $\mu^{}_oH^{}_c$ depends weakly on $T$ in these cases due to the dominance of ferromagnetic character for larger particle sizes. For a fixed particle size, we have also considered only those values of $T$ for which $\mu^{}_oH^{}_c$ is non-zero. It is quite evident that $\mu^{}_oH^{}_c$ decreases to zero very rapidly with $T$ for very small and negligible dipolar interaction strength. The rapid decrease of $\mu^{}_oH^{}_c$ with $T$ is in qualitative agreement with Usov and Grebenshchikov~\cite{usov2009}. The comparison is not possible for the whole range of $D$ and $\lambda$ as they have shown results only for $D=8$ nm with the dilute assembly of MNPs. For moderate dipolar interaction strength $\lambda$, $\mu^{}_{o}H^{}_c$ decreases very slowly. It is also quite evident that blocking temperature $T^{}_B$ is a useful quantifier in determining the dependence of hysteresis response on particle size $D$ and dipolar interaction strength $\lambda$. To extract $T^{}_B$ from the simulated hysteresis curves, we have used the model proposed by Garcia-Otero {\it et al.}~\cite{garcia1998}. In the case of non-interacting MNPs, the temperature dependence of the coercive field $\mu^{}_oH^{}_c(T)$ can be given by the following relation~\cite{garcia1998,aquino2019} \begin{equation} \mu^{}_oH^{}_c(T)=\epsilon \frac{2K^{}_{\mathrm {eff}}}{M^{}_s}\bigg[1-\bigg(\frac{T}{T^{}_B}\bigg)^{\alpha} \bigg], \label{coercive} \end{equation} where $\epsilon\approx0.96$ and $\alpha=0.5$ for perfectly aligned anisotropy case while $\epsilon\approx0.479$ and $\alpha=0.75$ with randomly oriented anisotropy axes. As MNPs are interacting due to the dipolar interaction in our case, we also consider $\alpha$ as a fitting parameter. We have taken $\epsilon\approx0.479$ as anisotropy axes are assumed to have random orientations in the present work. We have fitted the simulated values of $\mu^{}_o H^{}_c$ for values as mentioned earlier of D and $\lambda$ with Eq.~(\ref{coercive}) and extracted $T^{}_B$ and $\alpha$. The obtained values of $T^{}_B$ and $\alpha$ are also plotted as a function of $\lambda$ in Fig.~(\ref{figure6}). The dipolar interaction and particle size $D$ enhance the blocking temperature $T^{}_B$. As a consequence, MNPs stays in the blocked state even at a substantial value of simulation temperature for superparamagnetic nanoparticle with considerable dipolar interaction strength. The same trend is observed with ferromagnetic nanoparticle and negligible dipolar interaction. The more significant value of $T^{}_B$ with dipolar interaction as compared to the non-interacting case is in perfect agreement with experimental works of Mehdaoui {\it et al.}~\cite{mehdaoui2010}. The increase of $T^{}_B$ with $\lambda$ is also in qualitative agreement with numerical works of Russier {\it et al.}~\cite{russier2016}. The remarkable thing to note is that $\alpha$ also increases with $\lambda$, and $D$. Researchers used Eq.~(\ref{coercive}) with the constant value of $\alpha$ even for strongly interacting MNPs~\cite{aquino2019,lacroix2009,enpuku2020}. Our results suggest that $\alpha$ should not be taken as constant; instead, it should also be considered as a fitting parameter; otherwise, we may estimate incorrect values of various parameters of interest, such as $T^{}_B$ and $K^{}_{\mathrm {eff}}$. Finally, we study the amount of heat dissipated due to the magnetic hysteresis $E^{}_H$ as a function of particle size $D$ and temperature $T$ in Fig.~(\ref{figure7}). $D$ has been varied between 8 and 64 nm, and $T$ has been changed in the range $0-300$ K. In the case of weak and negligible dipolar interaction strength $\lambda$; $E^{}_H$ decreases very rapidly with temperature $T$ for the superparamagnetic nanoparticle ($D\approx8-16$ nm). On the other hand, in the case of ferromagnetic nanoparticle ($D>16$ nm), $E^{}_H$ is enormous, and it also depends very weakly on $T$ even in the non-interacting case. It can be explained from the fact that the blocking temperature $T^{}_B$ is comparable to or greater than the maximum simulation temperature $T=300$ K. As a consequence; the MNPs remain in the blocked state even at room temperature, which results in large hysteresis loop area and hence $E^{}_H$ is significantly high. As the dipolar interaction induces ferromagnetic coupling in an anisotropic assembly of MNPs, $T^{}_B$ increases with $\lambda$. Therefore, $E^{}_H$ increases with $\lambda$ and has a very weak dependence on $T$ as well. Zubarev {\it et al.} also found an increase in heat dissipation because of dipolar interaction with ferromagnetic nanoparticles~\cite{zubarev2018}. In the case of weak and negligible dipolar interaction strength, the rapid decrease of $E^{}_H$ with $T$ for superparamagnetic nanoparticle is in perfect agreement with Carrey {\it et al.}~\cite{carrey2011}. We could not compare our results in the presence of dipolar interactions as they have concentrated only on $\lambda=0.0$. Therefore, our results could be used as a benchmark in this context. The decrease of hysteresis loop area with temperature for superparamagnetic nanoparticles is also in qualitative agreement with the experimental works of Hu {\it et al.}~\cite{hu2019}. The coercive field $\mu^{}_oH^{}_c$ variation with $D$ and $T$ is found to be exactly same as that of $E^{}_H$ variation. So, we have not shown the curves for $\mu^{}_oH^{}_c$ variation to avoid duplications. It is in also in perfect agreement with the work of Carrey {\it et al.} with $\lambda=0.0$~\cite{carrey2011}. These results can be used in optimizing heat dissipation by selecting precise values materials parameters such particle size, dipolar interaction strength and temperature. \section{Summary and Conclusion} Now, we summarize and discuss the main results of the present work. The hysteresis curve follows the Stoner-Wohlfarth model in the absence of dipolar interaction and temperature, irrespective of particle size, as expected~\cite{stoner1948}. The perfect agreement between simulation and theoretical model also validates the kMC method used. In the presence of sufficient thermal energy, we observe an extremely small hysteresis loop area for the smaller particle ($D\approx8-16$ nm) and negligible dipolar interaction, indicating the dominance of superparamagnetic character. Remarkably, the hysteresis loop area is significant with ferromagnetic particle ($D>16$ nm) and is the same as that of Stoner and Wohlfarth particle even at high value of temperature and weak or negligible dipolar interaction. Baker {\it et al.} also observed substantial hysteresis loss for ferromagnetic nanoparticle of Fe$_2$O$_3$~\cite{baker2006}. It is also in perfect agreement with the experimental works of Hergt {\it et al.}~\cite{hergt2005}. The dipolar interaction induces ferromagnetic coupling between the magnetic moments, which moves the underlying system from superparamagnetic regime to a ferromagnetic state even at sufficiently high value of temperature. Therefore, the dipolar coupling of enough strength enhances the hysteresis loop area significantly even at $T=300$ K irrespective of particle size. These observations are also in qualitative agreement with Zubarev {\it et al.}~\cite{zubarev2019}. The hysteresis loop area is greatly hampered by the thermal fluctuations, which is quite evident with superparamagnetic particle and negligible dipolar interaction. Remarkably, the hysteresis loop area depends weakly on temperature with ferromagnetic nanoparticle even in the absence of dipolar interaction. The same trend is also observed in the case of superparamagnetic nanoparticle with sufficient dipolar interaction. The coercive field $\mu^{}_oH^{}_c$ is found to be an essential quantifier to understand the hysteresis response of these nanosystems. In the case of weak magnetic interaction and small particle size, $\mu^{}_oH^{}_c$ decreases rapidly with temperature. It is due to fact that MNPs change their magnetic state from blocked to superparamagnetic state very rapidly with an increase in thermal fluctuations. Pauly {\it et al.} also found similar behaviour of $\mu^{}_oH^{}_c$ with $T$ using experiments~\cite{pauly2012}. Because of significant ferromagnetic coupling due to the dipolar interaction, magnetic nanoparticles remain in the blocked state even at a tremendous value of temperature. Therefore, $\mu_oH^{}_c$ decreases very weakly as a function of temperature in the presence of considerable dipolar interaction strength. The same trend is observed with ferromagnetic particles, even in an assembly of non-interacting MNPs. In addition to $\mu^{}_oH^{}_c$, blocking temperature $T^{}_B$ is also a useful measure to probe the hysteresis mechanism as a function of particle size and dipolar interaction. So, we extracted $T^{}_B$ from the simulated hysteresis curves using Garcia-Otero {\it et al.} model for the temperature dependence of the coercive field~\cite{garcia1998}. The so-obtained $T^{}_B$ increases with particle size and dipolar interaction strength. Pauly {\it et al.} also observed an enhancement in $T^{}_B$ with particle size~\cite{pauly2012}. Remarkably, $T^{}_B$ exceeds the highest simulation temperature considered in the present work ($T=300$ K) for ferromagnetic nanoparticles. Therefore, we observe the Stoner and Wohlfarth-like behaviour even at $T=300$ K and negligible dipolar interaction for such nanoparticles. In general, two distinct regimes are depending on the relative strength of $T^{}_B$ and simulation temperature $T$. For $T<T^{}_B$, the energy barriers trap the magnetic moments associated with particles in metastable orientation, resulting in a blocked state. On the contrary, the thermal energy $k^{}_BT$ overcomes the energy barrier for $T>T^{}_B$ resulting in the well-known superparamagnetic regime. The fitting of simulated values of coercive field $\mu^{}_oH^{}_c$ with Garcia-Otero {\it et al.} model also suggests that $T^\alpha$ dependence of coercive field with $\alpha=0.75$ deviates significantly with particle size and dipolar interaction strength. The exponent $\alpha$ is found to increase with an increase in $\lambda$ and $D$. So, $\alpha$ should not be considered constant; otherwise, it may estimate incorrect values of $T^{}_B$ and $K^{}_{\mathrm {eff}}$. To conclude, we have systematically analysed the hysteresis mechanism in ordered arrays of magnetic nanoparticles as a function of particle size extensively. We have also investigated the dependence of hysteresis response on dipolar interaction and temperature. Our results suggest that hysteresis response of the underlying system depends critically on these parameters. Our results strengthen the fact that ferromagnetic nanoparticles can be one of the best candidates for magnetic hyperthermia irrespective of the shape of the assembly. In these contexts; we have also explained a variety of experimental studies. So, the observations made in the present work should also help experimentalist in choosing the suitable value of various parameters such as particle size, dipolar interaction strength, the magnetic field to obtain desired heating for different applications such as magnetic hyperthermia, drug delivery, etc. It should also provide a better understanding of magnetic hyperthermia to researchers working on this subject. Therefore, we believe that the present work should stimulate joint efforts in computational, experimental and analytical research for these precious nano heaters. \bibliographystyle{h-physrev}
\section{Introduction} \label{intro} Preserving human languages by text has been influencing the human cognitive growth, and it is also considered as the primary medium for preservation of natural language processing (NLP). However, research on how human brains retrieve and process the meaning from text-based languages is relatively few. Previous research \cite{Mason06} has used custom reading materials to explore particular facets of linguistic material such as event-related potentials (ERPs) and eye motions. Later on, using Electroencephalography (EEG) in conjunction with eye-tracking has become significant measures to study the temporal dynamics of natural sentence reading, because EEG signals have excellent time resolution and comparatively low costs to be recorded \cite{Dimigen11,Loberg18,HollensteinNZhange19}. For example, a recent study \cite{Pfeiffer20} indicated that text-based emotion analyze could be significantly enhanced by computing fixation-related potentials (FRPs) as one of ERPs on a neurocognitive dataset named ZuCo 1.0 \cite{Hollenstein18} that recorded from human readers during naturalistic reading. To measure event-related synchronisations, \cite{Roach2008} quantified the timeline of event-related spectral perturbations (ERSPs) that could generate brain dynamic changes in amplitude of the broadband EEG frequency spectrum. However, the studies above only focused on wording or naive reading tasks without comprehensive event-related brain dynamic analyze, so it is still unknown how ERP and ERPS changes in human natural sentence reading. \textbf{In this work, we investigated EEG brain dynamics of ERPs and ERSPs through both channel and component forms for the total of 18 subjects during a recent natural sentence reading task, ZuCo 2.0} \citep{HollensteinZ219}. This task supports to analyse the differences in cognitive processing between natural reading, and also allows us to precisely extract the EEG signals for sentence-level processing and detecting human retrieving lexical and semantic information in natural sentence reading. \begin{figure*}[htbp] \begin{minipage}{\linewidth} \includegraphics[width=\linewidth]{figure0.pdf} \caption{Natural Sentence Reading Experiment. (a) Natural reading phases. (b) Each sentence onset and finished state and switching to the next sentence by control pad. The sentence reading and sentence switching were performed alternately, and each sentence switching lasted 100 ms, while sentence reading lasted from 1.2 second to 12 seconds. (c) Location map of multi-channel EEG. } \label{figpdm} \end{minipage} \end{figure*} \section{Related Work} \textbf{ERPs} \cite{Frank13,Frank15} are electrical potential responses or reaction measured in relation to an event, such as reading each sentence in our study. For example, N200 is a negative wave in connection with a baseline because it occurs at around 200 to 350 ms after the onset of the first word in a sentence, but it may cause some mismatch issues after an infrequent change in the case of visual stimuli \cite{Brattico2006}. The recent study \cite{Pfeiffer20} has indicated that text-based emotion analyze can be significantly enhanced by using FRPs to analyze human readers during naturalistic reading, but it only focused on the potentials of word-based reading. Also, \cite{Hale18, Sharmistha19} applied ERPs as a neuroimage feature to retrieve the lexical and semantic information from the natural language content for designing cognitive word embedding evaluation in NLP, but still, there has some significant loss possibly due to not precise patterns. In terms of \textbf{ERSPs}, one study \cite{zhang2017investigation} investigated emotion and working memory analyze to reading, but it did not touch the natural sentence reading tasks. \section{Method} \subsection{Experiment Paradigm and Data} The natural sentence reading experiment and data was performed and collected in ZuCo 2.0 \citep{HollensteinZ219}, which recorded from 18 healthy subjects who are all native English speakers originating from Canada, USA, UK or Australia. The sentences were displayed one by one at the same position on the monitor during the natural reading paradigm. The text was displayed on a light grey backdrop in black with font size 20-point Arial, resulting in a letter height of 0.8 mm or 0.674 $^{\circ}$. During the entire reading task, a sum of 80 letters or 13 words were presented per line, and the subjects who participate in this natural reading experiment read each sentence at their own speed. In the task, the 349 sentences were displayed one by one at the same position on the monitor during the natural reading task for each subject. The recording devices include both 128-channel EEG and eye-tracking that used to collect brain signals and eye motions when subjects conducted natural sentence reading, as shown in \textbf{Fig. 1}. In this work, one trial was considered as reading each sentence, and there are a total of 6,282 trials (18 subjects multiplied by 349 sentences in the natural reading paradigm). \subsection{Data Processing and analyze} \paragraph{EEG Processing} The raw EEG data were loaded by EEGLAB \citep{EEGLAB04} with the removal of bad electrodes, keeping 105 EEG channels. We then removed electromyogram (EMG) and electrooculogram (EOG) artifacts and minimised other artifacts by setting a finite impulse response filter 1-50Hz. Next, we conducted the EEG electrodes re-referencing by the vertex electrode Cz, and the re-referenced EEG data were measured by Z Score formula normalisation. Furthermore, we conducted the data segmentation to extract all trials where two time-locking events (sentence onset event and sentence finished event) were selected. What is more, the trial limits were 100 ms before starting sentence reading (-100 ms, act as the baseline) to 1200 ms after the reading event (+1200 ms), because the sentence interval sets 100 ms and the minimum interval between sentence onset and sentence finished is 1223 ms. In addition, to represent synchronous brain activities, decomposing the pre-processed data by Independent Component analyze (ICA) is an effective approach to investigate the diversity of source information typically contained in EEG data. In this study, we merged a total of 18 pre-processed single-subject EEG data and conducted the statistical comparisons by running the merged-subjects ICA decomposition to find the potential similar independent component sources across 18 subjects. \paragraph{EEG analyze: ERP/ERSP in channel-based and component-based forms} The 1-D event latency scalp maps and 2-D ERP/ERSP images could produce to intuitively discover the brain dynamics of human natural sentence reading in both forms of channel-based and component-based EEG patterns, respectively. In terms of ERPs, to analyse the channel-based ERPs, we chose the most relevant channel to the corresponding events from the scalp map where the power is concentrated among a total of 18 subjects. Meanwhile, to analyse component-based ERPs, we calculated and selected the power spectrum for isolated components to identify which component contributes the most to the ERPs. For ERSPs, similarly, we determined the channel which is most relevant to the corresponding events and analysed spectral perturbations, and then calculated and selected a component that the source contributes the most to the task. Please note that the significance level sets 0.01 with removing the baseline for plotting the ERSPs in this study. \section{Results} Our results show the comprehensive group analyze and visualisation of 18 subjects of EEG dynamics for natural sentence reading, including 1-D event latency potentials plots and 2-D ERP and ERSP images in channel-based and component-based forms. \paragraph{Channel/Component 1-D event latency potentials} As shown in \textbf{Fig.~\ref{figlan}}, from 1-D event latency potentials among all subjects, we found highest peaks at 162 ms from the onset natural sentence reading, which may indicate that a significant EEG dynamic (particular in reduced power in the occipital region) approaching 200 ms (N200) and this finding also supported by evidence for the early latency of lexical and semantic information retrieval in visual word recognition \citep{Hauk12,Pfeiffer20}. Thus, we assume that the human start retrieves lexical and semantic information near-simultaneously at the central occipital region (Oz channel) within 200 ms of the sentence reading onset. \begin{figure}[!htbp] \begin{minipage}{\columnwidth} \includegraphics[width=\linewidth]{figure1.pdf} \caption{Channel-based 1-D event latency potientials with the scalp map among a total of 18 subjects for natural sentence reading. } \label{figlan} \end{minipage} \end{figure} Following above, we also extracted 7 most significant component maps from 1-D event latency potentials, as shown in \textbf{Fig.~\ref{figcomp}}, which showed the occipital component contributed most to the task (marked as rank 1). The results in the section are used for determining that the occipital region is the most contribution area related to the natural sentence reading task, because the occipital results displayed the strongest response in the text-based retrieval of sentiment information than that of the other regions of the brain. \begin{figure}[!htbp] \begin{minipage}{\columnwidth} \includegraphics[width=\linewidth]{figure2.pdf} \caption{Components-based 1-D event latency potientials with the scalp map among a total of 18 subjects for natural sentence reading.} \label{figcomp} \end{minipage} \end{figure} \paragraph{Channel/Component 2-D ERP Results} As shown in \textbf{Fig.~\ref{figerp}-A}, we located the channel Oz as the central occipital region to plot channel-based ERP results, which present the negative power (marked as the blue colour) around 200 ms in short reaction time (between 1-2000 trials). However, from the occipital component-based ERP image as shown in \textbf{Fig.~\ref{figerp}-B}, we observed the positive power (marked as the red colour) around 200 ms in medium (between 2000-4000 trials) and long (between 4000-6000 trials) reaction times. This is a new finding that may be beneficial for retrieving the diverse patterns of brain visual reading processing. \begin{figure}[!htbp] \begin{minipage}{\linewidth} \includegraphics[width=\linewidth]{figure3.pdf} \caption{2-D ERP results for natural sentence reading in channel-based (Oz) and component-based (occipital) forms. } \label{figerp} \end{minipage} \end{figure} \paragraph{Channel/Component 2-D ERSP Results} In terms of the channel-based and component-based ERSPs in the occipital region, they demonstrated a similar performance around 200 ms, as shown in \textbf{Fig.~\ref{figersp}}. The Oz-channel ERSP as presented in \textbf{Fig.~\ref{figersp}-A}, at the time of around 200ms, demonstrated increased high alpha (10-12Hz), high beta (25-30Hz), and high gamma (40-50Hz) power, and decreased low beta (13-25Hz) and low gamma (30-40Hz) power, relative to the baseline (the interval of sentence reading). In terms of the occipital component-channel ERSP around 200 ms, \textbf{Fig.~\ref{figersp}-B} presented increased high alpha (10-12Hz) and high gamma (40-50Hz) power, and decreased low beta (13-25Hz) and low gamma (30-40Hz) power, relative to the baseline (the interval of sentence reading). Furthermore, ERSP results in the occipital region around 200 ms primarily consist with the longer latencies covering from 300 ms to 1200 ms (the ending point of each sentence reading), particularly in the enhanced high gamma (40-50Hz) and the reduced low beta (13-25Hz) and low gamma (30-40Hz) power spectral, relative to the baseline, suggesting the patterns for retrieving lexical and semantic information in the natural sentence reading task. \begin{figure}[!htbp] \begin{minipage}{\linewidth} \includegraphics[width=\linewidth]{figure4.pdf} \caption{ 2-D ERSP results for natural sentence reading in channel-based (Oz) and component-based (occipital) forms.} \label{figersp} \end{minipage} \end{figure} \section{Conclusion} Our study successfully identified the spatiotemporal neural dynamics of sentiment processing during the naturalistic reading of English sentences. Combining high-density EEG and eye-tracking data, we provide clear evidence that essential processes of lexical and semantic information retrieval occur around the 200 ms of each sentence onset, by retrieving EEG patterns of negative power and positive power in short and long reaction times and increased high gamma and decreased low beta and low gamma power. We believe that these EEG dynamics found from this study for human language understanding could benefit for semantic representations of sentence reading and cognitive evaluation modelling for NLP. \clearpage \bibliographystyle{unsrtnat} \section{Introduction} \label{intro} Preserving human languages by text has been influencing the human cognitive growth, and it is also considered as the primary medium for preservation of natural language processing (NLP). However, research on how human brains retrieve and process the meaning from text-based languages is relatively few. Previous research \cite{Mason06} has used custom reading materials to explore particular facets of linguistic material such as event-related potentials (ERPs) and eye motions. Later on, using Electroencephalography (EEG) in conjunction with eye-tracking has become significant measures to study the temporal dynamics of natural sentence reading, because EEG signals have excellent time resolution and comparatively low costs to be recorded \cite{Dimigen11,Loberg18,HollensteinNZhange19}. For example, a recent study \cite{Pfeiffer20} indicated that text-based emotion analyze could be significantly enhanced by computing fixation-related potentials (FRPs) as one of ERPs on a neurocognitive dataset named ZuCo 1.0 \cite{Hollenstein18} that recorded from human readers during naturalistic reading. To measure event-related synchronisations, \cite{Roach2008} quantified the timeline of event-related spectral perturbations (ERSPs) that could generate brain dynamic changes in amplitude of the broadband EEG frequency spectrum. However, the studies above only focused on wording or naive reading tasks without comprehensive event-related brain dynamic analyze, so it is still unknown how ERP and ERPS changes in human natural sentence reading. \textbf{In this work, we investigated EEG brain dynamics of ERPs and ERSPs through both channel and component forms for the total of 18 subjects during a recent natural sentence reading task, ZuCo 2.0} \citep{HollensteinZ219}. This task supports to analyse the differences in cognitive processing between natural reading, and also allows us to precisely extract the EEG signals for sentence-level processing and detecting human retrieving lexical and semantic information in natural sentence reading. \begin{figure*}[htbp] \begin{minipage}{\linewidth} \includegraphics[width=\linewidth]{figure0.pdf} \caption{Natural Sentence Reading Experiment. (a) Natural reading phases. (b) Each sentence onset and finished state and switching to the next sentence by control pad. The sentence reading and sentence switching were performed alternately, and each sentence switching lasted 100 ms, while sentence reading lasted from 1.2 second to 12 seconds. (c) Location map of multi-channel EEG. } \label{figpdm} \end{minipage} \end{figure*} \section{Related Work} \textbf{ERPs} \cite{Frank13,Frank15} are electrical potential responses or reaction measured in relation to an event, such as reading each sentence in our study. For example, N200 is a negative wave in connection with a baseline because it occurs at around 200 to 350 ms after the onset of the first word in a sentence, but it may cause some mismatch issues after an infrequent change in the case of visual stimuli \cite{Brattico2006}. The recent study \cite{Pfeiffer20} has indicated that text-based emotion analyze can be significantly enhanced by using FRPs to analyze human readers during naturalistic reading, but it only focused on the potentials of word-based reading. Also, \cite{Hale18, Sharmistha19} applied ERPs as a neuroimage feature to retrieve the lexical and semantic information from the natural language content for designing cognitive word embedding evaluation in NLP, but still, there has some significant loss possibly due to not precise patterns. In terms of \textbf{ERSPs}, one study \cite{zhang2017investigation} investigated emotion and working memory analyze to reading, but it did not touch the natural sentence reading tasks. \section{Method} \subsection{Experiment Paradigm and Data} The natural sentence reading experiment and data was performed and collected in ZuCo 2.0 \citep{HollensteinZ219}, which recorded from 18 healthy subjects who are all native English speakers originating from Canada, USA, UK or Australia. The sentences were displayed one by one at the same position on the monitor during the natural reading paradigm. The text was displayed on a light grey backdrop in black with font size 20-point Arial, resulting in a letter height of 0.8 mm or 0.674 $^{\circ}$. During the entire reading task, a sum of 80 letters or 13 words were presented per line, and the subjects who participate in this natural reading experiment read each sentence at their own speed. In the task, the 349 sentences were displayed one by one at the same position on the monitor during the natural reading task for each subject. The recording devices include both 128-channel EEG and eye-tracking that used to collect brain signals and eye motions when subjects conducted natural sentence reading, as shown in \textbf{Fig. 1}. In this work, one trial was considered as reading each sentence, and there are a total of 6,282 trials (18 subjects multiplied by 349 sentences in the natural reading paradigm). \subsection{Data Processing and analyze} \paragraph{EEG Processing} The raw EEG data were loaded by EEGLAB \citep{EEGLAB04} with the removal of bad electrodes, keeping 105 EEG channels. We then removed electromyogram (EMG) and electrooculogram (EOG) artifacts and minimised other artifacts by setting a finite impulse response filter 1-50Hz. Next, we conducted the EEG electrodes re-referencing by the vertex electrode Cz, and the re-referenced EEG data were measured by Z Score formula normalisation. Furthermore, we conducted the data segmentation to extract all trials where two time-locking events (sentence onset event and sentence finished event) were selected. What is more, the trial limits were 100 ms before starting sentence reading (-100 ms, act as the baseline) to 1200 ms after the reading event (+1200 ms), because the sentence interval sets 100 ms and the minimum interval between sentence onset and sentence finished is 1223 ms. In addition, to represent synchronous brain activities, decomposing the pre-processed data by Independent Component analyze (ICA) is an effective approach to investigate the diversity of source information typically contained in EEG data. In this study, we merged a total of 18 pre-processed single-subject EEG data and conducted the statistical comparisons by running the merged-subjects ICA decomposition to find the potential similar independent component sources across 18 subjects. \paragraph{EEG analyze: ERP/ERSP in channel-based and component-based forms} The 1-D event latency scalp maps and 2-D ERP/ERSP images could produce to intuitively discover the brain dynamics of human natural sentence reading in both forms of channel-based and component-based EEG patterns, respectively. In terms of ERPs, to analyse the channel-based ERPs, we chose the most relevant channel to the corresponding events from the scalp map where the power is concentrated among a total of 18 subjects. Meanwhile, to analyse component-based ERPs, we calculated and selected the power spectrum for isolated components to identify which component contributes the most to the ERPs. For ERSPs, similarly, we determined the channel which is most relevant to the corresponding events and analysed spectral perturbations, and then calculated and selected a component that the source contributes the most to the task. Please note that the significance level sets 0.01 with removing the baseline for plotting the ERSPs in this study. \section{Results} Our results show the comprehensive group analyze and visualisation of 18 subjects of EEG dynamics for natural sentence reading, including 1-D event latency potentials plots and 2-D ERP and ERSP images in channel-based and component-based forms. \paragraph{Channel/Component 1-D event latency potentials} As shown in \textbf{Fig.~\ref{figlan}}, from 1-D event latency potentials among all subjects, we found highest peaks at 162 ms from the onset natural sentence reading, which may indicate that a significant EEG dynamic (particular in reduced power in the occipital region) approaching 200 ms (N200) and this finding also supported by evidence for the early latency of lexical and semantic information retrieval in visual word recognition \citep{Hauk12,Pfeiffer20}. Thus, we assume that the human start retrieves lexical and semantic information near-simultaneously at the central occipital region (Oz channel) within 200 ms of the sentence reading onset. \begin{figure}[!htbp] \begin{minipage}{\columnwidth} \includegraphics[width=\linewidth]{figure1.pdf} \caption{Channel-based 1-D event latency potientials with the scalp map among a total of 18 subjects for natural sentence reading. } \label{figlan} \end{minipage} \end{figure} Following above, we also extracted 7 most significant component maps from 1-D event latency potentials, as shown in \textbf{Fig.~\ref{figcomp}}, which showed the occipital component contributed most to the task (marked as rank 1). The results in the section are used for determining that the occipital region is the most contribution area related to the natural sentence reading task, because the occipital results displayed the strongest response in the text-based retrieval of sentiment information than that of the other regions of the brain. \begin{figure}[!htbp] \begin{minipage}{\columnwidth} \includegraphics[width=\linewidth]{figure2.pdf} \caption{Components-based 1-D event latency potientials with the scalp map among a total of 18 subjects for natural sentence reading.} \label{figcomp} \end{minipage} \end{figure} \paragraph{Channel/Component 2-D ERP Results} As shown in \textbf{Fig.~\ref{figerp}-A}, we located the channel Oz as the central occipital region to plot channel-based ERP results, which present the negative power (marked as the blue colour) around 200 ms in short reaction time (between 1-2000 trials). However, from the occipital component-based ERP image as shown in \textbf{Fig.~\ref{figerp}-B}, we observed the positive power (marked as the red colour) around 200 ms in medium (between 2000-4000 trials) and long (between 4000-6000 trials) reaction times. This is a new finding that may be beneficial for retrieving the diverse patterns of brain visual reading processing. \begin{figure}[!htbp] \begin{minipage}{\linewidth} \includegraphics[width=\linewidth]{figure3.pdf} \caption{2-D ERP results for natural sentence reading in channel-based (Oz) and component-based (occipital) forms. } \label{figerp} \end{minipage} \end{figure} \paragraph{Channel/Component 2-D ERSP Results} In terms of the channel-based and component-based ERSPs in the occipital region, they demonstrated a similar performance around 200 ms, as shown in \textbf{Fig.~\ref{figersp}}. The Oz-channel ERSP as presented in \textbf{Fig.~\ref{figersp}-A}, at the time of around 200ms, demonstrated increased high alpha (10-12Hz), high beta (25-30Hz), and high gamma (40-50Hz) power, and decreased low beta (13-25Hz) and low gamma (30-40Hz) power, relative to the baseline (the interval of sentence reading). In terms of the occipital component-channel ERSP around 200 ms, \textbf{Fig.~\ref{figersp}-B} presented increased high alpha (10-12Hz) and high gamma (40-50Hz) power, and decreased low beta (13-25Hz) and low gamma (30-40Hz) power, relative to the baseline (the interval of sentence reading). Furthermore, ERSP results in the occipital region around 200 ms primarily consist with the longer latencies covering from 300 ms to 1200 ms (the ending point of each sentence reading), particularly in the enhanced high gamma (40-50Hz) and the reduced low beta (13-25Hz) and low gamma (30-40Hz) power spectral, relative to the baseline, suggesting the patterns for retrieving lexical and semantic information in the natural sentence reading task. \begin{figure}[!htbp] \begin{minipage}{\linewidth} \includegraphics[width=\linewidth]{figure4.pdf} \caption{ 2-D ERSP results for natural sentence reading in channel-based (Oz) and component-based (occipital) forms.} \label{figersp} \end{minipage} \end{figure} \section{Conclusion} Our study successfully identified the spatiotemporal neural dynamics of sentiment processing during the naturalistic reading of English sentences. Combining high-density EEG and eye-tracking data, we provide clear evidence that essential processes of lexical and semantic information retrieval occur around the 200 ms of each sentence onset, by retrieving EEG patterns of negative power and positive power in short and long reaction times and increased high gamma and decreased low beta and low gamma power. We believe that these EEG dynamics found from this study for human language understanding could benefit for semantic representations of sentence reading and cognitive evaluation modelling for NLP. \clearpage \bibliographystyle{unsrtnat}
\section{\textbf{Introduction}} An \emph{isoparametric hypersurface} $M^n$ in the unit sphere $S^{n+1}(1)$ is a hypersurface with constant principal curvatures. Such a hypersurface always occurs as part of a family of the level hypersurfaces of an \emph{isoparametric function} $f$, which is a smooth function on $S^{n+1}(1)$ such that \begin{equation}\label{ab} \left\{ \begin{array}{ll} |\nabla f|^2= b(f),\\ \,\,~\triangle f~~=a(f), \end{array}\right. \end{equation} where $\nabla f$ and $\triangle f$ are the gradient and Laplacian of $f$, respectively; $b$ is a smooth function on $\mathbb{R}$, and $a$ is a continuous function on $\mathbb{R}$. As is well known, an isoparametric family consists of regular parallel hypersurfaces with constant mean curvatures and two singular level sets carrying manifold structure, which are called focal submanifolds. Denote the number of distinct principal curvatures of a closed isoparametric hypersurface $M^n$ by $g$, and the principal curvatures by $\lambda_1>\lambda_2>\cdots>\lambda_g$ with multiplicities $m_1,\ldots, m_g$, respectively. Recall a celebrated result of M{\"u}nzner that $g$ can be only $1, 2, 3, 4$ or $6$, $m_i=m_{i+2}$ (subscripts mod $g$), the principal curvatures could be written as $$\lambda_i=\cot(\theta+\frac{i-1}{g}\pi)$$ with $\theta\in (0, \frac{\pi}{g})$ $(i=1,\ldots,g)$, and a closed, connected isoparametric hypersurface $M$ must be a level set of the restriction to $S^{n+1}(1)$ of a homogeneous polynomial $F: \mathbb{R}^{n+2} \rightarrow \mathbb{R}$ of degree $g$ satisfying the \emph{Cartan-M{\"u}nzner equations:} \begin{equation}\label{ab} \left\{ \begin{array}{ll} |\nabla F|^2= g^2|x|^{2g-2}, \\ ~~~~\triangle F~~=\frac{m_2-m_1}{2}g^2|x|^{g-2}. \end{array}\right. \end{equation} Such a polynomial $F$ is called the \emph{Cartan-M{\"u}nzner polynomial}, and $f=F~|_{S^{n+1}(1)}$ takes values in $[-1, 1]$. For $-1 < t < 1$, $f^{-1}(t)$ is an isoparametric hypersurface. The level sets $M_+=f^{-1}(1)$ and $M_-=f^{-1}(-1)$ are the two focal submanifolds with codimensions $m_1+1$ and $m_2+1$ in $S^{n+1}(1)$, which are proved to be minimal submanifolds of the unit sphere $S^{n+1}(1)$ (c.f. \cite{No73}, \cite{Mun80}, \cite{Mun81}, \cite{Wan87}, \cite{GT14}). It is noteworthy that Fang \cite{Fa17} gave a simplified proof for M\"{u}nzner's result on the restriction of $g$, based on the work of \cite{GH87}. With much effort of many geometers through many years, the classification of the isoparametric hypersurfaces in $S^{n+1}(1)$ was accomplished recently, which settles the 34th problem of S.T.Yau's ``Open problems in Geometry". Clearly, when $g=1$, an isoparametric hypersurface in $S^{n+1}(1)$ is a hypersphere, and the focal submanifolds are just two points. When $g=2$, an isoparametric hypersurface in $S^{n+1}(1)$ is isometric to the generalized Clifford torus $S^p(r)\times S^q(s)$ with $r^2+s^2=1$ and $p+q=n$, and the focal submanifolds are isometric to $S^p(1)$ and $S^q(1)$, respectively. When $g=3$, E. Cartan showed that the multiplicities must obey $m_1=m_2=m=1,2,4$ or $8$, and the focal submanifolds are Veronese embeddings of $\mathbb{F}P^2$ in $S^{3m+1}(1)$, where $\mathbb{F}=\mathbb{R}, \mathbb{C}, \mathbb{H}, \mathbb{O}$ corresponding to $m=1,2,4, 8$. Meanwhile, the isoparametric hypersurfaces are tubes of constant radius over the focal submanifolds. When $g=4$, the most complicated and beautiful case, the isoparametric hypersurfaces are either of OT-FKM type or homogeneous with $(m_1, m_2) =(2, 2), (4, 5)$ (c.f. \cite{CCJ07}, \cite{Imm08}, \cite{Chi11}, \cite{Chi13}, \cite{Chi20}). When $g=6$, the multiplicities satisfy $m_1=m_2=m=1$ or $2$ and the isoparametric hypersurfaces are homogeneous (c.f. \cite{DN85}, \cite{Miy13}, \cite{Miy16}). Now we review the isoparametric family of OT-FKM type, which holds up almost all the cases with $g=4$. Given a symmetric Clifford system $\{P_0,\cdots,P_m\}$ on $\mathbb{R}^{2l}$, \emph{i.e.} $P_{\alpha}$'s are symmetric matrices satisfying $P_{\alpha}P_{\beta}+P_{\beta}P_{\alpha}=2\delta_{\alpha\beta}I_{2l}$, Ferus, Karcher and M\"{u}nzner (\cite{FKM81}) generalized Ozeki-Takeuchi's result (\cite{OT75}, \cite{OT76}) to construct a Cartan-M\"{u}nzner polynomial $F$ of degree $4$ on $\mathbb{R}^{2l}$ \begin{eqnarray}\label{FKM isop. poly.} &&\qquad F:\quad \mathbb{R}^{2l}\rightarrow \mathbb{R}\nonumber\\ &&F(x) = |x|^4 - 2\displaystyle\sum_{\alpha = 0}^{m}{\langle P_{\alpha}x,x\rangle^2}. \end{eqnarray} It is not difficult to verify that $f=F|_{S^{2l-1}(1)}$ is an isoparametric function on $S^{2l-1}(1)$, which is called \emph{OT-FKM type}. The multiplicity pair is $(m_1, m_2)=(m, l-m-1)$ provided $m>0$ and $l-m-1>0$, where $l=k\delta(m)$, $k$ being a positive integer and $\delta(m)$ the dimension of the irreducible module of the Clifford algebra $\mathcal{C}_{m-1}$ which is valued as: \vspace{1mm} \begin{center} \begin{tabular}{|c|c|c|c|c|c|c|c|c|c|} \hline $m$ & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & $\cdots$ $m$+8 \\ \hline $\delta(m)$ & 1 & 2 & 4 & 4 & 8 & 8 & 8 & 8 & ~16$\delta(m)$\\ \hline \end{tabular} \end{center} \vspace{1mm} The focal submanifolds $M_+=f^{-1}(1)$ and $M_-=f^{-1}(-1)$ are minimal submanifolds with codimensions $m_1 +1$ and $m_2 +1$ in $S^{2l-1}(1)$. It was proved in \cite{FKM81} that, when $m\not \equiv 0~ (mod~4)$, there exists exactly one kind of OT-FKM type isoparametric family. When $m\equiv 0~(mod ~4)$, there are two kinds of OT-FKM type isoparametric families which are distinguished by $\mathrm{Trace}(P_0P_1\cdots P_m)$. Namely, the family with $P_0P_1\cdots P_m=\pm Id$, where without loss of generality we take the $+$ sign, which is called the \emph{definite} family, and the others with $P_0P_1\cdots P_m\neq\pm Id$, which are called \emph{indefinite}. There are exactly $[\frac{k}{2}]$ non-congruent indefinite families. In this paper, we aim to give a systematic and comprehensive study on topological and geometric properties of isoparametric hypersurfaces and their focal submanifolds. The main motivation is to show that, there are still many interesting and important problems related to the theory of isoparametric hypersurfaces although the classification of isoparametric hypersurfaces in unit spheres has been accomplished. Firstly, we focus on the topology of isoparametric family of OT-FKM type, which contain all the inhomogeneous isoparametric families. Based on the work of \cite{FKM81}, Wang \cite{Wa88} began to study the homotopy, homeomorphism, and diffeomorphism types of isoparametric hypersurfaces and focal submanifolds of OT-FKM type. There has been given some basic results for the topology of the focal submanifold $M_-$ of OT-FKM type, for which we show further illustration in Theorem 2.1 in Section \ref{sec2}. However, his results for the focal submanifold $M_+$ are not complete. In this paper, we firstly make progress on this problem. According to \cite{Wa88} and \cite{QT16}, $M_+$ is an $S^{l-m-1}$-bundle over $S^{l-1}$. Denote by $\eta$ the associated vector bundle of rank $l-m$ over $S^{l-1}$. Concerning its triviality, we have a complete result. \vspace{2mm} \noindent\textbf{Theorem 2.2.} The bundle \emph{$\eta$ is a trivial bundle if and only if $(m_1, m_2)=(1, 2), (2, 1), (1, 6)$, $(6, 1)$, $(2, 5), (5, 2), (3, 4), $ or the indefinite case of $(4, 3)$.} \vspace{2mm} As an application of Theorem \ref{QTY2} and the work of \cite{JW54}, we show the following \vspace{2mm} \noindent\textbf{Theorem 2.3. \emph{~The focal submanifold $M_+$ of OT-FKM type is homotopy equivalent (resp. homeomorphic, diffeomorphic) to $S^{l-1}\times S^{l-m-1}$ if and only if $\eta$ is trivial, i.e., $(m_1, m_2)=(1, 2), (2, 1), (1, 6), (6, 1), (2, 5), (5, 2), (3, 4), $ or the indefinite case of $(4, 3)$.} As we know, the isoparametric hypersurface $M$ of OT-FKM type is diffeomorphic to $M_+\times S^m$ (c.f. \cite{FKM81}). Therefore, Theorem \ref{QTY2} and Theorem \ref{QTY3} induce the following \vspace{2mm} \noindent\textbf{Theorem 2.4.} \emph{An isoparametric hypersurface $M$ of OT-FKM type is homotopy equivalent (resp. homeomorphic, diffeomorphic) to $S^{l-1}\times S^{l-m-1}\times S^m$ if and only if $\eta$ is trivial, namely, $(m_1, m_2)=(1, 2), (2, 1)$, $(1, 6), (6, 1), (2, 5)$, $(5, 2)$, $(3, 4), $ or the indefinite case of $(4, 3)$ .} \vspace{2mm} Recall the Lusternik-Schnirelmann category $cat(X)$ of a topological space $X$ that is defined to be the least number $m$ such that there exists a covering of $X$ by $m+1$ open subsets which are contractible in $X$. Notice that for a subset $A$ in $X$ which is contractible in $X$, $A$ itself may not be contractible or even not be connected with respect to the subspace topology. In \cite{DFN90}, the authors pointed out on P. 234: \emph{Computation of $cat(X)$ presents in general a non-trivial problem, the precise value being ascertained only with great difficulty.} As the second aspect of topological properties, we compute the Lusternik-Schnirelmann category of isoparametric hypersurfaces and focal submanifolds of OT-FKM type. \vspace{2mm} \noindent\textbf{Theorem 2.5.} \emph{Let $M, M_+, M_-$ be the isoparametric hypersurface and focal submanifolds of OT-FKM type in the unit sphere, respectively Then } \emph{ \begin{itemize} \item [(i).] $cat(M_{-})=2$; \\ $cat(M_{+})=2$, if $(m_1, m_2)\neq (8, 7), (9, 6)$, and $M_+$ is not in the following two cases \begin{itemize} \item[(a).] $(m_1, m_2)=(1, 1)$, $cat(M_+)=cat(SO(3))=3$; \item[(b).] $(m_1, m_2)=(4, 3)$ in the definite case, $cat(M_+)=cat(Sp(2))=3$. \end{itemize \end{itemize} \begin{itemize} \item[(ii).] $cat(M)=3$, if $(m_1, m_2)\neq (8, 7), (9, 6)$, and $M$ is not in the following two cases \begin{itemize} \item[(a).] $(m_1, m_2)=(1, 1)$, $cat(M)=4$; \item[(b).] $(m_1, m_2)=(4, 3)$ in the definite case, $cat(M)=4$. \end{itemize} \end{itemize}} \vspace{2mm} \begin{rem} It is still a problem to determine the Lusternik-Schnirelmann category of the focal submanifold $M_+$ of OT-FKM type with $(g, m_1, m_2)=(4, 8, 7)$ or $(4, 9, 6)$. \end{rem} Due to \cite{FKM81}, $M_-$ of OT-FKM type is an $S^{l-1}$-bundle over $S^m$. Denote the associated vector bundle by $\xi$ so $M_-$ is diffeomorphic to $S(\xi)$. Considering another topological aspect--the parallelizability of the isoparametric family of OT-FKM type, we establish \vspace{2mm} \noindent\textbf{Theorem 2.6. \emph{~~Let $M, M_+, M_-$ be the isoparametric hypersurface and focal submanifolds of OT-FKM type, respectively. Then \begin{itemize} \item[(i).] $M_-$ is parallelizable if and only if $M_-$ is s-parallelizable, if and only if $\xi$ is trivial; \item[(ii).] $M_+$ is parallelizable; \item[(iii).] $M$ is parallelizable. \end{itemize}} \vspace{2mm} Next, we turn to the homogeneous cases. We make a detailed investigation of topological properties of homogeneous isoparametric hypersurfaces and focal submanifolds in the unit sphere. For instance, a systematic study on the topological properties of focal submanifolds with $(g, m_1, m_2)=(4, 2, 2)$ and $(g, m_1, m_2)=(4, 4, 5)$ in Theorem \ref{QTY6} and Theorem \ref{QTY7}, respectively. As for the isoparametric families with $g=3$ and $g=6$, we deduce the following \vspace{2mm} \noindent\textbf{Proposition 2.1.} \emph{Let $M$ be the isoparametric hypersurface in $S^{3m+1}$ with $g=3$ and $m_1=m_2=m=1,2,4$ or $8$. Then \begin{itemize} \item[(i).] for $m=1$: $cat(M^3)=cat(SO(3)/\mathbb{Z}_2\oplus \mathbb{Z}_2)=3$ \item[(ii).] for $m=2$: $cat(M^{6})=cat(SU(3)/T^2)=3$ \item[(iii).] for $m=4$: $cat(M^{12})=cat(Sp(3)/Sp(1)^3)=3$ \item[(iv).] for $m=8$: $cat(M^{24})=cat(F_4/Spin(8))=3$. \end{itemize}} \begin{rem} For focal submanifolds of isoparametric hypersurfaces in unit spheres with $g=3$, it is well known that $cat(\mathbb{F}P^2)=2$ for $\mathbb{F}= \mathbb{R}, \mathbb{C}, \mathbb{H}$ or $\mathbb{O}$. \end{rem} \noindent\textbf{Proposition 2.2.} \emph{Let $M$ be the isoparametric hypersurface in $S^{6m+1}$ with $g=6$ and $m_1=m_2=m=1$ or $2$. Then \begin{itemize} \item[(i).] for $m=1$: $cat(M^6)=4$ and $cat(M_{\pm})=3$ \item[(ii).] for $m=2$: $cat(M^{12})=6$ and $cat(M_{\pm})=5$. \end{itemize}} \vspace{2mm} In the second part of this paper, we investigate the intrinsic curvature properties of isoparametric hypersurfaces and focal submanifolds in unit spheres with induced metrics. Since the curvature of the isoparametric family with $g\leq 3$ with induced metric is now very clear (which will be introduced in Section \ref{sec3}), we only need to consider the remaining cases with $g=4, 6$ and prove the following theorem as one of our main results \vspace{2mm} \noindent\textbf{Theorem 3.1.} \emph{For the focal submanifolds of an isoparametric hypersurface in $S^{n+1}(1)$ with $g=4$ or $6$ distinct principal curvatures, \begin{itemize} \item[(i)] When $g=4$, the sectional curvatures of a focal submanifold with induced metric are non-negative if and only if the focal submanifold is one of the following \begin{itemize} \item[(a)] $M_+$ of OT-FKM type with multiplicities $(m_1, m_2)=(2,1), (6,1)$ or $(4,3)$ in the definite case; \item[(b)] $M_-$ of OT-FKM type with multiplicities $(m_1, m_2)=(1, k)$; \item[(c)] the focal submanifold with multiplicities $(m_1, m_2)=(2,2)$ and diffeomorphic to the oriented Grassmannian $\widetilde{G}_2(\mathbb{R}^5)$; \end{itemize} \item[(ii)] When $g=6$, the sectional curvatures of all focal submanifolds with induced metric are not non-negative. \end{itemize}} \vspace{2mm} Furthermore, we also study the Ricci curvatures of isoparametric families in Proposition \ref{Ricci of hyp} and Proposition \ref{Ricci of focal}. The present paper is organized as follows. In Section 2, we will study the topological properties of isoparametric hypersurfaces and focal submanifolds in the unit sphere, dividing the investigation into two subsections for the OT-FKM type and the homogeneous cases, respectively. In Section 3, we will focus on the intrinsic curvature properties of isoparametric families, concentrating on the sectional curvatures of focal submanifolds of OT-FKM type. \section{\textbf{Topology of an isoparametric family}}\label{sec2} In this section, we will study various topological properties of isoparametric hypersurfaces and associated focal submanifolds in unit spheres. We firstly deal with the isoparametric families of OT-FKM type which contain all the inhomogeneous cases, then deal with the homogeneous cases, including the cases with $g=3,6$ and $g=4$, $(m_1, m_2)=(2,2), (4,5)$. \subsection{OT-FKM type} Given a symmetric Clifford system $\{P_0,\cdots,P_m\}$ on $\mathbb{R}^{2l}$ with $l=k\delta(m)$, let $M, M_+, M_-$ be the associated isoparametric hypersurface of OT-FKM type in $S^{2l-1}(1)$, and the two focal submanifolds of codimension $m_1+1$ and $m_2+1$ in $S^{2l-1}(1)$, respectively. \subsubsection{\textbf{Homotopy, homeomorphism, and diffeomorphism types of $M_-$}}\label{M_-} As asserted by Ferus-Karcher-M\"{u}nzner \cite{FKM81} in Theorem 4.2, $M_-$ is an $S^{l-1}$-bundle over $S^m$. Let $\xi$ be the associated vector bundle of rank $l$ over $S^m$. Then $M_-$ is diffeomorphic to $S(\xi)$, the associated sphere bundle of $\xi$. By the proof of Corollary 1 and 2 in \cite{Wa88}, it follows in fact that \noindent\textbf{Theorem of Wang.} \emph{For the vector bundle} $\xi$, \emph{one has} (i). \emph{If} $m=3, 5, 6$ \emph{or} $7$ ($\mathrm{mod}$ $8$), \emph{then} $\xi$ \emph{is trivial.} (ii). \emph{If} $m=1$ or $2$ ($\mathrm{mod}$ $8$), \emph{then} $\xi$ \emph{is trivial if and only if} $k$ \emph{is even.} (iii). \emph{If} $m=0$ ($\mathrm{mod}$ $4$), \emph{then} $\xi$ \emph{is trivial if and only if} $q=0$, \emph{where} $$2q\delta(m)=\mathrm{Tr}(P_0P_1\cdots P_m).$$ Considering the homotopy type, homeomorphism type and diffeomorphism types of $M_-$, we have \begin{thm}\label{QTY1} For the focal submanifold $M_-$ of OT-FKM type, we have \begin{itemize} \item[(i).] If $m=3, 5, 6$ or $7$ $(\mathrm{mod}$ $8)$, then $M_-$ is diffeomorphic to $S^m\times S^{l-1}$.\vspace{2mm} \item[(ii).] If $m=1$ or $2$ $(\mathrm{mod}$ $8)$, then $M_-$ is homotopy equivalent (resp. homeomorphic, diffeomorphic) to $S^m\times S^{l-1}$ if and only if $k$ is even.\vspace{2mm} \item[(iii).] If $m=0$ $(\mathrm{mod}$ $4)$, then $M_-$ is homotopy equivalent to $S^m\times S^{l-1}$ if and only if $q=0$ $(\mathrm{mod}$ $d_m)$, where $d_m$ is the denominator of $B_{m/4}/m$ and $B_{m/4}$ is the $(m/4)$-th Bernoulli number. Moreover, $M_-$ is homeomorphic (resp. diffeomorphic) to $S^m\times S^{l-1}$ if and only if $q=0$. \end{itemize} \end{thm} \begin{proof} Part (i) follows from part (i) of the theorem above, and part (iii) follows from Theorem 1 in \cite{Wa88}. We only need to consider part (ii). If $k$ is even, $\xi$ is trivial and $M_-$ is diffeomorphic to $S^m\times S^{l-1}$ by Theorem of Wang. If $m=1$ and $k$ is odd, $\xi$ is not trivial and $M_-$ is not orientable. Hence, $M_-$ is not homotopy equivalent to $S^1\times S^{l-1}$. If $m>1$ and $k$ is odd, denoted by $\chi(\xi)$ the characteristic map of $\xi$. We know that $\chi(\xi)\in \pi_{m-1}O(l)$ is not zero. Since $\pi_{m-1}O(l)\cong\pi_{m-1}O$ and $\pi_{l+m-1}S^l\cong \pi^S_{m-1}$, it follows from Theorem 1.1 and 1.3 of \cite{Ad66} that $J\chi(\xi)\neq 0$, where $$J: \pi_{m-1}O\rightarrow \pi_{m-1}^{S}$$ is the stable $J$-homomorphism. Then, by Theorem 1.11 of \cite{JW54}, $M_-$ is not homotopy equivalent to $S^m\times S^{l-1}$. Now part (ii) follows. \end{proof} \vspace{3mm} \subsubsection{\textbf{Homotopy, homeomorphism, and diffeomorphism types of $M_+$}} For a given symmetric Clifford system $\{P_0, P_1,..., P_{m}\}$ on $\mathbb{R}^{2l}$, we can choose a set of orthogonal matrices $\{E_1, E_2,..., E_{m-1}\}$ on $\mathbb{R}^l$ with the Euclidean metric, which satisfy $E_{\alpha}E_{\beta}+E_{\beta}E_{\alpha}=-2\delta_{\alpha\beta}Id$\,\ for $1 \leq \alpha,\beta\leq m-1$ and \begin{equation}\label{FKM} \begin{array}{ll} P_0=\left( \begin{array}{cc} Id & 0 \\ 0 & -Id \\ \end{array}\right),\; P_1=\left( \begin{array}{cc} 0 & Id\\ Id & 0 \\ \end{array}\right),\;\vspace{3mm} \\ P_{\alpha}=\left( \begin{array}{cc} 0 & E_{\alpha-1}\\ -E_{\alpha-1} & 0 \\ \end{array}\right), ~\emph{for}~ 2 \leq \alpha\leq m. \end{array} \end{equation} Then \begin{equation}\label{M_+} M_+=\{x\in S^{2l-1}~|~\langle P_0x, x\rangle=\langle P_1x, x\rangle=\cdots=\langle P_mx, x\rangle=0\}. \end{equation} To interpret the topology of $M_+$, we firstly have \begin{lem}\label{bundle}(\cite{Wa88}, \cite{QT16}) Let $\eta$ be the subbundle of $TS^{l-1}$ such that the fiber of $\eta$ at $z\in S^{l-1}$ is the orthogonal complement in $\mathbb{R}^l$ of $m$-plane spanned by $\{z, E_1z,..., E_{m-1}z\}$. Then $M_+$ is diffeomorphic to $S(\eta)$, the associated sphere bundle of $\eta$. \end{lem} \vspace{1mm} \begin{thm}\label{QTY2} The bundle $\eta$ is a trivial bundle if and only if $(m_1, m_2)=(1, 2), (2, 1),\\ (1, 6), (6, 1), (2, 5), (5, 2), (3, 4), $ or the indefinite case of $(4, 3)$. \end{thm} \vspace{1mm} \begin{proof} Firstly, Lemma \ref{bundle} implies that $S^{l-1}$ is parallelizable if $\eta$ is trivial. According to \cite{Ad62}, if $\eta$ is trivial, then $l=2, 4$ or $8.$ Since $m_1=m>0$ and $m_2=l-m-1>0$, it follows that $l\geq m+2\geq 3$. Clearly, when $m\geq 7$, $l\geq m+2\geq 9$, and thus $\eta$ is not trivial. To complete the proof, we still need to consider the case $m\leq 6$. If $m=1$, then $l=k\delta(m)=k$ and $\eta$ is isomorphic to $TS^{l-1}$. For this case, $\eta$ is trivial if and only if $l=k=4$ or $8$. Namely, $(m_1, m_2)=(1, 2)$ or $(1, 6)$. If $m=2$, then $l=k\delta(2)=2k$, $k\geq 2$ and $M_+$ is diffeomorphic to the complex Stiefel manifold $U(k)/U(k-2)$ (c.f. \cite{TXY12}). According to \cite{JW54}, if $U(k)/U(k-2)$ is of the same homotopy type with $S^{2k-1}\times S^{2k-3}$, then $\pi_{4k-1}(S^{2k})$ contains an element whose Hopf invariant is unity. Furthermore, by \cite{Ad60}, it implies that $k=2$ or $4$. Hence, if $\eta$ is trivial, then $k=2$ or $4$. Namely, $(m_1, m_2)=(2, 1)$ or $(2, 5)$. Conversely, for the focal submanifold $M_+$ of OT-FKM type with $(m_1, m_2)=(2, 1)$ or $(2, 5)$, it is clear that $\eta$ is trivial. If $m=3$, then $l=k\delta(3)=4k$ and $k\geq 2$. Thus, if $\eta$ is trivial, then $k=2$. Namely, $(m_1, m_2)=(3, 4)$. Conversely, for the focal submanifold $M_+$ of OT-FKM type with $(m_1, m_2)=(3, 4)$, it follows from $\pi_{6}SO(5)=0$ that $\eta$ is trivial. If $m=4$, then $l=k\delta(4)=4k$ and $k\geq 2$. For this case, $\eta$ is trivial implies $k=2$, that is, $(m_1, m_2)=(4, 3)$. Now, we need to consider the number $q$ which is defined by $q\delta(m)=\mathrm{Tr}(P_0P_1\cdots P_m)$. When $k=2$ and $q=2$, i.e. the definite case of $(4, 3)$, $M_+$ is diffeomorphic to $Sp(2)$ and is not the same homotopy type as $S^7\times S^3$. It means that $\eta$ is not trivial for the definite case. When $k=2$ and $q=0$, i.e. the indefinite case of $(4, 3)$, the symmetric Clifford system can be extended, which implies that $\eta$ is trivial (c.f. \cite{QTY13}, \cite{QT16}) If $m=5$, then $l=k\delta(5)=8k$ and $k\geq 1$. For this case, $\eta$ is trivial implies $k=1$, that is, $(m_1, m_2)=(5, 2)$. Conversely, for the focal submanifold $M_+$ of OT-FKM type with $(m_1, m_2)=(5, 2)$, the symmetric Clifford system can be extended, which implies that $\eta$ is trivial. If $m=6$, then $l=k\delta(6)=8k$ and $k\geq 1$. Similar to the case $m=5$, we have $\eta$ is trivial if and only if $k=1$, i.e. $(m_1, m_2)=(6, 1)$. \end{proof} \vspace{1mm} \begin{thm}\label{QTY3} The focal submanifold $M_+$ of OT-FKM type is homotopy equivalent (resp. homeomorphic, diffeomorphic) to $S^{l-1}\times S^{l-m-1}$ if and only if $\eta$ is trivial. \end{thm} \begin{proof} If $\eta$ is trivial, then it is clear that $M_+$ is homotopy equivalent (resp. homeomorphic, diffeomorphic) to $S^{l-1}\times S^{l-m-1}$. Consequently, the ``only if" part is left to be considered. To complete the work, we will prove that if $M_+$ is homotopy equivalent to $S^{l-1}\times S^{l-m-1}$, then $\eta$ is trivial. Given a symmetric Clifford system $\{P_0,\cdots,P_m\}$ on $\mathbb{R}^{2l}$ with $l=k\delta(m)$, as written in (\ref{M_+}), we have $$M_+=\{x\in S^{2l-1}(1)~ |~\langle P_0x, x\rangle=\langle P_1x, x\rangle =\cdots=\langle P_mx, x\rangle=0\}.$$ Define $$M_1:=\{x\in S^{2l-1}(1)~ |~\langle P_0x, x\rangle=\langle P_1x, x\rangle =0\}.$$ Let $\eta_1$ be the tangent bundle of $S^{l-1}$. Then $M_1=S(\eta_1)$. By virtue of Lemma \ref{bundle}, we obtain $M_+\cong S(\eta)$ and $\eta_1\cong \eta \oplus \bm{\varepsilon}^{m-1}$, where $\bm{\varepsilon}^{m-1}$ is the trivial bundle of rank $m-1$. According to \cite{JW54}, $M_1$ has the same homotopy type with $S^{l-1}\times S^{l-2}$ if and only if $\pi_{2l-1}S^l$ contains an element whose Hopf invariant is unity. On the other hand, it follows from \cite{Ad60} that there is no element of Hopf invariant one in $\pi_{2l-1}S^l$ unless $l=1,2,4$ or $8$. Equivalently, the Whitehead product $[\iota_{l-1}, \iota_{l-1}]$ is non-zero in the homotopy group $\pi_{2l-3}S^{l-1}$ unless $l=1,2,4$ or $8$. In our case, $l-m-1>0$ implies that $l\geq3$. Hence, if $l\neq4$ and $l\neq8$, then $$J\chi(\eta_1)=-[\iota_{l-1}, \iota_{l-1}]\neq 0$$ where $J:\pi_{l-2}SO(l-1)\rightarrow \pi_{2l-3}S^{l-1}$ is the $J$-homomorphism, and $\chi(\eta_1)$ is the characteristic map of $\eta_1$. So we obtain the following commutative diagram up to a sign (c.f. (1.2) and (1.3) of \cite{JW54}) \begin{equation*} \begin{tikzcd} \pi_{l-2}SO(l-m) \ar{r}{i_{*}} \ar{d}{J}& \pi_{l-2}SO(l-1) \ar{d}{J} \\ \pi_{2l-m-2}S^{l-m} \ar{r}{\Sigma^{m-1}}& \pi_{2l-3}S^{l-1} \end{tikzcd} \end{equation*} where $i_{*}$ is the induced homomorphism of the canonical inclusion $i: SO(l-m)\rightarrow SO(l-1)$, and $\Sigma^{m-1}$ is the iterated suspension. Then it follows that $$(\Sigma^{m-1}\circ J)(\chi(\eta))=\pm (J\circ i_{*})(\chi(\eta))=\pm J\chi(\eta_1)\neq 0.$$ Therefore, $M_+$ is not homotopy equivalent to $S^{l-1}\times S^{l-m-1}$ by Theorem 1.11 in the part I of \cite{JW54}. Now we are in a position to consider the two special cases $l=4$ and $8$: If $l=4$, then $4=k\delta(m)$ and $(m, k)=(1, 4)$ or $(2, 2)$, i.e. $(m_1, m_2)=(1, 2)$ or $(2,1)$. For these two cases, by Theorem \ref{QTY2}, $\eta$ is trivial and $M_+$ is always homotopy equivalent to $S^{l-1}\times S^{l-m-1}$. If $l=8$, then $8=k\delta(m)$ and $(m, k)=(1, 8), (2, 4), (3, 2), (4, 2), (5, 1), (6, 1)$, i.e., $(m_1, m_2)=(1, 6), (2, 5), (3, 4), (4, 3), (5, 2), (6, 1)$. Except for the $(4, 3)$ case, it follows from Theorem \ref{QTY2} that $\eta$ is trivial and $M_+$ is homotopy equivalent to $S^{l-1}\times S^{l-m-1}$. Hence, we need only to check the case $(m_1, m_2)=(4, 3)$. If $(m_1, m_2)=(4, 3)$ and $q=0$, then $M_+$ has the same homotopy type with $S^3 \times S^7$ and $\eta$ is trivial. If $(m_1, m_2)=(4, 3)$ and $q=2$, then $M_+$ is not homotopy equivalent to $S^3 \times S^7$ and $\eta$ is not trivial. Now the proof of Theorem \ref{QTY3} is complete. \end{proof} \vspace{3mm} \subsubsection{\textbf{Homotopy, homeomorphism, and diffeomorphism types of $M$}}\hspace{2mm}\label{2.1.3} Let $M$ be an isoparametric hypersurface of OT-FKM type with $(m_1, m_2)=(m, l-m-1)$. As asserted in Theorem 4.2 of \cite{FKM81}, the normal bundle of $M_+$ is trivial and the isoparametric hypersurface $M$ is a trivial sphere bundle over $M_+$, that is, $M$ is diffeomorphic to $M_+\times S^m$. Therefore, the topology of $M_+$ has a more direct bearing from $M$ than that of $M_-$. Conversely, with the foreshadowing of Theorem \ref{QTY2} and \ref{QTY3}, we get the following conclusion \vspace{2mm} \begin{thm}\label{QTY4} An isoparametric hypersurface $M$ of OT-FKM type is homotopy equivalent (resp. homeomorphic, diffeomorphic) to $S^{l-1}\times S^{l-m-1}\times S^m$ if and only if $\eta$ is trivial, namely, $(m_1, m_2)=(1, 2), (2, 1)$, $(1, 6), (6, 1), (2, 5), (5, 2), (3, 4), $ or the indefinite case of $(4, 3)$. \end{thm} \begin{proof} If $\eta$ is trivial, it follows clearly that $M$ is homotopy equivalent (resp. homeomorphic, diffeomorphic) to $S^{l-1}\times S^{l-m-1}\times S^m$. To finish the proof, we will show if $M$ is homotopy equivalent to $S^{l-1}\times S^{l-m-1}\times S^m$, then $\eta$ is trivial. The following fact will be used If $X, Y$ are $1$-connected CW-complexes such that $$H^*(X; \mathbb{Z})\cong H^*(Y; \mathbb{Z})\cong H^*(S^{l-1}\times S^{l-m-1}; \mathbb{Z})$$ with respect to the cohomology ring structures, and $m\neq l-m-1$, then $X$ is homotopy equivalent to $Y$ (denoted by $X\simeq Y$) if and only if $X\times S^m\simeq Y \times S^m$. For readers' convenience, a proof is given as follows. We only need to show if $X\times S^m\simeq Y \times S^m$, then $X\simeq Y$. Let $f: X\times S^m\rightarrow Y \times S^m$ be a given homotopy equivalence. Choosing a fixed point $p_0$ in $S^m$, we get a natural inclusion $i: X \rightarrow X\times S^m, x\mapsto (x, p_0)$. Moreover, let $\pi_{Y}: Y \times S^m \rightarrow Y, (y, p)\mapsto y$ be the projection. Now, considering the composition of maps $X \overset{i}{\rightarrow} X\times S^m \overset{f}{\rightarrow} Y \times S^m \overset{\pi_{Y}}{\rightarrow} Y$, we get a map $\varphi: X\rightarrow Y$. Let $\widetilde{\alpha}, \widetilde{\beta}$ be the generators of $H^{m}(X\times S^m; \mathbb{Z}), H^{l-m-1}(X\times S^m; \mathbb{Z})$ respectively, and $\widetilde{\gamma}$ be one of the generators of $H^{l-1}(X\times S^m; \mathbb{Z})\cong \mathbb{Z}\oplus \mathbb{Z}$ corresponding to $S^{l-1}$. Similarly, let $\alpha, \beta$ be the generators of $H^{m}(Y\times S^m; \mathbb{Z}), H^{l-m-1}(Y\times S^m; \mathbb{Z})$ respectively, and $\gamma$ be one of the generators of $H^{l-1}(Y\times S^m; \mathbb{Z})\cong \mathbb{Z}\oplus \mathbb{Z}$ corresponding to $S^{l-1}$. Then from K\"{u}nneth formula, $\widetilde{\alpha}\widetilde{\beta}$ and $\widetilde{\gamma}$ are exactly two generators of $H^{l-1}(X\times S^m; \mathbb{Z})$. Moreover, $\alpha\beta$ and $\gamma$ are exactly two generators of $H^{l-1}(Y\times S^m; \mathbb{Z})$. Let $f^{*}: H^*(Y\times S^m; \mathbb{Z})\rightarrow H^*(X\times S^m; \mathbb{Z})$ be the induced homomorphism. Since $f: X\times S^m\rightarrow Y \times S^m$ is a homotopy equivalence, it follows that $f^{*}$ is an isomorphism. It implies that $f^{*}(\alpha)=\pm \widetilde{\alpha}$ and $f^{*}(\beta)=\pm \widetilde{\beta}$. Assume $f^{*}(\gamma)=k_1\widetilde{\alpha}\widetilde{\beta}+k_2\widetilde{\gamma}$ for some integers $k_1$ and $k_2$. Since $f^{*}: H^{l-1}(Y\times S^m; \mathbb{Z})\rightarrow H^{l-1}(X\times S^m; \mathbb{Z})$ is an isomorphism and $f^{*}(\alpha\beta)=\pm \widetilde{\alpha}\widetilde{\beta}$, it follows that $k_2=\pm 1$. Meanwhile, the induced homomorphisms of $i$ and $\pi_{Y}$ are clear. Consequently, we obtain that the induced homomorphism $\varphi^{*}: H^k(X; \mathbb{Z})\rightarrow H^k(Y; \mathbb{Z})$ is isomorphic for any integer $k$. Due to $\pi_1 X\cong \pi_1 Y\cong0$ and Whitehead's theorem, then $\varphi$ is a homotopy equivalence between $X$ and $Y$. We finish the proof of the fact above. If $m=l-m-1>0$, then $m=l-m-1=1$. Then $M=SO(3)\times S^1$ and is not homotopy equivalent to $S^2\times S^1\times S^1$. Moreover, $\eta$ is not trivial for this case. Hence, the theorem is true for this special case. If $m\neq l-m-1$, by the fact above, $M\simeq S^{l-1}\times S^{l-m-1}\times S^m$ if and only if $M_+\simeq S^{l-1}\times S^{l-m-1}$. Thus by applying Theorem \ref{QTY2} and \ref{QTY3} for the homotopy type of $M_+$, we conclude that $M\simeq S^{l-1}\times S^{l-m-1}\times S^m$ if and only if $\eta$ is trivial, namely, $(m_1, m_2)=(1, 2), (2, 1)$, $(1, 6), (6, 1), (2, 5), (5, 2), (3, 4), $ or the indefinite case of $(4, 3)$ . \end{proof} \subsubsection{\textbf{Lusternik-Schnirelmann category}} Let $X$ be a topological space, by definition, the Lusternik-Schnirelmann category $cat(X)$ of $X$ is the least number $m$ such that there exists a covering of $X$ by $m+1$ open subsets which are contractible in $X$. In this part, we will determine the Lusternik-Schnirelmann category for isoparametric hypersurfaces and focal submanifolds of OT-FKM type. \vspace{2mm} \begin{thm}\label{QTY5} Let $M, M_+, M_-$ be the isoparametric hypersurface and focal submanifolds of OT-FKM type in the unit sphere, respectively. Then \begin{itemize} \item [(i).] $cat(M_{-})=2$; \\ $cat(M_{+})=2$, if $(m_1, m_2)\neq (8, 7), (9, 6)$, and $M_+$ is not in the following two cases \begin{itemize} \item[(a).] $(m_1, m_2)=(1, 1)$, $cat(M_+)=cat(SO(3))=3$; \item[(b).] $(m_1, m_2)=(4, 3)$ in the definite case, $cat(M_+)=cat(Sp(2))=3$. \end{itemize} \vspace{2mm} \item[(ii).] $cat(M)=3$, if $(m_1, m_2)\neq (8, 7), (9, 6)$, and $M$ is not in the following two cases \begin{itemize} \item[(a).] $(m_1, m_2)=(1, 1)$, $cat(M)=cat(SO(3)\times S^1)=4$; \item[(b).] $(m_1, m_2)=(4, 3)$ in the definite case, $cat(M)=cat(Sp(2)\times S^4)=4$. \end{itemize} \end{itemize} \end{thm} \begin{proof} We start with the proof for part (i). As we mentioned before, the focal submanifold $M_-$ of OT-FKM type is an $S^{l-1}$-bundle over $S^m$. Since $m_1=m>0$ and $m_2=l-m-1>0$, comparing with the assumption in Fact 2.2 of \cite{Iw03}, one has $r:=l-1\geq 2$ and $t:=m-1<r$. Thus $cat(M_-)=2$. As for $M_+$ of OT-FKM type, we will firstly prove the following \vspace{2mm} \noindent \textbf{Fact}: If $1<m<l-m-1$, then $cat(M_+)=2$. \vspace{2mm} Due to \cite{Mun81}, we have $$H^{k}(M_+; \mathbb{Z})\cong\left\{\begin{array}{ll} \mathbb{Z},\,\,\, \emph{if} ~k=0, l-m-1, l-1~ \emph{or}~ 2l-m-2, \\ 0, \,\,\, \emph{otherwise.} \end{array}\right.$$ By Lemma \ref{bundle} and the long exact sequence of homotopy groups, $\pi_1(M_+)=0$. Then the universal coefficient theorem and Hurewicz theorem induce $$\pi_{i}(M_+)\cong0,~\,\,\,\emph{for}\,~i<l-m-1,\quad\emph{and}\quad \pi_{l-m-1}(M_+)\cong \mathbb{Z}.$$ Therefore, by virtue of Proposition 5.1 in \cite{Ja78}, we obtain $$cat(M_+)\leq \frac{2l-m-2}{l-m-1}<3.$$ On the other hand, as asserted in \cite{DFN90}, $$cat(M_+)\geq cuplength(M_+)=2,$$ where cuplength$(M_+)$ is the cohomological length of $M_+$. Hence $cat(M_+)=2$ if $1<m<l-m-1$. So we are left to consider the cases for $m=1$ and $m\geq l-m-1$. When $m=1$, recalling the expression of $M_+$ in (\ref{M_+}), it is easily seen that $M_+$ is diffeomorphic to the Stiefel manifold $V_2(\mathbb{R}^l)\cong SO(l)/SO(l-2)$. Thus by \cite{Ni07} and \cite{DFN90}, we obtain that $$cat(M_+)=\left\{\begin{array}{ll}cat(V_2(\mathbb{R}^l))=2,\,\,~~ \emph{if}~ l\geq4,\vspace{2mm}\\ cat(SO(3))=3, \,\,~~ \emph{if}~ l=3. \end{array} \right.$$ When $m\geq l-m-1$, by the assumption that $(m_1, m_2)\neq(8, 7)$ or $(9, 6)$, there only exist the following cases: $$(m_1, m_2)=(1, 1), (2, 1), (4, 3), (5, 2), (6, 1).$$ We have dealt with the case $(m_1, m_2)=(1, 1)$ in the case $m=1$. As pointed out by \cite{FKM81}, the isoparametric families of OT-FKM type with multiplicities $(2, 1), (6, 1), (5, 2)$ and the indefinite case of $(4, 3)$ are congruent to those with multiplicities $(1, 2), (1, 6), (2, 5)$ and $(3, 4)$, and the focal submanifolds $M_{\pm}$ coincide with the corresponding $M_{\mp}$. Thus by the previous result on $cat(M_-)$, we get $cat(M_+)=2$ if $(m_1, m_2)=(2, 1), (6, 1), (5, 2)$ and the indefinite case of $(4, 3)$. For the definite case of $(4, 3)$, we know that $M_+$ is diffeomorphic to $Sp(2)$ (c.f. \cite{QTY13}, \cite{TY15}), thus $cat(M_+)=cat(Sp(2))=3$ (c.f. \cite{Sc65}). The proof of part (i) is complete. Next, we continue to prove part (ii). As we mentioned in the beginning of subsection \ref{2.1.3}, $M\cong M_+\times S^m$. Then $cat(M)=cat(M_+\times S^m)$, which is equal to $cat(M_+)$ or $cat(M_+)+1$ (c.f. \cite{Iw03}). Furthermore, according to \cite{Mun81}, $$H^{*}(M; R)\cong H^*(S^{l-1}\times S^{l-m-1}\times S^m; R),$$ where $R=\mathbb{Z}$ if both of focal submanifolds are orientable, and $R=\mathbb{Z}_2$ otherwise. Then it follows from \cite{DFN90} that $cat(M)\geq cuplength(M)=3$. If $M$ is neither in the case $(m_1, m_2)=(1,1)$, nor in the definite case of $(4, 3)$, then $cat(M_+)=2$, as we proved in part (i), which implies that $cat(M)\leq cat(M_+)+1=3$. Hence $cat(M)=3$. If $(m_1, m_2)=(1, 1)$, then $M\cong S^1\times SO(3)$. Considering $SO(3)$ as the total space of $S^1$-bundle over $S^2$, by Fact 2.1 in \cite{Iw03}, $t=r=1$ and $\alpha=\pm 2$, we have $cat(M)=cat(S^1\times SO(3))=4$. For the definite case of $(4, 3)$, $M\cong S^4\times Sp(2)$. Thus $cat(M)=4$ by Theorem 3.2 of \cite{St99}. \end{proof} \vspace{4mm} \subsubsection{\textbf{Parallelizability of the isoparametric family of OT-FKM type}} Recall that a smooth manifold $X$ is said to be \emph{parallelizable} if its tangent bundle $TX$ is trivial, and $X$ is said to be \emph{s-parallelizable} if the Whitney sum of its tangent bundle $TX$ and a trivial line bundle is trivial. Obviously, a parallelizable manifold is s-parallelizable. For the parallelizability of the isoparametric family of OT-FKM type, we have the following \vspace{2mm} \begin{thm}\label{s-parallel} Let $M, M_+, M_-$ be the isoparametric hypersurface and focal submanifolds of OT-FKM type. Then \begin{itemize} \item[(i).] $M_-$ is parallelizable if and only if $M_-$ is s-parallelizable, if and only if $\xi$ is trivial; \item[(ii).] $M_+$ is parallelizable. \item[(iii).] $M$ is parallelizable. \end{itemize} \end{thm} \begin{proof} Firstly, we will prove part (i) for $M_-$. As we mentioned in subsection \ref{M_-}, $M_-$ is an $S^{l-1}$-bundle over $S^m$ with the projection $\pi: M_-\rightarrow S^m$. Let $\xi$ be the associated vector bundle of rank $l$ over $S^m$. Then $M_-$ is diffeomorphic to $S(\xi)$. If $m=1$ and $l=k$ is even, then $M_-$ is diffeomorphic to $S^{1}\times S^{l-1}$ by Theorem \ref{QTY1}, and thus parallelizable. If $m=1$ and $l=k$ is odd, then $M_-$ is not orientable, not parallelizable and even not s-parallelizable. From now on, we focus on the cases for $m>1$. By the Theorem 1.1 in \cite{Su64}, $M_-$ is s-parallelizable if and only if $\pi^{*}\xi$ represents a zero element in $\widetilde{KO}(M_-)$. Since $l>m+1$, there exists a nowhere zero section of $\xi$, equivalently speaking, there exists a map $s: S^m\rightarrow M_-$ such that $\pi \circ s=Id_{S^m}$. Then it follows that the induced homomorphism $$\pi^{*}: \widetilde{KO}(S^m)\rightarrow\widetilde{KO}(M_-)$$ is injective. That is to say, $M_-$ is s-parallelizable if and only if $\pi^{*}\xi$ is stably trivial, if and only if $\xi$ is stably trivial. On the other hand, since $l\geq m+2$, $\xi$ is stably trivial if and only if $\xi$ is trivial. Hence, $M_-$ is s-parallelizable if and only if $\xi$ is trivial. Furthermore, by Theorem 1.3 in \cite{Su64} and the fact that $l=k\delta(m)$ is even when $m>1$, we get $M_-$ is s-parallelizable if and only if $M_-$ is parallelizable. The proof of part (i) is now complete. Next, we continue to prove part (ii) for $M_+$. By Lemma \ref{bundle}, $M_+\cong S(\eta)$. Clearly, $\eta$ is stably trivial as a subbundle of $TS^{l-1}$. Then $M_+$ is s-parallelizable by Theorem 1.1 in \cite{Su64}, and thus parallelizable by Theorem 1.3 in \cite{Su64}. Consequently, $M\cong M_+\times S^m$ is also parallelizable. We now complete the proof of Theorem \ref{s-parallel}. \end{proof} For an isoparametric family of OT-FKM type, although the normal bundle of $M_+$ in $S^{2l-1}$ is always trivial, it is still a natural problem to determine when the normal bundle of $M_-$ in $S^{2l-1}$ is trivial. As an application of Theorem \ref{s-parallel}, we obtain \begin{thm}\label{normal bundle of M-} Given an isoparametric family of OT-FKM type, the normal bundle of $M_-$ in $S^{2l-1}$ is trivial if and only if $(m_1, m_2)=(1, 2), (2, 1), (1, 6), (6, 1),$\\ $(2, 5), (5, 2), (3, 4),$ or the indefinite case of $(4, 3).$ \end{thm} \begin{proof} Let $\nu M_-$ be the normal bundle of $M_-$ in $S^{2l-1}$ so that $$TM_-\oplus\nu M_-=TS^{2l-1}|_{M_-}.$$ Since $TS^{2l-1}$ is stably trivial, $\nu M_-$ is stably trivial if and only if $TM_-$ is stably trivial. Moreover, by Theorem \ref{s-parallel}, $TM_-$ is stably trivial if and only if $\xi$ is trivial. Thus, $\nu M_-$ is stably trivial if and only if $\xi$ is trivial. Now we assume that $\nu M_-$ is trivial, which implies the triviality of $\xi$. Then it follows that $$M\cong S^{l-m-1}\times M_-\cong S^{l-m-1}\times S^m\times S^{l-1},$$ which implies further that $\eta$ is trivial by Theorem \ref{QTY3}. Therefore, if $\nu M_-$ is trivial, then $(m_1, m_2)=(1, 2), (2, 1), (1, 6), (6, 1), (2, 5), (5, 2), (3, 4),$ or the indefinite case of $(4, 3)$ by Theorem \ref{QTY2}. Conversely, according to \cite{FKM81}, the families with multiplicities $(2, 1), (6, 1)$, $(5, 2)$ are congruent to those with multiplicities $(1, 2), (1, 6), (2, 5)$. Moreover, the indefinite family with multiplicities $(4, 3)$ is congruent to the family with multiplicities $(3, 4)$. Thus the focal submanifolds $M_{\pm}$ are congruent to corresponding $M_{\mp}$. Recalling that the normal bundle of $M_+$ in $S^{2l-1}$ is always trivial, we finish the proof. \end{proof} \vspace{3mm} \subsection{Homogeneous case} In this subsection, we study the topology of homogeneous isoparametric hypersurfaces and focal submanifolds. It is well known that a homogeneous (isoparametric) hypersurface in the unit sphere can be characterized as a principal orbit of the isotropy representation of some rank two symmetric space $G/K$, while focal submanifolds correspond to the singular orbits (c.f. \cite{HL71}, \cite{TT72}). \subsubsection{\textbf{The case with $(g, m_1, m_2)=(4, 2, 2)$.}} Consider the lie algebra $so(5, \mathbb{R})$ and the adjoint representation of $SO(5)$ on it. Then the principal orbits of this action constitute the homogeneous 1-parameter family of isoparametric hypersurfaces in $S^9$ with $(g, m_1, m_2)=(4, 2, 2)$. Each isoparametric hypersurface $M$ is diffeomorphic to $SO(5)/T^2$, and the two focal submanifolds $M_{\pm}$ are diffeomorphic to $\mathbb{C}P^3$ and the oriented Grassmann manifold $\widetilde{G}_2(\mathbb{R}^5)$, respectively (c.f. \cite{QTY13}). \begin{thm} \label{QTY6} $\mathrm{(i)}.$ For the focal submanifold $M_+$ with $(g, m_1, m_2)=(4, 2, 2)$, which is diffeomorphic to $\mathbb{C}P^3$ \begin{itemize} \item[(a).] $M_+$ is an $S^2$-bundle over $S^4$ \item[(b).] The cohomology ring $H^{*}(M_+; \mathbb{Z})$ is not isomorphic to $H^*(S^2\times S^4; \mathbb{Z})$ \item[(c).] $cat(M_+)=3$ \item[(d).] $M_+$ is not s-parallelizable.\vspace{1mm} \end{itemize} $\mathrm{(ii)}.$ For the focal submanifold $M_-$ with $(g, m_1, m_2)=(4, 2, 2)$, which is diffeomorphic to the oriented Grassmann manifold $\widetilde{G}_2(\mathbb{R}^5)$ \begin{itemize} \item[(a).] $M_-$ is not an $S^p$-bundle over $S^q$ for any positive integers $p$ and $q$ \item[(b).] The cohomology ring $H^*(M_-; \mathbb{Z})$ is not isomorphic to $H^*(S^2\times S^4; \mathbb{Z})$ \item[(c).] $cat(M_-)=3$ \item[(d).] $M_-$ is not s-parallelizable. \end{itemize} \end{thm} \begin{proof} Firstly, note that $M_+\cong\mathbb{C}P^3$ is the total space of the twistor bundle of almost complex structures on $S^4$ with fiber $\mathbb{C}P^1$. It is clear that (a), (b) and (d) of part (i) are valid. Moreover, since $M_+$ admits a K\"{a}hler metric and $\pi_1(M_+)=0$, one has $cat(M_+)=\mathrm{dim}_{\mathbb{C}}M_+=3$ (c.f. \cite{Be76}), which verifies (c) of part (i). Next, we continue to prove part (ii). According to \cite{Mun81}, $$H^{k}(M_-; \mathbb{Z})\cong \left\{\begin{array}{ll}\mathbb{Z},\,\, \emph{if}\,\, k=0, 2, 4, 6\\ 0, \,\, \emph{ otherwise}. \end{array}\right.$$ Consequently, if $M_-$ is the total space of a sphere bundle over a sphere, then the only possible cases are $S^4$-bundle over $S^2$ or $S^2$-bundle over $S^4$. Suppose $M_-$ is an $S^4$-bundle over $S^2$. Considering the fiber bundle $S^1\hookrightarrow V_2(\mathbb{R}^5)\rightarrow \widetilde{G}_2(\mathbb{R}^5)$, by virtue of the homotopy exact sequence of a fiber bundle, one obtains that $\pi_3(M_-)\cong\pi_3(V_2(\mathbb{R}^5)\cong\mathbb{Z}_2$ (c.f. \cite{St51}). On the other hand, by assumption, there exists an exact sequence $$\cdots\rightarrow\pi_3S^4 \rightarrow \pi_3 M_-\rightarrow \pi_3 S^2 \rightarrow\pi_2 S^4\rightarrow\cdots$$ which leads to $\pi_3 M_-\cong\pi_3 S^2\cong \mathbb{Z}$. Clearly, this contradicts $\pi_3(M_-)\cong\mathbb{Z}_2$. Now we consider the other remaining possible case. Suppose that $M_-$ is an $S^2$-bundle over $S^4$ with projection $\pi$, and let $\xi$ be the associated vector bundle of rank $3$ over $S^4$. Then $$TM_-\oplus \bm{\varepsilon}\cong \pi^{*}TS^4\oplus \pi^*\xi.$$ It follows that the total Stiefel-Whitney class $W(TM_-)=\pi^*W(\xi)$. But $W(\xi)=1+w_4(\xi)$, which implies that $W(TM_-)=1+w_4(TM_-)$ and thus $w_2(TM_-)=0$. However, by Lemma 2.4 of \cite{MM82}, $w_2(TM_-)\neq 0$, which leads to a contradiction. The proof for (a) of part (ii) is now complete. Besides, from the proof of Proposition 3.4 in \cite{Ta95}, we see that the cohomology ring $H^*(M_-; \mathbb{Z})$ is different from $H^*(S^2\times S^4; \mathbb{Z})$, which verifies (b) of part (ii). Moreover, observing that $\widetilde{G}_2(\mathbb{R}^5)$ is a Hermitian symmetric space and $\pi_1(\widetilde{G}_2(\mathbb{R}^5))=0$, we obtain $cat(M_-)=3$ following \cite{Be76}, which verifies (c) of part (ii). At last, (d) of part (ii) follows from Corollary 1.2 of \cite{MM82}. Now we complete the proof for Theorem \ref{QTY6}. \end{proof} \begin{rem} \begin{itemize} \item[(i)] The cohomology rings $H^{*}(M_+^6; \mathbb{Z})$ and $H^*(M_-^6; \mathbb{Z})$ are not isomorphic. \vspace{2mm} \item[(ii)] By Theorem \ref{QTY6}, $M_+^6$ and $M_-^6$ are not s-parallelizable. Thus, the normal bundles of $M_{\pm}^6$ in $S^9$ are not stably trivial. \end{itemize} \end{rem} \vspace{3mm} \subsubsection{\textbf{The case with $(g, m_1, m_2)=(4, 4, 5)$.}} Consider the Lie algebra $so(5, \mathbb{C})$. The unitary group $U(5)$ acts on it by the adjoint representation $g\cdot Z=\overline{g}Zg^{-1}$ for $g\in U(5)$ and $Z\in so(5, \mathbb{C})$. The principal orbits of this action constitute the homogeneous 1-parameter family of isoparametric hypersurfaces in $S^{19}$ with multiplicities $(m_1, m_2)=(4,5)$. The two focal submanifolds $M_{\pm}$ are diffeomorphic to $U(5)/(Sp(2)\times U(1))$ and $U(5)/(SU(2)\times U(3))$, respectively. \vspace{2mm} \begin{thm}\label{QTY7} $\mathrm{(i)}.$ For the focal submanifold $M_+$ with $(g, m_1, m_2)=(4, 4, 5)$, which is diffeomorphic to $U(5)/(Sp(2)\times U(1))$ \begin{itemize} \item[(a).] $M_+$ is an $S^q$-bundle over $S^p$ if and only if $p=9$ and $q=5$ \item[(b).] the normal bundle of $M_+$ in $S^{19}$ is not trivial \item[(c).] $cat(M_+)=2$ \end{itemize} \vspace{1mm} $\mathrm{(ii)}.$ For the focal submanifold $M_-$ with $(g, m_1, m_2)=(4, 4, 5)$, which is diffeomorphic to $U(5)/(SU(2)\times U(3))$ \begin{itemize} \item[(a).] $M_-$ is not an $S^q$-bundle over $S^p$ for any positive integers $p$ and $q$ \item[(b).] the normal bundle of $M_-$ in $S^{19}$ is not stably trivial \item[(c).] $2\leq cat(M_-)\leq 3$ \end{itemize} \end{thm} \begin{proof} We start with the proof for part (i). Since $$M_+\cong U(5)/Sp(2)\times U(1)\cong SU(5)/S(Sp(2)\times U(1))\cong SU(5)/Sp(2),$$ we see $M_+$ fibers over $SU(5)/SU(4)\cong S^9$ with fiber $SU(4)/Sp(2)\cong S^5$. It follows immediately that $\pi_1(M_+)=0$. We will show that there is no other possibility for $M_+$ to be a sphere bundle over a sphere. According to \cite{Mun81}, $$H^{k}(M_+; \mathbb{Z})\cong\left\{\begin{array}{ll} \mathbb{Z},~~\emph{if}~~k=0, 5, 9, 14\\ 0,~~\emph{ otherwise}. \end{array}\right.$$ Thus Hurewicz theorem leads to $\pi_5(M_+)\cong H^{5}(M_+; \mathbb{Z})\cong\mathbb{Z}$. Suppose $M_+$ is the total space of an $S^{14-p}$-bundle over $S^{p}$. Then there exists an exact sequence $$\cdots\rightarrow\pi_6 S^p\rightarrow \pi_5S^{14-p}\rightarrow \pi_5 M_+\rightarrow\pi_5 S^p\rightarrow \pi_4 S^{14-p}\rightarrow\cdots.$$ If $p\geq 10$, then $\pi_5S^{14-p}\cong\pi_5 M_+\cong \mathbb{Z}$, which contradicts the facts $\pi_5S^4\cong\pi_5S^3\cong\pi_5S^2\cong\mathbb{Z}_2$ (c.f. \cite{St51}) and $\pi_5S^1=0$. If $p<9$, then $14-p>5$ and $\pi_5S^p\cong\pi_5M_+\cong\mathbb{Z}$, which implies that $p=5$. Namely, $M_+$ might be the total space of an $S^{9}$-bundle over $S^{5}$. Suppose $M_+$ is the total space of a certain $S^9$-bundle over $S^5$. Since $\pi_4SO(10)\cong 0$ (c.f. \cite{St51}), the characteristic map is trivial in $\pi_4SO(10)$, which implies that $M_+$ is diffeomorphic to $S^5\times S^9$. However, it is impossible by Proposition 1.1 in \cite{TY15}. Therefore, $M_+$ could only be the total space of an $S^{5}$-bundle over $S^{9}$. As for (b) of part (i), we argue by contradiction. Suppose that the normal bundle of $M_+$ in $S^{19}$ is trivial. Then the isoparametric hypersurface $M^{18}$ is diffeomorphic to $M_+^{14}\times S^4$. From the fibration $S^1\hookrightarrow M_-\rightarrow G_2(\mathbb{C}^5)$, we derive $$\pi_{10}M_-\cong\pi_{10}G_2(\mathbb{C}^5).$$ Considering the fibration $U(2)\hookrightarrow V_2(\mathbb{C}^5)\rightarrow G_2(\mathbb{C}^5)$, we have the following exact sequence $$\cdots\rightarrow\pi_{10}S^3\rightarrow\pi_{10}V_2(\mathbb{C}^5)\rightarrow\pi_{10}G_2(\mathbb{C}^5)\rightarrow \pi_9S^3\rightarrow\cdots.$$ By Lemma II.1 (ii) in \cite{Ke60}, \begin{equation}\label{pi10V} \pi_{10}V_2(\mathbb{C}^5)\cong \mathbb{Z}_{12}. \end{equation} Moreover, from P. 332 of \cite{Hu59}, $$\pi_9S^3\cong\mathbb{Z}_3.$$ Combining these together, we obtain an upper bound of $|\pi_{10}G_2(\mathbb{C}^5)|$, the order of $\pi_{10}G_2(\mathbb{C}^5)$: $$|\pi_{10}G_2(\mathbb{C}^5)|\leq 36.$$ Moreover, the isoparametric hypersurface $M^{18}$ is also an $S^5$-bundle over $M_-$, which induces an exact sequence \begin{equation}\label{fgh} \cdots\rightarrow\pi_{10}S^5\overset{f}{\rightarrow} \pi_{10}M \overset{g}{\rightarrow}\pi_{10} M_-\overset{h}{\rightarrow} \pi_{9}S^5\rightarrow\cdots. \end{equation} It is proved in \cite{Hu59} that $\pi_9S^5\cong \pi_{10}S^5\cong \mathbb{Z}_2$ and $\pi_{10}S^4\cong \mathbb{Z}_{24}\oplus \mathbb{Z}_2$. Thus $$\pi_{10}M=\pi_{10}M_+\oplus \pi_{10}S^4\cong \pi_{10}M_+\oplus \mathbb{Z}_{24}\oplus \mathbb{Z}_2,$$ and furthermore, we derive from the exact sequence (\ref{fgh}) that $$|\pi_{10}M|=|\pi_{10}M_+\oplus\mathbb{Z}_{24}\oplus \mathbb{Z}_2|\leq |\pi_{10}S^5||\pi_{10}M_-|\leq 72.$$ It follows that $\pi_{10}M_+\cong0$ and $f$ is not a zero homomorphism. By the exact sequence (\ref{fgh}) again, $\mathrm{Ker} g= \mathrm{Im} f\cong \mathbb{Z}_2$, $\mathrm{Im} g\cong \pi_{10}M/\mathrm{Ker} g$, $\mathrm{Ker} h=\mathrm{Im} g$ and $\mathrm{Im} h\cong \pi_{10}M_-/\mathrm{Ker} h$. That is, \begin{equation*}\label{fgh'} 0{\rightarrow}\mathbb{Z}_2\overset{f}{\rightarrow} \mathbb{Z}_{24}\oplus \mathbb{Z}_2 \overset{g}{\rightarrow}\pi_{10} M_-\overset{h}{\rightarrow} \mathbb{Z}_2. \end{equation*} Then it follows from $\pi_{10}M=\mathbb{Z}_{24}\oplus \mathbb{Z}_2$ and $|\pi_{10}M_-|=|\pi_{10}G_2(\mathbb{C}^5)|\leq 36$ that $h$ is a zero homomorphism. Hence, $\pi_{10}M_-\cong \mathbb{Z}_{24}\oplus \mathbb{Z}_2/\mathrm{Ker} g$ and $|\pi_{10}M_-|=24$. Considering the fibration $U(2)\hookrightarrow V_2(\mathbb{C}^5)\rightarrow G_2(\mathbb{C}^5)$ again, we have the exact sequence $$\cdots\rightarrow\pi_{10}S^3\overset{\alpha}{\rightarrow}\pi_{10}V_2(\mathbb{C}^5)\overset{\beta}{\rightarrow}\pi_{10}G_2(\mathbb{C}^5)\overset{\gamma}{\rightarrow} \pi_9S^3\rightarrow\cdots$$ with $\pi_{10}S^3\cong \mathrm{Z}_{15}$(c.f. \cite{Hu59}), $\pi_{10}V_2(\mathbb{C}^5)\cong \mathbb{Z}_{12}$, $|\pi_{10}M_-|=|\pi_{10}G_2(\mathbb{C}^5)|=24$ and $\pi_{9}S^3\cong\mathbb{Z}_3$. It is clear that $\gamma$ is not a zero homomorphism. Since $|\pi_{9}S^3|=3$ is a prime number, we infer that $\gamma$ is surjective. Hence, $$\pi_{10}G_2(\mathbb{C}^5)/\mathrm{Ker} \gamma\cong \mathbb{Z}_3,$$ and $$|\mathrm{Im} \beta|=|\mathrm{Ker} \gamma|=|\pi_{10}G_2(\mathbb{C}^5)|/3=8.$$ Furthermore, from $\pi_{10}V_2(\mathbb{C}^5)/\mathrm{Ker} \beta \cong \mathrm{Im} \beta$, we derive that $$|\pi_{10}V_2(\mathbb{C}^5)|/|\mathrm{Ker} \beta|=|\mathrm{Im} \beta|=8,$$ which contradicts (\ref{pi10V}). As for (c) of part (i), from $M_+$ is an $S^5$-bundle over $S^9$, it follows that $\pi_iM_+=0$ for $i<5$. Using Proposition 5.1 in \cite{Ja78}, we obtain $cat(M_+)\leq \frac{14}{5}$. On the other hand, it is well-known that a closed manifold $X$ satisfying $cat(X) = 1$ is homotopy equivalent to a sphere. Hence, $cat(M_+)\geq 2$, and thus $cat(M_+)=2$. Next, we are going to prove part (ii). As for (a) in part (ii), similar to the arguments of part (i), it is only possible that $M_-$ is an $S^9$-bundle over $S^4$ or an $S^4$-bundle over $S^9$. Suppose $M_-$ is an $S^9$-bundle over $S^4$. On one hand, from the proof for (b) of part (i), we see $\pi_{10}M_-\cong\pi_{10}G_2(\mathbb{C}^5)$ and $|\pi_{10}G_2(\mathbb{C}^5)|\leq 36$. On the other hand, the assumption that $M_-$ is an $S^9$-bundle over $S^4$ implies the following exact sequence $$\cdots\rightarrow\pi_{10}M_-\rightarrow\pi_{10}S^4\rightarrow\pi_9S^9\rightarrow\cdots.$$ Since $\pi_{10}S^4\cong \mathbb{Z}_{24}\oplus\mathbb{Z}_2$ (c.f. \cite{Hu59}) and $\pi_9S^9\cong\mathbb{Z}$, we deduce that the homomorphism from $\pi_{10}S^4$ to $\pi_9S^9$ is zero. That is to say, the homomorphism from $\pi_{10}M_-$ to $\pi_{10}S^4$ is onto. It follows that $$|\pi_{10}G_2(\mathbb{C}^5)|=|\pi_{10}M_-|\geq |\pi_{10}S^4|=48,$$ which contradicts $|\pi_{10}G_2(\mathbb{C}^5)|\leq 36$. Hence, $M_-$ is not an $S^9$-bundle over $S^4$. Suppose $M_-$ is an $S^4$-bundle over $S^9$. Let $\xi$ be the associated vector bundle over $S^9$ of rank $5$. Then $$TM_-\oplus \bm{\varepsilon}\cong \pi^{*}TS^9\oplus \pi^*\xi.$$ It follows that the total Stiefel-Whitney class $W(TM_-)=\pi^*W(\xi)=1$ where $W(\xi)=1$. However, Lemma 1.1 in \cite{Ta91} reveals that $w_4(TM_-)\neq0$, which leads to a contradiction. Hence, $M_-$ is not an $S^4$-bundle over $S^9$. Clearly, (b) of part (ii) follows from $w_4(TM_-)\neq0$. Now, we are in a position to consider (c) of part (ii). Since $M_-$ is not homotopy equivalent to a sphere, one obtains $cat(M_-)\geq 2$. Moreover, $M_-$ admits a Morse function with $4$ critical points(c.f. \cite{Ta91}), then we have $cat(M_-)\leq 3$(c.f. \cite{DFN90}). \end{proof} \vspace{2mm} \begin{rem} $\mathrm{(i)}.$ By Theorem B in \cite{Fa99}, $M_+^{14}$ is almost diffeomorphic to an $S^5$-bundle over $S^9$. We reveal by Theorem \ref{QTY7} that $M_+^{14}$ is indeed diffeomorphic to an $S^5$-bundle over $S^9$. Moreover, according to \cite{TY15}, $M_+^{14}$ is not homotopy equivalent to $S^5\times S^9$, which implies that the $S^5$-bundle over $S^9$ is not trivial. $\mathrm{(ii)}.$ It is still a problem to determine the exact value of $cat(M_-^{13})$ in the theorem above. Recall that if $X$ is a compact topological manifold of dimension $n$, the ball-category of X, $ballcat(X)$, is the minimal number $m$ such that there is a covering of $X$ with $m+1$ closed disks of dimension $n$. By Theorem 3.46 in \cite{CLOT03}, $cat(M_-^{13})=ballcat(M_-^{13})$. If $cat(M_-^{13})=3$, then $wcat(M_-)=cat(M_-)$ by Theorem 2.2 in \cite{St99}. For the definition of $wcat$, see \cite{Ja78}. In general, $wcat(X)\leq cat(X)$ for any finite CW complex. \end{rem} \vspace{3mm} \subsubsection{\textbf{The $g=3$ case}} \begin{prop}\label{QTY8} Let $M$ be the isoparametric hypersurface in $S^{3m+1}$ with $g=3$ and $m_1=m_2=m=1,2,4$ or $8$. Then \begin{itemize} \item[(i).] $m=1$: $cat(M^3)=cat(SO(3)/\mathbb{Z}_2\oplus \mathbb{Z}_2)=3$;\vspace{1mm} \item[(ii).] $m=2$: $cat(M^{6})=cat(SU(3)/T^2)=3$;\vspace{1mm} \item[(iii).] $m=4$: $cat(M^{12})=cat(Sp(3)/Sp(1)^3)=3$;\vspace{1mm} \item[(iv).] $m=8$: $cat(M^{24})=cat(F_4/Spin(8))=3$. \end{itemize} \end{prop} \begin{proof} When $g=3$ and $m=1$, $M^3=SO(3)/\mathbb{Z}_2\oplus \mathbb{Z}_2$. Since $\pi_1(M^3)=\mathbb{Q}_8=\{\pm \mathrm{1}, \pm \mathrm{i}, \pm \mathrm{j}, \pm \mathrm{k}\}$ (c.f. \cite{GH87}), we see $\pi_1(M^3)\neq 0$ and not free. Thus $cat(M^3)=3$ (c.f. \cite{GG92}). When $g=3$ and $m=2$, we have $cat(M^{6})=cat(SU(3)/T^2)=3$ (c.f. \cite{Si75}). When $g=3$ and $m=4$, due to \cite{Mun81} and the Hurewicz theorem, we have $\pi_iM^{12}=0$ for $i\leq3$. It follows from Proposition 5.1 in \cite{Ja78} that $cat(M^{12})\leq 3$. Suppose $cat(M^{12})\leq 2$, then it follows from Theorem 7.6 in \cite{Ta68} that $$c(sq^4): H^4(M^{12}; \mathbb{Z}_2)\rightarrow H^8(M^{12}; \mathbb{Z}_2)$$ is zero, where $c(sq^4)=sq^4+sq^3sq^1$. By \cite{Mun81}, $$H^4(M^{12}; \mathbb{Z}_2)\cong H^4(M_+; \mathbb{Z}_2)\oplus H^4(M_-; \mathbb{Z}_2)\cong\mathbb{Z}_2\oplus\mathbb{Z}_2,$$ and $$H^8(M^{12}; \mathbb{Z}_2)\cong H^8(M_+; \mathbb{Z}_2)\oplus H^8(M_-; \mathbb{Z}_2)\cong\mathbb{Z}_2\oplus\mathbb{Z}_2.$$ Moreover, we have the following isomorphisms of the cohomology rings with $\mathbb{Z}_2$-coefficients $$H^*(M_+; \mathbb{Z}_2)\cong H^*(M_-; \mathbb{Z}_2)\cong H^*(\mathbb{H}P^2; \mathbb{Z}_2).$$ Thus \begin{eqnarray*} c(sq^4)=sq^4: ~~H^4(M^{12}; \mathbb{Z}_2)&\rightarrow& H^8(M^{12}; \mathbb{Z}_2)\\ x&\mapsto& sq^4(x)=x\cup x \end{eqnarray*} is not zero, which leads to a contradiction. Therefore, $cat(M^{12})=3$. When $g=3$ and $m=8$, replacing $c(sq^4)$ with $c(sq^8)$, a similar argument as in the case $g=3, m=4$ by Theorem 7.6 of \cite{Ta68} implies $cat(M^{24})=3$. The proof for Proposition \ref{QTY8} is now complete. \end{proof} \vspace{2mm} \subsubsection{\textbf{The $g=6$ case}} \begin{prop}\label{QTY9} Let $M$ be the isoparametric hypersurface in $S^{6m+1}$ with $g=6$ and $m_1=m_2=m=1$ or $2$. Then \begin{itemize} \item[(i).] $m=1$: $cat(M^6)=4$ and $cat(M_{\pm})=3$;\vspace{1mm} \item[(ii).] $m=2$: $cat(M^{12})=6$ and $cat(M_{\pm})=5$. \end{itemize} \end{prop} \begin{proof} First, we consider the case $g=6$ and $m_1=m_2=1$. By the observation of Miyaoka , an isoparametric hypersurface with $g=6, m=1$ is the inverse image of an isoparametric hypersurface with $g=3, m=1$ via the Hopf fibration (c.f. \cite{Miy93}). Thus $$M^6\cong S^3\times SO(3)/\mathbb{Z}_2\oplus \mathbb{Z}_2, \quad M_+^5\cong M_-^5\cong S^3\times \mathbb{R}P^2.$$ From $cat(\mathbb{R}P^2)=2$, one has $cat(M_{\pm})=2$ or $3$. On the other hand, according to \cite{DKR08}, $\pi_1(M_{\pm}^5)=\mathbb{Z}_2$ is not free, then $cat(M_{\pm})\geq 3$. Therefore, $cat(M_{\pm}^5)=3$. Moreover, using the fact $cat(SO(3)/\mathbb{Z}_2\oplus \mathbb{Z}_2)=3$, it follows that $cat(M^6)=4$ by Theorem 3.8 of \cite{Ru99}. Next, we consider the case $g=6$ and $m_1=m_2=2$. For this case, $$M^{12}\cong G_2/T^2, \quad M_+^{10}\cong M_-^{10}\cong G_2/U(2).$$ From Theorem 2 of \cite{Si75}, it follows that $cat(M^{12})=6$. On the other hand, observe that $M_{\pm}\cong G_2/U(2)$ is diffeomorphic to $\widetilde{G}_2(\mathbb{R}^7)$ which is a simply connected Hermitian symmetric space (c.f. \cite{Miy11}). Hence we obtain $cat(M_{\pm})=5$ by \cite{Be76}. The proof for Proposition \ref{QTY9} is now complete. \end{proof} \vspace{4mm} \section{\textbf{Curvatures of an isoparametric family}}\label{sec3} For an isoparametric family in the unit sphere $S^{n+1}(1)$, it is known that the scalar curvatures of isoparametric hypersurfaces are constant and non-negative (c.f. \cite{Tan04}, \cite{TY20}). Besides, for every unit normal vector at any point of a focal submanifold, the corresponding shape operator has principal curvatures $\cot\frac{(j-i)\pi}{g}$ (for a certain $1\leq i\leq g$) with multiplicity $m_j$, for $j\neq i, 1\leq j\leq g$ (c.f. Corollary 3.22 in \cite{CR15}). Thus a direct calculation by virtue of Gauss equation leads to the fact that the scalar curvatures of focal submanifolds are constant and non-negative. Therefore, we only consider the sectional curvatures and Ricci curvatures in this section. \subsection{Sectional curvature} As we mentioned before, the principal curvatures of an isoparametric hypersurface $M^n\subset S^{n+1}(1)$ with $g$ distinct principal curvatures can be written as $\lambda_k=\cot(\theta+\frac{k-1}{g}\pi)$ ($k=1,\ldots, g$) with $\theta\in (0,\frac{\pi}{g})$. It is obvious that an isoparametric hypersurface $M^n$ with $g=1$ has positive sectional curvatures and that with $g=2$ has non-negative sectional curvatures. When $g\geq 3$, taking $e_1, e_g \in T_pM^n$ to be unit principal vectors corresponding to distinct principal curvatures $\lambda_1, \lambda_g$, it follows easily from Gauss equation that the sectional curvature $$K(e_1, e_g)=1+\lambda_1\lambda_g=-\frac{\cot\frac{\pi}{g}(1+\lambda_1^2)}{\lambda_1-\cot\frac{\pi}{g}}<0.$$ Thus the sectional curvature of $M^n$ is not non-negative. As for sectional curvatures of the focal submanifolds, we know that when $g=1$, the focal submanifolds are just two points. When $g=2$, the focal submanifolds are isometric to $S^p(1)$ or $S^{n-p}(1)$, thus the sectional curvatures are constant and positive. When $g=3$, as we mentioned in the introduction, $m_1=m_2=m=1, 2, 4$ or $8$, and the focal submanifolds are Veronese embedding of $\mathbb{F}P^2$ in $S^{3m+1}$, where $\mathbb{F}=\mathbb{R}, \mathbb{C}, \mathbb{H}, \mathbb{O}$ corresponding to $m=1, 2, 4, 8$. The induced metric of $\mathbb{R} P^2$ has constant sectional (Gaussian) curvature $K=\frac{1}{3}$, and the induced metric of $\mathbb{C} P^2$, $\mathbb{H}P^2$ or $\mathbb{O}P^2$ is symmetric with sectional curvature $\frac{1}{3}\leq K\leq \frac{4}{3}$ (c.f. \cite{TY13}). Thus the sectional curvatures of these focal submanifolds are positive (c.f. \cite{Zil14}). For the focal submanifolds with $g=4$ and $6$, we can determine which of them has non-negative sectional curvatures with respect to the induced metric from $S^{n+1}(1)$ as follows \begin{thm}\label{1} For the focal submanifolds of an isoparametric hypersurface in $S^{n+1}(1)$ with $g=4$ or $6$ distinct principal curvatures, we have \begin{itemize} \item[(i)] When $g=4$, the sectional curvatures of a focal submanifold with induced metric are non-negative if and only if the focal submanifold is one of the following \begin{itemize} \item[(a)] $M_+$ of OT-FKM type with multiplicities $(m_1, m_2)=(2,1), (6,1)$ or $(4,3)$ in the definite case; \item[(b)] $M_-$ of OT-FKM type with multiplicities $(m_1, m_2)=(1, k)$; \item[(c)] the focal submanifold with multiplicities $(m_1, m_2)=(2,2)$ and diffeomorphic to $\widetilde{G}_2(\mathbb{R}^5)$; \end{itemize} \item[(ii)] When $g=6$, the sectional curvatures of focal submanifolds with induced metric are not non-negative. \end{itemize} \end{thm} \begin{rem} The list of focal submanifolds with non-negative sectional curvatures in Theorem \ref{1} is the same as that of Ricci parallel focal submanifolds in \cite{TY15} and \cite{LY15}. \end{rem} \begin{proof} According to the classification of isoparametric hypersurfaces in unit spheres, we will divide our proof of Theorem \ref{1} into several parts from 3.1.1 to 3.1.6. \noindent \subsubsection{ \textbf{$M_+$ of OT-FKM type.}} Recall that the focal submanifold $M_+$ of OT-FKM type with $(m_1, m_2)=(m, l-m-1)$ can be described as \begin{equation}\label{M+} M_+=\{x\in S^{2l-1}(1)~|~\langle P_0x, x\rangle=\cdots=\langle P_mx, x\rangle=0\}. \end{equation} As pointed out by \cite{FKM81}, $\{P_0x,P_1x, \ldots, P_mx\}$ is an orthonormal basis of the normal space $T_x^{\bot}M_+$ at $x\in M_+\subset S^{2l-1}(1)$ and for any normal vector $\xi_{\alpha}=P_{\alpha}x$ $(\alpha=0,...,m)$, the corresponding shape operator $A_{\alpha}:=A_{\xi_{\alpha}}$ for any $X\in T_xM_+$ is $A_{\alpha}X=-(P_{\alpha}X)^T$, the tangential component of $-P_{\alpha}X$. It follows from Gauss equation that \begin{eqnarray}\label{Gauss} K(X, Y)&=& 1+\sum_{\alpha=0}^m\langle A_{\alpha}X, X\rangle\langle A_{\alpha}Y, Y\rangle -\sum_{\alpha=0}^m \langle A_{\alpha}X, Y\rangle^2\nonumber \\ &=&1+\sum_{\alpha=0}^m\langle P_{\alpha}X, X\rangle\langle P_{\alpha}Y, Y\rangle - \sum_{\alpha=0}^m\langle P_{\alpha}X, Y\rangle^2. \end{eqnarray} We first show a lemma as below to eliminate most cases of $M_+$ \begin{lem}\label{lemma 1} If $l>2m$, for each point $p\in M_+$, there exists a tangent plane with negative sectional curvature. \end{lem} \begin{proof} As in \cite{FKM81}, we can define $(P_0,...,P_m)$ in the symmetric Clifford system by $$P_0(u,v):=(u,-v),~P_1(u,v):=(v,u),~P_{1+{\alpha}}(u,v):=(E_{\alpha}v,-E_{\alpha}u),~u,v\in \mathbb{R}^l.$$ where $E_1,...,E_{m-1}$ are skew-symmetric endomorphisms of $\mathbb{R}^l$ with $E_{\alpha}E_{\beta}+E_{\beta}E_{\alpha}=-2\delta_{\alpha\beta}Id.$ Thus for any point $z=(z_1, z_2)\in S^{2l-1}(1)\subset\mathbb{R} ^l\oplus \mathbb{R}^l$, $z\in M_+$ if and only if $$ |z_1|^2=|z_2|^2=\frac{1}{2}, ~~ \langle z_1, z_2\rangle=0,~~~~~ \langle E_{\alpha} z_1, z_2\rangle=0,\,\,\,\, \forall ~\alpha=1,\ldots,m-1. $$ Moreover, $X=(x_1, x_2)\in T_zM_+$ if and only if \begin{equation}\label{tangent vector of M+} \left\{\begin{array}{ll} \langle x_1, z_1\rangle=\langle x_2, z_2\rangle=0,\\ \langle x_1, z_2\rangle+\langle x_2, z_1\rangle=0,\\ \langle x_1, E_{\alpha}z_2\rangle-\langle x_2, E_{\alpha}z_1\rangle=0, \quad\forall~\alpha=1,\ldots,m-1. \end{array} \right. \end{equation} Now we take $X=(c,0)$ and $Y=(0, c)\subset\mathbb{R} ^l\oplus \mathbb{R}^l$. It follows easily from (\ref{tangent vector of M+}) that $X, Y\in T_zM_+$ if and only if \begin{equation}\label{XY} \langle c, ~z_1\rangle=\langle c, ~z_2\rangle=0, ~~{\rm{and}}~~ \langle c, ~E_{\alpha}z_1\rangle=\langle c, ~E_{\alpha}z_2\rangle=0, ~~\forall~\alpha=1,\ldots,m-1. \end{equation} Obviously, when $l>2m$, we can always choose a unit vector $c\in\mathbb{R}^l$ such that (\ref{XY}) is fulfilled, and furthermore, \begin{equation*} \left\{\begin{array}{ll} P_0X=X,~~ P_0Y=-Y, ~~\langle P_1X, ~Y\rangle=1,\\ \langle P_{\alpha}X, ~X\rangle=\langle P_{\alpha}Y, ~Y\rangle=0, \quad\forall ~~\alpha=1,\ldots, m,\\ \langle P_{\alpha}X, ~Y\rangle=0, \quad \forall~~ \alpha\neq 1. \end{array} \right. \end{equation*} Therefore, the sectional curvature $$K(X, Y)=1+\langle P_0X, X\rangle\langle P_0Y, Y\rangle - \langle P_1X, Y\rangle^2=-1<0.$$ \end{proof} With Lemma \ref{lemma 1} in mind, analyzing the conditions $m\geq 1$, $k\delta(m)-m-1\geq 1$ and $l=k\delta(m)\leq 2m$, we find that there are only the following cases to consider: $$(m_1,m_2)=(2,1), (4,3), (5,2), (6,1), (8,7), \rm{and } ~~(9,6).$$ According to \cite{FKM81}, the families with $(m_1, m_2)=(2, 1), (6, 1), (5, 2)$ and the indefinite one of $(4, 3)$-families are congruent to those with $(m_1, m_2)=(1, 2)$, $(1, 6)$, $(2, 5)$ and $(3, 4)$, respectively. In these cases, we can leave the proof to 3.1.2. But a direct proof reveals more geometric properties sometimes. \vspace{2mm} \noindent $(1)$ \emph{\textbf{$M_+$ with $(m_1, m_2)=(2, 1)$}.} In this case, it can be seen directly that $M_+$ is isometric to $U(2)$ with a bi-invariant metric, thus the sectional curvature is non-negative. \vspace{2mm} \noindent $(2)$ \emph{\textbf{$M_+$ with $(m_1, m_2)=(4, 3)$ in the definite case}. } According to \cite{QT16}, $M_+$ in this case is isometric to $Sp(2)$ with a bi-invariant metric, thus the sectional curvature is non-negative. \vspace{2mm} \noindent $(3)$ \emph{\textbf{$M_+$ with $(m_1, m_2)=(4, 3)$ in the indefinite case}. } Setting $P = P_0P_1P_2P_3$, it is easy to see that $P$ is symmetric and $P^2$ = $Id.$ Then following Theorems 5.1 and 5.2 in \cite{FKM81}, we can find a point $x\in M_+$ as the +1-eigenvector of $P$ , i.e. $P_0P_1P_2P_3x = x.$ Then the tangent space $T_xM_+$ can be decomposed into $T_xM_+=\mathcal{V}_x\oplus \mathcal{W}_x$ with (c.f. \cite{TY15}) $$\mathcal{V}_x=Span\{P_0P_1x, P_0P_2x, P_0P_3x, P_0P_4x, P_1P_4x, P_2P_4x, P_3P_4x\}$$ and $$\mathcal{W}_x=Span\{ P_0P_1P_4x, P_0P_2P_4x, P_0P_3P_4x\}.$$ Let $$X:=(P_0P_1P_4x+P_1P_4x)\big/\sqrt{2},\quad Y:=(P_0P_2P_4x-P_2P_4x)\big/\sqrt{2}.$$ Then we obtain \begin{equation*} \left\{\begin{array}{ll} |X|=|Y|=1, \quad \langle X, ~Y\rangle=0\\ P_0X=X,~~ P_0Y=-Y, ~~\langle P_3X, ~Y\rangle=-1,\\ \langle P_{\alpha}X, ~X\rangle=\langle P_{\alpha}Y, ~Y\rangle=0, \quad\forall ~~\alpha\neq 0.\\ \langle P_{\alpha}X, ~Y\rangle=0\quad \forall~~ \alpha\neq 3. \end{array} \right. \end{equation*} Therefore, the sectional curvature $$K(X, Y)=1+\langle P_0X, X\rangle\langle P_0Y, Y\rangle - \langle P_3X, Y\rangle^2=-1<0.$$ \noindent $(4)$ \emph{\textbf{$M_+$ with $(m_1, m_2)=(5, 2)$}. } Choose $x\in S^{15}(1)$ as a common eigenvector of the commuting $4$-products $P_0P_1P_2P_3$ and $P_0P_1P_4P_5$. Without loss of generality, we assume $P_0P_1P_4P_5x=x$. According to \cite{TY15}, the tangent space $T_xM_+$ can be decomposed into $T_xM_+=\mathcal{V}_x\oplus \mathcal{W}_x$ with $$\mathcal{V}_x=Span\{P_0P_1x, P_0P_2x, P_0P_3x, P_0P_4x, P_0P_5x, P_2P_4x, P_2P_5x\}$$ and $$\mathcal{W}_x=Span\{ P_0P_2P_4x, P_0P_2P_5x\}.$$ Let $$X:=(P_0P_2P_4x-P_2P_4x)\big/\sqrt{2},\quad Y:=(P_0P_2P_5x+P_2P_5x)\big/\sqrt{2}.$$ Then we have \begin{equation*} \left\{\begin{array}{ll} |X|=|Y|=1, \quad \langle X, ~Y\rangle=0\\ P_0X=-X,~~ P_0Y=Y, ~~\langle P_1X, ~Y\rangle=1,\\ \langle P_{\alpha}X, ~X\rangle=\langle P_{\alpha}Y, ~Y\rangle=0, \quad\forall ~~\alpha\neq 0,\\ \langle P_{\alpha}X, ~Y\rangle=0\quad \forall~~ \alpha\neq 1. \end{array} \right. \end{equation*} and thus the sectional curvature $$K(X, Y)=1+\langle P_0X, X\rangle\langle P_0Y, Y\rangle - \langle P_1X, Y\rangle^2=-1<0.$$ \vspace{2mm} \noindent \emph{\textbf{An alternative proof for $M_+$ in the indefinite $(4,3)$ case.}} For any symmetric Clifford system $P_0,\ldots, P_5$ on $\mathbb{R}^{16}$ in the $(5,2)$ case, we can remove any one of $P_0,\ldots, P_5$ to obtain a new symmetric Clifford system on $\mathbb{R}^{16}$, which is indefinite. The reason is that any definite symmetric Clifford system with $Q_0\cdots Q_4=\pm Id$ can not be extended to $Q_5$. As in the case (4), we still choose $x\in S^{15}(1)$ as a common eigenvector of the commuting $4$-products $P_0P_1P_2P_3$ and $P_0P_1P_4P_5$. Then we remove any one of $P_2, P_3, P_4, P_5$ from $P_0,\ldots, P_5$, and still obtain that $x\in M_+$ of the indefinite $(4,3)$ family. Choosing the same $X, Y$ as in Case (3), we still obtain $K(X, Y)=-1<0$. We'll take a similar approach to the $(8.7)$ indefinite case later. \vspace{2mm} \noindent $(5)$ \emph{\textbf{$M_+$ with $(m_1, m_2)=(6, 1)$}.} In this case, we need only to consider $M_-$ of OT-FKM type with $(m_1, m_2)=(1, 6)$. As showed by \cite{TY13}, $M_-$ with $(m_1, m_2)=(1, 6)$ is isometric to $(S^1(1)\times S^7(1))\big/\mathbb{Z}_2$, thus the sectional curvature is non-negative. \vspace{2mm} \noindent $(6)$ \emph{\textbf{$M_+$ with $(m_1, m_2)=(8, 7)$ in the definite case}. } For $(u,v)\in \mathbb{R}^{32}=\mathbb{O}^4$ and $u=(u_1, u_2), v=(v_1, v_2)\in \mathbb{O}\oplus\mathbb{O}$, we construct a symmetric Clifford system $P_0,\ldots, P_8$ on $\mathbb{R}^{32}$ as follows \begin{equation* P_0(u ,v)=(u, -v),\quad, P_1(u, v)=(v, u),\quad P_{1+\alpha}(u, v)=(E_{\alpha}v, -E_{\alpha}u), \end{equation*} where $E_{\alpha}$ acts on $u$ or $v$ in this way: $$E_{\alpha}u=(e_{\alpha}u_1, e_{\alpha}u_{2}),~\alpha=1,\cdots,7,$$ and $\{1,e_1,e_2,\cdots, e_7\}$ is the standard orthonormal basis of the Octonions (Cayley numbers) $\mathbb{O}$. In fact, let $1=(1, 0), e_1=(i, 0), e_2=(j, 0), e_3=(k, 0), e_4=(0, 1), e_5=(0, i), e_6=(0, j), e_7=(0, k)\in\mathbb{H}\times\mathbb{H}$. Recalling the Cayley-Dickson construction of the product of Octonions $\mathbb{O}\cong \mathbb{H}\times\mathbb{H}$: \begin{eqnarray*} \mathbb{O}\times \mathbb{O}&\longrightarrow&\mathbb{O}\\ (a,b),~(c,d)&\mapsto&(a,b)\cdot (c,d) =: (ac-\bar{d}b, ~ da+b\bar{c}), \end{eqnarray*} one can see easily that $e_1(e_2(\cdots(e_7z)))=-z$, $\forall~ z\in\mathbb{O}$. Then it follows immediately that $P_0, \ldots, P_8$ is a definite system. Take $x=\frac{1}{\sqrt{2}}(1, 0, 0, 1)$, and $$X:=\frac{1}{2}(e_2, e_3, e_3, -e_2), \quad Y:=\frac{1}{2}(-e_7, e_6, e_6, e_7).$$ Clearly, $x\in M_+$ and $X, Y\in T_xM_+$. Moreover \begin{equation*} \left\{\begin{array}{ll} |X|=|Y|=1, \quad \langle X, ~Y\rangle=0\\ P_2X=-X,~~ P_2Y=Y, ~~\langle P_5X, ~Y\rangle=1,\\ \langle P_{\alpha}X, ~X\rangle=\langle P_{\alpha}Y, ~Y\rangle=0, \quad\forall ~~\alpha\neq 2,\\ \langle P_{\alpha}X, ~Y\rangle=0\quad \forall~~ \alpha\neq 5. \end{array} \right. \end{equation*} Therefore, the sectional curvature $$K(X, Y)=1+\langle P_2X, X\rangle\langle P_2Y, Y\rangle - \langle P_5X, Y\rangle^2=-1<0.$$ \vspace{2mm} To facilitate the expression, we deal with the case $(9, 6)$ before the indefinite $(8,7)$ case. \vspace{2mm} \noindent $(7)$ \emph{\textbf{$M_+$ with $(m_1, m_2)=(9, 6)$}. } For $(u,v)\in \mathbb{R}^{32}=\mathbb{O}^4$ and $u=(u_1, u_2), v=(v_1, v_2)\in \mathbb{O}\oplus\mathbb{O}$, we construct a symmetric Clifford system $P_0,\ldots, P_9$ on $\mathbb{R}^{32}$ as follows \begin{equation* \left\{\begin{array}{ll} P_0(u ,v)=(u, -v), ~~P_1(u, v)=(v, u),\\ P_{1+\alpha}(u, v)=(E_{\alpha}v, -E_{\alpha}u) ~(\alpha=1,\ldots, 7),\\ P_9(u, v)=(Jv, -Ju). \end{array} \right. \end{equation*} $E_{\alpha}$ acts on $u$ or $v$ in this way $$E_{\alpha}u=(e_{\alpha}u_1, -e_{\alpha}u_{2}),~\alpha=1,\cdots,7,$$ where $\{1,e_1,e_2,\cdots, e_7\}$ is the standard orthonormal basis of the Octonions $\mathbb{O}$ and $J$ acts on $u, v$ by $$Ju=J(u_1, u_2):=(u_2, -u_1).$$ Take $x=\frac{1}{\sqrt{2}}(1, 0, 0, e_1)$, and $$X:=(e_2, 0, 0, 0), \quad Y:=(0, 0, 0, e_2).$$ It is easy to see that $x\in M_+$ and $X, Y\in T_xM_+$. Moreover \begin{equation*} \left\{\begin{array}{ll} |X|=|Y|=1, \quad \langle X, ~Y\rangle=0\\ P_0X=X,~~ P_0Y=-Y, ~~\langle P_9X, ~Y\rangle=1,\\ \langle P_{\alpha}X, ~X\rangle=\langle P_{\alpha}Y, ~Y\rangle=0, \quad\forall ~~\alpha\neq 0,\\ \langle P_{\alpha}X, ~Y\rangle=0\quad \forall~~ \alpha\neq 9. \end{array} \right. \end{equation*} Therefore, the sectional curvature $$K(X, Y)=1+\langle P_0X, X\rangle\langle P_0Y, Y\rangle - \langle P_9X, Y\rangle^2=-1<0.$$ \noindent $(8)$ \emph{\textbf{$M_+$ with $(m_1, m_2)=(8, 7)$ in the indefinite case}. } On $\mathbb{R}^{32}$, we have a symmetric Clifford system $P_0,\ldots, P_9$ as that in (7). Similarly as in the alternative proof for the indefinite $(4,3)$ case, removing $P_1$ from $P_0,\ldots, P_9$, we obtain a new symmetric Clifford system $Q_0=P_0, Q_{\alpha}=P_{1+\alpha}$ $(\alpha=1,\ldots,8)$ on $\mathbb{R}^{32}$. It is direct to see $$Q_0\cdots Q_8(u,v)=(-Ju, Jv)=(-u_2, u_1, v_2, -v_1),$$ and thus $Q_0,\ldots, Q_8$ is an indefinite system. Taking $x$, $X, Y$ the same with those in (7), we obtain the sectional curvature $$K(X, Y)=1+\langle Q_0X, X\rangle\langle Q_0Y, Y\rangle - \langle Q_8X, Y\rangle^2=-1<0.$$ \vspace{1mm} \noindent \subsubsection{\textbf{$M_-$ of OT-FKM type.}} As we mentioned in $(5)$ of last subsection, when $m_1=m=1$, \cite{TY13} showed that $M_-$ of OT-FKM type is isometric to $S^1(1)\times S^{l-1}(1)\big/\mathbb{Z}_2$. Thus the sectional curvature of $M_-$ in this case is non-negative. We recall some basic properties of $M_-$. Given $x\in M_-$, there always exists $P$ in the unit sphere $\Sigma(P_0,\cdots, P_m)$ spanned by $P_0,\ldots, P_m$ such that $Px=x$. Denote $Q_0=P$, one can extend it to such a symmetric Clifford system $\{Q_0, \ldots, Q_m\}$ with $Q_i~ (i\geq 1)$ perpendicular to $Q_0$ and $\Sigma(Q_0,\cdots, Q_m)=\Sigma(P_0,\cdots, P_m)$. Choosing $\eta_1, \eta_2, \cdots, \eta_{l-m}$ as an orthonormal basis of $T^{\perp}_xM_-$ in $S^{2l-1}(1)$, Lemma 2.1 of \cite{TY15} reveals that for any $1\leq i\leq m$, \begin{equation}\label{basis} \{Q_i\eta_1,\cdots,Q_i\eta_{l-m},~~Q_1x,\cdots,Q_mx,~~Q_iQ_1x,\cdots,\widehat{Q_iQ_{i}x},\cdots,Q_iQ_mx\} \end{equation} constitute an orthonormal basis of $T_xM_-$. Moreover, we can decompose $A_{\alpha}X$ as \begin{equation}\label{A} A_{\alpha}X=\sum_{i=1}^m(\langle X, Q_ix\rangle Q_i\eta_{\alpha} + \langle X, Q_i\eta_{\alpha}\rangle Q_ix). \end{equation} When $m\geq 2$, we take $X=(Q_ix+Q_i\eta_{\alpha})\big/\sqrt{2}$, $Y=(Q_jx-Q_j\eta_{\alpha})\big/\sqrt{2}$ with $i, j>0, i\neq j$. A direct calculation by virtue of (\ref{A}) leads to $$\langle X, Y\rangle=0, ~~|X|=|Y|=1, ~~\langle A_{\beta} X, X\rangle=\delta_{\beta\alpha}, ~~\langle A_{\beta} Y, Y\rangle=-\delta_{\beta\alpha}.$$ Therefore, the sectional curvature $$K(X, Y)=1+\sum_{\beta=1}^{l-m}\langle A_{\beta}X, X\rangle\langle A_{\beta}Y, Y\rangle -\sum_{\beta=1}^{l-m} \langle A_{\beta}X, Y\rangle^2=-\sum_{\beta=1}^{l-m} \langle A_{\beta}X, Y\rangle^2.$$ Suppose $K(X, Y)\geq 0$. Then $\langle A_{\beta}X, Y\rangle=0$ for any $\beta=1,\ldots, l-m.$ Equivalently, $\langle A_{\beta}X, Q_jx\rangle=\langle A_{\beta}X, Q_j\eta_{\alpha}\rangle$ for any $j\neq i$. Furtherer, combining with (\ref{A}), we could derive that $$\langle Q_iQ_j\eta_{\beta}, \eta_{\alpha}\rangle=\langle Q_jQ_i\eta_{\beta}, \eta_{\alpha}\rangle, ~~\forall~ i\neq j, ~~\forall~ \alpha, \beta,$$ which leads to $$\langle Q_j\eta_{\beta}, Q_i\eta_{\alpha}\rangle=0, ~~\forall~ i\neq j, ~~\forall~ \alpha, \beta.$$ By conjunction with (\ref{basis}), this leads to $l-m-1\leq 0,$ which contradicts $m_2=l-m-1\geq 1.$ In conclusion, the sectional curvature of $M_-$ of OT-FKM type with $m\geq 2$ is not non-negative. \vspace{3mm} \noindent \subsubsection{\textbf{ Focal submanifolds with $g=4$ and $(m_1, m_2)=(2,2)$.}} According to \cite{QTY13}, one focal submanifold is diffeomorphic to the oriented Grassmann manifold $\widetilde{G_2}(\mathbb{R}^5)$, which is Einstein, and the other is diffeomorphic to $\mathbb{C} P^3$. We first deal with the focal submanifold $M_-$ diffeomorphic to $\widetilde{G_2}(\mathbb{R}^5)=\frac{SO(5)}{SO(2)\times SO(3)}$. As mentioned in Remark 4.1 of \cite{QTY13}, the induced metric on $M_-$ from the Euclidean space $\mathbb{R}^{10}$ is the unique invariant metric on the compact irreducible symmetric space $\widetilde{G}_2(\mathbb{R}^5)$, because $M_-\subset \mathbb{R}^{10}$ is just the standard Pl{\"u}cker embedding of $\widetilde{G}_2(\mathbb{R}^5)$ into $\mathbb{R}^{10}$ (\cite{Sol92}). Thus the sectional curvature of $M_-$ diffeomorphic to $\widetilde{G_2}(\mathbb{R}^5)$ is non-negative. As for the other focal submanifold $M_+$ diffeomorphic to $\mathbb{C} P^3$, we follow 4.1 (2) of \cite{QTY13}. Choosing a point $e'\in so(5, \mathbb{R})$ with coordinates $a_{12}=a_{34}=\frac{1}{\sqrt{2}}$ and zero otherwise, they gave the components of the second fundamental form of $M_+$ at $e'$ as follows $$s_0=x_1^2+x_2^2-y_1^2-y_2^2,\quad s_1=2(x_1y_1+x_2y_2),\quad s_2=2(x_2y_1-x_1y_2),$$ where $\{x_1, x_2, y_1, y_2, z_1, z_2\}$ are the tangent coordinates. Polarize $s_0, s_1, s_2$ and take $X=(0,0,\frac{1}{\sqrt{2}}, \frac{1}{\sqrt{2}}, 0,0)$, $Y=(\frac{1}{\sqrt{2}}, \frac{1}{\sqrt{2}}, 0,0,0,0)$. It is easy to see that \begin{equation*} \left\{\begin{array}{ll} \langle A_0X, ~X\rangle=-1, \,\,\, \langle A_0Y, Y\rangle=1,\\ \langle A_{\alpha}X, ~X\rangle=\langle A_{\alpha}Y, ~Y\rangle=0, \quad\alpha=1,2,\\ \langle A_1X, ~Y\rangle=1,\,\,\, \langle A_{\alpha}X, ~Y\rangle=0,\quad \alpha=0,2. \end{array} \right. \end{equation*} Therefore, the sectional curvature $$K(X, Y)=1+\langle A_0X, X\rangle\langle A_0Y, Y\rangle -\langle A_1X, Y\rangle^2=-1<0.$$ \vspace{1mm} \noindent \subsubsection{\textbf{ Focal submanifolds with $g=4$ and $(m_1, m_2)=(4,5)$.}} In this case, we also follow \cite{QTY13}, where they gave explicit components of the second fundamental form. For the focal submanifold $M_+^{14}$, choosing a point $e\in so(5, \mathbb{C})$ with coordinates $a_{12}=a_{34}=\frac{1}{\sqrt{2}}$ and zero otherwise, the components of the second fundamental form of $M_+^{14}$ at $e$ are given by \begin{eqnarray*} &&s_0=x_{1}^2+\cdots +x_5^2-y_1^2-\cdots-y_5^2,\\ &&s_1=2(x_1y_1+\cdots+x_4y_4) +\sqrt{2}(x_5+y_5)z_1,\\ &&s_2=2(x_2y_1-x_1y_2)+2(x_3y_4-x_4y_3)+\sqrt{2}(x_5+y_5)z_2,\\ &&s_3=2(x_3y_1-x_1y_3)+2(x_4y_2-x_2y_4)+\sqrt{2}(x_5+y_5)z_3,\\ &&s_4=2(x_2y_3-x_3y_2)+2(x_4y_1-x_1y_4)+\sqrt{2}(x_5+y_5)z_4, \end{eqnarray*} where $(x_1,...,x_5,y_1,...,y_5,z_1,...,z_4)$ are the tangent coordinates. Polarize $s_0, \ldots, s_4$ and take $X=(1,0,\ldots,0)$ with $x_1=1$ and $Y=(0,\ldots,0,1,0\ldots,0)$ with $y_1=1$. It is easy to see that \begin{equation*} \left\{\begin{array}{ll} \langle A_0X, ~X\rangle=1, \,\,\, \langle A_0Y, Y\rangle=-1,\\ \langle A_{\alpha}X, ~X\rangle=\langle A_{\alpha}Y, ~Y\rangle=0, \quad\forall\alpha\neq 0,\\ \langle A_1X, ~Y\rangle=1,\,\,\, \langle A_{\alpha}X, ~Y\rangle=0,\quad \forall\alpha\neq 1 \end{array} \right. \end{equation*} Therefore, the sectional curvature $$K(X, Y)=1+\langle A_0X, X\rangle\langle A_0Y, Y\rangle -\langle A_1X, Y\rangle^2=-1<0.$$ For the focal submanifold $M_-^{13}$, choosing a point $e'\in so(5, \mathbb{C})$ with coordinates $a_{12}=-a_{21}=1$ and zero otherwise, the components of the second fundamental form of $M_-^{13}$ at $e'$ are given by \begin{eqnarray*} s_0&=& -2x_{14}x_{23}+2x_{13}x_{24}+2y_{14}y_{23}-2y_{13}y_{24},\\ s_1 &=& -2x_{15}x_{23}+2x_{13}x_{25}+2y_{15}y_{23}-2y_{13}y_{25}, \\ s_2 &=& -2x_{15}x_{24}+2x_{14}x_{25}+2y_{15}y_{24}-2y_{14}y_{25}, \\ s_3 &=& -2x_{14}x_{23}+2x_{13}y_{24}-2y_{14}x_{23}+2y_{13}x_{24}, \\ s_4 &=& -2x_{15}y_{23}+2x_{13}y_{25}-2y_{15}x_{23}+2y_{13}x_{25}, \\ s_5 &=& -2x_{15}y_{24}+2x_{14}y_{25}-2y_{15}x_{24}+2y_{14}x_{25}. \end{eqnarray*} where $\{y_{12},\ x_{13},\ y_{13},$ $x_{14},\ y_{14},\ x_{15},\ y_{15},\ x_{23},$ $y_{23},\ x_{24},\ y_{24},\ x_{25},\ y_{25}\}$ are the tangent coordinates. Polarize $s_0, \ldots, s_5$ and take $X$ with $x_{14}=x_{23}=\frac{1}{\sqrt{2}}$ and zero otherwise, $Y$ with $x_{13}=x_{24}=y_{24}=\frac{1}{\sqrt{3}}$ and zero otherwise. It is easy to see that \begin{equation*} \left\{\begin{array}{ll} \langle A_0X, ~X\rangle=-1, ~~\langle A_3X, ~X\rangle=-1, ~~\langle A_{\alpha}X, ~X\rangle=0, ~~\forall \alpha\neq 0,3,\\ \langle A_0Y, Y\rangle=\frac{2}{3},~~\langle A_3Y, Y\rangle=\frac{2}{3}, ~~\langle A_{\alpha}Y, Y\rangle=0,~~ \forall \alpha\neq 0,3. \end{array} \right. \end{equation*} Therefore, the sectional curvature $$K(X, Y)=1+\langle A_0X, X\rangle\langle A_0Y, Y\rangle +\langle A_3X, X\rangle\langle A_3Y, Y\rangle-\sum_{\alpha=0}^5\langle A_{\alpha}X, Y\rangle^2\leq -\frac{1}{3}<0.$$ \noindent \subsubsection{\textbf{ Focal submanifolds with $g=6$ and $(m_1, m_2)=(1, 1)$.}} Given $p\in M_+^{5} \subset S^7$, with respect to a suitable tangent orthonormal basis $e_1, \ldots, e_5$ of $T_pM_+$, Miyaoka \cite{Miy93} showed that the shape operators of $M_+$ are given by \begin{equation}\label{M+5} A_0= \left( \begin{smallmatrix} \sqrt{3}& & & & \\ & \frac{1}{\sqrt{3}}& & &\\ & & 0 &&\\ && & -\frac{1}{\sqrt{3}}&\\ &&&&-\sqrt{3} \end{smallmatrix}\right),\quad A_1= \left(\begin{smallmatrix} & & & & \sqrt{3} \\ & & & -\frac{1}{\sqrt{3}} & \\ & & 0& & \\ &-\frac{1}{\sqrt{3}} & & & \\ \sqrt{3} & & & & \end{smallmatrix}\right). \end{equation} A direct calculation leads to $$K(e_1, e_5)=1+\sum_{\alpha=0}^1\langle A_{\alpha}e_1, e_1\rangle\langle A_{\alpha}e_5, e_5\rangle-\sum_{\alpha=0}^1\langle A_{\alpha}e_1, e_5\rangle^2=-5<0.$$ Similarly, for the focal submanifold $M_-^5$, the shape operators of $M_-$ are given by \begin{equation}\label{M-5} A_0= \left( \begin{smallmatrix} \sqrt{3}& & & & \\ & \frac{1}{\sqrt{3}}& & &\\ & & 0 &&\\ && & -\frac{1}{\sqrt{3}}&\\ &&&&-\sqrt{3} \end{smallmatrix}\right),\quad A_1= \left(\begin{smallmatrix} 0 &-1 & 0 & 0 & 0 \\ -1 &0 &0 & \frac{2}{\sqrt{3}} & 0\\ 0 &0 & 0& 0 &0 \\ 0&\frac{2}{\sqrt{3}} & 0 &0 &-1 \\ 0 & 0& 0&-1 &0 \end{smallmatrix}\right). \end{equation} A direct calculation leads to $$K(e_1, e_5)=1+\sum_{\alpha=0}^1\langle A_{\alpha}e_1, e_1\rangle\langle A_{\alpha}e_5, e_5\rangle-\sum_{\alpha=0}^1\langle A_{\alpha}e_1, e_5\rangle^2=-2<0.$$ \noindent \subsubsection{\textbf{ Focal submanifolds with $g=6$ and $(m_1, m_2)=(2,2)$.}} Given $p\in M_+^{10} \subset S^{13}$, with respect to a suitable tangent orthonormal basis $e_1, \ldots, $ of $T_pM_+$, Miyaoka \cite{Miy13} showed that the shape operators of $M_+$ are given by \begin{equation}\label{M+10} A_0= \left( \begin{smallmatrix} \sqrt{3}I& & & & \\ & \frac{1}{\sqrt{3}}I& & &\\ & & 0 &&\\ && & -\frac{1}{\sqrt{3}}I&\\ &&&&-\sqrt{3}I \end{smallmatrix}\right),\quad A_1= \left( \begin{smallmatrix} & & & & \sqrt{3}J\\ && & \frac{1}{\sqrt{3}}J&\\ & & 0 &&\\ & -\frac{1}{\sqrt{3}}J& &&\\ -\sqrt{3}J &&&& \end{smallmatrix}\right)\end{equation} and $$ A_2= \left( \begin{smallmatrix} & & & & \sqrt{3}I\\ & & & \frac{1}{\sqrt{3}}I&\\ & & 0 &&\\ &\frac{1}{\sqrt{3}}I& & &\\ \sqrt{3}I &&&& \end{smallmatrix}\right), ~~\rm{where}~~~I=\left( \begin{smallmatrix} 1&0\\ 0&1 \end{smallmatrix}\right), J=\left( \begin{smallmatrix} 0&-1\\ -1&0 \end{smallmatrix}\right)$$ A direct calculation leads to $$K(e_1, e_{10})=1+\sum_{\alpha=0}^2\langle A_{\alpha}e_1, e_1\rangle\langle A_{\alpha}e_{10}, e_{10}\rangle-\sum_{\alpha=0}^2\langle A_{\alpha}e_1, e_{10}\rangle^2=-5<0.$$ Similarly, for the focal submanifold $M_-^{10}$, the shape operators of $M_-$ are given by \begin{equation}\label{M-10} A_0= \left( \begin{smallmatrix} \sqrt{3}I& & & & \\ & \frac{1}{\sqrt{3}}I& & &\\ & & 0 &&\\ && & -\frac{1}{\sqrt{3}}I&\\ &&&&-\sqrt{3}I \end{smallmatrix}\right),\quad A_1= \left(\begin{smallmatrix} 0 &-I & 0 & 0 & 0 \\ -I &0 &0 & \frac{2}{\sqrt{3}}I & 0\\ 0 &0 & 0& 0 &0 \\ 0&\frac{2}{\sqrt{3}}I & 0 &0 &-I \\ 0 & 0& 0&-I &0 \end{smallmatrix}\right).\end{equation} and $$ A_2= \left(\begin{smallmatrix} 0 &J & 0 & 0 & 0 \\ -J &0 &0 & -\frac{2}{\sqrt{3}}J & 0\\ 0 &0 & 0& 0 &0 \\ 0&\frac{2}{\sqrt{3}}J & 0 &0 & J \\ 0 & 0& 0&-J &0 \end{smallmatrix}\right)$$ A direct calculation leads to $$K(e_1, e_{10})=1+\sum_{\alpha=0}^2\langle A_{\alpha}e_1, e_1\rangle\langle A_{\alpha}e_{10}, e_{10}\rangle-\sum_{\alpha=0}^2\langle A_{\alpha}e_1, e_{10}\rangle^2=-2<0.$$ \end{proof} \vspace{2mm} \subsection{Ricci curvature.} As we introduced before, the Ricci curvature of an isoparametric hypersurface $M^n$ in $S^{n+1}(1)$ with $g=1$ is obviously positive and that with $g=2$ is positive unless it is $S^1(r_1)\times S^{n-1}(r_2)$, where the Ricci curvature could be zero. For other cases, we derive the following proposition on Ricci curvature of an isoparametric hypersurface \begin{prop}\label{Ricci of hyp} For an isoparametric hypersurface $M^n$ in $S^{n+1}(1)$, we have \begin{itemize} \item[(i)] When $g=3, m=1$, the Ricci curvature is not non-negative; when $g=3, m>1$, the Ricci curvature is positive if $M^n$ is close to the minimal isoparametric hypersurface; \item[(ii)] When $g=4, m_1=1$ or $m_2=1$, the Ricci curvature is not non-negative; when $g=4, m_1, m_2\geq 2$ the Ricci curvature is positive if $M^n$ is close to the minimal isoparametric hypersurface; \item[(iii)] When $g=6, m=1$, the Ricci curvature is not non-negative; when $g=6, m=2$, the Ricci curvature is not non-negative if $M^n$ is close to the minimal isoparametric hypersurface. \end{itemize} \end{prop} \begin{proof} Denote by $e_1,\ldots, e_n$ an orthonormal basis of $T_pM^n$ corresponding to principal curvatures $\lambda_1\geq \lambda_2\geq\cdots\geq\lambda_n.$ It follows from Gauss equation that $Ric(e_i)=n-1+\lambda_i H-\lambda_i^2 ,$ where $H=\lambda_1+\cdots+\lambda_n$ is the mean curvature of $M^n$. (i) When $g=3, m=1$, denote $\lambda_1=\cot\theta$ with $\theta\in(0, \frac{\pi}{3})$, then $H=3\cot 3\theta$, and $$Ric(e_1)=2+3\cot\theta\cot3\theta-\cot^2\theta=-\frac{2}{3}-\frac{8}{3(3\cot^2\theta-1)}<0.$$ When $g=3, m\geq 2$, we need only to prove the positivity of the Ricci curvature for the minimal isoparametric hypersurface, since the principal curvatures are continuous functions on $M^n$. Let $X=\sum_{i=1}^na_ie_i$ with $\sum_{i=1}^na_i^2=1$ be a unit tangent vector, then $Ric(X)=n-1+\sum_i\lambda_ia_i^2H-\sum_i\lambda_i^2a_i^2.$ In the minimal case, $\theta=\frac{\pi}{6}$ and \begin{eqnarray*} Ric(X)&=&n-1-\sum_i\lambda_i^2a_i^2\geq n-1- \max\{\cot^2\theta, \cot^2(\theta+\frac{2}{3}\pi)\}\\ &\geq&n-4=3m-4>0. \end{eqnarray*} (ii) When $g=4$, denote $\lambda_1=\cot\theta$ with $\theta\in (0, \frac{\pi}{4})$, then the four distinct principal curvatures can be expressed as $\lambda_1, \frac{\lambda_1-1}{\lambda_1+1}, -\frac{1}{\lambda_1}, -\frac{\lambda_1+1}{\lambda_1-1}$. Thus \begin{equation}\label{H} H=m_1\frac{\lambda_1^2-1}{\lambda_1}-4m_2\frac{\lambda_1}{\lambda_1^2-1}. \end{equation} In case $m_1=1$, a direct calculation leads to $$Ric(e_1)=2(1+m_2)-1+\lambda_1(H-\lambda_1)=-2m_2\frac{\lambda_1^2+1}{\lambda_1^2-1}<0.$$ The discussion for case $m_2=1$ is similar. In case $m_1, m_2\geq 2$, we only consider Ricci curvature of the minimal isoparametric hypersurface. By (\ref{H}), $H=0$ implies that $$\lambda_1=\cot\theta=\sqrt{\frac{m_2}{m_1}}+\sqrt{\frac{m_2}{m_1}+1},$$ and thus $\lambda_1^2<2m_2+3\leq2(m_1+m_2)-1=n-1.$ Similarly, $\lambda_n^2=\cot^2(\theta+\frac{3}{4}\pi)<2m_1+3\leq n-1.$ Therefore, $\min Ric(X)=n-1-\max\{\lambda_1^2, \lambda_n^2\}>0.$ (iii) When $g=6, m=1$, denote $\lambda_1=\cot\theta$ with $\theta\in(0, \frac{\pi}{6})$, then $H=6\cot6\theta$. It is direct to compute that $$Ric(e_1)=n-1+\lambda_1(H-\lambda_1)=-4\frac{(\lambda_1^2+1)(5\lambda_1^2-3)}{(\lambda_1^2-3)(3\lambda_1^2-1)}<0,$$ since $\lambda_1>\sqrt{3}$. When $g=6, m=2$ and $M^n$ is minimal, $H=0$ implies that $\theta=\frac{\pi}{12}$, and $\lambda_1=\cot\theta=2+\sqrt{3}=-\lambda_n$. Therefore, $\min Ric(X)=n-1-\max\{\lambda_1^2, \lambda_n^2\}=11-(2+\sqrt{3})^2<0.$ \end{proof} \begin{rem} In Lemma 2 of \cite{Wu94}, the positivity of the Ricci curvature of a minimal isoparametric hypersurface in the case $g=4, m_1, m_2\geq 2$ is also discussed. \end{rem} Next, we consider the Ricci curvature of focal submanifolds. As we discussed in the beginning of last subsection, it is obvious that the Ricci curvatures of the focal submanifolds are positive when $g=2, 3$. When $g=4$, it was dealt in (5.2) of \cite{TY15} that the Ricci curvature of $M_+$ satisfies $Ric(X)\geq 2(m_2-1)$. Thus it is positive if $m_2>1$. Similarly, the Ricci curvature of $M_-$ is positive if $m_1>1$. We deal with the cases with $g=6$ and obtain the following theorem \begin{prop}\label{Ricci of focal} For focal submanifolds of an isoparametric hypersurface with $g=6$ in $S^{n+1}(1)$, we have \begin{itemize} \item[(i)] When $m=1$, the Ricci curvature is not non-negative; \item[(ii)] When $m=2$, the Ricci curvature is non-negative. \end{itemize} \end{prop} \begin{proof} (i). For $M_+^5$, let $e_1,\ldots, e_5$ be orthonormal basis of $T_pM_+$ corresponding to (\ref{M+5}). Let $X=\sum_{i=1}^5a_ie_i$ with $\sum_{i=1}^5a_i^2=1$. Combining with the minimality of focal submanifolds in the unit sphere, we can calculate the Ricci curvature directly \begin{equation}\label{Ricci of M+5} Ric(X)=(n-1)|X|^2-\sum_{\alpha=0}^1|A_{\alpha}X|^2=-2a_1^2+\frac{10}{3}a_2^2+4a_3^2+\frac{10}{3}a_4^2-2a_5^2. \end{equation} Clearly, it is not non-negative. For $M_-^5$, let $e_1,\ldots, e_5$ be orthonormal basis of $T_pM_-$ corresponding to (\ref{M-5}). Let $X=\sum_{i=1}^5a_ie_i$ with $\sum_{i=1}^5a_i^2=1$. A direct calculation leads to \begin{equation}\label{Ricci of M-5} Ric(X)=(n-1)|X|^2-\sum_{\alpha=0}^1|A_{\alpha}X|^2=\frac{4}{3}a_2^2+4a_3^2+\frac{4}{3}a_4^2+\frac{4}{\sqrt{3}}a_1a_4+\frac{4}{\sqrt{3}}a_2a_5. \end{equation} Again, it is not non-negative. For example, take $a_1=-\frac{\sqrt{2}}{2}, a_4=\frac{\sqrt{2}}{2}$, $a_1=a_3=a_5=0$, then $Ric(X)=\frac{2}{3}-\frac{2}{\sqrt{3}}<0.$ Moreover, as a quadratic form, the eigenvalues of $Ric(X)$ in (\ref{Ricci of M+5}) are $-2, -2, \frac{10}{3}, \frac{10}{3}, 4$, and that in (\ref{Ricci of M-5}) are $-\frac{2}{3}, -\frac{2}{3}, 2, 2, 4$. Therefore, the intrinsic geometry of the two focal submanifolds with $g=6, m=1$ are essentially different. Especially, they are not isometric to each other as mentioned in \cite{TXY14}. \vspace{2mm} (ii). For $M_+^{10}$, using (\ref{M+10}), we take a similar process as in (i) and obtain \begin{equation}\label{Ricci of M+10} Ric(X)=(n-1)|X|^2-\sum_{\alpha=0}^2|A_{\alpha}X|^2=8(a_3^2+a_4^2+a_7^2+a_8^2)+9(a_5^2+a_6^2), \end{equation} which is obviously non-negative. For $M_-^{10}$, using (\ref{M-10}), a similar process as in (i) leads to \begin{equation}\label{Ricci of M-10} Ric(X)=(n-1)|X|^2-\sum_{\alpha=0}^2|A_{\alpha}X|^2=4\sum_{i=1}^{10}a_i^2+5(a_5^2+a_6^2), \end{equation} which is obviously non-negative. From (\ref{Ricci of M+10}), (\ref{Ricci of M-10}), we can see directly that the eigenvalues of the Ricci curvature of $M_+^{10}$ and $M_-^{10}$ are different, thus they are not isometric. \end{proof}
\section{Introduction} \label{sec: intro} During the last five years, machine learning and deep learning have been more and more been used in the field of asteroid dynamics. Among the latest application, supervised methods of machine learning have been used to identify the population of asteroids in three-body mean-motion resonances \citep{2017MNRAS.469.2024S}, new members of known asteroid families \citep{Carruba_2020}, and asteroids groups inside the $z_1$ and $z_2$ secular resonances \citep{Carruba_2021}, among others. Deep learning in the form of artificial neural networks has been recently used for identifying members of asteroid families \citep{Vujicic_2020}. While several applications of artificial neural networks exist in other astronomy fields for the purpose of identifying images, like, for instance, methods to identify different types of galaxies clusters \citep{Su_2020}, to our knowledge such methods have not yet been applied for asteroid dynamics problems. Here we attempt for the first time to use artificial neural networks for automatically identifying the behaviour of asteroids near the two-body M1:2 mean-motion resonance with Mars. As discussed by other authors \citep{Gallardo_2011}, three types of orbits are possible near resonance: {\it libration}, where the resonant argument of the resonance, which we will define in section~(\ref{sec: m12_dyn}), oscillates around an equilibrium point, {\it circulation}, where the resonant argument cover the whole range of values from $0^{\circ}$ to $360^{\circ}$, and {\it switching} orbits, where the resonant argument alternates phases of libration and circulation. In previous works, the classification of the type of orbits on which an asteroid resides was either performed manually, by visually inspecting the time behaviour of the resonance argument (see, for instance, \citet{2018P&SS..157...72C} and references therein), or by using automatic algorithms for the same purpose \citep{2018Icar..304...24S,2014Icar..231..273G,2016Icar..274...83G}. In this work, we use artificial neural networks for classifying an asteroid's orbital type for all numbered asteroids in the region affected by this resonance. We then employed genetic algorithms to select the best performing machine learning supervised method, to predict the labels of multi-opposition objects in the area. Multi-opposition asteroids are asteroids that have been observed at several oppositions to the Sun from Earth, whose orbits are somewhat well-established. Once the orbit is confirmed, an asteroid receives an identification number and becomes a numbered asteroid, like 2 Vesta, 4 Pallas, 10 Hygiea, among others. Since the orbits of multi-oppositions asteroids are not as well-established as those of numbered bodies, here we used the labels of numbered asteroids to predict those of the multi-oppositions objects. Finally, we verified which local asteroid families are most affected by this dynamical resonance, to see if our results are consistent with those in the literature. We start our analysis by revising the dynamical properties of asteroids in the region. \section{The population of asteroids in the M1:2 resonance: dynamics} \label{sec: m12_dyn} The population of asteroids inside the M1:2 mean motion resonance with Mars has been the subject of a study by \citet{Gallardo_2011}, that investigated the dynamical, physical and evolutionary properties of these asteroids. Here we will briefly summarize the dynamical characteristics of this population, and distinguish between the types of orbits possible in the orbital region affected by this resonance. Figure~(\ref{Fig: m12_prop_ae}) displays an $(a,e)$ projection of 9457 numbered asteroids in the range in $a$ from 2.411 to 2.426 au. Values of synthetic proper elements for asteroids in the region were obtained from the {\it Asteroid Families Portal} ($AFP$, \citet{Radovic_2017}, accessed on August 1st, 2020). Synthetic proper elements are constant of the motion on timescales of millions of years and are obtained as the outcome of numerical simulations, using methods described in \citet{Knezevic_2003}. The V-shaped region at the resonance centre is associated with the M1:2 resonance. The higher number concentration of objects at the edge of the V-shape is caused by the phenomenon called ``resonance stickiness'' \citep{Malishkin_1999}. \citet{Gallardo_2011} define two main resonant arguments for this resonance. $\sigma$ is given by: \begin{figure} \centering \centering \includegraphics[width=3.0in]{./FIGURES/m12_ast_pop.eps} \caption{Proper $(a,e)$ distribution for asteroids in the orbital region of the M1:2 mean-motion resonance.} \label{Fig: m12_prop_ae} \end{figure} \begin{equation} \sigma=2 \lambda -{\lambda}_{M}-\varpi, \label{eq: sigma} \end{equation} \noindent where $\lambda = M+\Omega+\omega$ is the mean longitude, $\varpi=\Omega+\omega$, with $\Omega$ the longitude of the node, $\omega$ the argument of pericentre, and where the suffix $M$ identifies the planet Mars. ${\sigma}_1$ is defined as: \begin{equation} {\sigma}_1=2 \lambda -{\lambda}_{M}-{\varpi}_{M}. \label{eq: sigma_1} \end{equation} The orbital behaviour of asteroids in the affected region can be identified by studying the time dependence of these two angles. As previously discussed, asteroids for which the critical arguments cover the whole range of values, from $0^{\circ}$ to $360^{\circ}$, are on {\it circulating} orbits. If the argument oscillates around an equilibrium point we have a {\it librating} orbit. Whether the argument alternates phases of libration and circulations, or switch between different equilibrium points, we have a {\it switching} orbit, as defined in this work. We identify the orbital types of asteroids by performing a 100000 yr simulation with the Burlisch-Stoer integrator of the {\it SWIFT} package \citep{levison_1994}. We use a time step of 1 day, a tolerance ($EPS$) equal to $10^{-8}$, and integrated the asteroids under the influence of all planets. None of the asteroids in our sample is a Mars-crosser or susceptible to experience close encounters with planets, which justifies the use of a Burlisch-Stoer integrator for this study. Figure~(\ref{Fig: polana_res_ang}) show the resonant argument for three asteroids in each of the three classes. As discussed by \citet{Gallardo_2011}, since the M1:2 is an external resonance, unusual equilibrium points for the $\sigma$ argument, like one at $100^{\circ}$, can occur. The main equilibrium point for the ${\sigma}_1$ argument is around $0^{\circ}$. \begin{figure*} \centering \includegraphics[width=3.5in]{./FIGURES/libr_res_arg.eps} \includegraphics[width=3.5in]{./FIGURES/polana_res_ang.eps} \includegraphics[width=3.5in]{./FIGURES/circ_res_arg.eps} \caption{The resonant angles $\sigma$, as defined by equation~(\ref{eq: sigma}) as a function of time for asteroids on librating, switching and circulating orbits of the M1:2 resonance.} \label{Fig: polana_res_ang} \end{figure*} Using this simulation set-up, we integrated 1000 asteroids in the orbital region of the M1:2 mean-motion resonance. Figure~(\ref{Fig: m12_expl_anal}) shows an $(a,e)$ projection of these asteroids, colour-coded for the behaviour of the $\sigma$ (left panel) and ${\sigma}_1$ resonant argument. The main difference between the two cases is the fraction of asteroids in pure librating states. For the case of $\sigma$, there were just 4 librators (0.4\%) and 202 oscillators (20.2). For ${\sigma}_1$, there were 69 librators (6.9\%) and 185 oscillators (18.5\%). Pure $\sigma$ librators tend to be much rarer than pure ${\sigma}_1$ ones. Since in this work we are interested in treating a multi-class problem, rather than a binary one, from now on we will focus our study on the case of the ${\sigma}_1$ resonant arguments. \begin{figure*} \centering \includegraphics[width=3.0in]{./FIGURES/m12_exp_an_s.eps} \includegraphics[width=3.0in]{./FIGURES/m12_exp_an_s1.eps} \caption{A proper $(a,e)$ projection of asteroids in the region of the M1:2 resonance. The left panel shows the orbital behaviour for the $\sigma$ resonant argument colour-coded as follows: red full circles are librators, yellow full circles are oscillators, and black dots are circulators. The right panel does the same, but for the ${\sigma}_1$ resonant argument.} \label{Fig: m12_expl_anal} \end{figure*} \section{Artificial Neural Networks} \label{sec: ANN} At the time that we carried out this study, there were 6440 numbered and multi-opposition asteroids in the region of the M1:2 mean-motion resonance. Analyzing resonant arguments for each of the asteroids in the region may be a very tiring and time-consuming endeavour, if performed manually. Automatic approaches not based on machine-learning have been developed in the last years to solve this problem \citep{2018Icar..304...24S,2014Icar..231..273G,2016Icar..274...83G}. Here this task will be performed by using artificial neural networks ({\it ANN}). The human brain classifies images by converting the light received by the eye's retina into electrical signals, that are then processed by a hierarchy of connected neurons to identify patterns. \begin{figure} \centering \centering \includegraphics[width=3.0in]{./FIGURES/ANN_Image.eps} \caption{A simple architecture for an {\it Artificial Neural Network}. The network has 3 neurons in the input layer, 5 in the hidden one and two in the output layer.} \label{Fig: Simple_ANN} \end{figure} Artificial neuron networks mimic the neurons web in a biological brain. Each artificial neuron can transmit a signal to other neurons. This signal, which is usually a real number, can be processed, and the signal coming out of each neuron is computed as a non-linear function of the inputs. A basic architecture for {\it ANN} consists of an input and an output layers, with the possible presence of one or more hidden layers between them to improve the model precision. Generally speaking, input layers will look for simpler patterns, while output layers will search for more complex relationships. Figure~(\ref{Fig: Simple_ANN}) shows the architecture of a simple {\it ANN}, with 3 neurons in the input layer, 5 in the hidden stratus, and 2 in the output layer. Each neuron will perform a weighted sum, $W_S$, given by: \begin{equation} W_S= \sum_{i=1}^{n} w_i X_i, \label{eq: W_S} \end{equation} \noindent where n is the number of input to process, $X_i$ are the signals from other neurons, and $w_i$ are the weights. {\it ANN} will optimize the values of the weights during the learning process. On the weighted sum $W_S$, {\it ANN} will apply an activation function. For images classifications, one of the most used activation function is the ``{\it relu}'', defined as: \begin{equation} y=max(W_S,0), \label{eq: relu} \end{equation} \noindent which will produce as an outcome the weighted sum itself $W_S$, if that is a positive number, or 0, if $W_S$ has a negative value. As a next step, the loss function must be applied to all the weights in the network through a back-propagation algorithm. A loss function is usually calculated by computing the differences between the predicted and real output values. An example of a loss function is the mean squared error, defined as: \begin{equation} C= \frac{1}{2}\sum_{j=1}^{n}(y_j-{\overline{y}}_j)^2, \label{eq: loss_MSE} \end{equation} \noindent where ${\overline{y}}_j$ is the expected value of the j-th outcome. For classification problems with multiple classes, with single classes identified by numbers, like the problem that we will discuss in this paper, the {\it sparse\_categorical\_crossentropy} loss function is generally used. Interested readers can find more information on the definition and use of this and other loss functions in the {\it Keras} documentation (https://keras.io/, \citet{Chollet_2018}). Once the loss function has been computed, the next step is to find its minimum, to optimize the values of the weights. Optimization algorithms find the gradient of the loss function and update the weights in the {\it ANN} based on this result. In this work, we will use the {\it Adam} optimizer \citep{Kingma_2015}. {\it ANN} use initial values of weights near zero. The first row of data is provided as input and processed through the network. The prediction of the network is compared to the real result, and the optimization of the cost function updates the values of the weights. This procedure is then repeated for all data, or, in some cases, for a subset, also called batch. An epoch is completed when the training procedure is finished for all the observations. This whole process can then be repeated for other epochs, to improve the quality of the predictions. Interested readers could find more information about the use of {\it ANN} in artificial intelligence in \citep{Lecun_2015}, or in the recent work on the application of {\it ANN} to the identification of asteroids belonging to asteroid families by \citep{Vujicic_2020}, and references therein. In the next subsection we will discuss applications of {\it ANN} for the classification of images. \subsection{Applications of {\it ANN} to M1:2 resonant arguments images} \label{sec: ANN_M12} Here we used the {\it Keras} implementation of {\it ANN}, which is also based on the {\it Tensorflow Python} software package \citep{Chollet_2018}. The process used in this work is the following: \begin{enumerate} \item The asteroid orbits are integrated under the gravitational influences of the planets. \item We compute the resonant arguments \item Images of the time dependence of resonant arguments are drawn \item The {\it ANN} trains on the training label image data \item Predictions on the test images are obtained, and images of the test data, with their classification are produced. \end{enumerate} The last step of producing images for the test data, with the proposed classification, is performed to make a visual confirmation by the user easier. The theory behind steps (i) and (ii) was discussed in section (\ref{sec: m12_dyn}). Here we will focus on steps (iii), (iv) and (v). 100$\times$ 100 pixel images of resonant arguments of the M1:2 resonance were stored and pre-processed before applying our model in step (iii). Each image pixel values fall in the range from 0 to 255. Before feeding the images to our model, we normalized the pixel values to a range between zero and one, to help the ANN to learn faster. The choice of the image resolution was a compromise between not exceeding the computer memory available in our machines while still having a resolution sufficient for the {\it ANN} to successfully work. To identify resonant argument images, we created a four-layer model with a flatten, an inner, a hidden, and an output layers. The architecture of the model is displayed in figure~(\ref{Fig: model_structure}). The flatten layer will transform the image matrices into arrays. The inner layer will look for simpler patterns in the arguments images, while the hidden layer, with half the neurons of the inner one, will search for more complex features. The output layer, with three nodes, will perform the final classification for the three possible classes: {\it circulation, switching} and {\it librating} orbits. \begin{figure} \centering \centering \includegraphics[width=3.0in]{./FIGURES/model_plot.eps} \caption{Neural network structure of the model used for classifying resonant arguments. We used a flatten layer, an inner layer, a hidden layer, and an output layer for final classification.} \label{Fig: model_structure} \end{figure} To quantitatively classify the outcome of {\it ANN}, it is often useful to compute values of metrics. Some of the most commonly used metrics for classifications problems are the {\it accuracy}, {\it recall} and {\it precision}. For a given class of orbits, we define True-Positive ({\it TP}) as the number of images successfully identified as belonging to that class by both the observer and the {\it ANN} model. True-Negative ({\it TN}) are the number of images that both methods identify as non-belonging to a given class. False-Positive ({\it FP}) are images classified as belonging to a class just by the {\it ANN} method. Finally, False-Negative ({\it FN}) are the images not classified to belong to a class just by the {\it ANN} approach. Values of $TP,TN,FP$ and $FN$ can be obtained by computing the confusion matrix on the images real and predicted labels. With these definitions, $accuracy$ \citep{FAWCETT2006861} is given by: \begin{equation} accuracy= \frac{TP+TN}{TP+TN+FP+FN}, \label{eq: accuracy} \end{equation} \noindent {\it Recall}, also known as {\it Completeness} in \citet{Carruba_2020}, is given by: \begin{equation} Completeness= \frac{TP}{TP+FN}, \label{eq: completeness} \end{equation} \noindent {\it Precision}, also known as {\it Purity} in \citet{Carruba_2020}, is defined as: \begin{equation} Purity= \frac{TP}{TP+FP}. \label{eq: purity} \end{equation} \noindent While accuracy can yield information on the efficiency of the algorithm as a whole, {\it Completeness} may inform on the ability of the method to efficiently retrieve the actual population of a given class, while {\it Purity} is related to the ability of the model not to include too many false positives ($FP$). The optimal model should be trained to give a trade-off between values of {\it Completeness} and of {\it Purity}. \citet{Carruba_2020} recently introduced a {\it Merit} metrics that can automatically perform this trade-off, by giving larger weight to Purity. This new metrics is defined as: \begin{equation} Merit = \frac{1}{\sqrt{5}}\sqrt{{(Completeness)}^2+4\times{(Purity)}^2}. \label{eq: Merit} \end{equation} \noindent In \citet{Carruba_2020}, a higher weight was given to {\it Purity} with respect to {\it Completeness} because this metric was more relevant to that work. Different definitions of {\it Merit} can be made, depending on the type of problem to be studied. As discussed in section~(\ref{sec: ANN}), the training of {\it ANN} can be performed for an arbitrary number of times, or {\it epochs}, to optimize the quality of the predictions. Figure~(\ref{Fig: accuracy_hist}) displays a plot of {\it accuracy}, as defined by equation~(\ref{eq: accuracy}) as a function of epoch for the training of a neural network with a training set of 1000 images and a test set of 200 images. Values of {\it accuracy} improve as a function of time, but there may be fluctuations from one epoch to the other, as shown in figure~(\ref{Fig: accuracy_hist}) for epochs 12 to 13, and 22 to 23. To avoid using non-optimal weights for the {\it ANN}, we use a callback instruction, as implemented by {\it Keras}, during the training to save the weights of each model, and automatically upload for the model predictions the weights associated with the best outcome in term of {\it accuracy}. \begin{figure} \centering \centering \includegraphics[width=3.0in]{./FIGURES/history_model.eps} \caption{Dependence of accuracy as a function of epoch.} \label{Fig: accuracy_hist} \end{figure} As a final step, we predicted the label of each image using the best model found with the procedures previously described. A set of 50 images with their predicted labels is shown in figure~(\ref{Fig: pred_data_ANN}). Percentage values show the confidence level with which the model can classify the images. For the case of this set of images, the model accurately predicted the labels of 42 images and misread 8. 5 images of switching orbits were classified as circulation cases, and 3 circulating orbits were labeled as switching ones. All the libration cases were correctly identified. Values of the {\it Merit} metric for libration, switching and circulation images were 1.000, 0.755, and 0.877, respectively. \begin{figure*} \centering \centering \includegraphics[width=5.5in]{./FIGURES/predicted_data.eps} \caption{A set of 50 images with the prediction from the {\it ANN} model. The percentage values identify the confidence level with which the model classifies the images.} \label{Fig: pred_data_ANN} \end{figure*} As a general rule in machine learning, the greater the size of the training sample, the better the model performance. Classification of images with {\it ANN} usually requires a training sample of the order of 60000 images (see, for instance, the example of clothes images classification using the Fashion MNIST data-set in the {\it Keras} documentation pages \citet{Chollet_2018}). For the case of the M1:2 asteroidal population, this is simply not viable, since there are just 5700 numbered asteroids in the range of $a$ near the resonance ($2.411 < a < 2.426$ au), i.e., an order of magnitude less. Yet, despite this fundamental limitation, our model performs quite well. To quantitatively estimate its efficiency, we computed values of our metrics, {\it Completeness, Purity} and {\it Merit}, for the same set of 50 images of M1:2 resonant arguments, increasing the size of the training set. Values of these metrics were computed for the three different types of orbits, libration, switching and circulation. For all the simulations, {\it Accuracy} values were all above 0.996. \begin{figure*} \centering \centering \includegraphics[width=5.5in]{./FIGURES/Metrics_ANN_Images.eps} \caption{Values of {\it Completeness, Purity} and {\it Merit} for a set of 50 images of M1:2 resonant arguments for asteroids on librating, switching, and circulating orbits. The labels in each of the nine panels identify the metric value for each figure.} \label{Fig: images_metrics_ANN} \end{figure*} Figure~(\ref{Fig: images_metrics_ANN}) displays our results. Since the results of {\it ANN} are inherently stochastic, individual data point can change if we repeat the numerical experiment. But the overall trends should be robust. The model {\it Merit} improves in all cases for increasing values of the size of the training set. The model can more easily identify images of librating asteroids, since they are more distinguished from the other classes of orbits. Values of {\it Merit} reach 1.00 already for a training sample of 3500 images. The lowest performance was obtained for switching orbits, which are easier to be confused with the other two classes. However, even for this kind of orbits, the model could achieve values of {\it Merit} larger than 0.80, if a sample large enough ($> 4500 $ images) is used. Overall, {\it ANN} can be used to provide a preliminary classification of asteroids resonant arguments, with good results. \section{Applications of genetic algorithms to M1:2 resonant arguments labels} \label{sec: gen_algo} The next step of our analysis would be to predict the labels of asteroids near the M1:2 resonance based on their proper elements distribution and the labels of an appropriate training sample. For this purpose, we can either use a machine learning algorithm or an {\it ANN}. As discussed in the previous section, {\it ANN} become competitive with standard machine learning approaches for large sizes of the training sample, which is not the case for our problem. A possible application of {\it ANN}, and its limitations, will be discussed in section~(\ref{sec: ANN_labels}). Here, we will focus our attention on standard machine learning approaches. Machine learning methods, either if {\it standalone}, where a single algorithm is applied, or {\it ensemble} methods, where several algorithms are combined, depend on several model parameters, or hyper-parameters. For instance, {\it Random Forest} methods that use several single {\it Decision Trees} depend on the number of trees used, which is a hyper-parameter that needs to be optimized. Identifying the optimal machine learning method and the combination of hyper-parameters for a given problem may be a long and time-consuming process. Here, as done in \citet{Carruba_2021} for the case of asteroids near the $z_1$ and $z_2$ secular resonances, we use an approach based on {\it genetic algorithms} \citep{Peng-Wei_2004}. {\it Genetic algorithms} use an approach based on genetic evolution. First, several models and their related combinations of hyper-parameters are created. After an iteration of the model, also called {\it generation}, a scoring function can be used to identify the best models. Models similar to the best ones can then be created, and the process can be repeated until some conditions are satisfied. Interested readers can found more details on this procedure in \citep{Peng-Wei_2004} and \citep{Carruba_2021}. As in the last paper, we used the {\it Tpot Python} library \citep{Trang_2020, Olson_2016} with 5 {\it generations}, a {\it population size} (the number of models to keep after each {\it generation}) of 20, and a cross-validation {\it cv} equal to 5. We also used thee values of the random state: 42, 99, and 122, which correspond to three different models: {\it XGBoost, GBoost,} and {\it Random Forest}. The specifications of the best among these models will be discussed later on in this section. To test these models we divided our sample of 5700 labelled asteroids into three parts: a training set of 200 asteroids, a test set of 200 bodies, and a pooling sample with the rest of the labelled objects. The size of the test sample is large enough for the results to be statistically significant (3.51\% of the available data), but small enough to leave space for enough data in the initial training and pooling sample. A random asteroid is selected in the pooling sample, added to the training set, and the model is fitted to the test sample. Values of the metrics are computed, and the procedure is then repeated until there are no more objects in the pooling sample. Figure~(\ref{Fig: Gen_metrics}) displays the values of {\it Completeness, Purity}, and {\it Merit} for the switching orbits class, the type of orbits that previous analysis showed to be the most difficult to predict, obtained by the best model among the tested ones, the {\it Random Forest} algorithm. This model and its hyper-parameters are discussed in appendix 1. \begin{figure} \centering \centering \includegraphics[width=3.5in]{./FIGURES/Metrics_M12.eps} \caption{Values of {\it Completeness, Purity} and {\it Merit} for test labelled asteroids on switching orbits as a function of the training sample size, obtained with the {\it Random Forest} algorithm.} \label{Fig: Gen_metrics} \end{figure} The {\it Random Forest} reaches a plateau in values of {\it Completeness, Purity}, and {\it Merit} for a training size of $\simeq 3000$. We will use this model to predict the labels of unlabelled asteroids in section~(\ref{sec: res_groups}) \subsection{Applications of {\it ANN}} \label{sec: ANN_labels} {\it ANN} can also be applied to predict the labels of near resonance asteroids. However, as previously discussed the training sample available for this problem is too small for this method to be used advantageously. We created a three-layered {\it Keras} model with an inner layer of 200 neurons, one each for the asteroids in the test sample, a hidden layer of 100 neurons, i.e. 50\% of the number of neurons in the inner layer, as it is usually recommended, and an outer layer of 3 neurons, one for each orbital-class. We choose to work with a training sample of 5500 asteroids and a test sample of 200, to have a large training sample, with 96.5\% of the available data. Other choices for size of the test sample are, of course, possible. We expect, however, that the model results should be inferior for smaller sizes of the training sample. We run this model over 100 epochs with a {\it callback} instruction, to identify the labels of the same test sample used in section~(\ref{sec: gen_algo}). The model was not able to identify librating asteroids, and values of {\it Completeness, Purity} and {\it Merit} for circulating and switching orbits were consistently below what predicted using {\it genetic algorithms}. Given these considerations, we will not use {\it ANN} to predict labels of unlabelled asteroids hereafter. \section{Identification of resonant groups} \label{sec: res_groups} Having identified the best performing supervised learning algorithm in section~(\ref{sec: gen_algo}), here we use this method to predict the labels of 740 multi-opposition asteroids, obtained from the $AFP$, using the 5700 asteroids that we previously classified as a training set. Figure~(\ref{Fig: M12_predicted}) displays a proper $(a,e)$ projection of 6440 asteroids for which we obtained labels, using the same colour code as in figure~(\ref{Fig: m12_expl_anal}). The predicted labels are very consistent with those obtained in the preliminary analysis, which confirms the validity of our method. \begin{figure*} \centering \includegraphics[width=3.0in]{./FIGURES/M12_predicted.eps} \caption{A proper $(a,e)$ projection of asteroids in the region of the M1:2 resonance. The colour code of predicted and confirmed asteroids in the region is the same as that of figure~(\ref{Fig: m12_expl_anal}).} \label{Fig: M12_predicted} \end{figure*} As a final check, we searched for possible dynamical clusters in the populations of M1:2 asteroids on librating and switching orbits, to see if our results are consistent with those in the literature. \citet{Gallardo_2011} found that the three asteroids families most affected by the M1:2 mean-motion resonance were those of Nysa, Massalia, and Vesta. Here, following the approach of \citet{Carruba_2021}, we use learning Hierarchical Clustering Method (HCM), as implemented in \citet{Carruba_2019}, on a domain of proper elements for the group of M1:2 asteroids above described. The procedure used to implement this method was the same as that applied in \citet{Carruba_2021}: a critical distance cutoff $\frac{1}{2} d_0$ was obtained, and groups were identified for values of $d_0 \pm 5$~m/s. We then verified if members of groups identified in this domain were listed as members of a family by \citet{Milani_2014} and \citet{Nesvorny_2015}. Please note that \citet{Milani_2014} reports the Nysa family as Hertha. Our results are summarized in table~(\ref{Table: m12_groups}). We selected groups that have at least 10 members at the critical distance cutoff value, 5 members at the lowest distance cutoff of $d_0 - 5 = 22.75$~m/s, and were still identifiable at the highest distance cutoff of $d_0 - 5 = 32.75$~m/s. Interested readers could find more details on the procedures used in \citet{Carruba_2019, Carruba_2021}. \begin{table*} \begin{center} \caption{The table reports the dynamical groups with at least 10 members among the librating and switching M1:2 population, listed from the most to the least numerous, identified with the hierarchical clustering algorithm, at three values of the distance cutoff: (1) 22.75, (2) 27.75, and (3) 32.75 m/s. The fourth column reports how many of the asteroids belong to a known asteroid family.} \label{Table: m12_groups} \begin{tabular}{|c|c|c|c|c|c|} \hline Family & Number of & Number of & Number of & Family members \\ Id. & members (1) & members (2) & members (3) & with known fam. ID. \\ \hline 19205 (1992 PT) & 8 & 50 & 84 & Massalia: 28, Nysa:3 \\ 42462 (5278 T-3) & 13 & 19 & 25 & Massalia: 13, Nysa:1 \\ 120135 (2003 GF7) & 10 & 17 & 28 & Nysa: 2 \\ 95459 (2002 CF307) & 8 & 14 & 18 & Vesta: 2 \\ 44931 (1999 VD39) & 7 & 10 & 10 & Nysa: 4 \\ 73066 (2002 FV15) & 8 & 10 & 40 & Massalia: 8 \\ 10516 Sakurajima & 6 & 10 & 15 & Nysa: 5, Massalia:1 \\ \hline \end{tabular} \end{center} \end{table*} Our analysis produced seven possible groups, all associated with the Massalia, Nysa, and Vesta families, so confirming the analysis of \citet{Gallardo_2011}. \section{Conclusions} \label{sec: concl} The main result of this work is the use of {\it ANN} for identifying the behaviour of M1:2 resonant arguments images. It is the first time, to our knowledge, that {\it ANN}s have been used for such purpose in the field of asteroid dynamics. The use of this model allowed us to classify the orbital type of all numbered asteroids in the orbital region affected by this resonance, which has also been independently confirmed by a visual analysis by all authors. The labels for the population of numbered asteroids near the M1:2 mean-motion resonances were also used to predict the orbital status of multi-opposition asteroids. Using genetic algorithms, we identify the best performing supervised learning method for our data, that we used to obtain labels for asteroids, without the need to perform a numerical simulation and an analysis of resonant angles. The identification of clusters in the population of asteroids in librating and switching orbits suggested that three asteroid families, those of Massalia, Nysa, and Vesta, are the most dynamically affected by this resonance, so confirming the analysis of previous authors \citep{Gallardo_2011}. The methods developed in this work could be easily used for other cases of asteroids affected by mean-motion resonance, like the ones studied by \citet{2017MNRAS.469.2024S}. We consider these models as the main result of this work. \section{Appendix 1: Genetic algorithms outcome} \label{sec: Appendix 1} The best performing model provided by {\it genetic algorithm} was the {\it Random Forest} algorithm. As described in \citep{Carruba_2021}, this algorithm is an ensemble method that uses several standalone {\it decision trees}. The training data can be divided into multiple samples, the bootstrap samples, that can be used to train an independent classifier. The outcome of the method is based on a majority vote of each {\it decision tree}. Important parameters of this model, as described in \citet{Swamynathan_2017}, are: \begin{enumerate} \item {\it Bootstrap}: Whether the algorithm is using bootstrap samples ({\it True}) or not ({\it False}). \item {\it Criterion}: The function to measure the quality of a split. The supported criteria are “{\it gini}” for the Gini impurity and “{\it entropy}” for the information gain. \item {\it max$\_$features}: The random subset of features to use for each splitting node. \item {\it min$\_$samples$\_$leaf}: The minimum number of samples required to be at a leaf node. \item {\it min$\_$samples$\_$split}: The minimum number of data points placed in a node before the node is split. \item {\it Number of estimators}: the number of decision trees algorithms. \end{enumerate} Our model used {\it Bootstrap = True}, a {\it gini Criterion}, {\it max$\_$features = 1.0}, {\it min$\_$samples$\_$leaf = 12}, {\it min$\_$samples$\_$split = 18}, and 100 {\it estimators}. \section*{Acknowledgments} We are very grateful tp the reviewer of this paper, Dr. Evegny Smirnov, for helpful and constructive comments that improved the quality of this paper. We would also like to thank the Brazilian National Research Council (CNPq, grant 301577/2017-0) and The Coordination for the Improvement of Higher Education Personnel (CAPES, grant 88887.374148/2019-00). We acknowledge the use of data from the Asteroid Dynamics Site ($AstDys$, \citet{Knezevic_2003}, http://hamilton.dm.unipi.it/astdys) and the Asteroid Families Portal ($AFP$, \citet{Radovic_2017}, http://asteroids.matf.bg.ac.rs/fam/properelements.php). Both databases were accessed on August 1st 2020. VC and WB are part of "Grupo de Din\^{a}mica Orbital \& Planetologia (GDOP)" (Research Group in Orbital Dynamics and Planetology) at UNESP, campus of Guaratinguet\'{a}. This is a publication from the MASB (Machine-learning applied to small bodies, \\ https://valeriocarruba.github.io/Site-MASB/) research group. Questions on this paper can also be sent to the group email address: {\it <EMAIL>}. \section{Availability of data and material} All image data on numbered asteroids near the M1:2 resonance is available at:\\ https://drive.google.com/file/d/1RsDoMh8iMwZhD-fnkYSs9hiWmg96SZf0/view?usp=sharing. \section{Code availability} The code used for the numerical simulations are part of the {\it SWIFT} package, and are publicly available at: \\* https://www.boulder.swri.edu/~hal/swift.html, \citep{levison_1994}.\\ Deep learning codes were written in the {\it Python} programming language and are available at the {\it GitHub} software repository, at this link:\\ https://github.com/valeriocarruba/ANN\_Classification\_of\-\_M12\_resonant\_argument\_images\\ Any other code described in this paper can be obtained from the first author upon reasonable request. \bibliographystyle{mnras} \section{Introduction} \label{sec: intro} During the last five years, machine learning and deep learning have been more and more been used in the field of asteroid dynamics. Among the latest application, supervised methods of machine learning have been used to identify the population of asteroids in three-body mean-motion resonances \citep{2017MNRAS.469.2024S}, new members of known asteroid families \citep{Carruba_2020}, and asteroids groups inside the $z_1$ and $z_2$ secular resonances \citep{Carruba_2021}, among others. Deep learning in the form of artificial neural networks has been recently used for identifying members of asteroid families \citep{Vujicic_2020}. While several applications of artificial neural networks exist in other astronomy fields for the purpose of identifying images, like, for instance, methods to identify different types of galaxies clusters \citep{Su_2020}, to our knowledge such methods have not yet been applied for asteroid dynamics problems. Here we attempt for the first time to use artificial neural networks for automatically identifying the behaviour of asteroids near the two-body M1:2 mean-motion resonance with Mars. As discussed by other authors \citep{Gallardo_2011}, three types of orbits are possible near resonance: {\it libration}, where the resonant argument of the resonance, which we will define in section~(\ref{sec: m12_dyn}), oscillates around an equilibrium point, {\it circulation}, where the resonant argument cover the whole range of values from $0^{\circ}$ to $360^{\circ}$, and {\it switching} orbits, where the resonant argument alternates phases of libration and circulation. In previous works, the classification of the type of orbits on which an asteroid resides was either performed manually, by visually inspecting the time behaviour of the resonance argument (see, for instance, \citet{2018P&SS..157...72C} and references therein), or by using automatic algorithms for the same purpose \citep{2018Icar..304...24S,2014Icar..231..273G,2016Icar..274...83G}. In this work, we use artificial neural networks for classifying an asteroid's orbital type for all numbered asteroids in the region affected by this resonance. We then employed genetic algorithms to select the best performing machine learning supervised method, to predict the labels of multi-opposition objects in the area. Multi-opposition asteroids are asteroids that have been observed at several oppositions to the Sun from Earth, whose orbits are somewhat well-established. Once the orbit is confirmed, an asteroid receives an identification number and becomes a numbered asteroid, like 2 Vesta, 4 Pallas, 10 Hygiea, among others. Since the orbits of multi-oppositions asteroids are not as well-established as those of numbered bodies, here we used the labels of numbered asteroids to predict those of the multi-oppositions objects. Finally, we verified which local asteroid families are most affected by this dynamical resonance, to see if our results are consistent with those in the literature. We start our analysis by revising the dynamical properties of asteroids in the region. \section{The population of asteroids in the M1:2 resonance: dynamics} \label{sec: m12_dyn} The population of asteroids inside the M1:2 mean motion resonance with Mars has been the subject of a study by \citet{Gallardo_2011}, that investigated the dynamical, physical and evolutionary properties of these asteroids. Here we will briefly summarize the dynamical characteristics of this population, and distinguish between the types of orbits possible in the orbital region affected by this resonance. Figure~(\ref{Fig: m12_prop_ae}) displays an $(a,e)$ projection of 9457 numbered asteroids in the range in $a$ from 2.411 to 2.426 au. Values of synthetic proper elements for asteroids in the region were obtained from the {\it Asteroid Families Portal} ($AFP$, \citet{Radovic_2017}, accessed on August 1st, 2020). Synthetic proper elements are constant of the motion on timescales of millions of years and are obtained as the outcome of numerical simulations, using methods described in \citet{Knezevic_2003}. The V-shaped region at the resonance centre is associated with the M1:2 resonance. The higher number concentration of objects at the edge of the V-shape is caused by the phenomenon called ``resonance stickiness'' \citep{Malishkin_1999}. \citet{Gallardo_2011} define two main resonant arguments for this resonance. $\sigma$ is given by: \begin{figure} \centering \centering \includegraphics[width=3.0in]{./FIGURES/m12_ast_pop.eps} \caption{Proper $(a,e)$ distribution for asteroids in the orbital region of the M1:2 mean-motion resonance.} \label{Fig: m12_prop_ae} \end{figure} \begin{equation} \sigma=2 \lambda -{\lambda}_{M}-\varpi, \label{eq: sigma} \end{equation} \noindent where $\lambda = M+\Omega+\omega$ is the mean longitude, $\varpi=\Omega+\omega$, with $\Omega$ the longitude of the node, $\omega$ the argument of pericentre, and where the suffix $M$ identifies the planet Mars. ${\sigma}_1$ is defined as: \begin{equation} {\sigma}_1=2 \lambda -{\lambda}_{M}-{\varpi}_{M}. \label{eq: sigma_1} \end{equation} The orbital behaviour of asteroids in the affected region can be identified by studying the time dependence of these two angles. As previously discussed, asteroids for which the critical arguments cover the whole range of values, from $0^{\circ}$ to $360^{\circ}$, are on {\it circulating} orbits. If the argument oscillates around an equilibrium point we have a {\it librating} orbit. Whether the argument alternates phases of libration and circulations, or switch between different equilibrium points, we have a {\it switching} orbit, as defined in this work. We identify the orbital types of asteroids by performing a 100000 yr simulation with the Burlisch-Stoer integrator of the {\it SWIFT} package \citep{levison_1994}. We use a time step of 1 day, a tolerance ($EPS$) equal to $10^{-8}$, and integrated the asteroids under the influence of all planets. None of the asteroids in our sample is a Mars-crosser or susceptible to experience close encounters with planets, which justifies the use of a Burlisch-Stoer integrator for this study. Figure~(\ref{Fig: polana_res_ang}) show the resonant argument for three asteroids in each of the three classes. As discussed by \citet{Gallardo_2011}, since the M1:2 is an external resonance, unusual equilibrium points for the $\sigma$ argument, like one at $100^{\circ}$, can occur. The main equilibrium point for the ${\sigma}_1$ argument is around $0^{\circ}$. \begin{figure*} \centering \includegraphics[width=3.5in]{./FIGURES/libr_res_arg.eps} \includegraphics[width=3.5in]{./FIGURES/polana_res_ang.eps} \includegraphics[width=3.5in]{./FIGURES/circ_res_arg.eps} \caption{The resonant angles $\sigma$, as defined by equation~(\ref{eq: sigma}) as a function of time for asteroids on librating, switching and circulating orbits of the M1:2 resonance.} \label{Fig: polana_res_ang} \end{figure*} Using this simulation set-up, we integrated 1000 asteroids in the orbital region of the M1:2 mean-motion resonance. Figure~(\ref{Fig: m12_expl_anal}) shows an $(a,e)$ projection of these asteroids, colour-coded for the behaviour of the $\sigma$ (left panel) and ${\sigma}_1$ resonant argument. The main difference between the two cases is the fraction of asteroids in pure librating states. For the case of $\sigma$, there were just 4 librators (0.4\%) and 202 oscillators (20.2). For ${\sigma}_1$, there were 69 librators (6.9\%) and 185 oscillators (18.5\%). Pure $\sigma$ librators tend to be much rarer than pure ${\sigma}_1$ ones. Since in this work we are interested in treating a multi-class problem, rather than a binary one, from now on we will focus our study on the case of the ${\sigma}_1$ resonant arguments. \begin{figure*} \centering \includegraphics[width=3.0in]{./FIGURES/m12_exp_an_s.eps} \includegraphics[width=3.0in]{./FIGURES/m12_exp_an_s1.eps} \caption{A proper $(a,e)$ projection of asteroids in the region of the M1:2 resonance. The left panel shows the orbital behaviour for the $\sigma$ resonant argument colour-coded as follows: red full circles are librators, yellow full circles are oscillators, and black dots are circulators. The right panel does the same, but for the ${\sigma}_1$ resonant argument.} \label{Fig: m12_expl_anal} \end{figure*} \section{Artificial Neural Networks} \label{sec: ANN} At the time that we carried out this study, there were 6440 numbered and multi-opposition asteroids in the region of the M1:2 mean-motion resonance. Analyzing resonant arguments for each of the asteroids in the region may be a very tiring and time-consuming endeavour, if performed manually. Automatic approaches not based on machine-learning have been developed in the last years to solve this problem \citep{2018Icar..304...24S,2014Icar..231..273G,2016Icar..274...83G}. Here this task will be performed by using artificial neural networks ({\it ANN}). The human brain classifies images by converting the light received by the eye's retina into electrical signals, that are then processed by a hierarchy of connected neurons to identify patterns. \begin{figure} \centering \centering \includegraphics[width=3.0in]{./FIGURES/ANN_Image.eps} \caption{A simple architecture for an {\it Artificial Neural Network}. The network has 3 neurons in the input layer, 5 in the hidden one and two in the output layer.} \label{Fig: Simple_ANN} \end{figure} Artificial neuron networks mimic the neurons web in a biological brain. Each artificial neuron can transmit a signal to other neurons. This signal, which is usually a real number, can be processed, and the signal coming out of each neuron is computed as a non-linear function of the inputs. A basic architecture for {\it ANN} consists of an input and an output layers, with the possible presence of one or more hidden layers between them to improve the model precision. Generally speaking, input layers will look for simpler patterns, while output layers will search for more complex relationships. Figure~(\ref{Fig: Simple_ANN}) shows the architecture of a simple {\it ANN}, with 3 neurons in the input layer, 5 in the hidden stratus, and 2 in the output layer. Each neuron will perform a weighted sum, $W_S$, given by: \begin{equation} W_S= \sum_{i=1}^{n} w_i X_i, \label{eq: W_S} \end{equation} \noindent where n is the number of input to process, $X_i$ are the signals from other neurons, and $w_i$ are the weights. {\it ANN} will optimize the values of the weights during the learning process. On the weighted sum $W_S$, {\it ANN} will apply an activation function. For images classifications, one of the most used activation function is the ``{\it relu}'', defined as: \begin{equation} y=max(W_S,0), \label{eq: relu} \end{equation} \noindent which will produce as an outcome the weighted sum itself $W_S$, if that is a positive number, or 0, if $W_S$ has a negative value. As a next step, the loss function must be applied to all the weights in the network through a back-propagation algorithm. A loss function is usually calculated by computing the differences between the predicted and real output values. An example of a loss function is the mean squared error, defined as: \begin{equation} C= \frac{1}{2}\sum_{j=1}^{n}(y_j-{\overline{y}}_j)^2, \label{eq: loss_MSE} \end{equation} \noindent where ${\overline{y}}_j$ is the expected value of the j-th outcome. For classification problems with multiple classes, with single classes identified by numbers, like the problem that we will discuss in this paper, the {\it sparse\_categorical\_crossentropy} loss function is generally used. Interested readers can find more information on the definition and use of this and other loss functions in the {\it Keras} documentation (https://keras.io/, \citet{Chollet_2018}). Once the loss function has been computed, the next step is to find its minimum, to optimize the values of the weights. Optimization algorithms find the gradient of the loss function and update the weights in the {\it ANN} based on this result. In this work, we will use the {\it Adam} optimizer \citep{Kingma_2015}. {\it ANN} use initial values of weights near zero. The first row of data is provided as input and processed through the network. The prediction of the network is compared to the real result, and the optimization of the cost function updates the values of the weights. This procedure is then repeated for all data, or, in some cases, for a subset, also called batch. An epoch is completed when the training procedure is finished for all the observations. This whole process can then be repeated for other epochs, to improve the quality of the predictions. Interested readers could find more information about the use of {\it ANN} in artificial intelligence in \citep{Lecun_2015}, or in the recent work on the application of {\it ANN} to the identification of asteroids belonging to asteroid families by \citep{Vujicic_2020}, and references therein. In the next subsection we will discuss applications of {\it ANN} for the classification of images. \subsection{Applications of {\it ANN} to M1:2 resonant arguments images} \label{sec: ANN_M12} Here we used the {\it Keras} implementation of {\it ANN}, which is also based on the {\it Tensorflow Python} software package \citep{Chollet_2018}. The process used in this work is the following: \begin{enumerate} \item The asteroid orbits are integrated under the gravitational influences of the planets. \item We compute the resonant arguments \item Images of the time dependence of resonant arguments are drawn \item The {\it ANN} trains on the training label image data \item Predictions on the test images are obtained, and images of the test data, with their classification are produced. \end{enumerate} The last step of producing images for the test data, with the proposed classification, is performed to make a visual confirmation by the user easier. The theory behind steps (i) and (ii) was discussed in section (\ref{sec: m12_dyn}). Here we will focus on steps (iii), (iv) and (v). 100$\times$ 100 pixel images of resonant arguments of the M1:2 resonance were stored and pre-processed before applying our model in step (iii). Each image pixel values fall in the range from 0 to 255. Before feeding the images to our model, we normalized the pixel values to a range between zero and one, to help the ANN to learn faster. The choice of the image resolution was a compromise between not exceeding the computer memory available in our machines while still having a resolution sufficient for the {\it ANN} to successfully work. To identify resonant argument images, we created a four-layer model with a flatten, an inner, a hidden, and an output layers. The architecture of the model is displayed in figure~(\ref{Fig: model_structure}). The flatten layer will transform the image matrices into arrays. The inner layer will look for simpler patterns in the arguments images, while the hidden layer, with half the neurons of the inner one, will search for more complex features. The output layer, with three nodes, will perform the final classification for the three possible classes: {\it circulation, switching} and {\it librating} orbits. \begin{figure} \centering \centering \includegraphics[width=3.0in]{./FIGURES/model_plot.eps} \caption{Neural network structure of the model used for classifying resonant arguments. We used a flatten layer, an inner layer, a hidden layer, and an output layer for final classification.} \label{Fig: model_structure} \end{figure} To quantitatively classify the outcome of {\it ANN}, it is often useful to compute values of metrics. Some of the most commonly used metrics for classifications problems are the {\it accuracy}, {\it recall} and {\it precision}. For a given class of orbits, we define True-Positive ({\it TP}) as the number of images successfully identified as belonging to that class by both the observer and the {\it ANN} model. True-Negative ({\it TN}) are the number of images that both methods identify as non-belonging to a given class. False-Positive ({\it FP}) are images classified as belonging to a class just by the {\it ANN} method. Finally, False-Negative ({\it FN}) are the images not classified to belong to a class just by the {\it ANN} approach. Values of $TP,TN,FP$ and $FN$ can be obtained by computing the confusion matrix on the images real and predicted labels. With these definitions, $accuracy$ \citep{FAWCETT2006861} is given by: \begin{equation} accuracy= \frac{TP+TN}{TP+TN+FP+FN}, \label{eq: accuracy} \end{equation} \noindent {\it Recall}, also known as {\it Completeness} in \citet{Carruba_2020}, is given by: \begin{equation} Completeness= \frac{TP}{TP+FN}, \label{eq: completeness} \end{equation} \noindent {\it Precision}, also known as {\it Purity} in \citet{Carruba_2020}, is defined as: \begin{equation} Purity= \frac{TP}{TP+FP}. \label{eq: purity} \end{equation} \noindent While accuracy can yield information on the efficiency of the algorithm as a whole, {\it Completeness} may inform on the ability of the method to efficiently retrieve the actual population of a given class, while {\it Purity} is related to the ability of the model not to include too many false positives ($FP$). The optimal model should be trained to give a trade-off between values of {\it Completeness} and of {\it Purity}. \citet{Carruba_2020} recently introduced a {\it Merit} metrics that can automatically perform this trade-off, by giving larger weight to Purity. This new metrics is defined as: \begin{equation} Merit = \frac{1}{\sqrt{5}}\sqrt{{(Completeness)}^2+4\times{(Purity)}^2}. \label{eq: Merit} \end{equation} \noindent In \citet{Carruba_2020}, a higher weight was given to {\it Purity} with respect to {\it Completeness} because this metric was more relevant to that work. Different definitions of {\it Merit} can be made, depending on the type of problem to be studied. As discussed in section~(\ref{sec: ANN}), the training of {\it ANN} can be performed for an arbitrary number of times, or {\it epochs}, to optimize the quality of the predictions. Figure~(\ref{Fig: accuracy_hist}) displays a plot of {\it accuracy}, as defined by equation~(\ref{eq: accuracy}) as a function of epoch for the training of a neural network with a training set of 1000 images and a test set of 200 images. Values of {\it accuracy} improve as a function of time, but there may be fluctuations from one epoch to the other, as shown in figure~(\ref{Fig: accuracy_hist}) for epochs 12 to 13, and 22 to 23. To avoid using non-optimal weights for the {\it ANN}, we use a callback instruction, as implemented by {\it Keras}, during the training to save the weights of each model, and automatically upload for the model predictions the weights associated with the best outcome in term of {\it accuracy}. \begin{figure} \centering \centering \includegraphics[width=3.0in]{./FIGURES/history_model.eps} \caption{Dependence of accuracy as a function of epoch.} \label{Fig: accuracy_hist} \end{figure} As a final step, we predicted the label of each image using the best model found with the procedures previously described. A set of 50 images with their predicted labels is shown in figure~(\ref{Fig: pred_data_ANN}). Percentage values show the confidence level with which the model can classify the images. For the case of this set of images, the model accurately predicted the labels of 42 images and misread 8. 5 images of switching orbits were classified as circulation cases, and 3 circulating orbits were labeled as switching ones. All the libration cases were correctly identified. Values of the {\it Merit} metric for libration, switching and circulation images were 1.000, 0.755, and 0.877, respectively. \begin{figure*} \centering \centering \includegraphics[width=5.5in]{./FIGURES/predicted_data.eps} \caption{A set of 50 images with the prediction from the {\it ANN} model. The percentage values identify the confidence level with which the model classifies the images.} \label{Fig: pred_data_ANN} \end{figure*} As a general rule in machine learning, the greater the size of the training sample, the better the model performance. Classification of images with {\it ANN} usually requires a training sample of the order of 60000 images (see, for instance, the example of clothes images classification using the Fashion MNIST data-set in the {\it Keras} documentation pages \citet{Chollet_2018}). For the case of the M1:2 asteroidal population, this is simply not viable, since there are just 5700 numbered asteroids in the range of $a$ near the resonance ($2.411 < a < 2.426$ au), i.e., an order of magnitude less. Yet, despite this fundamental limitation, our model performs quite well. To quantitatively estimate its efficiency, we computed values of our metrics, {\it Completeness, Purity} and {\it Merit}, for the same set of 50 images of M1:2 resonant arguments, increasing the size of the training set. Values of these metrics were computed for the three different types of orbits, libration, switching and circulation. For all the simulations, {\it Accuracy} values were all above 0.996. \begin{figure*} \centering \centering \includegraphics[width=5.5in]{./FIGURES/Metrics_ANN_Images.eps} \caption{Values of {\it Completeness, Purity} and {\it Merit} for a set of 50 images of M1:2 resonant arguments for asteroids on librating, switching, and circulating orbits. The labels in each of the nine panels identify the metric value for each figure.} \label{Fig: images_metrics_ANN} \end{figure*} Figure~(\ref{Fig: images_metrics_ANN}) displays our results. Since the results of {\it ANN} are inherently stochastic, individual data point can change if we repeat the numerical experiment. But the overall trends should be robust. The model {\it Merit} improves in all cases for increasing values of the size of the training set. The model can more easily identify images of librating asteroids, since they are more distinguished from the other classes of orbits. Values of {\it Merit} reach 1.00 already for a training sample of 3500 images. The lowest performance was obtained for switching orbits, which are easier to be confused with the other two classes. However, even for this kind of orbits, the model could achieve values of {\it Merit} larger than 0.80, if a sample large enough ($> 4500 $ images) is used. Overall, {\it ANN} can be used to provide a preliminary classification of asteroids resonant arguments, with good results. \section{Applications of genetic algorithms to M1:2 resonant arguments labels} \label{sec: gen_algo} The next step of our analysis would be to predict the labels of asteroids near the M1:2 resonance based on their proper elements distribution and the labels of an appropriate training sample. For this purpose, we can either use a machine learning algorithm or an {\it ANN}. As discussed in the previous section, {\it ANN} become competitive with standard machine learning approaches for large sizes of the training sample, which is not the case for our problem. A possible application of {\it ANN}, and its limitations, will be discussed in section~(\ref{sec: ANN_labels}). Here, we will focus our attention on standard machine learning approaches. Machine learning methods, either if {\it standalone}, where a single algorithm is applied, or {\it ensemble} methods, where several algorithms are combined, depend on several model parameters, or hyper-parameters. For instance, {\it Random Forest} methods that use several single {\it Decision Trees} depend on the number of trees used, which is a hyper-parameter that needs to be optimized. Identifying the optimal machine learning method and the combination of hyper-parameters for a given problem may be a long and time-consuming process. Here, as done in \citet{Carruba_2021} for the case of asteroids near the $z_1$ and $z_2$ secular resonances, we use an approach based on {\it genetic algorithms} \citep{Peng-Wei_2004}. {\it Genetic algorithms} use an approach based on genetic evolution. First, several models and their related combinations of hyper-parameters are created. After an iteration of the model, also called {\it generation}, a scoring function can be used to identify the best models. Models similar to the best ones can then be created, and the process can be repeated until some conditions are satisfied. Interested readers can found more details on this procedure in \citep{Peng-Wei_2004} and \citep{Carruba_2021}. As in the last paper, we used the {\it Tpot Python} library \citep{Trang_2020, Olson_2016} with 5 {\it generations}, a {\it population size} (the number of models to keep after each {\it generation}) of 20, and a cross-validation {\it cv} equal to 5. We also used thee values of the random state: 42, 99, and 122, which correspond to three different models: {\it XGBoost, GBoost,} and {\it Random Forest}. The specifications of the best among these models will be discussed later on in this section. To test these models we divided our sample of 5700 labelled asteroids into three parts: a training set of 200 asteroids, a test set of 200 bodies, and a pooling sample with the rest of the labelled objects. The size of the test sample is large enough for the results to be statistically significant (3.51\% of the available data), but small enough to leave space for enough data in the initial training and pooling sample. A random asteroid is selected in the pooling sample, added to the training set, and the model is fitted to the test sample. Values of the metrics are computed, and the procedure is then repeated until there are no more objects in the pooling sample. Figure~(\ref{Fig: Gen_metrics}) displays the values of {\it Completeness, Purity}, and {\it Merit} for the switching orbits class, the type of orbits that previous analysis showed to be the most difficult to predict, obtained by the best model among the tested ones, the {\it Random Forest} algorithm. This model and its hyper-parameters are discussed in appendix 1. \begin{figure} \centering \centering \includegraphics[width=3.5in]{./FIGURES/Metrics_M12.eps} \caption{Values of {\it Completeness, Purity} and {\it Merit} for test labelled asteroids on switching orbits as a function of the training sample size, obtained with the {\it Random Forest} algorithm.} \label{Fig: Gen_metrics} \end{figure} The {\it Random Forest} reaches a plateau in values of {\it Completeness, Purity}, and {\it Merit} for a training size of $\simeq 3000$. We will use this model to predict the labels of unlabelled asteroids in section~(\ref{sec: res_groups}) \subsection{Applications of {\it ANN}} \label{sec: ANN_labels} {\it ANN} can also be applied to predict the labels of near resonance asteroids. However, as previously discussed the training sample available for this problem is too small for this method to be used advantageously. We created a three-layered {\it Keras} model with an inner layer of 200 neurons, one each for the asteroids in the test sample, a hidden layer of 100 neurons, i.e. 50\% of the number of neurons in the inner layer, as it is usually recommended, and an outer layer of 3 neurons, one for each orbital-class. We choose to work with a training sample of 5500 asteroids and a test sample of 200, to have a large training sample, with 96.5\% of the available data. Other choices for size of the test sample are, of course, possible. We expect, however, that the model results should be inferior for smaller sizes of the training sample. We run this model over 100 epochs with a {\it callback} instruction, to identify the labels of the same test sample used in section~(\ref{sec: gen_algo}). The model was not able to identify librating asteroids, and values of {\it Completeness, Purity} and {\it Merit} for circulating and switching orbits were consistently below what predicted using {\it genetic algorithms}. Given these considerations, we will not use {\it ANN} to predict labels of unlabelled asteroids hereafter. \section{Identification of resonant groups} \label{sec: res_groups} Having identified the best performing supervised learning algorithm in section~(\ref{sec: gen_algo}), here we use this method to predict the labels of 740 multi-opposition asteroids, obtained from the $AFP$, using the 5700 asteroids that we previously classified as a training set. Figure~(\ref{Fig: M12_predicted}) displays a proper $(a,e)$ projection of 6440 asteroids for which we obtained labels, using the same colour code as in figure~(\ref{Fig: m12_expl_anal}). The predicted labels are very consistent with those obtained in the preliminary analysis, which confirms the validity of our method. \begin{figure*} \centering \includegraphics[width=3.0in]{./FIGURES/M12_predicted.eps} \caption{A proper $(a,e)$ projection of asteroids in the region of the M1:2 resonance. The colour code of predicted and confirmed asteroids in the region is the same as that of figure~(\ref{Fig: m12_expl_anal}).} \label{Fig: M12_predicted} \end{figure*} As a final check, we searched for possible dynamical clusters in the populations of M1:2 asteroids on librating and switching orbits, to see if our results are consistent with those in the literature. \citet{Gallardo_2011} found that the three asteroids families most affected by the M1:2 mean-motion resonance were those of Nysa, Massalia, and Vesta. Here, following the approach of \citet{Carruba_2021}, we use learning Hierarchical Clustering Method (HCM), as implemented in \citet{Carruba_2019}, on a domain of proper elements for the group of M1:2 asteroids above described. The procedure used to implement this method was the same as that applied in \citet{Carruba_2021}: a critical distance cutoff $\frac{1}{2} d_0$ was obtained, and groups were identified for values of $d_0 \pm 5$~m/s. We then verified if members of groups identified in this domain were listed as members of a family by \citet{Milani_2014} and \citet{Nesvorny_2015}. Please note that \citet{Milani_2014} reports the Nysa family as Hertha. Our results are summarized in table~(\ref{Table: m12_groups}). We selected groups that have at least 10 members at the critical distance cutoff value, 5 members at the lowest distance cutoff of $d_0 - 5 = 22.75$~m/s, and were still identifiable at the highest distance cutoff of $d_0 - 5 = 32.75$~m/s. Interested readers could find more details on the procedures used in \citet{Carruba_2019, Carruba_2021}. \begin{table*} \begin{center} \caption{The table reports the dynamical groups with at least 10 members among the librating and switching M1:2 population, listed from the most to the least numerous, identified with the hierarchical clustering algorithm, at three values of the distance cutoff: (1) 22.75, (2) 27.75, and (3) 32.75 m/s. The fourth column reports how many of the asteroids belong to a known asteroid family.} \label{Table: m12_groups} \begin{tabular}{|c|c|c|c|c|c|} \hline Family & Number of & Number of & Number of & Family members \\ Id. & members (1) & members (2) & members (3) & with known fam. ID. \\ \hline 19205 (1992 PT) & 8 & 50 & 84 & Massalia: 28, Nysa:3 \\ 42462 (5278 T-3) & 13 & 19 & 25 & Massalia: 13, Nysa:1 \\ 120135 (2003 GF7) & 10 & 17 & 28 & Nysa: 2 \\ 95459 (2002 CF307) & 8 & 14 & 18 & Vesta: 2 \\ 44931 (1999 VD39) & 7 & 10 & 10 & Nysa: 4 \\ 73066 (2002 FV15) & 8 & 10 & 40 & Massalia: 8 \\ 10516 Sakurajima & 6 & 10 & 15 & Nysa: 5, Massalia:1 \\ \hline \end{tabular} \end{center} \end{table*} Our analysis produced seven possible groups, all associated with the Massalia, Nysa, and Vesta families, so confirming the analysis of \citet{Gallardo_2011}. \section{Conclusions} \label{sec: concl} The main result of this work is the use of {\it ANN} for identifying the behaviour of M1:2 resonant arguments images. It is the first time, to our knowledge, that {\it ANN}s have been used for such purpose in the field of asteroid dynamics. The use of this model allowed us to classify the orbital type of all numbered asteroids in the orbital region affected by this resonance, which has also been independently confirmed by a visual analysis by all authors. The labels for the population of numbered asteroids near the M1:2 mean-motion resonances were also used to predict the orbital status of multi-opposition asteroids. Using genetic algorithms, we identify the best performing supervised learning method for our data, that we used to obtain labels for asteroids, without the need to perform a numerical simulation and an analysis of resonant angles. The identification of clusters in the population of asteroids in librating and switching orbits suggested that three asteroid families, those of Massalia, Nysa, and Vesta, are the most dynamically affected by this resonance, so confirming the analysis of previous authors \citep{Gallardo_2011}. The methods developed in this work could be easily used for other cases of asteroids affected by mean-motion resonance, like the ones studied by \citet{2017MNRAS.469.2024S}. We consider these models as the main result of this work. \section{Appendix 1: Genetic algorithms outcome} \label{sec: Appendix 1} The best performing model provided by {\it genetic algorithm} was the {\it Random Forest} algorithm. As described in \citep{Carruba_2021}, this algorithm is an ensemble method that uses several standalone {\it decision trees}. The training data can be divided into multiple samples, the bootstrap samples, that can be used to train an independent classifier. The outcome of the method is based on a majority vote of each {\it decision tree}. Important parameters of this model, as described in \citet{Swamynathan_2017}, are: \begin{enumerate} \item {\it Bootstrap}: Whether the algorithm is using bootstrap samples ({\it True}) or not ({\it False}). \item {\it Criterion}: The function to measure the quality of a split. The supported criteria are “{\it gini}” for the Gini impurity and “{\it entropy}” for the information gain. \item {\it max$\_$features}: The random subset of features to use for each splitting node. \item {\it min$\_$samples$\_$leaf}: The minimum number of samples required to be at a leaf node. \item {\it min$\_$samples$\_$split}: The minimum number of data points placed in a node before the node is split. \item {\it Number of estimators}: the number of decision trees algorithms. \end{enumerate} Our model used {\it Bootstrap = True}, a {\it gini Criterion}, {\it max$\_$features = 1.0}, {\it min$\_$samples$\_$leaf = 12}, {\it min$\_$samples$\_$split = 18}, and 100 {\it estimators}. \section*{Acknowledgments} We are very grateful tp the reviewer of this paper, Dr. Evegny Smirnov, for helpful and constructive comments that improved the quality of this paper. We would also like to thank the Brazilian National Research Council (CNPq, grant 301577/2017-0) and The Coordination for the Improvement of Higher Education Personnel (CAPES, grant 88887.374148/2019-00). We acknowledge the use of data from the Asteroid Dynamics Site ($AstDys$, \citet{Knezevic_2003}, http://hamilton.dm.unipi.it/astdys) and the Asteroid Families Portal ($AFP$, \citet{Radovic_2017}, http://asteroids.matf.bg.ac.rs/fam/properelements.php). Both databases were accessed on August 1st 2020. VC and WB are part of "Grupo de Din\^{a}mica Orbital \& Planetologia (GDOP)" (Research Group in Orbital Dynamics and Planetology) at UNESP, campus of Guaratinguet\'{a}. This is a publication from the MASB (Machine-learning applied to small bodies, \\ https://valeriocarruba.github.io/Site-MASB/) research group. Questions on this paper can also be sent to the group email address: {\it <EMAIL>}. \section{Availability of data and material} All image data on numbered asteroids near the M1:2 resonance is available at:\\ https://drive.google.com/file/d/1RsDoMh8iMwZhD-fnkYSs9hiWmg96SZf0/view?usp=sharing. \section{Code availability} The code used for the numerical simulations are part of the {\it SWIFT} package, and are publicly available at: \\* https://www.boulder.swri.edu/~hal/swift.html, \citep{levison_1994}.\\ Deep learning codes were written in the {\it Python} programming language and are available at the {\it GitHub} software repository, at this link:\\ https://github.com/valeriocarruba/ANN\_Classification\_of\-\_M12\_resonant\_argument\_images\\ Any other code described in this paper can be obtained from the first author upon reasonable request. \bibliographystyle{mnras}
\section*{Abstract} We present a geometrically exact nonlinear analysis of elastic in-plane beams in the context of finite but small strain theory. The formulation utilizes the full beam metric and obtains the complete analytic elastic constitutive model by employing the exact relation between the reference and equidistant strains. Thus, we account for the nonlinear strain distribution over the thickness of a beam. In addition to the full analytical constitutive model, four simplified ones are presented. Their comparison provides a thorough examination of the influence of a beam's metric on the structural response. We show that the appropriate formulation depends on the curviness of a beam at all configurations. Furthermore, the nonlinear distribution of strain along the thickness of strongly curved beams must be considered to obtain a complete and accurate response. \textbf{Keywords}: Bernoulli-Euler beam; strongly curved beams; geometrically exact analysis; analytical constitutive relation \section{Introduction} Curved beams are fundamental structural components and their analysis is a classic topic of mechanics \cite{1992dill}. Although some analytical solutions exist, see, e.g., \cite{2011kimiaeifar}, numerical methods are inevitable for dealing with the complex nonlinear behavior of beams. The finite element method (FEM) is the most versatile numerical procedure for solving partial differential equations. The first research on the geometrically-exact FEM analysis of curved spatial beams was presented in a seminal paper by Reissner \cite{1981reissner}. This theory has been enhanced in a series of papers \cite{1985simo, 1995ibrahimbegovic, 1999crisfield, 2001atluri, 2019meier}. In \cite{1985simo}, Simo introduced the term \emph{geometrically exact beam theory} to designate that the governing equations of motion are valid regardless of the magnitude of kinematic quantities. The papers referred to are mainly focused on the shear-deformable beam model, and it is not until recently that the Bernoulli-Euler (BE) spatial model was scrutinized \cite{2013greco, 2014meier, 2015meier}. One reason for this is that the equations of the Simo-Reissner beam require only $C^0$ interelement continuity. On the other hand, the BE model requires $C^1$ interelement continuity - a requirement not fulfilled by standard Lagrange polynomials commonly used in FEM. Herein, we resolve this issue by using isogeometric analysis (IGA), \cite{2005hughes, 2017mono}. This approach utilizes (smooth) splines as basis functions for the spatial discretization of the weak form of the equations of motion, and hence, it allows for an arbitrarily high continuity between elements. Several works consider nonlinear shear-deformable spatial beams in the framework of IGA, \cite{2016marino, 2017marino, 2017weeger, 2019marino, 2020vob, 2020tasora, 2020choi}. In the context of the BE theory, a torsion- and rotation-free spatial cable formulation is developed in \cite{2013raknes} with attractive nonlinear dynamic applications. A spatial BE beam modeled as a ribbon with four degrees of freedom (DOF) is introduced in \cite{2013greco}, while a consistent tangent operator is derived in \cite{2015greco}. Based on \cite{2013greco}, the authors in \cite{2016bauera} discuss nonlinear applications of a spatial curved BE beam. Planar nonlinear BE beams are analyzed in \cite{2016huang, 2020vo, 2018maurin}. Different approaches to multi-parch modeling are considered in \cite{2016huang, 2020vo}, while the paper \cite{2018maurin} focuses on the weighted residuals and the collocation of strong form. When the beam is curved, the strain distribution over the cross section becomes nonlinear. This leads to the coupling of axial and bending actions, which is readily ignored in the mentioned references in which simple decoupled constitutive relations are utilized. Nonlinear distribution of strain is evident from \textit{the initial curvature correction term} $g_0=1-\eta K$, see \cite{2003kapania}, which relates lengths of the basis vectors at the centroid and an arbitrary point of cross section to each other. This effect becomes more prominent as the curvature of the beam axis $(K)$ and height of the cross section $(h)$ increase. The product of these two quantities $Kh$ is a parameter referred to as the \emph{curviness of beam} which changes along the beam length \cite{2018borkovicb}. In this paper, we perform a nonlinear analysis of arbitrarily curved uniform BE beams. The term \emph{arbitrarily curved} does not refer just to the variable curvature of the beam axis, but more importantly, to its curviness $Kh$. We consider geometries with large curviness such as $Kh=0.5$. In \cite{2010slivker}, curved beams are grouped into small-, medium- and big-curvature beams, depending on their curviness. A beam is said to have a small curvature if its curviness is infinitesimal, $Kh \ll 1$, while it has a medium curvature if approximately, $(Kh)^2 \ll 1$. All the others belong to the category of big-curvature, also known as \emph{strongly curved} beams. In the following, we will label a beam strongly curved when $Kh > 0.1$. Although the basic theory of strongly curved beams has been known for a long time, see e.g. \cite{2016cazzani}, it is only recently that modern numerical techniques have been applied for the analysis of these beams. Linear analysis of plane beams is given in \cite{2016cazzani, 2018borkovicb, 2019borkovicb} within the framework of IGA, while the spatial beams are analyzed in \cite{2018radenkovicb}. To the best of our knowledge, this is the first paper that deals with the nonlinear analysis of strongly curved beams. The paper is based on our previous works \cite{2018borkovicb, 2019borkovicb, 2018radenkovicb, 2017radenkovic}. The exact metric of the plane BE beam is utilized for the derivation of the weak form of equilibrium which is solved by Newton-Raphson and arc-length methods. The strict derivation of constitutive relation allows us to derive reduced models and to compare them through numerical experiments. Comparison with existing results demonstrates that the obtained formulation is reliable for the finite rotation analysis of arbitrarily curved beams. Moreover, the approach introduces an additional level of accuracy when dealing with strongly curved beams. The present formulation is geometrically exact in the sense that it strictly defines a relation between work conjugate pairs, which allows analysis of arbitrarily large rotations and displacements \cite{1985simo}. Since both geometry and displacements are interpolated with the same spline functions, the formulation exactly describes rigid-body modes and thus it is frame invariant \cite{2012armero, 2020yang}. The paper is structured as follows: The next section presents the fundamental relations of the beam metric. Then, the description of the BE beam kinematics is provided. The finite element formulation is given in Section 4 and numerical examples are presented in Section 5. The conclusions are delivered in the last section. \section{Metric of the beam continuum} A detailed and rigorous definition of the beam metric is presented in this section. Following the classical BE assumption, a cross section is rigid and remains perpendicular to the beam axis in the deformed configuration. This assumption leads to a degeneration of a 3D continuum beam model into an arbitrarily shaped line. The present analysis is performed with respect to the convective frame of reference while the complete beam kinematics is defined by the translation of the beam axis. In the notation, lowercase and uppercase boldface letters are used for vectors and tensors or matrices, respectively. An overbar designates quantities at the equidistant line of the beam, and the asterisk sign denotes the deformed configuration. Finally, the hat symbol specifies the local component of a vector, with respect to the curvilinear coordinates. The direct and index notations are applied simultaneously, depending on the context, and the standard summation convention is adopted. Greek index letters take values of 1 and 2. Partial and covariant derivatives with respect to the convective coordinates are designated with $( )_{,\alpha}$ and $( )_{\vert \alpha}$, respectively. The elaboration on the NURBS-based IGA modeling of curves is excluded for brevity since it is readily available in the literature. For a detailed discussion on IGA and NURBS, references \cite{2005hughes, 2009kiendl, 1995piegla} are recommended. \subsection{Metric of the beam axis} Let us revise some basic expressions of the metric of beam axis. A beam axis is a curve that passes through the centroids of all cross sections. It can be defined with either the arc-length coordinate $s$ or some parametric coordinate $\xi$. The position vector of the beam axis in Cartesian coordinates is $\textbf{r}=\{x=x^1, y=x^2\}$ and it is here defined as a linear combination: \begin{equation} \label{eq:def:r} \textbf{r} = x^\alpha \textbf{i}_\alpha=\sum\limits_{I=1}^{N} R_{I} (\xi) \textbf{r}_{I}, \quad x^\alpha = \sum\limits_{I = 1}^{N} R_{I} (\xi) x^\alpha_{I}, \end{equation} where $R_{I}$ are univariate NURBS basis functions, $\textbf{r}_{I} = \{x_{I}, y_{I}\}$ are the position vectors of the control points $I$, and $N$ is the total number of control points \cite{2005hughes}. Furthermore, $\textbf{i}^\alpha = \textbf{i}_\alpha$ are the base vectors of the Cartesian coordinate system, see \fref{fig:Figure 1}. \begin{figure} \includegraphics[width=\linewidth]{Figure1.png} \caption{Degeneration of a (planar) 3D continuum into an in-plane beam. Base vectors at the centroid and at an equidistant line are depicted.} \label{fig:Figure 1} \end{figure} The tangent base vector of a beam axis is: \begin{equation} \iv{g}{}{1}=\iv{r}{}{,1}=\ii{x}{\alpha}{,1} \iv{i}{}{\alpha}. \end{equation} The other base vector, $\iv{g}{}{2}$, is perpendicular to $\iv{g}{}{1}$ and has unit length. Hence, we can choose the normal of the beam axis, as in \cite{2018borkovicb}, or we can rotate $\iv{g}{}{1}$ by 90 degrees and scale it. The latter approach is utilized in present formulation and the base vector $\iv{g}{}{1}$ is rotated anti-clockwise: \begin{equation} \label{eq: def: g2} \iv{g}{}{2}=\frac{1}{\sqrt{g}}\Lambda \iv{g}{}{1}=-\frac{\ii{x}{2}{,1}}{\sqrt{g}} \iv{i}{}{1} + \frac{\ii{x}{1}{,1}}{\sqrt{g}} \iv{i}{}{2} = \ii{x}{\alpha}{,2} \iv{i}{}{\alpha}, \quad \Lambda = \begin{bmatrix} 0 & -1\\ 1 & 0 \end{bmatrix}. \end{equation} Here, $g$ is a component of the metric tensor and also its determinant: \begin{align} \label{eq:def:metric tensor axis} \ii{g}{}{\alpha\beta}= \begin{bmatrix} \ii{g}{}{11} & 0\\ 0 & 1 \end{bmatrix}, && \ii{g}{}{11} =\iv{g}{}{1} \cdot \iv{g}{}{1} =\det(\ii{g}{}{\alpha\beta}) = \ii{g}{}{}. \end{align} This quantity relates differentials of arc-length and parametric coordinate as $\dd{s}=\sqrt{g}\dd{\xi}$. Therefore, it equals the square of Jacobian of the coordinate transformation from convective to arc-length coordinate. The metric of the beam axis is completely defined by the introduction of the Christoffel symbols. They follow from the differentiation of base vectors with respect to the curvilinear coordinates \cite{1973naghdi}: \begin{equation} \label{eq:def:christ} \textbf{g}_{\alpha,\beta} = x^\gamma_{,\alpha\beta} \textbf{i}_\gamma = \Gamma^{\gamma}_{\alpha \beta} \textbf{g}_\gamma \Rightarrow \Gamma^\gamma_{\alpha \beta} = x^\delta_{,\alpha\beta} x^{,\gamma}_\delta, \end{equation} where $\Gamma^\gamma_{\alpha \beta}$ are the Christoffel symbols of the second kind. The reciprocal base vectors of the beam axis are: \begin{align} \label{eq:def:reciprocal} \iv{g}{1}{}=\ii{x}{\alpha,1}{} \iv{i}{}{\alpha}=\frac{1}{g} \iv{g}{}{1} && \textnormal{and} && \iv{g}{2}{}=\ii{x}{\alpha,2}{} \iv{i}{}{\alpha}=\iv{g}{}{2}, \end{align} and the reciprocal metric tensor is: \begin{align} \label{eq:def:rec metric tensor axis} \ii{g}{\alpha\beta}{}= \begin{bmatrix} \ii{g}{11}{} & 0\\ 0 & 1 \end{bmatrix}, && \ii{g}{11}{} =\iv{g}{1}{} \cdot \iv{g}{1}{} =\det(\ii{g}{\alpha\beta}{}) = \frac{1}{g}. \end{align} The expression for the derivatives of base vectors in matrix form is: \begin{equation} \label{eq: def: derivatives of base vectors} \begin{bmatrix} \iv{g}{}{1,1}\\ \iv{g}{}{2,1} \end{bmatrix} = \begin{bmatrix} \iv{$\Gamma$}{1}{11} & \iv{$\Gamma$}{2}{11}\\ \iv{$\Gamma$}{1}{21} & \iv{$\Gamma$}{2}{21} \end{bmatrix} \begin{bmatrix} \iv{g}{}{1}\\ \iv{g}{}{2} \end{bmatrix} = \begin{bmatrix} \iv{$\Gamma$}{1}{11} & \ic{K}{}{}\\ -K & 0 \end{bmatrix} \begin{bmatrix} \iv{g}{}{1}\\ \iv{g}{}{2} \end{bmatrix}, \end{equation} where $K$ is so-called \textit{signed curvature}: \begin{equation} \label{eq: def: signed curvature} K=-\ii{\Gamma}{1}{21}=-\iv{g}{}{2,1} \cdot \iv{g}{1}{} = \frac{\ii{x}{1}{,1} \ii{x}{2}{,11}-\ii{x}{2}{,1} \ii{x}{1}{,11}}{\ii{g}{3/2}{}}, \end{equation} and $\ic{K}{}{} = gK$ is the signed curvature of beam axis with respect to the convective coordinate frame. It should be noted that, since we are dealing with both the signed curvature and the modulus of curvature, the curviness $Kh$ itself can be defined with either of them. In the remainder of the paper, $Kh$ usually refers to the curviness obtained with the modulus of curvature. It is only in Subsection 5.3 that the so-called \textit{signed curviness} is used, merely for graphical representation. \subsection{Metric of an equidistant line} The degeneration from a 3D to a 2D beam model is trivial since we are dealing with plane beams, and all quantities are constant along the $\zeta$ coordinate, as illustrated in \fref{fig:Figure 1}. In order to reduce the beam continuum from 2D to 1D, the metric of the complete beam must be defined by some reference quantities. It is common to use the metric of the beam axis as the reference. Therefore, let us define an \emph{equidistant line} which is a set of points with $\eta=const$. Its position and tangent base vectors are: \begin{align} \label{eq:def:r_eq} \begin{aligned} \veq{r} &= \ve{r} + \eta \ve{g}_2, \\ \veq{g}_1 &= \iveq{r}{}{,1} = \ve{g}_1 - \eta K \iv{g}{}{1} = g_0 \iv{g}{}{1}, \quad \textnormal{with} \quad g_0=1-\eta K. \end{aligned} \end{align} Evidently, the base vector of this line is parallel to the base vector of beam axis. Their lengths differ for the initial curvature correction term $g_0$ \cite{2003kapania}. The other base vector of the equidistant line is the same as the one of beam axis $\iveq{g}{}{2}=\iv{g}{}{2}$. The metric tensor of an equidistant line is: \begin{equation} \label{eq:def:gg_eq} \ieq{g}{}{\alpha\beta}= \begin{bmatrix} \ii{g}{2}{0} g & 0\\ 0 & 1 \end{bmatrix}, \quad \det(\ieq{g}{}{\alpha\beta}) = \ii{g}{2}{0} g = \ieq{g}{}{}. \end{equation} Note that the initial curvature correction term $g_0$ becomes zero for $\eta K = 1$ which is physically prohibited. Since $\eta \in \left[-h/2,h/2\right]$, it follows that the upper bound of curviness is 2. \section{Bernoulli-Euler beam theory} After the metric of the beam continuum is defined, the next step is to introduce a strain measure. For the convective coordinate frame, the Lagrange strain equals the difference between the current and reference metrics: \begin{equation} \label{eq:def:strain} \ii{\epsilon}{}{\alpha\beta} = \frac{1}{2} \left( \idef{g}{}{\alpha \beta} - \ii{g}{}{\alpha \beta} \right). \end{equation} Due to the BE hypothesis, the shear strain vanishes and the position of the cross section is completely determined by the components of translation of the beam axis. In other words, these components are the only generalized coordinates of the BE beam. This fact gives rise to the so-called \emph{rotation-free} beam theories \cite{2018borkovicb}. \subsection{Kinematics} In the deformed configuration, the position vector of an equidistant line is: \begin{equation} \label{eq:def:r equidistant def} \ieqdef{\ve{r}}{}{} = \idef{\ve{r}}{}{} (\eta) = \idef{\ve{r}}{}{} + \eta \idef{\ve{g}}{}{2}, \end{equation} where $ \vdef{r} $ denotes the position vector of the deformed beam axis and the base vector $ \vdef{g}_2 $ is calculated similarly as in Eq.~\eqref{eq: def: g2}. The position vector of the deformed beam axis is: \begin{equation} \label{eq:def:r def2} \vdef{r} = \ve{r} + \ve{u}, \end{equation} where $ \ve{u} $ is the displacement vector of the beam axis. It is discretized with NURBS, in the same way as the geometry, \eqqref{eq:def:r}: \begin{equation} \label{eq:def:u} \ve{u} = \sum\limits_{I =1}^{N} R_{I} (\xi) \ve{u}_{I}. \end{equation} $ \ve{u}_{I} $ is the vector of displacement components of a control point $I$ with respect to the Cartesian system. For the sake of a seamless transition to the discrete equation of motion which follows in the Section 4, let us introduce the matrix of basis functions $ \ve{N} $ such that \eqqref{eq:def:u} can be written as: \begin{equation} \label{eq:def:u via matrices} \ve{u} = \ve{N} \ve{q}, \end{equation} where: \begin{equation} \label{eq:def:matrices for u} \begin{aligned} \trans{q} &= \begin{bmatrix} \trans{u}_{1} & \trans{u}_{2} & ... & \trans{u}_{I} & ... & \trans{u}_{N} \end{bmatrix}, \quad \trans{u}_{I} = \begin{bmatrix} u^1_{I} & u^2_{I} \end{bmatrix}, \\ \trans{N} &= \begin{bmatrix} \trans{R} & \trans{R} \end{bmatrix}, \quad \ve{R} = \begin{bmatrix} R_{1} & R_{2} & ... & R_{I} & ... & R_{N} \end{bmatrix}. \end{aligned} \end{equation} The material derivative of the displacement field yields the velocity field, i.e.: \begin{equation} \label{eq:def:velocity} \ve{v} = \mdvdef{r} = \mdv{u} = \md{u}^n \ve{i}_n = v^n \ve{i}_n = \md{x}^{*n} \ve{i}_n, \end{equation} while its spatially discretized form follows from \eqref{eq:def:u}: $\ve{v} = \mdv{u} = \ve{N} \mdv{q}$. The work conjugate pair for the Cauchy stress tensor is the strain rate tensor. It is the symmetric part of the velocity gradient and equals the material derivative of \eqref{eq:def:strain}. The covariant components of the strain rate tensor, with respect to the Cartesian coordinates, can be written as: \begin{equation} \label{eq:def:strain rate} \ii{d}{}{\alpha \beta} = \imd{\epsilon}{}{\alpha \beta} = \frac{1}{2} \left( \iloc{v}{}{\alpha \vert \beta} + \iloc{v}{}{\beta \vert \alpha} \right) = \frac{1}{2} \left( \idef{x}{\delta}{,\alpha} \ii{v}{}{\delta,\beta} + \idef{x}{\delta}{,\beta} \ii{v}{}{\delta,\alpha} \right) = \frac{1}{2} \left( \ivdef{g}{}{\alpha} \cdotp \iv{v}{}{,\beta} + \ivdef{g}{}{\beta} \cdotp \iv{v}{}{,\alpha} \right), \end{equation} where $ \iloc{v}{}{\alpha} $ are the components of the velocity with respect to the local curvilinear coordinates \cite{2021radenkovicb}. For BE beams, the only non-zero component of the strain rate is $\ii{d}{}{11}$: \begin{equation} \label{eq:def: strain rate d11} \ii{d}{}{11} = \idef{x}{\alpha}{,1} \ii{v}{}{\alpha,1} = \ivdef{g}{}{1} \cdotp \iv{v}{}{,1}. \end{equation} In order to define the kinematics of a beam continuum, the velocity of an equidistant line must be introduced. It is the material derivative of \eqref{eq:def:r equidistant def}: \begin{equation} \label{eq:def:eq velocity} \iveqmddef{r}{}{} = \iveq{v}{}{} = \iv{v}{}{} + \eta \iv{v}{}{,2}, \end{equation} where $\iv{v}{}{,2}$ follows from the definition of shear strain: \begin{equation} \label{eq:def:gradient v,2} \ii{d}{}{12} = \frac{1}{2} \left( \ivdef{g}{}{1} \cdot \iv{v}{}{,2} + \ivdef{g}{}{2} \cdot \iv{v}{}{,1} \right)=0 \quad \Rightarrow \quad \iv{v}{}{,2} = -\frac{1}{\idef{g}{}{}} \left( \ivdef{g}{}{2} \cdot \iv{v}{}{,1}\right) \ivdef{g}{}{1} = -\frac{1}{\idef{g}{}{}} \left( \ivdef{g}{}{1} \otimes \ivdef{g}{}{2} \right) \iv{v}{}{,1}. \end{equation} For the purpose of further derivation, let us express the components of this gradient by index notation, \cite{2018borkovicb}: \begin{equation} \label{eq:def:gradient v,2 index} \ii{v}{}{\alpha,2} = -\idef{B}{\beta}{\alpha}\ii{v}{}{\beta,1}, \quad \textnormal{with} \quad \idef{B}{\beta}{\alpha}=\frac{1}{\idef{g}{}{}} \idef{x}{\beta}{,2} \idef{x}{}{\alpha,1} . \end{equation} \subsection{Strain rate at an equidistant line} The strain rate at an equidistant line is, analogously to \eqqref{eq:def: strain rate d11}: \begin{equation} \label{eq:def:eq strain} \ieq{d}{}{11} = \iveqdef{g}{}{1} \cdot \iveq{v}{}{,1}. \end{equation} For the evaluation of this expression, let us first define the material derivative of mixed velocity gradient, using \eqqref{eq: def: derivatives of base vectors}: \begin{equation} \label{eq:def: gradient v,2} \iv{v}{}{,21} = \ivmddef{g}{}{2,1} = -\imddef{K}{}{} \ivdef{g}{}{1} -\idef{K}{}{} \iv{v}{}{,1}. \end{equation} With this relation and Eqs.~\eqref{eq:def:r_eq}, \eqref{eq:def:eq velocity} and \eqref{eq:def:eq strain}, the equidistant strain rate reduces to: \begin{equation} \label{eq:med:eq strain rate} \begin{aligned} \ieq{d}{}{11} &= \left( \idef{g}{}{0} \ivdef{g}{}{1} \right) \cdot \left( \iv{v}{}{,1} + \eta \iv{v}{}{,21} \right) = \left( \idef{g}{}{0} \ivdef{g}{}{1} \right) \cdot \left( \iv{v}{}{,1} - \eta \imddef{K}{}{} \iveqdef{g}{}{1} - \eta \idef{K}{}{} \iv{v}{}{,1} \right) \\ &= \idef{g}{}{0} \left( \idef{g}{}{0} \ii{d}{}{11} - \eta \imddef{K}{}{} \idef{g}{}{} \right). \end{aligned} \end{equation} At this point, we will introduce a curvature change of beam axis with respect to the convective coordinate: \begin{equation} \label{eq:med:curvature change} \kappa = \icdef{K}{}{} - \ic{K}{}{} = \idef{g}{}{} \idef{K}{}{} - gK, \end{equation} and its material derivative, the rate of curvature change: \begin{equation} \imd{\kappa}{}{} = \imddef{g}{}{} \idef{K}{}{} + \idef{g}{}{} \imddef{K}{}{} = 2 \ii{d}{}{11} \idef{K}{}{} + \idef{g}{}{} \imddef{K}{}{} \quad \Rightarrow \quad \idef{g}{}{} \imddef{K}{}{} = \imd{\kappa}{}{} - 2 \ii{d}{}{11} \idef{K}{}{}. \end{equation} By inserting the last expression into \eqqref{eq:med:eq strain rate}, the final form of the equidistant strain rate is obtained: \begin{equation} \label{eq:final form of eq strain} \ieq{d}{}{11} = \idef{g}{}{0} \left( \idef{g}{}{0} \ii{d}{}{11} - \eta \imd{\kappa}{}{} + 2 \eta \ii{d}{}{11} \idef{K}{}{} \right) = \idef{g}{}{0} \left[ \left( 1+\eta \idef{K}{}{} \right) \ii{d}{}{11} - \eta \imd{\kappa}{}{} \right]. \end{equation} This expression is analogous to the one derived in \cite{2018borkovicb} for the equidistant axial strain. It is valid for finite, but small, strain analysis, which falls into the scope of the geometrical exact beam theory \cite{1999crisfield}. Finally, representing the rate of curvature change as a function of velocity gradients of the beam axis is a requirement. It follows from Eqs.~\eqref{eq: def: derivatives of base vectors}, \eqref{eq:def:gradient v,2}, and \eqref{eq:med:curvature change}: \begin{equation} \label{eq: def: rate of cur change} \imd{\kappa}{}{} = \icmddef{K}{}{} = \imddef{\Gamma}{2}{11} = \ivdef{g}{}{1,1} \cdot \iv{v}{}{,2} + \ivdef{g}{}{2} \cdot \iv{v}{}{,11} = \ivdef{g}{}{2} \cdot \left( \iv{v}{}{,11} - \idef{\Gamma}{1}{11} \iv{v}{}{,1}\right). \end{equation} \section{Finite element formulation} In line with the previous derivation, we will formulate the isogeometric BE element using the principle of virtual power. The generalized coordinates are the components of the velocities of the control points. We start from the generalized Hooke law for linear elastic material, also known as the Saint Venant-Kirchhoff material model. This material model is well-suited for the small strain and large rotation analysis \cite{2004bischoff}. The only non-zero components of the stress and strain rates are related as: \begin{equation} \label{eq:stress strain relation} \ieqmd{\sigma}{11}{} = E \left( \ieq{g}{11}{} \right)^2 \ieqmd{d}{}{11}, \end{equation} where $E$ is the Young's modulus of elasticity. It is a well-known fact that this axial state of stress is an erroneous consequence of the BE assumptions. Nevertheless, it readily used due to its simplicity. \subsection{Principle of virtual power} The principle of virtual power represents a weak form of the equilibrium. It states that at any instance of time, the total power of the external, internal and inertial forces is zero for any admissible virtual state of motion. If the inertial effects are neglected, and body and surface loads are reduced to the beam axis, it can be written for plane BE beams as: \begin{equation} \label{eq:virtual power} \delta P = \int_{V}^{} \ieq{\sigma}{11}{} \delta \ieq{d}{}{11} \dd{V} - \int_{\xi}^{} \iloc{p}{\alpha}{} \delta \iloc{v}{}{\alpha} \sqrt{g} \dd{\xi} = \int_{V}^{} \bm{\sigma} : \delta \ve{d} \dd{V} - \int_{\xi}^{} \ve{p} \cdot \delta \ve{v} \sqrt{g} \dd{\xi} = 0, \end{equation} where $\bm{\sigma} $ is the Cauchy stress tensor, $\ve{d}$ is the strain rate tensor, and $\ve{p}$ is the vector of external line loads. All these quantities are measured with respect to the current, unknown, configuration. For problems with deformation-independent loads, the only requirement is to linearize the Cauchy stress. At the current $(n+1)$ configuration this stress is approximated by: \begin{equation} \label{eq:linearization of stress} \iii{\bm{\sigma}}{(n+1)}{}{}{} \approx \iii{\bm{\sigma}}{(n)}{(n+1)}{}{} + \frac{{\operatorname{d}}^t \: \iii{\bm{\sigma}}{(n)}{}{}{}} {\operatorname{d}t} \Delta \ii{t}{}{(n+1)}, \end{equation} where $\iii{\bm{\sigma}}{(n)}{(n+1)}{}{}$ is the stress from the previous $(n)$ configuration expressed with respect to the metric of the current $(n+1)$ configuration. \begin{remark} The additive decomposition of stress, as in \eqqref{eq:linearization of stress}, is only valid if all of the terms are expressed with respect to the same metric. Therefore, the stress from the previous configuration is here adjusted to the current metric by an \emph{adjustment term}. This term is approximately equal to the ratio of determinants of the metric tensors in two configurations, c.f.~Appendix A. The exact integration of the adjusted stress is impractical because the adjustment term consists of the ratio of the initial curvature correction terms at two configurations. Three approaches are considered here for dealing with this issue. These are discussed in detail in Appendix A and compared in Subsection 5.1.4. \end{remark} An appropriate time derivative in \eqqref{eq:linearization of stress} is designated with $\operatorname{d}^t () / \operatorname{d}t$ while $\Delta \ii{t}{}{(n+1)} = \ii{t}{}{(n+1)} - \ii{t}{}{(n)}$ is the time increment. The rate form of stress-strain relations requires an objective time derivative. Note that the material derivative is not objective, while the corotational (Jaumann) and convective time derivatives fulfill this property \cite{2008wriggers, 1984johnson}. The convective derivative of stress tensor results in the stress rate tensor. An important fact is that the components of the stress rate tensor are equal to the material derivatives of the components of the stress tensor, \cite{2021radenkovicb}. Having this in mind, and after the insertion of \eqqref{eq:linearization of stress} into \eqqref{eq:virtual power}, the linearized form of the principle of virtual power at the current configuration is obtained: \begin{equation} \label{eq:linearized virtual power} \int_{V}^{} \ieqmd{\sigma}{11}{} \delta \ieq{d}{}{11} \dd{V} \Delta t + \int_{V}^{} \ieq{\sigma}{11}{} \delta \ieq{d}{}{11} \dd{V} = \int_{\xi}^{} \iloc{p}{\alpha}{} \delta \iloc{v}{}{\alpha} \sqrt{g} \dd{\xi}. \end{equation} In the remainder of this paper, we neglect the time indices and asterisks for the sake of readability. Note that this simplification does not introduce any notational ambiguity since (i) the stress and strain rates are instantaneous quantities, while the known stress is calculated at the previous configuration, and (ii) all integrations are performed with respect to the metric of the current configuration, in accordance with the updated Lagrangian procedure \cite{2007bathea}. In order to reduce the dimension from 3D to 1D, it is necessary to integrate the left-hand side of \eqqref{eq:linearized virtual power} over the area of the cross section. Thus, integrals along the length of the beam axis are obtained: \begin{equation} \label{eq:from 3D to 2D} \begin{aligned} \int_{V}^{} \ieqmd{\sigma}{11}{} \delta \ieq{d}{}{11} \dd{V} \Delta t + \int_{V}^{} \ieq{\sigma}{11}{} \delta \ieq{d}{}{11} \dd{V} &= \int_{\xi}^{} \left( \icmd{N}{}{} \delta \ii{d}{}{11} + \icmd{M}{}{} \delta \imd{\kappa}{}{} \right) \sqrt{g} \dd{\xi} \Delta t \\ &+ \int_{\xi}^{} \left( \ic{N}{}{} \delta \ii{d}{}{11} + \ic{M}{}{} \delta \imd{\kappa}{}{} \right) \sqrt{g} \dd{\xi}, \end{aligned} \end{equation} where $\ic{N}{}{}$ and $\ic{M}{}{}$ are the stress resultant and the stress couple, which are energetically conjugated with the reference strain rates of the beam axis, $\ii{d}{}{11}$, and $\imd{\kappa}{}{}$, while $\icmd{N}{}{}$ and $\icmd{M}{}{}$ are their respective rates: \begin{equation} \label{eq: rates of section forces} \begin{aligned} \icmd{N}{}{} = \int_{A} (g_0)^2 \ieqmd{\sigma}{11}{} \left( 1+\eta K\right) \dd{\eta} \dd{\zeta} \quad \textnormal{and} \quad \icmd{M}{}{} =- \int_{A} \eta (g_0)^2 \ieqmd{\sigma}{11}{} \dd{\eta} \dd{\zeta}. \end{aligned} \end{equation} These expressions are analogous to those obtained in \cite{2018borkovicb}. By introducing the vectors of generalized section forces, strain rates of the beam axis, and external line loads: \begin{align} \label{eq:vectors of section forces and stran rates} \trans{f} = \begin{bmatrix} \ic{N}{}{} & \ic{M}{}{} \end{bmatrix}, && \trans{e} = \begin{bmatrix} \ii{d}{}{11} & \imd{\kappa}{}{} \end{bmatrix}, && \trans{p} = \begin{bmatrix} \ii{p}{}{1} & \ii{p}{}{2} \end{bmatrix}, \end{align} \eqqref{eq:linearized virtual power} can be written in compact matrix form as: \begin{equation} \label{matrix form of linearized virtual power} \int_{\xi}^{} \transmd{f} \delta \ve{e} \sqrt{g} \dd{\xi} \Delta t + \int_{\xi}^{} \trans{f} \delta \ve{e} \sqrt{g} \dd{\xi} = \int_{\xi}^{} \trans{p} \delta \ve{v} \sqrt{g} \dd{\xi}. \end{equation} This equation is nonlinear and it will be linearized in Section 4.4. \subsection{Relation between energetically conjugated pairs} The geometrically exact relations \eqref{eq:from 3D to 2D} and \eqref{eq: rates of section forces} are crucial for the accurate formulation of structural beam theories. In particular, they allow a rigorous definition of energetically conjugated pairs, and guarantee that the appropriate constitutive matrix is symmetric. By the introduction of Eqs.~\eqref{eq:final form of eq strain} and \eqref{eq:stress strain relation} into Eq. \eqref{eq: rates of section forces}, we obtain the exact relation between energetically conjugated pairs of stress and strain rates. The resulting symmetric constitutive matrix $\iv{D}{}{}$ is derived in \cite{2018borkovicb}: \begin{equation} \label{eq: def: DA} \ivmd{f}{}{} = \iv{D}{}{} \iv{e}{}{}, \quad \iv{D}{}{}= \begin{bmatrix} A & -\ieq{I}{}{} \\ -\ieq{I}{}{} & I \\ \end{bmatrix}, \end{equation} where: \begin{equation} \label{eq: def: IA} A=\int_{A}^{} \frac{\left( 1 + \eta K \right) ^2}{g_0} \dd{\eta} \dd{\zeta} , \quad \ieq{I}{}{}=\int_{A}^{} \frac{\eta \left( 1 + \eta K \right)}{g_0} \dd{\eta} \dd{\zeta}, \quad I=\int_{A}^{} \frac{\eta^2 }{g_0} \dd{\eta} \dd{\zeta}. \end{equation} Importantly, these integrals can be analytically determined for the conventional solid cross section shapes \cite{2018borkovicb}. In the following, we refer to the exact constitutive model given in \eqqref{eq: def: DA} by $D^a$. We introduce four reduced models to examine the various influences of the exact constitutive relation. The first and the simplest of these is designated with $D^0$. It is often employed for thin beams, e.g. \cite{2020vo, 2020tasora}, since it decouples axial and bending actions: \begin{equation} \label{eq: def: D0} \iv{D}{0}{}= \begin{bmatrix} A_0 & 0 \\ 0 & I_0 \\ \end{bmatrix}, \quad A_0=\int_{A}^{} \dd{\eta} \dd{\zeta}, \quad I_0=\int_{A}^{} \eta^2 \dd{\eta} \dd{\zeta}. \end{equation} The second reduced model, $D^1$, is based on the approximation: $g_0 \rightarrow 1$. It is readily utilized for the analysis of curved beams with small curvature \cite{2013greco, 2018radenkovicb}. The model is specified by: \begin{equation} \label{eq: def: D1} \begin{aligned} \iv{D}{1}{} &= \begin{bmatrix} A_1 & -\ieq{I_1}{}{} \\ -\ieq{I_1}{}{} & I_1 \\ \end{bmatrix}, \quad A_1=\int_{A}^{} \left( 1 + \eta K \right) ^2 \dd{\eta} \dd{\zeta} \approx \int_{A}^{} \dd{\eta} \dd{\zeta}=A_0, \\ \ieq{I_1}{}{} &=\int_{A}^{} \eta \left( 1 + \eta K \right) \dd{\eta} \dd{\zeta}=KI_0, \quad I_1=\int_{A}^{} \eta^2 \dd{\eta} \dd{\zeta}=I_0. \end{aligned} \end{equation} where the quadratic term in the integrand of property $A_1$ is disregarded. Finally, the models $D^2$ and $D^3$ are based on the Taylor approximation of the exact expressions \eqref{eq: def: IA}: \begin{equation} \label{eq: def: D2} \begin{aligned} \iv{D}{2}{} &= \begin{bmatrix} A_2 & -\ieq{I_2}{}{} \\ -\ieq{I_2}{}{} & I_2 \\ \end{bmatrix}, \\ A_2 &= \int_{A}^{} \dd{\eta} \dd{\zeta}= A_0, \\ \ieq{I_2}{}{} &= \int_{A}^{} \left(2 K \eta^2 \right) \dd{\eta} \dd{\zeta}=2 K I_0, \\ I_2 &= \int_{A}^{} \eta^2 \dd{\eta} \dd{\zeta}=I_0, \end{aligned} \end{equation} \begin{equation} \label{eq: def: D3} \begin{aligned} \iv{D}{3}{} &= \begin{bmatrix} A_3 & -\ieq{I_3}{}{} \\ -\ieq{I_3}{}{} & I_3 \\ \end{bmatrix}, \\ A_3 &= \int_{A}^{} \left( 1 + 4 \eta^2 K^2 \right) \dd{\eta} \dd{\zeta}= A_0 + 4 K^2 I_0, \\ \ieq{I_3}{}{} &= \int_{A}^{} \left(2 K \eta^2 + 2 \eta^4 K^3 \right) \dd{\eta} \dd{\zeta}=2 K I_0 + 2 K^3 \int_{A}^{}\eta^4 \dd{\eta} \dd{\zeta}, \\ I_3 &= \int_{A}^{} \left( \eta^2 + \eta^4 K^2 \right) \dd{\eta} \dd{\zeta}=I_0 + K^2 \int_{A}^{}\eta^4 \dd{\eta} \dd{\zeta}. \end{aligned} \end{equation} where the $4^{th}$ moment of area can be easily calculated for rectangular and circular cross sections. \subsection{Variation of strains} Since the strain rate is a function of the generalized coordinates as well as the metric, we must vary it with respect to both arguments. By noting that the variation of the tangent vectors can be expressed as: \begin{equation} \label{variation of base vector g_alpha} \delta \iv{g}{}{\alpha} = \delta \iv{v}{}{,\alpha} \Delta t, \end{equation} the variations of reference strains are given by: \begin{equation} \label{eq: variations of reference strains} \begin{aligned} \delta \ii{d}{}{11} &= \delta \left( \iv{g}{}{1} \cdot \iv{v}{}{,1} \right) = \delta \iv{v}{}{,1} \cdot \iv{v}{}{,1} \Delta t + \iv{g}{}{1} \cdot \delta \iv{v}{}{,1}, \\ \delta \imd{\kappa}{}{} &= \delta \left[ \iv{g}{}{2} \cdot \left( \iv{v}{}{,11} - \ii{\Gamma}{1}{11} \iv{v}{}{,1}\right) \right] \\ &= \delta \iv{v}{}{,2} \cdotp \left( \iv{v}{}{,11} - \ii{\Gamma}{1}{11} \iv{v}{}{,1}\right) \Delta t - \delta \ii{\Gamma}{1}{11} \left(\iv{g}{}{2} \cdotp \iv{v}{}{,1}\right) + \iv{g}{}{2} \cdotp \left( \delta \iv{v}{}{,11} - \ii{\Gamma}{1}{11} \delta \iv{v}{}{,1}\right). \end{aligned} \end{equation} Most of the terms in the previous expression are easily computed since the variation is explicitly performed with respect to the unknown variables. However, the first two addends of $\imd{\kappa}{}{}$ are exceptions since they require the variations of the velocity of the normal and the Christoffel symbol. These variations must be represented via the variations of generalized coordinates \cite{2017radenkovic}. The variation of the velocity of the normal follows directly from \eqqref{eq:def:gradient v,2}: \begin{equation} \label{eq: variation of normal} \delta \iv{v}{}{,2} = -\frac{1}{\ii{g}{}{}} \left( \iv{g}{}{2} \cdot \delta \iv{v}{}{,1}\right) \iv{g}{}{1}. \end{equation} For the variation of the Christoffel symbols, we start from \eqqref{eq:def:christ} and, after some straightforward calculation, obtain: \begin{equation} \label{eq:variation of chris} \delta \ii{\Gamma}{1}{11} = \delta \left( \iv{g}{}{1,1} \cdot \iv{g}{1}{} \right) = \left[ \frac{1}{g} \iv{g}{}{1} \delta \iv{v}{}{,11} + \frac{1}{g} \left( \ic{K}{}{} \iv{g}{}{2} - \ii{\Gamma}{1}{11} \iv{g}{}{1} \right) \cdot \delta \iv{v}{}{,1} \right] \Delta t. \end{equation} By inserting Eqs.~\eqref{eq: variation of normal} and \eqref{eq:variation of chris} into \eqqref{eq: variations of reference strains}, the final expression for the variation of the rate of curvature change is found: \begin{equation} \label{eq: variation of curvature change} \begin{aligned} \delta \imd{\kappa}{}{} &= \iv{g}{}{2} \cdotp \left( \delta \iv{v}{}{,11} - \ii{\Gamma}{1}{11} \delta \iv{v}{}{,1}\right) \\ &- \frac{1}{\ii{g}{}{}} \left\{ \left( \iv{g}{}{2} \cdot \delta \iv{v}{}{,1}\right) \iv{g}{}{1} \cdotp \left( \iv{v}{}{,11} - \ii{\Gamma}{1}{11} \iv{v}{}{,1}\right) + \left[ \iv{g}{}{1} \delta \iv{v}{}{,11} + \left( \ic{K}{}{} \iv{g}{}{2} - \ii{\Gamma}{1}{11} \iv{g}{}{1} \right) \cdot \delta \iv{v}{}{,1} \right] \left( \iv{g}{}{2} \cdotp \iv{v}{}{,1} \right) \right\} \Delta t. \end{aligned} \end{equation} \subsection{Discrete equation of motion} In this subsection, the virtual power is spatially discretized and linearized. We start by introducing the matrix $\iv{B}{}{L}$, which relates the reference strain rates of the beam axis with the velocities of control points: \begin{equation} \label{eq: e=BL q} \ve{e} = \iv{B}{}{L} \ivmd{q}{}{}. \end{equation} Using Eqs.~\eqref{eq:def: strain rate d11} and \eqref{eq: def: rate of cur change}, the vector of the reference strain rates can be represented as: \begin{equation} \label{eq: vector of reference strains matrix form} \ve{e} = \ve{H} \ve{w} = \sum_{\alpha=1}^{2} \iv{H}{}{\alpha} \iv{w}{\alpha}{}, \quad \ve{H} = \begin{bmatrix} \iv{H}{}{1} & \iv{H}{}{2} \end{bmatrix}, \quad \iv{H}{}{\alpha} = \begin{bmatrix} \ii{x}{}{\alpha,1} & 0 \\ -\ii{\Gamma}{1}{11} & \ii{x}{}{\alpha,2} \end{bmatrix}, \quad \iv{w}{\alpha}{} = \begin{bmatrix} \ii{v}{\alpha}{,1} \\ \ii{v}{\alpha}{,11} \end{bmatrix}, \end{equation} where the vector $\ve{w}$ is defined by: \begin{equation} \label{eq:w definition} \ve{w} = \ve{B} \ivmd{q}{}{}, \quad \ve{w} = \begin{bmatrix} \iv{w}{1}{} \\ \iv{w}{2}{} \end{bmatrix}, \quad \ve{B} = \begin{bmatrix} \iv{B}{1}{1} & ... & \iv{B}{1}{I} & ... & \iv{B}{1}{N} \\ \iv{B}{2}{1} & ... & \iv{B}{2}{I} & ... & \iv{B}{2}{N} \end{bmatrix}. \end{equation} The submatrices $\iv{B}{\alpha}{I}$ for an arbitrary control point $I$ consist of the derivatives of the basis functions, i.e.: \begin{equation} \label{eq: submatrices BIJ} \iv{B}{1}{I} = \begin{bmatrix} \ii{R}{}{I,1} & 0 \\ \ii{R}{}{I,11} & 0 \end{bmatrix}, \quad \iv{B}{2}{I} = \begin{bmatrix} 0 & \ii{R}{}{I,1} \\ 0 & \ii{R}{}{I,11} \end{bmatrix}. \end{equation} The matrix $\iv{B}{}{L}$ now follows as: \begin{equation} \label{eq: e=Hw, BL=HB} \ve{e} = \ve{H} \ve{w} = \ve{H} \ve{B} \ivmd{q}{}{} = \iv{B}{}{L} \ivmd{q}{}{}, \quad \iv{B}{}{L} = \ve{H} \ve{B}. \end{equation} Next, we need to specify the explicit matrix form of the virtual power generated by the known stress and the variation of strain rate with respect to the metric, Eqs.~\eqref{matrix form of linearized virtual power} and \eqref{eq: variations of reference strains}: \begin{equation} \label{eq: part of vp generated by known stress and variation of strain rate} \begin{aligned} \int_{\xi}^{} \trans{f} \delta \iv{B}{}{L} \ivmd{q}{}{} \sqrt{g} \dd{\xi} \Delta t &= \int_{\xi}^{} \sum_{\alpha=1}^{2} \sum_{\beta=1}^{2} \trans{$(\iv{w}{\alpha}{})$} \iv{G}{\beta}{\alpha} \delta \iv{w}{}{\beta} \sqrt{g} \dd{\xi} \Delta t \\ \sum_{\alpha=1}^{2} \sum_{\beta=1}^{2} \trans{$(\iv{w}{\alpha}{})$} \iv{G}{\beta}{\alpha} \delta \iv{w}{}{\beta} &= \ic{N}{}{} \left( \ii{v}{\alpha}{,1} \delta \ii{v}{}{\alpha,1} \right) + \ic{M}{}{} \left( \ii{v}{\alpha}{,1} \ii{Y}{\beta}{\alpha } \delta \ii{v}{}{\beta,1} - \ii{v}{\alpha}{,11} \ii{B}{\beta}{\alpha } \delta \ii{v}{}{\beta,1} - \ii{v}{\alpha}{,1} \ic{B}{\beta}{\alpha} \delta \ii{v}{}{\beta,11} \right) , \end{aligned} \end{equation} where the matrix $\iv{G}{\beta}{\alpha}$ is: \begin{equation} \label{eq:Gnm def} \iv{G}{\beta}{\alpha} = \begin{bmatrix} \ic{N}{}{} \ii{\delta}{\beta}{\alpha} + \ic{M}{}{} \ii{Y}{\beta}{\alpha} & -\ic{M}{}{} \ic{B}{\beta}{\alpha} \\ -\ic{M}{}{} \ii{B}{\beta}{\alpha} & 0 \end{bmatrix}, \end{equation} with: \begin{equation} \label{eq:Gnm elements def} \ii{Y}{\beta}{\alpha} = \ii{\Gamma}{1}{11} \ii{B}{\beta}{\alpha} - \frac{1}{g} \left( \ic{K}{}{} \ii{x}{\beta}{,2} -\ii{\Gamma}{1}{11} \ii{x}{\beta}{,1}\right) \ii{x}{}{\alpha,2}, \quad \ic{B}{\beta}{\alpha} = \frac{1}{g} \ii{x}{\beta}{,1} \ii{x}{}{\alpha,2} = \ii{B}{\alpha}{\beta}. \end{equation} By introducing the total matrix of the generalized section forces: \begin{equation} \label{eq: G matrix def} \ve{G} = \begin{bmatrix} \iv{G}{1}{1} & \iv{G}{2}{1} \\ \iv{G}{1}{2} & \iv{G}{2}{2} \end{bmatrix}, \end{equation} expression \eqref{eq: part of vp generated by known stress and variation of strain rate} can be written as: \begin{equation} \label{eq:transf geometric term of VP to bilinear form} \int_{\xi}^{} \trans{f} \delta \iv{B}{}{L} \ivmd{q}{}{} \sqrt{g} \dd{\xi} \Delta t = \int_{\xi}^{} \trans{w} \ve{G} \delta \ve{w} \sqrt{g} \dd{\xi} \Delta t. \end{equation} A careful inspection of Eqs.~\eqref{eq:Gnm def} and \eqref{eq: G matrix def} reveals that the matrix of generalized section forces, $\ve{G}$, is symmetric \cite{2017radenkovic}. Now, the integrands in the equation of the virtual power \eqref{matrix form of linearized virtual power} reduce to: \begin{equation} \label{eq: terms of VP rewritten} \begin{aligned} \transmd{f} \delta \ve{e} &\approx \transmd{q} \trans{$\iv{B}{}{L}$} \ve{D} \iv{B}{}{L} \delta \ivmd{q}{}{},\\ \trans{f} \delta \ve{e} &= \trans{f} \left( \delta \iv{B}{}{L} \ivmd{q}{}{} + \iv{B}{}{L} \delta \ivmd{q}{}{}\right) = \transmd{q} \trans{B} \ve{G} \ve{B} \delta \ivmd{q}{}{} \Delta t + \trans{f} \iv{B}{}{L} \delta \ivmd{q}{}{} , \end{aligned} \end{equation} where the first term is linearized by neglecting the variation of strain rate with respect to the metric: \begin{equation} \label{eq: terms of VP approximation} \delta \ve{e} \approx \iv{g}{}{1} \cdotp \delta \iv{v}{}{,1} = \iv{B}{}{L} \delta \ivmd{q}{}{}. \end{equation} Finally, the equation of equilibrium reduces to: \begin{equation} \label{eq: virtual equilibrium} \transmd{q} \int_{\xi}^{} \left( \trans{$\iv{B}{}{L}$} \ve{D} \iv{B}{}{L} + \trans{B} \ve{G} \ve{B} \right) \sqrt{g} \dd{\xi} \delta \ivmd{q}{}{} \Delta t = \int_{\xi}^{} \trans{p} \ve{N} \sqrt{g} \dd{\xi} \delta \ivmd{q}{}{} - \int_{\xi}^{} \trans{f} \iv{B}{}{L} \sqrt{g} \dd{\xi} \delta \ivmd{q}{}{}, \end{equation} which is readily written in the standard form: \begin{equation} \label{eq:standard form of equlibrium} \iv{K}{}{T} \Delta \ve{q} = \ve{Q} - \ve{F}, \quad \left( \Delta \ve{q} = \ivmd{q}{}{} \Delta t\right), \end{equation} where: \begin{equation} \label{eq: Kt} \iv{K}{}{T} = \int_{\xi}^{} \trans{$\iv{B}{}{L}$} \ve{D} \iv{B}{}{L} \sqrt{g} \dd{\xi} + \int_{\xi}^{} \trans{B} \ve{G} \ve{B} \sqrt{g} \dd{\xi}, \end{equation} is the tangent stiffness matrix and: \begin{equation} \label{eq: Q and F} \ve{Q} = \int_{\xi}^{} \trans{N} \ve{p} \sqrt{g} \dd{\xi}, \quad \ve{F} = \int_{\xi}^{} \trans{$\iv{B}{}{L}$} \ve{f} \sqrt{g} \dd{\xi}, \end{equation} are the vectors of the external and internal forces, respectively. The vector $\Delta \ve{q}$ in \eqqref{eq:standard form of equlibrium} contains increments of the displacements. Due to the approximation introduced in \eqqref{eq: terms of VP approximation}, the solution of \eqqref{eq:standard form of equlibrium} does not satisfy the principle of virtual power directly, but has to be enforced by additional numerical schemes. Here, both the Newton-Raphson and arc-length methods are employed. The present derivation of the geometric stiffness matrix differs from the conventional procedure for nonlinear beam formulations \cite{2020vo}. In particular, the full BE beam metric is incorporated in \eqqref{eq: part of vp generated by known stress and variation of strain rate} and the symmetric nature of the geometric stiffness term is stressed by the elegant and compact form of Eqs.~\eqref{eq:Gnm def} and \eqref{eq:transf geometric term of VP to bilinear form}. The latter confirms that the formulation is valid and that the adopted force and strain quantities are energetically conjugated. \section{Numerical examples} The aim of the subsequent numerical experiments is to validate the proposed approach and to examine the influence of curviness on structural response. The boundary conditions are imposed strongly and the rotations are treated with special care, see \cite{2018borkovicb}, since they are not utilized as DOFs. Locking issues are not considered, but the presence of membrane locking is already detected for linear analyses in \cite{2018borkovicb}, and it is present in nonlinear analysis as well. However, its influence is alleviated with the usage of higher order basis functions \cite{2014adam}. It is interesting that high interelement continuity increases the locking effect due to the presence of more constraints, which must be satisfied. This issue can be dealt with an appropriate numerical integration scheme \cite{2014adam}. The quest for optimal quadrature rules in IGA is an ongoing topic, see e.g. \cite{2012auricchioa}, but the standard Gauss quadrature with $p+1$ integration points are used here. Since no rotational DOFs are required for BE beams, the implementation of multi-patch structures receives much attention \cite{2020voa, 2020vo, 2014greco, 2020marchiori}. A straightforward algorithm for handling multi-patch structures is implemented here \cite{2009kiendl}. The rotation at the end of NURBS curve depends on the displacements of the last two control points \cite{1995piegla}. Therefore, the rotation of two NURBS curves at a joint is a function of six displacement components. In order to prescribe rigid connection between two patches, one displacement component is constrained as a function of the other five. This approach is straightforward and does not require the introduction of bending strips or end rotational DOFs \cite{2016greco, 2020vo}. All the results are related to the load proportionality factor ($LPF$), rather than the load intensity itself. Although the implemented code allows the usage of large load increments for some examples, the results are mostly calculated with small increments in order to enable a clear comparison of the obtained results via smooth equilibrium paths. For problems that do not exhibit a snap behavior, it is possible to obtain the deformed configurations for the prescribed load increments. Thus, the relative differences between different models can be compared along the equilibrium path, c.f. Subsection 5.1. These graphs give a clearer insight into discrepancies of the models than a simple comparison of equilibrium paths. Since the time is a fictitious quantity in the present static analysis, strain and stress rates are equal to strains and stresses, respectively. \subsection{Cantilever beam subjected to an end concentrated moment} This example is a classic benchmark test for the validation of nonlinear beam formulations \cite{2020vo, 2016bauera, 2016huang}. The cantilever beam is loaded at its free end with a moment $2nEI\pi /L$, where $n$ defines the number of circles into which the beam rolls-up, Fig. \ref{fig:mainspring: disposition}. A square cross section is considered and its dimension varies from the set $b=h\in\{0.05, 0.1, 0.2, 0.4, 0.8\}$. If the beam is rolled up into one circle ($n=1$) the curviness becomes $Kh\approx\{0.03,0.06,0.13,0.25,0.50\}$ for $LPF=1$. If the beam is rolled up into two circles ($n=2$), the value of curviness at the final configuration is also doubled. \begin{figure}[hb] \includegraphics[width=8 cm]{Figure2.png}\centering \caption{Cantilever beam. Geometry and applied load. } \label{fig:mainspring: disposition} \end{figure} A moment load can be applied in various ways for rotation-free models. For example, an additional knot can be inserted to define a couple \cite{2016bauera}, or the linear stress distribution can be imposed, \cite{2020choi}. Here, no additional knots are added and the force couple is defined by the external virtual power, analogous to \cite{2018borkovicb}. Since we are dealing with rotation-free nonlinear analysis, this couple changes direction and intensity throughout the whole deformation. Therefore, the external load vector must be updated at each iteration to define the applied moment accurately. Similar to \cite{2016bauera}, the contribution from these non-conservative external forces to the tangent stiffness matrix is disregarded. \subsubsection{Convergence analysis} We examine the convergence properties of the developed formulation for two constitutive models, i.e., $D^1$ and $D^a$, using $n=1$ and $h=0.2 \rightarrow Kh \approx 0.13$. Since these two models return different structural responses, different reference solutions must be utilized. For the $D^1$ model, reference analytical solution for thin beam is employed \cite{2016bauera}. Regarding the $D^a$ model, the analytical solution is not available in literature and a mesh of 60 quintic $C^1$ elements (484 DOFs) is adopted as a reference solution. The $L_2\textnormal{-norm}$ of the relative error of displacement for $LPF=1$ is considered in Fig. \ref{fig:mainspring: displacement convergence two models} for three different polynomial orders with highest available interelement continuity. \begin{figure}[t] \includegraphics[width=\linewidth]{Figure3.png} \caption{Cantilever beam. Convergence of displacement for LPF=1 for the models a) $D^1$, b) $D^a$. } \label{fig:mainspring: displacement convergence two models} \end{figure} Since the expected order of convergence is $p+1$, \cite{2013greco}, the obtained orders are higher. \begin{figure}[t] \includegraphics[width=\linewidth]{Figure4.png} \caption{Cantilever beam. Convergence of: a) normal force, and b) bending moment, for LPF=1. } \label{fig:mainspring: force convergence two models} \end{figure} Fig. \ref{fig:mainspring: force convergence two models} illustrates the convergence of the normal force and the bending moment using the $D^a$ model. The analytical solution is used as reference. The expected order is $p$ and it is obtained in all tests. The exception is the mesh with cubic splines. A similar behavior has been observed in \cite{2016marino} and attributed to the higher order derivatives involved in the strong form. In the rest of this example, quartic splines with $C^3$ interelement continuity are exclusively used. \subsubsection{Comparison of constitutive models} A discretization with 24 elements is employed to calculate the equilibrium path of the tip for $n=2$ and two different values of curviness. The results are compared with the analytical ones and shown in Fig. \ref{fig:mainspring: displacement different models}. For a beam with the curviness $Kh \approx 0.06$, the results of all models are in almost full agreement with the analytical solution, Fig. \ref{fig:mainspring: displacement different models}a. \begin{figure} \includegraphics[width=\linewidth]{Figure5.png} \caption{Cantilever beam. Comparison of the displacement components of the tip obtained by different constitutive models and analytically: a) $Kh \approx 0.06$, b) $Kh \approx 0.50$.} \label{fig:mainspring: displacement different models} \end{figure} However, when the cross section dimensions are increased such that the curviness becomes $Kh \approx 0.50$, the discrepancies become significant, Fig. \ref{fig:mainspring: displacement different models}b. The $D^1$ model is fully aligned with the analytical solution for thin beams, while the $D^0$ model slightly deviates. On the other hand, the results obtained with the $D^a$ and $D^3$ models are virtually indistinguishable, but differ from those of the thin beam. The $D^2$ model deviates from the exact predictions, but with a different sign than the $D^0$ and $D^1$ models. These results show that the present approach can return accurate results for problems with large displacements and rotations. For beams with small curvature, the results are aligned with the classic predictions. As the curviness increase, the difference between constitutive models becomes clearly visible. In order to present these findings more concisely, the relative differences of the reduced models with respect to the $D^a$ model are presented in Fig.~\ref{fig:mainspring: displacement relative difference} for four different values of curviness. \begin{figure} \includegraphics[width=\linewidth]{Figure6.png} \caption{Cantilever beam. Relative differences of the displacement of the tip for four different values of curviness. The results by the reduced models are compared with those from the exact one. } \label{fig:mainspring: displacement relative difference} \end{figure} These results confirm that the reduced model $D^3$ returns reasonably accurate results, even for strongly curved beams. It is interesting to note the relatively large differences of the $D^2$ model, which suggest that the inclusion of higher order terms, as in the reduced constitutive model $D^3$, is required if accurate results for strongly curved beams are sought, see Eqs.~\eqref{eq: def: D2} and \eqref{eq: def: D3}. Another important conclusion follows from this specific example. Since the curviness is constant along the beam, the introduced exact metric has more impact on the beam response than it is the case with examples where the maximum curviness is local. We can observe, e.g., that if the curviness along the whole beam is less than 0.15, the error of the simple decoupled $D^0$ model is less than 0.3 \%. As the curviness increases over 0.25, the error increase over 1.1 \%, etc. \subsubsection{Specific aspects of strongly curved beams} This example is sometimes misinterpreted due to the pure bending conditions. It is assumed that there is no change of the length of beam axis and the beam rolls-up into a perfect circle with the circumference equal to the length of the beam \cite{2020tasora}. However, when we deal with a geometrically exact analysis that considers the effect of curviness, the strain is distributed nonlinearly across the height of the cross section with a non-zero value at the centroid. This strain is extensional and its value is negligible for very thin beams, but becomes significant for strongly curved beams. Consequently, the axis of a cantilever loaded with tip moment will reach full circle for $n<1$ and its circumference will be somewhat larger than the original length. In order to depict this, the four configurations of the beam with $h=0.2$ are visualized in Fig. \ref{fig:mainspring: deformed configurations}. \begin{figure} \includegraphics[width=\linewidth]{Figure7.png} \caption{Cantilever beam. Reference and deformed configurations, and stress distribution across the height of cross section for four levels of load: a) $LPF=0.25$, b) $LPF=0.50$, c) $LPF=0.75$, d) $LPF=1.00$. } \label{fig:mainspring: deformed configurations} \end{figure} Note how the initially thin and slender beam becomes strongly curved during the deformation. As a consequence, the metric, axial strain, and stress across the height of the cross section are distributed nonlinearly. The distribution of stress is shown next to the deformed configurations and compared with the classic linear distribution. Evidently, the intrados stress is greater, and the extrados stress is lesser than the equivalent linear stress. Due to the small extension of beam axis, the ends of the beam overlap for $LPF=0.5$ and $LPF=1$. This overlap for $LPF=0.5$ is zoomed in Fig.~\ref{fig:mainspring: deformed configurations}b. Furthermore, due to the axial strain of the beam axis, it is necessary to include the influence of flexural strain when calculating the normal section force \cite{2018borkovicb}. To examine this effect, 40 elements are used for a model with $n=1$ and $Kh=0.25$, and the influence of both axial and flexural strains is observed. All five constitutive models are employed and the results are presented in Fig.~\ref{fig:mainspring: normal force}. \begin{figure} \includegraphics[width=\linewidth]{Figure8.png} \caption{Cantilever beam. Comparison of normal force and its contributions by axial and flexural strain for different constitutive models. The resulting normal force is zoomed on all the graphs. } \label{fig:mainspring: normal force} \end{figure} Clearly, the normal force oscillates, but with negligible amplitude. We see that the axial strain gives tension while flexural strain results in compression force. For the $D^a$ model, these contributions have nearly equal absolute values and the normal force oscillates around zero. The result is similar for the $D^3$ model, the normal force oscillates about the value close to 0.1. For the $D^2$ model, the error becomes pronounced since the normal force oscillates around approximately 9.3. Due to the fact that the influence of flexural strain on normal section force is disregarded in the $D^1$ model, the only contribution to the normal force comes from the axial strain, which oscillates around zero for this model. This result is considered accurate, but it stems from the fact that the two errors have canceled each other out. I.e. the dilatation is erroneously obtained as near zero, and the influence of the flexural strain is disregarded. These two approximations gave the correct value of normal force. Finally, the $D^0$ model gives a completely inaccurate result. For this model, the axial strain is negative and there is no contribution from the flexural strain. \subsubsection{Test of the algorithms for the update of internal forces} The simplicity of this example is ultimately utilized in testing the algorithms for the update of internal stress. Three approaches are considered: (i) the current stress is calculated from the total strain, (ii) the current stress is calculated by \eqqref{eq:linearization of stress} with the first order approximation of adjustment term, and (iii) the current stress is calculated by \eqqref{eq:linearization of stress} with the zeroth order approximation of adjustment term. These approaches are designated as $F1$, $F2$ and $F3$, respectively, and they are elaborated in Appendix A. The physical normal force, derived in \cite{2018borkovicb}, is: \begin{equation} \label{eq:n force phis} N=E\ii{A}{}{0} \ii{\epsilon}{}{(11)} - \frac{1}{2} E \ieq{I}{}{} \chi, \end{equation} where $\chi$ is the change of curvature with respect to the Frenet-Serret frame of reference \cite{2018borkovicb, 2020radenkovicb}. From the condition of pure bending ($N=0$), we can calculate the exact physical axial strain of beam axis as: \begin{equation} \label{eq:n exact strain og beam axis} \ii{\epsilon}{}{(11)} = \frac{\ieq{I}{}{} \chi}{2A_0}, \end{equation} since $\chi=K = LPF \left( 2 n \pi \slash L \right)$ for this example. This exact value of axial strain is compared with the results obtained with three different numerical approaches for the calculation of internal forces, Fig. \ref{fig:mainspring: mainsptring strain}. \begin{figure} \includegraphics[width=\linewidth]{Figure9.png} \caption{Cantilever beam. Comparison of relative errors of axial strain of beam axis for three algorithms for the update of internal forces. Four values of curviness are considered: a) $Kh \approx 0.06$, $Kh \approx 0.13$, $Kh \approx 0.25$, $Kh \approx 0.50$. } \label{fig:mainspring: mainsptring strain} \end{figure} For the first load increment, which is 0.05 here, the internal forces are calculated in a same way for all algorithms. Interestingly, for the model with $Kh\approx0.06$, all three algorithms return the same result as \eqqref{eq:n exact strain og beam axis} for $LPF=0.05$. The $F1$ approach gives the most accurate results and this is also approach utilized in all present examples. The $F2$ algorithm can be successfully employed, however, for those beams with moderate curvature. The algorithm $F3$ is not recommended since it gives large errors, even for the small values of curviness. Inevitably, both $F1$ and $F2$ algorithms give erroneous results as the curviness and strain increase. \clearpage \subsection{Lee's frame} This example is also well-established in the literature in the context of nonlinear analysis of in-plane beams \cite{1986schweizerhof, 2016huang, 2018rezaiee-pajand}. The frame consists of two rigidly connected beams and the displacement components at the point of force application are observed, Fig.~\ref{fig:lee frame: disposition and eq path}a. Each beam is discretized with five quartic $C^1$ elements. \begin{figure}[t] \centering \includegraphics[width=0.975\linewidth]{Figure10.png} \caption{Lee's frame. a) Geometry and applied load. b) Comparison of the equilibrium paths for two characteristic displacement components using developed models and \cite{2020vo}. } \label{fig:lee frame: disposition and eq path} \end{figure} The results obtained with the presented models are given in Fig.~\ref{fig:lee frame: disposition and eq path}b and they are in full agreement with those from literature \cite{2020vo}. This is expected because the maximum curviness in this example is local and less than 0.1. In order to examine the influence of curviness on this structure, the height of the cross section is multiplied by 2.5 ($h_1=0.05$) and 5 ($h_2=0.1$), and the obtained examples are designated as $LF1$ and $LF2$, respectively. The example with the original height, $h=0.02$, is labeled $LF$. The equilibrium paths for the examples with increased height are shown in Figs.~\ref{fig:lee frame: h=2.5x0.02} and \ref{fig:lee frame: h=5x0.02}, while the curviness at three characteristic sections is given in Fig.~\ref{fig:lee frame: curviness}. It is evident that the curviness at these sections follows similar path for both observed examples. The difference in the value of curviness practically equals the difference in cross section heights. The maximum curviness for $LF1$ is $Kh \approx 0.23$, while for $LF2$ it is $Kh \approx 0.46$. \begin{figure}[b] \includegraphics[width=\linewidth]{Figure11.png} \caption{Lee's frame. Equilibrium paths for the frame $LF1$ using five different constitutive models: a) complete equilibrium path, b) zoomed parts of the equilibrium path. } \label{fig:lee frame: h=2.5x0.02} \end{figure} \begin{figure}[h] \includegraphics[width=\linewidth]{Figure12.png} \caption{Lee's frame. Equilibrium paths for the frame $LF2$ using five different constitutive models: a) complete equilibrium path, b) zoomed parts of the equilibrium path. } \label{fig:lee frame: h=5x0.02} \end{figure} \begin{figure}[h] \includegraphics[width=\linewidth]{Figure13.png} \caption{Lee's frame. Curviness at three characteristic sections for the frames with increased height of cross section: a) case $LF1$, b) case $LF2$. } \label{fig:lee frame: curviness} \end{figure} In the context of the structural response of these frames, all constitutive relations return similar results in the case of $LF1$. inspecting the zoomed equilibrium path for the component $v_A$ allows us to estimate the difference between $D^a$ and $D^0$ models which is close to $0.2 \% $ for $LPF=1$, see Fig.~\ref{fig:lee frame: h=2.5x0.02}b. For the $LF2$ example, the discrepancies are more noticeable. The largest difference between $D^0$ and $D^a$ models is near $0.8 \% $ at the final configuration while the results returned by the $D^2$, $D^3$, and $D^a$ models are virtually indistinguishable. Although the maximum curviness for the examples with increased cross section height is large, the difference between displacements obtained by different constitutive models is significantly lower in comparison with the previous example, Fig.~\ref{fig:mainspring: displacement relative difference}. This is mainly due to the fact that the maximum curviness of Lee's frame is local, while in the previous example it was constant along the whole beam and, therefore, more impactful on the structural response. This local character of the maximum curviness is underlined in Fig.~\ref{fig:lee frame: def config} where the deformed configurations for $LF1$ and $LF2$ are displayed for three $LPF\textnormal{s}$. Moreover, the rotations of adjacent sections at the joint of patches match, which confirms the correct application of the constraint equation. Finally, the stress at the section $B$ is considered in Fig.~\ref{fig:lee frame: stress}. The constitutive model $D^a$ is utilized for the calculation of displacements and reference strains. Then, two expressions for the distribution of stress are utilized: (i) the exact one, based on Eqs.~\eqref{eq:final form of eq strain} and \eqref{eq:stress strain relation}, and (ii) the linear one, based on the same equations but with $K=0$. These distributions are shown below the equilibrium paths for the stress at outer fiber in Fig.~\ref{fig:lee frame: stress}. It is clear that, the exact stress distribution should be utilized in a post-processing phase even for structures with a maximum local curviness less than 0.1, such as the original example $LF$. The difference of extreme stresses between the exact and the linear stress distributions is close to $13 \%$ for the $LF$ example. As the curviness increases, this error becomes more pronounced. \begin{figure}[h] \includegraphics[width=1.\linewidth]{Figure14.png} \caption{Lee's frame. Deformed configurations of structures with increased height for three values of $LPF$: a) case $LF1$, b) case $LF2$. } \label{fig:lee frame: def config} \end{figure} \begin{figure}[h] \includegraphics[width=\linewidth]{Figure13x1.png} \caption{Lee's frame. Stress at the outer fiber at the section $B$ vs. $LPF$ (above), and the distribution of stress across the cross-section height (bellow) for designated points on equilibrium path: a) case $LF$, b) case $LF1$, c) case $LF2$. } \label{fig:lee frame: stress} \end{figure} \clearpage \subsection{Multi-snap behavior of a parabolic arch} The final example deals with the nonlinear response of a parabolic arch depicted in Fig.~\ref{fig:multi1}a. \begin{figure} \includegraphics[width=\linewidth]{Figure15.png} \caption{Parabolic arch. a) Geometry and applied load; b) Signed curviness vs. $LPF$ for $R4$ case. } \label{fig:multi1} \end{figure} The arch is simply supported and loaded with the vertical force at the apex. For shallow arches, the snap-through phenomenon occurs after which the structure reaches a stable equilibrium and shows stiffening behavior. However, for deeper arches, a multiple snap behavior can be expected \cite{1973sabir, 1978harrison, 1990clarke, 1990yang, 2017radenkovic}. The aim of this example is to show that the present formulation is capable of describing highly-complex responses of arbitrarily curved structures. Furthermore, we discuss a physical reasoning behind the observed behavior \cite{1973sabir}. We consider four parabolic arches labeled $R1$, $R2$, $R3$, and $R4$. They differ in rise $f$ and the magnitude of the applied load $P$, as detailed in Fig.~\ref{fig:multi1}a. Due to the symmetry, one half of the arch is modeled with 16 cubic $C^2$ elements. As a guiding solution, we use an Abaqus simulation, which employs about 30 straight cubic B23 elements \cite{2009smith}. It is worth noting that Abaqus could not converge with denser meshes. Fig.~\ref{fig:multi1}b shows the signed curviness at the apex for the beam with the largest curvature, i.e., R4. The graph is interesting due to the multiple limit points. The important fact to note is that the maximum local curviness of this beam is lower than 0.1. For the $R1$ case, a relatively simple structural response is obtained, and the equilibrium path for $v_s$ is shown in Fig.~\ref{fig:multi2}a. \begin{figure}[b!] \includegraphics[width=\linewidth]{Figure16.png} \caption{Parabolic arch. Equilibrium paths for: a) $R1$ case, and b) $R2$ case. } \label{fig:multi2} \end{figure} As the rise increases to 0.5 m, one snap-back occurs, Fig.~\ref{fig:multi2}b. Since these two arches have curviness less than 0.025, only the results obtained with the simplest, $D^0$, and the most elaborated, $D^a$, models are displayed. They agree well for almost the complete equilibrium path while negligible discrepancies can be observed at the load limit points. Also, the results for the $R1$ case are practically indistinguishable from those obtained by Abaqus. Regarding the $R2$ case, small differences occur at the load limit points. As the rise increases further, the arch behavior becomes more complex and multiple snaps occur, see Fig.~\ref{fig:multi3}. \begin{figure} \includegraphics[width=\linewidth]{Figure17.png} \caption{Parabolic arch. Equilibrium paths for: a) $R3$ case, and b) $R4$ case. } \label{fig:multi3} \end{figure} Since the results for the different constitutive models are in good agreement, it can be concluded that the influence of the curviness is not significant for these arches. However, an inspection of the equilibrium paths near the load limit points reveals that a difference between the present approach and the B23 element discretization exists, which increases with the curviness and complexity of the equilibrium path. The results obtained by the $D^3$ and $D^2$ models are practically identical to those of the $D^a$ model. Furthermore, the models $D^0$ and $D^1$ deviate slightly from these results in the vicinity of limit points, especially for the $R4$ case. It is noteworthy that all models return the same final deformed configuration. In order to analyze this multi-snap phenomenon more thoroughly, the eight different deformed configurations of the $R4$ case at $LPF=0$ are given in Fig.~\ref{fig:multi4}. \begin{figure} \includegraphics[width=\linewidth]{Figure18.png} \caption{Parabolic arch. Deformed configurations of $R4$ case for $LPF=0$. } \label{fig:multi4} \end{figure} It can be seen that these configurations are similar to the buckling/vibration eigenmodes of a simple straight beam. In particular, the configurations designated with $a$, $b$, $c$, and $d$ resemble the $3^{rd}$, $5^{th}$, $7^{th}$, and $9^{th}$ beam eigenshape, respectively. Each of these configurations is stiffer than the previous one and the absolute value of load limit points increases as well. After configuration $d$, which is seemingly straight, the arch cannot generate any more half-waves and starts to release accumulated strain energy. Hence, the point $d$ in Fig.~\ref{fig:multi4} approximately represents an inflection point of the equilibrium path. After this the load limit points decrease and the arch passes through all the previous configurations in reverse order. Finally, a stable equilibrium branch is reached after the last load limit point. It should be noted that this multi-snap behavior depends heavily on the imposed conditions of symmetry. In reality some small perturbations would probably exist in either the force position or the geometry, which would result in a simpler response \cite{1978harrison}. The detected behavior is further investigated by observing the normal force at the apex. The applied forces for all cases are scaled in relation to the largest one. Fig.~\ref{fig:multi5} illustrates the resulting equilibrium paths and marks the values of $3^{rd}$, $5^{th}$, $7^{th}$, and $9^{th}$ critical buckling loads of a simply supported, axially loaded beam with length $L$. \begin{figure} \includegraphics[width=\linewidth]{Figure19.png} \caption{Parabolic arch. Normal force at the apex for all considered cases. Critical buckling forces and estimated maximum normal compression forces $\left( \textnormal{EA}_0 \textnormal{e}_{\textnormal{Rn}} \right)$ are marked by arrows.} \label{fig:multi5} \end{figure} Additionally, an estimate of the maximum possible axial strain of the beam axis is taken into consideration by calculating the initial length of the parabolic arch $\idef{L}{}{}$ and by finding the Green-Lagrange strain: \begin{equation} \ii{e}{}{Rn}=\frac{\idef{L}{2}{n}-10^2}{2 \cdot 10^2}. \end{equation} This is the strain of the parabola which deforms into a straight line. Multiplication of this strain with the axial stiffness $EA_0$ gives an estimate of a maximum normal compression force that can be generated in these arches due to the considered applied load. These forces are also designated in Fig. \ref{fig:multi5}. The number of half-wavelength forms that an arch can attain during this symmetric snapping is limited. This limit is directly influenced by the length of the arch and the critical buckling forces of a simple straight beam with length $L$. To summarize, the arch $R4$ cannot make the $11^{th}$ eigenshape, since its maximum axial strain cannot generate the normal force that is large enough to snap the beam into this mode. The analogous conclusion is valid for all observed cases. When there are no more new stable forms to reach, the curvature of equilibrium path changes sign and the arch goes through all these configurations in reverse, until it finds the stable form. A similar discussion takes place in \cite{1973sabir}, where the rise, thrust and flexural stiffness are identified as the causes for multi-snap behavior of circular arches. However, the graphical description given in Fig. \ref{fig:multi5} provides additional insight into the nature of the phenomenon. \section{Conclusions} A rigorous metric of the plane BE beam is utilized consistently for the derivation of the weak form of the equilibrium. The spatial discretization of the virtual power is performed by IGA. The introduction of the full beam metric provides a higher-order accurate BE beam formulation. Four simplified models are derived in addition to the exact constitutive relation. The comparison of these models via numerical examples allows a detailed analysis of the influence the formulation components have and of the most importance, the beam's curviness. The present formulation is geometrically exact, rotation-free, and fully capable of dealing with complex responses of multi-patch structures. The results show that, in order to correctly determine the axial strain at the centroid of a curved beam, a rigorous computational model must be employed. For beams with curviness $Kh<0.1$, the simple decoupled equations return reasonably accurate results for the displacement field. As the curviness increases, its influence becomes noticeable and as a result a more involved and complex model is required. An important factor is the domain where the strong curviness exists. If this is relatively local, its influence on the global response will not be as significant as when large portions of the structure are strongly curved. Regardless of the constitutive model, utilizing the exact expressions for the equidistant strains and stresses is recommended, since these have a nonlinear distribution and this even for beams with a small curvature. The inclusion of these expressions in a post-processing phase is a simple method for improving accuracy. A phenomenon of multi-snap behavior of a parabolic arch is revised and elaborated. The arch accumulates strain energy and deforms into the configurations that resemble the eigenmodes of a straight beam. After the limit eigenshape is reached, the arch releases the accumulated strain energy and finds a stable equilibrium branch. An interesting direction for future research is the application of the proposed formulation to the statics and dynamics of spatial beams. \section*{Acknowledgments} During this work, our beloved colleague and friend, Professor Gligor Radenkovi\'{c} (1956-2019), passed away. The first author acknowledges that his unprecedented enthusiasm and love for mechanics were crucial for much of his previous, present, and future research. We acknowledge the support of the Austrian Science Fund (FWF): M 2806-N. \section*{Appendix A. Update of internal forces - fix formula} \setcounter{equation}{0} \renewcommand\theequation{A\arabic{equation}} Due to the effect of curviness, the update of internal forces requires special attention. In order to add the increment of stress as in \eqqref{eq:linearization of stress}, the cumulative stress from the previous configuration must be adjusted to the metric of the current configuration, as discussed in Section 4.1. After the addition, the stress is integrated and the stress resultant and stress couple are obtained. First, let us find the relation between previously calculated stress with respect to two configurations. By assuming that the unit tangent vector of the beam axis does not change its direction significantly between configurations $(n)$ and $(n+1)$, we obtain: \begin{equation} \label{eq:traction} \iiieq{\bm{t}}{(n)}{}{}{} = \left( \iiieq{\sigma}{(n)}{(n)}{11}{} \: \iiieq{\bm{g}}{(n)}{}{}{1} \otimes \iiieq{\bm{g}}{(n)}{}{}{1} \right) \frac{\iiieq{\bm{g}}{(n)}{}{}{1}}{\sqrt{\iiieq{g}{(n)}{}{}{}}} \approx \left( \iiieq{\sigma}{(n)}{(n+1)}{11}{} \: \iiieq{\bm{g}}{(n+1)}{}{}{1} \otimes \iiieq{\bm{g}}{(n+1)}{}{}{1} \right) \frac{\iiieq{\bm{g}}{(n+1)}{}{}{1}}{\sqrt{\iiieq{g}{(n+1)}{}{}{}}}. \end{equation} This assumption allows us to write the required relation as: \begin{equation} \label{eq:traction1} \iiieq{\sigma}{(n)}{(n)}{11}{} \: \iiieq{g}{(n)}{}{}{} \approx \iiieq{\sigma}{(n)}{(n+1)}{11}{} \: \iiieq{g}{(n+1)}{}{}{} \implies \iiieq{\sigma}{(n)}{(n+1)}{11}{} \approx \frac{(\iii{g}{(n)}{}{}{0})^2 \: \iii{g}{(n)}{}{}{}} {(\iii{g}{(n+1)}{}{}{0})^2 \: \iii{g}{(n+1)}{}{}{}} \: \iiieq{\sigma}{(n)}{(n+1)}{11}{}. \end{equation} The adjustment term next to $\iiieq{\sigma}{(n)}{(n+1)}{11}{}$ consists of the ratio of the initial curvature correction factors at two configurations which makes it inappropriate for exact integration in nonlinear beam analysis. Therefore, some approximation is required. The first order Taylor approximation of this ratio yields: \begin{equation} \label{eq:traction2} \left( \frac{\iii{g}{(n)}{}{}{0} } {\iii{g}{(n+1)}{}{}{0} } \right) ^2 =\left( \frac{1-\eta \iii{K}{(n)}{}{}{}}{1-\eta \left( \iii{K}{(n)}{}{}{} + \iii{\chi}{(n+1)}{}{}{} \right)} \right)^2 \approx 1+ 2\eta\iii{\chi}{(n+1)}{}{}{}, \end{equation} where $\iii{\chi}{(n+1)}{}{}{}$ is the change of curvature in the current increment with respect to the Frenet-Serret frame of reference. With this approximated adjustment term, we can perform the integration, but the higher order terms with respect to $\eta$ must be disregarded. By this means the energetically conjugated section forces from the previous configuration are adjusted to the metric of the current configuration using Eqs.~\eqref{eq: rates of section forces}, \eqref{eq:traction1}, and \eqref{eq:traction2}: \begin{equation} \label{eq: update of sf} \begin{aligned} \iiieqt{N}{(n)}{(n+1)}{}{} &\approx \left(1+ 2\eta\chi \right) \iiieqt{N}{(n)}{(n)}{}{} \approx \iiieqt{N}{(n)}{(n)}{}{} - 2 \chi \iiieqt{M}{(n)}{(n)}{}{}, \\ \iiieqt{M}{(n)}{(n+1)}{}{} &\approx \iiieqt{M}{(n)}{(n)}{}{}. \end{aligned} \end{equation} Evidently, the energetically conjugate bending moment does not require adjustment, while the normal force does. This approach for the update of internal forces is the rational one, since the integration across the cross section should be avoided at each increment. An alternative method, that proved even more accurate in this research, is to calculate the internal forces from the total strain and the current constitutive matrix. However, this approach is not theoretically sound since the linear constitutive relation is valid only for the increments of strain and stress. Nevertheless, if the strains are not large, the results in Section 5 suggest that this approach can return acceptably accurate results. As noted previously, the latter approach is designated as $F1$ and former one as $F2$. Additionally, an incremental approach for the update of internal forces without any adjustment of previously calculated forces is implemented and marked as $F3$. When observing the \eqqref{eq:traction2}, it can in fact be considered as the zeroth order approximation. The results of these three approaches are compared in Subsection 5.1.4.
\section{Introduction}\label{sec:introduction} The current context of World Globalization has raised many difficult problems regarding the transportation of goods. The products are hauled over large distances of land and water, and more often get to travel by more than one means of transport: by ships, planes, trucks (see ~\cite{van2000congestion}); all these lead to the Multimodal Transportation Systems (MMTS). In contrast with classical, single mean transportation, multi-modal transportation has multiple constraints, for example in ~\cite{litman2017introduction}, different optimization processes as parcel loading, and transfer between transports. In another context, of today's global warming and increased pollution, it's a necessity to also globally lower gas emission. The environmental goal correlated with the economical performance could be reached through several ways including an optimized transport planning and using appropriate resources. In~\cite{SteadieSeifi} literature review on Multimodal freight transportation planning, several strategic planning issues within multi-modal freight transportation and tactical planning problems are shown. Complex operational planning for real-time requirements of multimodal operators, carriers and shippers, not previously addressed at strategic and tactical levels, are described. The main models with related solvers and proposed future research are included. A detailed review, with an analysis of the optimization-based decision-making models for the problem of {\it Disaster Recovery Planning of Transportation Networks (DRPTN)} is provided by ~\cite{Zamanifar}. The authors described the phases of optimization-based decision-making models and investigate their methodologies. Nevertheless the authors identify some challenges and opportunities, discussed research improvement and made suggestions for possible future research. A recent systematic review about dynamic pricing techniques for {\it Intelligent Transportation System (ITS)} in smart cities was published by~\cite{SaharanBK20}. The authors included existing ITS techniques with pertinent overviews and discussions about problems related to electric vehicles (EVs) used for reducing the peak loads and congestion, respectively increasing mobility. The current work overviews the multimodal transport. Section~\ref{sec:whatismultimodal} presents prerequisites related to the multimodal transport and the context around it. Follows the section~\ref{sec:challenges} presenting the characteristics and the challenges related to the transport. Further on, methods of planning (section~\ref{sec:planning}) and optimization (section~\ref{sec:optimization}) in terms of time (section~\ref{sec:timeopt}), cost (section~\ref{sec:costopt}) and network topology (section~\ref{sec:netopt}). Existing unimodal transport models and solver with possible future extension to multimodal features are included in section~\ref{sec:theoretical}. Section~\ref{sec:conclusions} draws the important conclusions about multimodal transport. \medskip \section{What is Multimodal Transportation?}\label{sec:whatismultimodal} The multimodal transport is defined by the UN Convention on International Multimodal Transport of Goods as follows. \medskip \noindent{\bf Definition}\cite{peplowska2019codification}\label{clas} The {\it multimodal transport} is the transport of goods from one place to another, usually located in a different country, by at least two means of transportation. \medskip \noindent{\bf Mathematical formalization.} The transportation problem was first formalized by~\cite{monge} and extended by~\cite{kantor}. Today there are mathematical optimization techniques as for example Newton, Quasi-Newton methods and Gauss-Newton techniques already used or to be further used in relation with transportation e.g. in assignment models to calibrate the traffic and transit; see: ~\cite{karballaeezadeh2020intelligent,ticalempirical,kamel2019integrated}. \newpage \noindent{\bf Optimization.} A classical transportation of goods implies direct links and one mode of transportation, a shortest path route, from a sender to a receiver of goods, see ~\cite{zografos2008algorithms}; the multimodal transport, implies complex links and more than one mode of transportation. Optimization of classical transportation routes is fairly easy and intensely studied topic. State-of-art algorithms already exist, like Dijkstra's Algorithm (see~\cite{jianya1999efficient}), or Clarke-Wright technique as in~\cite{golden1977implementing}. These approaches use a single mean of transport, with a single warehouse and one or more clients (or receivers). \bigskip \noindent{\bf Real-life scenarios.} In the complex reality, goods can be transported in any direction, for example inside a country there are couriers delivering from any side of a country to another side; using just trucks to perform a complete task would be impossible, as the problem has $O(n^2)$ complexity for $n$ cities to reach. Optimizing this case meant designing a system with a central warehouse or hub, where all the goods are unloaded, sorted according to the destination and finally loaded on the respective trucks and dispatching them towards the destination. This optimization alone reduces the required number of trucks (the same truck makes a round trip from each city to the central hub)~\cite{zhang2013optimization}. But what about the {\it larger countries}, or about {\it international transport}? The multimodal transportation has the advantage of moving a huge amount of goods, in the hundreds of thousands of tons at once, via large ships, over very large distances. \section{Characteristics and challenges of Multimodal Transportation}\label{sec:challenges} This section focuses on the challenges of the multimodal transportation, both for {\it passengers} (Section~\ref{sec:passengers}) and {\it freight} (Section~\ref{sec:freight}). The majority of received goods are moved with many transportation modes, e.g. ships, airplanes, trucks. In the first stages of the transport, the sorting hubs aggregate all the goods from different senders, establish their destination and assign them a way of dispatch. Routes may be calculated at this step to assess the most economical ones, both in cost and time. Goods with the same route are grouped and loaded on the same shipment mode. Direct {\it consequence}: when reaching the end of a route with each transportation mode there must be a sorting/dispatching hub. These operations of unloading, sorting, grouping and dispatching are repeated at every hub and with a highly time consuming action. As a consequence, the intermediate hubs have to be very organized so as to limit the time spent in that point, and also their number has to be kept low enough. As an disadvantage, the very large number of shipping hubs will dramatically increase the transport cost, due to the number of units of transport used. \indent Based on these features, several challenges arise: How can we make shipping from A to B cheaper, quicker, and with the least environmental impact? How can we calculate the optimum number of hubs with maximum benefits? What is the optimal way of transporting goods between hubs while avoiding their weaknesses? \subsection{Models \& Solvers.} \smallskip \noindent $>$ {\bf Real-life scenarios.} \smallskip \indent -- {\bf HAZMAT: transport Security Vulnerability Assessment (SVA)} by~\cite{reniers2013method}. The hazardous materials HAZMAT transport SVA assess the relative security risk levels of the different modes of hazardous freight transport models, e.g. road, inland waterways, pipelines or railway. The policymakers could use this tool to assess the user-friendly security in multi-modal transport. The HAZMAT model follows: \begin{itemize} \item[-] The routes are split into smaller segments. \item[-] The probability scores of security-related risks in which dangerous freight is involved and possibly causing fatalities in the surrounding population, are determined for each segment. \item[-] The impact of injury scenarios are computed in terms of the number of people within the 1\% lethal distance of the incident center. \item[-] Based on these probability and impact scores, transport route security risk levels are determined. \item[-] The transshipment risks are considered for determining the final transport route security risk levels. \end{itemize} The inter-modal risk is determined on the minimum security risk path, considering only the risks of the individual segments of a transport route and include also the number of intermodal transshipment. The risk with the transshipment is defined as: $R_t = R_{nt}(1 + x(nts))$ where $R_t$ is the security with the transshipment, $R_{nt}$ is the security risk without transshipment, $x$ is the weight factor for importance of transshipment risks, compared with the transportation risks and $nts$ is the number of transshipment. The model was implemented with CPLEX studio and OPL; it was successfully tested on two multimodal networks with highways and railways. \smallskip \indent -- {\bf New Delhi, Indian busy urban area MMTS} by~\cite{kumar2013performance}. In 2021 the Delhi population will be around 23 million, therefore public transit should be integrated. In~\cite{kumar2013performance} MMTS focuses on reducing congestion on roads and improving transfers and interchanges between modes. Delhi`s public transport will grow from a 60\% of the total number of vehicular trips to at least at 80\% in 2021; 15 million trips per day by 2021 in the Integrated Rail-cum-Bus Transit, plus 9 million with other modes are estimated. The Delhi public transport model is illustrated, evaluated and its performance is discussed in~\cite{kumar2013performance}. \medskip The {\bf performance} of the MMTS is quantified using the following measures. \begin{itemize} \item[-] {\it Travel Time Ratio (TTR)}: a large TTR value leads to a less competitive public transport, e.g. $TTR\in [1,5]$; \item[-] {\it Level of Service (LS)} is a ratio of Out-of-vehicle Travel Time (OVTT) to In-Vehicle Travel Time (IVTT); a large LS measure leads to a less attractive public transport, e.g. $LS\in [1.2,5.0]$; \item[-] {\it Inter-connectivity Ratio (IR)} is the ratio of access and egress time to the total trip time; $IR\in [0,1]$; \item[-] {\it Passenger Waiting Index (PWI)} is the ratio of mean passenger waiting time to transport services' frequency; the number of boarding passengers is less or equal with the available space in the transport mode; $PWI\in [0,1]$; \item[-] {\it Running Index (RI)} is the ratio of total service time to total travel time; a large RI leads to a decreased efficiency of the system; $RI\in [0,1]$; \end{itemize} In particular, for the New Delhi case study: $TTR=1.3$ shows a competitive public transport; LS, the mean $OVTT/IVTT > 1$ thus people spend more time out-of-vehicle than in-vehicle; $IR\in [0.2,0.5]$ value shows that inter-connectivity between transportation modes should be improved; $PWI=0.825$ for the Metro is recommended as the mean passenger waiting time is similar with Metro's frequency; $RI=0.7681$, indicates that passenger satisfaction should be improved. \indent -- {\bf ARKTRANS. The Norwegian MMTS framework architecture} by ~\cite{natvig2006arktrans} and \cite{natvig2010flexible}. The framework offers an overview of all the major systems running in Norway that will hopefully further contribute to new and improved solutions. The transport, whether on sea, air or railway, have similar needs and challenges with respect to communication, information, management, planning and costs. Furthermore the main {\bf MMTS specifications} of the ARKTRANS frameworks that could be a guide for other similar frameworks. \begin{itemize} \item[-] A reference model with detailed sub-domains and the roles of the stakeholders; \item[-] A functional view with detailed functionality of sub-domains; \item[-] A behavior view with detailed scenarios \& interactions between sub-domains; \item[-] An information view with detailed models for freight transport \& MMTS route information; \end{itemize} The detailed technical aspects conclude this list. A beneficent interaction within all MMTS process leads to an efficient multimodal transport framework. Overall conclusions specify that MMTS is especially suited for long distances; a major MMTS feature is the total travel time; the access, egress and transfer times could be reduced if there will be integrated MMTS, e.g. park and bicycles facilities, and card access on transit systems. {\bf Other Frameworks.} Frameworks for multimodal transport security and various policy applications are described in details in the book of~\cite{szyliowicz2016multimodal}. Other related {\it frameworks and security challenges}, for both passengers and freight and security and policy applications around the world are analyzed in the book of~\cite{wiseman2016multimodal}. \subsection{Passenger Multimodal Transportation}\label{sec:passengers} \noindent $>$ {\bf Theoretical approaches.} \smallskip \indent -- Designs for chains and networks by~\cite{bockstael2003chains}. As the author describes it "The objective of this research is: Develop a design approach for improving inter-organizational multimodal passenger transport systems from a chain perspective". The article raises some interesting aspects, like balancing the positive and negative impacts of mobility, a holistic approach for modes of transportation not necessarily reducing the number of kilometers for passengers, but improving the number of vehicle-kilometers, resulting in a more efficient usage of the resources (infrastructure, fuel). \smallskip \indent -- {\bf A highly conceptual approach} by~\cite{chiabaut2015evaluation}. It is applied to a very idealized network. The authors aim to combine different transport modes by extending the concept of Macroscopic Fundamental Diagram (MFD) and therefore, the efficiency of the global transportation system can be assessed. This approach can be applied to a wide range of cases. Although it is an idealized analysis, it provides knowledge about how to compute the overall performance of a multimodal transportation network and methods to compare different traffic management strategies. \medskip \subsection{Models \& Solvers.} \smallskip \indent $>$ {\bf Real-life scenarios.} \smallskip \indent -- {\bf A multiobjective linear programming model for passenger pre-trip planning in Greece} by~\cite{aifadopoulou2007multiobjective}. As a case study the trips in Greece using public transport, an integrated web based information gateway was studied. The introduced algorithm (with polynomial complexity) computes the compatibility of various modes based on user preferences, respectively intermodal stations, and identifies the feasible paths. It was structured for checking and certificate optimality; validation on how constrains impacts the computational complexity linear was made; it focuses on a decomposition strategy. Hub selection is significant for compatibility and viability of MMTS; it leads to identify parameters in order to increase compatibility of MMTS services and fees. \medskip \indent -- {\bf A detailed analysis of the Rhein-Ruhr area} by~\cite{schonharting2003towards}. The authors identified the {\it Rhein-Ruhr area} as a network of corridors (or mega-corridor). Good practices are featured and analyzed with the aim of putting the {\it Rhein-Ruhr area} on the "map" of good examples to follow. \medskip \indent -- {\bf A "waiting time model": case study Tunisian Great Sahel} by~\cite{bouzir2014modeling}. The model based on multiple variables, was developed in order to optimize waiting times in stations. A case study was based on a survey in the Tunisian Great Sahel. Multiple Correspondence Analysis (MCA) and the General Linear Model were technically used. The new model depends on the following features: the travel cost, purpose and frequencies while using MMTS, and is based on the age of respondents. \medskip The main results of the case study follows. \begin{itemize} \item[-] The MMTS combination including bus \& tram need a longer waiting time than other transportation modes; \smallskip \item[-] Young people waits longer for transport services; they use public transport more often than workers; vacationers wait more than daily passengers; \smallskip \item[-] MMTS trips including waiting time of taxis is shorter when two transport services are included; \newpage \item[-] The semi-collective transportation seems beneficent as reduces waiting time; the semi-public transport with just an transportation mode e.g. taxi cancels reduced waiting time; \item[-] The travel cost has a major influence in the overall waiting time. \end{itemize} The waiting time within public transportation has a direct consequence in the quality of the transportation service. \smallskip \indent -- {\bf TRANSFER model-multimodal network in large cities} by~\cite{carlier2005transfer}. The model, was introduced for analysis of the multimodal network in large cities, as well as route generation. Building Park and Ride (P\&R) keeps automobiles outside city center. More P\&R locations are planned for car drivers as they could park here and further transfer to public transport to further arrive in city centre. The main advantage is making public and/or alternative transport more appealing to passengers. As any other model, it could be successful if MMTS become more attractive than unimodal transport e.g.car-only trip. The access and egress are also quantified. Here, MMTS are represented as supernetworks where unimodal networks are interconnected by transfer links, the possibility of transfer and related time and costs. TRANSFER components include the following: \begin{itemize} \item[-] A multimodal route-set generation module based on network features and passengers preferences; \item[-] An assignment module to distribute transport flows among routes; \item[-] A path-size route-choice algorithm to avoid overlap among the routes in a route set. \end{itemize} The superbuilder tool was developed, combining some unimodal networks \& transfer data in order to generate a multimodal supernetwork with features of unimodal networks and most relevant transfer possibilities. \indent-{\bf Transfer points with specific features} by~\cite{sun2015characterizing}. The authors analyzes age-related transfer speed, the effect of the time of day, the effect of a single person in relation to others, crowding and the use of smart cards. The authors detailed the following: passenger behavior related to transfer between MTTS modes; correctness of data in order to make a feasible model for passenger transport when complex real-world configurations are provided; efficiently use Smart card data within MMTS. An overall conclusion includes the fact that passengers are faster in the morning no matter if it is crowded or not; children and seniors transfer slower than adults but children outperforming adults through overpasses; further models will have to support pedestrian behaviors and convenient facility design. \subsection{Freight Multimodal Transportation}\label{sec:freight} \smallskip \indent $>${\bf Real-life scenarios.} \smallskip \indent -- {\bf A case study for least-developed economies} where different problems arise, is presented by ~\cite{islam2006promoting} where the situation of Bangladesh is explored from the infrastructure point of view, as well as local bureaucracy. In order to evaluate an extent of integration of seaport container terminals in supply chains~\cite{panayides2008evaluating} define and develop specific measures. Optimizing the integration of said container terminals can improve the flow of freight, limiting time waste and delays. \medskip \indent -- {\bf A case study: shipments} focusing on a major iron and steel manufacturer from NW Australia and it's iron ore shipments to NE China, is presented by~\cite{potter2011multimodal}. They studied multiple routes and transport options and even punctual optimization (like congested traffic at a specific moment). Their studies suggest that for long shipments, port variations and inland transport variations have only marginal overall differences, so several combinations of transport and handling methods may successfully coexist. An counter-intuitive conclusion is that is the control of just a company for the entire supply chain, as the bulk cargo market is subject to frequent changes of the prices under global economic conditions. \medskip {\bf Others.} In~\cite{yuen2017barriers} Supply Chain Integration with barriers for the maritime logistics industry is discussed. The authors identified a list of barriers from interviews and literature reviews, but also from 172 surveys sent to container shipping companies. There were also identified five factors that cause most of these barrier. Collaborations are also discussed by~\cite{stank2001supply}. An integrated mathematical model of optimal location for transshipment facility in a single source-destination vessel scheduling and transportation-inventory problem was proposed by \cite{al-informatica}. The authors hybrid proposal find a set of cost-effective facility locations and using these locations reduce costs (e.g. daily vessels operations, chartering and penalties costs). \section{Multimodal Transport Planning }\label{sec:planning} Multiple facets of planning multimodal transport exists, making it more difficult. For example, in a large city, somebody might suddenly decide to engage in a long distance travel. This implies an \textit{ad-hoc} computation of the route and means of transport to be used, according to the individual personal preferences, e.g. not using metro system due to motion-sickness. Planning such a transport means using any available means \textit{at the specific time}; the factors to consider could include: time, cost, weather, waiting times in hubs, etc. What implies planning a diverse transport system for a large city? The designer must compute the available resources, the requirements and even the schedules / working hours of different companies. In the planning phase, the designer could suggest the transport means (buses, trams, etc) in order to obtain an economic and eco-friendly system. An Introduction in Multimodal Transportation Planning book was published by~\cite{litman2017introduction} in which he summarizes the basic principles for multimodal transportation planning for people. He studies transport options for pedestrians, like sidewalk design, bicycles, ride-sharing and public transit systems. He also has very good explanations for multimodal transport planning process, impacts to be considered and are often overlooked and different traffic models, like the Four-Step Traffic Model. \newpage \noindent The first stage of planning a multimodal transport system is to understand it's complexities. An complete and accurate model has to be created and analyzed. \smallskip \subsection{Models \& Solvers.} \smallskip \noindent $>$ {\bf Planning MMTS with uncertainties and limitations.} \smallskip \indent -- {\bf Fuzzy cross-efficiency Data Envelopment Analysis} by~\cite{dotoli2016technique}. The planning of efficient multimodal transports using a fuzzy cross-efficiency Data Envelopment Analysis technique is presented by~\cite{dotoli2016technique}. Other approaches like uncertainty conditions with complex traits and high discriminative power are described. They prove the effectiveness of their approach while studying the optimal transport planning and computing the boundaries of the multi-modal transport. In~\cite{sumalee2011stochastic} the multi-modal transport network with demand uncertainties and adverse weather condition includes formulation of the fixed point problem; other future and existing related development include works of ~\cite{cticalua2017approximating} and~\cite{xu2009multi}. \indent -- {\bf Metaheuristics for real-time decisions} by ~\cite{mutlu2017planning}. Planning part of multimodal transport with various limitations are reviewed by~\cite{mutlu2017planning}. They discuss problems like real-time decisions in the context of short-term planning, restructuring and re-configuring logistic strategies, and collaborative planning. Appropriate solution methods and intuitive meta-heuristic approaches to rapidly act upon changes are suggested. \noindent $>$ {\bf Passenger \& freight flows Planning Multimodal transport} \smallskip \indent -- {\bf Multi-Agents Systems for MMTS planning} by ~\cite{greulich2013agent}. As the name suggests, the implementation uses intelligent agents representing various stakeholders and considers the effects of passenger's behavior. \indent -- {\bf Genetic Local Search tested in the Java Island, Indonesia} by~\cite{yamada2007optimal}. The research revealed that a procedure based on {\it Genetic Local Search} outperforms in order to find the best combination of alternatives. \smallskip \noindent $>$ {\bf Multi-modal systems.} \indent -- {\bf A multimodal travel system} by~\cite{bielli2006object}. The authors focused on the network object modeling. This enables the use of the model for computing a shortest path while also integrating multimodal options. They also implement and test a solution for the problem of long-run planning in such systems. \indent -- {\bf Syncromodal Transport Planning} by~\cite{mes2016synchromodal}. It is a multimodal planning where the best possible combination of transport modes is selected for each package, is discussed in depth. The syncromodal algorithm is implemented in a 4PL service provider in the Netherlands and managed to obtain a 10.1\% cost reduction and a 14.2\% reduction in $CO_{2}$. \indent -- {\bf A multimodal transport path sequence: AND/OR graphs facilitate planning} by~\cite{wang2020modeling}. It is proposed a triple-phase generate route method for a feasible multimodal transport path sequence, based on AND/OR graphs. Energy consumption evaluates the multimodal transport energy efficiency. A biobjective optimization model for both energy consumption and route risk is solved with an ant-based technique. \noindent The research is limited by the graph complexity; the simulation shows valid and promising results. \medskip \noindent $>$ {\bf Traffic Flow Risk Analysis and Predictions.} \smallskip \indent -- {\bf Fuzziness approach for risk analysis} by~\cite{stankovic2020new}. A fuzzy Measurement Alternatives and Ranking according to the Compromise Solution, fuzzy MARCOS for Road Traffic Risk Analysis was proposed. The method defines reference points, determined relationships between alternatives \& fuzzy ideal/anti-ideal values and defined utility degree of alternatives in relation to the fuzzy ideal and fuzzy anti-ideal solutions. A case study on a road network of 7.4 km was made. The method supported multi-criteria decision-making, within uncertain environments and its results, in terms of risk, could be further used for improving road safety. Other similar efficient method used to cope with multi-criteria optimization is in by~\cite{multi-g-informatica}. As a plus, parallel processes, e.g.~\cite{parallel-g-informatica}, are effective to optimize objective functions. \indent -- {\bf A Best-worst method \& triangular fuzzy sets} by~\cite{moslem2020integrated}. It is used for ranking and prioritizing critical driver uncertain behavior criteria for road safety was studied. The case study uses data from Budapest city: on how drivers perceived road safety issues. \indent -- {\bf Intelligent transportation system-Bird Swarm Optimizer} by~\cite{zhang2020short}. It includes an Improved Bird Swarm Optimizer used to predict traffic flows; the prediction results are evaluated and accurate prediction is obtained; the model has positive significance to prevent urban traffic congestion. \medskip \section{Optimization of Multimodal Transport}\label{sec:optimization} \medskip {\par A distributed approach for time-dependant transport networks integrated in the multimodal transport service of the European Carlink platform and validated in real scenarios, was proposed by~\cite{galvez2009distributed}. A real-life validation is included for a specific route from a Belgian city Arlon, to Luxembourg.} \smallskip \noindent In the related mobile application implementation within MTS of the Carlink Platform, the requests are sent to the MTS and the users get the shortest path between two selected locations. A framework for selecting an optimal multi-modal route was designed by~\cite{kengpol2014development} based on a multimodal transport cost-model, $CO_{2}$ emissions and even the integrated quantitative risk assessment. This complex optimization targets to minimize transportation costs, transportation time, risk and $CO_{2}$ emission all at once. Multi-node, Multi-mode, Multi-path Integrated Optimization Problems using Hybrid heuristics in the work of~\cite{kang2010research} are studied. They propose an integrated {\it Particle Swarm Optimization (PSO)-Ant Colony Optimization (ACO)} double-layer optimization algorithm. \smallskip Hierarchical network structures of transport networks and how the main mechanisms lead to these network structures are the main interests of~\cite{Nes2002DESIGNOM} work. Optimizing Containerized Transport across multiple choice Multimodal Networks using Dynamic Programming was proposed and successfully tested on a real problem by~\cite{hao2016optimization}. \newpage Route Optimisation Problem using Genetic Algorithms (GA) were proposed by~\cite{jing2012hybrid}; the same technique was used to solve a Multi-Objective Transport System by~\cite{KhanATN19} and could be further extended for the multimodal transport. GA was also used to optimize the time for container handling/transfer, respectively the time at the port by speeding up handling operations by~\cite{kozan1999genetic}. \subsection{Time Optimization of Multimodal Transport}\label{sec:timeopt} \medskip \smallskip \indent -- {\bf Running time} \& {\bf Rescheduling; solver: Ant Colony Optimization.} \cite{zidi2006ant} proposes an Ant-Colony Optimization (ACO) approach for the rescheduling of multimodal transport networks. The ant-colony approach is best in this case (rescheduling) as it is able to work from a given state and only adapt the solution to the new conditions. Rescheduling is a must, as the system is subject to disturbances (traffic jams, collisions, strikes) which cannot be accounted for at the beginning of the transport, but are very likely to introduce delays or other discrepancies. Furthermore, \cite{zidi2006real}, plans the public transportation system, by using the ant-colony optimization when the theoretical schedule cannot be followed; this approach overcomes the inherent overloading with information of the operators when some problematic situation occurs. \smallskip \indent -- {\bf Transport time between nodes; solver: Genetic Algorithms} \& {\it K-sortest path.} \cite{yong2009research} take into consideration the transport time between nodes, time needed for mode change and possible delays. They also present a model that aims to minimize transport and transfer costs, build on a GA based on K-shortest-paths. \indent -- {\bf Real-time system.} We cannot discuss time optimizations without including~\cite{bock2010real} article about "real-time control of freight forwarder transportation networks". His approach integrates multimodal transportation and multiple transshipments. The real-time system is continually optimized in order to adapt it to the current status of the live data. \subsection{Cost Optimization of Multimodal Transport}\label{sec:costopt} From the perspective of the multimodal logistics provider, cost may be the second most important aspect, immediately after customer satisfaction. This is why cost optimization is one of the concerns of every CEO. \smallskip \indent -- {\bf Cost Optimization with specific criteria using Mixed Integer Linear Programming.} by \cite{sitek2012cost}. The authors included a mathematical model of a multilevel cost-optimization by {\it Mixed Integer Linear Programming (MILP)}. They analyze and integrate in their algorithm, as optimization criteria, factors such as costs of: {\it Production, Transport, Distribution} and {\it Environmental Protection}. Furthermore, all these multiple factors are used by~\cite{sitek2012cost} as optimization criteria into the MILP algorithm, where more criteria are included: timing, volume and capacity. The tests for showing the possibilities of practical decision support and optimization of the supply chain have been performed on sample data. \indent -- {\bf Cost Optimization including emissions} \& {\bf economies of terminal using Genetic Algorithms} by~\cite{zhang2013optimization}. The authors discussed about environmental costs and introduced a modelling optimization approach for terminal networks, integrating the costs of CO$_{2}$ emissions and economies of terminals. Their proposed algorithm is composed of two levels: the upper level uses genetic algorithms to search for the optimal terminal network configurations; the lower level performs multi-commodity flow assignment over a multimodal network. This model is applied to the Dutch container terminal network. \smallskip \subsection{Network Planning and Optimization of Multimodal Transport}\label{sec:netopt} \smallskip \indent -- {\bf Multiple means into a multimodal system} by~\cite{Nes2002DESIGNOM}. It underlines that a change is needed in today's transportation system, in order to address problems like accessibility of city centres, traffic congestion, but most of all the environmental impact. In this regard, combining multiple means into a truly multimodal system has the ability to capitalize on each subsystem's strengths and limit their weaknesses. Negative factors such as the obligation to transfer, although not very pleasant for the passengers, can have many long-term economical and environmental benefits. So, high quality travel information is crucial. \indent -- {\bf Abstract perspective of multimodal transport network system} by~\cite{zhang2011multimodal}. Here it is shown the necessity of seamless multimodal traveler information systems; therefore a multimodal transport network system and a test for the model in a study for the Eindhoven region was included \vspace{0.10cm} \indent -- {\bf Environmental impact constraint when planning} by~\cite{zhang2013optimization}. and economic development are the two reasons why~\cite{yamada2009designing} say that is crucial to develop and design efficient multimodal networks. They employ a heuristic approach for a complex algorithm with road transport, sea links and freight terminals. The model is successfully applied in a network planning in the Philippines. \vspace{0.10cm} \indent -- {\bf Supernetwork equilibrium for supply chain–multimodal transport} by~\cite{yamada2015freight}. A 2 level approach using particle swarm optimization is presented. The upper lavel is solved using particle swarm optimisation, while the lower-level decision use a supply chain–multimodal transport supernetwork equilibrium. \vspace{0.10cm} \indent -- {\bf Emergencies solved with an immune affinity model} by~\cite{hu2011container}. The paper proposes a transportation scheduling approach based on immune affinity model. The paper concludes that container multimodal transportation will play an important role in emergency relief, due to the exploitation of the different system's strengths. \vspace{0.10cm} \indent -- {\bf Practical traffic assignment model for a multimodal transport system with low-mobility groups} by~\cite{zhang2020practical}. Here a route choice equilibrium for specific vehicles and non-vehicles travel times at intersections design is proposed Validation and verification is made on a case study: Wenling city from China. Some limitations of the models includes ignoring modal choice equilibrium, uncertainty of travel and missing a detailed analysis due to insufficient data. \vspace{0.10cm} \indent -- {\bf Bayesian model for transport options} by~\cite{arentze2013adaptive}. A Bayesian Method to learn user preferences and to provide in short time personalized advice regarding transport options is presented; a new sequential attributes processing and an efficient parameter sampling is provided. \vspace{0.10cm} \indent -- {\bf Limit cruising-for-parking constraint when planning} by~\cite{zheng2016modeling}. It aims to limit cruising-for-parking; the model is based on the {\it Macroscopic Fundamental Diagram (MFD)} for both single and bi-modal, car and bus in order to reduce costs. \section{Future possible extensions from Unimodal to Multimodal Transport}\label{sec:theoretical} As transportation quickly expands worldwide, some existing unimodal transport problems and their solvers could be furthermore extended while including specific requirement to solve multimodal transport problems. Some of these problems are further briefly described. \medskip \noindent{\bf A. Supply Chain Networks.} One of the two-stage supply chain network is considered here to optimize the cost from a manufacturer, to a given number of customers while using a set of distribution centers. \smallskip {\bf Models \& Solvers: Supply chain for further Multimodal extension.} \begin{itemize} \item[-] {\bf Multi-Objective Goal Programming} by \cite{roy2017multi}. The mathematical model of Two-Stage Multi-Objective Transportation Problem (MOTP) with the use of a utility function for selecting the goals of the objective functions and numeric tests are included; real-world uncertainty with the use grey parameters (reduced to numbers) are also involved. As for the metrics within objective functions, usually Euclidean distances are used but today for urban related ITS for example could be a plus to use city-block distances as in~\cite{city-informatica} where an evolutionary multimodal optimization technique, with suitable parameters obtains better results than existing techniques. \smallskip \item[-] {\bf Genetic Algorithm.} \cite{pop2016hybrid} proposes a heuristic-genetic approach with a hybrid based GA for capacitated fixed-charge problem. Their algorithm was tested on benchmark instances and found to obtain competitive results with other state-of-the-art algorithms. \smallskip \item[-] {\bf Other heuristics.} \cite{chen2017uncertain} studies an {\it Uncertain Bicriteria Solid Transportation problem}; \cite{moreno2016heuristic} employs a heuristic approach for the multiperiod location-transportation problem. Several versions of supply-chain problem including efficient reverse distribution system, secure and green features alongside related solvers are presented by~\cite{pinteasupply2014,pinteasupply2016,pinteasupply2019}. A parallel fast solver where the search domain of solutions is efficiently reduced at each iteration was proposed by~\cite{cosma-informatica} for the two-stage transportation problem with fixed charges. It was identified as a very competitive approach when compared to existing ones with literature dataset. \end{itemize} \newpage \noindent{\bf B. (Generalized) Vehicle Routing Problem.} For a given set of vehicles and clients, the (G)VRP problem is to determine the optimal set of routes, see~\cite{toth2002vehicle}. This is the one of most studied combinatorial set of problems.\cite{lee-informatica} considers an integrative three-echelon supply chain: Vehicle Routing and Truck Scheduling Problem with a Cross-Docking System; this promising logistics strategy distributes products by eliminating storage and order-picking while using warehouse: directly from inbound to outbound vehicles; a cost optimization EEA-based method was proposed outperforming existing solvers. Due to its effectiveness many variations of the VRP were built on the basic VRP with extra features, e.g. the Generalized VRP (GVRP). VRP with time windows and VRP pick-up and delivery problems, e.g. solved by~\cite{vrp-informatica} with GA insertion operators, can be further extended to related complex problem. A version of GVRP includes designing optimal delivery or collection routes, subject to capacity restrictions, from a given depot to a number of locations organized in clusters, with the property that exactly one node is visited from each cluster. See~\cite{ghiani2000efficient,pop2013improved} for more details. {\bf Models \& Solver: (G)VRP for further Multimodal extension.} \begin{itemize} \item[-] Capacitated VRP implies that the vehicles have fixed capacities and the locations have fixed demands in time, see~\cite{toth2002vehicle}; \item[-] VRP \& Multiple Depots involves more depots from which each customer can be served as in~\cite{crevier2007multi}; \item[-] Heterogeneous Fixed Fleet VRP uses a heterogeneous (different types) fleet of vehicles as in~\cite{taillard1999heuristic}; \item[-] Multi-Commodity VRP deals with more commodities per vehicle, which has a set of compartments in which only one commodity can be loaded, the same as in~\cite{repoussis2006hybrid}; \item[-] {\bf Tabu Search and hybridization.} Various heuristic and metaheuristic algorithms have been developed for solving the VRP including: an algorithm based on Tabu Search, adaptive memory and column generation described by~\cite{taillard1999heuristic}. \cite{tarantilis2004threshold} implemented a threshold accepting procedure where a worse solution is accepted only if it is within a given threshold. A multi-start adaptive memory procedure combined with Path Relinking and a modified Tabu Search was developed by~\cite{li2010adaptive}. \item[-] {\bf Iterated Local Search based \& Set Partitioning} \cite{subramanian2012hybrid} described a hybrid algorithm composed by an Iterated Local Search based heuristic and Set Partitioning formulation. \item[-] {\bf Bio-inspired algorithms.} \cite{matei2015improved} propose an improved immigration memetic algorithm which combines the power of genetic algorithms with the advantages of local search. The article describes the advantages of the immigrational approach on the overall quality of the algorithm (result quality and run-time speed). Diverse versions Genetic Algorithms for solving the current problem are presented by~\cite{matei2010efficient} and \cite{petrovan2019self}. Ant colony methods were used to solve Generalized VRP by~\cite{popGVRPacs2008},~\cite{popdynGVRP2009} and~\cite{pinteaGVRPsens2011}. \newpage \item[-] {\bf Heuristics.} In~\cite{leuveano2019integrated} is proposed a heuristic to find optimum inventory replenishment decision when solving transportation \& quality problems into a Just-in-Time (JIT) environment. An vendor-buyer lot-sizing model was proposed; parameters study was included and both capacitated and incapacitated cases were studied. Some advantages of the proposals follows: it obtains feasible solution for inventory replenishment decisions; improve transport payload, reduce defectiveness of products and improves quality-related costs. \end{itemize} \medskip \noindent {\bf C. (Generalized) Traveling Salesman Problem.} Since 1988 this is one of the most studied problems, and the problem of~\cite{applegate2006traveling} from which the (G)VRP evolved. It is considered a particular case of GVRP when the capacity of the vehicles in infinite, and no intermediary return to the depot is required. Some GTSP versions use a node from each cluster in a route solution, e.g. a city-node from a county-cluster. (G)TSP libraries (see ~\cite{tsplib},~\cite{cooklibdata},~\cite{gtsplib}) are continuously updated mainly based on Geographical Information Systems (GIS) as in~\cite{CrisanCountry2020},~\cite{IberianCrisan2016},~\cite{RomaniaTSP} and~\cite{cooklibcountry}. Integer solvers, e.g.~\cite{neostspsolver}, are feasible for TSP, but solving, large-scale real-life problems requires updated strategies. \smallskip {\bf Models \& Solvers (G)TSP for further Multimodal extension.} \smallskip \begin{itemize} \item- Intelligent Transport System - (G)TSP related. In the context of multimodal transportation, the (G)TSP family of problems has many applications; for example could be extend to an related Intelligent Transport System (ITS) as in~\cite{igplITSpintea2020} an~\cite{ITSpintea2018}. Recently, Internet of Things (IoT) was used by~\cite{LuoZZYL19} to connect platforms for ITS. \smallskip \item[-] Other - (G)TSP related models. Recent optimization models allow the instances of realistic freight rail transport to be solved, a stage-wise approach for solving the scheduling and routing problems separately nowadays is prevalent. \smallskip \item[-] {\bf Heuristics.} As for VRP, the solvers of (G)TSP are using mainly heuristics: {\it Tabu Search} of~\cite{pedro2013tabu} use local search and accept worsening moves, but introduce restrictions to discourage previously visited solutions; {\it Dynamic Programming}by~\cite{bellman1962dynamic}; {\it Approximation Algorithms}by~\cite{malik2007approximation}; \smallskip \item[-] {\bf Bio-inspired algorithms} used to solve (G)TSP include: {\it Simulated Annealing}~by~\cite{wang2015solving}; {\it Genetic Algorithms} by~\cite{lin2016solving}~and~\cite{pop2017hybrid} are one of the most straightforward ways to tackle TSP. {\it Ant Colony Optimization (ACO)}used~by~\cite{cheng2007modified,mavrovouniotis2011memetic,dorigo1997ant,pinteasurveygtsp2015} and~\cite{pinteadyngtsp2007} use pheromone trails to optimize routes; a successful interactive Machine Learning (iML) use ACO to solve TSP with the human-in-the-loop approach as in~\cite{appintelliml2019}; some other related natural computing solvers include: {\it Particle Swarm Optimization}~by~\cite{wang2003particle,onwubolu2004optimal}~and~\cite{clerc2004discrete}; {\it Discrete Cuckoo Search Algorithm}~by~\cite{ouaarab2014discrete} is inspired by the breeding behavior of cuckoos using agents' attraction. \end{itemize} \newpage An {\bf abstract Formalization of Multimodal Transportation} as a concept, is presented by~\cite{ayed2008transfer}. ITS could be expanded by using multi-objective facility location problem models and solvers including heuristics e.g.\cite{firm-informatica}. The graph theory is applied within an algorithm in order to optimize routes and route guidance. The authors try to insert their approach into the Carlink project in order to assess it's performance. \cite{cosma2018hybrid} propose an efficient Hybrid Iterated local Search heuristic procedure to obtain high-quality solutions in reasonable running-time. \bigskip \section{Conclusions}~\label{sec:conclusions} The current selective survey presents a review of real-world problems, applications and optimization in the integrative multimodal transportation. Transportation is a key element of today's society and a very important engine for economic growth. Some areas (like food, medical supplies) raise transportation to strategic importance, and thus indispensable. \medskip The multimodal transport comes with diverse challenges, e.g. related to security, saving resources and reduce emissions. In the context of today's accelerated global warming, it's more important than ever to do everything to lower pollution as much as possible. An example it is the green multi-modal transport organization approach presented in~\cite{wang2020modelling} where it is validated the China-Europe railway network, reducing the transportation time, increasing energy conservation and lowering carbon emissions, by 40\%, when compared with the classical unimodal water transport. \medskip Uncertainties will coexists with multimodal transportation problem, and as recently~\cite{sharma2020soft} research shows, while using road, rail and air transportation, could be used for example soft sets to model these uncertainties related to the transportation attributes (cost, distance and duration of transport). Multi-criteria shortest path optimization, including time, travel cost and route length, for the NP-complete bus routing problem as in~\cite{bus-informatica} could be further extended for complex ITS problems. \medskip Multimodal transportation research is a nowadays challenge and continues, on both theory (e.g. solving complex vehicle routing problem) and applicability, in order to obtain feasible models and solvers for various transportation means on complex conditions, with general and specific attributes. \medskip \subsection*{Acknowledgement} This work has received funding from the CHIST-ERA BDSI BIG-SMART-LOG and UEFISCDI COFUND-CHIST-ERA-BIG-SMART-LOG Agreement no. 100/01.06.2019. \newpage \bibliographystyle{IEEEtran}
\section{Introduction}\label{introduction1} As stated in \cite{andrews2010introduction}, it is very difficult to define the exact size, mass, and weight of the Earths atmosphere, but in many respects, our atmosphere is a very thin layer, compared to Earth's radius. It is a critical system for life on our planet and together with the oceans, the atmosphere shapes Earth's climate and weather patterns and makes some regions more habitable than others. The atmosphere consists of a mixture of ideal gases: although molecular nitrogen and molecular oxygen predominate by volume. Like other planetary atmospheres, the earth's atmosphere figures centrally in transfers of energy between the sun and the planet's surface and from one region of the globe to another; these transfers maintain thermal equilibrium and determine the planet's climate \cite{curry1998thermodynamics}.\\ \\ As cited in reference \cite{denur2016condensation}~, Atmospheric thermodynamics is the study of heat-to-work transformations(and their reverse) that take place in the earth's atmosphere and manifest as the weather of climate. Hence it is involved in every atmospheric process, from the large-scale general circulation to the local transfer of radiative, sensible and latent heat between the surface and the atmosphere and the microphysical processes producing clouds \cite{cairo2011atmospheric}. As we stated above, the earth's atmosphere is the fluid system envelope surrounding the planet, and the atmosphere is capable of supporting a wide spectrum of motions, ranging from turbulent eddies of a few meters to circulations having dimensions of the earth itself. Its motion is strongly influenced by different factors such as the effect of the rotation of the Earth, gravity of the earth, air pressure force and the viscosity of the fluid \cite{salby1996fundamentals}. \\ \\ As suggested in reference~ \cite{vallis2016geophysical}, the atmosphere is governed by the laws of continuum mechanics and these can be derived from the laws of mechanics and thermodynamics governing a discrete fluid body by generalizing those laws to a continuum of such systems. In order to simulate these fluid flow and other related physical phenomena, it is necessary to describe the associated physics in mathematical form. \\ \\ Nearly all the physical phenomena of interest to us in this finding are governed by principles of conservation and are expressed in terms of partial differential equations. Hence, Cloaude-Louis ~Navier (1823) derived the equations of motion for a viscous fluid from molecular considerations, and George Stokes (1845) also derived the equations of motion for a viscous fluid in a slightly different form and the basic equations that govern fluid flow are now generally known as the \textbf{Naiver-Stokes equations} which arise from applying Isaac Newton's second law to fluid motion~ \cite{childs2010rotating}. According to \cite{wallace2006atmospheric}, the dynamics that described by the Naiver-Stokes equations (NSE) of fluid dynamics, for a variable the density of incompressible ocean and compressible atmosphere expressing conservation of mass, momentum, and energy. All the atmospheric gases are constituents of air characteristics with their pressure, density, and temperature and these parameters vary with altitude, latitude, longitude, and related to each other by the equation of state \cite{jacobson2005fundamentals} and these field variables are related to one another by the equation of state for an ideal gas.\\ \\ Life is too short to solve every complex problem in detail, and the atmospheric and oceanic sciences abound with such a complex problem. To solve real-world problems we need to add water vapor as well as the equations of radiative transfer on Thermodynamical equation. All these make a complex system, and to make progress, we need to simplify where possible and eliminate unimportant effects from the model. Thus, during the last decades, direct numerical simulations (DNS) have been recognized as a powerful and reliable tool for studying the basic physics of turbulence, and numerous findings showed that the results obtained by DNS are in excellent agreement with experimental findings \cite{nikitin2006finite}. In reference, \cite{burger2010numerical}, one of the challenging equations in atmosphere phenomena is the Naiver-Stokes equations which can not be solved exactly. So, approximations and simplifying assumptions are commonly made to allow the equations to be solved approximately. \\ \\ Recently, high speed computers have been used to solve such equations by replacing them with a set of algebraic equations using a variety of numerical techniques like finite difference method (FDM) \cite{reis2015compact, tsega2018finite},~the finite element method (FEM) \cite{kolmogorov2014finite} the finite volume method (FVM)\cite{nath2016numerical}, meshfree methods and boundary elements method \cite{sedaghatjoo2018numerical}. Many authors in their finding considered the coefficient of viscosity as well as the thermal conductivity of the fluid as a constant parameter, and on many other studies fluid as incompressible for numerical computation of Navier-Stokes dynamics,and there is still no findings that have been done considering on this area (apply the temperature dependent viscosity and thermal conductivity and their influence on the accuracy of the final solution ) for solving an atmosphere model, and we numerical compare on the two solutions through finding the relative error between on two mechanism.\\ \\ The strategy intended to achieve our goal that is to compute the thermodynamic and hydrodynamic properties of the viscous atmospheric motion on the rotating Earth frame. The assumptions used in this analysis are the flow is simple a compressible neutral fluid, with considering temperature dependent transport coefficients of the fluid flow over small-scale motion. In order to get the distributions of the resultant velocity, pressure, density, and temperature of the fluid on our atmosphere, the governing equations have been derived based on the above-mentioned assumptions and given as follows in Section\ref{atmospheric} and \ref{nse}, and the numerical results obtained are presented graphically and discussed. in section \ref{dis}. \section{The Laws of Thermodynamics of the Atmosphere }\label{atmospheric} In this context, the first law of the thermodynamics which when applied to the moving fluid elements is consists of the net transfer of heat by fluid flow, net heat transfer by conduction, rate of internal heat generation, the rate of work transfer from the control volume to its environment. Hence, the first law of thermodynamics equation containing the viscous dissipation term $\varPhi$ is given in equation \eqref{eq0} \begin{equation}\label{eq0} \rho\frac{D e}{Dt}=\rho\dot{q}+k\nabla^{2}T+\nabla k\nabla T-p\nabla\bullet\vec{u}+\varPhi \end{equation} The way we have written \eqref{eq0} is intended to give a clear picture of the balances of work and energy in the flow field. Thus, the heat added by conduction, radiation and chemical reaction (the right-hand-side terms in the first line of \eqref{eq0} is employed directly to increase the total internal energy. Viscous dissipation as well as compression work, written for clarity in separate lines in \eqref{eq0}, are the mechanisms transforming mechanical energy into internal energy, with only the latter being reversible\cite{monteiro2007dynamic}.\\ \\ The natural coordinates in which to express our equations, when they are applied to the Earth, are spherical coordinates $(r, \phi, \lambda)$, where $r$ is the distance from the center of the Earth,~ $\phi$ is latitude and $\lambda$ is longitude. The detailed derivation of the atmospheric equations of motion \eqref{eq0} in Cartesian coordinates was given in \cite{andrews2010introduction}, and in spherical coordinate for an compressible fluid it becomes expressed as \begin{equation}\label{eq1} \begin{split} &\rho c_{ v }\left[\frac{\partial T}{\partial t}+\frac{u}{r\cos\phi}\frac{\partial T}{\partial \lambda}+\frac{v}{r}\frac{\partial T}{\partial \phi}+w\frac{\partial T}{\partial z}\right]=\\& k\left[ \frac{1}{r^{2}\cos^{2}\phi}\frac{\partial^{2} T}{\partial \lambda^{2}}-\frac{\tan\phi}{r^{2}}\frac{\partial T}{\partial \phi}+\frac{2}{r}\frac{\partial T}{\partial z}+\frac{1}{r^{2}}\frac{\partial^{2} T}{\partial \phi^{2}}+ \frac{\partial^{2} T}{\partial z^{2}}\right]\\&+\left(\frac{1}{r\cos\phi}\right)^{2}\frac{\partial k}{\partial \lambda}\frac{\partial T}{\partial \lambda}+\frac{1}{r^{2}}\frac{\partial k}{\partial \phi}\frac{\partial T}{\partial \phi}+\frac{\partial k}{\partial r}\frac{\partial T}{\partial r}\\&-p\left(\frac{1}{r\cos\phi}\frac{\partial u}{\partial \lambda}+\frac{1}{r}\frac{\partial v}{\partial \phi}+\frac{2w}{r}-\frac{v\tan\phi}{r}-\frac{u}{r}+\frac{\partial w}{\partial r}\right)\\&\rho\dot{q}+\varPhi_{I} \end{split} \end{equation} Here, the coefficient of the thermal conductivity of the air ,and it's viscosity $\mu$ depends on the temperature based on experimental result and they are approximately by using Sutherland's law\cite{smits2006turbulent} \begin{equation}\label{e3} k_{T}=k_{o}\left(\frac{T}{T_{o}}\right)^{\frac{3}{2}}\frac{T_{o}+S_{k}}{T+S_{k}} \end{equation} \begin{equation}\label{e4} \mu_{T}=\mu_{o}\left(\frac{T}{T_{o}}\right)^{\frac{3}{2}}\frac{T_{o}+S_{\mu}}{T+S_{\mu}} \end{equation} Where, $S_{k},\& S_{\mu}$ are an effective temperature for cofficient of thermal conductivity and viscosity of the air ,respectively and their value as mentioned in Sutherland law. And $ \mu ~,~ \mu_{o} $ are dynamic viscosity at input temperature T and at reference temperature $T_{o}$ ,respectively. In the atmospheric range of temperatures, the two specific heat capacity are given by $c_{p} = c_{pd}\left(1+0.87q_{v}\right)$ and $c_{v} = c_{pv}\left(1+0.97q_{v}\right)$ where,$q_{v}$ is the mass ratio of the vapor to the moist air ($q_{v}=\frac{m_{v}}{m_{v}+m_{d}}$). The dissipation term $\varPhi_{I}$ in spherical coordinate system for compressible fluid flow is given as \begin{equation}\label{eq2} \begin{split} &\varPhi_{I}=\left(2\mu-\upsilon\right)\left(\frac{1}{r\cos\phi}\frac{\partial u}{\partial \lambda}+\frac{1}{r}\frac{\partial v}{\partial \phi}+\frac{2w}{r}-\frac{v\tan\phi}{r}\right)\\&+\left(2\mu-\upsilon\right)\left(-\frac{u}{r}+\frac{\partial w}{\partial r}\right)+\frac{\mu}{r^{2}}\left(\frac{\partial u}{\partial\phi}+\frac{1}{\cos\phi}\frac{\partial v}{\partial \lambda}\right)^{2}\\&-\frac{4\mu}{r\cos\phi}\frac{\partial u}{\partial\lambda}\frac{\partial v}{\partial\phi} \end{split} \end{equation} \section{The Naiver-Stokes Equations for the moist air in Rotational Coordinate System}\label{nse} In this section, we introduce the basic fluid dynamical laws that govern our atmospheric flows. When we assume that the blob is instantaneous of cuboidal shape, with sides $\delta x, \delta y$ and $\delta z$ which is fixed in space and different type of forces exerted on this blob, then Newton's second could be expressed as \begin{equation}\label{eq3} m\frac{d\vec{U}}{dt}=\sum \vec{F} \end{equation} Here, the vector $\vec{F}$ is the sum of all the relevant forces exerted on the neutral fluid elements that include the pressure, viscous, Coriolis, and effective gravitational forces. Hence, the equations governing small-scale atmospheric motion would be also derived from a Lagrangian perspective by considering the rotation of the Earth which adopted from ref.\cite{andrews2010introduction}, and in vector form: \begin{equation}\label{eq4} \rho\frac{D\vec{U}}{Dt}=-\frac{{\nabla} p}{\rho}-2{\Omega}\times U+\rho\vec{g}+\nabla\bullet\Bbbk \end{equation} In order to formulate the last term of \eqref{eq4}, we use the following analytic expression for the stress tensor$ ~\Bbbk~$\cite{zdunkowski2003dynamics} : \begin{equation} \Bbbk=\mu\left(\nabla\vec{v}+\vec{v}^{\curvearrowleft}\nabla\right)-\lambda\nabla\bullet\vec{v}{E} \end{equation} We have used Lam\`{e}'s coefficients of viscosity $\lambda$ and $\mu$, which will be treated as temperature-dependent. \begin{equation}\label{eq25} \nabla\bullet\Bbbk=\mu\nabla^{2}\vec{v}+\left(\nabla-\lambda\right)\nabla\left(\nabla\bullet\vec{v}\right)+\nabla\mu\bullet\left(\nabla\vec{v}+\vec{v}^{\curvearrowleft}\nabla\right) -\left(\nabla\bullet\vec{v}\right)\nabla\lambda \end{equation} In Cartesian coordinator, the viscous forces along x and y components from equation\eqref{eq25} can be expressed as following in equations \eqref{eq26},and \eqref{eq27}, respectively. \begin{equation}\label{eq26} \nabla\bullet\Bbbk_{x}=\mu\nabla^{2}u+\left(\mu-\lambda\right)\frac{\partial}{\partial x}\left(\nabla\bullet\vec{v}\right)+2\left(\frac{\partial \mu}{\partial x}\frac{\partial\vec{u}}{\partial x}\right)+2\frac{\partial\mu}{\partial y}\left(\frac{\partial u}{\partial y}+\frac{\partial v}{\partial x}\right)-\frac{\partial\lambda}{\partial x}\left(\nabla\bullet\vec{v}\right) \end{equation} \begin{equation}\label{eq27} \nabla\bullet\Bbbk_{y}=\mu\nabla^{2}v+\left(\mu-\lambda\right)\frac{\partial}{\partial y}\left(\nabla\bullet\vec{v}\right)+2\left(\frac{\partial \mu}{\partial y}\frac{\partial\vec{v}}{\partial y}\right)+2\frac{\partial\mu}{\partial x}\left(\frac{\partial u}{\partial y}+\frac{\partial v}{\partial x}\right)-\frac{\partial\lambda}{\partial y}\left(\nabla\bullet\vec{v}\right) \end{equation} In spherical coordinates with the components of the velocity vector given by $\left(\vec{u}=u ,v \right)$ , the Naiver-Stokes equations are given by \begin{itemize} \item \textbf{$\lambda$- component of the momentum equation} \begin{equation}\label{eq5} \begin{split} &\frac{\partial u}{\partial t}+\left(\frac{u}{r\cos\phi}\frac{\partial u}{\partial\lambda}+\frac{v}{r}\frac{\partial u}{\partial\phi}\right)+\frac{uw}{r}-\frac{uv}{r}\tan\phi+lw-fv\\&+\frac{1}{r\rho \cos\phi}\frac{\partial p}{\partial \lambda}=\\&\mu\left(\frac{4}{3r^{2}\cos^{2}\phi}\frac{\partial^{2} u}{\partial \lambda^{2}}-\frac{\tan\phi}{r^{2}}\frac{\partial u}{\partial \phi}+\frac{1}{r^{2}}\frac {\partial^{2} u}{\partial \phi^{2}}\right)\\&+\frac{\left(\mu-\lambda\right)}{r\cos\phi}\frac{\partial}{\partial \lambda}\left(\nabla\bullet\vec{v}\right)-\frac{1}{r\cos\phi}\frac{\partial \lambda}{\partial \lambda}\left(\nabla\bullet\vec{v}\right)+\frac{2}{r^{2}\cos^{2}\phi}\frac{\partial\mu}{\partial\lambda}\left(\frac{\partial u}{\partial \lambda}\right)+\\&\frac{2}{r^{2}}\frac{\partial \mu}{\partial \phi}\left(\frac{\partial u}{\partial \phi}+\frac{1}{\cos\phi}\frac{\partial v}{\partial \lambda}\right) \end{split} \end{equation} \item \textbf{$\phi$- component of the momentum equation} \begin{equation}\label{eq6} \begin{split} &\frac{\partial v}{\partial t}+\left(\frac{u}{r\cos\phi}\frac{\partial v}{\partial\lambda}+\frac{v}{r}\frac{\partial v}{\partial\phi}\right)+\frac{vw}{r}-\frac{u^{2}}{r}\tan\phi+\\&fu+\frac{1}{r\rho }\frac{\partial p}{\partial \phi}=\mu\left(\frac{4}{3r^{2}}\frac{\partial^{2} v}{\partial \phi^{2}}+\frac{1}{r^{2}\cos^{2}\phi}\frac{\partial^{2}v}{\partial \lambda^{2}}\right)\\&+\frac{\left(\mu-\lambda\right)}{r}\frac{\partial}{\partial \phi}\left(\nabla\bullet\vec{v}\right)-\frac{1}{r}\frac{\partial \lambda}{\partial \phi}\left(\nabla\bullet\vec{v}\right)+\frac{2}{r^{2}}\frac{\partial\mu}{\partial\phi}\left(\frac{\partial u}{\partial \phi}\right)+\\&\frac{2}{r^{2}\cos\phi}\frac{\partial \mu}{\partial \phi}\left(\frac{\partial u}{\partial \phi}+\frac{1}{\cos\phi}\frac{\partial v}{\partial \lambda}\right) \end{split} \end{equation} \end{itemize} Here,the latitudinal dependence of the Coriolis parameter is accounted for this work are $ f = 2\Omega \sin \phi $ , $ l = 2\Omega \cos \phi$ , respectively and $\rho$ is the density of the fluid, $p$ pressure, $\vec{g}$ the effective gravitational acceleration, and the right side terms of equation\eqref{eq5}-\eqref{eq6} comes from the normal and shear stresses due to friction.\\ \\ \section{Application of the Dynamics} As cited in ref~\cite{saks2011cauchy},~the above both atmospheric energy ,and Naiver-Stokes equations are useful because they describe the physics of many phenomena of scientific and engineering interest. They may be used to model the weather, ocean currents, water flow in a pipe, and airflow around a wing. The Naiver-Stokes equations, in their full forms, help with the design of aircraft and cars, the study of blood flow, the design of power stations, the analysis of pollution, and many other things. Coupled with Maxwell's equations, they can be used to model and study magneto-hydrodynamics.\\ \\ The above description of the fluid system is not complete until we also provide a relation between density and pressure for the heterogeneous nature of the Earth's lower atmospheric layer. For moist neutral air in the atmosphere behaves approximately as an ideal gas, and its density depends on the specific humidity and virtual temperature of the air, and so we write: \begin{equation}\label{10} p=\rho R_{d}T_{o}\left(1+0.608q_{v}\right) \end{equation} We recall that global existence of solutions of the atmospheric energy and the Naiver-Stokes equations is known to hold in every space and time dimension \cite{georgiev2018existence}. However, theoretical understanding of the solutions to these equations in many finding is done by taking some standard techniques to estimate wind resources and they did not considered tiny errors at the smallest scales will ultimately have huge effects on the overall solution. \section{Numerical Simulation of the Primitive Equations}\label{scale} In this section, we propose finite-difference-central difference schemes, Runga Kutta fourth-order schemes, and 2D unstaggered grid methods were implemented for proving of existence of global solutions for the above governed equations. In all numerical solutions, the continuous partial differential equation is replaced with a discrete approximation, and the discretization of those equations are carried out with respect to dimensional coordinates $\lambda$,and $\phi$ to convey the equations in finite difference form by approximating the functions and their derivatives in terms of central differences with applying the Courant-Friedrichs-Lewy stability criterion be obeyed\cite{zdunkowski2003dynamics}, and the spherical form of this criterion we have used for numerical solve our model is given by ~$\frac{\partial t}{r^{2}\cos^{2}\phi\partial \lambda^{2}},\frac{\partial t}{r^{2}\partial \phi^{2}}\leq\frac{1}{4}$. \\ \\ As indicated in last section of the introduction, we considered the small scale neutral fluid motion of lower atmosphere as a compressible. Our flow is a shallow box of dimensions $ lx=45^{o}$ in the longitude direction,and $ ly=45^{o}$ in the latitude direction of the earth. The grid space is $\Delta \lambda=1^{-1}$ in the longitude direction,and $\Delta \phi=1^{-1}$ in the latitude direction of the Earth, with these parameters, the angular speed of the rotation of Earth to be $\Omega=7.30*10^{-5} s^{-1}$. We apply some sort of horizontal air mass density($\rho=10kg/m^{3}$) as a perturbation to the atmosphere at a longitude of $5\Delta\lambda$,and some useful physical constants were taken from Appendix A of reference\cite{andrews2010introduction}. The computations have been performed using $\Delta t = 1$ to ensure the stability with the time step $n_{t}=50000$, then the over all characteristics of the atmospheric variables would be brief discussed in the next section \ref{dis}. \newpage \section{Results and Discussion}\label{dis} The result presented in this section is computed thermodynamic and hydrodynamic properties of the viscous atmospheric motion with restricting our attention to the lower part of the atmosphere as compressible neutral fluid. To see the effect of transport coefficients (viscosity and thermal conductivity) on the propagation of atmospheric resultant velocity, temperature, density, and pressure with respect to time, we perform a numerical simulation using a constant and temperature-dependent transport coefficient (viscosity and thermal conductivity). Taking these parameters into account, and based on our initial boundary condition, we obtain the propagation of resultant velocity , and temperature against time for temperature-dependent as well as for temperature-independent transport coefficient as shown in Figure\ref{fig1a}(left $1\&2$ column), and in Figure\ref{fig1b}(right $1\&2$ column), respectively. By comparing their magnitude, we obtain the change in resultant, and temperature from the corresponding two graphs , and presented in graphically as shown in the last end column of Figures\ref{fig1a}$~\&$~\ref{fig1b}. Thus, from those corresponding figures, we have observed that there is a slight change in both resultant velocity and temperature with respect to time when we used temperature-dependent transport coefficient instead of temperature-independent transport coefficient. \begin{figure*}[ht!] \begin{subfigure}[t]{0.5\textwidth} \centering \includegraphics[height=2.40in]{velocity.pdf} \caption{\label{fig1a} This figure shows how $\vec{V}$ changes during iteration steps. } \end{subfigure} \begin{subfigure}[t]{0.5\textwidth} \centering \includegraphics[height=2.40in]{temperature.pdf} \caption{\label{fig1b} This figure shows how temperature changes during iteration steps.} \end{subfigure} \caption{\label{fig1} Propagation of resultant velocity and the temperature of moist air with respect to time. From top to bottom: resultant velocity(Fig.$\ref{fig1a}$) and temperature (Fig.$\ref{fig1b}$)} \end{figure*}\\ Moreover, the propagation of density and pressure with respect to time is becomes as shown in Figure\ref{fig2a}(left column) and \ref{fig2b}(right column) for both temperature-dependent ($\mu(T),K(T)$) and temperature-independent transport coefficient ($ ~\mu,k$). Again here, their corresponding variation with respect to time is presented in graphically as shown in Figure \ref{fig2a} (left last column) and Figure\ref{fig2b}~(right last column), respectively. Based on these results, a correction, should be always considered for the computation of thermodynamic and hydrodynamic properties of the viscous atmospheric motion, and for better accuracy, temperature-dependent thermal conductivity and coefficient of viscosity should be considered. Hence, we consider the temperature-dependent transport coefficient for numerical solving all of the governed equations that interpret our model. \begin{figure*}[ht!] \begin{subfigure}[t]{0.5\textwidth} \centering \includegraphics[height=2.40in]{density.pdf} \caption{\label{fig2a} This figure shows how density changes during iteration steps. } \end{subfigure} \begin{subfigure}[t]{0.5\textwidth} \centering \includegraphics[height=2.40in]{pressure.pdf} \caption{\label{fig2b} This figure shows how pressure changes during iteration steps.} \end{subfigure} \caption{\label{fig2} Propagation of density and pressure of moist air with respect to time. From top to bottom: density(Fig.$\ref{fig2a}$) and pressure (Fig.$\ref{fig2b}$)} \end{figure*} \newpage \noindent Depending on the above result, that is by taking temperature-dependent transport coefficient, we obtain the numerical solution for the governed equations and it is presented in graphically as shown in below Figures~\ref{fig3}$\&$\ref{fig4}. From those figures, we have seen that all the atmospheric parameters profile behaves like a wave with respect to time, and the flow patterns of Figures are very close to those shown in\cite{bruneau20062d}. The propagation of resultant velocity and the temperature have opposite in directions as we observe, in Figure\ref{fig3}(\ref{fig3a} ,$\&$ \ref{fig3b}),and the reasons for this is currently is due to the dissipation of the fluid their is a transformation mechanical energy to the thermal and a vice verse relation . \begin{figure*}[ht!] \begin{subfigure}[t]{0.5\textwidth} \centering \includegraphics[height=2.40in]{revt.pdf} \caption{\label{fig3a} The plots of $\vec{v}(t,\lambda)$} \end{subfigure} \begin{subfigure}[t]{0.5\textwidth} \centering \includegraphics[height=2.40in]{temt.pdf} \caption{\label{fig3b} The plots of $T(t,\lambda)$} \end{subfigure} \caption{\label{fig3} The distribution of resultant velocity(Fig.\ref{fig3a}) ,and temperature(Fig.\ref{fig3b}) with respect to time,and longitude.} \end{figure*} \\ When we apply the finite difference method on continuity equation, we obtain the propagation of density($\rho$) as function of geometrically positions and the time taken. Here, the propagation of density was presented graphically as shown in Figure\ref{fig4a} with respect to time and longitude, and the propagation of atmospheric pressure as shown in Figure\ref{fig4b}. Thus, both of the density and the pressure graph oscillate with same direction respect to time . Due to ideal gas relation, from Figures\ref{fig3b},\ref{fig4a},$\&$ \ref{fig4b} we have seen that the propagation of temperature is also in opposite direction to the propagation of density and pressure of the fluid . \begin{figure*}[ht!] \begin{subfigure}[t]{0.5\textwidth} \centering \includegraphics[height=2.40in]{denst.pdf} \caption{\label{fig4a} The plots of $\rho(t,\lambda)$ } \end{subfigure} \begin{subfigure}[t]{0.5\textwidth} \centering \includegraphics[height=2.30in]{pret.pdf} \caption{\label{fig4b} The plots of $P(t,\lambda)$} \end{subfigure} \caption{\label{fig4} The distribution of density( Fig.\ref{fig4a}) ,and pressure( Fig.\ref{fig4b}) with respect to time,and longitude.} \end{figure*} \newpage \noindent When a sort of horizontal air mass density, $\rho\approx10kg/m^{3}$ occurred as a perturbation on the atmosphere at a specific longitude then this perturbation of the density change its propagation with time as shown in Figure\ref{fig5} in the form of full three dimensional surface. Thus, from the first figure\ref{fig5a}, we observed that propagation of density has a maximum amplitude at perturbation point , then its oscillation becomes decay to atmospheric density at sea level $\rho=1.225kg/m^{3}$ in both direction of longitude. When the time taken reaches to 100sec and 200sec,the propagation of density behave like a random motion with increasing in amplitude as shown in figures(\ref{fig5b}, $\&$ \ref{fig5c}). In similar fashion,using this perturbed density value, we also determine the propagation for the remaining of the atmospheric parameter along to the geometrically position (longitude,and latitude) at specific time taken (see appendices with detailed). Finally, we can put observed that the propagation of resultant velocity,temperature,and pressure behave like random motion with respect to longitude and latitude at different time moments. \begin{figure*}[ht!] \begin{subfigure}[t]{0.5\textwidth} \centering \includegraphics[height=2.40in]{density0.pdf} \caption{\label{fig5a} The initial perturbed air mass density at time = 0 sec at $5\Delta \lambda$. } \end{subfigure} \begin{subfigure}[t]{0.5\textwidth} \centering \includegraphics[height=2.40in]{den100.pdf} \caption{\label{fig5b} The computed numerical air mass density at time = 100 sec} \end{subfigure} \begin{subfigure}[t]{0.5\textwidth} \centering \includegraphics[height=2.30in]{den500.pdf} \caption{\label{fig5c} The computed numerical air mass density at time = 200 sec} \end{subfigure} \caption{\label{fig5} The graph of density against longitude $\&$ latitude. From top to bottom: propagation of density at t=0sec (left column) and at t=100sec(right column), and t=200sec(left last column)}. \end{figure*} \newpage \noindent Finally, it is interesting to note that the Coriolis effect does not appear in the radial component of Naiver-Stokes equation which is related to two-dimensional velocity. Its effect appears on the equations for resultant velocity. Hence, by contrast the magnitude of the rate of momentum change due to Coriolis forces that exerted on the atmospheric compressible fluid, we obtain the resultant velocity field shown as a color plot with some contour lines for corresponding equation\eqref{eq5} - \eqref{eq6} at a different time of the simulation as shown in below figures \ref{fig6} (left , and right columns) for small and large magnitude of Coriolis force.\\ \\ Figure\ref{fig6a}, and \ref{fig6b} , has been pointed out that there is an initial circular shape wave propagation was observed at the center at around $t\approx10$ sec and due to double periodic condition, the circular wave spread out in two dimension and we mark an interesting wave phenomena with symmetric in shape observed at figure ~\ref{fig6c}, $\&$ \ref{fig6d} for respective magnitude of Coriolis force . Hence,as the time taken increases its magnitude to $115.1$ sec and to $136.1$ sec for corresponding magnitude of Coriolis force, we have examined that the propagation of the wave is only along to longitude of the Earth as illustrated in figure \ref{fig6d} for large magnitude of the Coriolis force, and this figure \ref{fig6} general show how the resultant velocity depends on the magnitude of Coriolis force.\\ \begin{figure*}[ht!] \begin{subfigure}[t]{0.5\textwidth} \centering \includegraphics[height=2.50in]{Figure_1-1.pdf} \caption{\label{fig6a} A contour map that describe the resultant velocity at t = 9.1sec} \end{subfigure} \begin{subfigure}[t]{0.5\textwidth} \centering \includegraphics[height=2.50in]{Figure_1-1l.pdf} \caption{\label{fig6b} A contour map that describe the resultant velocity at t = 115.1sec} \end{subfigure} \begin{subfigure}[t]{0.5\textwidth} \centering \includegraphics[height=2.30in]{Figure_1-1100.pdf} \caption{\label{fig6c} A contour map that describe the resultant velocity at t = 115.1sec } \end{subfigure} \begin{subfigure}[t]{0.5\textwidth} \centering \includegraphics[height=2.30in]{Figure_1-4l.pdf} \caption{\label{fig6d} A contour map that describe the resultant velocity at t = 136.1sec} \end{subfigure} \caption{\label{fig6} Contour plot for velocity,$\vec{U}=(u^{2}+v^{2})^{0.5}$ , From top to bottom: for small (left column) and large (right column) magnitude of Coriolis force} \end{figure*} \newpage \noindent \section{Summary and Conclusions}\label{conclu} In this article, we propose an efficient computational strategy to deal with thermodynamic and hydrodynamic properties of the viscous atmospheric motion in two dimension with considering temperature-dependent viscous coefficient. The dynamics of the atmosphere, governed by partial differential equation without any approximation ,and without considering latitude-dependent acceleration due to gravity. The numerical solution for those governed equations was solved by applying the finite difference method with applying some sort of horizontal air mass density as a perturbation to the atmosphere at a longitude of $5\Delta\lambda$ . Based on this initial boundary condition with taking temperature-dependent transport coefficient in to account, we obtain the propagation for each atmospheric parameter and presented in graphically as a function of geometrically position and time. All of the parameters oscillating with respect to time and satisfy the characteristics of atmospheric wave. \\ \\ Finally, the effect of the Coriolis force on resultant velocity were also discussed by plotting contour lines for the resultant velocity for different magnitude of Coriolis force, then we also obtain an interesting wave phenomena for the respective rotation of the Coriolis force. Generally, the above research result highly sensitive to the initial given value of the parameters ,longitude and latitude grid size,and on time scale. Our future work shall be towards evolution of three dimensional governed equation taking compressible ionized fluid with latitudinal dependent acceleration due to gravity. \section*{Acknowledgments} The first author gratefully acknowledges financial support from Addis Ababa University and Mizan-Tepi University for enabling him to carry out this research. The authors would also like to thank The International Science Programme, Uppsala University, Sweden for the support they have provided to our research group.
\section{Introduction} \vspace{-2mm} As a significant task in computer vision, semantic segmentation aims at producing pixel-wise labels for images, and has been widely applied to many different scenes such as auto driving and scene understanding. However, semantic segmentation usually yields unsatisfying performance without enough labeled training samples. What's more, it's very difficult to apply supervised semantic segmentation to the emergent diverse applications since preparing the pixel-wise annotations is time-consuming and expensive. Therefore, supervised learning based methods are unable to meet the requirements of current image segmentation tasks. \begin{figure}[t] \centering \includegraphics[width=0.49\textwidth]{./figure/net.png} \caption{Flowchart of category-adaptive domain adaption approach. Firstly, data from two domains are processed by a style gap bridging mechanism based on adversarial learning, then to boost the performance of SSL, category-adaptive thresholds are adopted to balance the probability of chosen pseudo labels for each category.} \label{fig:network_figure} \vspace{-4mm} \end{figure} Domain adaptation (DA) offers a solution for semantic segmentation without huge amount of labeled training samples. It aims to apply a model pretrained on the source dataset to generalize on the target dataset. However, there usually exists huge gaps among datasets, which can be categorized into two folds: content-based gap and style-based gap. Content-based gap is caused by inter-dataset amount and frequency discrepancy of categories, which can be alleviated by choosing datasets with similar scenes so that it is often neglected for convenience. The style-based gap refers to the difference of illumination, things' texture and so on. However, modelling the style information is still an open academic problem. It has been illustrated that the shallow layers of CNN extract low-level features (e.g., edges) while the deep layers extract high-level features (e.g., objects) \cite{zeiler2011adaptive}. Based on the fact that different convolutional kernels are computed independently, most literatures regard channel-wise statistics of extracted features as the style information, such as correlation-based Gram matrix \cite{gatys2015neural}, means and standard deviations (evaluated by AdaIN \cite{huang2017arbitrary}). Without loss of generality, in this paper, we adopt the means to model the style information by global average pooling process. However, narrowing the content-based gap is still full of challenges. Moreover, great advances have been achieved on domain adaptation with SSL, whose key is pseudo labeling mechanism. It solves the problem of lacking available annotations on the target domain. CBST \cite{zou2018unsupervised} introduces the amount of each category as one optimization term so as to balance the probability of pseudo labels of each category. However, each iteration of SSL requires the ordering operation, which is time-consuming. BDL \cite{li2019bidirectional} directly sets a fixed confidence threshold for all categories, and the pseudo labels are obtained when corresponding confidence scores are above such a threshold. However, the fixed threshold mechanism suffers from varying numbers of pseudo labels for different categories, which unavoidably hurts the final segmentation performance. ADVENT \cite{vu2019advent} introduces the category-wise ratio priors on source domain to guide the pseudo label selection. Nevertheless, it still remains challenging to avoid choosing pseudo labels biased towards easy categories. In this paper, to address the above issues, we propose a category-adaptive domain adaptation approach for semantic segmentation, as illustrated in Fig. \ref{fig:network_figure}. First, adversarial learning is introduced into \textit{style gap bridging mechanism}, in place of widely-used mean squared error (MSE) as an optimization term \cite{li2019high, hou2020source}, since the high dimensional style vector follows such a complex distribution that Gaussian distribution assumption is ill-suited. Further, to balance the probability of chosen pseudo labels for each category, we propose a \textit{category-adaptive threshold method} to construct pseudo labels for SSL. The category-adaptive confidence thresholds are learned for different categories according to their respective contributions. The main contributions of this paper are summarized as follows: \vspace{-0.3em} \begin{enumerate} \item We propose a \textit{style gap bridging} mechanism based on adversarial learning, which narrows the style-based gap to help alleviate the domain discrepancy. \vspace{-0.3em} \item We propose a \textit{category-adaptive threshold} mechanism for pseudo labeling to help SSL on the target domain images. \vspace{-0.3em} \item We conduct a series of experiments on cross-domain segmentation task and verify the effectiveness and superiority of our method. \end{enumerate} \vspace{-6mm} \section{PROPOSED METHOD} \vspace{-2mm} \label{sec:format} \begin{figure*}[!htbp] \begin{center} \includegraphics[width=0.8\linewidth]{./figure/framework.png} \end{center} \caption{The framework of our proposed model. Noting that content-based gap is not taken into account, here we take two datasets with regard to urban streetscape for example. The blue flow shows the process of the source domain images, while the red flow shows the process of the target domain images. The encoder module and decoder module are shared for two domain images, where the style extractor is achieved by global average pooling process. The model is firstly trained on the source domain in a supervised manner. Then it is trained on the target domain with SSL, where the pseudo labels for each category are filtered by the corresponding category-adaptive threshold.} \label{framework} \vspace{-4mm} \end{figure*} The framework of our proposed model is shown in Fig. \ref{framework}. Firstly, the model is trained on both domain data, where the style information between both domains is aligned as close as possible. It is worth noticing that data of the target domain are lack of pixel-wise domain annotations. Then pseudo labels are chosen based on the prediction of pretrained model on target domain. At last, SSL is conducted on the target domain by virtue of chosen pseudo labels. \vspace{-5mm} \subsection{Style Gap Bridging Mechanism} \label{encoder} The core of our encoder is to keep content information, meanwhile, decrease style information as much as possible, since the semantic performance heavily depends on content information. Therefore, it is reasonable to narrow the gaps of style information between source domain images and target domain images. In this paper, without loss of generality, we leverage \textit{global average pooling} as the style extractor in Fig. \ref{framework}, since channel-wise statistics are demonstrated related to style information \cite{huang2017arbitrary}. Previous works \cite{li2019high, hou2020source} usually apply MSE as style constraints, however, MSE performs worse on data with high dimensions and is limited by the linearity and Gaussianity assumptions \cite{lu2013correntropy}. By contrast, adversarial learning is theoretically proved to narrow the gap between two high-dimensional distributions. In practice, with the help of style discriminators (i.e., $D_f^1$ and $D_f^2$), we apply adversarial loss on style information $S_{*n}$ extracted from 2 front sub-encoder modules (i.e., $E_c^1$ and $E_c^2$ in Fig.\ref{framework}), where $*= s/ t$ denotes the source domain / target domain, $n=\{1,2\}$. \vspace{-5mm} \subsection{Pseudo labeling for target domain} \label{Pseudo labeling} Here we propose a category-adaptive threshold method for SSL. The idea is based on the hypothesis that the pretrained model's performances on different categories are different because of the uneven prior distributions of different categories. For example, the category ``road'' accounts a lot while the category ``train'' is just the reverse. Therefore, the confidence threshold should vary among different categories. Based on the clustering method of \cite{zhang2019category} where the threshold is defined by the Euclidean distance between target features and category centroids, we consider that each intra-category feature makes different contributions to the category centroids because the prediction confidence varies. Consequently, based on the given model's output on the target domain $P_t \in \mathbb{R}^{H_t\times W_t \times C}$, we firstly define a confidence-weighted target domain-based category centroid $f^l \in \mathbb{R}^C$: {\setlength\abovedisplayskip{0.8pt}\setlength\belowdisplayskip{0.8pt} \begin{align} f^l = \frac{1}{|P^l|}\sum_{h=1}^{H_t}\sum_{w=1}^{W_t}\sum_{c=1}^{C}\hat{y}_t^{hwc}P_t^{hwc}, \end{align} }where $P^l$ denotes the collection of prediction confidence of all pixels decided as $l$-th category, $|P^l|$ denotes the cardinality of $P^l$. $\hat{y}_t^{hwc}=\mathbbm{1}_{[c=\mathop{\arg\max}\limits_{c'}p_T^{hwc'}]}$ , and $\mathbbm{1}$ is the binary indicator function. Given $f^l$ in each category, our threshold is based on the entropy distance. The entropy of prediction vector at the $h$th row and $w$th column $P_t^{hw} \in \mathbb{R}^C$ is: {\setlength\abovedisplayskip{0.8pt}\setlength\belowdisplayskip{1pt} \begin{align} \label{entropy} E(P_t^{hw}) = -\sum_{i=1}^{C}P_t^{hwc}\log P_t^{hwc}. \end{align} } The entropy of category centroid $f^l$, namely $E(f^l)$ is similar with Equation \eqref{entropy}. Intuitively, $E(P_t^{hw})$ decreases as the max confidence in $P_t^{hw}$ increases, consequently we choose entropy-based threshold. Here we defined an indicator variable $m_t^{hwc}$ to decide whether the prediction on current position is chosen as available pseudo labels: {\setlength\abovedisplayskip{1pt}\setlength\belowdisplayskip{1pt} \begin{align} \label{modified_pl} m_t^{hwc} = \mathbbm{1}_{[E(P_t^{hw})<E(f^l)-\vartriangle]}, \end{align} } \vspace{-3mm} \noindent where $\vartriangle$ is a manually fixed hyperparameter to control the threshold for each category. When $\vartriangle$ increases, the number of available pseudo labels decreases while the model will have higher prediction confidence and vice versa. \vspace{-3mm} \subsection{Loss Functions} \label{loss} \vspace{-1mm} As mentioned above, the training process includes two phases: domain adaptation training and SSL. Domain adaptation training process utilizes the following three losses: \textbf{Segmentation Loss.} Here cross entropy function is applied to penalize the error between prediction $\hat{y}_s \in \mathbb{R}^{H_s \times W_s \times C}$ and one-hot ground truth $y_s \in \mathbb{R}^{H_s \times W_s \times C}$: {\setlength\abovedisplayskip{1pt}\setlength\belowdisplayskip{1pt} \begin{align} \mathcal{L}_{seg} = -\frac{1}{H_s \times W_s}\sum_{h=1}^{H_s}\sum_{w=1}^{W_s}\sum_{c=1}^{C}y_s^{hwc}\log\hat{y}_s^{hwc}. \end{align} } \textbf{Output-based Domain Adaptation Loss.} Consistent with BDL~\cite{li2019bidirectional}, we also leverage the original GAN loss introduced by Goodfellow \cite{goodfellow2014generative} as $\mathcal{L}_{adv\_seg}$ to achieve domain adaptation on models' output between the source domain and the target domain, which is achieved by means of the segmentation discriminator $D_c$. \textbf{Style Loss.} To help the encoder module $E_c$ extract style-independent features, $\mathcal{L}_{style}$ also utilizes the original GAN loss \cite{goodfellow2014generative} to force the style information on the source domain $S_{sn}$ close that on the target domain $S_{tn}$. The loss function during domain adaptation training is summarized as follows {\setlength\abovedisplayskip{1pt}\setlength\belowdisplayskip{1pt} \begin{align} \label{loss_function} \mathcal{L} = \lambda_{seg} \mathcal{L}_{seg} + \lambda_{adv\_seg} \mathcal{L}_{adv\_seg} +\lambda_{style} \mathcal{L}_{style}, \end{align}}where $\lambda$s play a trade-off among these three terms. During the SSL process, similar with $\mathcal{L}_{seg}$, \textbf{Self-supervised Loss} $\mathcal{L}_{ssl}$ also utilizes cross entropy function to make the prediction on the target domain $\hat{y}_t \in \mathbb{R}^{H_t\times W_t\times C }$ as close as possible to pseudo labels $y_t \in \mathbb{R}^{H_t\times W_t\times C}$: {\setlength\abovedisplayskip{1pt}\setlength\belowdisplayskip{1pt} \begin{align} \mathcal{L}_{ssl} = -\frac{1}{H_t\times W_t}\sum_{h=1}^{H_t}\sum_{w=1}^{W_t}\sum_{c=1}^{C}m_t^{hwc}\hat{y}_t^{hwc}logP_t^{hwc}. \end{align} } \vspace{-5mm} \section{Experimental Results} Here we evaluate our model on ``GTA5 to Cityscapes'' task. \vspace{-2mm} \subsection{Datasets} \label{dataset} \vspace{-2mm} \textbf{GTA5 \cite{richter2016playing}} includes 24966 synthetic images collected from the game engine. GTA5 have 19-category pixel-accurate annotations compatible with target domain Cityscapes \cite{cordts2016cityscapes}. \textbf{Cityscapes \cite{cordts2016cityscapes}} is collected from streetscapes in 50 different Germany cities includes training set with 2975 images, validation set with 500 images, testing set with 1525 images. The former two sets contain pixel-wise semantic label maps, while the annotations of testing set are missing. To validate the performance of our model, during testing phase, we use validation set instead of testing set. \vspace{-3mm} \subsection{Network Architectures and Implementation Details.} \label{network} The whole framework of our model is shown in Fig. \ref{framework}. The encoder module follows DeepLab V2 \cite{chen2017deeplab} using ResNet101 \cite{he2016deep} as backbone. The parameters are tuned based on weights pretrained on ImageNet \cite{krizhevsky2017imagenet}. The discriminator $D_c$ for output-based domain adaptation applies PatchGAN \cite{DBLP:journals/corr/IsolaZZE16} to output a 16x downsampled confidence probability map relative to the input semantic segmentation map. The style discriminator $D_f$ also utilizes PatchGAN \cite{DBLP:journals/corr/IsolaZZE16}, but it applies four 1-D convolutional layers with kernel size of 4. All modules are parameter-shared except the style discriminators (i.e., $D_f^1$ and $D_f^2$), and segmentation discriminator $D_c$. Note that the all game-synthetic source domain images (GTA5 datasets) are firstly translated by CycleGAN \cite{zhu2017unpaired} module of BDL model \cite{li2019bidirectional}. SGD optimizer with $momentum = 0.9$ is used to train encoder $E_c$ and decoder modules, where encoder $E_c$ adopts learning rate $lr = 2.5\times 10^{-4}$, the decoder adopts $lr = 2.5 \times 10^{-3}$. For style discriminator $D_f$ and segmentation discriminator, Adam optimizer is utilized with $\beta=(0.9,0.99)$ and $lr = 1\times 10^{-4}$. In addition, ``poly'' policy for learning rate update with $max step=250,000$ and $power=0.9$ is introduced to encoder $E_c$ and decoder. $\lambda_{seg}, \lambda_{adv\_seg}, \lambda_{style}$ in Equation \eqref{loss_function} are set $1$, $1\times 10^{-3}$, $1\times 10^{-3}$, respectively. Style discriminator $D_f$ and segmentation discriminator $D_c$ utilize exponential decay policy to update $lr$, where $decay\_rate=0.1$, $decay\_steps=50000$. Two rounds of SSL are applied in our experiments. \vspace{-5mm} \subsection{Results} \label{results} \vspace{-1mm} \textbf{Quantitative results:} The results of different related baselines are shown in Table \ref{tab:comparison_gta5}. Consistent with previous work, mIoU metric on 19 specific categories is adopted, where the best result on each category is highlighted in bold. Our model has a gain of 1.7 in overall mIoU rather than the state-of-the-art BDL. In addition, compared to another category-balanced SSL model CBST, our model brings +3.2\% mIoU improvement, which demonstrates the superiority of our proposed pseudo labeling method. \begin{table*}[!htp] \scriptsize \centering \caption{Comparison among different methods for ``GTA5 to Cityscapes''} \label{tab:comparison_gta5} \setlength{\tabcolsep}{3pt} \resizebox{0.95\textwidth}{!}{ \begin{tabular}{ccccccccccccccccccccc} \hline \multicolumn{21}{c}{{ GTA5 $\rightarrow$ Cityscapes}} \\ \hline {Method} & \rotatebox{90}{road} & \rotatebox{90}{sidewalk} &\rotatebox{90}{building} & \rotatebox{90}{wall} & \rotatebox{90}{fence} & \rotatebox{90}{pole} & \rotatebox{90}{t-light} & \rotatebox{90}{t-sign} & \rotatebox{90}{vegetation} & \rotatebox{90}{terrain} & \rotatebox{90}{sky} & \rotatebox{90}{person} & \rotatebox{90}{rider} & \rotatebox{90}{car} & \rotatebox{90}{truck} & \rotatebox{90}{bus} & \rotatebox{90}{train} & \rotatebox{90}{motorbike} & \rotatebox{90}{bicycle} & mIoU\\ \hline CBST\cite{zou2018unsupervised} &89.6 &\bf{58.9} &78.5 &33.0 &22.3 &\bf{41.4} &\bf{48.2} &39.2 &83.6 &24.3 &65.4 &49.3 &20.2 &83.3 &39.0 &48.6 &\bf{12.5} &20.3 &35.3 &47.0\\ \hline Cycada \cite{hoffman2018cycada} & 86.7 & 35.6 & 80.1 & 19.8 & 17.5 & {{38.0}} & {39.9} & {\bf{41.5}} & 82.7 & 27.9 & 73.6 & {\bf{64.9}} & 19 & 65.0 & 12.0 & 28.6 & 4.5 & 31.1 & {42.0} & 42.7 \\ \hline ADVENT \cite{vu2019advent} & 87.6 & 21.4 & 82.0 & 34.8 & 26.2 & 28.5 & 35.6 & 23.0 & 84.5 & 35.1 & 76.2 & 58.6 & 30.7 & 84.8 &34.2 & 43.4 & 0.4 & 28.4 & 35.2 & 44.8\\ \hline DCAN \cite{wu2018dcan} & 85.0 & 30.8 & 81.3 & 25.8 & 21.2 & 22.2 & 25.4 & 26.6 & 83.4 & 36.7 & 76.2 & 58.9 & 24.9 & 80.7 & 29.5 & 42.9 & 2.5 & 26.9 & 11.6 & 41.7 \\ \hline CLAN \cite{luo2019taking} & 87.0 & 27.1 & 79.6 & 27.3 & 23.3 & 28.3 & 35.5 & 24.2 & 83.6 & 27.4 & 74.2 & 58.6 & 28.0 & 76.2 & 33.1 & 36.7 & 6.7 & {\bf{31.9}} & 31.4 & 43.2 \\ \hline BDL \cite{li2019bidirectional} & {91.0} & {44.7} & {84.2} & {34.6} & {\bf{27.6}} & 30.2 & 36.0 & 36.0 & \textbf{85.0} & {\bf{43.6}} & {83.0} & 58.6 & {31.6} & {83.3} & {35.3} & {49.7} & 3.3 & 28.8 & 35.6 & {48.5} \\ \hline Ours & \bf{91.7} & {{51.1}} & {\bf{85.0}} & \bf{38.7} & {26.7} & 32.1 & 38.1 & 34.6 & 84.3 & {38.6} & \bf{84.9} & 60.7 & \bf{32.8} & \bf{85.2} & {\bf{41.9}} & {\bf{49.8}} & 2.8 & 28.5 & \bf{45.0} & \bf{50.2} \\ \hline \end{tabular} } \vspace{-1em} \end{table*} \vspace{-3mm} \begin{figure}[!h] \centering \begin{subfigure}[b]{0.24\linewidth} \centering \includegraphics[width=\linewidth]{images/ori} \end{subfigure} \begin{subfigure}[b]{0.24\linewidth} \centering \includegraphics[width=\linewidth]{images/label} \end{subfigure} \begin{subfigure}[b]{0.24\linewidth} \centering \includegraphics[width=\linewidth]{images/gta2cs_BDL} \end{subfigure} \begin{subfigure}[b]{0.24\linewidth} \centering \includegraphics[width=\linewidth]{images/gta2cs_Ours} \end{subfigure} \\ \vspace{.05cm} \begin{subfigure}[b]{0.24\linewidth} \centering \includegraphics[width=\linewidth]{images/ori3} \end{subfigure} \begin{subfigure}[b]{0.24\linewidth} \centering \includegraphics[width=\linewidth]{images/label3} \end{subfigure} \begin{subfigure}[b]{0.24\linewidth} \centering \includegraphics[width=\linewidth]{images/gta2cs_BDL_3} \end{subfigure} \begin{subfigure}[b]{0.24\linewidth} \centering \includegraphics[width=\linewidth]{images/gta2cs_Ours_3} \end{subfigure} \\ \vspace{.05cm} \begin{subfigure}[b]{0.24\linewidth} \centering \includegraphics[width=\linewidth]{images/ori6} \caption{\label{fig:a}Image} \end{subfigure} \begin{subfigure}[b]{0.24\linewidth} \centering \includegraphics[width=\linewidth]{images/label6} \caption{\label{fig:b}GT} \end{subfigure} \begin{subfigure}[b]{0.24\linewidth} \centering \includegraphics[width=\linewidth]{images/gta2cs_BDL_6} \caption{\label{fig:c}BDL(gta2cs)} \end{subfigure} \begin{subfigure}[b]{0.24\linewidth} \centering \includegraphics[width=\linewidth]{images/gta2cs_Ours_6} \caption{\label{fig:d}Ours(gta2cs)} \end{subfigure} \caption{\label{fig}Qualitative comparisons. From left to right: (a) Original Cityscape images, (b) Ground truth, (c) BDL on ``GTA5 to Cityscapes'', (d) Ours on ``GTA5 to Cityscapes''.} \label{qualitative} \end{figure} \vspace{-2mm} \begin{table}[!hbt] \caption{Ablation study on SSL and style constraints.} \centering \scriptsize \resizebox{0.6\linewidth}{!}{ \begin{tabular}{cc} \hline \multicolumn{2}{ c }{{ GTA5 $\rightarrow$ Cityscapes}} \\ \hline model & mIoU \\ \hline original & 44.6 \\ \hline original + adv & 45.5\\ \hline original + adv + SSL once & 48.5\\ \hline original + adv + SSL twice & 50.2\\ \hline \end{tabular} \label{tab:ablation} \vspace{-1em} } \end{table} \vspace{-3mm} \textbf{Ablation Study:} Our main contributions consist of a novel pseudo labeling mechanism for SSL and adversarial learning based style gap bridging mechanism. Table \ref{tab:ablation} illustrates the influence of each part, where ``original'' denotes the model without these two parts, ``adv'' implies style constraints in an adversarial manner and ``SSL once'' and ``SSL twice'' refer to using SSL once and twice, respectively. It can be seen that style constraints help improve the performance with a gain of 0.9 on mIoU, which demonstrates that adversarial learning indeed narrows the style gap between two domains. In addition, SSL is also helpful to boost performance since ``SSL once'' brings a gain of 3.0 and ``SSL twice'' achieves 50.2, which is 4.7\% superior to that without SSL module. In addition, to compare different style gap bridging mechanisms, we also conduct check experiments (no SSLs) with the same settings. The results are shown in Table \ref{tab:style}, where ``mean \& std" refers to the channel-wise means and standard deviations of given features. Note that our method does not exploit second order statistics compared with the left two methods but outperforms Gram matrix based and ``mean \& std" based methods with a gain of 0.8 and 0.4, which demonstrates the superiority of adversarial learning as the style gap bridging mechanism compared to MSE constraints. \vspace{-2mm} \begin{table}[!hbt] \caption{Comparison on style gap bridging mechanisms} \centering \scriptsize \label{style_modeling} \resizebox{0.75\linewidth}{!}{ \begin{tabular}{c|c|c} \hline \multicolumn{1}{p{2cm}|}{\centering style gap bridging mechanism} & \multirow{1}[3]{*}{style modeling} & \multirow{1}[3]{*}{mIoU} \\ \hline \multirow{2}{*}{MSE} & Gram matrix & 44.7 \\ \cline{2-3} & mean \& std & 45.1 \\ \hline adversarial learning & mean (Ours) & 45.5 \\ \hline \end{tabular} \label{tab:style} \vspace{-1em} } \end{table} \vspace{-1mm} \textbf{Qualitative results:} Some segmentation examples are shown in Fig. \ref{qualitative}. It can be clearly observed that our method makes less visually obvious prediction errors than BDL, \vspace{-5mm} \section{Conclusion} \label{sec:conclusion} \vspace{-3mm} In this paper, we proposed a style gap bridging mechanism and category-adaptive threshold method for SSL on cross-domain semantic segmentation task. The former utilizes adversarial training to narrow the gaps of style information. The latter makes the use of prior semantic distributions to dynamically choose thresholds for self-supervised training on the target domain images, instead of applying fixed thresholds. A series of experiments have shown the effectiveness and superiority of our proposed model. \vspace{-4mm} \section{Acknowledgement} \vspace{-2mm} This work is supported in part by the National Key R\&D Program of China under Grant 2018YFA0701601, and in part by the fellowship of China National Postdoctoral Program for Innovative Talents (BX20200194). \bibliographystyle{IEEEtran}
\section{Introduction} Person re-identification (ReID) aims at identifying a specific person across cameras, times, and locations. Abundant approaches have been proposed to address the challenging geometric misalignment among person images caused by diversities of human poses~\cite{su2017pose,zhao2017spindle,qian2018pose}, camera viewpoints~\cite{zhang2016learning,sun2019dissecting,jin2020uncertainty}, and style/scales~\cite{jin2020semantics,jin2020style}. These methods usually inadvertently assume that both query and gallery images of the same person have the \emph{same clothing}. In general, they perform well on the trained short-term datasets but suffer from significant performance degradations when testing on a long-term collected ReID dataset~\cite{yang2019person,qian2020long,yu2020cocas,wan2020person}. Because large clothing variations occur over long-duration among these datasets, which seriously hinders the accuracy of ReID. For example, Figure~\ref{fig:motivation}(a) shows a realistic wanted case~\footnote{Information comes from https://www.wjr.com/2016/01/06/woman-wanted-in-southwest-detroit-bank-robbery/} where a suspect that captured by surveillance devices at different times/locations changed her coat from black to white, which makes ReID difficult, especially when she wears a mask and the captured images are of low quality. \begin{figure} \centerline{\includegraphics[width=1.0\linewidth]{motivation.pdf}} \vspace{-3mm} \caption{(a) shows a realistic wanted case that a suspect changed her coat from black to white for hiding. (b) reveals that the gait of person could help ReID, especially when the identity matching meets the cloth-changing challenge (All faces in the images are masked for anonymization).} \vspace{-5mm} \label{fig:motivation} \end{figure} In recent years, to handle the cloth-changing ReID (CC-ReID) problem, some studies have contributed some new datasets where clothing changes are commonplace (\egno, Celebrities-reID~\cite{huang2019beyond,huang2019celebrities}, PRCC~\cite{yang2019person}, LTCC~\cite{qian2020long}, Real28 and VC-Clothes~\cite{wan2020person}). They also propose some new algorithms that could learn cloth-agnostic representations for CC-ReID. For instance, Yang~\etal~\cite{yang2019person} propose a contour-sketch-based network to overcome the moderate cloth-changing problem. Similarly, Qian~\etal~\cite{qian2020long}, Li~\etal~\cite{li2020learning}, and Hong~\etal~\cite{hong2021fine} all use body shape to tackle the CC-ReID problem. However, no matter of using a contour sketch or body shape, all these methods are prone to suffer from the estimation error problem. Because the single-view contour/shape inference (from 2D image) is extremely difficult due to the vast range of possible situations, especially when people wear thick clothes in winter. Besides, these contour-sketch-based or shape-based methods only focus on extracting \emph{static spatial cues} from persons as extra cloth-agnostic representations, the rich \emph{dynamic motion information} (\egno, gait, implied motion~\cite{kourtzi2000activation}) are often ignored. In this paper, we explore to leverage the unique gait features that imply dynamic motion cues of a pedestrian to drive a model to learn cloth-agnostic and discriminative ReID representations. As shown in Figure~\ref{fig:motivation}(b), although it is hard to identify the same person when he/she wears different clothes, or to distinguish the different persons when they wear similar/same clothes, we can still leverage their unique/discriminative gaits to achieve correct identity matching. It is because that gait, as a unique biometric feature, has the superior invariance compared with other easy-changing appearance characteristics, \egno, face, body shape, contour~\cite{liu2015enhancing,zhang2018long}. Besides, gait can be authenticated at a long distance even with low-quality camera imaging. Unfortunately, existing gait-related studies mainly rely on large video sequences~\cite{chao2019gaitset,Fan_2020_CVPR}. Capturing videos requires time latency and saving videos needs a large hardware storage cost, which are both undesirable for the real-time ReID applications. {Even the recent work~\cite{xugait2020gait} first attempts to achieve gait recognition from a single image, how to leverage gait feature to handle CC-ReID problem from a single image is still under-studied and this task is more challenging due to the potential viewpoint-variations and occlusions.} In this paper, we propose a \textbf{G}ait-assisted \textbf{I}mage-based \textbf{ReID} framework, termed as GI-ReID, which could learn cloth-agnostic ReID representations from a single image with the gait feature assistance. GI-ReID consists of a main image-based ReID-Stream and an auxiliary gait recognition stream (Gait-Stream). Figure~\ref{fig:pipeline} shows the entire framework. The Gait-Stream aims to regularize the ReID-Stream to learn cloth-agnostic features from a single RGB image for effective CC-ReID. It is discarded in the inference for the high efficiency. Since the comprehensive gait features extraction typically needs a gait video sequence as input~\cite{chao2019gaitset,Fan_2020_CVPR}, we introduce a new Gait Sequence Prediction (GSP) module for Gait-Stream to approximately forecast continuous gait frames from a single input query image, which enriches the learned gait information. Finally, to encourage the main ReID-Stream's efficient learning from Gait-Stream, we further enforce a high-level Semantics Consistency (SC) constraint for the same person over two streams' features. We summarize our main contributions as follows: \begin{itemize}[leftmargin=*,noitemsep,nolistsep] \item We specially aimed at handling the challenging cloth-changing issue for image ReID to promote practical applications. A Gait-assisted Image-based cloth-changing ReID (GI-ReID) framework is proposed. As a regulator, the Gait-Stream in GI-ReID can be removed in the inference without sacrificing ReID performance. This reduces the dependency on the accuracy of gait recognition, making our method computationally efficient and robust. \item A well-designed Gait Sequence Prediction (GSP) module makes our method effective in the challenging image-based ReID scenarios. And, a high-level semantics consistency (SC) constraint enables an effective regularization over two streams, enhancing the distinguishing power of ReID-Stream under the cloth-changing setting. \end{itemize} With the gait prediction and regularization, GI-ReID achieves a state-of-the-art performance on the image-based cloth-changing ReID. It is also general enough to be compatible with the existing ReID-specific networks, except ResNet-50~\cite{he2016deep}, we also use OSNet~\cite{zhou2019omni}, LTCC-shape~\cite{qian2020long}, and PRCC-contour~\cite{yang2019person} as our baselines for evaluation. \begin{figure*} \centerline{\includegraphics[width=0.99\linewidth]{pipelineV11.pdf}} \vspace{-1mm} \caption{Overview of the proposed GI-ReID, which consists of \emph{ReID-Stream} and \emph{Gait-Stream}, they are jointly trained with a high-level Semantics Consistency (SC) constraint. The \emph{Gait-Stream} plays the role of a regulator to drive \emph{ReID-Stream} to learn cloth-agnostic representations from a single image, and it is \textbf{discarded} in the inference for computational efficiency. Gait Sequence Prediction (GSP) module aims at predicting gait frames from an image. GaitSet~\cite{chao2019gaitset} is responsible for extracting discriminative gait features.} \label{fig:pipeline} \vspace{-5mm} \end{figure*} \vspace{-2mm} \section{Related Work} \subsection{Person Re-identification} \noindent\textbf{General ReID.} Without cloth-changing cases, the general ReID has achieved a great success with the deep learning. It includes exploring fine-grained pedestrian feature descriptions~\cite{sun2018beyond,wang2018learning,fu2019horizontal,zhou2019omni}, and addressing spatial misalignment caused by (a) different camera viewpoints~\cite{sun2018dissecting,jin2020uncertainty}, (b) different poses~\cite{su2017pose,ge2018fd,qian2018pose}, (c) semantics inconsistency~\cite{zhang2019DSA,jin2020semantics}, (d) occlusion/partial-observation~\cite{zhuo2018occluded,miao2019pose,zheng2015partial,he2018deep}, \etcno. These methods rely substantially on static spatial texture information. However, when person ReID meets changing clothes, the texture information is not so reliable since it changes significantly even for the same person. Compared to static texture, the gait information, as a discriminative biometric modality, is more consistent and reliable. \noindent\textbf{Cloth-Changing ReID.} Considering the wider application range and greater practical value of Cloth-Changing ReID (CC-ReID), more and more studies pay their attention to solve this challenging problem. Huang~\etal~\cite{huang2019beyond,huang2019celebrities} propose to use vector-neuron capsules~\cite{sabour2017dynamic} to perceive cloth changes of the same person. Yang~\etal~\cite{yang2019person}, Qian~\etal~\cite{qian2020long}/ Li~\etal~\cite{li2020learning}, Yu~\etal~\cite{yu2020cocas}/Wan~\etal~\cite{wan2020person} propose to leverage contour sketch, body shape, face/hairstyle to assist ReID under the cloth-changing setting, respectively. Nevertheless, these methods usually suffer from estimation error due to the difficulty of obtaining external cues (\egno, body shape, face, \etcno). Besides, they also ignore the exploration of discriminative dynamic motion cues, like gait. FITD~\cite{zhang2018long} solves the cloth-changing ReID problem based on true motion cues {of videos}. Our work differs from FITD for at least three perspectives: 1). FITD uses motion information derived from dense trajectories (optical flow), which requires continuous \textbf{video sequences}. Our GI-ReID handles cloth-changing ReID from \textbf{a single image} with gait prediction and regularization, which is more challenging and practical. 2). FITD directly uses human motion cues to complete ReID, which relies on the accurate motion prediction and may suffer from estimation errors. Our GI-ReID just takes the gait recognition task as a regulator to drive the main ReID model to learn cloth-independent features, which makes our method less sensitive to gait estimation errors. 3). FITD only characterizes temporal motion patterns for ReID, ignoring other distinguishable local spatial cues, like personal belongings (\egno, backpacks). Our GI-ReID not only explores dynamic gait cues, but also learns from raw RGB images, leading more comprehensive features. \begin{table} \vspace{1mm} \scriptsize \caption{Differences between Gait Recognition and CC-ReID.} \vspace{-2mm} \setlength{\tabcolsep}{0.5mm}{ \begin{tabular}{|c|c|c|} \hline Task & Gait Recognition & Cloth-Changing Person ReID \\ \hline Data format & \begin{tabular}[c]{@{}c@{}}Gait Energy Image (GEI) / \\ Sequence set of silhouette / \\ Video sequences\end{tabular} & \begin{tabular}[c]{@{}c@{}}\textbf{Discontinuous} RGB images \\ across cameras\end{tabular} \\ \hline {Datasets} & \begin{tabular}[c]{@{}c@{}}USF, CASIA-B, \\ OU-ISIR, OU-MVLP, \etcno.\end{tabular} & \begin{tabular}[c]{@{}c@{}}COCAS, PRCC, LTCC, \\ Real28, VC-Clothes, \etcno.\end{tabular} \\ \hline \begin{tabular}[c]{@{}c@{}}Unsolved \\ problems \end{tabular} & \begin{tabular}[c]{@{}c@{}}1) Viewing angles (\egno, frontal view); \\ 2) Occlusion, body incompleteness; \\ 3) Cluttered/complex background;\end{tabular} & Clothes variation \\ \hline \end{tabular}} \vspace{-6mm} \label{dff_comparison}% \end{table} \vspace{-1mm} \subsection{Gait Recognition and Prediction} \vspace{-1mm} \noindent\textbf{Gait recognition}~\cite{muramatsu2014gait,liu2015enhancing,makihara2017joint,chao2019gaitset,carley2019person,li2020gait,Fan_2020_CVPR,elharrouss2020gait,xugait2020gait} directly uses gait sequence for identity matching, which is also cloth-independent, but different from our work and cannot be directly applied into {image-based cloth-changing ReID}. We clarify the differences between two tasks in detail in Table~\ref{dff_comparison}: this paper focuses on image-based cloth-changing ReID where large viewpoint variations, occlusion, and complex environments make gait recognition failed. And, these gait sequence based methods are not optimal for the image-based CC-ReID. Thus, we just take the gait recognition as an auxiliary regularization to drive ReID model to learn cloth-agnostic representations, which makes our method robust to the recognition errors. Moreover, the gait representations can be grouped into model-based~\cite{nixon2009model,liao2020model,li2020end} and appearance-based~\cite{carley2019person,chao2019gaitset,Fan_2020_CVPR}. The first one relies on human pose, while the latter relies on silhouettes. We use silhouette as gait representation for simplicity and robustness. \noindent\textbf{Gait Prediction} from a single frame, or said, the field of video frame prediction (\textit{i}.\textit{e}., motion prediction) has been widely studied and achieved a great success~\cite{guen2020disentangling,hsieh2018learning,liu2019deep,niklaus2018context,xugait2020gait}, which verifies the feasibility of our work. This task is very challenging, that’s why {we carefully design the gait sequence prediction module while indirectly using the prediction results} in a robust regularization manner to help cloth-changing ReID. \vspace{-1mm} \section{Proposed GI-ReID Framework} GI-ReID framework aims to fully exploit the unique human gait to handle the cloth-changing challenge of ReID just depending on a single image. Figure~\ref{fig:pipeline} shows the flowchart of the entire framework. Given a single person image, its silhouette (\textit{i}.\textit{e}., mask) will be first extracted as input to the Gait-Stream using semantic segmentation methods, such as PointRend~\cite{kirillov2020pointrend}. With the proposed gait sequence prediction (GSP) module, we could predict a gait sequence with more comprehensive gait information, which is then fed into the subsequent recognition network (GaitSet~\cite{chao2019gaitset}) to extract discriminative gait features. Through a high-level semantics consistency (SC) constraint, the cloth-independent Gait-Stream acts as a regulator to encourage the main ReID-Stream to capture cloth-agnostic features from a single RGB image. We discuss the details of each component in the following sections. \subsection{The Auxiliary Gait-Stream}\label{sec:gait_stream} Gait-Stream is composed of two parts: Gait Sequence Prediction (GSP) module and the pre-trained gait recognition network (GaitSet~\cite{chao2019gaitset}). GSP is designed for gait information augmentation. Then, GaitSet extracts cloth-independent and discriminative motion feature cues from augmented gait to guide/regularize ReID-Stream's training. \textbf{Gait Sequence Prediction (GSP) Module:}~\label{sec:GSP} GSP module aims to predict a gait sequence that contains continuous gait frames. This module is related to the general video frame prediction task (\textit{i}.\textit{e}., frame interpolation and extrapolation studies~\cite{niklaus2018context,hsieh2018learning,liu2019deep,guen2020disentangling}), and gait sequence prediction can be deemed as a ``gait frame synthesis'' process. As shown in Figure~\ref{fig:pipeline}, GSP is based on an auto-encoder architecture~\cite{doersch2016tutorial} with feature encoder $E$ and decoder $D$. In order to reduce the prediction ambiguity and difficulty (\egno, given a dangling arm, it is hard to guess whether it will rise or fall in the next frame), we manually integrate an extra prior information of \textbf{middle frame index} into the inner learned feature through a position embedder $P$ and a feature aggregator $A$. Intuitively, the \textbf{middle frame index} means that the input gait silhouette corresponds to the middle result of the predicted gait sequence. Such prior knowledge aims to drive GSP module to predict the adjacent walking statuses \emph{before and after} the current input walking status so as to reduce prediction ambiguity. \noindent\textbf{(1). Encoder.} Given a silhouette input $S$, the encoder $E$ aims to extract a dimension-shrinked compact feature: \vspace{-1mm} \begin{equation} \begin{aligned} f_S = E(S). \end{aligned} \end{equation} Specific/detailed network structures (including other components in Gait-Stream) can be found in \textbf{Supplementary}. \noindent\textbf{(2). Position Embedder and Feature Aggregator.\label{sec:middle}} Considering the prediction ambiguity~\cite{meyer2015phase}, we introduce a \emph{middle frame input principle}, which assumes that the input silhouette always corresponds to the \textbf{middle} one of the predicted gait sequence. During the GSP training, we take the gait frame in the middle position of the ground truth gait sequence as input to GSP, and use a one-dimensional vector $p \in \mathbb{R}^1$, to denote such \emph{position label}. Given a ground truth gait sequence with $N$ frames, the position label $p_{mid} \in \mathbb{R}^1$ of the input middle gait is defined as $p_{mid} = N // 2$ which indicates the relative position relationship of input frame to the entire sequence. For convenience, we convert position label to one-hot vector to calculate loss. In formula, the position embedder $P$ works as: \vspace{-1mm} \begin{equation} \begin{aligned} \widetilde{p} = P(S) \hspace{0.5mm} \in \hspace{0.5mm} \mathbb{R}^1, \hspace{3mm} \mathcal{L}_{position} = ||\widetilde{p}-p_{mid}||_2^2, \end{aligned} \label{eq:loss_position} \end{equation} where we compare the embedded position output $\widetilde{p}$ with the ground truth $p_{mid}$ to construct a \emph{position} loss $\mathcal{L}_{position}$. $P$ is to build a mapping between input and middle position. Feature aggregator $A$, implemented by a fully connected layer, is inserted between the encoder and the decoder to convert the raw encoded features $f_{S}$ into \emph{middle-position-aware} features $f_{S}^{\widetilde{p}}$ by taking the embedded middle position information $\widetilde{p}$ into account for the following decoder, which explicitly tells the decoder that we need to predict the gait statuses \emph{before and after} the current input middle gait status, and thus reduces prediction ambiguity for the predicted results. This feature aggregation process is formulated as: \begin{equation} \begin{aligned} f_S^{\widetilde{p}} = A([\hspace{0.5mm} f_S,\hspace{0.5mm} \widetilde{p} \hspace{0.5mm} ]), \end{aligned} \label{eq:aggregation} \end{equation} where $[\cdot]$ means a simple concatenation. \noindent\textbf{(3). Decoder.} We feed the aggregated feature $f_S^{\widetilde{p}}$ into the decoder $D$, which has a symmetrical structure to that of the encoder $E$, to predict the gait sequence with a pre-defined fixed number of frames $N$. Such process is formulated as, \begin{equation} \begin{aligned} \widetilde{R} = D(f_S^{\widetilde{p}}) \hspace{0.5mm} \in \hspace{0.5mm} \mathbb{R}^{N*h*w}, \hspace{3mm} \mathcal{L}_{pred.} = ||\widetilde{R} - GT||_2^2, \end{aligned} \label{eq:loss_pred} \end{equation} where $(h, w)$ denotes the $(height, width)$ of predicted gait frames, same as the input silhouette image. A prediction loss $\mathcal{L}_{pred.}$ is calculated to ensure the predicted gait sequence results is consistent with the ground truth (GT). \textbf{Gait Feature Extraction:} The predicted gait sequence $\widetilde{R}$ is fed into the pre-trained GaitSet~\cite{chao2019gaitset} to learn discriminative and cloth-independent gait feature $g$. GaitSet is a set-based gait recognition model that takes a set of silhouettes as an input and aggregates features over frames into a set-level feature, which is formulated as $g = GaitSet(\widetilde{R})$. More details are presented in \textbf{Supplementary}. \subsection{The Main ReID-Stream} The backbone of the ReID-Stream could be any of the off-the-shelf networks, such as commonly-used ResNet-50~\cite{he2016deep}, ReID-specific PCB~\cite{sun2018beyond}, MGN~\cite{wang2018learning}, and OSNet~\cite{zhou2019omni}. And, we use the widely-adopted classification loss~\cite{sun2018beyond,fu2019horizontal}, and triplet loss with batch hard mining \cite{hermans2017defense}) on the ReID feature vector $r$ as basic optimization objectives for training. The feature $r$ is finally used for reference. \subsection{Joint Learning of Two Streams} Due to the potential rough silhouette extraction and the gait sequence prediction errors of GSP module, it is very difficult to directly exploit the gait information alone to complete effective ReID. Experimentally, we have attempted to conduct CC-ReID with only the predicted gait sequence $\widetilde{R}$ as input, and found this scheme failed to deliver good results (see ablation study for more details). Therefore, to exploit the cloth-independent merits of the gait information while avoiding the above-mentioned issues, we propose to jointly train Gait-Stream and ReID-Stream through a high-level semantics consistency (SC) constraint, where gait characteristics is taken as a regulator to drive the cloth-agnostic feature learning of ReID-Stream. Note that the SC constraint is also not needed in the inference. \noindent\textbf{Semantics Consistency (SC) Constraint.} SC constraint is essentially related to the common feature learning works, such as knowledge distillation~\cite{hinton2015distilling}, mutual learning~\cite{zhang2018deep}, and knowledge amalgamation~\cite{ye2019student}. Our SC constraint differs from them mainly in two perspectives: 1). SC is to encourage a high-level common feature learning from two modalities (dynamic gait and static RGB image). 2). SC ensures information integrity for each stream/modality. The details of the SC constraint are shown in Figure~\ref{fig:pipeline}. The learned gait feature $g$ of Gait-Stream and ReID feature $r$ of ReID-Stream are first transformed to a common and interactable space, via an embedding layer: $\hat{r} = Emb.(r)$ and $\hat{g} = Emb.(g)$, where $\hat{r}$ and $\hat{g}$ have the same feature dimensions. Then, we enforce the transformed features $\hat{r}$ and $\hat{g}$ to be closed to each other by minimizing the Maximum Mean Discrepancy (MMD)~\cite{gretton2012kernel}. MMD is a distance metric to measure the domain mismatch for probability distributions. We use it to measure the high-level semantics discrepancy between the transformed features $\hat{r}$ and $\hat{g}$, and minimize it to drive ReID-Stream to pay more attention to cloth-independent gait biometric. An empirical approximation to the MMD distance of $\hat{r}$ and $\hat{g}$ is simplified as follows: \begin{equation} \begin{aligned} \mathcal{L}_{MMD} = \|{\mu}(\hat{g}) - {\mu}(\hat{r}) \|_2^2 + \|{\sigma}(\hat{g}) - {\sigma}(\hat{r}) \|_2^2, \end{aligned} \label{eq:loss_MMD} \end{equation} where $\mu(\cdot), \sigma(\cdot)$ denotes the mean, variance calculation functions for the transformed features $\hat{r}$ and $\hat{g}$. To avoid the information lost caused by feature regularization with SC constraint, we further enforce a reconstruction penalty to ensure that the transformed features $\hat{g}$ and $\hat{r}$ could be recovered to original versions. Specifically, we reconstruct the original output features through a \emph{Recon.} layer (implemented by FC layer): $\widetilde{r} = Recon.(\hat{r})$ and $\widetilde{g} = Recon.(\hat{g})$, and calculate the corresponding reconstruction loss as follows: \begin{equation} \begin{aligned} \mathcal{L}_{recon.} = \|\widetilde{g} - g \|_2^2 + \|\widetilde{r} - r \|_2^2. \end{aligned} \label{eq:loss_recon} \end{equation} \noindent\textbf{Training Pipeline.} The whole training process of the proposed GI-ReID consists of three stages: 1). Pre-training GaitSet~\cite{chao2019gaitset} for gait feature extraction. 2). Joint Training for the proposed gait sequence prediction (GSP) module and GaitSet in Gait-Stream on gait-related datasets. 3). Joint Training for Gait-Stream and ReID-Stream on CC-ReID-related datasets. More details are provided in \textbf{Supplementary}, including pseudo code and loss balance strategy. \section{Experiment} \subsection{Datasets, Metric and Experimental Setups} \noindent\textbf{Datasets Details.} We use four recent cloth-changing ReID datasets Real28~\cite{wan2020person}, VC-Clothes~\cite{wan2020person}, LTCC~\cite{qian2020long}, PRCC~\cite{yang2019person}, and one general video ReID dataset MARS~\cite{zheng2016mars} (to highlight the difficulty and necessity of image-based CC-ReID) to perform experiments. Table~\ref{tab:datasets} gives a brief information and comparison of these ReID datasets. More detailed introductions can be found in \textbf{Supplementary}. \begin{table}[htbp] \footnotesize \vspace{-2mm} \centering \caption{Brief introduction and comparison of datasets.} \vspace{-3mm} \setlength{\tabcolsep}{0.6mm}{ \begin{tabular}{c|c|c|c|c|c} \toprule & MARS & Real28 & VC-Clothes & LTCC & PRCC \\ \hline Category & Video & Image & Image & Image & Image\\ Photo Style & Real & Real & Synthetic & Real & Real \\ Scale & Large & Small & Large & Large & Large \\ Cloth Change & No & Yes & Yes & Yes & Yes \\ Identities & 1,261 & 28 & 512 & 152 & 221 \\ Samples & 20,715 & 4,324 & 19,060 & 17,138 & 33,698\\ Cameras & 6 & 4 & 4 & N/A & 3\\ Usage & Train\&Test & Test & Train\&Test & Train\&Test & Train\&Test\\ \bottomrule \end{tabular}}% \vspace{-3mm} \label{tab:datasets}% \end{table}% \noindent\textbf{Evaluation Metrics.} We use the cumulative matching characteristics (CMC) at Rank-1/-10/-20, and mean average precision (mAP) to evaluate the performance. \noindent\textbf{Experimental Setups.} We build \textbf{three} kinds of different experiment settings to comprehensively validate the effectiveness of gait biometric for person ReID, and also validate the rationality/superiority of the proposed gait prediction and regularization in our GI-ReID framework: (1) Real Cloth-Changing Image ReID, (2) General Video ReID, and (3) Imitated Cloth-Changing Video ReID. In the main manuscripts, to save space and highlight core contributions of our paper, we only present the results related to the most challenging setting of (1) Real Cloth-Changing Image ReID. The rest results about (2)(3) are in \textbf{Supplementary}. For (1) Real Cloth-Changing Image ReID, we employ real image-based cloth-changing datasets Real28~\cite{wan2020person}, VC-Clothes~\cite{wan2020person}, LTCC~\cite{qian2020long}, and PRCC~\cite{yang2019person} for experiments to validate the effectiveness of GSP module, SC constraint, and also compare our GI-ReID with SOTA cloth-changing ReID methods. In this setting, GSP module and GaitSet are both first pre-trained on gait-specific datasets CASIA-B~\cite{chao2019gaitset} and then fine-tuned on the CC-ReID datasets with the SC constraint $\mathcal{L}_{MMD}\&\mathcal{L}_{recon.}$ and the ReID supervisions. ResNet-50~\cite{he2016deep}, OSNet~\cite{zhou2019omni}, LTCC-shape~\cite{qian2020long}, and PRCC-contour~\cite{yang2019person} are taken as ReID backbone for comparisons. \subsection{Ablation Study} \label{sec:AB} Baseline means the model that only ingests RGB images. \noindent\textbf{Results of Real Cloth-Changing Image ReID.} We conduct ablation experiments on three cloth-changing datasets Real28, VC-Clothes, and LTCC. Real28 is too small for training, so we train model on VC-Clothes and only test on Real28~\cite{wan2020person}. In Table~\ref{tab:CImgReID}, we see that 1) All Gait-Stream (GS) related schemes achieve obvious gains (over 2.7\% in mAP) over \emph{Baseline}, which demonstrates the effectiveness of using gait to handle cloth-changing issue. 2) With the well-designed GSP module, \emph{Baseline+ GS-GSP (concat)} outperforms the ablated scheme \emph{Baseline+GS (concat)} by 3.3\%/6.7\%/2.3\% in mAP on Real28/VC-Clothes/LTCC, which demonstrates the effectiveness of gait sequence prediction (GSP) on gait information augmentation. Note that \emph{Baseline+GS (concat)} just uses Gait-Stream (GS) but removes GSP, where we duplicate the only available single person silhouette as input to GaitSet. 3) Semantics consistency (SC) performs well in the cloth-changing settings, it helps our scheme GI-ReID achieve the best performance on the most evaluation cases while saving computational cost by discarding Gait-Stream in the inference. \begin{table} \centering \footnotesize \caption{Performance (\%) comparison on the real image-based cloth-changing datasets Real28, VC-Clothes, LTCC. {GS-GSP} means Gait-Stream (GS) with gait sequence prediction (GSP) module. The ReID backbone is ResNet-50. `Standard' is the setting where the images in the test set with the same identity and camera view are discarded when computing mAP/Rank-1~\cite{qian2020long}.} \vspace{-2mm} \setlength{\tabcolsep}{0.7mm}{ \begin{tabular}{ccc|cc|cc} \toprule \multirow{2}[4]{*}{Methods} & \multicolumn{2}{c}{Real28} & \multicolumn{2}{|c}{VC-Clothes} & \multicolumn{2}{|c}{LTCC (Standard)} \\ \cmidrule{2-7} & mAP & Rank-1 & mAP & Rank-1 & mAP & Rank-1 \\ \midrule Baseline & 4.1 & 6.7 & 49.1 & 53.7 & 23.2 & 55.1 \\ + GS (concat) & 6.8 & 7.9 & 52.3 & 58.9 & 26.5 & 60.0 \\ + GS-GSP (concat) & 10.1 & 10.8 & \textbf{59.0} & 63.7 & 28.8 & \textbf{64.5} \\ + GS-GSP + SC (ours) & \textbf{10.4} & \textbf{11.1} & 57.8 & \textbf{64.5} & \textbf{29.4} & 63.2 \\ \bottomrule \end{tabular}}% \vspace{-4mm} \label{tab:CImgReID}% \end{table}% \begin{table}[htp] \centering \footnotesize \caption{Performance (\%) comparison on the cloth-changing dataset LTCC. Such experiment aims to show that our GI-ReID can bring gains because of the exploration of gait information, rather than simply introducing silhouettes (\textit{i}.\textit{e}., human masks). The ReID backbone is ResNet-50.} \vspace{-3mm} \setlength{\tabcolsep}{8mm}{ \begin{tabular}{c|c|c} \hline \multirow{2}[1]{*}{Methods} & \multicolumn{2}{c}{LTCC (Cloth-Changing)} \\ \cline{2-3} & mAP & Rank-1 \\ \hline Baseline & 8.10 & 19.58 \\ Silhouette-ReID & 7.04 & 17.92 \\ GI-ReID (ours) & \bf 10.38 & \bf 23.72 \\ \hline \end{tabular}}% \vspace{-2mm} \label{tab:maskreid}% \end{table}% \noindent\textbf{Improvement Comes From Gait Prediction, Not Silhouettes Usage.} We believe that our GI-ReID could successfully address the cloth-changing ReID problem from a single image is indeed because it effectively leverages the gait prediction, instead of the introduction of human silhouettes (\textit{i}.\textit{e}., masks). To prove that, we additionally design a scheme of \emph{Silhouette-ReID} that directly takes the person RGB-Silhouette pair as input to ReID model (following~\cite{song2018mask,chen2018person}), and compare it with our GI-ReID on the cloth-changing ReID dataset LTCC. ResNet-50 is taken as ReID backbone for all schemes for comparison fairness. As shown in Table~\ref{tab:maskreid}, we found that \emph{Silhouette-ReID} is even inferior to the baseline scheme \emph{Baseline (ResNet-50)} by 1.06\% in mAP under the cloth-changing setting. We analyze that directly using silhouette to remove the background clutters in pixel-level will make ReID model pay more attention on the foreground objects' appearance/clothes color information, which is unexpected and unreliable for cloth-changing ReID, and thus leads to a performance drop. \noindent\textbf{Study on Directly Using Gait Recognition Methods for Cloth-Changing ReID.} As we have discussed in the related work, directly using the algorithms of gait recognition for solving cloth-changing ReID problem is not optimal, especially in the image-based CC-ReID scenarios. Experimentally, we compare the proposed GI-ReID with two popular pure gait recognition works, GaitSet~\cite{chao2019gaitset} and PA-GCR~\cite{xugait2020gait}. GaitSet needs a set/sequence of person silhouettes as input, but recently-released cloth-changing ReID datasets are image datasets that lack of continuous frames for the same person. Thus, we duplicate the only available single one person silhouette to a set as input to approximately apply GaitSet into image-based CC-ReID task. As shown in Table~\ref{tab:gaitreid}, these pure gait recognition works of GaitSet~\cite{chao2019gaitset} and PA-GCR~\cite{xugait2020gait} are both inferior to the baseline scheme \emph{Baseline (ResNet-50)} in mAP under the cloth-changing setting, which indicates that simply using gait biometric for person matching can not work well for cloth-changing ReID, our gait prediction and regularization idea performs better for handling CC-ReID, especially for the image-based CC-ReID. \vspace{-.5mm} \begin{table}[htp] \centering \footnotesize \caption{Performance (\%) comparison on the cloth-changing dataset LTCC. Such experiment aims to show that these pure gait recognition works can not work well for cloth-changing ReID. The ReID backbone is ResNet-50.} \vspace{-2.5mm} \setlength{\tabcolsep}{8.5mm}{ \begin{tabular}{c|c|c} \hline \multirow{2}[1]{*}{Methods} & \multicolumn{2}{c}{LTCC (Cloth-Changing)} \\ \cline{2-3} & mAP & Rank-1 \\ \hline Baseline & 8.10 & 19.58 \\ GaitSet~\cite{chao2019gaitset} & 2.14 & 7.22 \\ PA-GCR~\cite{xugait2020gait} & 3.36 & 9.01 \\ GI-ReID (ours) & \bf 10.38 & \bf 23.72 \\ \hline \end{tabular}}% \vspace{-4.mm} \label{tab:gaitreid}% \end{table}% \begin{table*}[t]\centering\vspace{-2mm} \caption{Study on the different design choices in the (a)(b) GSP module, and (c) SC constraint of our GI-ReID framework. `Cloth-Changing' setting means that the images with same identity, camera view and clothes are discarded during the testing.} \vspace{-3mm} \captionsetup[subffloat]{justification=centering} \subfloat[Study on the gait prediction length $N$.\label{tab:GSP_len}]{ \tablestyle{3pt}{.7} \begin{tabular}{ccccc} \toprule \multirow{3}[6]{*}{Methods} & \multicolumn{4}{c}{LTCC} \\ \cmidrule{2-5} & \multicolumn{2}{c}{Standard} & \multicolumn{2}{c}{Cloth-Changing} \\ \cmidrule{2-5} & mAP & Rank-1 & mAP & Rank-1 \\ \midrule Baseline & 23.2 & 55.1 & 8.1 & 19.6 \\ N=4 & 26.9 & 59.2 & 8.9 & 21.7 \\ N=6 & 28.2 & 61.9 & 9.8 & 22.6 \\ N=8 (ours) & \textbf{29.4} & \textbf{63.2} & \textbf{10.4} & \textbf{23.7} \\ N=10 & 28.4 & 63.1 & 10.4 & 22.8 \\ N=12 & 27.7 & 60.8 & 10.0 & 22.5 \\ \bottomrule \end{tabular}% } \hspace{3mm} \subfloat[Study on the input gait position $p$ in GSP. \label{tab:GSP_position}]{ \tablestyle{3pt}{0.88} \begin{tabular}{ccccc} \toprule \multirow{3}[6]{*}{Methods} & \multicolumn{4}{c}{LTCC} \\ \cmidrule{2-5} & \multicolumn{2}{c}{Standard} & \multicolumn{2}{c}{Cloth-Changing} \\ \cmidrule{2-5} & mAP & Rank-1 & mAP & Rank-1 \\ \midrule Baseline & 23.2 & 55.1 & 8.1 & 19.6 \\ Arb. & 27.1 & 59.5 & 9.2 & 20.5 \\ BEGN & 28.4 & 61.2 & 9.8 & 22.0 \\ END & 28.1 & 61.5 & 9.5 & 22.4 \\ Mid. (ours) & \textbf{29.4} & \textbf{63.2} & \textbf{10.4} & \textbf{23.7} \\ \bottomrule \end{tabular}% } \hspace{3mm} \subfloat[Study on the used losses in SC constraint.\label{tab:SC_Loss}]{ \tablestyle{3pt}{0.99} \begin{tabular}{ccccc} \toprule \multirow{3}[6]{*}{Methods} & \multicolumn{4}{c}{LTCC} \\ \cmidrule{2-5} & \multicolumn{2}{c}{Standard} & \multicolumn{2}{c}{Cloth-Changing} \\ \cmidrule{2-5} & mAP & Rank-1 & mAP & Rank-1 \\ \midrule Baseline & 23.2 & 55.1 & 8.1 & 19.6 \\ w/ $\mathcal{L}_{MSE}$ & 27.5 & 61.0 & 9.0 & 21.4 \\ w/o $\mathcal{L}_{recon.}$ & 28.3 & 62.7 & 9.6 & 22.9 \\ ours & \textbf{29.4} & \textbf{63.2} & \textbf{10.4} & \textbf{23.7} \\ \bottomrule \end{tabular}% } \vspace{-5mm} \label{tab:choices} \end{table*} \begin{table}[htbp] \centering \footnotesize \caption{Study on the different ReID inference strategies.} \vspace{-2mm} \setlength{\tabcolsep}{4mm}{ \tablestyle{12.6pt}{0.8} \begin{tabular}{ccccc} \toprule \multirow{3}[6]{*}{Methods} & \multicolumn{4}{c}{LTCC} \\ \cmidrule{2-5} & \multicolumn{2}{c}{Standard} & \multicolumn{2}{c}{Cloth-Changing} \\ \cmidrule{2-5} & mAP & Rank-1 & mAP & Rank-1 \\ \midrule Baseline & 23.2 & 55.1 & 8.1 & 19.6 \\ $\widetilde{R}$ & 8.6 & 21.1 & 4.3 & 9.9 \\ $\hat{r} + \hat{g}$ & \textbf{29.8} & \textbf{64.0} & \textbf{10.9} & \textbf{24.4} \\ $\widetilde{r} + \widetilde{g}$ & 28.9 & \underline{63.2} & 9.7 & 23.1 \\ $\widetilde{r}$ & 28.1 & 60.8 & 9.1 & 21.3 \\ $r$ (ours) & \underline{29.4} & \underline{63.2} & \underline{10.4} & \underline{23.7} \\ \bottomrule \end{tabular}}% \vspace{-5.5mm} \label{tab:infer}% \end{table}% \subsection{Design Choices in Our GI-ReID Framework} We study the different design choices in our GI-ReID framework. We train and test model on the real large-scale cloth-changing ReID dataset LTCC~\cite{qian2020long}. \noindent\textbf{Influence of the Length $N$ of Predicted Gait Sequence.} As shown in Eq-(\ref{eq:loss_pred}) of Sec.~\ref{sec:GSP}, the output of GSP $\widetilde{R} \in \mathbb{R}^{N*h*w}$ is a sequence with $N$ predicted gait frames. We study the influence of length $N$ w.r.t the ReID performance. Table~\ref{tab:GSP_len} shows that when $N=8$, our GI-ReID gets the best performance, achieving a good trade-off between gait prediction error and gait information augmentation. \noindent\textbf{Is `Middle Frame Input Principle' Necessary?} As described in Eq-(\ref{eq:loss_position}) of GSP in Sec.~\ref{sec:GSP}, we employ a position embedder $P$ and a feature aggregator $A$ to set up a \emph{middle frame input principle} to reduce the gait prediction ambiguity and difficulty. Here we compare several schemes to show the necessity of such design. \emph{\textbf{Arb.}}: we remove position embedder $P$, feature aggregator $A$, position loss $\mathcal{L}_{position}$ for GSP, and take the gait silhouette at \emph{arbitrary} position as input for training. \emph{\textbf{BEGN}} and \emph{\textbf{END}}: we respectively take the gait stance at the \emph{beginning} and the \emph{end} position as input to predict gait sequence during the GSP training. In Table~\ref{tab:GSP_position}, the scheme~\emph{\textbf{Mid. (ours)}} that uses the gait frame at middle position for gait sequence prediction achieves the best performance, outperforming \emph{Arb.} by 2.3\% in mAP in the standard setting, which reveals that predicting the gait statuses \textbf{before and after} the input middle gait status indeed could reduce prediction difficulty/ambiguity. \noindent\textbf{Why Use MMD for Regularization?} For the SC constraint, we shrink the gap between the embeded ReID vector $\hat{r}$ and gait vector $\hat{g}$ by minimizing MMD through $\mathcal{L}_{MMD}$. We study this design in Table~\ref{tab:SC_Loss} and find that when replacing $\mathcal{L}_{MMD}$ with $\mathcal{L}_{MSE}$, the performance of \emph{w/ $\mathcal{L}_{MSE}$} drops nearly 2.0\% in mAP. That's because MMD loss is a distribution-level constraint and could better enforce the high-level semantics consistency between dynamic motion gait features and static spatial ReID features. MSE loss is an element-wise constraint, and not so suitable to coordinate two modalities of motion gait and RGB feature. \noindent\textbf{Is Reconstruction Penalty Necessary?} When removing $\mathcal{L}_{recon.}$ in Eq-(\ref{eq:loss_recon}), as shown in Table~\ref{tab:SC_Loss}, the shceme \emph{w/o $\mathcal{L}_{recon.}$} is inferior to ours by 1.1\%/0.8\% in mAP in the two settings, which demonstrates that avoiding information lost caused by feature regularization could enhance the final ReID performance of our GI-ReID framework. \noindent\textbf{Which One for ReID Inference?} We compare several cases of using (1) predicted gait sequence $\widetilde{R}$, (2) aligned features fusion $\hat{r}$ + $\hat{g}$, (3) reconstructed features fusion $\widetilde{r}$ + $\widetilde{g}$, and (4) reconstructed ReID vector $\widetilde{r}$ for ReID inference. Table~\ref{tab:infer} shows that 1) Directly using the predicted gait sequence $\widetilde{R}$ for CC-ReID failed to get satisfactory results, this also indicates that these gait recognition works~\cite{chao2019gaitset,Fan_2020_CVPR,elharrouss2020gait} are not optimal for CC-ReID. 2) Using the well-aligned features fusion $\hat{r} + \hat{g}$ achieves the best performance, outperforming ours by 0.4\%/0.5\% in mAP in the two settings, but this scheme still needs Gait-Stream in the inference. 3) Using the reconstructed ReID vector $\widetilde{r}$ for inference suffers from information lost and is inferior to ours by 1.3\% in mAP in the both two settings. 4) Our scheme that using the regularized ReID vector $r$ achieves the second best performance while saving the computation costs brought by Gait-Stream. \begin{figure}[h] \vspace{-3.mm} \centerline{\includegraphics[width=1.0\linewidth]{vis_gait_rebuttal_v5.pdf}} \vspace{-3mm} \caption{Six predicted gait sequences \textit{vs.} realistic gait samples.} \label{fig:vis_gait} \vspace{-4.5mm} \end{figure} \subsection{More Analysis, Visualization and Insights} To further prove that the proposed gait sequence prediction (GSP) module can actually predict unique human motion features, and the achieved improvements of GI-ReID indeed come from gait information, not from using additional gait-related datasets or person silhouette images, here we provide more analysis and visualization results. For example, when testing the gait-based recognition performance using GaitSet~\cite{chao2019gaitset} on the predicted human gait sequences $\widetilde{R}$ generated by GSP module (see \textbf{Supplementary} for details), it can achieve a competitive 62.4\% in Rank-1 on CASIA-B. \begin{table*}[t]\centering \vspace{-3mm} \caption{Performance (\%) comparisons of our GI-ReID and other competitors on the cloth-changing datasets LTCC~\cite{qian2020long} and PRCC~\cite{yang2019person}. `$\dag$' means that only identities with clothes changing are used for training. More results are presented in \textbf{Supplementary}.} \vspace{-3mm} \captionsetup[subffloat]{justification=centering} \subfloat[Comparison results on LTCC.\label{tab:LTCC}]{ \tablestyle{1.6pt}{1.11} \begin{tabular}{@{\extracolsep{\fill}}l|c|c|c|c||c|c|c|c} \hline \multicolumn{1}{c|}{\multirow{2}{*}{Methods}} & \multicolumn{2}{c|}{Standard} & \multicolumn{2}{c||}{Cloth-changing} & \multicolumn{2}{c|}{Standard$^\dag$} & \multicolumn{2}{c}{Cloth-changing$^\dag$}\tabularnewline \cline{2-9} & Rank-1 & mAP & Rank-1 & mAP & Rank-1 & mAP & Rank-1 & mAP\tabularnewline \hline LOMO \cite{XQDA} + NullSpace \cite{NullReid} & 34.83 & 11.92 & 16.45 & 6.29 & 27.59 & 9.43 & 13.37 & 5.34 \tabularnewline ResNet-50 + Face~\cite{xue2018clothing} & 60.44 & 25.42 & 22.10 & 9.44 & 55.37 & 22.23 & 20.68 & 8.99 \tabularnewline PCB \cite{sun2018beyond} & 65.11 & 30.60 & 23.52 & 10.03 & 59.22 & 26.61 & 21.93 & 8.81 \tabularnewline HACNN \cite{li2018harmonious} & 60.24 & 26.71 & 21.59 & 9.25 & 57.12 & 23.48 & 20.81 & 8.27 \tabularnewline MuDeep \cite{qian2019leader} & 61.86 & 27.52 & 23.53 & 10.23 & 56.99 & 24.10 & 18.66 & 8.76\tabularnewline \hline Baseline (ResNet-50) & 55.14 & 23.21 & 19.58 & 8.10 & 54.27 & 21.98 & 19.14 & 7.74 \\ GI-ReID (ResNet-50, ours) & 63.21 & 29.44 & 23.72 & 10.38 & 61.39 & 27.88 & 22.59 & 9.87 \\ \hline Baseline (OSNet) & 66.07 & 31.18 & 23.43 & 10.56 & 61.22 & 27.41 & 22.97 & 9.74 \\ GI-ReID (OSNet, ours) & \bf 73.59 & \bf36.07 & {28.11} & {13.17} & \bf 66.94 & \bf 33.04 & \bf 26.71 & {12.69} \\ \hline Baseline (LTCC-shape~\cite{qian2020long}) & -- & -- & {26.15} & {12.40} & -- & -- & {25.15} & {11.67} \\ LTCC-shape + Gait-Stream (ours) & -- & -- & \bf 28.86 & \bf 14.19 & -- & -- & {26.41} & \bf 13.26 \\ \hline \end{tabular}% } \hspace{0.5mm} \subfloat[Comparison results on PRCC.\label{tab:PRCC}]{ \tablestyle{2.0pt}{0.9} \begin{tabular}{c|c|c|c} \hline \multirow{2}[1]{*}{Methods} & \multicolumn{3}{c}{Cross-clothes} \\ \cline{2-4} & Rank-1 & Rank-10 & Rank-20 \\ \hline Shape~\cite{belongie2002shape} & 11.48 & 38.66 & 53.21 \\ LNSCT~\cite{xie2010extraction} & 15.33 & 53.87 & 67.12 \\ HACNN~\cite{li2018harmonious} & 21.81 & 59.47 & 67.45 \\ PCB~\cite{sun2018beyond} & 22.86 & 61.24 & 78.27 \\ SketchNet~\cite{zhang2016sketchnet} & 17.89 & 43.70 & 58.62 \\ Deformable~\cite{dai2017deformable} & 25.98 & 71.67 & 85.31 \\ STN~\cite{jaderberg2015spatial} & 27.47 & 69.53 & 83.22 \\ RCSANet~\cite{huang2021clothing} & 31.60 & -- & -- \\ \hline PRCC-contour~\cite{yang2019person} & {34.38} & {77.30} & {88.05} \\ + Gait-Stream (ours) & {36.19} & {79.93} & {91,67} \\ \hline Baseline (ResNet-50) & 22.23 & 61.08 & 76.44 \\ GI-ReID (ResNet-50) & 33.26 & 75.09 & 87.44 \\ \hline Baseline (OSNet) & 28.70 & 72.34 & 85.89 \\ GI-ReID (OSNet) & \textbf{37.55} & \textbf{82.25} & \textbf{93.76} \\ \hline \end{tabular}% } \vspace{-5mm} \label{tab:LTCC_PRCC} \end{table*} \noindent\textbf{Gait Sequence Prediction Visualization.} Figure~\ref{fig:vis_gait} further shows 6 groups of gait prediction results (left) and 2 groups of realistic gait samples from CASIA-B dataset~\cite{chao2019gaitset} (right). Compared to the realistic gait samples, the predicted gait results (\textit{i}.\textit{e}., the outputs of GSP) have the reasonable continuous movements, \egno, swing arms and opening/closing legs. The gait-stream could learn the discriminative dynamic clues from these predicted gait results, like \textit{the walking stride}, \textit{the left-right swinging range of arms}, \textit{the opening/closing angle of legs}, \etcno, (see red circles in Figure~\ref{fig:vis_gait}). \begin{figure} \centerline{\includegraphics[width=1.0\linewidth]{Vis_feat_V2.pdf}} \vspace{-3.5mm} \caption{\textbf{Left:} three examples of activation maps comparison between baseline and our GI-ReID, which shows GI-ReID not only focuses on people's clothes, but also pay attention to the holistic human gait and local face; \textbf{Right:} Top-3 ranking list of GI-ReID for two query images on Real28. GI-ReID could identify the same person with different clothes based on the assistance of gait.} \vspace{-6mm} \label{fig:vis_feat} \end{figure} \noindent\textbf{Feature Map Visualization.} To better understand how our GI-ReID works, we visualize the intermediate activation feature maps of \emph{Baseline} and our GI-ReID for comparison following~\cite{zhou2019omni,jin2020global,jin2020style}. On the left of Figure~\ref{fig:vis_feat}, we show three examples of activation maps on Real28, and we observe that the feature maps of \emph{Baseline} have high response mainly on person's clothes. In contrast, the activation features of our GI-ReID not only have high response on person's clothes, but also cover the holistic human body structure (gait) and local face information (robust to cloth changing). \vspace{-1mm} \subsection{Comparison with State-of-the-Arts} The study on cloth-changing ReID is relatively rare~\cite{huang2019beyond,huang2019celebrities,yang2019person,qian2020long,li2020learning,yu2020cocas,wan2020person}, and most of them have not released source codes, even the dataset~\cite{yu2020cocas}. We compare our GI-ReID with multiple general ReID algorithms, including PCB~\cite{sun2018beyond}, HACNN~\cite{li2018harmonious}, MuDeep~\cite{qian2019leader}, and specific cloth-changing ReID methods LTCC-shape~\cite{qian2020long}, PRCC-contour~\cite{yang2019person}, RCSANet~\cite{huang2021clothing}. In Table~\ref{tab:LTCC_PRCC}, we observe that 1) Thanks to the cloth-independent gait characteristics, our scheme GI-ReID (OSNet) achieves the best performance on PRCC, outperforming the second best PRCC-contour~\cite{yang2019person} by 3.17\% in Rank-1 in the cross-clothes setting. 2) The proposed Gait-Stream, as a kind of regularization, could benefit other methods, \egno, LTCC-shape~\cite{qian2020long}. We find that the scheme of \emph{LTCC-shape + Gait-Stream} could further obtain 1.79\%/1.59\% gain in mAP on LTCC. 3) For two cloth-changing settings of LTCC, our scheme GI-ReID (ResNet-50) both achieve obvious gains (2.28\%/2.13\% in mAP) over the Baseline (ResNet-50), which totally-fair results indicate that GI-ReID could handle clothes changes and learn identity-relevant features. 4) Our method is compatible with existing ReID networks, \egno, built upon the strong ReID-specific network OSNet~\cite{zhou2019omni}, GI-ReID (OSNet) further achieves gains than GI-ReID (ResNet-50). \subsection{Failure Cases Analysis} Due to the large difference on the capture viewpoints and environments between gait and ReID training data, the predicted gait results of GSP are not always perfect (see \textbf{Supplementary}) when occlusion, partial, multi-person, \etcno, existed in the person images, which may affect the CC-ReID performance. That is why we indirectly use gait predictions in a knowledge regularization manner, which makes GI-ReID robust and not sensitive to these failure cases. \vspace{-1mm} \section{Conclusion} In this paper, we propose to utilize human unique gait to address the cloth-changing ReID problem from a single image. A novel gait-involved two-stream framework GI-ReID is introduced, which takes gait as a regulator with a Gait-Stream (discarded in the inference), to encourage the cloth-agnostic representation learning of image-based ReID-Stream. To facilitate the gait utilization, a gait sequence prediction (GSP) module and a high-level semantics consistency (SC) constraint are further designed. Extensive experiments on multiple CC-ReID benchmarks demonstrate the effectiveness and superiority of GI-ReID. \section{Acknowledgements} This work was (partially) supported by the National Key R\&D Program of China under Grant 2020AAA0103902, Alibaba Innovative Research (AIR) program, and NSFC under Grant U1908209, 61632001, 62021001.
\section{Introduction} Markov networks, also known as undirected graphical models, are popular tools for numerous application fields in science and technology \citep{Lauritzen96, Koller09}. In statistical physics, examples of this kind of interaction models for discrete systems are the classical Ising and Potts models for finite lattices \citep{Sherrington75, Ekeberg13}. In social sciences, graphical log-linear models provide the basic approach for scrutinizing dependences among variables in high-dimensional contingency tables \citep{Lauritzen96, Edwards00}. Image analysis and spatial statistics represent other research fields where Markov random fields are widely used to encode neighborhood dependence structures in data \citep{Tjelmeland98}. Markov networks enjoy particularly tractable properties when the corresponding graph is chordal, since this allows for a full factorization of the joint distribution using maximal clique marginals and the separator sets of the cliques \citep{Lauritzen96}. As a consequence, structural learning of the graph is also greatly facilitated by chordality and a majority of the graph learning methods have therefore been developed under this assumption \citep{Dawid93, Madigan94, Corander08, Corander13}. Nevertheless, chordality would rarely be supported by the theory underlying a particular application, instead it is mostly assumed on the basis of mathematical and computational convenience. In computational physics, image analysis, and spatial statistics, non-chordal graphs are a commonplace. Consequently, efficient inference approximations have been developed over the years to resolve the difficulties arising from the intractable partition function of a multivariate distribution for which the dependence structure is defined by a non-chordal graph. Pseudo-likelihood and numerous variational approximations are the most widely applied approximate inference techniques for such models \citep{Besag75, Wainwright08}. In addition to using pseudo-likelihood for inferring the model parameters \citep{Ekeberg13}, it has also been used in several structure learning methods \citep{Csiszar06,Hofling09,Ravikumar10}. While the Markov properties of undirected graphical models are useful for obtaining a lower-dimensional representation of a multivariate distribution, they may also obscure more local forms of independence. Context-specific independences between pairs of nodes given a particular instantiation of their neighbors will be neglected in a Markov network, and hence, various incarnations of such models have been proposed \citep{Corander03,Hojsgaard03,Nyman14,Nyman15b, Janhunen15}. The context-specific constraints increase the expressiveness of network models, however, this comes at the price of a much larger model space, which also has a more complicated topology. The above mentioned factors make structure learning an intricate task and Markov networks with context-specific independences have thus been nearly exclusively considered under the assumption of chordality of the underlying graph \citep{Nyman14,Janhunen15,Nyman15b}. By further constraining the permitted contexts, model scoring can be done analytically through the marginal likelihood \citep{Nyman14,Janhunen15}. An alternative method was recently presented in \citet{Nyman15b}, where model scoring was performed using penalized maximum likelihood estimation based on cyclical projection of joint probabilities. This method could also be applied to non-chordal networks, however, similar to the iterative proportional fitting algorithm \citep{Lauritzen96}, its computational complexity increases rapidly as a function of the number of parameter constraints induced by the model. In this article we generalize the Bayesian pseudo-likelihood scoring criterion introduced by \citet{PensarMPL} for Markov networks. This makes it possible to lift the restrictions made in previous works while still enabling efficient structure learning. The remainder of the article is structured as follows. In the next section we define context-specific independence for Markov networks and introduce the class of contextual Markov networks. In Section 3, the marginal pseudo-likelihood for contextual Markov networks is derived and its consistency is proven. Section 4 presents experiments with a synthetic dataset and a wide range of real datasets, demonstrating that contextual Markov networks lead to improved predictive and estimation accuracy compared with Markov networks. The final section provides some conclusions and identifies possibilities for further research. \section{Context-specific independence in Markov networks} \subsection{Markov networks} We consider a set of $d$ discrete random variables $X=X_V=\{X_{j}\}_{j\in V}$ where $V=\{1,\ldots,d\}$. Each variable $X_{j}$ takes values from a finite set of outcomes $\mathcal{X}_{j}=\{0,1,\ldots,r_{j}-1\}$ with cardinality $|\mathcal{X}_{j}|=r_j$. A subset of the variables, $S\subseteq V$, is denoted by $X_{S}=\{X_{j}\}_{j\in S}$ and the corresponding joint outcome space is specified by the Cartesian product $\mathcal{X}_{S}=\times_{j\in S}\mathcal{X}_{j}$. Occasionally, we omit the brackets from the subindex in order to improve readability. We use a lowercase letter $x_{S}$ to denote that the variables have been assigned a specific joint outcome in $\mathcal{X}_{S}$. Similarly, $p(x)$ is used as shorthand for the probability $p(X=x)$ while $p(X)$ refers to the distribution over $X$. A joint distribution over $X$ can be specified directly by the joint probabilities $\{p(x): x\in\mathcal{X}\}$. However, restricting the distributions to being strictly positive allows us to use the log-linear parameterization \begin{equation*} \log p(x)=\sum_{A\subseteq V} \phi_A(x_A) \end{equation*} where the $\phi$-terms are real-valued coordinate projection functions such that $\phi_A(x)=\phi_A(x_A)$ \citep{Whittaker90}. In order to avoid an over-parameterization, the functions are defined such that \begin{equation}\label{eq:zero_rest} \phi_{A}(x_A)=0 \text{ if }x_j=0 \text{ for any } j\in A. \end{equation} The above restriction ensures a one-to-one correspondence between the joint probabilities and the functions. The latter can be determined from the former by solving a triangular system of linear equations. A convenient property of the log-linear expansion is that restrictions related to conditional independence correspond to setting $\phi$-terms to zero. We use $X_A\perp X_B \mid X_C$ to denote that $X_A$ is conditionally independent of $X_B$ given $X_C$, that is $p(X_A\mid X_B,X_C)=p(X_A\mid X_C)$. Now, if $(V_1,V_2,V_3)$ is a partition of $V$, then \begin{equation}\label{eq:ci_log_lin} X_{V_1}\perp X_{V_2} \mid X_{V_3} \Leftrightarrow \phi_{A}(\cdot)=0 \text{ when } A\cap V_1\not= \varnothing \text{ and } A\cap V_2\not= \varnothing. \end{equation} A Markov network (MN) over $X$ is a probabilistic graphical model that compactly represents a joint distribution over the variables by exploiting statements of conditional independence. The dependence structure over the $d$ variables is specified by an undirected graph $G=(V,E)$ where the nodes (or vertices) $V=\{1,\ldots,d\}$ correspond to the indices of the variables and the edges $E\subseteq \{ V\times V\}$ represent dependences among the variables. As is common in graphical model literature, we will use the terms node and variable interchangeably throughout this article. A node $j$ is a neighbor of $i$ (and vice versa) if $\{i,j\}\in E$. The set of all neighbors of a node $j$ is called the Markov blanket of the node, $mb(j)=\{ i\in V:\{i,j\}\in E \}$. We denote the set of common neighbors to two nodes $i$ and $j$ by $cn(i,j)=mb(i)\cap mb(j)$. Finally, we will denote the corresponding set of common neighbors with the edge included by $\overbar{cn}(i,j)=cn(i,j)\cup\{ i,j \}$. Absence of edges in the graph of an MN encodes statements of conditional independence which can be characterized by the following Markov properties: \begin{enumerate} \item Pairwise Markov property: $X_{i}\perp X_{j}\mid X_{V\setminus \{ i,j \}}$ for all $\{i,j\}\not\in E$. \item Local Markov property: $X_{i}\perp X_{V\setminus \{ mb(i)\cup i \}}\mid X_{mb(i)}$ for all $i\in V$. \item Global Markov property: $X_{A}\perp X_{B}\mid X_{S}$ for all disjoint subsets $(A,B,S)$ of $V$ such that $S$ separates $A$ from $B$. \end{enumerate} Although the strength of the above properties differ in general, they are proven to be equivalent under the current assumption of positivity of the joint distribution \citep[][Theorem 3.7]{Lauritzen96}. To fully specify an MN, one must define a probability distribution $P$ over the variables. The distribution must satisfy the conditional independence restrictions imposed by the graph. If the distribution does not satisfy any additional independences, not conveyed by the graph, the distribution is said to be faithful to the graph. Under the log-linear parameterization, the graph-induced restrictions are accounted for by setting certain $\phi$-terms to zero. More specifically, by combining the property stated in \eqref{eq:ci_log_lin} and the pairwise Markov property, we reach the conclusion \begin{equation}\label{eq:g_loglin_rest} \{i,j\}\not\in E \Rightarrow \phi_{A}(\cdot)=0 \text{ if } \{i,j\}\subseteq A. \end{equation} In other words, all $\phi$-terms covering pairs of nodes not connected by an edge are equal to zero. Consequently, the log-linear parameterization induced by an undirected graph is in general hierarchical in the sense that if $\phi_A(\cdot)=0$ then $\phi_B(\cdot)=0$ for all $B\supseteq A$. An example of an undirected six-node graph is shown in Figure \ref{fig:ex_ug}(a). The corresponding MN has the log-linear expansion \begin{equation}\label{eq:log_lin_para} \begin{aligned} \log p(x)&=\phi_{\varnothing}+\phi_{1}(x)+\phi_{2}(x)+\phi_{3}(x)+\phi_{4}(x)+\phi_{5}(x)+\phi_{6}(x)\\ &+\phi_{1,2}(x)+\phi_{1,4}(x)+\phi_{2,3}(x)+\phi_{2,5}(x)+\phi_{3,5}(x)+\phi_{4,5}(x)+\phi_{2,3,5}(x) \end{aligned} \end{equation} Note that no $\phi$-term is subscripted by pairs of nodes that are not in the edge set. \begin{figure} \begin{subfigure}{0.5\textwidth} \begin{center} \begin{tikzpicture} \node[at={(0,0)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](4){4}; \node[at={(1.75,0)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](5){5}; \node[at={(3.5,0)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](6){6}; \node[at={(0,1.75)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](1){1}; \node[at={(1.75,1.75)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](2){2}; \node[at={(3.5,1.75)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](3){3}; \path (1) edge[line width=0.25mm] (2); \path (2) edge[line width=0.25mm] (3); \path (1) edge[line width=0.25mm] (4); \path (4) edge[line width=0.25mm] (5); \path (2) edge[line width=0.25mm] (5); \path (3) edge[line width=0.25mm] (5); \end{tikzpicture} \end{center} \caption{\label{fig:ex_ug_a}} \end{subfigure} \begin{subfigure}{0.5\textwidth} \begin{center} \begin{tikzpicture} \node[at={(0,0)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](4){4}; \node[at={(1.75,0)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](5){5}; \node[at={(3.5,0)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](6){6}; \node[at={(0,1.75)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](1){1}; \node[at={(1.75,1.75)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](2){2}; \node[at={(3.5,1.75)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](3){3}; \path (1) edge[line width=0.25mm] (2); \path (2) edge[line width=0.25mm] (3); \path (1) edge[line width=0.25mm] (4); \path (4) edge[line width=0.25mm] (5); \path (2) edge[line width=0.25mm] node[left=-2] {\small{$0$}} (5); \path (3) edge[line width=0.25mm] node[below right=-5] {\small{$\stack{1}{2}$}} (5); \path (2) edge[line width=0.25mm] (5); \end{tikzpicture} \end{center} \caption{\label{fig:ex_ug_b}} \end{subfigure} \caption{A (a) traditional and (b) labeled undirected graph over six nodes.\label{fig:ex_ug}} \end{figure} \subsection{Contextual Markov networks} It has previously been noticed that conditional independence alone may be unnecessarily stringent for modeling real-world phenomena \citep{Boutilier96,Friedman96,Geiger96,Chickering97,Poole03,Corander03,Hojsgaard03,Nyman14,Pensar15,Nyman15b}. For this reason, the notion of context-specific independence (CSI) has been proposed as a tool to relax the restrictions of graphical models while still providing a sound independence-based interpretation. The class of CSI is essentially a generalization of conditional independence that only holds in a certain context, specified by the conditioning variables. The concept of CSI was formalized by \citet{Boutilier96} for the purpose of refining the conditional probability tables of Bayesian networks \citep{Boutilier96,Friedman96,Poole03,Pensar15}, however, it has also been studied as a means to refine Markov networks \citep{Corander03,Hojsgaard03,Nyman14,Nyman15b}. \begin{definition} Context-Specific Independence \\ \normalfont Let $X=\{X_{1},\ldots,X_{d}\}$ be a set of stochastic variables where $V=\{1,\ldots d\}$ and let $A$, $B$, $C$, $S$ be four disjoint subsets of $V$. $X_{A}$ is contextually independent of $X_{B}$ given $X_{S}$ and the context $X_{C}=x_{C}$ if \[ p(x_{A}\mid x_{B},x_{C},x_{S})=p(x_{A}\mid x_{C},x_{S}) \] holds for all $(x_{A},x_{B},x_{S})\in\mathcal{X}_{A}\times\mathcal{X}_{B}\times\mathcal{X}_{S}$ whenever $p(x_{B},x_{C},x_{S})>0$. This will be denoted by \[ X_{A}\perp X_{B}\mid x_{C},X_{S}. \] \end{definition} To incorporate CSI in Markov networks in a general setting, we introduce the concept of contextual Markov networks (CMN). \begin{definition} Contextual Markov network structure \label{def:cmn_struct}\\ \normalfont The dependence structure of a contextual Markov network is a pair $(G,\mathcal{C})$ consisting of an undirected graph $G=(V,E)$, whose nodes represent random variables $X_1,\ldots,X_d$, and a set of contexts $\mathcal{C}=\{ \text{\footnotesize$\mathcal{C}$}(i,j) \}_{\{ i,j \}\in E}$ where $\text{\footnotesize$\mathcal{C}$}(i,j)$ is the edge context of edge $\{ i,j \}$. An edge context $\text{\footnotesize$\mathcal{C}$}(i,j)$ is a subset of the outcome space of the common neighbors $cn(i,j)$. The pair $(G,\mathcal{C})$ encodes a dependence structure over the variables according to: \begin{enumerate} \item $X_1,\ldots,X_d$ satisfy the Markov properties of the undirected graph. \item For each $\{ i,j \}\in E$ and $x_{cn(i,j)} \in \text{\footnotesize$\mathcal{C}$}(i,j):$ $X_i \perp X_j \mid x_{cn(i,j)},X_{V\setminus \overbar{cn}(i,j)}$. \end{enumerate} \end{definition} An edge context represents a set of situations, specified by the common neighbors, where the direct influence implied by the edge is cut off. Note that an edge may have a non-empty edge context only if the edge nodes have at least one neighbor in common, or equivalently, the edge is part of a clique of size three or larger. If the nodes of an edge have more than one common neighbor we assume an ascending ordering of the neighbors according to the node indices. \begin{figure} \begin{center} \begin{tikzpicture} \node[at={(0,0)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](3){3}; \node[at={(1.75,0)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](4){4}; \node[at={(0,1.75)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](1){1}; \node[at={(1.75,1.75)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](2){2}; \path (1) edge[line width=0.25mm] (2); \path (1) edge[line width=0.25mm] node[left=-6]{\small{$\stack{01}{10}$}} (3); \path (1) edge[line width=0.25mm] (4); \path (2) edge[line width=0.25mm] (3); \path (2) edge[line width=0.25mm] node[right=-1]{\small{$1*$}} (4); \path (3) edge[line width=0.25mm] (4); \end{tikzpicture} \end{center} \caption{A labeled undirected graph over four binary variables.\label{fig:ex_label}} \end{figure} To visualize the graph-context structure as a single entity, we assign labels to edges with non-empty contexts as originally proposed by \citet{Corander03}, who introduced the class of labeled graphical models. As an example of how to interpret labels, consider Figure \ref{fig:ex_label} which depicts a labeled graph over four binary variables. For illustrative purposes, a label stacks the context configurations instead of drawing them as an actual set, that is, the label on edge $\{1,3\}$ corresponds to the edge context $\text{\footnotesize$\mathcal{C}$}(1,3)=\{(0,1),(1,0)\}$. As established earlier, an ascending ordering of the common neighbors is used. For this particular edge context, it means that the first position in a configuration contains a value of variable $X_2$ and the second position contains a value of $X_4$. Moreover, the star symbol is used to represent a collection of configurations obtained by allowing the variable corresponding to the star position to take on any value, for example, the label on edge $(2,4)$ represents the edge context $\text{\footnotesize$\mathcal{C}$}(2,4)=1\times \mathcal{X}_3 = 1 \times \{0,1\}=\{(1,0),(1,1)\}$. The definition of edge context differs from previous works in that it explicitly considers the direct influence of an edge by conditioning on the remaining variables rather then only on the common neighbors. This modification is due to an observation concerning non-chordal graphs made in \citet{Nyman15b}. To illustrate the phenomenon, consider the non-chordal labeled graph in Figure \ref{fig:ex_ug}(b). The label on edge $\{ 2,5 \}$ does not imply that \[ X_2 \perp X_5\mid X_3=0 \] due to the chordless loop $2-1-4-5$. This type of situations cannot occur in chordal graphs. However, to maintain the soundness of an edge context when considering non-chordal graphs, the above definition has been formulated to make a statement explicitly about the direct dependence between the edge variables, that is \[ X_2 \perp X_5\mid X_3=0,X_{1,4,6}. \] \begin{definition} Contextual Markov network \label{def:cmn_hmm}\\ \normalfont A contextual Markov network is a triple $(G,\mathcal{C},P)$ where $P$ denotes a distribution over $X_V$ that satisfies the dependence structure encoded by the contextual Markov network structure $(G,\mathcal{C})$. \end{definition} The class of CMNs is essentially the same as the class of labeled graphical models, except for the revised definition of edge context, and subsumes the classes of stratified graphical models \citep{Nyman14,Nyman15b} which are restricted to chordal graphs. The reason for specifying an edge context by the common neighbors has been shown to be a natural condition \citep[see][Theorem 2]{Nyman15b}. In the following result, we further demonstrate the reason for this from an independence-based perspective. \begin{prop}\label{thm:cn} Let $X_{V}$ be a set of variables satisfying the Markov properties of the undirected graph $G=(V,E)$. Furthermore, let $i,j,k\in V$ such that $\{i,j\}\in E$ and $k\not\in cn(i,j)$. Under the Markov properties of $G$, the context-specific independence statement \[ X_{i} \perp X_{j} \mid x_{cn(i,j)},x_k,X_{V\setminus \{ \overbar{cn}(i,j)\cup k\} } \] is equivalent to \[ X_{i} \perp X_{j} \mid x_{cn(i,j)},X_{V\setminus \overbar{cn}(i,j) }. \] \end{prop} \begin{proof}\let\qed\relax See appendix. \end{proof} In other words, including variables that are not common neighbors into the set that specifies the edge context would not increase the generality of the models. Obviously, it would be possible to let an edge context be specified by a subset of the common neighbors, however, this would not increase the generality of the models since such a CSI statement is equivalent to a collection of CSIs of the type in Definition \ref{def:cmn_struct}. For example, say that the context of edge $\{2,4\}$ in the graph in Figure \ref{fig:ex_label} would be $\text{\footnotesize$\mathcal{C}$}(2,4)=\{1\}$ such that it would be specified by node $1\subseteq cn(2,4)$. This would imply that \[ X_2 \perp X_4 \mid X_1=1,X_3, \] which clearly is equivalent to the two statements \[ X_2 \perp X_4 \mid X_1=1,X_3=0\text{ and } X_2 \perp X_4 \mid X_1=1,X_3=1, \] which correspond to the original proper edge context $\text{\footnotesize$\mathcal{C}$}(2,4)=\{(1,0),(1,1)\}$. It has previously been shown that local CSIs similar to the type considered here result in linear restrictions on the parameters in the log-linear parameterization \citep{Corander03,Nyman15b}. In line with previous works, we show that this also holds for CMNs. \begin{prop}\label{thm:ec_loglin_rest} An element in an edge context, $x_{cn(i,j)}\in \text{\footnotesize$\mathcal{C}$}(i,j)$, imposes the following $(r_{i}-1)(r_{j}-1)$ linear restrictions on the log-linear parameters: \[ \sum_{A\subseteq cn(i,j)}\phi_{A\cup \{ i,j \}}(x_{A},x'_{i},x'_{j})=0 \text{ for all } x'_{\{i,j\}}\in \{1,\ldots,r_{i}-1\}\times\{1,\ldots,r_{j}-1\} \] where $\phi_{A\cup \{ i,j \}}(x_{A},x'_{i},x'_{j})=0$ if $x_{k}=0$ for any $k\in A$. \end{prop} \begin{proof}\let\qed\relax See appendix. \end{proof} Note that $\phi_{A\cup \{ i,j \}}(x_{A},x'_{i},x'_{j})=0$ in the above definition if $k,l\in A$ and $\{k,l\}\not\in E$ due to restriction \eqref{eq:g_loglin_rest}. To provide an example of how the above proposition can be used in practice, consider the labeled graph in Figure \ref{fig:ex_ug}(b). Assuming that all the variables have an outcome space equal to $\{ 0,1,2 \}$, the edge contexts induce the following restrictions on the $\phi$-functions in \eqref{eq:log_lin_para}: \begin{center} \begin{tabular}{l l l} $0\in \text{\footnotesize$\mathcal{C}$}(2,5):$\vspace{0.2cm} & $1\in \text{\footnotesize$\mathcal{C}$}(3,5):$ & $2\in \text{\footnotesize$\mathcal{C}$}(3,5):$ \\ $\phi_{2,5}(1,1)=0$\hspace{1cm} & $\phi_{3,5}(1,1)+\phi_{2,3,5}(1,1,1)=0$\hspace{1cm} & $\phi_{3,5}(1,1)+\phi_{2,3,5}(2,1,1)=0$ \\ $\phi_{2,5}(1,2)=0$ & $\phi_{3,5}(1,2)+\phi_{2,3,5}(1,1,2)=0$ & $\phi_{3,5}(1,2)+\phi_{2,3,5}(2,1,2)=0$ \\ $\phi_{2,5}(2,1)=0$ & $\phi_{3,5}(2,1)+\phi_{2,3,5}(1,2,1)=0$ & $\phi_{3,5}(2,1)+\phi_{2,3,5}(2,2,1)=0$ \\ $\phi_{2,5}(2,2)=0$ & $\phi_{3,5}(2,2)+\phi_{2,3,5}(1,2,2)=0$ & $\phi_{3,5}(2,2)+\phi_{2,3,5}(2,2,2)=0$ \\ \end{tabular} \end{center} In contrast to traditional MNs, the log-linear parameterization of a CMN is in general non-hierarchical \citep{Nyman15b}. Still, from Proposition \ref{thm:ec_loglin_rest} it is clear that the distribution of a CMN belongs to the collection of distributions of an MN with the same underlying graph. Consequently, a CMN indeed satisfies the Markov properties associated with its undirected graph making it a natural CSI-based extension of traditional MNs. From previous works \citep{Corander03,Nyman14}, it is obvious that distinct CMN structures may represent the same dependence structure. To avoid such an overlap, \citet{Corander03} introduced two conditions, \emph{maximality} and \emph{regularity}, which together guarantee that two distinct structures do not imply the same set of restrictions. The maximality condition ensures that no element can be added to an edge context without implying additional restrictions on the log-linear parameters. The regularity condition ensures that no edge can be completely removed by its edge context. Consequently, an edge context in a regular maximal CMN must be a strict subset of the outcome space of the common neighbors. Without loss of generality, it is sufficient to only consider regular maximal CMN structures \citep[see][for more details]{Corander03,Nyman14}. \section{Marginal pseudo-likelihood learning of contextual Markov network structures} One of the main reasons for restricting the context-specific models in \citep{Nyman14,Nyman15b} to chordal graphs is due to the complexity of learning the model structures from data. For the model class introduced in \citet{Nyman14}, there is a closed-form expression of the marginal likelihood making the model selection tractable for large systems, however, this necessitates fairly strict constraints on the CSIs allowed in the models. In \citet{Nyman15b} the restrictions were lifted making the marginal likelihood intractable to evaluate. The marginal likelihood was therefore replaced by the asymptotically equivalent Bayesian information criterion (BIC) by \citet{Schwarz78}. Still, the task of calculating the maximum likelihood estimates (MLEs) limits the applicability of the structure learning method to small-scale systems. In \citet{PensarMPL}, the marginal pseudo-likelihood (MPL) score was introduced as a criterion for large-scale structure learning of general MNs. It was shown to perform very well against competing methods on both synthetic and real-world networks. In terms of traditional MNs, the aim is to recover the dependence structure which is specified by an undirected graph. In this section we show how the scope of the MPL can be extended to also handle the general class of CMNs whose dependence structure is specified by an undirected graph and an associated context. \subsection{Marginal pseudo-likelihood for Markov networks} By structure learning, we refer to the process of inferring the dependence structure of a model from a set of data assumed to be generated by a model in the considered model class. A dataset $\mathbf{x}$ refers to a collection of $n$ i.i.d. complete joint observations over the $d$ variables. For derivation purposes, we introduce the graph-specific parameters \begin{equation}\label{eq:para} \theta_{ijl}=p(x_{j}^{(i)}\mid x_{mb(j)}^{(l)}) \end{equation} where the upper indices $i$ and $l$ represent specific outcomes of variable $j$ and its Markov blanket $mb(j)$. Similarly, we denote the counts of the corresponding configurations in $\mathbf{x}$ by $n_{ijl}$. In the Bayesian framework, a graph is scored by its posterior probability given the data, \[ p(G\mid \mathbf{x})\propto p(\mathbf{x}\mid G)\cdot p(G), \] where $p(\mathbf{x}\mid G)$ is the marginal likelihood and $p(G)$ is the prior probability of the graph. The marginal likelihood is the key component of the Bayesian score and it is evaluated as \begin{equation}\label{eq:marg_lh} p(\mathbf{x}\mid G)=\int p(\mathbf{x}\mid \theta_{G})\cdot f(\theta_{G})d\theta_{G}, \end{equation} where $\theta_G$ represents the set of parameters specifying a distribution imposed by $G$, $p(\mathbf{x}\mid \theta_{G})$ is the probability of the data under the given parameters (known as the likelihood of the parameters), and $f(\theta_{G})$ is a prior distribution over the possible parameter values. The marginal likelihood implicitly penalizes overly dense graphs through its parameter prior. In contrast to MNs for which the marginal likelihood is in general intractable, the Bayesian score has become the most popular choice when learning the related class of Bayesian networks for which the likelihood function factorizes into separate node-wise conditional likelihoods according to a directed acyclic graph (DAG). Due to the intractability of the marginal likelihood for non-chordal MNs, \citet{PensarMPL} introduced the MPL as a computationally efficient alternative score. The score is based on the pseudo-likelihood function \citep{Besag75} which approximates the likelihood function by factorizing it into node-wise conditional likelihood functions. In particular, for a given graph, the pseudo-likelihood function is simplified to \[ \hat p (\mathbf{x} \mid \theta_G)=\prod_{j=1}^{d} p (\mathbf{x}_j \mid \mathbf{x}_{mb(j)}, \theta_G)=\prod_{j=1}^{d} \prod_{l=1}^{q_j} \prod_{i=1}^{r_j} \theta_{ijl}^{n_{ijl}} \] since each variable is independent of the rest of the network given its Markov blanket (local Markov property). The MPL is now obtained by replacing the likelihood function in \eqref{eq:marg_lh} with the pseudo-likelihood function. Under certain assumptions regarding parameter independence \citep[see][]{PensarMPL}, the parameter prior can be factorized in a similar fashion. By further assuming \begin{equation*} (\theta_{1jl},\ldots,\theta_{r_{j}jl})\sim \text{Dirichlet}(\alpha_{1jl},\ldots,\alpha_{r_{j}jl})\text{ for all } j=1,\ldots,d\text{ and }l=1,\ldots,q_j, \end{equation*} the MPL can be evaluated by the closed-form expression \begin{equation}\label{eq:mpl} \hat{p}(\mathbf{x}\mid G)=\prod_{j=1}^{d}\prod_{l=1}^{q_j}\frac{\Gamma(\alpha_{jl})}{\Gamma(n_{jl}+\alpha_{jl})}\prod_{i=1}^{r_j}\frac{\Gamma(n_{ijl}+\alpha_{ijl})}{\Gamma(\alpha_{ijl})} \end{equation} where $n_{jl}=\sum_{i=1}^{r_j}n_{ijl}$ and $\alpha_{jl}=\sum_{i=1}^{r_j}\alpha_{ijl}$. In practice, the logarithm of the formula is used since it is computationally more manageable. We specify the hyperparameters by setting $\alpha_{ijl}=1/2$, which results in Jeffreys' prior for the multinomial distribution. \begin{figure} \begin{center} \begin{tikzpicture} \node[at={(0,-1.75)},circle,draw,line width=0.25mm,minimum size=20pt](4){4}; \node[at={(0,0)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](1){1}; \node[at={(1.75,0)},circle,draw,line width=0.25mm,minimum size=20pt](2){2}; \draw[line width=0.25mm,decoration={markings,mark=at position 1 with {\arrow[scale=1.5]{stealth}}},postaction={decorate}] (2) -- (1); \draw[line width=0.25mm,decoration={markings,mark=at position 1 with {\arrow[scale=1.5]{stealth}}},postaction={decorate}] (4) -- (1); \node[at={(4.75,-1.75)},circle,draw,line width=0.25mm,minimum size=20pt](5){5}; \node[at={(3,0)},circle,draw,line width=0.25mm,minimum size=20pt](1){1}; \node[at={(4.75,0)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](2){2}; \node[at={(6.5,0)},circle,draw,line width=0.25mm,minimum size=20pt](3){3}; \draw[line width=0.25mm,decoration={markings,mark=at position 1 with {\arrow[scale=1.5]{stealth}}},postaction={decorate}] (1) -- (2); \draw[line width=0.25mm,decoration={markings,mark=at position 1 with {\arrow[scale=1.5]{stealth}}},postaction={decorate}] (3) -- (2); \draw[line width=0.25mm,decoration={markings,mark=at position 1 with {\arrow[scale=1.5]{stealth}}},postaction={decorate}] (5) -- (2); \node[at={(7.75,-1.75)},circle,draw,line width=0.25mm,minimum size=20pt](5){5}; \node[at={(7.75,0)},circle,draw,line width=0.25mm,minimum size=20pt](2){2}; \node[at={(9.5,0)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](3){3}; \draw[line width=0.25mm,decoration={markings,mark=at position 1 with {\arrow[scale=1.5]{stealth}}},postaction={decorate}] (2) -- (3); \draw[line width=0.25mm,decoration={markings,mark=at position 1 with {\arrow[scale=1.5]{stealth}}},postaction={decorate}] (5) -- (3); \node[at={(0,-4.75)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](4){4}; \node[at={(0,-3)},circle,draw,line width=0.25mm,minimum size=20pt](1){1}; \node[at={(1.75,-4.75)},circle,draw,line width=0.25mm,minimum size=20pt](5){5}; \draw[line width=0.25mm,decoration={markings,mark=at position 1 with {\arrow[scale=1.5]{stealth}}},postaction={decorate}] (1) -- (4); \draw[line width=0.25mm,decoration={markings,mark=at position 1 with {\arrow[scale=1.5]{stealth}}},postaction={decorate}] (5) -- (4); \node[at={(3,-4.75)},circle,draw,line width=0.25mm,minimum size=20pt](4){4}; \node[at={(4.75,-3)},circle,draw,line width=0.25mm,minimum size=20pt](2){2}; \node[at={(6.5,-3)},circle,draw,line width=0.25mm,minimum size=20pt](3){3}; \node[at={(4.75,-4.75)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](5){5}; \draw[line width=0.25mm,decoration={markings,mark=at position 1 with {\arrow[scale=1.5]{stealth}}},postaction={decorate}] (4) -- (5); \draw[line width=0.25mm,decoration={markings,mark=at position 1 with {\arrow[scale=1.5]{stealth}}},postaction={decorate}] (2) -- (5); \draw[line width=0.25mm,decoration={markings,mark=at position 1 with {\arrow[scale=1.5]{stealth}}},postaction={decorate}] (3) -- (5); \node[at={(9.5,-4.75)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](6){6}; \end{tikzpicture} \end{center} \caption{Node-specific DAGs illustrating the factorization of MPL for the graph in Figure \ref{fig:ex_ug}(a). \label{fig:ex_ug_mpl}} \end{figure} Similar to the marginal likelihood of a Bayesian network, the MPL factorizes into node-wise marginal conditional likelihoods: \begin{equation}\label{eq:mpl_fac} \hat{p}(\mathbf{x}\mid G)=\prod_{j=1}^{d} p(\mathbf{x}_j \mid \mathbf{x}_{mb(j)}). \end{equation} For example, the MPL of the undirected graph in Figure \ref{fig:ex_ug}(a) follows a node-wise factorization illustrated by the DAGs in Figure \ref{fig:ex_ug_mpl}: \[ \hat{p}(\mathbf{x}\mid G)=p(\mathbf{x}_1 \mid \mathbf{x}_{2,4})p(\mathbf{x}_2 \mid \mathbf{x}_{1,3,5})p(\mathbf{x}_3 \mid \mathbf{x}_{2,5})p(\mathbf{x}_4 \mid \mathbf{x}_{1,5})p(\mathbf{x}_5 \mid \mathbf{x}_{2,3,4})p(\mathbf{x}_6). \] The set of parents of a node $j$, which is defined as all nodes from which there are directed edges towards $j$, is the Markov blanket $mb(j)$ of the node in the undirected graph. The Markov blankets of a graph are mutually consistent in the sense that $i\in mb(j)$ iff $j\in mb(i)$. In the local DAGs, this is reflected by $i$ being a parent to $j$ iff $j$ is a parent to $i$. Consequently, when combining the collection of local DAGs associated with the MPL, the result is not a DAG in itself but rather a bi-directional dependency network \citep{Heckerman01}. In addition to the MPL, we also need to specify a graph prior $p(G)$, through which it is possible to incorporate any prior belief concerning the graph structure. In order to preserve the decomposability of the overall score, the prior must follow a similar factorization as the MPL \citep[see][]{PensarMPL}. \subsection{Marginal pseudo-likelihood for contextual Markov networks} In this section we show how the MPL can be modified to also take the context structure into account. More specifically, we show that the CSIs of a CMN can be taken into account in a similar fashion as CSI has been exploited in learning of Bayesian networks \citep{Friedman96,Pensar15}. The key innovation lies in the observation that the CSIs in Definition \ref{def:cmn_struct} can be recast to be consistent with the structure of MPL. More specifically, under the current assumptions and a given graph, the local Markov property ensures that \begin{equation}\label{eq:mb_csi} X_i \perp X_j \mid x_{cn(i,j)},X_{V\setminus \overbar{cn}(i,j)} \Leftrightarrow \begin{aligned} &X_i \perp X_j \mid x_{cn(i,j)},X_{mb(i) \setminus \{ cn(i,j) \cup j \}}\\ &X_i \perp X_j \mid x_{cn(i,j)},X_{mb(j) \setminus \{ cn(i,j) \cup i \}} \end{aligned}, \end{equation} where the CSIs on the right hand side imply that some of the conditional distributions of a node given its Markov blanket are assumed identical. This is essentially equivalent to including local CSIs \citep[][Definition 3]{Pensar15} in learning of Bayesian networks. Constraints of the above type are thus straightforward to incorporate into the evaluation of the MPL. In practice, the outcome space of the conditioning variables is partitioned into classes with invariant conditional distributions for outcomes assigned to the same class. Consequently, the corresponding conditional distribution parameters \eqref{eq:para} are defined over classes rather than distinct configurations \citep{Friedman96,Chickering97,Pensar15}. Following the same approach as in the previous section, we reach the same closed-form expression \eqref{eq:mpl}, however, the $l$-index now runs over classes which are specified by the edge contexts. Similarly, the counts $n_{ijl}$'s are now defined in terms of classes meaning that distinct Markov blanket configurations within the same class contribute to the same class-specific count. As an example, consider the CMN structure represented by the labeled graph in Figure \ref{fig:ex_ug}(b). The induced CSIs can be reformulated according to the equivalence relation in equation \eqref{eq:mb_csi}: \begin{equation*} \begin{aligned} X_2 \perp X_5 \mid X_3=0,X_{1,4,6} & \Leftrightarrow \begin{aligned} &X_2 \perp X_5 \mid X_3=0,X_1\\ &X_5 \perp X_2 \mid X_3=0,X_4 \end{aligned},\\ X_3 \perp X_5 \mid X_2=1,X_{1,4,6} & \Leftrightarrow \begin{aligned} &X_3 \perp X_5 \mid X_2=1 \\ &X_5 \perp X_3 \mid X_2=1,X_4 \end{aligned},\\ X_3 \perp X_5 \mid X_2=2,X_{1,4,6} & \Leftrightarrow \begin{aligned} &X_3 \perp X_5 \mid X_2=2 \\ &X_5 \perp X_3 \mid X_2=2,X_4 \end{aligned}. \end{aligned} \end{equation*} The above statements on the right correspond to setting certain of the MPL-associated conditional distributions identical. This is achieved by partitioning the outcome space of the Markov blankets accordingly. To give an example of how this works in practice, consider the outcome space of the Markov blanket of variable $X_5$ which is made up of $(X_2,X_3,X_4)$. In this case, \[ X_5 \perp X_2 \mid X_3=0,X_4 \Rightarrow X_5 \perp X_2 \mid X_3=0,X_4=0, \] which implies that the $(X_2,X_3,X_4)$-configurations $(0,0,0),(1,0,0)$, and $(2,0,0)$ give rise to identical conditional distributions over $X_5$ and are thereby placed in the same class. Note that restrictions may overlap and care must be taken when constructing the partition. In addition to the above restriction, consider \[ X_5 \perp X_3 \mid X_2=1,X_4 \Rightarrow X_5 \perp X_3 \mid X_2=1,X_4=0, \] which implies that the $(X_2,X_3,X_4)$-configurations $(1,0,0),(1,1,0)$, and $(1,2,0)$ give rise to identical conditional distributions over $X_5$ and are thereby placed in the same class. However, since both of the considered sets of configurations cover the same configuration, $(1,0,0)$, it implies that all of the mentioned configurations give rise to the same conditional distribution and are thereby placed in the same class. In Figure \ref{fig:oc_part} we show how the final complete partition can be obtained through a stepwise procedure. \begin{figure} \begin{center} \begin{tikzpicture} \node[at={(0,0)}](111){$\{(0,0,0)\}$}; \node[at={(0,-0.45)}](000){$\{(0,0,1)\}$}; \node[at={(0,-0.9)}](000){$\{(0,0,2)\}$}; \node[at={(0,-1.35)}](000){$\{(0,1,0)\}$}; \node[at={(0,-1.8)}](000){$\{(0,1,1)\}$}; \node[at={(0,-2.25)}](000){$\{(0,1,2)\}$}; \node[at={(0,-2.7)}](000){$\{(0,2,0)\}$}; \node[at={(0,-3.15)}](000){$\{(0,2,1)\}$}; \node[at={(0,-3.6)}](000){$\{(0,2,2)\}$}; \node[at={(0,-4.05)}](1){$\{ (1,0,0)\}$}; \node[at={(0,-4.5)}](5){$\{ (1,0,1)\}$}; \node[at={(0,-4.95)}](9){$\{ (1,0,2)\}$}; \node[at={(0,-5.4)}](2){$\{ (1,1,0)\}$}; \node[at={(0,-5.85)}](6){$\{ (1,1,1)\}$}; \node[at={(0,-6.3)}](10){$\{ (1,1,2)\}$}; \node[at={(0,-6.75)}](3){$\{ (1,2,0)\}$}; \node[at={(0,-7.2)}](7){$\{ (1,2,1)\}$}; \node[at={(0,-7.65)}](11){$\{ (1,2,2)\}$}; \node[at={(0,-8.1)}](000){$\{(2,0,0)\}$}; \node[at={(0,-8.55)}](000){$\{(2,0,1)\}$}; \node[at={(0,-9)}](000){$\{(2,0,2)\}$}; \node[at={(0,-9.45)}](000){$\{(2,1,0)\}$}; \node[at={(0,-9.9)}](000){$\{(2,1,1)\}$}; \node[at={(0,-10.35)}](000){$\{(2,1,2)\}$}; \node[at={(0,-10.8)}](000){$\{(2,2,0)\}$}; \node[at={(0,-11.25)}](000){$\{(2,2,1)\}$}; \node[at={(0,-11.7)}](000){$\{(2,2,2)\}$}; \node[at={(4,0)}](222){$\{(0,0,0)\}$}; \node[at={(4,-0.45)}](000){$\{(0,0,1)\}$}; \node[at={(4,-0.9)}](000){$\{(0,0,2)\}$}; \node[at={(4,-1.35)}](000){$\{(0,1,0)\}$}; \node[at={(4,-1.8)}](000){$\{(0,1,1)\}$}; \node[at={(4,-2.25)}](000){$\{(0,1,2)\}$}; \node[at={(4,-2.7)}](000){$\{(0,2,0)\}$}; \node[at={(4,-3.15)}](000){$\{(0,2,1)\}$}; \node[at={(4,-3.6)}](000){$\{(0,2,2)\}$}; \node[at={(4,-4.5)}](4){$\begin{Bmatrix}(1,0,0) \\ (1,1,0) \\ (1,2,0)\end{Bmatrix}$}; \node[at={(4,-5.85)}](8){$\begin{Bmatrix} (1,0,1) \\ (1,1,1) \\ (1,2,1)\end{Bmatrix}$}; \node[at={(4,-7.2)}](12){$\begin{Bmatrix} (1,0,2) \\ (1,1,2) \\ (1,2,2)\end{Bmatrix}$}; \node[at={(4,-8.1)}](13){$\{(2,0,0)\}$}; \node[at={(4,-8.55)}](14){$\{(2,0,1)\}$}; \node[at={(4,-9)}](15){$\{(2,0,2)\}$}; \node[at={(4,-9.45)}](17){$\{(2,1,0)\}$}; \node[at={(4,-9.9)}](18){$\{(2,1,1)\}$}; \node[at={(4,-10.35)}](19){$\{(2,1,2)\}$}; \node[at={(4,-10.8)}](21){$\{(2,2,0)\}$}; \node[at={(4,-11.25)}](22){$\{(2,2,1)\}$}; \node[at={(4,-11.7)}](23){$\{(2,2,2)\}$}; \path (1.east) edge[line width=0.25mm] (4.west); \path (2.east) edge[line width=0.25mm] (4.west); \path (3.east) edge[line width=0.25mm] (4.west); \path (5.east) edge[line width=0.25mm] (8.west); \path (6.east) edge[line width=0.25mm] (8.west); \path (7.east) edge[line width=0.25mm] (8.west); \path (9.east) edge[line width=0.25mm] (12.west); \path (10.east) edge[line width=0.25mm] (12.west); \path (11.east) edge[line width=0.25mm] (12.west); \node[at={(8,0)}](25){$\{(0,0,0)\}$}; \node[at={(8,-0.45)}](26){$\{(0,0,1)\}$}; \node[at={(8,-0.9)}](27){$\{(0,0,2)\}$}; \node[at={(8,-1.35)}](000){$\{(0,1,0)\}$}; \node[at={(8,-1.8)}](000){$\{(0,1,1)\}$}; \node[at={(8,-2.25)}](000){$\{(0,1,2)\}$}; \node[at={(8,-2.7)}](000){$\{(0,2,0)\}$}; \node[at={(8,-3.15)}](000){$\{(0,2,1)\}$}; \node[at={(8,-3.6)}](000){$\{(0,2,2)\}$}; \node[at={(8,-4.5)}](4){$\begin{Bmatrix}(1,0,0) \\ (1,1,0) \\ (1,2,0)\end{Bmatrix}$}; \node[at={(8,-5.85)}](8){$\begin{Bmatrix}(1,0,1) \\ (1,1,1) \\ (1,2,1)\end{Bmatrix}$}; \node[at={(8,-7.2)}](12){$\begin{Bmatrix}(1,0,2) \\ (1,1,2) \\ (1,2,2)\end{Bmatrix}$}; \node[at={(8,-8.55)}](16){$\begin{Bmatrix} (2,0,0) \\ (2,1,0) \\ (2,2,0)\end{Bmatrix}$}; \node[at={(8,-9.9)}](20){$\begin{Bmatrix} (2,0,1) \\ (2,1,1) \\ (2,2,1)\end{Bmatrix}$}; \node[at={(8,-11.25)}](24){$\begin{Bmatrix} (2,0,2) \\ (2,1,2) \\ (2,2,2)\end{Bmatrix}$}; \path (13.east) edge[line width=0.25mm] (16.west); \path (14.east) edge[line width=0.25mm] (20.west); \path (15.east) edge[line width=0.25mm] (24.west); \path (17.east) edge[line width=0.25mm] (16.west); \path (18.east) edge[line width=0.25mm] (20.west); \path (19.east) edge[line width=0.25mm] (24.west); \path (21.east) edge[line width=0.25mm] (16.west); \path (22.east) edge[line width=0.25mm] (20.west); \path (23.east) edge[line width=0.25mm] (24.west); \node[at={(12,-4.5)}](32){$\begin{Bmatrix}(0,0,1) \\ (1,0,1) \\ (1,1,1) \\ (1,2,1) \\ (2,0,1) \\ (2,1,1) \\ (2,2,1)\end{Bmatrix}$}; \node[at={(12,-1.35)}](28){$\begin{Bmatrix}(0,0,0) \\ (1,0,0) \\ (1,1,0) \\ (1,2,0) \\ (2,0,0) \\ (2,1,0) \\ (2,2,0)\end{Bmatrix}$}; \node[at={(12,-7.65)}](36){$\begin{Bmatrix}(0,0,2) \\ (1,0,2) \\ (1,1,2) \\ (1,2,2) \\ (2,0,2) \\ (2,1,2) \\ (2,2,2)\end{Bmatrix}$}; \node[at={(12,-9.45)}](000){$\{(0,1,0)\}$}; \node[at={(12,-9.9)}](000){$\{(0,1,1)\}$}; \node[at={(12,-10.35)}](000){$\{(0,1,2)\}$}; \node[at={(12,-10.8)}](000){$\{(0,2,0)\}$}; \node[at={(12,-11.25)}](000){$\{(0,2,1)\}$}; \node[at={(12,-11.7)}](000){$\{(0,2,2)\}$}; \path (25.east) edge[line width=0.25mm] (28.west); \path (16.east) edge[line width=0.25mm] (28.west); \path (4.east) edge[line width=0.25mm] (28.west); \path (26.east) edge[line width=0.25mm] (32.west); \path (20.east) edge[line width=0.25mm] (32.west); \path (8.east) edge[line width=0.25mm] (32.west); \path (27.east) edge[line width=0.25mm] (36.west); \path (24.east) edge[line width=0.25mm] (36.west); \path (12.east) edge[line width=0.25mm] (36.west); \node[at={(0,0.5)}]{\small $X_2\hspace{0.05cm}X_3\hspace{0.05cm}X_4$}; \node[at={(4,0.5)}]{\small $X_2\hspace{0.05cm}X_3\hspace{0.05cm}X_4$}; \node[at={(8,0.5)}]{\small $X_2\hspace{0.05cm}X_3\hspace{0.05cm}X_4$}; \node[at={(12,0.5)}]{\small $X_2\hspace{0.05cm}X_3\hspace{0.05cm}X_4$}; \draw[->,line width=0.25mm] (111.north east) to[out=60,in=120] (222.north west); \draw[->,line width=0.25mm] (222.north east) to[out=60,in=120] (25.north west); \draw[->,line width=0.25mm] (25.north east) to[out=60,in=120] (28.north west); \node[at={(2,1.4)}]{\small $X_5\perp X_3 \mid X_2=1,X_4$}; \node[at={(6,1.4)}]{\small $X_5\perp X_3 \mid X_2=2,X_4$}; \node[at={(10,1.4)}]{\small $X_5\perp X_2 \mid X_3=0,X_4$}; \end{tikzpicture} \end{center} \caption{A stepwise procedure for partitioning the outcome space of the Markov blanket of variable $X_5$ (Figure \ref{fig:ex_ug}(b)) according to the CSI restrictions implied by the labels. The curly brackets indicate the different classes. For example, in the first column (from the left) no CSI restriction has been imposed and each configuration belongs to a distinct class. When moving to the second column, the CSI above the curved arrow (between the first and second column) is imposed implying that certain configurations (indicated by the connecting lines) give rise to identical distributions and are thereby placed in the same class. This procedure is then repeated for the remaining CSIs, eventually resulting in the last column, which represents the final partition in which all edge contexts, $\text{\footnotesize$\mathcal{C}$} (5)=\{ \text{\footnotesize$\mathcal{C}$}(2,5), \text{\footnotesize$\mathcal{C}$}(3,5) \}$, are accounted for. \label{fig:oc_part}} \end{figure} Similar to \eqref{eq:mpl_fac}, the MPL for CMNs factorizes into node-wise marginal conditional likelihoods \[ \hat{p}(\mathbf{x}\mid G,\mathcal{C})=\prod_{j=1}^{d} p(\mathbf{x}_j \mid \mathbf{x}_{mb(j)},\text{\footnotesize$\mathcal{C}$}(j)), \] where $\text{\footnotesize$\mathcal{C}$}(j)=\{ \text{\footnotesize$\mathcal{C}$}(i,j) \}_{i \in mb(j)}$ denotes the set of edge contexts of edges between node $j$ and its Markov blanket. The set $\text{\footnotesize$\mathcal{C}$}(j)$ is sufficient for determining how the outcome space of the Markov blanket of node $j$ is partitioned. If all edge contexts associated with a node are empty, the marginal conditional likelihood of the node is reduced to regular MPL calculation where each Markov blanket configuration is considered a separate class. It has been shown that the MPL criterion is a consistent estimator for the graph structure \citep{PensarMPL}. In the following theorem we establish that the modified MPL criterion is also a consistent estimator of the dependence structure of CMNs. \begin{theorem}\label{thm:consist_res} Let $(G^{*},\mathcal{C}^{*},P^{*})$ be a contextual Markov network over d variables for which $(G^{*},\mathcal{C}^{*})$ is maximal regular and $P^{*}$ is faithful to $(G^{*},\mathcal{C}^{*})$. Let $\mathbf{x}$ be a sample of size $n$ generated from $P^{*}$. The local MPL estimator \begin{equation*} (\skew{6}\widehat{m}b(j),\skew{3}\widehat{\text{\footnotesize$\mathcal{C}$}}(j)) = \underset{mb(j),\text{\tiny$\mathcal{C}$}(j)}{\arg \max} \ p(\mathbf{x}_{j} \mid \mathbf{x}_{mb(j)},\text{\footnotesize$\mathcal{C}$}(j)) \end{equation*} is consistent in the sense that $\skew{6}\widehat{m}b(j)=mb^{*}(j)$ and $\skew{3}\widehat{\text{\footnotesize$\mathcal{C}$}}(j)=\text{\footnotesize$\mathcal{C}$}^{*}(j)$ eventually almost surely as $n\to\infty$ for $j=1,\ldots,d$. Consequently, the global MPL estimator \begin{equation*} (\widehat{G},\widehat{\mathcal{C}}) = \underset{G,\mathcal{C}}{\arg \max} \ \hat{p}(\mathbf{x} \mid G,\mathcal{C}) \end{equation*} is consistent in the sense that $\widehat{G}=G^{*}$ and $\widehat{\mathcal{C}}=\mathcal{C}^{*}$ eventually almost surely as $n\to\infty$. \end{theorem} \begin{proof}\let\qed\relax See appendix. \end{proof} The consistency property validates the use of MPL from a theoretical perspective, however, it is even more important to study its performance in practice for limited sample sizes. For this purpose, we perform a small-scale simulation study on both synthetic and real-world datasets in Section \ref{sec:num_res}. In addition to the MPL part, the final score also contains a structure prior. Previous research has shown that when learning graphical CSI models by optimizing the marginal likelihood (or the BIC), the resulting models tend to be very dense with complex dependence structures \citep{Pensar15,Nyman15b,Pensar15b}. In addition, such models may suffer from poor out-of-sample performance \citep{Pensar15,Pensar15b}. Therefore, a variety of priors have been proposed to further regulate the model fit \citep{Friedman96,Nyman14,Pensar15,Nyman15b,Pensar15b}. Due to the similarity between the marginal likelihood for Bayesian networks with local CSIs and the MPL for CMNs, one would expect the MPL to suffer from the same problem if it is not properly regulated. The prior of a CMN structure can be factorized into a prior over the graph and the context given the graph, \[ p(G,\mathcal{C})=p(\mathcal{C}\mid G) \cdot p(G). \] Similar to \citet{Pensar15}, we assume a uniform prior over the graphs and instead design a prior that penalizes inclusion of context elements. More specifically, we construct our prior according to \[ p(\mathcal{C}\mid G) \propto \prod_{\{i,j\}\in E} \kappa^{|\text{\tiny$\mathcal{C}$}(i,j)|(r_i-1)(r_j-1)} = \prod_{j=1}^{d}\prod_{i\in mb(j)} \kappa^{\frac{1}{2}|\text{\tiny$\mathcal{C}$}(i,j)|(r_i-1)(r_j-1)} \] where $|\text{\footnotesize$\mathcal{C}$}(i,j)|$ is the number of elements in the edge context, $(r_i-1)(r_j-1)$ is a cardinality dependent factor, and $\kappa \in (0,1]$ is a tuning parameter. The value on $\kappa$ specifies how strongly a context element must be supported by the MPL to be included, $\kappa=1$ results in a non-penalizing uniform prior whereas a small enough $\kappa=\epsilon$ prohibits non-empty edge contexts altogether and thereby reduces the learning procedure to regular MPL learning of the graph structure alone. The problem with a tunable prior is that we must determine a value on $\kappa$ through some form of empirical method. For example, to choose among several candidate values, \citet{Pensar15} used a cross-validation based method. Here we propose a computationally less expensive approach where we simply choose the model with the highest BIC score from a set of models identified under various values on $\kappa$. This is made possible by the fact that we do not use BIC as our objective function during the learning process. The idea is that any potential overfitting with respect to the MPL will be reflected in a reduced BIC score, this would obviously not be the case if the candidate structures were optimized with respect to the BIC. In the experiment section, we study how the chosen models perform in practice both in- and out-of-sample. \subsection{Search algorithm} Given a score, we still need to construct a search algorithm for finding high-scoring networks. Since this is an intractable problem, we construct a simple hill-climb method similar to the one used by \citet{PensarMPL}. The idea is to begin from the empty graph and then traverse between neighboring graphs in a greedy manner until a local maximum is reached. The set of neighbors of a graph $G$ is denoted by $\mathcal{N}(G)$ and defined as all graphs that can be reached by adding/deleting a single edge to/from $G$. To include the context structure in the search procedure, we apply a second hill-climb method to identify a context for each considered graph. The empty context is set as the initial state and the search method proceeds by adding elements to the edge contexts in a greedy manner until no further improvement can be achieved by adding a single element. Note that the only elements that need to be evaluated, after the first step, are those of edges overlapping with the edge of the most recently altered context. Furthermore, such elements need only be re-evaluated in terms of the node-wise scores of the nodes part of the edge whose context was changed. Pseudo-code of the search procedures is presented in Algorithm \ref{alg:hc_ug} and \ref{alg:hc_ctxt}. \begin{algorithm}\small{ \textbf{Procedure} Graph-Hill-Climb( \hspace{1cm}$\mathbf{x}$\phantom{$G$} \ \ //\emph{Complete dataset} \hspace{1cm}) 1: \ \ $G,\widehat{G}\leftarrow$ \emph{empty graph}, $\widehat{\mathcal{C}} \leftarrow$ \emph{empty context}\vspace{0.1cm} 2: \ \ \textbf{while} $\widehat{G}$ has changed\vspace{0.1cm} 3: \hspace{0.5cm} $G\leftarrow \widehat{G}$\vspace{0.1cm} 4: \hspace{0.5cm} \textbf{for each} $G'\in \mathcal{N}(G)$\vspace{0.1cm} 5: \hspace{1cm} $\mathcal{C}'\leftarrow\text{Context-Hill-Climb}(\mathbf{x},G')$\vspace{0.1cm} 6: \hspace{1cm} \textbf{if} $\hat p(\mathbf{x},G',\mathcal{C}') > \hat p(\mathbf{x},\widehat{G},\widehat{\mathcal{C}})$\vspace{0.1cm} 7: \hspace{1.5cm} $(\widehat{G},\widehat{\mathcal{C}}) \leftarrow (G',\mathcal{C}')$\vspace{0.1cm} 8: \hspace{1cm} \textbf{end}\vspace{0.1cm} 9: \hspace{0.5cm} \textbf{end}\vspace{0.1cm} 10:\hspace{0.05cm} \textbf{end}\vspace{0.1cm} 11:\hspace{0.05cm} \textbf{return} $\widehat{G},\widehat{\mathcal{C}}$\vspace{0.1cm}} \caption{Procedure for finding a graph with an associated context structure. \label{alg:hc_ug}} \end{algorithm} \begin{algorithm}\small{ \textbf{Procedure} Context-Hill-Climb( \hspace{1cm}$\mathbf{x}$\phantom{$G$} \ \ //\emph{Complete dataset} \hspace{1cm}$G$\phantom{$\mathbf{x}$} \ \ //\emph{Graph} \hspace{1cm}) 1: \ \ $\mathcal{C},\widehat{\mathcal{C}}\leftarrow$ \emph{empty context}\vspace{0.1cm} 2: \ \ \textbf{while} $\widehat{\mathcal{C}}$ has changed\vspace{0.1cm} 3: \hspace{0.5cm} $\mathcal{C}\leftarrow \widehat{\mathcal{C}}$\vspace{0.1cm} 4: \hspace{0.5cm} \textbf{for each} $(i,j)\in E$\vspace{0.1cm} 5: \hspace{1cm} \textbf{for each} $x_{cn(i,j)}\in \{\mathcal{X}_{cn(i,j)}\setminus \text{\footnotesize$\mathcal{C}$}(i,j)\}$\vspace{0.1cm} 6: \hspace{1.5cm} $\text{\footnotesize$\mathcal{C}$}'(i,j)\leftarrow \text{\footnotesize$\mathcal{C}$}(i,j) \cup x_{cn(i,j)}$\vspace{0.1cm} 7: \hspace{1.5cm} \textbf{if} $\hat p(\mathbf{x},G,\mathcal{C}') > \hat p(\mathbf{x},G,\widehat{\mathcal{C}})$\vspace{0.1cm} 8: \hspace{2.5cm} $\widehat{\mathcal{C}} \leftarrow \mathcal{C}'$\vspace{0.1cm} 9: \hspace{1.5cm} \textbf{end}\vspace{0.1cm} 10: \hspace{0.9cm} \textbf{end}\vspace{0.1cm} 11: \hspace{0.4cm} \textbf{end}\vspace{0.1cm} 12:\hspace{0.05cm} \textbf{end}\vspace{0.1cm} 13:\hspace{0.05cm} \textbf{return} $\widehat{\mathcal{C}}$\vspace{0.1cm}} \caption{Procedure for finding a context structure of a given graph.\label{alg:hc_ctxt}} \end{algorithm} \section{Numerical results\label{sec:num_res}} In this section we perform a simulation study in order to investigate how MPL performs in practice in learning CMN structures for both synthetic and real-world data. In the first part, we look closer into the behavior of the MPL using synthetic datasets generated from a model containing actual CSIs. In the second part, we perform experiments on several real-world datasets in order to investigate if our method is able to find CSIs in real data and thereby improve model quality. To evaluate how well a model fits the training data, we use a standardized BIC score (sBIC) which is divided by the sample size $n$. In addition, we consider the out-of-sample predictive accuracy of the corresponding models. The model parameters are estimated by the MLEs. To enable computation of the MLEs using the conjugate gradient ascent technique described in \citet[][Section A.5.2]{Koller09}, we restricted the experiments to small-scale models. We ran the CMN search algorithm under different priors specified by \[ \kappa \in \{\epsilon,n^{-1},n^{-1/2},n^{-1/4}\}. \] where $\epsilon$ is a value small enough to prevent edge contexts from being added, this is essentially the same as skipping the context search (step 5 in Algorithm \ref{alg:hc_ug}). We compare our models against traditional non-decomposable Markov networks (MN), which are obtained as part of the CMN search when $\kappa=\epsilon$, as well as decomposable stratified graphical models (SGM), which are learned using the stochastic search algorithm by \citet{Nyman14}, the number of iterations was set to 500 for both the graph and the label procedure. \subsection{Synthetic data} In this section we perform simulations on synthetic data generated from a known model that contains CSIs. Having access to the true model allows us to test our method in a controlled setting over a range of sample sizes. Moreover, it allows us to assess the out-of-sample performance using the Kullback-Leibler (KL) divergence from the true distribution $P$ to the approximated distribution $\hat P$ under a model, \[ D_{KL}(P,\hat P)=\sum_{x\in\mathcal{X}}p(x)\log \frac{p(x)}{\hat p(x)}. \] The lower the value, the closer the approximate distribution is to the true distribution. As our true model, we use an SGM (originally used in \citet{Nyman14}) which is, as explained earlier, a special case of the CMN model class. The model contains seven binary variables and its dependence structure is illustrated by the labeled graph in Figure \ref{fig:sim_synth_struct}(a). Ten datasets were generated for sample sizes ranging from $250$ to $4000$ (see Supplementary material). \begin{figure} \begin{subfigure}{0.24\textwidth} \begin{center} \begin{tikzpicture} \node[at={(0,0)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](6){6}; \node[at={(2,0)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](7){7}; \node[at={(1,1.5)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](5){5}; \node[at={(0,3)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](3){3}; \node[at={(2,3)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](4){4}; \node[at={(0,5)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](1){1}; \node[at={(2,5)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](2){2}; \path (1) edge[line width=0.25mm] node[above=-2] {\small{$10$}} (2); \path (1) edge[line width=0.25mm] node[left=-2] {\small{$1\hspace{-0.01cm}*$}} (3); \path (1) edge[line width=0.25mm] (4); \path (2) edge[line width=0.25mm] (3); \path (2) edge[line width=0.25mm] (4); \path (3) edge[line width=0.25mm] (4); \path (3) edge[line width=0.25mm] (5); \path (4) edge[line width=0.25mm] node[below right=-2] {\small{$0$}} (5); \path (5) edge[line width=0.25mm] (6); \path (5) edge[line width=0.25mm] node[above right=-2] {\small{$0$}} (7); \path (6) edge[line width=0.25mm] node[below=-1] {\small{$1$}} (7); \end{tikzpicture} \end{center} \caption{True structure.\label{fig:gen_sg}} \end{subfigure} \begin{subfigure}{0.24\textwidth} \begin{center} \begin{tikzpicture} \node[at={(0,0)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](6){6}; \node[at={(2,0)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](7){7}; \node[at={(1,1.5)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](5){5}; \node[at={(0,3)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](3){3}; \node[at={(2,3)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](4){4}; \node[at={(0,5)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](1){1}; \node[at={(2,5)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](2){2}; \path (1) edge[line width=0.25mm] (4); \path (2) edge[line width=0.25mm] (3); \path (2) edge[line width=0.25mm] (4); \path (3) edge[line width=0.25mm] node[below=-1] {\small{$*1$}} (4); \path (3) edge[line width=0.25mm] (5); \path (4) edge[line width=0.25mm] node[below right=-2] {\small{$0$}} (5); \path (5) edge[line width=0.25mm] (6); \path (5) edge[line width=0.25mm] node[above right=-2] {\small{$0$}} (7); \path (6) edge[line width=0.25mm] node[below=-1] {\small{$1$}} (7); \end{tikzpicture} \end{center} \caption{CMN: $n=250$.\label{fig:synth_n250_cmn}} \end{subfigure} \begin{subfigure}{0.24\textwidth} \begin{center} \begin{tikzpicture} \node[at={(0,0)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](6){6}; \node[at={(2,0)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](7){7}; \node[at={(1,1.5)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](5){5}; \node[at={(0,3)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](3){3}; \node[at={(2,3)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](4){4}; \node[at={(0,5)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](1){1}; \node[at={(2,5)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](2){2}; \path (1) edge[line width=0.25mm] node[above=-2] {\small{$10$}} (2); \path (1) edge[line width=0.25mm] node[left=-2] {\small{$1\hspace{-0.01cm}*$}} (3); \path (1) edge[line width=0.25mm] (4); \path (2) edge[line width=0.25mm] (3); \path (2) edge[line width=0.25mm] (4); \path (3) edge[line width=0.25mm] node[below=-3] {\small{$\stack{*01}{111}$}} (4); \path (3) edge[line width=0.25mm] (5); \path (4) edge[line width=0.25mm] node[below right=-2] {\small{$0$}} (5); \path (5) edge[line width=0.25mm] (6); \path (5) edge[line width=0.25mm] node[above right=-2] {\small{$0$}} (7); \path (6) edge[line width=0.25mm] node[below=-1] {\small{$1$}} (7); \end{tikzpicture} \end{center} \caption{CMN: $n=1000$.\label{fig:synth_n1000_cmn}} \end{subfigure} \begin{subfigure}{0.24\textwidth} \begin{center} \begin{tikzpicture} \node[at={(0,0)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](6){6}; \node[at={(2,0)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](7){7}; \node[at={(1,1.5)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](5){5}; \node[at={(0,3)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](3){3}; \node[at={(2,3)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](4){4}; \node[at={(0,5)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](1){1}; \node[at={(2,5)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](2){2}; \path (1) edge[line width=0.25mm] node[above=-2] {\small{$10$}} (2); \path (1) edge[line width=0.25mm] node[left=-2] {\small{$1\hspace{-0.01cm}*$}} (3); \path (1) edge[line width=0.25mm] (4); \path (2) edge[line width=0.25mm] (3); \path (2) edge[line width=0.25mm] (4); \path (3) edge[line width=0.25mm] node[below=-2] {$*\hspace{-0.075cm}*\hspace{-0.075cm}1$} (4); \path (3) edge[line width=0.25mm] (5); \path (4) edge[line width=0.25mm] node[below right=-2] {\small{$0$}} (5); \path (5) edge[line width=0.25mm] (6); \path (5) edge[line width=0.25mm] node[above right=-2] {\small{$0$}} (7); \path (6) edge[line width=0.25mm] node[below=-1] {\small{$1$}} (7); \end{tikzpicture} \end{center} \caption{CMN: $n=4000$.\label{fig:synth_n4000_cmn}} \end{subfigure} \hspace{0.24\textwidth} \begin{subfigure}{0.24\textwidth} \vspace{0.5cm} \begin{center} \begin{tikzpicture} \node[at={(0,0)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](6){6}; \node[at={(2,0)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](7){7}; \node[at={(1,1.5)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](5){5}; \node[at={(0,3)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](3){3}; \node[at={(2,3)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](4){4}; \node[at={(0,5)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](1){1}; \node[at={(2,5)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](2){2}; \path (3) edge[line width=0.25mm] (4); \path (1) edge[line width=0.25mm] node[left=-2] {\small{$1$}} (3); \path (1) edge[line width=0.25mm] (4); \path (2) edge[line width=0.25mm] (3); \path (2) edge[line width=0.25mm] (4); \path (3) edge[line width=0.25mm] (5); \path (4) edge[line width=0.25mm] node[below right=-2] {\small{$0$}} (5); \path (5) edge[line width=0.25mm] (6); \path (5) edge[line width=0.25mm] node[above right=-2] {\small{$0$}} (7); \path (6) edge[line width=0.25mm] node[below=-1] {\small{$1$}} (7); \end{tikzpicture} \end{center} \caption{SGM: $n=250$.\label{fig:synth_n250_sgm}} \end{subfigure} \begin{subfigure}{0.24\textwidth} \vspace{0.5cm} \begin{center} \begin{tikzpicture} \node[at={(0,0)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](6){6}; \node[at={(2,0)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](7){7}; \node[at={(1,1.5)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](5){5}; \node[at={(0,3)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](3){3}; \node[at={(2,3)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](4){4}; \node[at={(0,5)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](1){1}; \node[at={(2,5)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](2){2}; \path (1) edge[line width=0.25mm] node[above=-2] {\small{$10$}} (2); \path (1) edge[line width=0.25mm] node[left=-2] {\small{$1\hspace{-0.01cm}*$}} (3); \path (1) edge[line width=0.25mm] node[above=7] {\small{$01$}\phantom{00}} (4); \path (2) edge[line width=0.25mm] (3); \path (2) edge[line width=0.25mm] (4); \path (3) edge[line width=0.25mm] (4); \path (3) edge[line width=0.25mm] (5); \path (4) edge[line width=0.25mm] node[below right=-2] {\small{$0$}} (5); \path (5) edge[line width=0.25mm] (6); \path (5) edge[line width=0.25mm] node[above right=-2] {\small{$0$}} (7); \path (6) edge[line width=0.25mm] node[below=-1] {\small{$1$}} (7); \end{tikzpicture} \end{center} \caption{SGM: $n=1000$.\label{fig:synth_n1000_sgm}} \end{subfigure} \begin{subfigure}{0.24\textwidth} \vspace{0.5cm} \begin{center} \begin{tikzpicture} \node[at={(0,0)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](6){6}; \node[at={(2,0)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](7){7}; \node[at={(1,1.5)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](5){5}; \node[at={(0,3)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](3){3}; \node[at={(2,3)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](4){4}; \node[at={(0,5)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](1){1}; \node[at={(2,5)},circle,draw,fill=node_color,line width=0.25mm,minimum size=20pt](2){2}; \path (1) edge[line width=0.25mm] node[above=-2] {\small{$10$}} (2); \path (1) edge[line width=0.25mm] node[left=-2] {\small{$1\hspace{-0.01cm}*$}} (3); \path (1) edge[line width=0.25mm] (4); \path (2) edge[line width=0.25mm] (3); \path (2) edge[line width=0.25mm] (4); \path (3) edge[line width=0.25mm] (4); \path (3) edge[line width=0.25mm] (5); \path (4) edge[line width=0.25mm] node[below right=-2] {\small{$0$}} (5); \path (5) edge[line width=0.25mm] (6); \path (5) edge[line width=0.25mm] node[above right=-2] {\small{$0$}} (7); \path (6) edge[line width=0.25mm] node[below=-1] {\small{$1$}} (7); \end{tikzpicture} \end{center} \caption{SGM: $n=4000$.\label{fig:synth_n4000_sgm}} \end{subfigure} \caption{Labeled graphs: (a) true structure, (b)--(d) identified CMN structures for $n=250,1000,4000$, and (e)--(g) identified SGM structures for $n=250,1000,4000$.\label{fig:sim_synth_struct}} \end{figure} We begin by visually inspecting and comparing the identified model structures, which varied slightly depending on the sample. However, as the sample size was increased, the differences became less distinct. In Figures \ref{fig:sim_synth_struct}(b)--(d) and \ref{fig:sim_synth_struct}(e)--(g), representative structures for various sample sizes for CMNs and SGMs, respectively, are illustrated. It is clear that the resemblance between the identified and correct structure increased with an increased amount of training data for both model classes. For $n=250$, the CMN is missing two edges whereas the SGM is missing only one edge. For $n=1000$, both the CMN and the SGM have the correct underlying graph but they have also an additional label. For $n=4000$, the correct SGM is identified. Interestingly, even for $n=4000$ the CMN still has an additional label at edge $\{ 3,4 \}$. The label represents the edge context $\text{\footnotesize$\mathcal{C}$} (3,4)=\mathcal{X}_1\times \mathcal{X}_2 \times \{ 1 \}$ which in turn (in combination with the graph) implies that \[ X_3 \perp X_4 \mid X_1,X_2,X_5=1. \] To investigate this further, we need to look closer at the underlying distribution. Therefore, in Tables \ref{tab:ex_cpds}(a)--(b) we have listed the conditional distributions of $X_3$ and $X_4$ given their Markov blanket for all configurations where $X_5=1$. The tables show that the conditional distributions of $X_3$ and $X_4$ are very similar regardless of the value on $X_4$ and $X_3$, respectively, when $X_5=1$. Hence, the additional label can be expected to enjoy a rather high support due to the lack of dependence even though it is not included in the true model structure, in fact, it is not even a valid label in an SGM. Finally, note also the truly identical conditional distributions on row 3 and 7 as well as 4 and 8 in Table \ref{tab:ex_cpds}(a) which are due to the context of edge $\{ 1,3 \}$. \begin{table} \caption{Conditional probability distributions of (a) $X_3$ and (b) $X_4$ given their Markov blankets and the context $X_5=1$.\label{tab:ex_cpds}} \begin{subtable}{.5\textwidth} \begin{center} \small{ \begin{tabular}{c@{\hskip 0.2cm} c@{\hskip 0.2cm} c@{\hskip 0.2cm} c c} \toprule $X_1$ & $X_2$ & $X_4$ & $X_5$ & $p(X_3\mid X_{1,2,4,5})$ \\ \midrule 0 & 0 & 0 & 1 & 0.8140 \ \ 0.1860 \\ 0 & 0 & 1 & 1 & 0.7887 \ \ 0.2113 \\ 0 & 1 & 0 & 1 & 0.3333 \ \ 0.6667 \\ 0 & 1 & 1 & 1 & 0.3478 \ \ 0.6522\\ 1 & 0 & 0 & 1 & 0.9459 \ \ 0.0541 \\ 1 & 0 & 1 & 1 & 0.9289 \ \ 0.0711 \\ 1 & 1 & 0 & 1 & 0.3333 \ \ 0.6667 \\ 1 & 1 & 1 & 1 & 0.3478 \ \ 0.6522 \\ \bottomrule \end{tabular} } \end{center} \caption{\label{tab:ex_cpd1}} \end{subtable} \begin{subtable}{.5\textwidth} \begin{center} \small{ \begin{tabular}{c@{\hskip 0.2cm} c@{\hskip 0.2cm} c@{\hskip 0.2cm} c c} \toprule $X_1$ & $X_2$ & $X_3$ & $X_5$ & $p(X_4\mid X_{1,2,3,5})$ \\ \midrule 0 & 0 & 0 & 1 & 0.7143 \ \ 0.2857 \\ 0 & 0 & 1 & 1 & 0.6809 \ \ 0.3191 \\ 0 & 1 & 0 & 1 & 0.5000 \ \ 0.5000 \\ 0 & 1 & 1 & 1 & 0.5161 \ \ 0.4839 \\ 1 & 0 & 0 & 1 & 0.5172 \ \ 0.4828 \\ 1 & 0 & 1 & 1 & 0.4444 \ \ 0.5556 \\ 1 & 1 & 0 & 1 & 0.0588 \ \ 0.9412 \\ 1 & 1 & 1 & 1 & 0.0625 \ \ 0.9375 \\ \bottomrule \end{tabular} } \end{center} \caption{ } \end{subtable} \end{table} Next we examine the predictive properties of the identified models. In Tables \ref{tab:synth_res}(a)--(b) we have listed the average sBIC scores and KL divergences for the considered model classes. Throughout the range of sample sizes, CMN obtained the highest sBIC scores, SGM came in second and MN third. This indicates that our method is able to identify sound CSIs and learn CMN structures that fit the training data better than not only traditional MNs, but also decomposable SGMs learned using the marginal likelihood. In terms of KL divergence, the CMNs obtained lower values than the MNs for all sample sizes and lower values than the SGMs for the two largest sample sizes. Consequently, the improved model fit did not translate into an improved out-of-sample performance for the three smallest sample sizes when comparing with SGMs. However, this is perhaps not too surprising considering that the underlying model is an SGM, next we move on to real-world datasets. \begin{table} \caption{Summary of the results obtained in the synthetic data experiments. The bold font indicates the highest value of each row in terms of sBIC and the lowest value in terms of KL divergence.\label{tab:synth_res}} \begin{center} \small{ \begin{tabular}{c@{\hskip 0.8cm} c@{\hskip 0.3cm} c@{\hskip 0.3cm} c c@{\hskip 0.6cm} c@{\hskip 0.3cm} c@{\hskip 0.3cm} c@{\hskip 0.3cm}} \toprule \multirow{2}{*}{$n$} & \multicolumn{3}{c}{sBIC} & & \multicolumn{3}{c}{KL divergence} \\ & CMN & MN & SGM & & CMN & MN & SGM \\ \midrule $250$ & \textbf{-4.3696} & -4.4095 & -4.3755 & & 0.0867 & 0.0922 & \textbf{0.0658} \\ $500$ & \textbf{-4.3274} & -4.3604 & -4.3327 & & 0.0435 & 0.0472 & \textbf{0.0273} \\ $1000$ & \textbf{-4.3069} & -4.3302 & -4.3119 & & 0.0142 & 0.0201 & \textbf{0.0129} \\ $2000$ & \textbf{-4.2789} & -4.2930 & -4.2825 & & \textbf{0.0052} & 0.0070 & 0.0055 \\ $4000$ & \textbf{-4.2667} & -4.2740 & -4.2689 & & \textbf{0.0026} & 0.0032 & 0.0027 \\ \bottomrule \end{tabular} } \end{center} \end{table} \subsection{Real-world data} In this section we investigate how our method performs on a collection of real-world datasets. Since we now do not have access to a true model, we assess the out-of-sample performance by calculating the predictive probability of a hold-out test set. More specifically, we split each dataset $\mathbf{x}$ into ten subsets $\mathbf{x}_{(1)},\ldots,\mathbf{x}_{(10)}$ of similar size and in turn use each subset as test data and the remaining sets as training data. The model structure and parameters are learned from the training data and the standardized log-probability of the test data under the identified model is calculated. The final predictive accuracy measure is given by the average over the ten partitions. For our experiments, we have chosen ten datasets that have been used extensively in previous research. The datasets, which are listed in Table \ref{tab:real_data_descr} in the appendix, have been pre-processed in order to fit our criteria of being complete, discrete, and small-scale. Five of the datasets are binary and five are non-binary. We have omitted the SGM results for the non-binary datasets since the current implementation only allows for binary variables. For more information about the datasets and the pre-processing, see Table \ref{tab:real_data_descr}. The results of the experiments are summarized in Table \ref{tab:real_res}. For all of the considered datasets, CMN obtained higher sBIC scores than its competitors. This confirms our observations from the previous section. The improved model fit now also resulted in improved out-of-sample predictive accuracy, CMN obtained a higher predictive accuracy than SGM for all the binary datasets. Compared with MN, CMN obtained a higher predictive accuracy for eight out of the ten datasets. In terms of the structural properties listed in Table \ref{tab:real_res2}, the identified CMNs contained more edges than the MNs but fewer than the SGMs. The CMNs required the smallest number of parameters. As a result of how the final model is chosen, our method will prefer models that fit the training data well. Still, to evaluate how well the BIC measure performs in choosing models with high predictive accuracy, in Table \ref{tab:real_kappa} we compare our CMN results against results obtained when keeping the $\kappa$-value fixed. Overall, the BIC method outperformed the fixed-value priors illustrating the advantage of our case-wise approach as opposed to specifying a single prior. The last column in Table \ref{tab:real_kappa}, which corresponds to models learned under the weakest prior, shows tendencies of overfitting with respect to the MPL for some of the datasets. Although the models are equally good as the BIC optimal models for half of the datasets, the overall performance over all the datasets is poor. \begin{table} \caption{Summary of the results obtained in the real-world data experiments. The five datasets above the dotted line are binary and the five datasets below are non-binary. The bold font indicates the highest value of each row for the property in question.\label{tab:real_res}} \begin{center} \small{ \begin{tabular}{l@{\hskip 0.6cm} c@{\hskip 0.3cm} c@{\hskip 0.3cm} c c@{\hskip 0.6cm} c@{\hskip 0.3cm} c@{\hskip 0.3cm} c@{\hskip 0.3cm}} \toprule \multirow{2}{*}{Name} & \multicolumn{3}{c}{sBIC} & & \multicolumn{3}{c}{Predictive accuracy} \\ & CMN & MN & SGM & & CMN & MN & SGM \\ \midrule Congressional voting & \textbf{-6.4800} & -6.5068 & -6.6583 & & -6.4526 & \textbf{-6.4151} & -6.5428 \\ Coronary heart disease & \textbf{-3.6506} & -3.6567 & -3.6522 & & \textbf{-3.6395} & -3.6460 & -3.6417 \\ Economic activity & \textbf{-4.0077} & -4.0413 & -4.0513 & & \textbf{-3.9515} & -3.9698 & -4.0245 \\ Finnish parliament & \textbf{-7.3767} & -7.4031 & -7.4124 & & \textbf{-7.3525} & -7.3579 & -7.3623 \\ Women in mathematics\vspace{0.1cm} & \textbf{-3.7770} & -3.7829 & -3.7771 & & \textbf{-3.7547} & -3.7561 & -3.7564 \\ \hdashline \vspace{-0.25cm}\\ Car evaluation & \textbf{-7.9225} & -7.9691 & - & & \textbf{-7.7651} & -7.7690 & - \\ Contraceptive method & \textbf{-8.3405} & -8.3568 & - & & \textbf{-8.2108} & -8.2188 & - \\ Mushroom & \textbf{-5.0416} & -5.1035 & - & & -4.4276 & \textbf{-4.4262} & - \\ Soybean & \textbf{-9.3404} & -9.3773 & - & & \textbf{-9.0416} & -9.1259 & - \\ Wisconsin breast cancer & \textbf{-5.0012} & -5.1344 & - & & \textbf{-4.9057} & -5.0388 & - \\ \bottomrule \end{tabular} } \end{center} \end{table} \begin{table} \caption{Number of edges and parameters of the models in the real-world data experiments. The five datasets above the dotted line are binary and the five datasets below are non-binary. \label{tab:real_res2}} \begin{center} \small{ \begin{tabular}{l@{\hskip 0.6cm} c@{\hskip 0.3cm} c@{\hskip 0.3cm} c c@{\hskip 0.6cm} c@{\hskip 0.3cm} c@{\hskip 0.3cm} c} \toprule \multirow{2}{*}{Name} & \multicolumn{3}{c}{Edges} & & \multicolumn{3}{c}{Parameters} \\ & CMN & MN & SGM & & CMN & MN & SGM \\ \midrule Congressional voting & 24.9 & 23.4 & 30.0 & & 40.0 & 40.0 & 54.3 \\ Coronary heart disease & 5.5 & 4.5 & 6.5 & & 9.5 & 10.9 & 12.1 \\ Economic activity & 14.3 & 11.6 & 12.8 & & 18.1 & 22.2 & 23.2 \\ Finnish parliament & 31.9 & 26.2 & 34.8 & & 42.4 & 48.0 & 61.6 \\ Women in mathematics\vspace{0.1cm} & 6.0 & 4.9 & 6.4 & & 11.1 & 11.8 & 11.2 \\ \hdashline \vspace{-0.25cm}\\ Car evaluation & 6.0 & 6.0 & - & & 79.0 & 100.0 & - \\ Contraceptive method & 10.9 & 10.5 & - & & 83.2 & 84.7 & - \\ Mushroom & 17.0 & 17.7 & - & & 756.0 & 832.0 & - \\ Soybean & 14.1 & 12.4 & - & & 58.9 & 60.8 & - \\ Wisconsin breast cancer & 13.3 & 12 & - & & 57.3 & 62.6 & - \\ \bottomrule \end{tabular} } \end{center} \end{table} \begin{table} \caption{Predictive accuracy of models identified under different priors. The column $\kappa_{\text{\tiny{BIC}}}$ represents our current approach where the BIC optimal model is chosen. The bold font indicates the highest value of each row. \label{tab:real_kappa}} \begin{center} \small{ \begin{tabular}{l c@{\hskip 0.6cm} c@{\hskip 0.6cm} c@{\hskip 0.4cm} c@{\hskip 0.3cm} c } \toprule Name & $\kappa_{\text{\tiny{BIC}}}$ & $\kappa=\epsilon$ & $\kappa=n^{-1}$ & $\kappa=n^{-1/2}$ & $\kappa=n^{-1/4} $ \\ \midrule Car evaluation & \textbf{-7.7651} & -7.7690 & -7.7690 & -7.7700 & \textbf{-7.7651} \\ Congressional voting & -6.4526 & \textbf{-6.4151} & \textbf{-6.4151} & -6.4900 & -6.9397 \\ Contraceptive method & \textbf{-8.2108} & -8.2188 & -8.2188 & -8.2188 & -8.2249 \\ Coronary heart disease & \textbf{-3.6395} & -3.6460 & -3.6460 & -3.6437 & \textbf{-3.6395} \\ Economic activity & \textbf{-3.9515} & -3.9698 & -3.9698 & -3.9648 & \textbf{-3.9515} \\ Finnish parliament & \textbf{-7.3525} & -7.3579 & -7.3593 & -7.3580 & -7.4324 \\ Mushroom & -4.4276 & -4.4262 & -4.4262 & \textbf{-4.4259} & -4.4276 \\ Soybean & \textbf{-9.0416} & -9.1259 & -9.1259 & -9.1524 & -9.1168 \\ Wisconsin breast cancer & \textbf{-4.9057} & -5.0388 & -5.0388 & -5.0079 & -4.9187 \\ Women in mathematics\vspace{0.1cm} & \textbf{-3.7547} & -3.7561 & -3.7563 & -3.7551 & \textbf{-3.7547} \\ \hdashline \vspace{-0.25cm}\\ Average & \textbf{-5.9502} & -5.9724 & -5.9725 & -5.9787 & -6.0171 \\ \bottomrule \end{tabular} } \end{center} \end{table} \section{Conclusions} In this work we have extended the class of traditional Markov networks (MNs) by introducing contextual Markov networks (CMNs). In addition to the graph, the dependence structure of a CMN is specified by a collection of edge contexts. An edge context specifies cases in which the direct influence of the edge is cut off according to the notion of context-specific independence (CSI). In line with previous work, we showed that the additional CSI constraints can be accounted for through linear restrictions on the log-linear parameters. The class of CMNs is a slightly extended version of previous model classes \citep{Corander03,Nyman14,Nyman15b}. One of the main challenges in earlier research has been learning the dependence structure of the models in an efficient manner without imposing artificial restrictions, such as chordality. The main contribution of this work is extending the scope of marginal pseudo-likelihood (MPL) to also cover CMNs. This was achieved by combining the concept of marginal pseudo-likelihood for Markov networks \citep{PensarMPL} with the concept of local CSIs in Bayesian network learning \citep{Boutilier96,Friedman96,Pensar15}. The resulting objective function has a tractable closed-form expression and the corresponding estimator was here proven to be consistent in the large sample limit. The results in our experiments showed that MPL is an excellent candidate criterion for learning CMN structures. The obtained CMNs enjoyed an improved predictive accuracy both in- and out-of-sample when compared with ordinary MNs. Moreover, CMN also outperformed the previously introduced class of decomposable stratified graphical models (SGMs) on several real-world datasets. Due to computational reasons concerning parameter estimation in non-decomposable models, we restricted the experiments to small-scale models. Still, the potential of our scoring method makes it an attractive candidate for considering CMNs in high-dimensional real-world applications, for example, in modeling the dependence structure among features in CMN-based classifiers \citep{Nyman15a}. Having a closed-form objective function enables learning of non-chordal CMNs for large-scale systems. A natural next step in future research will thus be to scale up the dimension of the models. First of all, this will require a more efficient search algorithm. In this work we preferred simplicity over efficiency, since the main goal was to prove the concept of MPL as an objective function for CMN structure learning. To improve the efficiency of future algorithms, one could further exploit the MPL factorization. For example, rather than re-doing the context search for all edges after each edge change, one could limit the search to edges for which the common neighbors have been modified. If necessary, one could also perform a pre-scan to identify eligible edges and thereby reduce the space of candidate graphs \citep{PensarMPL}. Another current limitation in CMN learning is the task of estimating the model parameters. Whereas parameter estimation poses no particular problem for decomposable models, in a CMN it quickly becomes infeasible as the dimension of the model is increased. A possible solution would be to replace the likelihood with a more tractable objective function such as the pseudo-likelihood \citep{Besag75}. Another attractive approach, which allows for truly high-dimensional parameter estimation, would be to learn the parameters in a distributed manner where the global problem is divided into smaller independent sub-problems. The sub-problems can then be solved in parallel and the final solution is constructed from the solutions of the separate sub-problems \citep{Liu12,Mizrahi14}. Future research will show which of these alternatives provides the best scalability without imposing excessive demands on the implementation. \section*{Acknowledgements} JP was supported by the Magnus Ehrnrooth Foundation and the Finnish Doctoral Programme in Stochastics and Statistics. HN was supported by the Foundation of Åbo Akademi University, as part of the grant for the Center of Excellence in Optimization and Systems Engineering. JC was supported by the Academy of Finland grant 251170. \section*{Supporting information} Additional material for this article is available online including a MATLAB package containing functions for learning the structure and parameters of a CMN. \bibliographystyle{ScandJbst}
\section{Introduction}\label{intro} Let $[m]=\{1,\dots, m\}$ when $m$ is a positive integer, and let $[0]=\{\}$ be the empty set. For vector spaces $\V_1,\dots, \V_m$ over a field $\mathbb{F}$, a \textit{product tensor} in $\V=\V_1\otimes\dots \otimes \V_m$ is a non-zero tensor $z \in \V$ of the form ${z=z_1\otimes \dots \otimes z_m}$, with $z_j \in \V_j$ for all $j \in [m]$. We refer to the spaces $\V_j$ that make up the space $\V$ as \textit{subsystems}. The \textit{tensor rank} (or \textit{rank}) of a tensor $v \in \V$, denoted by $\operatorname{rank}(v)$, is the minimum number $n$ for which $v$ is the sum of $n$ product tensors. A decomposition of $v$ into a sum of $\operatorname{rank}(v)$ product tensors is called a \textit{tensor rank decomposition} of $v$. An expression of $v$ as a sum of product tensors (not necessarily of minimum number) is known simply as a \textit{decomposition} of $v$. A decomposition of $v$ \begin{align}\label{decomposition_of_v} v=\sum_{a \in [n]} x_a \end{align} into a sum of product tensors $\{x_a : a \in [n]\}$ is said to be the \textit{unique tensor rank decomposition} of $v$ if for any decomposition \begin{align}\label{other_decomp} v=\sum_{a \in [r]} y_a \end{align} of $v$ into the sum of $r \leq n$ product tensors $\{y_a : a \in [r]\}$, it holds that $r=n$ and ${\{x_a : a \in [n]\}}={\{y_a : a \in [n]\}}$ as multisets. The decomposition~\eqref{decomposition_of_v} is said to be \textit{unique in the $j$-th subsystem} if for any other decomposition~\eqref{other_decomp}, it holds that $r=n$ and there exists a permutation $\sigma \in S_n$ such that $x_{a,j} \in \spn \{y_{\sigma(a),j}\}$ for all $a \in [n]$. Kruskal's theorem gives sufficient conditions for a given decomposition to constitute a unique tensor rank decomposition~\cite{kruskal1977three}. We refer to results of this kind as \textit{uniqueness criteria}. Uniqueness criteria have found scientific applications in signal processing and spectroscopy, among others \cite{ art2, landsberg2012tensors, cichocki2015tensor,sidiropoulos2017tensor}. In these circles, subsystems are also referred to as \textit{factors} and \textit{loadings}, and the tensor rank decomposition is also referred to as the \textit{canonical decomposition (CANDECOMP), parallel factor (PARAFAC) model, canonical polyadic (CP) decomposition,} and \textit{topographic components model}. Uniqueness of a tensor decomposition is also referred to as \textit{specific identifiability}, and uniqueness criteria as \textit{identifiability criteria}. \subsection{Kruskal's theorem, and a generalization} For a finite set $S$, let $\abs{S}$ be the size of $S$. The \textit{Kruskal-rank} (or \textit{k-rank}) of a multiset of vectors $\{u_1,\dots, u_n\}$, denoted by ${\operatorname{k-rank}(u_1,\dots, u_n)}$, is the largest number $k$ for which $\dim\spn\{ u_a : a \in S\} =k$ for every subset $S \subseteq [n]$ of size $\abs{S}=k$. Similarly, we call $\dim\spn\{ u_a : a \in [n]\}$ the \textit{standard rank} (or \textit{rank}) of $\{u_1,\dots, u_n\}$. Kruskal's theorem states that if a collection of product tensors $\{x_{a,1}\otimes \dots \otimes x_{a,m} : a \in [n]\}$ has large enough k-ranks $k_j=\operatorname{k-rank}(x_{1,j},\dots, x_{n,j})$, then their sum constitutes a unique tensor rank decomposition. This theorem was originally proven for $m=3$ subsystems over $\mathbb{R}$ \cite{kruskal1977three}, was later extended to more than three subsystems by Sidiropoulos and Bro \cite{sidiropoulos2000uniqueness}, and then extended to an arbitrary field by Rhodes \cite{RHODES20101818}. \begin{theorem}[Kruskal's theorem]\label{kruskal} Let $n \geq 2$ and $m \geq 3$ be integers, let ${\V=\V_1\otimes \cdots \otimes \V_m}$ be a vector space over a field $\mathbb{F}$, and let \begin{align} \{{x_{a,1}}\otimes\dots\otimes x_{a,m}: a \in [n] \}\subseteq \V\setminus\{0\} \end{align} be a multiset of product tensors. For each $a \in [n]$, let $x_a={x_{a,1}}\otimes\dots\otimes x_{a,m}.$ For each $j \in [m]$, let \begin{align} k_j = \operatorname{k-rank}(x_{1,j},\dots, x_{n,j}). \end{align} If ${2n \leq\sum_{j=1}^m (k_j-1)+1},$ then $\sum_{a \in [n]} x_{a}$ constitutes a unique tensor rank decomposition. \end{theorem} In \cite{DERKSEN2013708} it is shown that the inequality appearing in Kruskal's theorem cannot be weakened: there exist cases in which ${2n = \sum_{j=1}^m (k_j-1)+2}$ and the decomposition is not unique. While Kruskal's theorem gives sufficient conditions for uniqueness, necessary conditions are obtained in \cite{krijnen1993analysis,STRASSEN1983645,liu2001cramer}. In \cite{effective} it is shown that Kruskal's theorem is \textit{effective} over $\mathbb{R}$ or $\mathbb{C}$ in the sense that it certifies uniqueness on a dense open subset of the smallest semialgebraic set containing the set of rank $n$ tensors. A robust form of Kruskal's theorem is proven in~\cite{bhaskara2014uniqueness}. Our main result in this work is a ``splitting theorem," which is not itself a uniqueness criterion, but implies a criterion that generalizes Kruskal's theorem. In our splitting theorem, the k-rank condition in Kruskal's theorem is relaxed to a standard rank condition. In turn, the conclusion is also relaxed to a statement describing the linear dependence of the product tensors. Before stating our splitting theorem, we first introduce the generalization of Kruskal's theorem it implies. \begin{theorem}[Generalization of Kruskal's theorem]\label{k-gen} Let $n \geq 2$ and $m \geq 3$ be integers, let $\V=\V_1 \otimes \cdots \otimes \V_m$ be a vector space over a field $\mathbb{F}$, and let \begin{align} \{{x_{a,1}}\otimes\dots\otimes x_{a,m}: a \in [n] \}\subseteq \V\setminus \{0\} \end{align} be a multiset of product tensors. For each $a\in [n]$, let $x_a = {x_{a,1}}\otimes\dots\otimes x_{a,m}$. For each subset $S \subseteq [n]$ and index $j\in [m]$, let \begin{align} d_j^S=\dim\spn \{ x_{a,j}: a \in S\}. \end{align} If $\;2 \abs{S} \leq\sum_{j=1}^m (d_j^S-1)+1$ for every subset $S\subseteq [n]$ with $2\leq \abs{S} \leq n$, then $\sum_{a \in [n]} x_a$ constitutes a unique tensor rank decomposition. \end{theorem} Note that the computational cost of checking the conditions of our Theorem~\ref{k-gen} is essentially the same as that of checking the conditions of Kruskal's theorem. In both cases, the quantities $d_j^S$ must be computed for all $j \in [m]$ and $S\subseteq [n]$ with $2\leq \abs{S} \leq n$. To verify Kruskal's conditions, one uses these quantities to compute the Kruskal ranks, and then checks the single inequality $2n \leq \sum_{j=1}^m (k_j-1)+1$. To verify the conditions of our generalization, one checks a separate inequality $\;2 \abs{S} \leq\sum_{j=1}^m (d_j^S-1)+1$ for every $S$. To see that Theorem~\ref{k-gen} contains Kruskal's theorem, assume the conditions of Kruskal's theorem hold and note that for any subset $S \subseteq [n]$, the multiset of product tensors $\{x_a : a \in S\}$ satisfies $d_j^S \geq \min\{k_j, \abs{S}\}$. Using this fact, it is easy to verify that ${2\abs{S} \leq \sum_{j=1}^m (d_j^S-1)+1}$ for every subset $S \subseteq [n]$ with $2 \leq \abs{S} \leq n$. In Section~\ref{uniqueness_applications} we compare Theorem~\ref{k-gen} to the uniqueness criteria of Domanov, De Lathauwer, and S\o{}rensen (DLS), which are the only known extensions of Kruskal's theorem that we are aware of \cite{domanov2013uniqueness,domanov2013uniqueness2,domanov2014canonical,sorensen2015new,sorensen2015coupled}. All of these extensions rely on Kruskal's original permutation lemma, and as a result, still require the k-ranks to be above a certain threshold. Our generalization uses a completely new proof technique, can certify uniqueness below this threshold, and contains many of these extensions. The cited results of DLS contain many similar but incomparable criteria, which can be difficult to keep track of. For clarity and future reference, in Theorem~\ref{uniqueness} we synthesize these criteria into a single statement. Using insight gained from this synthesization and our generalization of Kruskal's theorem, we propose a conjectural uniqueness criterion that would contain and unify every uniqueness criteria of DLS into a single, elegant statement. For $m\geq 4$, Kruskal's theorem can be ``reshaped" by regarding multiple subsystems as a single subsystem. In Section~\ref{k-gen_proof} we present an analogous reshaping of Theorem~\ref{k-gen}, which has many more degrees of freedom to choose from than the reshaped Kruskal's theorem. \subsection{A splitting theorem for product tensors} We now state our splitting theorem, which we use in Section~\ref{k-gen_proof} to prove our generalization of Kruskal's theorem, and in Sections~\ref{interpolate},~\ref{waring_rank}, and~\ref{symmetric_non-rank} to obtain further results on tensor decompositions. We first require a definition. \begin{definition} Let $n\geq 2$ be an integer, and let $\V$ be a vector space over a field $\mathbb{F}$. We say that a multiset of non-zero vectors $\{v_1,\dots,v_n\}\subseteq \V\setminus \{0\}$ \textit{splits}, or is \textit{disconnected}, if there exists a subset $S \subseteq \{v_1,\dots,v_n\}$ with $1 \leq \abs{S}\leq n-1$ for which \begin{align}\label{sdef} \spn\{v_1,\dots,v_n\}=\spn(S) \oplus \spn(S^c), \end{align} where $S^c:=\{v_1,\dots, v_n\} \setminus S$. In this case, we say that $S$ \textit{separates} $\{v_1,\dots, v_n\}$. If $\{v_1,\dots,v_n\}$ does not split, then we say it is \textit{connected}. \end{definition} Note that $\{v_1,\dots,v_n\}$ splits if and only if it is disconnected as a matroid~\cite{oxley2006matroid}. We now state our main result. \begin{theorem}[Splitting theorem]\label{conjecture} Let $n \geq 2$ and $m \geq 2$ be integers, let $\V=\V_1\otimes \dots \otimes \V_m$ be a vector space over a field $\mathbb{F}$, let \begin{align} E=\{x_{a,1} \otimes \dots \otimes x_{a,m}: a \in[n] \} \subseteq \V\setminus\{0\} \end{align} be a multiset of product tensors, and for each $j \in [m]$, let \begin{align} d_j=\dim\spn \{ x_{a,j}: a \in [n]\}. \end{align} If $\dim\spn(E)\leq \sum_{j=1}^m (d_j-1)$, then $E$ splits. \end{theorem} In Section~\ref{conjecture_kruskal} we use Derksen's result \cite{DERKSEN2013708} to prove that the inequality appearing in Theorem~\ref{conjecture} cannot be weakened. We now give a rough sketch of how our splitting theorem implies Theorem~\ref{k-gen}, which we formalize in Section~\ref{k-gen_proof}. First, a direct consequence of Theorem~\ref{conjecture} is that $E$ splits whenever $n \leq \sum_{j=1}^m (d_j-1)+1$ (see Corollary~\ref{original_conjecture}). To prove Theorem~\ref{k-gen}, let $\{x_a : a \in [n]\}$ be a multiset of product tensors satisfying the assumptions of Theorem~\ref{k-gen}, and let $\{y_a : a \in [r]\}$ be a multiset of $r\leq n$ product tensors for which $\sum_{a \in [n]} x_a = \sum_{a \in [r]} y_a$. Consider the multiset of $[n+r]$ product tensors \begin{align} E=\{x_a : a \in [n]\} \cup \{-y_a : a \in [r]\}. \end{align} Since $2n \leq \sum_{j=1}^m (d_j^{[n]}-1)+1$, $E$ splits. Since $\Sigma(E)=0$, it follows that $\Sigma(S)=\Sigma(S^c)=0$ for any separator $S$ of $E$. Now, continue applying the splitting theorem to $S$ and $S^c$, until every multiset has size 2, and contains one element each of ${\{x_a : a \in [n]\}}$ and ${\{-y_a : a \in [r]\}}$. \subsection{Further applications of the splitting theorem to tensor decompositions} In Sections~\ref{interpolate},~\ref{waring_rank}, and~\ref{symmetric_non-rank} we use the splitting theorem to prove further uniqueness results and sharp lower bounds on tensor rank. In Section~\ref{interpolate} we prove a general statement that interpolates between our generalization of Kruskal's theorem and a natural offshoot of our splitting theorem (mentioned above), obtaining uniqueness results for weaker notions of uniqueness. In Section~\ref{waring_rank} we prove sharp lower bounds on tensor rank and \textit{Waring rank}, a notion of rank for symmetric tensors. In Sections~\ref{interpolate} and~\ref{symmetric_non-rank} we obtain uniqueness results for \textit{non-rank} decompositions, a novel concept introduced in this work. We close this introduction by reviewing these results in more detail. It is known that if a multiset of product tensors ${\{x_a : a\in[n]\}}$ satisfies \begin{align}\label{intro_eq} {n+r \leq \sum_{j=1}^m (k_j-1)+1} \end{align} for $r=0$, then it is linearly independent, and if it satisfies~\eqref{intro_eq} for $r=1$, then the only product tensors in $\spn\{x_a : a\in[n]\}$ are scalar multiples of $x_1,\dots, x_n$~\cite{1751-8121-48-4-045303}. When ${r=n}$, it holds that $\sum_{a \in [n]} x_a$ constitutes a unique tensor rank decomposition, by Kruskal's theorem. It is natural to ask what happens for $r \in \{0,1,\dots, n\}$. In Section~\ref{lowrank} we use our splitting theorem to prove that when the inequality~\eqref{intro_eq} holds, the only rank ${\leq r}$ tensors in ${\spn\{x_a : a\in[n]\}}$ are those that can be written (uniquely) as a linear combination of ${\leq r}$ elements of $\{x_a : a\in[n]\}$, which interpolates between Kruskal's theorem for $r=n$, and the results of~\cite{1751-8121-48-4-045303} for $r \in \{0,1\}$. We generalize our interpolating statement in a similar manner to our generalization of Kruskal's theorem (Theorem~\ref{hakyegen}). We also interpolate to weaker notions of uniqueness, which are explained further at the end of this introduction. We remark that the ${m=2, r=0}$ case of a result in this section was proven by Pierpaola Santarsiero in unpublished work, using a different proof technique. The interpolating statement described in the previous paragraph immediately implies the following lower bound on tensor rank: \begin{align} \operatorname{rank}\bigg[\sum_{a \in [n]} x_a\bigg]\geq \min\bigg\{n, \sum_{j=1}^m (k_j-1)+2-n\bigg\}. \end{align} In Section~\ref{waring_rank} we use our splitting theorem to improve this bound. Namely, provided that the k-ranks are sufficiently balanced, we prove that two of the k-ranks $k_i,k_j$ appearing in this bound can be replaced by standard ranks $d_i,d_j$, improving this bound when the ranks and k-ranks are not equal. Our improved bound specializes to Sylvester's matrix rank inequality when $m=2$ \cite{horn2013matrix}. In Section~\ref{sharp_tensor_bound} we prove that our improved bound is sharp in a wide parameter regime. In Section~\ref{symmetric_non-rank} we use our splitting theorem to prove uniqueness results for \textit{non-Waring rank} decompositions of symmetric tensors. (Our terminology for symmetric tensor decompositions is analogous to that of general tensor decompositions, and we refer the reader to Section~\ref{mp} for a formal introduction.) In particular, we prove a condition on a symmetric decomposition $v=\sum_{a \in [n]} \alpha_a v_a^{\otimes m}$ for which any other symmetric decomposition must contain at least $r_{\min}$ terms, where $r_{\min}$ depends on the rank and k-rank of $\{v_a : a \in [n]\}$. For $r_{\min} \leq n$, this gives a Waring rank lower bound that is contained in our lower bound described in the previous paragraph. For $r_{\min}=n+1$, this gives a uniqueness result for symmetric tensors that is contained in Theorem~\ref{k-gen}, but is stronger than Kruskal's theorem in a wide parameter regime. Our main contribution in this section is the case $r_{\min}>n+1$, which produces an even stronger statement than uniqueness: There are no symmetric decompositions of $v$ into a linear combination of fewer than $r_{\min}$ terms, aside from $v=\sum_{a \in [n]} \alpha_a v_a^{\otimes m}$ (up to trivialities). This is an example of what we call a uniqueness result for \textit{non-rank} decompositions of a tensor. In Section~\ref{non-rank} we prove further uniqueness results for non-rank decompositions of (possibly non-symmetric) tensors. In particular, we give conditions on a multiset of product tensors $\{x_a:a\in[n]\}$ for which whenever $\sum_{a \in [n]} x_a=\sum_{a \in [r]} y_a$ for some $r>n$ and multiset of product tensors $\{y_a : a \in [r]\}$, there exist subsets $R\subseteq [n]$, $Q\subseteq [r]$ such that $\abs{Q}=\abs{R}= q$ for some fixed positive integer $q$, and $\{x_a : a\in Q\}=\{y_a : a \in R\}$. In contrast to our non-rank uniqueness results of Section~\ref{symmetric_non-rank}, which apply only to symmetric decompositions of symmetric tensors, the results of this subsection apply to arbitrary tensor decompositions. In Section~\ref{non-rank_applications} we identify two potential applications of our uniqueness results for non-rank decompositions: First, they allow us to define a natural hierarchy of tensors in terms of ``how unique" their decompositions are. Second, any uniqueness result for non-rank decompositions can be turned around to produce a result in the more standard setting, in which one starts with a decomposition into $n$ terms, and wants to control the possible decompositions into fewer than $n$ terms. From the proof sketch of our generalization of Kruskal's theorem that appears at the end of the previous subsection, it is easy to surmise that if $\sum_{a \in [n]} x_a=\sum_{a \in [r]} y_a$, and $2n \leq \sum_{j=1}^m (d_j^{[n]}-1)+1$, then there exist non-trvial subsets $Q \subseteq [n]$ and $R\subseteq [r]$ for which $\sum_{a \in Q} x_a =\sum_{a \in R} y_a$. This conclusion can be viewed as an extremely weakened form of uniqueness, and it is natural to ask what statements can be made for notions of uniqueness in between the standard one and this weakened one. We answer this question in Sections~\ref{lowrank} and~\ref{non-rank}. We say that a set of non-zero vectors forms a \textit{circuit} if it is linearly dependent and any proper subset is linearly independent. As a special case of our splitting theorem, in Corollary~\ref{linincor} we obtain an upper bound on the number of subsystems $j \in [m]$ for which a {circuit} of product tensors can have $d_j \geq 2$. This improves recent bounds obtained in~\cite{Ballico:2018aa,ballico2020linearly}, and is sharp. \section{Acknowledgments} BL thanks Edoardo Ballico, Luca Chiantini, Matthias Christandl, Harm Derksen, Dragomir {\DJ}okovi{\'{c}}, Ignat Domanov, Timothy Duff, Joshua A. Grochow, Nathaniel Johnston, Joseph M. Landsberg, Lieven De Lathauwer, Chi-Kwong Li, Daniel Puzzuoli, Pierpaola Santarsiero, William Slofstra, Hans De Sterck, and John Watrous for helpful discussions and comments on drafts of this manuscript. BL thanks Luca Chiantini and Pierpaola Santarsiero for helpful feedback on Sections~\ref{waring_rank} and~\ref{symmetric_non-rank}. In previous work \cite{tensor}, BL conjectured a (slightly weaker) ``non-minimal version" of Theorem~\ref{conjecture}. BL thanks Harm Derksen for suggesting the splitting version that appears here. BL thanks Dragomir {\DJ}okovi{\'{c}} for first suggesting a connection to Kruskal's theorem, and for suggesting that these results might hold over an arbitrary field. BL thanks Joshua A. Grochow for first asking about uniqueness results for non-rank decompositions, which inspired our results in Sections~\ref{non-rank} and~\ref{symmetric_non-rank}. \section{Mathematical preliminaries}\label{mp} Here we review some mathematical background for this work that was not covered in the introduction. For vector spaces $\V_1, \dots, \V_m$ over a field $\mathbb{F}$, we use $\pro{\V_1 : \dots : \V_m}$ to denote the set of (non-zero) product tensors in $\V_1\otimes \dots \otimes \V_m$. This set forms an algebraic variety given by the affine cone over the {\it Segre variety} $\setft{Seg}(\mathbb{P} \V_1 \times \dots \times \mathbb{P} \V_m)$, with the point $0$ removed. We use symbols like $a, b$ to index tensors, and symbols like $i, j$ to index subsystems. For vector spaces $\V$ and $\W$, let $\setft{L}(\V,\W)$ denote the space of linear maps from $\V$ to $\W$. We use the shorthand $\setft{L}(\V)=\setft{L}(\V,\V)$. For a vector space $\V$ of dimension $d$, let $\{e_1,\dots, e_d\}$ be a standard basis for $\V$. For a product tensor $z \in \pro{\V_1 : \dots : \V_m}$, the vectors ${z_{j} \in \V_j}$ for which ${z=z_1 \otimes \dots \otimes z_m}$ are uniquely defined up to scalar multiples $\alpha_{1} z_1, \dots, \alpha_m z_m$ such that $\alpha_1\cdots \alpha_m=1$. For positive integers $n$ and $m$, we frequently define multisets of product tensors \begin{align} \{ x_a : a \in [n]\} \subseteq \pro{\V_1 : \dots : \V_m} \end{align} without explicitly defining corresponding vectors $\{x_{a,j}\}$ such that \begin{align} x_a=x_{a,1}\otimes \dots \otimes x_{a,m} \end{align} for all $a \in [n]$. In this case, we implicitly fix some such vectors, and refer to them without further introduction. We use the notation \begin{align} x_{a, \hat{j}}&= x_{a,1} \otimes \dots \otimes x_{a,j-1}\otimes x_{a, j+1} \otimes \dots \otimes x_{a,m},\\ \V_{\hat{j}}&=\V_1 \otimes \dots \otimes \V_{j-1}\otimes \V_{j+1}\otimes\dots \otimes \V_{m}, \end{align} so $x_{a,\hat{j}}\in \V_{\hat{j}}$. Note that $\V_1\otimes \dots \otimes \V_m$ is naturally isomorphic to $\setft{L}(\V_j^*,\V_{\hat{j}})$ for any $j \in [m]$, where $\V_j^*$ is the dual vector space to $\V_j$. The rank of a tensor in $\V_1 \otimes \V_2$ is equal to the rank of the corresponding linear operator in $\setft{L}(\V_1^*, \V_2)$. We denote the rank of a tensor $v\in \V$, viewed as an element of $\setft{L}(\V_j^*,\V_{\hat{j}})$, by $\operatorname{rank}_j(v)$. The \textit{flattening rank} of $v$ is defined as $\max\{\operatorname{rank}_1(v),\dots , \operatorname{rank}_m(v)\}$. Note that the tensor rank of $v$ is lower bounded by the flattening rank of $v$. We write $S \cup T$ to denote the union of two sets $S$ and $T$. If $S$ and $T$ happen to be disjoint, we often write $S \sqcup T$ instead to remind the reader of this fact. For a positive integer $t$, we say that a collection of subsets $S_1,\dots, S_t \subseteq T$ \textit{partitions} $T$ if $S_p \cap S_q =\{\}$ for all $p\neq q \in [t]$, and $S_1 \sqcup \dots \sqcup S_t=T$. For a multiset of non-zero vectors $E=\{v_1,\dots, v_n\}\subseteq \V$, a \textit{connected component} of $E$ is an inclusion-maximal connected subset of $E$. Any multiset of non-zero vectors $E$ can be (uniquely, up to reordering) partitioned into disjoint connected components ${T_1 \sqcup \dots \sqcup T_t=E}$~\cite[Proposition 4.1.2]{oxley2006matroid}. Observe that \begin{align} \spn(E)=\bigoplus_{i\in [t]} \spn(T_i), \end{align} and note that $S \subseteq E$ separates $E$ if and only if \begin{align} \dim \spn \{ v_1,\dots, v_n\} = \dim \spn \{v_a : a \in S\} + \dim\spn\{v_a : a \in S^c\} \end{align} if and only if \begin{align} \spn \{v_a : a \in S\} \cap \spn\{v_a : a \in S^c\}= \{0\} \end{align} (see~\cite[Proposition 4.2.1]{oxley2006matroid}). In the remainder of this section, we formally introduce symmetric tensors and symmetric tensor decompositions, which are natural analogues of tensors and tensor decompositions. For a positive integer $m \geq 2$ and a vector space $\W$ over a field $\mathbb{F}$ with $\setft{Char}(\mathbb{F})>m$ or $\setft{Char}(\mathbb{F})=0$, we say that a tensor $v \in \W^{\otimes m}$ is \textit{symmetric} if it is invariant under permutations of the subsystems. The \textit{Waring rank} of a symmetric tensor $v$, denoted by $\setft{WaringRank}(v)$, is the minimum number $n$ for which $v$ is equal to a linear combination of $n$ symmetric product tensors. A decomposition of $v$ into a linear combination of $\setft{WaringRank}(v)$ symmetric product tensors is called a \textit{Waring rank decomposition} of $v$. A decomposition of $v$ into a linear combination of symmetric product tensors (not necessarily of minimum number) is known simply as a \textit{symmetric decomposition} of $v$. A symmetric decomposition of $v$ \begin{align}\label{Waring_one} v = \sum_{a \in [n]} \alpha_a v_a^{\otimes m} \end{align} is said to be the \textit{unique Waring rank decomposition} of $v$ if for any non-negative integer $r \leq n$, multiset of non-zero vectors $\{u_a : a \in [r]\} \subseteq \W \setminus \{0\}$, and non-zero scalars $\{\beta_a : a \in [r]\} \subseteq \mathbb{F}^{\times}$ for which \begin{align}\label{Waring_two} v = \sum_{a \in [r]} \beta_a u_a^{\otimes m}, \end{align} it holds that $r=n$ and \begin{align} \{\alpha_a v_a^{\otimes m} : a \in [n]\} = \{\beta_a u_a^{\otimes m} : a \in [n]\}. \end{align} More generally, for a positive integer $\tilde{n} \geq n$, we say that the symmetric decomposition~\eqref{Waring_one} is the \textit{unique symmetric decomposition of $v$ into at most $\tilde{n}$ terms} if for any $r \leq \tilde{n}$ and symmetric decomposition~\eqref{Waring_two}, either \begin{align} {\operatorname{k-rank}(u_a : a \in [r])=1}, \end{align} or $r=n$ and \begin{align} \{\alpha_a v_a^{\otimes m} : a \in [n]\} = \{\beta_a u_a^{\otimes m} : a \in [n]\}. \end{align} Note that~\eqref{Waring_one} is the unique Waring rank decomposition of $v$ if and only if it is the unique symmetric decomposition of $v$ into at most $n$ terms. We refer to results that certify uniqueness of a symmetric decomposition into at most $\tilde{n}>n$ terms as \textit{uniqueness results for non-Waring rank decompositions}. We present such results in Section~\ref{symmetric_non-rank}. Our assumption that $\setft{Char}(\mathbb{F})>m$ or $\setft{Char}(\mathbb{F})=0$ in the symmetric case ensures that the symmetric subspace is isomorphic to the space of homogeneous polynomials over $\mathbb{F}$ of degree $m$ in $\dim(\W)$ variables, and that every symmetric tensor has finite Waring rank (see e.g.~\cite[Appendix~A]{iarrobino1999power} and~\cite[Section 2.6.4]{landsberg2012tensors}). \section{Proving the splitting theorem} In this section, we prove Theorem~\ref{conjecture}. We first observe the following basic fact. \begin{prop}\label{subsystem_connected_lemma} Let $n \geq 2$ be an integer, let $\V=\V_1\otimes \V_2$ be a vector space over a field $\mathbb{F}$, and let \begin{align} E=\{x_a \otimes y_a: a \in[n] \} \subseteq \pro{\V_1 : \V_2} \end{align} be a multiset of product tensors. If $E$ is connected, then $\{x_a : a \in [n]\}$ and $\{y_a : a \in [n]\}$ are both connected. \end{prop} \begin{proof} Suppose toward contradiction that $E$ is connected and $\{x_a : a \in [n]\}$ splits, i.e. \begin{align}\label{simple_lemma_equation} \dim\spn\{x_a: a \in [n]\}=\spn\{x_a: a \in S\} \oplus \spn\{x_a:a \in S^c\} \end{align} for some non-empty proper subset $S \subseteq [n]$. Since $E$ is connected, there exists a non-zero vector \begin{align} v \in \spn\{x_a \otimes y_a: a \in S\} \cap \spn\{x_a \otimes y_a: a \in S^c\}. \end{align} Let $f \in \V_2^*$ be any linear functional such that $(\mathds{1} \otimes f) v \neq 0.$ Then $(\mathds{1} \otimes f) v$ is a non-zero element of \begin{align} \spn\{x_a: a \in S\} \cap \spn\{x_a:a \in S^c\}, \end{align} contradicting~\eqref{simple_lemma_equation}. The result is obviously symmetric under permutation of $\V_1$ and $\V_2$. \end{proof} It is not difficult to see that Theorem~\ref{conjecture} follows directly from the $m=2$ case of Theorem~\ref{conjecture}, Proposition~\ref{subsystem_connected_lemma}, and an inductive argument (we omit this proof). We therefore need only prove the $m=2$ case of Theorem~\ref{conjecture}, which we now explicitly state for clarity. \begin{theorem}[$m=2$ case of Theorem~\ref{conjecture}]\label{bipartite} Let $n \geq 2$ be an integer, let $\V=\V_1\otimes \V_2$ be a vector space over a field $\mathbb{F}$, and let \begin{align} E=\{x_a \otimes y_a: a \in[n] \} \subseteq \pro{\V_1 : \V_2} \end{align} be a multiset of product tensors. Let \begin{align} d_1=\dim\spn \{ x_a: a \in [n]\} \end{align} and \begin{align} d_2=\dim\spn \{ y_a: a \in [n]\}. \end{align} If $E$ is connected, then $\dim\spn(E)\geq d_1+d_2-1$. \end{theorem} To prove Theorem~\ref{bipartite}, we require a matroid-theoretic construction called the \textit{ear decomposition} of a connected matroid (see, e.g. \cite{Coullard:1996aa}). For completeness, we review the construction here. We refer the reader to \cite{oxley2006matroid} for the basic matroid-theoretic arguments used in this proof. \begin{lemma}[Ear decomposition]\label{ear} Let $n \geq 2$ be an integer, let $\V$ be a vector space over a field $\mathbb{F}$, and let $E=\{v_1,\dots, v_n\} \subseteq \V\setminus\{0\}$ be a multiset of non-zero vectors. If $E$ is connected, then there exists a collection of circuits $C_1, \dots, C_t \subseteq E$ such that \begin{align} E=C_1 \cup C_2 \cup \dots \cup C_t, \end{align} and for each $p \in [t]$, the multisets $C_p$ and $E_p := C_1 \cup \dots \cup C_p$ satisfy the following two properties: \begin{enumerate} \item $C_p \cap E_{p-1} \neq \{\}$ \item $\dim\spn(E_p)-\dim\spn(E_{p-1})=|E_p \setminus E_{p-1}|-1$ \end{enumerate} \end{lemma} \begin{proof} Let $C_1 \subseteq E$ be an arbitrary circuit, which must exist because $E$ is non-empty and connected, and assume by induction that $C_1,\dots, C_p$ have already been constructed to satisfy properties 1 and 2. Let $B \subseteq E_p$ be a basis for $\spn(E_p)$, and choose vectors $u_1, u_2, \dots \in E \setminus E_p$ sequentially such that at each step $q$, $\{u_1,\dots, u_q\}$ is linearly independent. Terminate when \begin{align}\label{ear_equation} \dim\spn\{B \cup \{u_1,\dots, u_q\}\}=\abs{B}+q-1. \end{align} Note that this process must terminate, otherwise $E$ would split. Fixing $q$ to be the terminating step of this process, note that if $u_q$ is removed from $B \cup \{u_1,\dots, u_q\}$, then the resulting multiset is linearly independent, so $B \cup \{u_1,\dots, u_q\}$ contains a unique circuit containing $u_q$. Call this circuit $C_{p+1}$, and observe that properties 1 and 2 hold for ${E_{p+1}:=C_1 \cup \dots \cup C_{p+1}}$. The lemma follows by repeating this process until the circuits cover $E$. \end{proof} Now we prove Theorem~\ref{bipartite}. \begin{proof}[Proof of Theorem~\ref{bipartite}] For a subset $S \subseteq [n]$, let \begin{align} d^S&=\dim\spn\{x_a \otimes y_a : a \in S\},\\ d_1^S&=\dim\spn\{x_a : a \in S\},\\ d_2^S&=\dim\spn\{y_a: a \in S\}. \end{align} In a slight change of notation from Lemma~\ref{ear}, let $C_1,\dots, C_t \subseteq [n]$ be the index sets corresponding to an ear decomposition of $E$, and let $E_p=C_1 \cup \dots \cup C_p \subseteq [n]$ for each $p \in [t]$. The theorem follows from the following two claims \begin{samepage}\begin{claim}\label{simple_claim} \leavevmode\vspace{-\dimexpr\baselineskip + \topsep + \parsep} \begin{center}$d^{E_1} \geq d^{E_1}_1+d^{E_1}_2-1.$\end{center} \end{claim}\end{samepage} \begin{claim}\label{hard_claim} For each $p \in \{2,\dots, t\}$, \begin{align} \abs{E_p \setminus E_{p-1}}-1 \geq d_1^{E_p}-d_1^{E_{p-1}}+d_2^{E_p}-d_2^{E_{p-1}}. \end{align} \end{claim} Before proving these claims, let us first use them to complete the proof. Note that \begin{align} d^{E_2}&=d^{E_1}+\abs{E_2 \setminus E_1}-1\\ &\geq d^{E_1}_1+d^{E_1}_2-1+\abs{E_2 \setminus E_1}-1\\ &\geq d^{E_2}_1+d^{E_2}_2-1. \end{align} The first line is a property of the ear decomposition, the second line follows from Claim~\ref{simple_claim}, and the third line follows from Claim~\ref{hard_claim}. So Claim~\ref{simple_claim} holds with $E_1$ replaced with $E_2$. Repeating this process inductively gives $d^{[n]} \geq d^{[n]}_1+d^{[n]}_2-1$, which is what we wanted to prove. This completes the proof, modulo proving the claims. \begin{proof}[Proof of Claim~\ref{simple_claim}] \renewcommand\qedsymbol{$\triangle$} By permuting $[n]$, we may assume that $C_1=[q]$ for some $q \in [n]$, and that $\{ x_a : a \in [d_1^{[q]}]\}$ is a basis for $\spn\{x_a : a \in [q]\}$. Let $s=d_1^{[q]}$. Suppose that there exists $b \in [s]$ such that $y_b \notin \spn \{y_a : a \in [q]\setminus [s]\}$. Let $f \in \V_1^*$, $g \in \V_2^*$ be linear functionals such that $f(x_b)=g(y_b)=1$, $f(x_a)=0$ for all $a \in [s] \setminus \{b\}$, and $g(y_a)=0$ for all $a \in [q]\setminus [s]$. So \begin{align} (f \otimes g)(x_a \otimes y_a)= \begin{cases} 1, & a=b\\ 0, & a \neq b \end{cases}. \end{align} It follows that $x_b \otimes y_b \notin \spn \{x_a \otimes y_a : a \in [q] \setminus \{b\}\}$, contradicting the fact that $C_1$ indexes a circuit. So $\{y_a : a \in [s]\} \subseteq \spn\{y_a : a\in [q]\setminus [s]\}$, which implies \begin{align} d_2^{C_1} &\leq q-s\\ &=d^{C_1}+1-d_1^{C_1}, \end{align} completing the proof. \end{proof} Now we prove Claim~\ref{hard_claim}. \begin{proof}[Proof of Claim~\ref{hard_claim}] \renewcommand\qedsymbol{$\triangle$} Let $B\subseteq E_{p-1}$ be such that $\{x_a : a \in B\}$ is a basis for ${\spn \{x_a : a \in E_{p-1}\}}$. By permuting $[n]$, we may assume that $E_p \setminus E_{p-1}=[q]$ for some $q \in [n]$, and that ${B \cup \{x_a : a \in [s]\}}$ is a basis for $\spn\{x_a : a \in E_p\}$, where $s=d^{E_p}-d^{E_{p-1}}$. If there exists $b \in [s]$ for which $y_b \notin \spn \{y_a : a \in [q]\setminus[s]\}$, then, as in the proof of Claim~\ref{simple_claim}, \begin{align} x_b \otimes y_b \notin \spn \{x_a \otimes y_a : a \in E_p \setminus \{b\}\}. \end{align} But this contradicts connectedness of $E$, a contradiction. It follows that $d_2^{E_p \setminus E_{p-1}}\leq q-s$, so \begin{align} d_2^{E_p}-d_2^{E_{p-1}}&\leq d_2^{C_p}-d_2^{C_p \cap E_{p-1}}\\ &\leq d_2^{C_p \setminus (C_p \cap E_{p-1})}-1\\ &= d_2^{E_p \setminus E_{p-1}}-1\\ &\leq q-s-1\\ &=\abs{E_p \setminus E_{p-1}}-(d_1^{E_p}-d_1^{E_{p-1}})-1. \end{align} The first line is easy to verify (in matroid-theoretic terms, this is submodularity of the rank function). The second line follows from the fact that $\{y_a : a \in C_p\}$ is connected. The third line is obvious, the fourth line we proved above, and the fifth line follows from our definitions. This completes the proof. \end{proof} The proofs of Claims~\ref{simple_claim} and~\ref{hard_claim} complete the proof of the theorem. \end{proof} \section{Using our splitting theorem to generalize Kruskal's theorem}\label{k-gen_proof} In this section we use our splitting theorem (Theorem~\ref{conjecture}) to prove our generalization of Kruskal's theorem (Theorem~\ref{k-gen}). We then introduce a reshaped version of Theorem~\ref{k-gen}, which has many more degrees of freedom than the standard reshaping of Kruskal's theorem. To prove Theorem~\ref{k-gen}, we first observe the following useful corollary to our splitting theorem. \begin{cor}\label{original_conjecture} Let $n \geq 2$ and $m\geq 2$ be integers, let $\V=\V_1\otimes \dots \otimes \V_m$ be a vector space over a field $\mathbb{F}$, let \begin{align} E=\{x_a: a \in[n] \} \subseteq \pro{\V_1:\dots : \V_m} \end{align} be a multiset of product tensors, and for each $j \in [m]$, let \begin{align} d_j=\dim\spn \{ x_{a,j}: a \in [n]\}. \end{align} If $n \leq \sum_{j=1}^m (d_j-1)+1$, then $E$ splits. \end{cor} \begin{proof} If $E$ is linearly independent, then it obviously splits. Otherwise, \begin{align} {\dim \spn (E) \leq n-1}, \end{align} and the result follows immediately from our splitting theorem. \end{proof} Now we use this corollary to prove our generalization of Kruskal's theorem. \begin{proof}[Proof of Theorem~\ref{k-gen}] Let $x_a=x_{a,1}\otimes \dots \otimes x_{a,m}$ for each $a \in [n]$, and suppose that ${\sum_{a \in [n]} x_a = \sum_{a \in [r]} y_a}$ for some non-negative integer $r \leq n$ and multiset of product tensors $\{y_a: a \in [r]\}\subseteq \pro{\V_1:\dots : \V_m}$. For notational convenience, for each $a \in [r]$ let $x_{n+a}=-y_a$, so that $\sum_{a\in [n+r]} x_a =0$. Let $T_1 \sqcup \dots \sqcup T_t=[n+r]$ be the index sets of the connected components of $\{x_a : a \in [n+r]\}$. Since $\sum_{a\in [n+r]} x_a =0$, it follows that $\sum_{a \in T_p} x_a =0$ for all $p \in [t]$, so $\abs{T_p} \geq 2$ for all $p \in [t]$. For each $p \in [t]$, if \begin{align}\label{k-gen_proof_inequality} \bigabs{T_p \cap [n]} \geq \bigabs{T_p \cap [n+r]\setminus [n]}, \end{align} then it must hold that \begin{align}\label{k-gen_proof_equality} \bigabs{T_p \cap [n]} = \bigabs{T_p \cap [n+r]\setminus [n]}=1, \end{align} otherwise $\{x_a : a \in T_p\}$ would split by Corollary~\ref{original_conjecture}, a contradiction. Since $r \leq n$ and the inequality~\eqref{k-gen_proof_inequality} can never be strict, it follows that $r=n$ and~\eqref{k-gen_proof_equality} holds for all $p \in [t]$. This completes the proof. \end{proof} For $m \geq 4$, both Kruskal's theorem and our Theorem~\ref{k-gen} can be ``reshaped'' by regarding multiple subsystems as a single subsystem, to give potentially stronger uniqueness criteria. It is worth noting that the reshaped version of Theorem~\ref{k-gen} has quite a different flavour from the reshaped version of Kruskal's theorem; in particular, there are many more degrees of freedom to choose from. We omit the proof of the following reshaped version of Theorem~\ref{k-gen}, because it is similar to the proof of Theorem~\ref{k-gen}. \begin{theorem}[Reshaped generalization of Kruskal's theorem]\label{reshaped_k-gen} Let $n \geq 2$ and $m \geq 3$ be integers, let $\V=\V_1\otimes \dots \otimes \V_m$ be a vector space over a field $\mathbb{F}$, and let \begin{align} \{x_a: a \in [n]\} \subseteq \pro{\V_1 : \dots : \V_m} \end{align} be a multiset of product tensors. For each $S \subseteq [n]$ and $J \subseteq [m]$, let \begin{align} d_J^S=\dim\spn\Big\{\bigotimes_{j \in J} x_{a,j} : a \in S\Big\}. \end{align} If for every subset $S \subseteq [n]$ with $2 \leq \abs{S} \leq n$ there exists a partition $J_1 \sqcup \dots \sqcup J_t =[m]$ (which may depend on $S$) such that $2 \abs{S} \leq \sum_{i \in [t]} (d_{J_i}^S-1)+1$, then $\sum_{a \in [n]} x_a$ constitutes a unique tensor rank decomposition. \end{theorem} It is instructive to compare Theorem~\ref{reshaped_k-gen} to the standard reshaping of Kruskal's theorem: \begin{theorem}[Reshaped Kruskal's theorem]\label{reshaped_kruskal} Let $n \geq 2$ and $m \geq 3$ be integers, let ${\V=\V_1\otimes \cdots \otimes \V_m}$ be a vector space over a field $\mathbb{F}$, and let \begin{align} \{x_a: a \in [n] \}\subseteq \pro{\V_1 : \dots : \V_m} \end{align} be a multiset of product tensors. For each $J \subseteq [m]$, let \begin{align} k_J = \operatorname{k-rank}( \bigotimes_{j \in J} x_{a,j} : a \in [n]). \end{align} If there exists a partition of $[m]$ into three disjoint subsets $J \sqcup K \sqcup L=[m]$ such that ${2n \leq k_J+k_K+k_L-2},$ then $\sum_{a \in [n]} x_a$ constitutes a unique tensor rank decomposition. \end{theorem} Theorem~\ref{reshaped_kruskal} clearly follows from our Theorem~\ref{reshaped_k-gen}. In Theorem~\ref{reshaped_kruskal}, one could of course consider more general partitions of $[m]$ into more than three subsets, but since the k-rank satisfies $k_{J \cup K} \geq \min\{n,k_{J}+k_K-1\}$ for any disjoint subsets $J,K \subseteq [m]$ (See Lemma~1 in~\cite{sidiropoulos2000uniqueness}), it suffices to consider tripartitions $J \sqcup K \sqcup L=[m]$. In contrast, it is not clear that one can restrict to tripartitions in Theorem~\ref{reshaped_k-gen}. There is another major difference between these two theorems: In Theorem~\ref{reshaped_kruskal}, one chooses a single partition of $[m]$, whereas in Theorem~\ref{reshaped_k-gen}, one is free to choose a different partition of $[m]$ for every $S$. We remark that many other statements in this work (for example, the splitting theorem itself) can be reshaped similarly to Theorem~\ref{reshaped_k-gen}. We do not explicitly state these reshapings. \section{The inequality appearing in our splitting theorem cannot be weakened}\label{conjecture_kruskal} In this section, we find a connected multiset of product tensors $E=\{x_a : a \in [n]\}$ that satisfies ${\dim\spn(E) = \sum_{j=1}^m (d_j-1)+1}$. In fact, we prove that this multiset of product tensors forms a circuit, which is stronger than being connected. This proves that the bound in Corollary~\ref{linincor}, and the inequality $\dim\spn(E) \leq \sum_{j=1}^m (d_j-1)$ appearing in Theorem~\ref{conjecture}, cannot be weakened. The example we use is Derksen's~\cite{DERKSEN2013708}, which he used to prove that the inequality appearing in Kruskal's theorem cannot be weakened. \begin{fact}\label{derksen} For any field $\mathbb{F}$ with $\setft{Char}(\mathbb{F})=0$, and positive integers $d_1,\dots, d_m$ with ${n-1=\sum_{j=1}^m (d_j-1)+1}$, there exist vector spaces $\V_1,\dots,\V_m$ over $\mathbb{F}$ and a multiset of product tensors $\{x_a:a \in [n]\}\subseteq \pro{\V_1 : \cdots : \V_m}$ that forms a circuit, and satisfies \begin{align} \dim\spn\{x_{a,j} : a \in [n]\}\geq d_j \end{align} for all $a \in [n]$. \end{fact} We note that if $d_1=\dots = d_m$, then the multiset of product tensors $\{x_a : a \in [n]\}$ can be taken to be symmetric in the sense introduced in Section~\ref{mp} (this is obvious from Derksen's construction~\cite{DERKSEN2013708}). As a result, our splitting theorem is also sharp for symmetric product tensors. We use this fact in Sections~\ref{waring_rank} and~\ref{symmetric_non-rank} to prove optimality of our results on symmetric decompositions. We remark that the assumption $\setft{Char}(\mathbb{F})=0$ can be weakened, see~\cite{DERKSEN2013708}. \begin{proof}[Proof of Fact~\ref{derksen}] By Theorem 2 of \cite{DERKSEN2013708}, there exist vector spaces $\V_1,\dots, \V_m$ over $\mathbb{F}$, a positive integer $\tilde{n} \leq n$, and product tensors $\{x_a : a \in [\tilde{n}]\}\subseteq \pro{\V_1 : \cdots : \V_m}$ with k-ranks $d_j=\operatorname{k-rank}(x_{1,j},\dots, x_{\tilde{n},j})$ such that ${\sum_{a\in [\tilde{n}]} x_a=0}$. If $\tilde{n} < n$, then ${\tilde{n} \leq \sum_{j=1}^m (d_j-1)+1}$, which implies $\{x_a:a\in[\tilde{n}]\}$ is linearly independent by Corollary~\ref{hakyegen0} (or Proposition~3.1 in~{\cite{1751-8121-48-4-045303}}). But this contradicts $\sum_{a \in [\tilde{n}]} x_a=0$, so $\tilde{n}=n$. The equality $n=\sum_{j=1}^m (d_j-1)+2$ implies that $d_j \leq n-1$ for all $j \in [m]$. It follows that for any subset $S \subseteq [n]$ of size $\abs{S}=n-1$, it holds that ${\operatorname{k-rank}(x_{a,j} : a \in S) \geq d_j}$. Since $n-1= \sum_{j=1}^m (d_j-1)+1$, then by Corollary~\ref{hakyegen0}, ${\{x_a:a\in S\}}$ is linearly independent. It follows that $\{x_a : a \in [n]\}$ is a circuit. \end{proof} \section{Interpolating between our generalization of Kruskal's theorem and an offshoot of our splitting theorem}\label{interpolate} For the entirety of this section, we fix non-negative integers $n\geq 2$ and $m\geq 2$, a vector space $\V=\V_1\otimes \dots \otimes \V_m$ over a field $\mathbb{F}$, and a multiset of product tensors ${\{x_a: a \in[n] \} \subseteq \pro{\V_1:\dots : \V_m}}$. For each subset $S\subseteq [n]$ and index $j \in [m]$, we define \begin{align} d_j^S=\dim\spn \{ x_{a,j}: a \in S\}, \end{align} and use the shorthand $d_j= d_j^{[n]}$ for all $j \in [m]$. As a consequence of our splitting theorem, if $n \leq \sum_{j=1}^m (d_j -1)+1$, then ${\{x_a: a \in [n]\}}$ splits (Corollary~\ref{original_conjecture}). Our generalization of Kruskal's theorem states that if $2 \abs{S} \leq \sum_{j=1}^m(d_j^S-1)+1$ for every subset $S \subseteq [n]$ with $2 \leq \abs{S} \leq n$, then $\sum_{a \in [n]} x_a$ constitutes a unique tensor rank decomposition. It is natural to ask what happens when other, similar inequalities hold. In particular, suppose that \begin{align}\label{beyond_inequality} {\abs{S}+\R(\abs{S}) \leq \sum_{j=1}^m (d_j^S -1)+1} \end{align} for all $S \subseteq [n]$ with $s+1 \leq \abs{S} \leq n$, for some $s \in [n-1]$ and function $\mathcal{R}: [n]\setminus [s] \rightarrow \mathbb{Z}$. What can be said about the tensors $v \in \spn \{x_a : a \in [n]\}$? In this section, we use our splitting theorem to answer this question for choices of $s$ and $\R$ that produce useful results on tensor decompositions. In Section~\ref{lowrank} we prove uniqueness results for low-rank tensors in $\spn\{x_a : a \in [n]\}$. These results can be viewed as an interpolation between the two extreme choices of parameters in Corollary~\ref{original_conjecture} (where $s=n-1$ and $\R(n)=n$) and our generalization of Kruskal's theorem (where $s=1$ and $\R= \mathds{1}$). We use this interpolation to extend several recent results in~\cite{1751-8121-48-4-045303, Ballico:2018aa,ballico2020linearly}. In Section~\ref{non-rank} we prove uniqueness results for non-rank decompositions of $\sum_{a \in [n]} x_a$ (i.e., decompositions into a non-minimal number of product tensors), which appear to be the first known results of this kind. We will make use of the following terminology. \begin{definition}\label{slsplit} For positive integers $n$ and $r$, multisets of product tensors \begin{align} \{x_a : a \in [n]\},\{y_a : a \in [r]\} \subseteq \pro{\V_1 : \dots : \V_m}, \end{align} and non-zero scalars \begin{align} \{\alpha_a : a\in [n]\}, \{\beta_a : a \in [r]\} \subseteq \mathbb{F}^\times, \end{align} for which \begin{align} \sum_{a \in [n]} \alpha_a x_a=\sum_{a \in [r]} \beta_a y_a, \end{align} we say that the (ordered) pair of decompositions $(\sum_{a \in [n]} \alpha_a x_a, \sum_{a \in [r]} \beta_a y_a)$ has an $(s,l)$\textit{-subpartition} for some positive integers $s$ and $l$ if there exist pairwise disjoint subsets $Q_1,\dots, Q_l \subseteq [n]$ and pairwise disjoint subsets ${R_1,\dots, R_l \subseteq [r]}$ for which \begin{align} \max\{1, \abs{R_p}\}\leq \abs{Q_p}\leq s \end{align} and $\sum_{a \in Q_p} \alpha_a x_a = \sum_{a \in R_p} \beta_a y_a$ for all $p \in [l]$. We say that the pair $(\sum_{a \in [n]} \alpha_a x_a, \sum_{a \in [r]} \beta_a y_a)$ has an $(s,l)$\textit{-partition} if the sets $Q_1,\dots, Q_l \subseteq [n]$ and $R_1,\dots,R_l \subseteq [r]$ can be chosen to partition $[n]$ and $[r]$, respectively. We say that the pair $(\sum_{a \in [n]} \alpha_a x_a, \sum_{a \in [r]} \beta_a y_a)$ is \textit{reducible} if there exist subsets $Q \subseteq [n]$ and $R \subseteq [r]$ for which $\abs{Q} > \abs{R}$ and $\sum_{a \in Q} \alpha_a x_a = \sum_{a \in R} \beta_a y_a$. We say that the pair is \textit{irreducible} if it is not reducible. (Technically, the linear combinations appearing in the pair $(\sum_{a \in [n]} \alpha_a x_a, \sum_{a \in [r]} \beta_a y_a)$ should be regarded formally, so that they contain the data of the decompositions, and the linear combinations appearing elsewhere should be regarded as standard linear combinations in $\V$.) \end{definition} For brevity, we will often abuse notation and say that $\sum_{a \in [n]} \alpha_a x_a=\sum_{a \in [r]} \beta_a y_a$ has an $(s,l)$-subpartition (or is reducible) to mean that $(\sum_{a \in [n]} \alpha_a x_a,\sum_{a \in [r]} \beta_a y_a)$ has an $(s,l)$-subpartition (or is reducible). Note that the properties of $(s,l)$-subpartitions and reducibility are not symmetric with respect to permutation of the first and second decompositions. Typically, the first decomposition $\sum_{a \in [n]} \alpha_a x_a$ will be known, and the second decomposition $\sum_{a \in [r]} \beta_a y_a$ will be some unknown decomposition that we want to control. An immediate consequence of Corollary~\ref{original_conjecture} is that if $\sum_{a \in [n]} x_a = \sum_{a \in [r]} y_a$ for some $r \leq n$, and the inequality~\eqref{beyond_inequality} holds for $s=n-1$ and $\R(n)=r$, then this pair of decompositions has an $(n-1, 1)$-subpartition (see Corollary~\ref{conjecture1} for a slight extension of this statement). By comparison, our generalization of Kruskal's theorem states that if $r \leq n$, and~\eqref{beyond_inequality} holds for $s=1$ and $\R=\mathds{1}$, then $r=n$ and this pair of decompositions has a $(1,n)$-subpartition. In Section~\ref{lowrank} we prove statements on the existence of $(s,l)$-subpartitions for $r\leq n$, which interpolate between these two statements by trading stronger assumptions for stronger notions of uniqueness. In Section~\ref{non-rank} we prove a similar family of statements for $r\geq n+1$, obtaining novel uniqueness results for non-rank decompositions. We conclude the introduction to this section by making a few notes about our definitions of $(s,l)$-subpartitions and reducibility. It may seem a bit strange at first that the inequality $\abs{R_p} \leq \abs{Q_p}$ appears in our definition of an $(s,l)$-subpartition. We have chosen to include this inequality because we typically want to reduce the number of product tensors that appear a decomposition. Our definition of reducibility captures a similar idea: If $n \leq r$ and $(\sum_{a \in [n]} \alpha_a x_a,\sum_{a \in [r]} \beta_a y_a)$ is reducible, then these decompositions can easily be combined to produce a decomposition into fewer than $n$ product tensors. (When $r \leq n$, reducibility of $(\sum_{a \in [r]} \beta_a y_a,\sum_{a \in [n]} \alpha_a x_a)$ captures a similar idea.) Assuming irreducibility will allow us to avoid certain pathological cases. Note that if $\sum_{a \in [n]} \alpha_a x_a$ is a tensor rank decomposition, then $(\sum_{a \in [n]} \alpha_a x_a,\sum_{a \in [r]} \beta_a y_a)$ is automatically irreducible. Note that when $(\sum_{a \in [n]} \alpha_a x_a, \sum_{a \in [r]} \beta_a y_a)$ is irreducible, the existence of an $(s,l)$-subpartition is equivalent to the existence of pairwise disjoint subsets $Q_1,\dots, Q_l \subseteq [n]$ and pairwise disjoint subsets $R_1,\dots, R_l \subseteq [r]$ for which \begin{align} 1 \leq \abs{R_p} = \abs{Q_p}\leq s \end{align} and $\sum_{a \in Q_p} \alpha_a x_a = \sum_{a \in R_p} \beta_a y_a$ for all $p \in [l]$. When $s=1$, these statements are equivalent even without the irreducibility assumption. \subsection{Low-rank tensors in the span of a set of product tensors}\label{lowrank} In this subsection, we prove statements about low-rank tensors in $\spn\{x_a : a \in [n]\}$. Most of our results in this section are consequences of Theorem~\ref{hakyegen}, which is a somewhat complicated statement on the existence of $(s,l)$-partitions. For $s=1$, and any ${r \in \{0,1,\dots, n\}}$ we obtain a condition on $\{x_a : a \in [n]\}$ for which the only rank $\leq r$ tensors in $\spn\{x_a : a \in [n]\}$ are those that can be written (uniquely) as a linear combination of $\leq r$ elements of $\{x_a : a \in [n]\}$. For $s=1,r=0$ we obtain a sufficient condition for linear independence of $\{x_a : a \in [n]\}$. For $s=1,r=1$ we obtain a sufficient condition for the only product tensors in $\spn\{x_a : a \in [n]\}$ to be scalar multiples of $x_1,\dots, x_n$. These generalize Proposition~3.1 and Theorem~3.2 in~{\cite{1751-8121-48-4-045303}, respectively. The case $s=1, r=n$ reproduces our generalization of Kruskal's theorem. For $s=n-1$, we strengthen recent results in~\cite{Ballico:2018aa,ballico2020linearly} on circuits of product tensors. Most of the statements in this subsection are consequences of the following theorem, which is complicated to state, but easy to prove with our splitting theorem. \begin{theorem}\label{hakyegen} Let $s \in [n-1]$, and $r\in \{0,1,\dots,n\}$ be integers. Suppose that for every subset $S \subseteq [n]$ with $s+1\leq \abs{S} \leq n,$ it holds that \begin{align}\label{first_hakyegen_inequality} \min\{2 \abs{S},\abs{S}+r\} \leq\sum_{j=1}^m (d_j^S-1)+1. \end{align} Then for any $v \in \spn \{x_a : a \in [n]\}$ with $\operatorname{rank}(v)\leq r$, and any decomposition ${v=\sum_{a \in [\tilde{r}]} y_a}$ of $v$ into $\tilde{r} \leq r$ product tensors $\{y_a : a \in [\tilde{r}]\} \subseteq \pro{\V_1:\dots : \V_m}$, the following holds: For any subset $S \subseteq [n]$ for which $\abs{S} \geq s+1$, and non-zero scalars $\{\alpha_a : a \in S\} \subseteq \mathbb{F}^\times$ for which it holds that \begin{align} \sum_{a \in S} \alpha_a x_a = \sum_{a \in [\tilde{r}]} y_a \end{align} and $( \sum_{a \in [\tilde{r}]} y_a,\sum_{a \in S} \alpha_a x_a)$ is irreducible, the pair of decompositions $(\sum_{a \in [n]} \alpha_a x_a, \sum_{a \in [\tilde{r}]} y_a)$ has an $(s,l)$-partition, for $l=\ceil{\abs{S}/s}$. \end{theorem} \begin{proof} For each $a \in [\tilde{r}]$, let $x_{n+a}=-y_a$, and let $E = S \cup ([n+\tilde{r}]\setminus [n]) \subseteq [n+\tilde{r}]$. Let ${T_1\sqcup \dots \sqcup T_t = E}$ be a partition of $E$ into index sets corresponding to the connected components of $\{x_a : a \in E\}$. Since $( \sum_{a \in [\tilde{r}]} y_a,\sum_{a \in S} \alpha_a x_a)$ is irreducible, it must hold that \begin{align} \bigabs{T_p \cap S}\geq \bigabs{T_p \cap (E \setminus S)} \end{align} for all $p \in [t]$, and hence \begin{align} \abs{T_p} \leq \min\big\{ 2 \bigabs{T_p \cap S}, \bigabs{T_p \cap S} +r\big\}. \end{align} If $\abs{T_p \cap S} \geq s+1,$ then $\{x_a : a \in T_p\}$ splits by~\eqref{first_hakyegen_inequality} and Corollary~\ref{original_conjecture}, a contradiction. So it must hold that ${\abs{T_p \cap S} \leq s}$ for all $p \in [t]$. It follows that $t \geq \ceil{\abs{S}/s}$ by the pigeonhole principle, and one can take $Q_p=T_p \cap S$ and \begin{align} R_p = \{a \in [\tilde{r}] : n+a \in T_p \cap (E \setminus S)\} \end{align} for all $p \in [t]$ to conclude. \end{proof} \subsubsection{$s=1$ case of Theorem~\ref{hakyegen}}\label{section_s1hakyegen} The $s=1$ case of Theorem~\ref{hakyegen} gives a sufficient condition for which the only tensor rank $\leq r$ elements of $\spn\{x_a : a \in [n]\}$ are those which can be written (uniquely) as a linear combination of $\leq r$ elements of $\spn\{x_a : a \in [n]\}$. In this subsection, we state this case explicitly, and observe several consequences of this case. In particular, we observe a lower bound on tensor rank and a sufficient condition for a set of product tensors to be linearly independent. \begin{cor}[$s=1$ case of Theorem~\ref{hakyegen}]\label{s1hakyegen} Let $r\in \{0,1,\dots,n\}$ be an integer. Suppose that for every subset $S \subseteq [n]$ such that $2\leq \abs{S} \leq n$, it holds that \begin{align}\label{hakyegen_inequality} \abs{S}+\min\{\abs{S},r\} \leq\sum_{j=1}^m (d_j^S-1)+1. \end{align} Then any non-zero linear combination of more than $r$ elements of $\{x_a : a \in [n]\}$ has tensor rank greater than $r$, and every tensor $v \in \spn\{x_a : a \in [n]\}$ of tensor rank at most $r$ has a unique tensor rank decomposition into a linear combination of elements of $\{x_a : a \in [n]\}$. \end{cor} Note that a sufficient condition for the inequality~\eqref{hakyegen_inequality} to hold is that \begin{align} n+r \leq \sum_{j=1}^m (k_j-1)+1, \end{align} where $k_j=\operatorname{k-rank}(x_{1,j},\dots, x_{n,j})$ for all $j \in [m]$. This recovers Proposition~3.1 and Theorem~3.2 in~{\cite{1751-8121-48-4-045303} in the $r=0$ and $r=1$ cases, respectively, and interpolates between Kruskal's theorem and these results. For clarity, we will explicitly state the $r=0$ and $r=1$ cases of Corollary~\ref{s1hakyegen} at the end of this subsection. \begin{proof}[Proof of Corollary~\ref{s1hakyegen}] Let $S \subseteq [n]$ be a subset, let $\{\alpha_a : a \in S\} \subseteq \mathbb{F}^{\times}$ be a multiset of non-zero scalars, let $\tilde{r}=\operatorname{rank}[\sum_{a \in S} \alpha_a x_a]$, and let $\{y_a : a \in [\tilde{r}]\}\subseteq \pro{\V_1 : \dots : \V_m}$ be such that $\sum_{a \in S} \alpha_a x_a=\sum_{a \in [\tilde{r}]} y_a$. If $\tilde{r}\leq r$, then by the $s=1$ case of Theorem~\ref{hakyegen}, this pair of decompositions has a $(1,\abs{S})$-partition. It follows that $\abs{S}=\tilde{r}$. Hence, every linear combination of more than $r$ elements of $\{x_a : a \in [n]\}$ has tensor rank greater than $r$. Let $v \in \spn \{x_a : a \in [n]\}$ have tensor rank $\tilde{r} \leq r$. Then ${v= \sum_{a \in Q} \alpha_a x_a}$ for some set $Q \subseteq [n]$ of size $\abs{Q}=\tilde{r}$ and non-zero scalars $\{ \alpha_a : a \in Q\}$. It follows from~\eqref{hakyegen_inequality} and Theorem~\ref{k-gen} that this is the unique tensor rank decomposition of $v$. \end{proof} Corollary~\ref{s1hakyegen} immediately implies the following lower bound on $\operatorname{rank}[\sum_{a \in [n]} x_a]$. \begin{cor}\label{tr_lower} If for every subset $S \subseteq [n]$ for which $2\leq \abs{S} \leq n,$ it holds that \begin{align}\label{tr_lower_eq} \abs{S}+\min\{\abs{S},r\} \leq\sum_{j=1}^m (d_j^S-1)+1, \end{align} then $\operatorname{rank}[\sum_{a \in [n]} x_a]\geq r+1$. \end{cor} In particular, Corollary~\ref{tr_lower} implies that \begin{align}\label{k-rank_bound} \operatorname{rank}\bigg[\sum_{a \in [n]} x_a\bigg]\geq \min\bigg\{n, \sum_{j=1}^m (k_j-1)+2-n\bigg\}. \end{align} In Section~\ref{waring_rank} we prove that when the Kruskal ranks are sufficiently balanced, two of the k-ranks $k_i,k_j$ appearing in the bound~\eqref{k-rank_bound} can be replaced with standard ranks $d_i,d_j$ (Theorem~\ref{tensor_cor}). Our Theorem~\ref{tensor_cor} is independent of the bound in Corollary~\ref{tr_lower} (see Example~\ref{ex:independent}). We close this subsection by stating the $r=0$ and $r=1$ cases of Corollary~\ref{s1hakyegen}, which generalize Proposition~3.1 and Theorem~3.2 in~{\cite{1751-8121-48-4-045303}, respectively. We remark that the $m=2$ subcase of Corollary~\ref{hakyegen0} was proven by Pierpaola Santarsiero in unpublished work, using a different proof technique. \begin{cor}[$s=1$, $r=0$ case of Theorem~\ref{hakyegen}]\label{hakyegen0} If for every subset $S \subseteq [n]$ for which $2\leq \abs{S} \leq n,$ it holds that \begin{align} \abs{S} \leq\sum_{j=1}^m (d_j^S-1)+1, \end{align} then $\{x_a : a \in [n]\}$ is linearly independent. \end{cor} \begin{cor}[$s=1$, $r=1$ case of Theorem~\ref{hakyegen}]\label{hakyegen1} If for every subset $S \subseteq [n]$ for which $2\leq \abs{S} \leq n,$ it holds that \begin{align} \abs{S} \leq\sum_{j=1}^m (d_j^S-1), \end{align} then \begin{align} \spn\{x_a : a \in [n]\} \cap \pro{\V_1 : \dots : \V_m}=\mathbb{C}^\times x_1 \sqcup \dots \sqcup \mathbb{C}^\times x_n. \end{align} \end{cor} \subsubsection{$s=n-1$ case of Theorem~\ref{hakyegen}}\label{sn1section} In this subsection we state a slight adaptation of the $s=n-1$ case of Theorem~\ref{hakyegen}, which gives sufficient conditions for a pair of decompositions to have an $(n-1,1)$-subpartition. After stating this case, we observe that the subcase $r=1$ improves recent results in~\cite{Ballico:2018aa,ballico2020linearly} concerning circuits of product tensors. We then remark on applications of this special case in quantum information theory. \begin{cor}[$s=n-1$ case of Theorem~\ref{hakyegen}]\label{conjecture1} Let $r \in \{0,1,\dots, n\}$ be an integer. If ${n+r \leq \sum_{j=1}^m (d_j-1)+1}$, then for any non-negative integer $\tilde{r} \leq r$ and multiset of product tensors $\{y_a : a \in [\tilde{r}]\}$ for which $\sum_{a \in [n]} x_a = \sum_{a \in [\tilde{r}]} y_a$, the pair of decompositions $(\sum_{a \in [n]} x_a,\sum_{a \in [\tilde{r}]} y_a)$ has an $(n-1,1)$-subpartition. Moreover, if ${n+r \leq \sum_{j=1}^m (d_j-1)+1}$, $\tilde{r}=\operatorname{rank}[\sum_{a \in [n]} x_a]$, and $1\leq \tilde{r} \leq \min\{r,n-1\}$, then there exists a subset $S \subseteq [n]$ with $\tilde{r} \leq \abs{S} \leq n-1$ for which \begin{align}\label{Ulike} \operatorname{rank}\bigg[\sum_{a \in S} x_a\bigg] < \tilde{r}. \end{align} \end{cor} \begin{proof} The statement of the first paragraph is slightly different from the $s=n-1$ case of Theorem~\ref{hakyegen}, and it follows easily from Corollary~\ref{original_conjecture}. To prove the statement of the second paragraph, let $\{z_a : a \in [\tilde{r}]\}\in \pro{\V_1: \dots : \V_m}$ be any multiset of product tensors for which $\sum_{a \in [n]} x_a = \sum_{a \in [\tilde{r}]} z_a$, and let $Q \subseteq [n]$, $R \subseteq [\tilde{r}]$ be subsets for which \begin{align} \max\{\abs{R},1\} \leq \abs{Q} \leq n-1 \end{align} and $\sum_{a \in Q} x_a = \sum_{a \in R} z_a$. If $\abs{R}<\abs{Q}$ and $\abs{Q} \geq \tilde{r}$, then we can take $S=Q$. If $\abs{R}<\abs{Q}$ and $\abs{Q} \leq \tilde{r}-1$, then we can take $S\subseteq [n]$ to be any subset for which $S \supseteq Q$ and $\abs{S}=\tilde{r}$. It remains to consider the case $\abs{R}=\abs{Q}$. In this case, it must hold that $\bigabs{[\tilde{r}]\setminus R} < \bigabs{[n] \setminus Q},$ so we can find $S$ using the same arguments as in the case $\abs{R}<\abs{Q}$. \end{proof} A special case of the $r=1$ case of Corollary~\ref{conjecture1} gives an upper bound of $n-2$ on the number of subsystems $j\in [m]$ for which a circuit of product tensors can have $d_j >1$. This bound improves those obtained in~\cite[Theorem 1.1]{ballico2020linearly} and~\cite[Lemma 4.5]{Ballico:2018aa}, and is sharp (see Section~\ref{conjecture_kruskal}). \begin{cor}\label{linincor} \sloppy If $\{{x_a}: a \in [n] \}$ forms a circuit, then ${d_j >1}$ for at most $n-2$ indices $j \in [m]$. \end{cor} \begin{proof} This follows immediately from Corollary~\ref{original_conjecture}, since circuits are connected. Alternatively, this follows from the second paragraph in the statement of Corollary~\ref{conjecture1}, since for any circuit it holds that $\sum_{a \in S} x_a \neq 0$ for all $S \subseteq [n]$ with $1 \leq \abs{S} \leq n-1$. \end{proof} As an immediate consequence of Corollary~\ref{linincor}, a sum of two product tensors is again a product tensor if and only if $d_j >1$ for at most a single subsystem index $j \in [m]$ (see Corollary~15 in \cite{tensor2}). This statement is well-known. In particular, it was used in \cite{westwick1967, johnston2011characterizing} to characterize the invertible linear operators that preserve the set of product tensors. In~\cite{lovitz2021decomposable,tensor2} the first author used this statement to study decomposable correlation matrices, and observed that it directly provides an elementary proof of a recent result in quantum information theory~\cite{PhysRevA.95.032308} (see Corollary~16 in~\cite{tensor2}). \subsection{Uniqueness results for non-rank decompositions}\label{non-rank} In this subsection we prove uniqueness results for decompositions of $\sum_{a \in [n]} x_a$ into ${r\geq n+1}$ product tensors. Namely, we provide conditions on $\{x_a : a \in [n]\}$ for which whenever $\sum_{a \in [n]} x_a = \sum_{a \in [r]} y_a$ for some multiset of product tensors $\{y_a : a \in [r]\}$, this pair of decompositions has an $(s,l)$-subpartition. In particular, for $s=1$ we obtain sufficient conditions for the existence of subsets $Q \subseteq [n]$, $R\subseteq [r]$ of size $\abs{Q}=\abs{R}=l$ for which $\{x_a : a\in Q\}=\{y_a : a \in R\}$. We refer the reader also to Section~\ref{symmetric_non-rank}, in which we prove uniqueness results on non-Waring rank decompositions of symmetric tensors, and identify applications of our non-rank uniqueness results. In Theorem~\ref{k_arbitrary} we give sufficient conditions for which whenever $(\sum_{a \in [n]} x_a, \sum_{a \in [r]} y_a)$ is irreducible, it has an $(s,l)$-subpartition. We then observe that for $s=1$ we can drop the irreducibility assumption and obtain the result described in the previous paragraph. We then prove a modified version of Theorem~\ref{k_arbitrary}, which drops the irreducibility assumption for arbitrary $s\in [n-1]$. At the end of this subsection, we review these statements in the $s=n-1$ case. \begin{theorem}\label{k_arbitrary} Let $n \geq 2$, $q \in [n-1]$, $s \in [q]$, and $r$ be positive integers for which \begin{align}\label{k_arbitrary_r_inequality} n+1 \leq r \leq n+\Bigceil{\frac{n-q}{s}}, \end{align} and let $l=\floor{q/s}$. If for every subset $S \subseteq [n]$ for which $s+1\leq \abs{S} \leq n,$ it holds that \begin{align}\label{k_arbitrary_inequality} 2\abs{S}+\max\left\{0,(r-n)-\biggceil{\frac{n-q+s}{\abs{S}}}+1\right\} \leq \sum_{j=1}^m (d_j^S -1)+1, \end{align} then for any multiset of product tensors $\{y_a : a \in [r]\}\subseteq \pro{\V_1 : \dots : \V_m}$ for which ${\sum_{a \in [n]} x_a= \sum_{a \in [r]} y_a}$ and $(\sum_{a \in [n]} x_a,\sum_{a \in [r]} y_a)$ is irreducible, this pair of decompositions has an $(s, l)$-subpartition. \end{theorem} One may be concerned about whether the complicated collection of inequalities~\eqref{k_arbitrary_inequality} can ever be satisfied. The answer is yes, simply because the righthand side can depend on $m$, whereas the lefthand side does not. So for $m$ large enough, one can always find $\{x_a : a \in [n]\}$ that satisfies these inequalities. In fact, they can even be satisfied non-trivially for $m=3$, as we observe in Example~\ref{identity_example}. \begin{proof}[Proof of Theorem~\ref{k_arbitrary}] For each $a \in [r]$, let $x_{n+a}=-y_a$, and let $T_1 \sqcup \dots \sqcup T_t=[n+r]$ be the index sets of the decomposition of $\{x_a : a \in [n+r]\}$ into connected components. Note that for each $p \in [t]$, it must hold that \begin{align} \bigabs{T_p \cap [n+r]\setminus [n]}\geq \bigabs{T_p \cap [n]}, \end{align} otherwise we would contradict irreducibility. For each $p \in [t]$, if \begin{align} \bigabs{T_p \cap [n+r]\setminus [n]}= \bigabs{T_p \cap [n]}, \end{align} then $\bigabs{T_p \cap [n]} \leq s$, otherwise $\{ x_a : a \in T_p\}$ would split by~\eqref{k_arbitrary_inequality} and Corollary~\ref{original_conjecture}. Assume without loss of generality that \begin{align} \bigabs{T_1 \cap [n]}-\bigabs{T_1 \cap [n+r]\setminus [n]} &\geq \bigabs{T_2 \cap [n]}-\bigabs{T_2 \cap [n+r]\setminus [n]}\\ &\;\; \vdots \\ & \geq \bigabs{T_{{t}} \cap [n]}-\bigabs{T_{{t}} \cap [n+r]\setminus [n]}. \end{align} If \begin{align} \bigabs{T_{1}\cap [n]} = \bigabs{T_{1} \cap [n+r]\setminus [n]}, \end{align} then let $\tilde{l}\in [t]$ be the largest integer for which \begin{align}\label{equality} \bigabs{T_{\tilde{l}}\cap [n]} = \bigabs{T_{\tilde{l}} \cap [n+r]\setminus [n]}. \end{align} Otherwise, let $\tilde{l}=0$. Then for all $p \in [t]\setminus [\tilde{l}]$ it holds that \begin{align}\label{strict_inequality} \abs{T_p \cap [n]} < \abs{T_p \cap [n+r]\setminus [n]} \end{align} (recall that we define $[0]=\{\}$). To complete the proof, we will show that $\tilde{l} \geq l$, for then we can take $Q_p=T_p \cap [n]$ and $R_p=T_p \cap [n+r]\setminus [n]$ for all $p \in [l]$ to conclude. Suppose toward contradiction that $\tilde{l}< l$. We require the following two claims: \begin{claim}\label{pigeonhole_claim} It holds that $\tilde{l}<t$, $\bigceil{\frac{n- s \tilde{l} }{t-\tilde{l}}} \geq s+1$, and there exists $p \in [t]\setminus [\tilde{l}]$ for which \begin{align}\label{pigeonhole} \bigabs{T_p \cap [n]} \geq \biggceil{\frac{n- s \tilde{l} }{t-\tilde{l}}}. \end{align} \end{claim} \begin{claim}\label{inequality2_claim} For all $p \in [t] \setminus [\tilde{l}]$, it holds that \begin{align}\label{inequality2} \bigabs{T_p \cap [n+r]\setminus [n]} \leq \bigabs{T_p \cap [n]} +r-n+\tilde{l} -t+1 \end{align} \end{claim} Before proving these claims, we first use them to complete the proof of the theorem. Let $p \in [t]\setminus [\tilde{l}]$ be as in Claim~\ref{pigeonhole_claim}. Then, \begin{align} \abs{T_p} &= \bigabs{T_p \cap [n]}+\bigabs{T_p \cap [n+r] \setminus [n]}\\ &\leq 2 \bigabs{T_p \cap [n]}+ r-n+\tilde{l} -t+1\\ &\leq 2 \bigabs{T_p \cap [n]}+ r-n - \biggceil{\frac{n-s \tilde{l}}{\bigabs{T_p \cap [n]}}}+1\\ &\leq 2 \bigabs{T_p \cap [n]}+ r-n- \biggceil{\frac{n-q+s}{\bigabs{T_p \cap [n]}}}+1\\ & \leq \sum_{j=1}^m (d_j^{T_p \cap [n]}-1)+1, \end{align} where the first line is obvious, the second follows from Claim~\ref{inequality2_claim}, the third follows from Claim~\ref{pigeonhole_claim}, the fourth follows from $\tilde{l}< l$, and the fifth follows from~\eqref{k_arbitrary_inequality} and the fact that $\bigabs{T_p \cap [n] } \geq s+1$. So $\{x_a : a \in T_p\}$ splits, a contradiction. This completes the proof, modulo proving the claims. \begin{proof}[Proof of Claim~\ref{pigeonhole_claim}] \renewcommand\qedsymbol{$\triangle$} To prove the claim, we first observe that $n>st$. Indeed, if $n\leq st$ then \begin{align} r & = \sum_{p=1}^t \bigabs{T_p \cap [n+r]\setminus [n]}\\ &\geq n+t-\tilde{l} \\ &\geq n+\frac{n-q}{s}+1, \end{align} where the first line is obvious, the second follows from~\eqref{equality} and~\eqref{strict_inequality}, and the third follows from $n\leq st$ and $\tilde{l}<l$. This contradicts~\eqref{k_arbitrary_r_inequality}, so it must hold that $n>st$. Note that $\tilde{l}<t$, for otherwise we would have $n \leq st$ by the fact that $\bigabs{T_p \cap [n]} \leq s$ for all $p \in [\tilde{l}]$. To verify that $\bigceil{\frac{n- s \tilde{l} }{t-\tilde{l}}} \geq s+1$, it suffices to prove $\frac{n- s \tilde{l} }{t-\tilde{l}} > s,$ which follows from $n>st$. To verify~\eqref{pigeonhole}, since $\bigabs{T_p \cap [n]} \leq s$ for all $p \in [\tilde{l}]$, by the pigeonhole principle there exists $p \in [t]\setminus [\tilde{l}]$ for which \begin{align} \bigabs{T_p \cap [n]} \geq \biggceil{\frac{n- s \tilde{l} }{t-\tilde{l}}}. \end{align} This proves the claim. \end{proof} \begin{proof}[Proof of Claim~\ref{inequality2_claim}] \renewcommand\qedsymbol{$\triangle$} Suppose toward contradiction that the inequality~\eqref{inequality2} does not hold for some $\tilde{p}\in [t] \setminus [\tilde{l}]$. Then \begin{align} r &= \sum_{p=1}^t \bigabs{T_p \cap [n+r]\setminus [n]}\\ & \geq \sum_{p\neq \tilde{p}} \bigabs{T_p \cap [n+r]\setminus [n]} + \bigabs{T_{\tilde{p}} \cap[n]} + (r-n)+\tilde{l}-t+2\\ &\geq r+1, \end{align} where the first two lines are obvious, and the last line follows from~\eqref{equality} and~\eqref{strict_inequality}, a contradiction. \end{proof} The proofs of Claims~\ref{pigeonhole_claim} and~\ref{inequality2_claim} complete the proof of the theorem. \end{proof} \subsubsection{$s=1$ case of Theorem~\ref{k_arbitrary}} In the $s=1$ case of Theorem~\ref{k_arbitrary}, we can drop the assumption that the pair of decompositions is irreducible. This is because the other assumptions already imply that $\sum_{a \in [n]} x_a$ constitutes a (unique) tensor rank decomposition by Theorem~\ref{k-gen}, so $\sum_{a \in [n]} x_a=\sum_{a \in [r]} y_a$ will automatically be irreducible (see the discussion at the beginning of Section~\ref{interpolate}). \begin{cor}[$s=1$ case of Theorem~\ref{k_arbitrary}]\label{k_arbitrarys1} Let $q \in [n-1]$ and $r$ be positive integers for which $n+1 \leq r \leq 2n-q$. If for every subset $S \subseteq [n]$ with $2\leq \abs{S} \leq n$ it holds that \begin{align}\label{nonrank_inequality} 2\abs{S}+\max\left\{0,(r-n)-\biggceil{\frac{n-q+1}{\abs{S}}}+1\right\} \leq \sum_{j=1}^m (d_j^S -1)+1, \end{align} then for any multiset of product tensors $\{y_a : a \in [r]\}\subseteq \pro{\V_1 : \dots : \V_m}$ for which $\sum_{a \in [n]} x_a= \sum_{a \in [r]} y_a$, there exist subsets $Q \subseteq [n]$ and $R \subseteq [r]$ of size $\abs{Q}=\abs{R}=q$ for which ${\{x_a : a \in Q\}=\{y_a : a \in R\}}$ (in other words, this pair of decompositions has a $(1,q)$-subpartition). \end{cor} It is worth noting that although the assumptions of Corollary~\ref{k_arbitrarys1} require $\sum_{a \in [n]} x_a$ to constitute a unique tensor rank decomposition, this result can also be applied to arbitrary decompositions $\sum_{a \in [n]} x_a$, provided that $\sum_{a\in S} x_a$ constitutes a unique tensor rank decomposition for some subset $S\subseteq [n]$ with $2 \leq \abs{S}\leq n$, as one can simply apply Corollary~\ref{k_arbitrarys1} to the pair of decompositions $(\sum_{a \in S} x_a , \sum_{a\in [r]} y_a- \sum_{a\in [n]\setminus S} x_a)$. It is not difficult to produce explicit examples in which Corollary~\ref{k_arbitrarys1} can be applied in this way (for instance, by modifying Example~\ref{identity_example}). As an example, we now use Corollary~\ref{k_arbitrarys1} to prove uniqueness of non-rank decompositions of the \textit{identity tensor} $\sum_{a \in [n]} e_a^{\otimes 3}$. \begin{example}\label{identity_example} Let $n \geq 2$, $q \in [n-1],$ and $r$ be positive integers for which $n+1 \leq r \leq 2n-q$ and \begin{align}\label{example_inequality} q \leq n+1-\frac{1}{4}\left((r-n+2)^2+1\right). \end{align} If \begin{align} \sum_{a \in [n]} e_a ^{\otimes 3}=\sum_{a \in [r]} y_a \end{align} for some multiset of product tensors $\{y_a : a \in [r]\}\subseteq \pro{\V_1 : \V_2 : \V_3}$, then there exist subsets $Q \subseteq [n]$ and $R \subseteq [n+r]$ of sizes $\abs{Q}=\abs{R}=q$ such that ${\{x_a : a \in Q\} = {\{y_a : a \in R\}}}$. For example, if $r=n+1$ then we can take $q= n-2$ for any $n \geq 3$. \end{example} To verify Example~\ref{identity_example}, it suffices to show that the inequality~\eqref{nonrank_inequality} holds for all $S \subseteq [n]$ with $2 \leq \abs{S} \leq n$. This reduces to proving that \begin{align} \abs{S}(r-n+2-\abs{S}) - (n-q+1)<0, \end{align} which occurs whenever the polynomial in $\abs{S}$ on the lefthand side has no real roots, i.e. whenever \begin{align} (r-n+2)^2 \leq 4(n-q+1)-1. \end{align} \subsubsection{Modifying Theorem~\ref{k_arbitrary} to apply to reducible pairs of decompositions} A drawback to Theorem~\ref{k_arbitrary} is that it only applies to irreducible pairs of decompositions. We now present a modification of this result, which can certify the existence of an $(s,l)$-subpartition even for reducible decompositions, at the cost of stricter assumptions. We defer this proof to the appendix, as it is very similar to that of Theorem~\ref{k_arbitrary}. \begin{theorem}\label{k_arbitrary_old} Let $q \in [n-1]$, $s \in [q]$, and $r$ be positive integers for which \begin{align}\label{eq:k_arbitrary_old} n+1 \leq r \leq \biggceil{\left(\frac{s+1}{s}\right)(n-q+s)}-1, \end{align} and let $l=\floor{q/s}$. If for every subset $S \subseteq [n]$ for which $s+1\leq \abs{S} \leq n,$ it holds that \begin{align} 2\abs{S}+\max\left\{0,(r-n+q-s)-\biggceil{\frac{n-q+s}{\abs{S}}}+1\right\} \leq \sum_{j=1}^m (d_j^S -1)+1, \end{align} then for any multiset of product tensors $\{y_a : a \in [r]\}\subseteq \pro{\V_1 : \dots : \V_m}$ for which $\sum_{a \in [n]} x_a= \sum_{a \in [r]} y_a$, this pair of decompositions has an $(s,l)$-subpartition. \end{theorem} \subsubsection{$s=n-1$ case of Theorem~\ref{k_arbitrary_old}} When $s=n-1$, then it necessarily holds that $r=n+1$ and $q=n-1$, and Theorem~\ref{k_arbitrary_old} simply says that if $2n+1 \leq \sum_{j=1}^m (d_j-1)+1$, then $\sum_{a \in [n]} x_a= \sum_{a \in [n+1]} y_a$ has an $(n-1,1)$-subpartition. Theorem~\ref{k_arbitrary} yields a weaker statement. \section{A lower bound on tensor rank}\label{waring_rank} In Section~\ref{section_s1hakyegen} we saw that for a multiset of product tensors $\{x_a : a \in [n]\}$ with k-ranks $k_j=\operatorname{k-rank}(x_{a,j} : a \in [n])$, it holds that \begin{align}\label{k-rank_bound1} \operatorname{rank}\bigg[\sum_{a \in [n]} x_a\bigg]\geq \min\bigg\{n, \sum_{j=1}^m (k_j-1)+2-n\bigg\}. \end{align} In this section, we prove that when the k-ranks are sufficiently balanced, two of the k-ranks $k_i,k_j$ appearing in this bound can be replaced with standard ranks $d_i,d_j$, which improves this bound when the k-ranks and ranks are not equal, and specializes to Sylvester's matrix rank inequality when $m=2$. We prove that this improved bound is independent of a different lower bound on tensor rank that we observed in Corollary~\ref{tr_lower}. We furthermore observe that this improved bound is sharp in a wide parameter regime. As a consequence, we obtain a lower bound on Waring rank, which we also prove is sharp. \begin{theorem}[Tensor rank lower bound]\label{tensor_cor} Let $n \geq 2$ and $m\geq 2$ be integers, let ${\V=\V_1\otimes \dots \otimes \V_m}$ be a vector space over a field $\mathbb{F}$, and let \begin{align} {E=\{x_a: a \in[n] \} \subseteq \pro{\V_1:\dots : \V_m}} \end{align} be a multiset of product tensors. For each index $j \in [m]$, let $k_j=\operatorname{k-rank}(x_{a,j}: a \in [n])$ and ${d_j=\dim\spn\{x_{a,j} : a \in [n]\}}$. Define \begin{align}\label{eq:q} \mu=\max_{\substack{i, j \in [m]\\i \neq j}}\{d_i-k_i+d_j-k_j\}. \end{align} If for every index $i \in [m]$ it holds that \begin{align}\label{balanced_k_rank} k_i \leq \sum_{\substack{j \in [m]\\ j \neq i}} (k_j-1)+1, \end{align} then \begin{align}\label{tensor_rank_inequality} \operatorname{rank}\bigg[\sum_{a\in [n]} x_a\bigg] \geq \min\bigg\{n,\mu+\sum_{j=1}^m (k_j-1)+2-n\bigg\}. \end{align} \end{theorem} Intuitively, the condition~\eqref{balanced_k_rank} ensures that the k-ranks are sufficiently balanced. This inequality is satisfied, for example, when the product tensors are symmetric. While we are unaware whether the precise inequality~\eqref{balanced_k_rank} is necessary for the lower bound~\eqref{tensor_rank_inequality} to hold, the following example illustrates that some inequality of this form must hold: \begin{example}\label{ex:independent} The set of product tensors \begin{align} E=\{e_1^{\otimes 3}, e_2^{\otimes 3}, e_3^{\otimes 3}, e_4^{\otimes 3}, e_5 \otimes (e_1+e_2)^{\otimes 2}, e_6\otimes (e_1-e_2)^{\otimes 2}\} \end{align} does not satisfy~\eqref{tensor_rank_inequality}. Indeed, \begin{align} \operatorname{rank}[\Sigma(E)]&=5\\ &< q+k_1+k_2+k_3-1-n\\ &=d_2+d_3-1\\ &=7. \end{align} This example illustrates that in order for the bound~\eqref{tensor_rank_inequality} to hold, the k-ranks must be sufficiently ``balanced" in order to avoid cases such as this. In particular, some inequality resembling~\eqref{balanced_k_rank} is necessary. We remark that this example can be extended to further parameter regimes using Derksen's example~\cite{DERKSEN2013708}, and similar arguments as in Sections~\ref{sharp_tensor_bound} and~\ref{waring_non-rank_sharp}. \end{example} Note that when $m=2$, Theorem~\ref{tensor_cor} states that \begin{align} \operatorname{rank}\bigg[\sum_{a \in [n]} x_a\bigg] \geq d_1+d_2-n, \end{align} provided that $k_1=k_2$. This is Sylvester's matrix rank inequality (although Sylvester's result holds also when $k_1 \neq k_2$) \cite{horn2013matrix}. The following example demonstrates that our two lower bounds on tensor rank in Theorem~\ref{tensor_cor} and Corollary~\ref{tr_lower} are independent. \begin{example} By Theorem~\ref{tensor_cor}, the sum of the set of product tensors \begin{align} \{e_1^{\otimes 3},e_2^{\otimes 3}, (e_1+e_2)^{\otimes 2}\otimes e_3,e_3^{\otimes 2} \otimes (e_1+e_2+e_3)\} \end{align} has tensor rank $4$. Note that this bound cannot be achieved with the flattening rank lower bound, nor with Corollary~\ref{tr_lower}, as the first three vectors do not satisfy~\eqref{tr_lower_eq}. Many more such examples can be obtained using the construction in Section~\ref{sharp_tensor_bound}. Conversely, the sum of the set of product tensors \begin{align}\{& e_1^{\otimes 3}, e_2^{\otimes 3}, e_3^{\otimes 3}, e_4^{\otimes 3},(e_2+e_3)\otimes (e_2+e_4)\otimes (e_1+e_4)\} \end{align} has tensor rank 5 by Corollary~\ref{tr_lower}, while Theorem~\ref{tensor_cor} only certifies that this sum has tensor rank at least $4$. \end{example} Now we prove Theorem~\ref{tensor_cor}. \begin{proof}[Proof of Theorem~\ref{tensor_cor}] Let $r =\operatorname{rank}[\sum_{a \in [n]} x_a]$, and let $\{y_a : a \in [r]\}\subseteq \pro{\V_1: \dots : \V_m}$ be a multiset of product tensors for which $\sum_{a \in [n]} x_a = \sum_{a \in [r]} y_a$ is a tensor rank decomposition. We need to prove that $r$ satisfies the inequality~\eqref{tensor_rank_inequality}. For each $a \in [r]$, let $x_{n+a}=-y_a$, and let ${T_1\sqcup \dots \sqcup T_t =[n+r]}$ be the index sets of the connected components of ${\{x_a : a \in [n+r]\}}$. For each subset ${S \subseteq [n]}$ and index $j \in [m]$, let \begin{align} d_j^S=\dim\spn\{x_{a,j} : a \in S\}. \end{align} We first consider the case $t=1$, i.e. $\{x_a : a \in [n+r]\}$ is connected. By the splitting theorem, it holds that \begin{align} n+r &\geq \sum_{j=1}^m (d_j-1)+2\\ & \geq \mu+\sum_{j=1}^m (k_j-1)+2, \end{align} completing the proof in this case. We proceed by induction on $t$. Suppose the theorem holds whenever the number of connected components is less than $t$. Assume without loss of generality that \begin{align} \bigabs{T_1 \cap [n]}-\bigabs{T_1 \cap [n+r]\setminus [n]} &\geq \bigabs{T_2 \cap [n]}-\bigabs{T_2 \cap [n+r]\setminus [n]}\\ &\;\; \vdots \\ & \geq \bigabs{T_{{t}} \cap [n]}-\bigabs{T_{{t}} \cap [n+r]\setminus [n]}\\ &\geq 0, \end{align} where the last line follows from the fact that $\sum_{a \in [r]} y_a$ is a tensor rank decomposition. If \begin{align} \bigabs{T_1 \cap [n]} = \bigabs{T_1 \cap [n+r]\setminus [n]}, \end{align} then $r=n$ and we are done. Otherwise, \begin{align} \bigabs{T_{[t-1]} \cap [n]} > \bigabs{T_{[t-1]} \cap [n+r]\setminus [n]}, \end{align} where $T_{[t-1]}=T_1 \sqcup\dots \sqcup T_{t-1}$. Observe that $k_j < \bigabs{T_{[t-1]}\cap[n]}$ for all $j \in [m]$. Indeed, since \begin{align} \operatorname{rank}\bigg[\sum_{a \in T_{[t-1]} \cap [n]} x_a\bigg] < \bigabs{T_{[t-1]} \cap [n]}, \end{align} it must hold that \begin{align} 2 \bigabs{T_{[t-1]} \cap [n]}-1 \geq \sum_{j=1}^m \bigg(\min\big\{\bigabs{T_{[t-1]}\cap [n]},k_j\big\}-1\bigg)+2, \end{align} by~\eqref{k-rank_bound1}. If $k_i \geq \bigabs{T_{{[t-1]}}\cap [n]}$ for some $i \in [m]$, then this inequality implies that ${k_j < \bigabs{T_{{[t-1]}}\cap [n]}}$ for all $j \neq i$, and hence \begin{align} k_i \geq \bigabs{T_{{[t-1]}}\cap [n]} \geq \sum_{\substack{j \in [m]\\ j \neq i}} (k_j-1)+2, \end{align} contradicting~\eqref{balanced_k_rank}. So $k_j < \bigabs{T_{{[t-1]}}\cap [n]}$ for all $j \in [m]$. Since $k_j< \bigabs{T_{{[t-1]}}\cap [n]}$ for all $j \in [m]$, the k-ranks of $\{x_a : a \in T_{[t-1]}\cap [n]\}$ satisfy~\eqref{balanced_k_rank}, so by the induction hypothesis, \begin{align}\label{induct_hat} \bigabs{T_{[t-1]}} \geq \mu^{T_{[t-1]}\cap[n]}+\sum_{j=1}^m(k_j-1)+2, \end{align} where \begin{align} \mu^{T_{[t-1]}\cap[n]}=\max_{\substack{i,j \in [m]\\i\neq j}}\bigg\{d_i^{T_{[t-1]}\cap[n]}-k_i+d_j^{T_{[t-1]}\cap[n]}-k_j\bigg\}. \end{align} To complete the proof, we will show that \begin{align} \bigabs{T_{[t-1]}}+\abs{T_t} \geq \mu+\sum_{j=1}^m (k_j-1)+2. \end{align} Let $i,i' \in [m]$ be such that $\mu=d_i-k_i+d_{i'}-k_{i'}$. Then \begin{align} \bigabs{T_{[t-1]}}+\abs{T_t}&\geq d_i^{T_{[t-1]}\cap[n]}-k_i+d_{i'}^{T_{[t-1]}\cap[n]}-k_{i'}+\sum_{j=1}^m(k_j-1)+\sum_{j=1}^m(d_j^{T_t\cap [n]}-1)+4\\ &\geq d_i^{T_{[t-1]}\cap[n]}-k_i+d_{i'}^{T_{[t-1]}\cap[n]}-k_{i'}+\sum_{j=1}^m(k_j-1)+d_{i}^{T_t\cap [n]}+d_{i'}^{T_t\cap [n]}+2\\ &\geq d_i-k_i+d_{i'}-k_{i'}+\sum_{j=1}^m(k_j-1)+2\\ &= \mu+\sum_{j=1}^m(k_j-1)+2, \end{align} where the first line follows from~\eqref{induct_hat} and the fact that $\{x_a : a \in T_t\}$ is connected, the second is obvious, the third is easy to verify (in matroid-theoretic terms, this is submodularity of the rank function), and the fourth is by definition. This completes the proof. \end{proof} As an immediate corollary to Theorem~\ref{tensor_cor}, we obtain the following lower bound on the Waring rank of a symmetric tensor, in terms of a known symmetric decomposition. \begin{cor}[Waring rank lower bound]\label{symmetric_cor} Let $n\geq 2$, and $m \geq 2$ be integers, let $\W$ be a vector space over a field $\mathbb{F}$ with $\setft{Char}(\mathbb{F})=0$ or $\setft{Char}(\mathbb{F})>m$, and let ${\{v_a : a \in [n]\} \subseteq \W\setminus\{0\}}$ be a multiset of non-zero vectors. Let \begin{align}k={\operatorname{k-rank}(v_a : a \in [n])} \end{align} and \begin{align} {d=\dim\spn\{v_a : a \in [n]\}}. \end{align} Then for any multiset of non-zero scalars \begin{align} \{\alpha_a : a \in [n]\} \subseteq \mathbb{F}^\times, \end{align} it holds that \begin{align}\label{Waring_rank_inequality} \setft{WaringRank}\bigg[ \sum_{a \in [n]} \alpha_a v_a^{\otimes m}\bigg] \geq \min\{n,2d+(m-2)(k-1)-n\}. \end{align} \end{cor} \subsection{Our tensor rank lower bound is sharp}\label{sharp_tensor_bound} In this subsection, we observe that, in a wide parameter regime, the inequalities~\eqref{tensor_rank_inequality} and~\eqref{Waring_rank_inequality} appearing in Theorem~\ref{tensor_cor} and Corollary~\ref{symmetric_cor} cannot be improved. Let $\mathbb{F}$ be a field with $\setft{Char}(\mathbb{F})=0$, let $n \geq 2$, ${m \geq 2}$, \begin{align} 2 \leq d_1,\dots, d_m \leq n, \end{align} and \begin{align} {k_1\leq d_1,\dots, k_m \leq d_m} \end{align} be positive integers, and let \begin{align} \lambda=\sum_{j=1}^m (k_j-1)+2. \end{align} Suppose that the following conditions hold: \begin{enumerate} \item ${\mu=2(d_{i}-k_i)}$ for some index $i \in [m]$, where $\mu$ is defined as in~\eqref{eq:q}. \item$\max\{k_j: j \in [m]\}+d_i-k_i+1 \leq n \leq d_i-k_i+\lambda$ \item The inequality \eqref{balanced_k_rank} is satisfied. \end{enumerate} Then there exists a multiset of product tensors $E$ corresponding to these choices of parameters that satisfies~\eqref{tensor_rank_inequality} with equality. Indeed, the bound $\operatorname{rank}[\Sigma(E)] \geq n$ is trivial to attain with equality, and the bound \begin{align}\label{eq:rank_bound} \operatorname{rank}[\Sigma(E)] \geq 2(d_i-k_i)+\lambda-n \end{align} can be attained with equality as follows. Let \begin{align} \{x_a : a \in [\lambda]\} \subseteq \pro{\mathbb{F}^{d_1}: \dots : \mathbb{F}^{d_m}} \end{align} be a multiset of product tensors that forms a circuit and satisfies \begin{align}\label{eq:l} \dim\spn\{x_{a,j}: a \in [\lambda]\}=\operatorname{k-rank}(x_{a,j} : a \in [\lambda])=k_j \end{align} for all $j \in [m]$. An example of such a circuit is presented in~\cite{DERKSEN2013708}, and reviewed in Section~\ref{conjecture_kruskal}. Now, let \begin{align} \{x_{a} : a\in [\lambda+d_i-k_i]\setminus [\lambda]\}\subseteq \pro{\mathbb{F}^{d_1}: \dots : \mathbb{F}^{d_m}} \end{align} be any multiset of product tensors for which \begin{align}\label{eq:other} \dim\spn\{x_{a,j} : a \in [\lambda+d_i-k_i]\}=d_j \end{align} and \begin{align} \operatorname{k-rank}(x_{a,j} : a\in [\lambda+d_i-k_i]) = k_j \end{align} for all $j \in [m]$, which is guaranteed to exist since $\mathbb{F}$ is infinite. Let \begin{align} E=\{x_a : a \in [n-d_i+k_i]\} \sqcup \{x_a : a \in [\lambda+d_i-k_i]\setminus [\lambda]\} \end{align} and \begin{align} F=\{x_a : a \in [\lambda] \setminus [n-d_i+k_i]\} \sqcup \{x_a : a \in [\lambda+d_i-k_i]\setminus [\lambda]\}. \end{align} Recall that $n \leq d_i-k_i+\lambda$ by assumption, so the set $[\lambda] \setminus [n-d_i+k_i]$ that appears in the definition of $F$ is well-defined. Since $n -d_i+k_i \geq k_j+1$ for all $j \in [m]$, $E$ has k-ranks $k_1,\dots, k_m,$ as desired. It is also clear that $E$ has ranks $d_1,\dots,d_m$, by~\eqref{eq:l} and~\eqref{eq:other}. Since $\{x_a: a \in [\lambda]\}$ forms a circuit, some non-zero linear combination of $E$ is equal to a non-zero linear combination of $F$. Since $\abs{F}$ is equal to the right hand side of~\eqref{eq:rank_bound}, this completes the proof. Out of the three conditions required for our construction, $\mu=2(d_i-k_i)$ seems the most restrictive. Unfortunately, our methods appear to require this condition. A nearly identical construction shows that the inequality~\eqref{Waring_rank_inequality} appearing in Corollary~\ref{symmetric_cor} cannot be improved (and our restrictive condition on $\mu$ is automatically satisfied in this case). The only difference in the construction is to choose the product tensors $\{x_a : a \in [\lambda+d_i-k_i]\}$ to be symmetric in this case, which can always be done (in particular, the product tensors appearing in Derksen's example can be taken to be symmetric). \section{A uniqueness result for non-Waring rank decompositions}\label{symmetric_non-rank} In this section, we prove a sufficient condition on a symmetric decomposition \begin{align}\label{eq:symmetric_non-rank} v=\sum_{a \in [n]} \alpha_a v_a^{\otimes m} \end{align} under which any distinct decomposition $v=\sum_{a \in [r]} \beta_a u_a^{\otimes m}$ must have $r$ lower bounded by some quantity, which we call $r_{\min}$ for now. When $r_{\min} \leq n$, this yields a lower bound on $\setft{WaringRank}(v)$ that is contained in Corollary~\ref{symmetric_cor}. When ${r_{\min} =n+1}$, this yields a uniqueness criterion for symmetric decompositions that is contained in Theorem~\ref{k-gen}, but improves Kruskal's theorem in a wide parameter regime. The main result in this section is the case ${r_{\min} > n+1}$, where we obtain an even stronger statement than uniqueness: Every symmetric decomposition of $v$ into less than $r_{\min}$ terms must be equal to $\sum_{a \in [n]} \alpha_a v_a^{\otimes m}$ (in the language introduced in Section~\ref{mp}, $\sum_{a \in [n]} \alpha_a v_a^{\otimes m}$ is the \textit{unique symmetric decomposition of $v$ into less than $r_{\min}$ terms}). In Section~\ref{waring_non-rank_sharp} we prove that our bound $r_{\min}$ cannot be improved. In Section~\ref{non-rank_applications} we identify potential applications of our non-rank uniqueness results. Our results in this section were inspired by, and generalize, Theorem~6.8 and Remark~6.14 in~\cite{Chiantini2019}. Our results in this section should be compared with those of Section~\ref{non-rank} on uniqueness of non-rank decompositions of tensors that are not necessarily symmetric. \begin{theorem}\label{symmetric_non-rank_theorem} Let $n\geq 2$ and $m \geq 2$ be integers, let $\W$ be a vector space over a field $\mathbb{F}$ with $\setft{Char}(\mathbb{F})=0$ or $\setft{Char}(\mathbb{F})>m$, let $E={\{v_a : a \in [n]\} \subseteq \W\setminus\{0\}}$ be a multiset of non-zero vectors with ${\operatorname{k-rank}(v_a : a \in [n]) \geq 2}$, and let \begin{align} {d=\dim\spn\{v_a : a \in [n]\}}. \end{align} Then for any non-negative integer $r \geq 0$, multiset of non-zero vectors ${F={\{u_a : a \in [r]\} \subseteq \W\setminus\{0\}}}$ with ${\operatorname{k-rank}(u_a : a \in [r]) \geq \min\{2,r\}}$, and multisets of non-zero scalars \begin{align} \{\alpha_a : a \in [n]\}, \{\beta_a: a \in [r]\} \subseteq \mathbb{F}^\times \end{align} for which \begin{align}\label{symmetric_notequal} \{\alpha_a v_a^{\otimes m} : a \in [n]\} \neq \{\beta_a u_a^{\otimes m} : a \in [r]\} \end{align} and \begin{align}\label{symmetric_equation} \sum_{a \in [n]} \alpha_a v_a^{\otimes m} = \sum_{a \in [r]} \beta_a u_a^{\otimes m}, \end{align} it holds that \begin{align}\label{symmetric_first_inequality} n+ r \geq m+2d-2. \end{align} \end{theorem} In the language of the introduction to this section, $r_{\min} = m+2d-2-n$. For comparison, the result we have referred to in~\cite{Chiantini2019} asserts that, under the condition $n \leq m$, it holds that $n+r \geq m+d$, which is weaker than our bound~\eqref{symmetric_first_inequality}. \begin{proof}[Proof of Theorem~\ref{symmetric_non-rank_theorem}] By subtracting terms from both sides of~\eqref{symmetric_equation}, and combining parallel product tensors into single terms (or to zero), it is clear that it suffices to prove the statement when $E$ is linearly independent (so $d=n$). Note that $r \geq n$ by Kruskal's theorem. For each $a \in [r]$, let $v_{n+a}=u_a$, and let ${T_1\sqcup \dots \sqcup T_t =[n+r]}$ be the index sets of the connected components of ${\{v_a^{\otimes m} : a \in [n+r]\}}$. Assume without loss of generality that $\bigabs{T_1 \cap [n]} \geq \dots \geq \bigabs{T_t \cap [n]}$, and let $\tilde{t}\in[t]$ be the largest integer for which $\bigabs{T_{\tilde{t}} \cap [n]} \geq 1$. By~\eqref{symmetric_notequal}, there must exist $\tilde{p} \in [\tilde{t}]$ for which $\abs{T_{\tilde{p}}} \geq 3$. Note that \begin{align} \dim\spn\{v_a : a \in T_{\tilde{p}}\} \geq \max\left\{2, \bigabs{T_{\tilde{p}} \cap [n]}\right\}. \end{align} Since $\{v_a^{\otimes m} : a \in T_{\tilde{p}}\}$ is connected, it follows from our splitting theorem that \begin{align}\label{new_symmetric_proof_inequality} \abs{T_{\tilde{p}}} \geq m(\max\left\{2, \bigabs{T_{\tilde{p}} \cap [n]}\right\}-1)+2. \end{align} Now, \begin{align} n+r &\geq \sum_{p \in [\tilde{t}]} \abs{T_p}\\ & \geq \sum_{p \neq \tilde{p}} \big[m\left(\bigabs{T_p\cap [n]} -1\right)+2\big]+ m\left(\max\left\{2, \bigabs{T_{\tilde{p}} \cap [n]}\right\}-1\right)+2\\ & = m\left(n-\abs{T_{\tilde{p}}\cap [n]}\right)-(m-2)\left(\tilde{t}-1\right)+m\left(\max\left\{2, \bigabs{T_{\tilde{p}} \cap [n]}\right\}-1\right)+2\\ & \geq m\left(n-\abs{T_{\tilde{p}}\cap [n]}\right)-(m-2)\left(n- \bigabs{T_{\tilde{p}} \cap [n]}\right)+m\left(\max\left\{2, \bigabs{T_{\tilde{p}} \cap [n]}\right\}-1\right)+2\\ &=2n-2\bigabs{T_{\tilde{p}} \cap [n]}+m\left(\max\left\{2, \bigabs{T_{\tilde{p}} \cap [n]}\right\}-1\right)+2\\ &\geq 2n+m-2. \end{align} The first line is obvious, the second follows from~\eqref{new_symmetric_proof_inequality} and the fact that every multiset $\{v_a^{\otimes m} : a \in T_p\}$ is connected, the third is algebra, the fourth uses the fact that $\bigabs{T_p \cap [n]} \geq 1$ for all $p \in [\tilde{t}]$, and the rest is algebra. This completes the proof. \end{proof} Theorem~\ref{symmetric_non-rank_theorem} immediately implies the following uniqueness result for non-Waring rank decompositions. \begin{cor}[Uniqueness result for non-Waring rank decompositions]\label{waring_uniqueness} Let $n\geq 2$ and $m \geq 2$ be integers, let $\W$ be a vector space over a field $\mathbb{F}$ with $\setft{Char}(\mathbb{F})=0$ or $\setft{Char}(\mathbb{F})>m$, let ${\{v_a : a \in [n]\} \subseteq \W\setminus\{0\}}$ be a multiset of non-zero vectors with ${\operatorname{k-rank}(v_a : a \in [n]) \geq 2}$, let $\{\alpha_a : a \in [n]\} \subseteq \mathbb{F}^\times$ be a multiset of non-zero scalars, and let ${d=\dim\spn\{v_a : a \in [n]\}}$. If \begin{align}\label{waring_uniqueness_inequality} 2n+1 \leq m+2d-2, \end{align} then $\sum_{a \in [n]} \alpha_a v_a^{\otimes m}$ constitutes a unique Waring rank decomposition. More generally, if \begin{align}\label{waring_uniqueness_inequality} n +r +1\leq m+2d-2, \end{align} for some $r \geq n$, then $\sum_{a \in [n]} \alpha_a v_a^{\otimes m}$ is the unique symmetric decomposition of this tensor into at most $r$ terms. \end{cor} Note that the $r=n$ case of Corollary~\ref{waring_uniqueness} improves Kruskal's theorem for symmetric decompositions as soon as $2d > m(k-2)+4$, where $k=\operatorname{k-rank}(v_a : a \in [n])$. This case of Corollary~\ref{waring_uniqueness} is in fact contained in our generalization of Kruskal's theorem (Theorem~\ref{k-gen}), since for every subset $S\subseteq [n]$ with $2 \leq \abs{S} \leq n$, it holds that \begin{align} 2 \abs{S}&=2n-2\bigabs{[n]\setminus S}\\ &\leq m+2d-2\bigabs{[n]\setminus S}-3\\ &\leq m+2d^{S}-3\\ &\leq m(d^S-1)+1, \end{align} where $d^S=\dim\spn\{v_a : a \in S\}$. This demonstrates that our generalization of Kruskal's theorem is stronger than Kruskal's theorem, even for symmetric tensor decompositions. Our main result in this section is the $r>n$ case of Corollary~\ref{waring_uniqueness}, which yields uniqueness results for non-Waring rank decompositions of $\sum_{a \in [n]} \alpha_a v_a^{\otimes n}$. The following example illustrates this case in practice. \begin{example}\label{ex:symmetric} It follows from Corollary~\ref{waring_uniqueness} that for any positive integers $m\geq 3$ and $n \geq 2$, $\sum_{a \in [n]} e_a^{\otimes m}$ is the unique symmetric decomposition of this tensor into at most $m+n-3$ terms. \end{example} It is natural to ask if Corollary~\ref{waring_uniqueness} can be improved under further restrictions on $\operatorname{k-rank}(v_a : a \in [n])$. At the end of Section~\ref{waring_non-rank_sharp} we prove that this cannot be done, at least in a particular parameter regime. \subsection{The inequality appearing in our uniqueness result is sharp}\label{waring_non-rank_sharp} In this subsection we prove that the inequality~\eqref{symmetric_first_inequality} that appears in Theorem~\ref{symmetric_non-rank_theorem} cannot be improved, by constructing explicit multisets of symmetric product tensors that satisfy this bound with equality. Let $\mathbb{F}$ be a field with $\setft{Char}(\mathbb{F})=0$. We will prove that for any choice of positive integers $m \geq 2$, $d \geq 2$, $r \geq d-2$, and $n\geq d$ for which $n+r=m+2d-2$, there exist multisets of non-zero vectors $E$ and $F$ that satisfy the assumptions of Theorem~\ref{symmetric_non-rank_theorem}. Note that the inequality ${r \geq d-2}$ automatically holds when $r \geq n$, so this assumption does not restrict the parameter regime in which the inequality appearing in our uniqueness result (Corollary~\ref{waring_uniqueness}) is sharp as a consequence. We first consider the case $d=2$. Let $\{v_a^{\otimes m} : a \in [m+2]\} \subseteq \pro{\mathbb{F}^{2} : \dots : \mathbb{F}^2}$ be a circuit of symmetric product tensors for which \begin{align} \operatorname{k-rank}(v_a: a \in [m+2])= 2. \end{align} An example of such a circuit is given in~\cite{DERKSEN2013708}, and reviewed in Section~\ref{conjecture_kruskal}. So there exist non-zero scalars $\{\alpha_a : a \in [m+2]\}\subseteq \mathbb{F}^\times$ for which $\sum_{a \in [m+2]} \alpha_a v_a^{\otimes m}=0,$ and we can take the multisets $E=\{v_a : a \in [n]\}$ and $F=\{v_a : a \in [m+2]\setminus [n]\}$ to conclude. For $d \geq 3$, let $\{v_a^{\otimes m} : a \in [m+2]\} \subseteq \pro{\mathbb{F}^{d} : \dots : \mathbb{F}^d}$ be the same multiset of symmetric product tensors as above, embedded in a larger space. Let \begin{align} \{v_a: a \in [d+m]\setminus [m+2]\} \subseteq \mathbb{F}^d\setminus \{0\} \end{align} be any multiset of non-zero vectors for which \begin{align} \dim\spn\{v_a : a \in [d+m]\}=d \end{align} and \begin{align} \operatorname{k-rank}\{v_a : a \in [d+m]\}\geq 2, \end{align} which is guaranteed to exist since $\mathbb{F}$ is infinite. Since $r \geq d-2$, we can take the multisets \begin{align} E=\{v_a: a \in [n-d+2]\}\sqcup\{v_a: a \in [d+m]\setminus [m+2]\} \end{align} and \begin{align} F=\{v_a : a \in [m+2]\setminus[n-d+2]\} \sqcup \{v_a: a \in [d+m]\setminus [m+2]\} \end{align} to conclude. Somewhat surprisingly, the inequality~\eqref{symmetric_first_inequality} is very nearly sharp even when the k-rank condition is tightened to ${\operatorname{k-rank}(v_a : a \in [n]) \geq k}$ for some $k \geq 3$, under certain parameter constraints. More specifically, for any $k \in \{3,4,\dots, d-1\}$, it is almost sharp under the choice $n=d+1$ and $r=m+d-1$. Let \begin{align} E= \{v_a : a \in [d+m]\setminus[m]\} \sqcup \bigg\{\sum_{a\in [k]} v_a\bigg\}, \end{align} and \begin{align} F=\{v_a: a \in [m]\} \sqcup \{v_a : a \in [d+m]\setminus [m+2] \}\sqcup \bigg\{\sum_{a\in [k]} v_a\bigg\}. \end{align} Here, $\abs{E}+\abs{F}=2d+m,$ exceeding our lower bound by 2. When $k=d$, take the same multisets $E$ and $F$, with $\sum_{a\in [d]} v_a$ removed, to observe that our bound is sharp under the choice $n=d$ and $r=m+d-2$. Note that the k-rank is brought down to $k$ because of a single vector in the multiset. This is a concrete demonstration of the fact that the k-rank is a very crude measure of genericity. We emphasize that this construction relies on the particular choice of parameters $n=d+1$, and $r=m+d-1$. It is possible that the inequality~\eqref{symmetric_first_inequality} could be significantly stengthened for other choices of $n$ and $r$. Indeed, we have exhibited such an improvement for $r \leq n$ in Corollary~\ref{symmetric_cor}. \subsection{Applications of non-rank uniqueness results}\label{non-rank_applications} In this subsection, we identify potential applications of our results on uniqueness of non-rank decompositions. For concreteness, we focus on the symmetric case and our non-Waring rank uniqueness result in Corollary~\ref{waring_uniqueness}, however similar comments can be applied to our analogous results in Section~\ref{non-rank} in the non-symmetric case. We say a symmetric tensor $v$ is \textit{identifiable} if it has a unique Waring rank decomposition. For the purposes of this discussion, we will say that $v$ is $r$\textit{-identifiable} for some ${r \geq \operatorname{rank}(v)}$ if the Waring rank decomposition of $v$ is the unique symmetric decomposition of $v$ into at most $r$ terms (see Section~\ref{mp}). Corollary~\ref{waring_uniqueness} provides a sufficient condition for a symmetric tensor $v$ to be $r$-identifiable for $r>\operatorname{rank}(v)$, and Example~\ref{ex:symmetric} demonstrates the existence of symmetric tensors satisfying this condition. We can thus define a hierarchy of identifiable symmetric tensors (of some fixed rank), where those that are $r$-identifiable for larger $r$ can be thought of as ``more identifiable." We suggest that studying this hierarchy could be a useful tool for studying symmetric tensor decompositions. For example, although most symmetric tensors of sub-generic rank are identifiable, it is notoriously difficult to find the rank decomposition of such tensors~\cite{landsberg2012tensors,pmlr-v35-bhaskara14b,chiantini2017generic}. Perhaps one can leverage the additional structure of $r$-identifiable symmetric tensors to find efficient decompositions. In applications, one often has a symmetric decomposition of a tensor, and wants to control the possible symmetric decompositions with fewer terms. Uniqueness results for non-rank decompositions can be turned around to apply in this setting: Suppose we know that if a symmetric decomposition into $n$ terms satisfies some condition, call it $C$, then it is the unique symmetric decomposition into at most $r$ terms, for some $r > n$. Then if one starts with a symmetric decomposition of a symmetric tensor $v$ into $r$ terms, she knows that there are no symmetric decompositions of $v$ into $n<r$ terms that satisfies condition $C$. In this way, one can use a non-rank uniqueness result to control the possible decompositions of $v$ into fewer than $r$ symmetric product tensors. Applying this reasoning to our Corollary~\ref{waring_uniqueness} simply yields a special case of Theorem~\ref{symmetric_non-rank_theorem}. However, applying analogous reasoning to Corollary~\ref{k_arbitrarys1} in the non-symmetric case seems to produce new results. \section{Comparing our generalization of Kruskal's theorem to the uniqueness criteria of Domanov, De Lathauwer, and S\o{}rensen}\label{uniqueness_applications} In this section we compare our generalization of Kruskal's theorem to uniqueness criteria obtained by Domanov, De Lathauwer, and S\o{}rensen (DLS) in the case of three subsystems \cite{domanov2013uniqueness,domanov2013uniqueness2,domanov2014canonical,sorensen2015new,sorensen2015coupled}, which are the only previously known extensions of Kruskal's theorem that we are aware of. A drawback to the uniqueness criteria of DLS is that, similarly to Kruskal's theorem, they require the k-ranks to be above a certain threshold. In Section~\ref{threshold} we make this statement precise, and show by example that our generalization of Kruskal's theorem can certify uniqueness below this threshold. Moreover, in Section~\ref{combine} we observe that our generalization of Kruskal's theorem contains many of the uniqueness criteria of DLS. The uniqueness criteria of DLS are spread across five papers, and can be difficult to keep track of. For clarity and future reference, in Theorem~\ref{uniqueness} we combine all of these criteria into a single statement. In~Section~\ref{new_conjecture} we use insight gained from this synthesization and our Theorem~\ref{k-gen} as evidence to support a conjectural uniqueness criterion that would contain and unify every uniqueness criteria of DLS into a single, elegant statement. For the remainder of this section, we fix a vector space $\V=\V_1 \otimes \V_2 \otimes \V_3$ over a field $\mathbb{F}$, and a multiset of product tensors \begin{align} \{x_a : a \in [n]\} \subseteq \pro{\V_1:\V_2 : \V_3} \end{align} with k-ranks $k_j=\operatorname{k-rank}(x_{a,j} : a \in [n])$ for each $j \in [3]$. For each subset $S \subseteq [n]$ with $2 \leq \abs{S} \leq n$ and index $j \in [3]$, we let \begin{align} d_j^S=\dim\spn\{x_{a,j} : a \in [n]\}. \end{align} We also let $d_j=d_j^{[n]}$ for all $j \in [3]$. \subsection{Uniqueness below the k-rank threshold of DLS}\label{threshold} All of the uniqueness criteria of DLS require the k-ranks to be above a certain threshold. In this subsection, we show by example that our generalization of Kruskal's theorem can certify uniqueness below this threshold. Making this threshold precise, the uniqueness criteria of DLS cannot be applied whenever \begin{align}\label{k-rank-large} &\min\{k_2,k_3\} \leq n-d_1+1,\nonumber\\ \text{ and } &\min\{k_1,k_3\} \leq n-d_2 + 1,\nonumber\\ \text{ and } & \min\{k_1,k_2\} \leq n-d_3 +1. \end{align} For example, if $k_2= k_3=2$, then the uniqueness criteria of DLS can only certify uniqueness if $d_1=n$. The following example shows that our generalization of Kruskal's theorem (Theorem~\ref{k-gen}) can certify uniqueness even if~\eqref{k-rank-large} holds. \begin{example}\label{certify} Consider the multiset of product tensors \label{uniqueness_example} \begin{align}\{&\alpha_1 e_1^{\otimes 3},\alpha_2 e_2^{\otimes 3}, \alpha_3 e_3^{\otimes 3},\alpha_4 e_4^{\otimes 3},\alpha_5(e_2+e_3)\otimes (e_2+e_4)\otimes (e_1+e_4)\} \quad \text{for} \quad \alpha_1,\dots, \alpha_5 \in \mathbb{F}^{\times}. \end{align} In this example, $k_1=k_2=k_3=2$, $d_1=d_2=d_3=4$, and $n-d_j+2=3$ for all $j \in [3]$, so~\eqref{k-rank-large} holds. Nevertheless, for arbitrary $\alpha_1,\dots, \alpha_5 \in \mathbb{F}^{\times}$, our generalization of Kruskal's theorem certifies that the sum of these product tensors constitutes a unique tensor rank decomposition. We note that uniqueness for $\alpha_2=\dots=\alpha_5=1$ was proven in~\cite[Example~5.2]{domanov2013uniqueness2}, using a proof specific to this case, in order to demonstrate that their uniqueness criteria are not also necessary for uniqueness. \end{example} Example~\ref{certify} shows that Theorem~\ref{k-gen} is strictly stronger than Kruskal's theorem, and is independent of the uniqueness criteria of DLS. It is natural to ask if Theorem~\ref{k-gen} is stronger than Kruskal's theorem even for symmetric tensor decompositions. We have observed in Section~\ref{symmetric_non-rank} that this is indeed the case. \subsection{Extending several uniqueness criteria of DLS}\label{combine} In this subsection, we observe that several of the uniqueness criteria of DLS are contained in our generalization of Kruskal's theorem, and prove a further, independent uniqueness criterion. The uniqueness criteria of DLS are numerous, and can be difficult to keep track of. To more easily analyze these criteria, in Theorem~\ref{uniqueness} we combine them all into a single statement. \subsubsection{Conditions~U,~H,~C, and ~S} Here we introduce several different conditions on multisets of product tensors, which will make the uniqueness criteria of DLS easier to state, and also make them easier to relate to our generalization of Kruskal's theorem. We first recall Conditions~U,~H, and~C from \cite{domanov2013uniqueness,domanov2013uniqueness2}. For notational convenience, we have changed these definitions slightly from~\cite{domanov2013uniqueness,domanov2013uniqueness2}. For example, our Condition~U is their Condition~$U_{n-d_1+2}$, with the added condition that $k_1 \geq 2$. After reviewing Conditions~U,~H, and~C, we introduce Condition~S, which captures the conditions of our generalization of Kruskal's theorem in the case ${m=3}$. Unlike Conditions~U,~H, and~C, our Condition~S does not appear in~\cite{domanov2013uniqueness,domanov2013uniqueness2}, nor anywhere else that we are aware of. For a vector $\alpha \in \mathbb{F}^n$, we let $\omega(\alpha)$ denote the number of non-zero entries in $\alpha$. \begin{namedtheorem}{Condition U} It holds that $k_{1} \geq 2$, and for all $\alpha \in \mathbb{F}^n$, \begin{align}\label{Umeq} \operatorname{rank}\Big[\sum_{a \in [n]} \alpha_a x_{a, 2}\otimes x_{a,3} \Big]\geq \min\{\omega(\alpha),n-d_1+2\}. \end{align} \end{namedtheorem} \begin{namedtheorem}{Condition H} It holds that $k_{1} \geq 2$, and \begin{align}\label{k-gen2eq} d_{2}^S\!+d_{3}^S\!-\abs{S} \geq \min\{\abs{S}, n-d_{1}\!+2\} \end{align} for all $S \subseteq [n]$ with $2 \leq \abs{S}\leq n$. \end{namedtheorem} Condition~C takes a bit more work to describe. We use coordinates for this condition, in order to avoid having to introduce further multilinear algebra notation. For positive integers $q,r,$ and $t$, and matrices \begin{align} Y=(y_1,\dots, y_t) \in \setft{L}(\mathbb{F}^t, \mathbb{F}^q)\\ Z=(z_1,\dots, z_t)\in \setft{L}(\mathbb{F}^t, \mathbb{F}^r), \end{align} let \begin{align} Y \odot Z=(y_1\otimes z_1, \dots, y_t \otimes z_t) \in \setft{L}(\mathbb{F}^t,\mathbb{F}^{qr}) \end{align} denote the \textit{Khatri-Rao product} of $Y$ and $Z$. Suppose $\V_j=\mathbb{F}^{d_j}$ for each $j \in [3]$, and consider the matrices \begin{align} X_j=(x_{1,j},\dots, x_{n,j})\in \setft{L}(\mathbb{F}^n,\mathbb{F}^{d_j}) \end{align} for $j \in [3]$. For a positive integer $s\leq d_j$, let $\C_s(X_j)$ be the $\binom{d_j}{s} \times \binom{n}{s}$ matrix of $s \times s$ minors of $X_j$, with rows and columns arranged according to the lexicographic order on the size $s$ subsets of $[d_j]$ and $[n]$, respectively. Define the matrix \begin{align} C_s=\C_s(X_{2})\odot \C_s(X_{3}) \in \setft{L}(\mathbb{F}^{\binom{n}{s}}, \mathbb{F}^{q}), \end{align} where $q=\big(\substack{d_{2}\\s}\big)\big(\substack{d_{3}\\s}\big)$. Now we can state Condition~C. \begin{namedtheorem}{Condition C} It holds that $k_{1} \geq 2$, $\min\{d_2,d_3\} \geq n-d_1+2$, and \begin{align} \operatorname{rank}(C_{n-d_{1}+2})=\left(\substack{ n \\ n-d_{1}+2} \right). \end{align} \end{namedtheorem} To more easily compare our generalization of Kruskal's theorem to the uniqueness criteria of DLS, we give a name (Condition~S) to the condition of our Theorem~\ref{k-gen} in the case $m=3$. \begin{namedtheorem}{Condition S} It holds that \begin{align}\label{concon} 2 \abs{S} \leq d_1^S+d_2^S+d_3^S-2 \end{align} for all $S \subseteq [n]$ with $2 \leq \abs{S}\leq n$. \end{namedtheorem} These conditions are related to each other as follows: \begin{equation}\label{implications} \begin{tikzpicture}[commutative diagrams/every diagram] \node(dummy){}; \node[above=of dummy](H){\text{Condition H}}; \node[below=of dummy](C){\text{Condition C}}; \node[right=30pt of dummy](U){\text{Condition U}}; \node[right=30pt of H](S){\text{Condition S}}; \path[commutative diagrams/.cd, every arrow, every label] (H) edge[commutative diagrams/Rightarrow] (U) (C) edge[commutative diagrams/Rightarrow] (U) (H) edge[commutative diagrams/Rightarrow] (S); \end{tikzpicture} \end{equation} All of the implications in~\eqref{implications} except (Condition H $\Rightarrow$ Condition S) were proven in~\cite{domanov2013uniqueness}. To see that Condition~H $\Rightarrow$ Condition S, note that for any subset $S\subseteq [n]$ with $2 \leq \abs{S} \leq n$, the condition $k_1 \geq 2$ implies \begin{align} d_{1}^S \geq \max\{2,d_{1}-(n-\abs{S})\}, \end{align} so by Condition~H, \begin{align} d_{1}^S+d_{2}^S+d_{3}^S &\geq \max\{2,d_{1}-(n-\abs{S})\} + \abs{S}+\min\{\abs{S},n-d_{1}+2\}\\ &\geq 2 \abs{S}+2, \end{align} and Condition S holds. It is easy to find examples that certify {Condition~C $\not\Rightarrow$ Condition~S}. By Example~\ref{uniqueness_example}, {Condition~S $\not\Rightarrow$ Condition~U}. In~\cite{domanov2013uniqueness} it is asked whether Condition~H $\Rightarrow$ Condition~C. Condition~U is theoretically computable, as it can be phrased as an ideal membership problem, however we are unaware of an efficient implementation. By comparison, Conditions~C,~H, and~S are easy to check. In the case of three subsystems, our Theorem~\ref{k-gen} states that Condition~S implies uniqueness. Since {Condition~H $\Rightarrow$ Condition~S}, then a corollary to Theorem~\ref{k-gen} is that Condition~H implies uniqueness. Similarly, Theorem~\ref{uniqueness} below states that Condition~U + extra assumptions implies uniqueness. By~\eqref{implications}, this implies that Condition~H + the same extra assumptions implies uniqueness, and similarly, Condition~C + the same extra assumptions implies uniqueness. Since we have proven that Condition~H alone implies uniqueness, it is natural to ask whether Conditions~C or~U alone imply uniqueness. We reiterate this line of reasoning in Section~\ref{new_conjecture}, and pose this question formally. \subsubsection{Synthesizing the uniqueness criteria of DLS} The following theorem contains every uniqueness criterion of DLS for which we are aware of an efficient implementation. This theorem is stated in terms of Condition~U to maintain generality, however only the implied statements in which Condition~U is replaced by Conditions~H or~C have an efficient implementation. Note that our Theorem~\ref{k-gen} generalizes the Condition~H version of this theorem, to the statement that Condition~S alone implies uniqueness (so in particular, Condition~H alone implies uniqueness). {\begin{theorem}\label{uniqueness} Suppose that Condition~U holds, and any one of the following conditions holds: \begin{enumerate}[align=left] \item \leavevmode\vspace{-\dimexpr\baselineskip + \topsep + \parsep} \begin{center}$k_{1}+\min\{k_{2},k_{3}-1\}\geq n+1.$ \end{center} \item It holds that $k_2 \geq 2$ and for all $\alpha \in \mathbb{F}^n$, \begin{align} \setft{rank}\Big[\sum_{a \in [n]} \alpha_a x_{a,1}\otimes x_{a,3}\Big]\geq \min\{\omega(\alpha),n-d_2+2\}. \end{align} (Note that this is just Condition U with the first subsystem replaced by the second). \item There exists a subset $S\subseteq [n]$ with $0 \leq |S| \leq d_{1}$ such that the following three conditions hold: \begin{enumerate} \item \leavevmode\vspace{-\dimexpr\baselineskip + \topsep + \parsep} \begin{center} $d_{1}^S=|S|.$ \end{center} \item \leavevmode\vspace{-\dimexpr\baselineskip + \topsep + \parsep} \begin{center} $d_{2}^{[n]\setminus S}=n-|S|.$\end{center} \item For any linear map $\Pi \in \setft{L}(\V_{1})$ with ${\ker(\Pi) = \spn \{x_{a ,1}: a \in S\}}$, scalars $\alpha_1,\dots, \alpha_n \in \mathbb{F}$, and index $b \in [n]\setminus S$ such that \begin{align} \sum_{a \in [n]\setminus S} \alpha_a & \Pi x_{a, 1} \otimes x_{a, 3} = \Pi x_{b, 1} \otimes z \end{align} for some $z \in \V_{\sigma(3)}$, it holds that $\omega(\alpha)\leq 1$. \end{enumerate} \item There exists a permutation $\tau \in S_n$ for which the matrix \begin{align} X_{1}^\tau = (x_{\tau(1),1},\dots, x_{\tau(n),n}) \end{align} has reduced row echelon form \begin{align}\label{Y} Y=\left[\begin{array}{@{}c | c@{}} \begin{matrix} 1 & & \\ & \ddots &\\ && 1 \end{matrix} & \begin{matrix} & & \\ & {\normalfont \Huge Z} &\\ && \end{matrix} \end{array}\right], \end{align} where $Z \in \setft{L}(\mathbb{F}^{n-d_{1}},\mathbb{F}^{d_{1}})$ and the blank entries are zero. Furthermore, for each $a \in [d_{1}-1]$, the columns of the submatrix of $Y$ with row index $\{a,a+1,\dots, d_{1}\}$ and column index $\{a, a+1,\dots, n\}$ have k-rank at least two. \item \leavevmode\vspace{-\dimexpr\baselineskip + \topsep + \parsep} \begin{center} $k_{1}=d_{1}.$ \end{center} \item For all $\alpha \in \mathbb{F}^n$, \begin{align} \setft{rank}\Big[\sum_{a \in [n]} \alpha_a x_{a,2}\otimes x_{a,3}\Big]\geq \min\{\omega(\alpha),n-k_1+2\}. \end{align} (Note that this is a stronger statement than Condition U, as it replaces the quantity ${n-d_1+2}$ with the possibly larger quantity $n-k_1+2$.) \end{enumerate} Then $\sum_{a\in[n]} x_a$ constitutes a unique tensor rank decomposition. \end{theorem}} For each $i \in [5]$, we will refer to Theorem~\hyperref[uniqueness]{\ref{uniqueness}.i} as the statement that Condition~U and the $i$-th condition appearing in Theorem~\ref{uniqueness} imply uniqueness. Theorems~\hyperref[uniqueness]{\ref{uniqueness}.1} and~\hyperref[uniqueness]{\ref{uniqueness}.2} are Corollary~1.23 and Proposition~1.26 in \cite{domanov2013uniqueness2,domanov2014canonical}. The Condition~C version of Theorem~\hyperref[uniqueness]{\ref{uniqueness}.3} is stated in Theorem~2.2 in \cite{sorensen2015coupled}, although the proof is contained in \cite{domanov2013uniqueness,domanov2013uniqueness2,sorensen2015new}. Condition 3b in Theorem~\ref{uniqueness} can be formulated as checking the rank of a certain matrix (see \cite{sorensen2015coupled}). Theorem~\hyperref[uniqueness]{\ref{uniqueness}.4} is a new result that we will prove (see Proposition~\ref{invariant_condition_4} for a coordinate-free statement). The Condition~C version of Theorems~\hyperref[uniqueness]{\ref{uniqueness}.5} and~\hyperref[uniqueness]{\ref{uniqueness}.6} are Theorems~1.6 and~1.7 in~\cite{domanov2014canonical}. It is easy to see that our Theorem~\hyperref[uniqueness]{\ref{uniqueness}.4} contains Theorem~\hyperref[uniqueness]{\ref{uniqueness}.5}, which in turn contains Theorem~\hyperref[uniqueness]{\ref{uniqueness}.6}, by the arguments used in~\cite{domanov2014canonical}. Most of these statements have previously only been formulated for $\mathbb{F}=\mathbb{R}$ or $\mathbb{F}=\mathbb{C}$, however in all of these cases the proof can be adapted to hold over an arbitrary field. The first step in proving all of these statements is to show that Condition~U implies uniqueness in the first subsystem. This is Proposition~4.3 in~\cite{domanov2013uniqueness}, and it is proven using Kruskal's permutation lemma \cite{kruskal1977three} (the proof of the permutation lemma in~\cite{landsberg2012tensors} holds word-for-word over an arbitrary field). In fact, uniqueness in the first subsystem holds even with the assumption $k_1 \geq 2$ removed from Condition~U~\cite{domanov2013uniqueness}. A less-restrictive condition than Condition~U, which we would call Condition~W, also appears in \cite{domanov2013uniqueness,domanov2013uniqueness2}, and is the same as Condition~U except that it only requires~\eqref{Umeq} to hold when ${\alpha = (f(x_{1,1}),\dots, f(x_{n,1}))}$ for some linear functional $f \in \V_1^*$. We note that Theorem~\ref{uniqueness} also holds with Condition~U replaced by Condition~W. Although the Condition~W version of Theorem~\ref{uniqueness} is slightly stronger than the Condition~U version, we are not aware of an efficient algorithm to check either Condition~U or Condition~W, and the existence of such an algorithm seems unlikely. We conclude this subsection by proving Theorem~\hyperref[uniqueness]{\ref{uniqueness}.4}. For this we require the following proposition, which restates Condition~4 in a coordinate-free manner. \begin{prop}\label{invariant_condition_4} Condition 4 in Theorem~\ref{uniqueness} holds if and only if there exists a permutation $\tau \in S_n$ such that for each $a \in [d_1-1]$ there is a linear operator $\Pi_a \in \setft{L}(\V_1)$ for which \begin{align} \Pi_a (x_{\tau(b),1})=0 \end{align} for all $b \in [a-1]$, and \begin{align}\label{k-rank-thingy} \operatorname{k-rank}( \Pi_a x_{\tau(a),1},\dots,\Pi_a x_{\tau(n),1})\geq 2. \end{align} \end{prop} \begin{proof} Assume without loss of generality that $\V_1=\mathbb{F}^{d_1}$. To see that the first statement implies the second, for each $a\in [d_1-1]$ let $\Pi_a=D_a P$, where $P\in \setft{L}(\mathbb{F}^{d_1})$ is the invertible matrix for which $PX_1^\tau=Y$, and $D_a \in \setft{L}(\mathbb{F}^{d_1})$ is the diagonal matrix with the first $a-1$ entries zero and the remaining entries $1$. It is easy to verify that~\eqref{k-rank-thingy} holds. Conversely, suppose that the reduced row echelon form of $X_1^\tau$, given by $P X_1^\tau$ for some invertible matrix $P \in \setft{L}(\mathbb{F}^{d_1})$, does not have the specified form. Then there exists ${a\in [d_1-1]}$ for which the columns of $D_a P X_1^\tau$ have k-rank at most one. Any matrix $\Pi_a\in \setft{L}(\mathbb{F}^{d_1})$ for which $\Pi_a (x_{\tau(b),1})=0$ for all $b \in [a-1]$ satisfies \begin{align} \Pi_a =\Pi_a P^{-1} D_a P. \end{align} Since the k-rank is non-increasing under matrix multiplication from the left,~\eqref{k-rank-thingy} does not hold. \end{proof} With Proposition~\ref{invariant_condition_4} in hand, we can now prove Theorem~\ref{uniqueness}.4. \begin{proof} [Proof of Theorem~\ref{uniqueness}.4] The question of whether or not the decomposition $\sum_{a\in [n]} x_a$ constitutes a unique tensor rank decomposition is invariant under permutations $\tau \in S_n$ of the tensors, so it suffices to prove the statement under the assumption that the permutation $\tau$ appearing in Condition 4 is trivial. We prove the statement by induction on $d_1$. If $d_1=2$, then Condition~U implies $k_2=k_3=n$, so uniqueness follows from Kruskal's theorem. For $d_1>2$, suppose $\sum_{a\in [n]} x_a =\sum_{a\in [r]} y_a$ for some non-negative integer $r \leq n$ and multiset of product tensors \begin{align} \{y_a : a \in [r]\} \subseteq \pro{\V_1: \V_2 : \V_3}. \end{align} By Proposition~4.3 in~\cite{domanov2013uniqueness} (or rather, the extension of this result to an arbitrary field), $r=n$, and there exists a permutation $\sigma \in S_n$ and nonegative integers $\alpha_1,\dots, \alpha_n \in \mathbb{F}^\times$ such that $\alpha_a x_{a,1}=y_{\sigma(a),1}$ for all $a \in [n]$. Let $\Pi_1 \in \setft{L}(\V_1)$ be any operator for which ${\ker(\Pi_1)=\spn\{x_{a,1}\}}$ and~\eqref{k-rank-thingy} holds (recall that $\tau$ is trivial). Then \begin{align} \sum_{a \in [n] \setminus \{1\}} (\Pi_1 x_{a,1})\otimes x_{a,2} \otimes x_{a,3}=\sum_{a \in [n] \setminus \{1\}} (\alpha_{a} \Pi_1 x_{a,1})\otimes y_{\sigma(a),2} \otimes y_{\sigma(a),3}. \end{align} Now, $\dim\spn\{\Pi_1 x_{a,1}: a \in [n]\setminus\{1\}\}=d_1-1$, and Condition~U again holds for the multiset of product tensors \begin{align} \{(\Pi_1 x_{a,1}) \otimes x_{a,2} \otimes x_{a,3} : a \in [n] \setminus \{1\}\}. \end{align} Furthermore, these product tensors again satisfy Condition 4 of Theorem~\ref{uniqueness}, so by the induction hypothesis \begin{align} (\Pi_1 x_{a,1}) \otimes x_{a,2} \otimes x_{a,3}=(\alpha_a \Pi_1 x_{a,1}) \otimes y_{\sigma(a),2} \otimes y_{\sigma(a),3}\quad \text{for all}\quad a \in [n]\setminus \{1\}. \end{align} It follows that $x_a=y_{\sigma(a)}$ for all $a \in [n] \setminus\{1\}$, so $x_1=y_{\sigma(1)}$. This completes the proof. \end{proof} \subsection{Conjectural generalization of all uniqueness criteria of DLS}\label{new_conjecture} In the case of three subsystems, our generalization of Kruskal's theorem states that Condition~S implies uniqueness. Since {Condition~H $\Rightarrow$ Condition~S}, then a corollary to Theorem~\ref{k-gen} is that Condition~H implies uniqueness. Similarly, Theorem~\ref{uniqueness} above states that Condition~U + extra assumptions implies uniqueness, which implies that Condition~H + the same extra assumptions implies uniqueness. Since we have proven that Condition~H alone implies uniqueness, it is natural to ask whether Condition~U alone implies uniqueness. We now state this question formally. A positive answer to Question~\ref{conjecture_U} would generalize and unify all of the uniqueness criteria of DLS (synthesized in Theorem~\ref{uniqueness}) into a single, elegant statement. \begin{question}\label{conjecture_U} Does Condition~U imply that $\sum_{a \in [n]} x_a$ constitutes a unique tensor rank decomposition? \end{question} \section{Appendix} In this appendix we prove Theorem~\ref{k_arbitrary_old}. The proof is very similar to that of Theorem~\ref{k_arbitrary}. \begin{proof}[Proof of Theorem~\ref{k_arbitrary_old}] For each $a \in [r]$, let $x_{n+a}=-y_a$, and let $T_1 \sqcup \dots \sqcup T_t=[n+r]$ be the index sets of the decomposition of $\{x_a : a \in [n+r]\}$ into connected components. Note that for each $p \in [t]$, if \begin{align} \bigabs{T_p \cap [n+r]\setminus [n]}\leq \bigabs{T_p \cap [n]}, \end{align} then $\bigabs{T_p \cap [n]} \leq s$, otherwise $\{x_a : a \in T_p\}$ would split. Assume without loss of generality that \begin{align} \bigabs{T_1 \cap [n]}-\bigabs{T_1 \cap [n+r]\setminus [n]} &\geq \bigabs{T_2 \cap [n]}-\bigabs{T_2 \cap [n+r]\setminus [n]}\\ &\;\; \vdots \\ & \geq \bigabs{T_{{t}} \cap [n]}-\bigabs{T_{{t}} \cap [n+r]\setminus [n]}, \end{align} If \begin{align} \bigabs{T_{1}\cap [n]} \geq \bigabs{T_{1} \cap [n+r]\setminus [n]}, \end{align} then let $\tilde{l}\in [t]$ be the largest integer for which \begin{align}\label{inequality_old} \bigabs{T_{\tilde{l}}\cap [n]} \geq \bigabs{T_{\tilde{l}} \cap [n+r]\setminus [n]}. \end{align} Otherwise, let $\tilde{l}=0$. Then for all $p \in [t]\setminus [\tilde{l}]$ it holds that \begin{align}\label{strict_inequality_old} \bigabs{T_p \cap [n]} < \bigabs{T_p \cap [n+r]\setminus [n]}. \end{align} To complete the proof, we will show that $\tilde{l} \geq l$, for then we can take $Q_p=T_p \cap [n]$ and $R_p=T_p \cap [n+r]\setminus [n]$ for all $p \in [l]$ to conclude. Suppose toward contradiction that $\tilde{l}< l$. We will require the following two claims: \begin{claim}\label{pigeonhole_claim_old} It holds that $\tilde{l}<t$, $\bigceil{\frac{n- s \tilde{l} }{t-\tilde{l}}} \geq s+1$, and there exists $p \in [t]\setminus [\tilde{l}]$ for which \begin{align}\label{pigeonhole} \bigabs{T_p \cap [n]} \geq \biggceil{\frac{n- s \tilde{l} }{t-\tilde{l}}}. \end{align} \end{claim} \begin{claim}\label{inequality2_claim_old} For all $p \in [t] \setminus [\tilde{l}]$, it holds that \begin{align}\label{inequality2_old} \bigabs{T_p \cap [n+r]\setminus [n]} \leq \bigabs{T_p \cap [n]} +(r-n)+(s+1)\tilde{l} -t+1. \end{align} \end{claim} Before proving these claims, we first use them to complete the proof of the theorem. Let $p \in [t]\setminus [\tilde{l}]$ be as in Claim~\ref{pigeonhole_claim_old}. Then, \begin{align} \abs{T_p} &= \bigabs{T_p \cap [n]}+\bigabs{T_p \cap [n+r]\setminus [n]}\\ &\leq 2 \bigabs{T_p \cap [n]}+ r-n+(s+1)\tilde{l} -t+1\\ &\leq 2 \bigabs{T_p \cap [n]}+ r-n + s \tilde{l} - \biggceil{\frac{n-s \tilde{l}}{\bigabs{T_p \cap [n]}}}+1\\ &\leq 2 \bigabs{T_p \cap [n]}+ (r-n+q-s)- \biggceil{\frac{n-q+s}{\bigabs{T_p \cap [n]}}}+1\\ & \leq \sum_{j=1}^m (d_j^{T_p \cap [n]}-1)+1, \end{align} where the first line is obvious, the second follows from Claim~\ref{inequality2_claim_old}, the third follows from Claim~\ref{pigeonhole_claim_old}, the fourth follows from $\tilde{l}< l$, and the fifth follows from the assumptions of the theorem and the fact that $\abs{T_p \cap [n] } \geq s+1$. So $\{x_a : a \in T_p\}$ splits, a contradiction. This completes the proof, modulo proving the claims. \begin{proof}[Proof of Claim~\ref{pigeonhole_claim}] \renewcommand\qedsymbol{$\triangle$} To prove the claim, we first observe that $n>st$. Indeed, if $n \leq st$, then \begin{align} r& \geq \sum_{p=\tilde{l}+1}^t \bigabs{T_p \cap [n+r]\setminus [n]}\\ &\geq\sum_{p=\tilde{l}+1}^t \left(\bigabs{T_p \cap [n]}+1\right)\\ &=n-\bigabs{(T_1 \sqcup \dots \sqcup T_{\tilde{l}})\cap [n]}+t-\tilde{l}\\ &\geq n+t - (s+1)\tilde{l}\\ & \geq n+\biggceil{\frac{n}{s}-(s+1)(q/s-1)}\\ &= \biggceil{\left(\frac{s+1}{s}\right)(n-q+s)},\\ \end{align} where the first line is obvious, the second follows from~\eqref{strict_inequality}, the third is obvious, the fourth follows from $\abs{T_p \cap [n]} \leq s$ for all $p \in [\tilde{l}]$, the fifth follows from $n\leq st$ and $\tilde{l}<l$, and the sixth is algebra. This contradicts the assumptions of the theorem, so it must hold that $n>st$. Note that $\tilde{l}<t$, for otherwise we would have $n \leq st$ by the fact that $\bigabs{T_p \cap [n]} \leq s$ for all $p \in [\tilde{l}]$. To verify that $\bigceil{\frac{n- s \tilde{l} }{t-\tilde{l}}} \geq s+1$, it suffices to prove $\frac{n- s \tilde{l} }{t-\tilde{l}} > s,$ which follows from $n>st$. To verify~\eqref{pigeonhole}, since $\abs{T_p \cap [n]} \leq s$ for all $p \in [\tilde{l}]$, by the pigeonhole principle there exists $p \in [t]\setminus [\tilde{l}]$ for which \begin{align} \bigabs{T_p \cap [n]} \geq \biggceil{\frac{n- s \tilde{l} }{t-\tilde{l}}}. \end{align} This proves the claim. \end{proof} \begin{proof}[Proof of Claim~\ref{inequality2_claim_old}] \renewcommand\qedsymbol{$\triangle$} Suppose toward contradiction that the inequality~\eqref{inequality2_old} does not hold for some $\tilde{p}\in [t] \setminus [\tilde{l}]$. Then \begin{align} r &\geq \sum_{p=\tilde{l}+1}^t \bigabs{T_p \cap [n+r]\setminus [n]}\\ & \geq \sum_{p \neq \tilde{p}} \big(\bigabs{T_p \cap [n]}+1\big)+ \bigabs{T_{\tilde{p}} \cap [n]}+ (r-n)+(s+1)\tilde{l} -t+2\\ &= \sum_{p=\tilde{l}+1}^t \bigabs{T_p \cap [n]}+ (r-n)+s\tilde{l}+1\\ &\geq r+1, \end{align} where the first three lines are obvious, and the fourth follows from~\eqref{inequality_old}, a contradiction. \end{proof} The proofs of Claims~\ref{pigeonhole_claim_old} and~\ref{inequality2_claim_old} complete the proof of the theorem. \end{proof} \bibliographystyle{alpha}
\section{Introduction} In this work we aim at understanding the influence of a heterogeneous diffusion on the spreading speed of solutions of a scalar reaction-diffusion equation of Fisher-KPP type \cite{fisher,KPP}. More precisely, we consider the situation of a shifting environment, i.e. the diffusion coefficient depends on a shifting variable $x - c_{het} t$ where the parameter $c_{het} \in \R$. The equation we consider writes as follows: \begin{equation}\label{eq:main} \partial_t u = \chi ( x - c_{het} t) \partial_x^2 u + \alpha u (1-u), \quad t > 0, \ x \in \R, \end{equation} where $\alpha>0$. Throughout this paper we assume that the function $\chi: \R \mapsto \R$ is positive and smooth; further assumptions will be added below. Such a reaction-diffusion equation is often used in ecology and population dynamics to model spatial propagation phenomena \cite{AW78}. In this context, the unknown function $u$ denotes the density of some species, and the parameter $\alpha$ stands for its per capita growth rate. The function $\chi$ stands for the motility of individuals, and therefore the heterogeneity means that the motility depends on local environmental conditions. In the past decade, there has been several series of works dedicated to the study of a variation of~\eqref{eq:main} with constant motility (say~$\chi \equiv 1$ to fix the ideas) but with shifting growth rates, that typically reads \begin{equation*} \partial_t u = \partial_x^2 u+ u(r(x-c_{het}t)-u), \end{equation*} where the function $r$ is not necessarily monotone and can take negative values \cite{BR08,berestycki2009can,bouhours2019spreading,li14,BF18}. One of the main motivations behind the introduction of a shifting growth rate came from modeling climate change and its impact on the survival of species \cite{berestycki2009can,cosner}. Some spreading-vanishing dichotomy properties were typically found, depending on either the size of a favorable patch~\cite{berestycki2009can} or of the initial population~\cite{bouhours2019spreading}. \medskip Here our choice of a shifting heterogeneity (i.e. depending only on a shifting variable $x - c_{het} t$) comes from systems coupling several species densities. Most of the mathematical literature on spreading speeds for systems has been concerned with situations where these species only interact through their growth rates, e.g. prey-predator and competition systems \cite{dgm_sys,GL19,HS14,lam21}. Yet we would like to understand the influence that such inter-species interactions may play on the respective motilities of each species. For instance, it seems natural that the motility of predators should be higher when the density of the prey is low, while the motility of preys should be higher when the density of predators is high. To illustrate this, let us consider the reaction-diffusion system, \begin{equation}\label{eq:sys0} \left\{\begin{array}{l} \partial_t u = d(v) \partial_x^2 u + \alpha u (1-u),\vspace{3pt}\\ \partial_t v = \partial_x^2 v + \beta v (1-v), \end{array} \right. \end{equation} where $\beta >0$ and $d : \R^+ \mapsto \R$ is a positive function. Here $u$ and $v$ denote two distinct species, which are coupled through the motility of individuals of the former species. For simplicity we have excluded other coupling terms, and in particular there are no predation nor competition terms in the growth rates; this allows us to focus purely on the cross-diffusion phenomenon. As suggested above, the function $d$ may be taken as a monotonic function depending on whichever species acts as the predator. More precisely, if $u$ is the prey then the motility function $d$ should be increasing as the number of predators $v$ grows; conversely, if $u$ is the predator then its motility $d$ should be decreasing as the number of preys $v$ grows. Other forms of cross-diffusion have been proposed and studied in the literature, typically when the diffusion term is either of the form $\partial_x^2(d(v)u)$ or $\partial_x(d(v)\partial_xu)$ \cite{SKT,lewis,gatenby1996reaction}. While such systems have been considered for instance in the context of chemotaxis, little is known from the point of view of propagation phenomena, apart from perturbative or singular limit results that reduce the system to a weakly coupled system which allow the construction of traveling front solutions (see for example \cite{gallay} in the context of cancer modeling). It is well-known that, for large classes of initial data, the solution of the Fisher-KPP equation $$\partial_t v = \partial_x^2 v + \beta v (1-v),$$ converges to a traveling front solution, i.e. an entire in time solution $v(t,x) = V(x-ct)$ where $V$ is a decreasing function and satisfies $$V(-\infty) = 1 \ , \quad V (+\infty) = 0.$$ More precisely, such a traveling front solution exists if and only if $c \geq 2 \sqrt{\beta}$, and the traveling front with minimal speed is typically the most biologically meaningful because it is attractive with respect to compactly supported initial conditions (up to some drift phenomenon) \cite{fisher,KPP,AW78}. Due to the unilateral coupling in system~\eqref{eq:sys0}, it is thus natural to assume that $v$ is identical to the traveling front with minimal speed, and then the equation for $u$ reduces to \eqref{eq:main} with $c_{het} = 2 \sqrt{\beta}$. In other words, the shifting heterogeneity arises as a result of the propagation of another surrounding species, which individuals of the species $u$ may either chase or flee from. \begin{rmk} From the above discussion, it may seem natural to consider a slightly more general heterogeneous diffusion $\widetilde{\chi} (t,x)$, which converges as $t \to +\infty$ to $\chi (x - c_{het} t)$, or even to $\chi (x - c_{het} t + m(t))$ where $m (t) = o (t)$ as $t\to +\infty$ accounts for the drift phenomenon. One may check that most of our analysis applies to such situations with straightforward adaptations. We choose to only consider \eqref{eq:main} since it makes the presentation simpler and captures the same phenomena. \end{rmk} \begin{figure}[!t] \centering \includegraphics[width=0.4\textwidth]{ChiDec.pdf}\hspace{1.5cm} \includegraphics[width=0.4\textwidth]{ChiInc.pdf} \caption{Illustration of $\chi$ in cases~\eqref{ass:chi_dec} (left) and \eqref{ass:chi_inc} (right).} \label{fig:Chi} \end{figure} Following this motivation, we will study the large-time behavior of solutions of~\eqref{eq:main} with $c_{het} \geq 0$ and under either assumptions \begin{equation}\tag{I}\label{ass:chi_dec} \left\{\begin{array}{l} \chi >0, \ \ \chi ' \leq 0, \vspace{3pt}\\ \chi (-\infty) = d_+ , \ \ \chi (+\infty) = d_-,\\ \end{array} \right. \end{equation} or \begin{equation}\tag{II}\label{ass:chi_inc} \left\{\begin{array}{l} \chi >0, \ \ \chi ' \geq 0, \vspace{3pt}\\ \chi (-\infty) = d_- , \ \ \chi (+\infty) = d_+ ,\\ \end{array} \right. \end{equation} where $$0 < d_- < d_+ < +\infty.$$ Let us point out that, equivalently, one may fix the function $\chi$ satisfying either assumption, allow $c_{het}$ to vary on the whole real line $\R$ and investigate spreading in both directions. Finally, equation~\eqref{eq:main} will be supplemented together with some initial condition $u_0$ such that $$0 \leq u_0 \leq 1 \mbox{ and it is nontrivial and compactly supported}.$$ \section{Main results} In the first case when \eqref{ass:chi_dec} holds, then the `favorable' part of the environment where individuals diffuse more is growing with speed $c_{het}$, and therefore one may expect that the solution will be spreading with positive speed. On the other hand, in the second case when \eqref{ass:chi_inc} holds, then the `favorable' part of the environment is actually receding and a key point will be whether the solution is able to `keep up' with the shifting speed $c_{het}$ of the heterogeneity. This leads us to introduce, before we state our main results, the speeds $$c_+ := 2 \sqrt{d_+ \alpha}, \quad c_- := 2 \sqrt{d_- \alpha},$$ which correspond respectively to the speeds of the homogeneous Fisher-KPP equation $$\partial_t u = d \partial_x^2 u + \alpha u (1-u),$$ with either $d= d_+$ or $d=d_-$. In other words, these are the speeds respectively in the `favorable' environment where the motility function $\chi$ is at its maximal value, and in the `unfavorable' environment where $\chi$ is at its minimal value.. The large time behavior of solutions of \eqref{eq:main} will largely depend on how the shifting speed $c_{het}$ of the heterogeneity compares with the values of $c_-$ and $c_+$. \subsection{Case \eqref{ass:chi_dec}} We first consider the situation when the diffusivity is `high' (resp. `low') behind (resp. beyond) the moving frame with speed $c_{het}$. In this case, we will prove the following result: \begin{thm}\label{theo:chi_dec} Assume that $\chi$ satisfies case \eqref{ass:chi_dec}. Consider a compactly supported and nontrivial initial datum $u_0$ such that $0 \leq u_0 \leq 1$. Then the solution of \eqref{eq:main} spreads to the right with some positive speed $c^*_u$ in the sense that $$\forall 0 < c < c^*_u, \quad \limsup_{t \to +\infty} \ \sup_{0 \leq x \leq ct} |1 - u(t,x) | =0,$$ $$\forall c > c^*_u, \quad \limsup_{t \to +\infty} \ \sup_{ x \geq ct} u(t,x) =0.$$ Moreover, we have either: $$c^*_u = c_- \quad \mbox{ if } \ \ c_{het}<c_-,$$ or $$c^*_u = c_{het} \quad \mbox{ if } \ \ c_- \leq c_{het} \leq c_+,$$ or $$c^*_u = c_+ \quad \mbox{ if } \ \ c_+ < c_{het}.$$ \end{thm} It is indeed natural that the spreading speed $c^*_u$ (if it exists) should be less than both~$c_+$ (which is the speed when diffusivity is maximal) and the maximum of~$c_{het}$ and $c_-$ (since the solution may not spread faster than $c_-$ in the part where diffusivity is minimal beyond $x \approx c_{het} t$). This theorem states that these intuitive upper bounds give precisely the spreading speed. We refer to Figure~\ref{fig:Cases} (a) for a numerical illustration. \begin{figure}[!t] \centering \subfigure[Case \eqref{ass:chi_dec}.]{\includegraphics[width=0.41\textwidth]{SpeedChiDec.pdf}} \hspace{1cm} \subfigure[Case \eqref{ass:chi_inc}.]{\includegraphics[width=0.49\textwidth]{SpeedChiInc.pdf}} \caption{Numerically computed spreading speed $c_u^*$ (pink circles) as a function of $c_{het}$ for Case \eqref{ass:chi_dec} (left) and Case \eqref{ass:chi_inc} (right). The purple plain line is the theoretical spreading speed provided by Theorem~\ref{theo:chi_dec} and Theorem~\ref{theo:chi_inc}. In both cases parameters are fixed with $\alpha =1$, $d_+=1$ and $d_-=1/4$, such that the corresponding linear speeds are $c_+=2$ and $c_-=1$. The function $\chi$ was set to $\chi(x)=\frac{d_+ e^{-\lambda x} + d_-}{1+e^{-\lambda x}}$ in Case \eqref{ass:chi_dec} and to $\chi(x)=\frac{d_- e^{-\lambda x} + d_+}{1+e^{-\lambda x}}$ in Case \eqref{ass:chi_inc} with $\lambda=2$.} \label{fig:Cases} \end{figure} We also note that when $c_{het}\in[c_-,c_+]$, the selected spreading speed $c_u^*$ is precisely the speed $c_{het}$ of the heterogeneity and the invasion process for the $u$ component is locked to the heterogeneity; see also \cite{fh19}. We expect that in that case, the dynamics is dictated by traveling wave solutions~$U$ of \begin{equation} 0=\chi(x) U''(x)+c_{het} U'(x)+\alpha U(x)(1-U(x)),\quad x\in\R, \label{TWeq} \end{equation} that satisfy the conditions \begin{equation} U(-\infty)=1, \quad U(+\infty)=0, \quad \text{ with } \quad 0<U<1. \label{TWlim} \end{equation} In order to state our second main result, we need to further assume the following assumption \begin{equation} \left|\chi(x)-d_{\pm}\right| = \mathcal{O}\left(e^{-\nu|x|}\right), \quad \left|\chi'(x)\right| = \mathcal{O}\left(e^{-\nu|x|}\right), \quad \text{ as } x\rightarrow\pm\infty, \label{exp_decay} \end{equation} for some $\nu>0$. Although technical, the above assumption is natural if we come back to the reaction-diffusion system \eqref{eq:sys0} for which the traveling front solutions $v(t,x)=V(x-ct)$ for $c\geq 2\sqrt{\beta}$ are known to converge at an exponential rate towards their asymptotic limit states. \begin{thm}\label{thmTF} Assume that $\chi$ satisfies case \eqref{ass:chi_dec} and that \eqref{exp_decay} is verified. For each $c_{het}\in(c_-,c_+)$, there exists a unique strictly monotone traveling wave solution~$U$ of \eqref{TWeq}-\eqref{TWlim} with strong exponential decay at $+\infty$: \begin{equation*} U (x) \underset{x \rightarrow +\infty}{\sim} \gamma_s e^{-\lambda_s x}, \quad \lambda_s:=\frac{c_{het}+\sqrt{c_{het}^2-c_-^2}}{2d_-}, \end{equation*} for some $\gamma_s>0$. For $c_{het}\in[0,c_-)$ or $c_{het}>c_+$ no such traveling wave can exist. \end{thm} We conjecture that $u(t,x)$ the solution of \eqref{eq:main} converges to the traveling wave~$U$ as $t \to +\infty$ in the moving frame with speed~$c_{het}$, but we do not address this issue here. \subsection{Case \eqref{ass:chi_inc}}\label{sec:case_ass_chi_inc} The other situation turns out to be slightly more intricate. Our main result writes as follows: \begin{thm}\label{theo:chi_inc} Assume that $\chi$ satisfies case \eqref{ass:chi_inc} and that \eqref{exp_decay} is verified. Consider a compactly supported and nontrivial initial datum $u_0$ such that $0 \leq u_0 \leq 1$. Then the solution of \eqref{eq:main} spreads to the right with some speed $c^*_u$ in the sense that $$\forall 0 < c < c^*_u, \quad \limsup_{t \to +\infty} \ \sup_{0 \leq x \leq ct} |1 - u(t,x) | =0,$$ $$\forall c > c^*_u, \quad \limsup_{t \to +\infty} \ \sup_{ x \geq ct} u(t,x) =0.$$ Moreover, we have $$c^*_u = c_+ \quad \mbox{ if } \ \ c_{het} < c_+ ,$$ while $$c^*_u =\frac{c_{het}}{2}\left(1 - \sqrt{1-\frac{d_-}{d_+}}\right)+\frac{c_-^2}{2 c_{het} \left(1 - \sqrt{1-\frac{d_-}{d_+}}\right)} \in (c_-, c_+] \quad \mbox{ if } \ \ c_+ \leq c_{het}< c_{int},$$ and $$c^*_u = c_- \quad \mbox{ if } \ \ c_{int} < c_{het} .$$ Here $$c_{int} :=c_+ \left( \sqrt{\frac{d_+}{d_-}} + \sqrt{ \frac{d_+}{d_-} - 1 } \right).$$ \end{thm} Again we find several subcases depending on the value of $c_{het}$. When $c_+ > c_{het}$, then individuals move fast enough to keep up with the favorable zone beyond the front of the heterogeneity, so that propagation reaches it full speed $c_+$. In particular, the population spreads as if there was no heterogeneity. The case when $c_+ < c_{het}$ is less intuitive. Because the solution cannot spread faster than $c_+$ and therefore it vanishes in the `favorable zone' as times goes to infinity, one may have expected that the solution behaves as in the equation with lower diffusivity $d_-$ and thus spreads with speed $c_-$. According to Theorem~\ref{theo:chi_inc}, it turns out that this intuition is true if $c_{het}$ is large enough. Yet there exists some intermediate range where spreading actually occurs with speed $c_u^*$ which is strictly larger than $c_-$. This means that the far away `favorable' zone still plays a role in the propagation, which can be related to the phenomena of accelerated fronts or nonlocal pulling \cite{GL19,HS14}. We refer to Figure~\ref{fig:Cases} (b) for a numerical illustration. This observation is especially striking when $d_- $ is small. Indeed, let us take the formal limit $d_- = 0$ in Theorem~\ref{theo:chi_inc}. Then $c_{int}= c_+ \left( \sqrt{\frac{d_+}{d_-}} + \sqrt{ \frac{d_+}{d_-} - 1 } \right) \to +\infty$ and it can also be checked that $c_u^* \to \frac{4 d_+ \alpha}{c_{het}} >0 $ for any $c_{het} >c_+$ as $d_- \to 0$. This strikingly suggests that, even if diffusivity vanishes around any positive level set of the solution, spreading still occurs with a positive speed.\medskip Before we proceed to the proofs, let us give some formal computation to explain the appearance of an anomalous speed. Assume that $c_+ < c_{het}$, and that $$\chi (z) := \left\{ \begin{array}{l} d_- \mbox{ if } z \leq 0, \vspace{3pt}\\ d_+ \mbox{ if } z > 0. \end{array} \right. $$ Notice that such $\chi$ is no longer smooth but it allows us to perform an explicit computation. Since the reaction term $\alpha u (1-u)$ is concave, it is of the Fisher-KPP type and it is reasonable to expect that the spreading speed is dictated by the linearized equation $$\partial_t u = \chi (x-c_{het} t) \partial_x^2 u + \alpha u .$$ By analogy with the usual Fisher-KPP equation, it is also natural to look for an exponential ansatz. However, if one tries an ansatz of the type $$e^{-\lambda (x - ct)},$$ one immediately sees that both resulting dispersion equations (for $x \leq c_{het} t$ and $x > c_{het} t$) cannot be satisfied simultaneously. Therefore, we instead look for an ansatz of the type $$\left\{ \begin{array}{l} e^{-\lambda (x-ct)} \mbox{ if } x \leq c_{het} t,\vspace{3pt}\\ e^{-\lambda (c_{het} -c) t} \times e^{-\mu (x - c_{het} t)} \mbox{ if } x \geq c_{het} t , \end{array} \right. $$ where $\lambda, \mu >0$ and $c \in \R$. Note that the resulting function is continuous. Plugging this in the linearized equation, we find that $$d_- \lambda^2 - c\lambda + \alpha = 0 \quad \mbox{and} \quad d_+ \mu^2 - c_{het} \mu + \lambda (c_{het} - c) + \alpha = 0.$$ The resulting conditions for finding such an ansatz are \begin{equation}\label{eq:anomalous_condition0} c \geq c_-, \quad g (c) \geq 0, \end{equation} where $$g(c) := c_{het}^2 - 4 d_+ \left[ \alpha + \frac{c - \sqrt{c^2 - 4 d_- \alpha}}{2 d_-} (c_{het} - c) \right] .$$ On the one hand, it is easy to check that both conditions are satisfied when $c \geq c_{het}$ (recall that $c_{het} >c_+$ here). On the other hand, it is straightforward to compute that $$\forall c \in [c_- , c_{het}], \quad g ' (c) > 0.$$ In particular, if $g (c_- ) \geq 0$, then we conclude that there is an exponential ansatz for any $c \geq c_- $. This occurs when $$c_{het}^2 - 4 d_+ \sqrt{\frac{\alpha}{d_-}} c_{het} + 4 d_+ \alpha \geq 0,$$ which is equivalent to $$c_{het} \geq c_+ \left( \sqrt{\frac{d_+}{d_-}} + \sqrt{ \frac{d_+}{d_-} - 1 } \right)=c_{int}.$$ By analogy with the homogeneous case, it is reasonable to expect that under the previous condition the solution spreads with speed~$c_-$ which is precisely what is stated in Theorem~\ref{theo:chi_inc}. It remains to consider the case when $g (c_-) < 0$. Then we claim that $$g (c_+ ) >0.$$ To check this, first compute \begin{equation}\label{cla:g} g(c_+) = c_{het}^2 - 4 d_+ \left[ \alpha + \frac{c_+ - \sqrt{c_+^2 - 4 d_- \alpha }}{2 d_-} (c_{het} - c_+) \right]. \end{equation} Notice that $g (c_+ ) = 0$ when $c_{het} = 0$. Hence it is enough to show that the derivative with respect to $c_{het}$ is positive, which is indeed the case as \begin{eqnarray*} 2 c_{het} - 2 \frac{d_+}{d_-} \left[ c_+ - \sqrt{c_+^2 - 4 d_- \alpha } \right] & \geq & 2 c_+ - 2 \frac{d_+}{d_-} \left[ c_+ - \sqrt{c_+^2 - 4 d_- \alpha } \right] \\ & \geq & 4 \sqrt{d_+ \alpha} \left[ 1 - \frac{d_+}{d_-} + \frac{d_+}{d_-} \sqrt{1 - \frac{d_-}{d_+}} \right] \\ & \geq & 4 \sqrt{d_+ \alpha} \left[ 1 - \frac{d_-}{2 d_+} \right] \\ & > & 0. \end{eqnarray*} Claim~\eqref{cla:g} is proved and it follows that $g^{-1} (0) \in (c_- , c_+)$ (here $g$ is understood as a function on the interval $[c^-, c^+]$ where it is invertible), and that an exponential ansatz exists if and only $c \geq g^{-1} (0)$. Furthermore, upon denoting $\lambda_\star := \alpha - \frac{c_{het}^2}{4d_+}<0$ (as $c_+<c_{het}$) and letting $$c= c_{het} - \frac{1}{\zeta}, $$ one may check that $g(c) = 0$ is equivalent to $$2 d_- \lambda_\star \zeta^2 + c_{het} \zeta - 1 = \sqrt{ (c_{het} \zeta - 1)^2 - 4 d_- \alpha \zeta^2 } .$$ The part inside the square root is positive, so that one eventually reaches $$d_- \lambda_\star \zeta^2 + c_{het} \zeta - 1 + \frac{\alpha}{\lambda_\star} = 0.$$ Since $\zeta$ must be positive in order for $c$ to belong to the interval $(c_-, c_+)$, we conclude that $$g^{-1} (0) = c_{het}-\frac{2d_-\lambda_\star}{-c_{het}+\sqrt{c_{het}^2-4d_-(\alpha-\lambda_\star)}},$$ and we recover the formula for the spreading speed in Theorem~\ref{theo:chi_inc} by using the expression for $\lambda_\star$. Building upon the argument above, we can further motivate the emergence of the accelerated front with speed $c_u^*$ as a matching condition in the following sense. We attempt to build a solution of~(\ref{eq:main}) which resembles a traveling front of the Fisher-KPP equation $0=d_- U''+cU'+\alpha U(1-U)$ on the left concatenated on the right with a solution of the linearized equation near zero in a frame moving with the heterogeneity. If $c>c_-$ then there exists a family of traveling fronts traveling with speed $c$ and whose profile resembles $e^{-\lambda(c)(x-ct)}$ as $x-ct \to +\infty$. In a frame of reference moving with speed $c_{het}$ this front can be viewed as forming an effective boundary condition for the PDE (\ref{eq:main}) linearized near zero. Rescaling by $u(t,x):=e^{\eta(c) t}v(t,x)$ this PDE satisfies the boundary value problem \begin{equation} v_t=\chi(x) v_{xx}+c_{het}v_x+(\alpha-\eta(c)) v, \quad v_x(-L)=-\lambda(c)v(-L), \quad v_x(L)=-\gamma(c)v(L) \label{eq:veqntry} \end{equation} for some $L$ sufficiently large and $\eta(c)=-\lambda(c) (c_{het}-c)$. For generic separated boundary conditions, it is known that the point spectrum of the linear operator appearing on the right hand side of (\ref{eq:veqntry}) will accumulate on the absolute spectrum in the limit as $L\to\infty$; see \cite{sandstede00,kapitula}. The absolute spectrum in this case is \[ \Sigma_{abs}=\left\{ \lambda \leq \alpha-\eta(c) -\frac{c_{het}^2}{4d_+} \right\}. \] Thus, if $c$ is selected so that $\eta(c)<\alpha -\frac{c_{het}^2}{4d_+}$ then one would expect that the constructed solution would be pointwise unstable due to unstable point spectrum of (\ref{eq:veqntry}). Conversely, if $\eta(c)>\alpha-\frac{c_{het}^2}{4d_+}$ then solutions of (\ref{eq:veqntry}) will decay pointwise and matching with the front will fail. Therefore, we select $c_u^*$ so that \[ \eta(c_u^*)=\alpha-\frac{c_{het}^2}{4d_+}=\lambda_\star, \] which upon inspection is equivalent to the condition that $g(c_u^*)=0$. \paragraph{Outline of the paper.} In Section~\ref{sec:gen}, we provide general bounds on the spreading speed, and prove that if it exists it should be bounded respectively from above and below by $c_+$ and $c_-$. Sections~\ref{sec:dec} and~\ref{sec:inc} are dedicated to the proofs of our main theorems on spreading speeds in cases \eqref{ass:chi_dec} and \eqref{ass:chi_inc} respectively. For each case, we construct sub and/or super-solutions to bound adequately the spreading speed. Finally, in the last Section~\ref{sec:TW}, we prove the existence and uniqueness of traveling front solutions with strong exponential decay at $+\infty$ in case \eqref{ass:chi_dec} and for each $c_{het}\in(c_-,c_+)$. \section{General bounds on the spreading speed}\label{sec:gen} In this section, we aim at confirming rigorously the natural intuition that the spreading speed should always be bounded from respectively above and below by $c_+ = 2 \sqrt{d_+ \alpha}$ and $c_- = 2 \sqrt{d_- \alpha}$. We will do this by constructing some super and sub-solutions which are valid in all the cases considered in our main theorems. Actually, our bounds on the spreading speed remain true for more general form of diffusivity and therefore our results here can be of independent interest. Throughout this section, we consider \begin{equation} \partial_t u = \chi (t,x) \partial_{x}^2 u + \alpha u (1-u), \label{kpp} \end{equation} with $\alpha>0$ and some smooth function $\chi$ that only satisfies $$ d_- \leq \chi(t,x) \leq d_+ \ \mbox{ for all } \ t\geq0 \text{ and } \ x\in\R ,$$ where $$0< d_- < d_+.$$ We will prove the following result. \begin{prop}\label{prop:gen} Consider a compactly supported and nontrivial initial datum $u_0$ such that $0 \leq u_0 \leq 1$. Then the solution $u$ of \eqref{kpp} satisfies that $$\forall \, 0 < c < c_-, \quad \limsup_{t \to +\infty} \ \sup_{0 \leq x \leq ct} |1 - u(t,x) | =0,$$ $$\forall \, c > c_+, \quad \limsup_{t \to +\infty} \ \sup_{ x \geq ct} u(t,x) =0.$$ \end{prop} In particular, the rightward spreading speed $c_u^*$ (if it exists) must satisfy $c_-\leq c_u^*\leq c_+$. We refer to \cite{BN12,BN21} for other general results on monostable equations with spatio-temporal heterogeneities. \subsection{A general super-solution} We start the proof of Proposition~\ref{prop:gen} with the construction of a super-solution. \begin{lem}\label{gensuper} For any $C >0$, the function $w(t,x)=\min\left\{1,C e^{-\frac{c_+}{2d_+}(x-c_+t)}\right\}$ is a super-solution of~\eqref{kpp}. \end{lem} \begin{proof} The proof is a simple calculation. Let \begin{equation*} N(v):=\partial_t v- \chi (t,x) \partial_{x}^2 v - \alpha v(1-v). \end{equation*} We compute $N(1)=0$ and, for any $C>0$, \begin{align*} N(C e^{-\lambda(x-ct)})&= C \left(\lambda c-d_+ \lambda^2-\alpha\right)e^{-\lambda(x-ct)}+ C \lambda^2(d_+ -\chi(t,x))e^{-\lambda(x-ct)}+\alpha C^2 e^{-2\lambda(x-ct)}\\ &> C \left(\lambda c-d_+ \lambda^2-\alpha\right)e^{-\lambda(x-ct)}, \end{align*} as $d_+ -\chi(t,x) \geq 0$ for all $x\in\R$ and $t\geq 0$. Then letting $\lambda=\frac{c_+}{2d_+}$ and $c=c_+$ we get that $w(t,x)$ is a super-solution. \end{proof} Now, for any $0 \leq u_0 \leq 1$ a compactly supported and nontrival initial datum, one can find $C>0$ large enough so that $u_0 \leq \min \{ 1, C e^{-\frac{c_+}{2d_+} x } \}$. A consequence of the above lemma and the comparison principle is that we have \begin{equation*} \forall \, c > c_+, \quad \limsup_{t \to +\infty} \ \sup_{ x \geq ct} u(t,x) =0, \end{equation*} for $u(t,x)$ solution of \eqref{kpp} from a compactly supported, nontrivial initial datum $0\leq u_0 \leq 1$. This proves the first assertion of Proposition~\ref{prop:gen}. \subsection{A general sub-solution} We now construct a sub-solution and conclude the proof of Proposition~\ref{prop:gen}. For each $c\in(0,c_-)$, there exist $\delta>0$ small enough and $\eta>0$ such that \begin{equation*} 0<c<2\sqrt{d_-(\alpha-\delta)}<c_-<2\sqrt{d_+(\alpha-\delta)}<c_+, \end{equation*} and \begin{equation*} (\alpha-\delta)u<\alpha u(1-u), \quad \forall u \in(0,\eta). \end{equation*} We first set \begin{equation*} \lambda := \frac{c}{2d_-}, \quad \text{ and } \quad \beta := \frac{1}{2d_-}\sqrt{4d_-(\alpha-\delta)-c^2}>0, \end{equation*} together with \begin{equation*} \gamma := \frac{c}{2d_+}, \quad \text{ and } \quad \omega := \frac{1}{2d_+}\sqrt{4d_+(\alpha-\delta)-c^2}>0. \end{equation*} Then, the functions $\Psi_-(z):=e^{-\lambda z}\cos(\beta z)$ and $\Psi_+(z):=e^{-\gamma z}\cos(\omega z)$ are respectively solutions of \begin{equation*} d_- \Psi'' +c\Psi'+(\alpha-\delta)\Psi=0, \end{equation*} and \begin{equation*} d_+ \Psi'' +c\Psi'+(\alpha-\delta)\Psi=0. \end{equation*} We consider the intervals $\Omega_-=\left(-\frac{\pi}{2\beta},\frac{\pi}{2\beta}\right)$ and $\Omega_+=\left(-\frac{\pi}{2\omega},\frac{\pi}{2\omega}\right)$, and we note that $\Psi_\pm > 0$ on $\Omega_\pm$. We denote $z^*_\pm \in \Omega_\pm$ the unique values where $\Psi''_\pm(z^*_\pm)=0$, which are given by \begin{equation*} z^*_-=-\frac{1}{\beta}\mathrm{arctan}\left( \frac{\lambda^2-\beta^2}{2\lambda \beta}\right), \quad \text{ and } \quad z^*_+=-\frac{1}{\omega}\mathrm{arctan}\left( \frac{\gamma^2-\omega^2}{2\gamma \omega}\right). \end{equation*} \begin{figure}[!t] \centering \includegraphics[width=0.49\textwidth]{SubSolGen.pdf} \caption{Illustration of the building block of the general sub-solution \eqref{gensubsoleq} (before its scaling by~$\epsilon$) which is composed of two parts $\rho \Psi_+$ (pink curve) and $\Psi_-$ (blue curve) in the moving frame $z=x-ct$. It is of class $\mathscr{C}^2$ and compactly supported on $\left[-\frac{\pi}{2\omega}-z_+^*,\frac{\pi}{2\beta}-z_-^*\right]$.} \label{fig:GenSubSol} \end{figure} Finally, we introduce the function \begin{equation} \underline{u}_{c,\delta,\epsilon}(t,x)=\left\{ \begin{array}{lc} 0,& x-ct \leq -\frac{\pi}{2\omega}-z_+^*,\\ \epsilon \rho \Psi_+(x-ct+z_+^*), & -\frac{\pi}{2\omega}-z_+^*<x-ct\leq 0,\\ \epsilon \Psi_-(x-ct+z_-^*), & 0<x-ct<\frac{\pi}{2\beta}-z_-^*,\\ 0,& x-ct\geq \frac{\pi}{2\beta}-z_-^*. \end{array} \right. \label{gensubsoleq} \end{equation} Here, $\rho>0$ is chosen so as to ensure continuity at $x-ct=0$, that is \begin{equation*} \rho:=\frac{\Psi_-(z_-^*)}{\Psi_+(z_+^*)}. \end{equation*} We fix $\epsilon>0$ small enough such that \begin{equation*} 0 \leq \underline{u}_{c,\delta,\epsilon}(t,x) < \eta, \quad \forall t\geq0, \, x\in\R. \end{equation*} We now check that $\underline{u}_{c,\delta,\epsilon}(t,x)$ is a generalized sub-solution. \begin{itemize} \item For $z=x-ct\in\left(-\frac{\pi}{2\omega}-z_+^*,0\right] $, one has $0<\epsilon \rho \Psi_+(z+z_+^*)< \eta$, and so \begin{equation*} N(\epsilon \rho \Psi_+(z+z_+^*))<(d_+-\chi(t,x))\epsilon \rho \Psi_+''(z+z_+^*)\leq 0, \end{equation*} as $\Psi_+''(z+z_+^*)\leq 0$ on $\left(-\frac{\pi}{2\omega}-z_+^*,0\right]$ and $\chi(t,x)\leq d_+$. \item For $z=x-ct\in\left(0,\frac{\pi}{2\beta}-z_-^*\right)$, one has $0<\epsilon \Psi_-(z+z_-^*)< \eta$, and so \begin{equation*} N(\epsilon \Psi_-(z+z_-^*))<(d_--\chi(t,x))\epsilon \rho \Psi_-''(z+z_-^*)\leq 0, \end{equation*} as $\Psi_-''(z+z_-^*)\geq 0$ on $\left(0,\frac{\pi}{2\beta}-z_-^*\right)$ and $d_-\leq \chi(t,x)$. \item At $z=x-ct=0$, we already have continuity since $\rho\Psi_+(z_+^*)=\Psi_-(z_-^*)$, and we also have that $\Psi_+''(z_+^*)=\Psi_-''(z_-^*)=0$ by definition of $z_\pm^*$. Now using the equations satisfied by $\Psi_\pm$ evaluated at $z_\pm^*$, we also obtain \begin{equation*} c\left( \Psi_-'(z_-^*)-\rho\Psi_+'(z_+^*)\right)=-(\alpha -\delta)\left( \Psi_-(z_-^*)-\rho\Psi_+(z_+^*)\right)-d_-\Psi_-''(z_-^*)+d_+\rho\Psi_+''(z_+^*)=0. \end{equation*} As a consequence, we have $\Psi_-'(z_-^*)=\rho\Psi_+'(z_+^*)$ and the sub-solution is of class $\mathscr{C}^2$ for $x-ct\in \left(-\frac{\pi}{2\omega}-z_+^*,\frac{\pi}{2\beta}-z_-^* \right)$. \end{itemize} We have now reached the next result. \begin{lem}\label{gensub} Let $c\in(0,c_-)$. Then there exists $\delta_0(c)>0$ such that for each $0<\delta<\delta_0(c)$ one can find $\epsilon_0(c,\delta)>0$ such that for all $0<\epsilon<\epsilon_0(c,\delta)$ the function \begin{equation*} \underline{u}_{c,\delta,\epsilon}(t,x)=\left\{ \begin{array}{lc} 0,& x-ct \leq -\frac{\pi}{2\omega}-z_+^*,\\ \epsilon \rho \Psi_+(x-ct+z_+^*), & -\frac{\pi}{2\omega}-z_+^*<x-ct\leq 0,\\ \epsilon \Psi_-(x-ct+z_-^*), & 0<x-ct<\frac{\pi}{2\beta}-z_-^*,\\ 0,& x-ct\geq \frac{\pi}{2\beta}-z_-^*, \end{array} \right. \end{equation*} is a generalized sub-solution where $\Psi_\pm$, $z_\pm^*$ and $\rho$ are defined as above. We refer to Figure~\ref{fig:GenSubSol} for an illustration. \end{lem} With the above lemma, we can now conclude the proof of Proposition~\ref{prop:gen}. Let $u$ be the solution of the Cauchy problem starting from a compactly supported initial condition $0\leq u_0 \leq 1$, and fix $0 < c < c' < c_-$. By the strong maximum principle, it satisfies $u(1,\cdot)>0$ and, upon diminishing further $\epsilon$ in the previous lemma, one can ensure that \begin{equation*} \underline{u}_{c',\delta,\epsilon}(1,\cdot) \leq u(1,\cdot) . \end{equation*} By the comparison principle, we infer that $$\inf_{t >1 } u(t,c' t) \geq \nu >0,$$ for some $\nu \in (0,1)$ which depends on~$c'$. By a straightforward symmetry argument, one may check that $\underline{u}_{c',\delta,\epsilon} (t,-x)$ is also a sub-solution of \eqref{kpp} and therefore we also get that $$\inf_{ t > 1 } u(t,-c' t) \geq \nu >0.$$ Next, up to reducing $\nu$ we can also assume that $$u(1,x) \geq \nu,$$ for all $x \in [-c',c']$. Therefore, applying a comparison principle on $\{ (t,x) \, | \ t \geq 1 \mbox{ and } x \in [-c' t,c't]\}$, with the constant $\nu$ as a sub-solution, we infer that actually $$\liminf_{ t\to +\infty} \inf_{-c' t \leq x \leq c' t} u (t,x) \geq \nu.$$ Now we prove the second assertion of Proposition~\ref{prop:gen}. We proceed by contradiction and, since $u \leq 1$, we assume that there exist sequences $t_n \to +\infty$ and $x_n \in [0 , ct_n]$ such that $$\limsup_{n \to +\infty} u(t_n, x_n) < 1.$$ Up to extraction of a subsequence and by standard parabolic estimates, we have that the function $u(t_n+ t, x_n +x)$ converges as $n \to +\infty$ to an entire in time solution $u_\infty$ of $$\partial_t u_\infty = \widetilde{\chi} (t,x) \partial_x^2 u_\infty + \alpha u_\infty (1 - u_\infty),$$ for some $\widetilde{\chi}$ which also satisfies $d_-\leq \widetilde{\chi} \leq d_+$. Moreover, it follows from the above where $c' >c$ that $u_\infty (t,x) \geq \nu>0$ for all $(t,x) \in \R^2$. By a straightforward comparison with the ODE and regardless of the actual function $\widetilde{\chi}$, the function~$u_\infty$ must be identical to 1, which is a contradiction with the fact that $u_\infty( 0,0) < 1$ by construction. This proves the last statement of Proposition~\ref{prop:gen}. \section{Construction of super and sub-solutions for case \eqref{ass:chi_dec} and proof of Theorem~\ref{theo:chi_dec}}\label{sec:dec} In this section, we construct super and sub-solutions in case where $\chi$ satisfies assumption \eqref{ass:chi_dec}. We proceed step by step and consider each case depicted in Theorem~\ref{theo:chi_dec}. \subsection{Subcase $c_{het}<c_-$} When $c_{het}<c_-$, we need to prove that the rightward spreading speed is $c_u^*=c_-$. From Proposition~\ref{prop:gen}, we already have proved that $$\forall 0 < c <c_-, \quad \limsup_{t \to +\infty} \sup_{0 \leq x \leq ct} |1 - u (t,x)| = 0,$$ and thus it remains to provide a super-solution in this case. We let $c>c_-$. Then, one can find $\epsilon>0$ small enough such that we have $c_-=2 \sqrt{d_- \alpha}<2 \sqrt{(d_-+\epsilon) \alpha}< \min(c,c_+)$. Next we fix $\tau_\epsilon>0$ to be large enough such that for any $\tau \geq \tau_\epsilon$, we have \begin{equation*} d_-\leq\chi(\tau)\leq d_-+\epsilon. \end{equation*} \begin{lem} Let $c_\epsilon:=2 \sqrt{(d_-+\epsilon) \alpha}$. For all $\tau \geq \tau_\epsilon$, the following function \begin{equation*} u_\tau(t,x)=\min\left\{ 1, e^{-\frac{c_\epsilon}{2\chi(\tau)}(x-c_\epsilon t-\tau)}\right\}, \quad t\geq0, \quad x\in\R, \end{equation*} is a super-solution for \eqref{eq:main}. \end{lem} \begin{proof} We recall the functional $N$ defined as \begin{equation*} N(u)=\partial_t u-\chi(x-c_{het}t)\partial_x^2u-\alpha u (1-u). \end{equation*} We readily have that $N(1)=0$ and that \begin{equation*} N\left(e^{-\lambda(x-c_\epsilon t-\tau)}\right)\geq (\lambda c_\epsilon-\chi(x-c_{het}t)\lambda^2-\alpha)e^{-\lambda(x-c_\epsilon t-\tau)}, \end{equation*} for all $\lambda>0$. Next, we note that for each $x\geq c_\epsilon t+\tau$, we have \begin{equation*} x-c_{het}t\geq \underbrace{(c_\epsilon-c_{het})}_{>0}t+\tau \geq \tau. \end{equation*} As a consequence, for all $x\geq c_\epsilon t+\tau$, using the monotonicity of $\chi$, we get \begin{equation*} N\left(e^{-\lambda(x-c_\epsilon t-\tau)}\right)\geq (\lambda c_\epsilon-\chi(\tau)\lambda^2-\alpha)e^{-\lambda(x-c_\epsilon t-\tau)}. \end{equation*} Now evaluating at $\lambda=\frac{c_\epsilon}{2\chi(\tau)}$, we obtain \begin{equation*} N\left(e^{-\frac{c_\epsilon}{2\chi(\tau)}(x-c_\epsilon t-\tau)}\right)\geq \frac{c_\epsilon^2-4\chi(\tau)\alpha}{4\chi(\tau)}e^{-\frac{c_\epsilon}{2\chi(\tau)}(x-c_\epsilon t-\tau)}, \quad x\geq c_\epsilon t+\tau. \end{equation*} Finally, as $\tau \geq \tau_\epsilon$, we get \begin{equation*} c_\epsilon^2-4\chi(\tau)\alpha \geq c_\epsilon^2-4(d_-+\epsilon)\alpha = 0, \end{equation*} which concludes the proof. \end{proof} As a consequence of the above lemma and the comparison principle, we have that \begin{equation*} \forall c > c_->c_{het}, \quad \limsup_{t \to +\infty} \ \sup_{ x \geq ct} u(t,x) =0, \end{equation*} for $u(t,x)$ solution of \eqref{eq:main} from a compactly supported, nontrivial initial datum $0\leq u_0 \leq 1$. And thus, the rightward spreading speed of \eqref{eq:main} is less than or equal to $ c_-$ when $c_{het}<c_-$ which concludes the proof of Theorem~\ref{theo:chi_dec} in this case. \subsection{Subcase $c_+<c_{het}$} When $c_+<c_{het}$, we need to prove that the rightward spreading speed is $c_u^*=c_+$. From Proposition~\ref{prop:gen}, we already have that the spreading speed is less than or equal to $ c_+$, in the sense that $$\forall c > c_+, \quad \limsup_{t \to +\infty} \sup_{x \geq ct } u(t,x)= 0,$$ and thus it remains to provide a sub-solution in this case. As a matter of fact this sub-solution is valid in all subcases of~\eqref{ass:chi_dec}, and hereafter we simply let $0<c< \min\left(c_+,c_{het}\right)$. Then, one can find $\epsilon>0$ such that $c<2\sqrt{d_+(\alpha-2\epsilon)}<c_+$ together with $\eta_\epsilon>0$ such that \begin{equation*} (\alpha-\epsilon)u\leq \alpha u(1-u), \quad u\in[0,\eta_\epsilon]. \end{equation*} We introduce two positive real numbers \begin{equation*} \beta_+(\epsilon,c):= \frac{\sqrt{4d_+(\alpha-\epsilon)-c^2}}{2d_+}>0, \text{ and } \beta_+(c):=\beta_+(0,c)= \frac{\sqrt{4d_+\alpha-c^2}}{2d_+}>0, \end{equation*} together with the following family of functions \begin{equation*} u_{\tau,\epsilon}^c(t,x):=\left\{ \begin{array}{lc} \delta_\epsilon \left[ e^{-\frac{c}{2d_+}(x-ct+\tau)}\cos(\beta_+(\epsilon,c)(x-ct+\tau)) +\epsilon \right], & x-ct+\tau \in\Omega_\epsilon(c), \\ 0, & \text{ otherwise,} \end{array} \right. \end{equation*} with $\Omega_\epsilon(c)=\left[-\frac{\pi}{2\beta_+(\epsilon,c)}-z^-_\epsilon(c),\frac{\pi}{2\beta_+(\epsilon,c)}+z^+_\epsilon(c) \right]$. Here $\delta_\epsilon>0$ is fixed such that $0\leq u_{\tau,\epsilon}^c(t,x)\leq \eta_\epsilon$ for all $x-ct+\tau \in\Omega_\epsilon(c)$ and can be chosen independent of $c< 2 \sqrt{d_+ (\alpha - 2 \epsilon)}$. Furthermore, $z^\pm_\epsilon(c)$ are defined through \begin{equation*} e^{\mp \frac{c}{2d_+}\left( \frac{\pi}{2\beta_+(\epsilon,c)}+z^\pm_\epsilon(c)\right)}\sin(\beta_+(\epsilon,c)z^\pm_\epsilon(c))=\epsilon, \end{equation*} with asymptotics \begin{equation*} z^\pm_\epsilon(c)=\frac{e^{\mp \dfrac{c\pi}{4d_+\beta_+(c)}}}{\beta_+(c)} \epsilon+o(\epsilon), \quad \text{ as } \epsilon \rightarrow0. \end{equation*} We first remark that when $x-ct+\tau \in\Omega_\epsilon(c)$, we have \begin{equation*} x-c_{het}t \in \left[-\frac{\pi}{2\beta_+(\epsilon,c)}-z^-_\epsilon(c)+(c-c_{het})t-\tau,\frac{\pi}{2\beta_+(\epsilon,c)}+z^+_\epsilon(c)+(c-c_{het})t-\tau \right]. \end{equation*} Next, as $\chi(-\infty)=d_+$, there exists $A>0$ such that for all $\xi\leq -A$, we get \begin{equation*} |\chi(\xi)-d_+|\leq \epsilon^2. \end{equation*} As a consequence, for all $$\tau>\tau_\epsilon(c):=A+ \frac{\pi}{2\beta_+(\epsilon,c)}+z^+_\epsilon(c),$$ we have $x-c_{het}t\leq-A$ and \begin{equation*} \left| \left(d_+ -\chi(x-c_{het}t)\right) \partial_x^2 u_{\tau,\epsilon}^c(t,x) \right| \leq \epsilon^2 \delta_\epsilon \left(\frac{c}{2d_+}+\beta_+(\epsilon,c) \right)^2 e^{ \frac{c}{2d_+}\left( \frac{\pi}{2\beta_+(\epsilon,c)}+z^-_\epsilon(c)\right)}:=\epsilon^2 \delta_\epsilon K_\epsilon(c), \end{equation*} for all $x-ct+\tau \in\Omega_\epsilon(c)$. This implies that for all $\tau>\tau_\epsilon(c)$ \begin{align*} N(u_{\tau,\epsilon}^c(t,x)) &\leq \left(d_+ -\chi(x-c_{het}t)\right) \partial_x^2 u_{\tau,\epsilon}^c(t,x)-\delta_\epsilon \epsilon(\alpha-\epsilon)\\ & \leq \epsilon \delta_\epsilon \left[(K_\epsilon(c)+1)\epsilon -\alpha\right], \quad x-ct+\tau \in\Omega_\epsilon(c). \end{align*} Notice that $$\liminf_{\epsilon \to 0} K_\epsilon (c) >0.$$ As a consequence, we obtain the following lemma. \begin{lem}\label{lemsubcmincpchet} Let $0<c< \min\left(c_+,c_{het}\right)$. There is $\epsilon_0(c)>0$ such that for all $\epsilon\in (0,\epsilon_0(c))$, the function $u_{\tau,\epsilon}^c$ is a sub-solution for all $\tau>\tau_\epsilon(c)$. \end{lem} Now, using similar arguments as in the proof of Proposition~\ref{prop:gen} we deduce that the solutions spread at least with speed $\min\left(c_+,c_{het}\right)$, which concludes the proof of Theorem~\ref{theo:chi_dec} in the subcase when $c_+ < c_{het}$. \subsection{Subcase $c_-\leq c_{het} \leq c_+$} When $c_-\leq c_{het} \leq c_+$, our main Theorem~\ref{theo:chi_dec} asserts that the selected rightward spreading speed is precisely the speed of the heterogeneity, that is $c_u^*=c_{het}$. In that case, we cannot rely on Proposition~\ref{prop:gen} to obtain either inequality, and we need to refine our analysis. Nevertheless, we can use Lemma~\ref{lemsubcmincpchet} to obtain in this subcase that the spreading speed is larger than or equal to $c_{het}=\min\left(c_+,c_{het}\right)$, and it only remains to construct a super-solution which spreads at speed $c_{het}$. This is precisely the result of the following lemma. \begin{lem}\label{lem:subcase_c-_chet_c+} Let $c_-\leq c_{het} \leq c_+$. Then, there is $\tau_0>0$ such that for all $\tau\geq\tau_0$ the function $\overline{u}_\tau(t,x)=\min\left\{1,e^{-\sqrt{\frac{c_{het}}{2\chi(\tau)}}(x-c_{het}t-\tau)}\right\}$ is a super-solution of~\eqref{eq:main}. \end{lem} \begin{proof} As $c_- \leq c_{het}$ and $\chi(x)\rightarrow d_-$ as $x\rightarrow+\infty$, there exists $\tau_0>0$ such that for all $\tau\geq\tau_0$ one has \begin{equation*} c_{het}^2-4\alpha \chi(\tau) \geq 0. \end{equation*} Next, we have for $\tau\leq x-c_{het}t$ that $\chi (x - c_{het} t) \leq \chi (\tau)$ and \begin{equation*} N(\overline{u}_\tau(t,x))\geq \frac{c_{het}^2-4\alpha \chi(\tau)}{4\chi(\tau)}e^{-\sqrt{\frac{c_{het}}{2\chi(\tau)}}(x-c_{het}t-\tau)} \geq 0. \end{equation*} This already concludes the proof. \end{proof} \section{Construction of super and sub-solutions in case \eqref{ass:chi_inc} and proof of Theorem~\ref{theo:chi_inc}}\label{sec:inc} In this section, we construct super and sub-solutions in the case where $\chi$ satisfies assumption \eqref{ass:chi_inc}. We first treat the most difficult case when $c_{het} \in \left( c_+,c_{int} \right)$ and then explain how to deal with the remaining two cases. \subsection{Case $c_{het} \in \left[ c_+,c_{int} \right)$}\label{sec:subcase_chi_inc} Recall from the discussion in Section~\ref{sec:case_ass_chi_inc} that $$g(c) = c_{het}^2 - 4 d_+ \left[ \alpha + \frac{c - \sqrt{c^2 - 4 d_- \alpha}}{2 d_-} (c_{het} - c) \right],$$ and since $c_{het}\in \left[ c_+, c_{int} \right)$, there exists a unique $c \in (c_-, c_+ ]$ such that $g(c)=0$. For convenience, throughout Section~\ref{sec:subcase_chi_inc} we will denote it by $c_u^*$. Our goal is indeed to prove that this $c_u^*$, whose explicit formula is given in Theorem~\ref{theo:chi_inc}, is the spreading speed of the solution in that case. \subsubsection{Super-solution} According to Proposition~\ref{prop:gen}, we already know that the spreading is less than or equal to $c_+$. Thus to construct a super-solution here we only need to consider the case when $c_{het} \in (c_+,c_{int})$. Then recall that $c_u^* \in (c_- , c_+) $ is such that $g(c_u^*) =0$, and let any $c \in ( c_u^*, c_{het})$. We introduce the family of (continuous) functions \begin{equation*} u_\tau(t,x)=C \times \left\{ \begin{array}{cl} 1, & x\leq c t-\tau,\\ e^{-\lambda(x-c t+\tau)}, & ct-\tau < x < c_{het}t-\tau,\\ e^{-\lambda(c_{het}-c)t}e^{-\mu(x-c_{het}t + \tau)}, & x\geq c_{het}t-\tau, \end{array} \right. \end{equation*} where $\lambda$, $\mu$ and $\tau$ are positive and will be adjusted as follows, and $C\geq 1$ is also positive but arbitrary. \begin{itemize} \item For $x\in \left( ct-\tau , c_{het}t-\tau \right)$, we compute \begin{align*} N(C e^{-\lambda(x-ct+\tau)})&= C \left(\lambda c -\lambda^2 \chi(x-c_{het}t)-\alpha\right)e^{-\lambda(x-c t+\tau)}+ C^2 \alpha e^{-2\lambda(x-c t+\tau)}\\ & \geq C \left(\lambda c_u^* -\lambda^2 d_--\alpha\right)e^{-\lambda(x-c t+\tau)} \\ & \qquad + C\left[\lambda^2(d_- -\chi(-\tau)) +\lambda (c - c_u^*) \right] e^{-\lambda(x-c t +\tau)}, \end{align*} where we used the fact that $\chi$ is nondecreasing and $x-c_{het}t\leq -\tau$. We now select $$ \lambda = \lambda (c_u^*) ,$$ where $\lambda (c)$ denotes the smallest positive (thanks to $c > c_u^* > c_-$) solution of \begin{equation*} \lambda c -\lambda^2 d_--\alpha=0, \end{equation*} that is \begin{equation*} \lambda(c):=\frac{c-\sqrt{c^2-4d_-\alpha}}{2d_-}. \end{equation*} There exists $\tau_0>0$ such that for all $\tau\geq\tau_0$ we have \begin{equation*} \lambda(c_u^*)^2(d_--\chi(-\tau))+ \lambda(c_u^*)(c - c_u^*)>0, \end{equation*} hence $N (u_\tau (t,x) ) >0$ for $x \in (c t - \tau, c_{het} t - \tau)$. \item For $x > c_{het}t-\tau$, we have that \begin{align*} N(C e^{-\lambda(c_{het}-c)t}e^{-\mu(x-c_{het}t+\tau)})&= C\left(-\lambda (c_{het}-c_u^*)+\mu c_{het}-\alpha-d_+\mu^2\right)e^{-\lambda(c_{het}-c)t}e^{-\mu(x-c_{het}t+\tau)}\\ &~~~+ C \left[ \mu^2(d_+-\chi(x-c_{het}t)) + \lambda (c - c_u^*) \right]e^{-\lambda(c_{het}-c)t}e^{-\mu(x-c_{het}t+\tau)}\\ &~~~+C^2 \alpha e^{-2\lambda(c_{het}-c)t}e^{-2\mu(x-c_{het}t+\tau)}. \end{align*} The last two terms are nonnegative as $\chi \leq d_+$ and we finally select $\mu>0$ such that \begin{equation*} -\lambda (c_{het}-c_u^* )+\mu c_{het}-\alpha-d_+\mu^2=0, \text{ with } \lambda=\lambda(c_u^*). \end{equation*} That is, we let \begin{equation*} \mu:=\frac{c_{het}-\sqrt{g(c_u^*)}}{2d_+}=\frac{c_{het}}{2d_+}, \end{equation*} as $g(c_u^*)=0$, and we get that $N (u_\tau (t,x)) \geq 0$ for $x > c_{het} t - \tau$. We note that the above formula with $\lambda=\lambda(c_u^*)$ and $\mu=\frac{c_{het}}{2d_+}$ writes \begin{equation*} -\lambda(c_u^* )(c_{het}-c_u^*)=\alpha-\frac{c_{het}^2}{4d_+}=\lambda_\star. \end{equation*} \item It remains to prove that there is a negative jump in the derivative at $x=c_{het}t-\tau$, that is \begin{equation*} 0>\partial_x u_\tau(t,(c_{het}t-\tau)^-)>\partial_x u_\tau(t,(c_{het}t-\tau)^+). \end{equation*} This is equivalent to show that $\lambda = \lambda(c_u^*)< \mu = \frac{c_{het}}{2d_+}$, where $c_u^* $ is such that $g(c_u^*)=0$. We claim that we have \begin{equation} \lambda(c_u^*)=\frac{c_{het}}{2d_-}-\frac{1}{2d_-}\sqrt{c_{het}^2-4d_-\alpha+4d_-\lambda_\star}, \label{eqlambdac} \end{equation} where $\lambda_\star = \alpha - \frac{c_{het}^2}{4d_+}$. Let us assume that the claim \eqref{eqlambdac} holds. Then, we obtain \begin{equation*} \lambda = \lambda(c_u^*)=\frac{c_{het}}{2d_-}\left(1-\sqrt{1-\frac{d_-}{d_+}}\right)<\frac{c_{het}}{2d_-}\left(1-\left(1-\frac{d_-}{d_+}\right)\right)=\frac{c_{het}}{2d_+} = \mu, \end{equation*} since $0<1-\frac{d_-}{d_+}<1$ and we have verified the fact that there is a negative jump in the derivative at $x=c_{het}t-\tau$. Coming back to the formula \eqref{eqlambdac}, we first note that by definition of $\lambda(c_u^*)$ it solves \begin{equation*} d_- \lambda(c_u^*)^2-c_u^* \lambda(c_u^*)+\alpha =0, \end{equation*} and thus it is also solution of \begin{equation*} d_- \lambda(c_u^*)^2-c_{het}\lambda(c_u^*)+\alpha =-\lambda(c_u^*)(c_{het}-c_u^*)=\lambda_\star. \end{equation*} Finally, the fact that $\lambda(c_u^*)$ is given by \eqref{eqlambdac} (and not the other positive root) can be deduced by comparing the formula in the limiting case $c_{het}=c_+$. \end{itemize} \begin{lem}\label{lem:supsolanom} Let $c_+<c_{het}<c_{int}$. Let also $c_u^*$ be such that $g(c_u^*) =0$ and $\lambda(c):=\frac{c-\sqrt{c^2-4d_-\alpha}}{2d_-}$. Then for any $c > c_u^*$, there exists $\tau_0>0$ such that, for each $\tau\geq \tau_0$ and $C\geq 1$, \begin{equation*} u_\tau(t,x)= C \times \left\{ \begin{array}{cl} 1, & x\leq ct-\tau,\\ e^{-\lambda(c_u^*)(x-ct+\tau)}, & ct-\tau < x < c_{het}t-\tau,\\ e^{-\lambda(c_u^*)(c_{het}-c)t}e^{-\frac{c_{het}}{2d_+}(x-c_{het}t+\tau)}, & x\geq c_{het}t-\tau, \end{array} \right. \end{equation*} is a super-solution of~\eqref{eq:main}. \end{lem} We refer to Figure~\ref{fig:SupSol} for an illustration. Choosing $C$ large enough so that $u_\tau (0,\cdot) \geq u_0$, we find that $$\forall c > c_u^*, \quad \limsup_{t \to +\infty} \ \sup_{x \geq ct}u (t,x) =0.$$ In other words, the solution of \eqref{eq:main} with compactly supported initial datum spreads at speed less than or equal to $c_u^*$. \begin{figure}[!t] \centering \includegraphics[width=0.49\textwidth]{SupSol.pdf} \caption{Sketch of the super-solution $u_\tau(t,x)$ given in Lemma~\ref{lem:supsolanom} with $C=1$ which is composed of three parts: it is constant and equal to $1$ for $x\leq ct-\tau$ (gray curve), and then it is the concatenation of two exponentials (blue and pink curves) for $x\geq ct-\tau$ which are glued at $x=c_{het}t-\tau$. Note that the factor $\rho(t)$ is to ensure continuity between the two exponentials.} \label{fig:SupSol} \end{figure} \subsubsection{Sub-solution} Here we assume that $c_{het} \in [c_+,c_{int})$. We let $c\in(c_-,c_+)$ be such that $c_-<c<c_u^*=g^{-1}(0)\leq c_+$. We also let $\epsilon >0$ (to be made arbitrarily small) and $\eta>0$ be such that \begin{equation*} (\alpha-\epsilon)u <\alpha u(1-u), \quad \text{ for } u\in[0,\eta]. \end{equation*} We are going to construct a suitable sub-solution of \begin{equation}\label{eq:Msub} \partial_t u -\chi(x-c_{het}t)\partial_x^2 u -(\alpha-\epsilon)u \leq 0, \quad t \geq 0, \ x \in \R , \end{equation} moving with speed~$c$. Provided that this sub-solution is smaller than $\eta$, then clearly it is also a sub-solution of \eqref{eq:main}. For convenience, we introduce the linear operator \begin{equation*} M(u):=\partial_t u -\chi(x-c_{het}t)\partial_x^2 u -(\alpha-\epsilon)u. \end{equation*} We give a first sub-solution of~\eqref{eq:Msub}, which has compact support to the left, and that writes \begin{equation*} \underline{u}_{1,\tau}(t,x)=\max\left\{0,e^{-\lambda (x-ct+\tau)}- e^{-(\lambda+\gamma)(x-ct+\tau)}\right\}, \end{equation*} where $\lambda$, $\gamma$ and $\tau$ are positive constants which we adjust below. \begin{itemize} \item First, we select $\lambda$ as a root to the equation \begin{equation*} \lambda^2d_--\lambda c +\alpha-\epsilon =0, \quad \lambda=\frac{c-\sqrt{c^2-4d_-(\alpha-\epsilon)}}{2d_-}>0. \end{equation*} By our choice of $\lambda$ we will always have \begin{equation*} M\left(e^{-\lambda(x-c t +\tau)}\right) = \lambda^2 (d_--\chi(x-c_{het}t))e^{-\lambda(x-ct+\tau)} \leq 0 .\end{equation*} \item Next we pick $\gamma$ such that $$0< d_- \gamma< c - 2 \lambda d_- = \sqrt{c^2-4d_-(\alpha-\epsilon)}.$$ Then, on the support of $\underline{u}_{1,\tau}$ we have \begin{equation*} M(\underline{u}_{1,\tau}(t,x))=\partial_t \underline{u}_{1,\tau}(t,x) -\chi(x-c_{het}t)\partial_x^2 \underline{u}_{1,\tau}(t,x) -(\alpha-\epsilon)\underline{u}_{1,\tau}(t,x), \end{equation*} and by linearity we get \begin{equation*} M(\underline{u}_{1,\tau}(t,x))=M(e^{-\lambda (x-ct+\tau)})- M(e^{-(\lambda+\gamma)(x-ct+\tau)}) \leq - M(e^{-(\lambda+\gamma)(x-ct+\tau)}). \end{equation*} Let us also note that \begin{equation*} M\left(e^{-(\lambda+\gamma)(x-ct+\tau)}\right)=\left( (\lambda+\gamma)c-(\lambda+\gamma)^2\chi(x-c_{het}t)-(\alpha-\epsilon)\right)e^{-(\lambda+\gamma)(x-ct+\tau)}, \end{equation*} and using the fact that $\lambda>0$ is such that $\lambda^2d_--\lambda c +\alpha-\epsilon =0$, we can simplify the above expression to \begin{equation*} M\left(e^{-(\lambda+\gamma)(x-ct+\tau)}\right)=\left( \gamma \left[c-2\lambda d_- - \gamma d_-\right]+(d_--\chi(x-c_{het}t))(\lambda+\gamma)^2\right)e^{-(\lambda+\gamma)(x-ct+\tau)}. \end{equation*} From our choice of~$\gamma$, one can find $x_*\in\R$ such that for $x-c_{het}t \leq x_*$ we have \begin{equation*} \chi(x-c_{het}t)-d_-\leq \frac{\gamma \left[c-2\lambda d_- -\gamma d_- \right]}{(\lambda+\gamma)^2}. \end{equation*} As a consequence, for $x-c_{het}t \leq x_*$, we have $M(e^{-(\lambda+\gamma)(x-ct-\tau)})\geq 0$ and so \begin{equation*} M(\underline{u}_{1,\tau}(t,x)) \leq 0 \end{equation*} on $x-c_{het}t \leq x_*$. \item We now assume that $x-c_{het}t \geq x_*$. From the previous computations we obtain that \begin{equation*} M (\underline{u}_{1,\tau}(t,x))\leq (d_--\chi(x-c_{het}t))\left( \lambda^2- (\lambda+\gamma)^2 e^{-\gamma (x-ct+\tau) } \right)e^{-\lambda(x-ct+\tau)}. \end{equation*} Recall that $c < c_+ \leq c_{het}$. It follows that there exists $\tau_*>0$ such that for all $\tau\geq \tau_*$ we have \begin{equation*} \frac{\lambda^2}{ (\lambda+\gamma)^2} > e^{-\gamma (x-ct+\tau)}, \quad x-c_{het}t\geq x_* , \end{equation*} hence $M (\underline{u}_{1,\tau} (t,x)) < 0$. \end{itemize} As a conclusion, we have obtained the following lemma. \begin{lem}\label{lem:sub_pull1} Let $c\in(c_-,c_+)$ be such that $c_-<c<c_u^*=g^{-1}(0) \leq c_+$. Then there exists $\tau_* >0$ such that \begin{equation*} \underline{u}_{1,\tau}(t,x)=\max\left\{0,e^{-\lambda (x-ct+\tau)}- e^{-(\lambda+\gamma)(x-ct+\tau)}\right\}, \end{equation*} is a sub-solution of~\eqref{eq:Msub} for all $\tau\geq \tau_*$, with $$\lambda = \lambda_\epsilon(c):=\frac{c-\sqrt{c^2-4d_-(\alpha-\epsilon)}}{2d_-}>0,$$ and $0< \gamma = \gamma_\epsilon(c)<\frac{1}{d_-} \sqrt{c^2-4d_-(\alpha-\epsilon)}$ for some $\epsilon>0$ small enough. \end{lem} We now use the above sub-solution to construct another one which will be compactly supported. Up to reducing $\epsilon>0$ we assume that $\alpha-\frac{c_{het}^2}{4d_-}<\lambda_\star-\epsilon<\lambda_\star=\alpha-\frac{c_{het}^2}{4d_+}$ and denote $\varphi_{\lambda_\star-\epsilon}$ the solution to \begin{equation*} \mathcal{L}\varphi=(\lambda_\star-\epsilon)\varphi, \quad \text{ with } \quad \mathcal{L} := \chi(x) \partial_x^2 +c_{het} \partial_x +\alpha, \end{equation*} with prescribed asymptotic expansion \begin{equation*} \varphi_{\lambda_\star-\epsilon} (x) = e^{\left(-\frac{c_{het}}{2d_-}+\frac{1}{2d_-}\sqrt{c_{het}^2-4d_-\alpha+4d_-(\lambda_\star-\epsilon)}\right)x}\left(1+\mathcal{O}\left(e^{\nu' x}\right)\right), \text{ as } x\rightarrow-\infty, \end{equation*} for some $0 < \nu ' < \nu$, and with damped oscillations at $+\infty$ due to $c_{het}^2 < 4d_+ (\alpha - \lambda_\star +\varepsilon)$. We cut-off $\varphi_{\lambda_\star-\epsilon}$ to the right at the smallest point $x_\epsilon\in\R$ where it vanishes and denote \begin{equation*} \widetilde{\varphi}_{\lambda_\star-\epsilon}(x)=\left\{ \begin{array}{cl} \varphi_{\lambda_\star-\epsilon}(x), & x\leq x_\epsilon,\\ 0, & x> x_\epsilon. \end{array} \right. \end{equation*} We define, for any $\tau > - 2 x_\epsilon$, the following sub-solution \begin{equation*} \underline{u}_{2,\tau}(t,x)=\left\{ \begin{array}{cl} \underline{u}_{1,\tau}(t,x), & x-c_{het}t \leq -\tau/2,\\ c_{\tau}\underline{u}_{1,\tau}(t,c_{het}t-\tau/2)\widetilde{\varphi}_{\lambda_\star-\epsilon}(x-c_{het}t), & x-c_{het}t > -\tau/2, \end{array} \right. \end{equation*} where $c_\tau = 1/\varphi_{\lambda_\star-\epsilon}(-\tau/2)>0$. With Lemma~\ref{lem:sub_pull1} and the definition of $\widetilde{\varphi}_{\lambda_\star-\epsilon}$, we only need to verify that $\underline{u}_{2,\tau}(t,x)$ is a sub-solution of~\eqref{eq:Msub} for $-\tau/2 \leq x-c_{het}t\leq x_\epsilon$, and also that the jump of the spatial derivative at $x- c_{het} t$ has the correct sign. For $- \tau/ 2 < x - c_{het} t < x_\epsilon$, we have \begin{align*} M (\underline{u}_{2,\tau}(t,x))& = -\lambda_\epsilon(c)(c_{het}-c)c_\tau e^{-\lambda_\epsilon(c)((c_{het}-c)t+\tau/2)}\varphi_{\lambda_\star-\epsilon}(x-c_{het}t)\\ &~~~+(\lambda_\epsilon(c)+\gamma_\epsilon(c))(c_{het}-c)c_\tau e^{-(\lambda_\epsilon(c)+\gamma_\epsilon(c))((c_{het}-c)t+\tau/2)}\varphi_{\lambda_\star-\epsilon}(x-c_{het}t)\\ &~~~-c_{het}c_{\tau}\underline{u}_{1,\tau}(t,c_{het}t-\tau)\varphi_{\lambda_\star-\epsilon}'(x-c_{het}t)\\ &~~~-\chi(x-c_{het}t)c_{\tau}\underline{u}_{1,\tau}(t,c_{het}t-\tau)\varphi_{\lambda_\star-\epsilon}''(x-c_{het}t)\\ &~~~ -(\alpha-\epsilon) c_{\tau}\underline{u}_{1,\tau}(t,c_{het}t-\tau)\varphi_{\lambda_\star-\epsilon}(x-c_{het}t). \end{align*} As $\mathcal{L} \varphi = (\lambda_\star-\epsilon)\varphi$, we have $\mathcal{L} \varphi -\epsilon \varphi= (\lambda_\star-2\epsilon)\varphi$ and \begin{align*} M (\underline{u}_{2,\tau}(t,x))& =-\lambda_\epsilon(c)(c_{het}-c)c_\tau e^{-\lambda_\epsilon(c)((c_{het}-c)t+\tau/2)}\varphi_{\lambda_\star-\epsilon}(x-c_{het}t)\\ &~~~+(\lambda_\epsilon(c)+\gamma_\epsilon(c))(c_{het}-c)c_\tau e^{-(\lambda_\epsilon(c)+\gamma_\epsilon(c))((c_{het}-c)t+\tau/2)}\varphi_{\lambda_\star-\epsilon}(x-c_{het}t)\\ &~~~-(\lambda_\star-2\epsilon)c_{\tau}\underline{u}_{1,\tau}(t,c_{het}t-\tau)\varphi_{\lambda_\star-\epsilon}(x-c_{het}t):=\mathcal{R}(t,x). \end{align*} Next, we recall that \begin{equation*} \lambda_\star=-\lambda(c_u^*)(c_{het}-c_u^*), \end{equation*} such that the right-hand side of the previous inequality can be written as \begin{equation*} \mathcal{R}(t,x)=\mathcal{D}(t,x)c_\tau e^{-\lambda_\epsilon(c)((c_{het}-c)t+\tau/2)}\varphi_{\lambda_\star-\epsilon}(x-c_{het}t), \end{equation*} with \begin{equation*} \mathcal{D}(t,x)=-\lambda_\epsilon(c)(c_{het}-c)+\lambda(c_u^*)(c_{het}-c_u^*)+2\epsilon + \left[(\lambda_\epsilon(c)+\gamma_\epsilon(c))(c_{het}-c)+\lambda_\star-2\epsilon\right]e^{-\gamma_\epsilon(c)((c_{het}-c)t+\tau/2)}. \end{equation*} First, we can pick $\tau\geq \tau_\epsilon$ really large such that \begin{equation*} \left[(\lambda_\epsilon(c)+\gamma_\epsilon(c))(c_{het}-c)+\lambda_\star-2\epsilon\right]e^{-\gamma_\epsilon(c)((c_{het}-c)t+\tau/2)}<\epsilon. \end{equation*} Then we note that as $c<c_u^* \leq c_{het}$ we have $\lambda(c_u^*)<\lambda(c)$ and \begin{equation*} -\lambda (c) (c_{het}-c)+\lambda(c_u^*)(c_{het}-c_u^*)<0; \end{equation*} here we recall that $\lambda (c)$ denotes the smallest of the two solutions of $d_- \lambda^2 - c \lambda + \alpha = 0$. Similarly, $\lambda_\epsilon (c)$ denoted the smallest solution of the same equation with $\alpha$ replaced by $\alpha -\epsilon$. As a consequence, we can chose $\epsilon>0$ small enough such that \begin{equation*} -\lambda_\epsilon(c)(c_{het}-c)+\lambda(c_u^*)(c_{het}-c_u^*)+3\epsilon<0. \end{equation*} It follows that $M (\underline{u}_{2,\tau} (t,x)) \leq 0$ for $-\tau/2 < x - c_{het} t < x_\epsilon$. It remains to deal with the jump of the spatial derivative at $x - c_{het} t$, which we adress after the statement for the resulting sub-solution. \begin{figure}[!t] \centering \includegraphics[width=0.49\textwidth]{SubSolAnomBis.pdf} \caption{Sketch of the sub-solution given in Proposition~\ref{prop:Msub} which is the concatenation of the sub-solution $\underline{u}_1^\tau(x-ct)$ given in Lemma~\ref{lem:sub_pull1} (composed of the difference of two exponentials) and the function ${\varphi}_{\lambda_\star-\epsilon}$ which solves $\mathcal{L} \varphi = (\lambda_\star-\epsilon)\varphi$ with prescribed asymptotic behavior at $-\infty$. Note that the factor $\rho(t)$ is to ensure continuity at the matching point $x=c_{het}t-\tau/2$.} \label{fig:SubSolAnom} \end{figure} \begin{prop}\label{prop:Msub} Let $c\in(c_-,c_+)$ be such that $c_-<c<c_u^*=g^{-1}(0)\leq c_+$. Then, there is $\epsilon_0(c )>0$ and $\tau_0(\epsilon,c )>0$ such that for all $0<\epsilon<\epsilon_0(c)$ and all $\tau\geq \tau_0(\epsilon,c)$, we have that \begin{equation*} \underline{u}_{c,\epsilon,\tau}(t,x)=\left\{ \begin{array}{cl} \underline{v}_{c,\epsilon,\tau}(t,x), & x-c_{het}t \leq -\tau/2,\\ c_{\epsilon,\tau}\underline{v}_{c,\epsilon,\tau}(t,c_{het}t-\tau/2)\widetilde{\varphi}_{\lambda_\star-\epsilon}(x-c_{het}t), & x-c_{het}t > -\tau/2, \end{array} \right. \end{equation*} is a sub-solution of \eqref{eq:Msub} for all $(t,x)\in\R^+\times\R$. Here, we have set \begin{equation*} \underline{v}_{c,\epsilon,\tau}(t,x)=\max\left\{0,e^{-\lambda_\epsilon(c) (x-ct+\tau)}- e^{-(\lambda_\epsilon(c)+\gamma_\epsilon(c))(x-ct+\tau)}\right\}, \end{equation*} with $\lambda_\epsilon(c)=\frac{c-\sqrt{c^2-4d_-(\alpha-\epsilon)}}{2d_-}>0$ and $0<\gamma_\epsilon(c)< \frac{1}{d_-} \sqrt{c^2-4d_-(\alpha-\epsilon)}$. Moreover, the function $\widetilde{\varphi}_{\lambda_\star-\epsilon}(x-c_{het}t)$ is nonnegative and defined from ${\varphi}_{\lambda_\star-\epsilon}$ which solves $\mathcal{L} \varphi = (\lambda_\star-\epsilon)\varphi$ with prescribed asymptotic behavior at $-\infty$: \begin{equation*} \varphi_{\lambda_\star-\epsilon} (x) = e^{\left(-\frac{c_{het}}{2d_-}+\frac{1}{2d_-}\sqrt{c_{het}^2-4d_-\alpha+4d_-(\lambda_\star-\epsilon)}\right)x}\left(1+\mathcal{O}\left(e^{\nu' x}\right)\right), \text{ as } x\rightarrow-\infty, \end{equation*} for some $0<\nu'<\nu$. Finally, the normalizing constant $c_{\epsilon,\tau}>0$ is given by $c_{\epsilon,\tau}=1/\varphi_{\lambda_\star-\epsilon}(-\tau/2)$. \end{prop} We refer to Figure~\ref{fig:SubSolAnom} for an illustration. \begin{proof} Let $c\in(c_-,c_+)$ be such that $c_-<c<c_u^*=g^{-1}(0) \leq c_+$. Then, there exists $\epsilon_0(c)>0$ such that for all $0<\epsilon<\epsilon_0(c)$, we have \begin{align*} &\alpha-\frac{c_{het}^2}{4d_-}<\lambda_\star-\epsilon<\lambda_\star,\\ &\lambda_\epsilon(c)=\frac{c-\sqrt{c^2-4d_-(\alpha-\epsilon)}}{2d_-}>0,\\ &-\lambda_\epsilon(c)(c_{het}-c)+\lambda(c_u^*)(c_{het}-c_u^*)+3\epsilon<0. \end{align*} Then, there exists $\tau_0(\epsilon,c)$ such that for all $\tau\geq \tau_0(\epsilon,c)$ one has \begin{align*} &\frac{\lambda_{\epsilon}(c)^2}{ (\lambda_{\epsilon}(c)+\gamma_{\epsilon}(c))^2} > e^{-\gamma_{\epsilon}(c) (x-ct+\tau)}, \quad x-c_{het}t\geq x_*(\epsilon,c),\\ &\left[(\lambda_\epsilon(c)+\gamma_\epsilon(c))(c_{het}-c)+\lambda_\star-2\epsilon\right]e^{-\gamma_\epsilon(c)((c_{het}-c)t+\tau/2)}<\epsilon, \end{align*} where $x_*(\epsilon,c)\in\R$ is defined such that \begin{equation*} \chi(x-c_{het}t)-d_-\leq \frac{\gamma_\epsilon(c) \left[c-2\lambda_\epsilon(c) d_--\gamma_\epsilon(c)\right]}{(\lambda_\epsilon(c)+\gamma_\epsilon(c))^2}, \quad x-c_{het}t \leq x_*(\epsilon,c). \end{equation*} According to the above discussions, we already have that $\underline{u}_{c,\epsilon,\tau}$ is a sub-solution on each subdomains $x - c_{het} t < -\tau/2$ and $x-c_{het} t > -\tau/2$. It remains to check that there is a positive jump in the spatial derivative of the sub-solution at $x=c_{het}t-\tau/2$, that is \begin{equation*} \partial_x \underline{u}_{c,\epsilon,\tau}(t,(c_{het}t-\tau/2)^-)<\partial_x \underline{u}_{c,\epsilon,\tau}(t,(c_{het}t-\tau/2)^+)<0. \end{equation*} First, we compute: \begin{equation*} \partial_x \underline{u}_{c,\epsilon,\tau}(t,(c_{het}t-\tau/2)^-)=-\lambda_\epsilon(c) e^{-\lambda_\epsilon(c)\left[(c_{het}-c)t+\tau/2\right]}\left[1-\frac{\lambda_\epsilon(c)+\gamma_\epsilon(c)}{\lambda_\epsilon(c)}e^{-\gamma_\epsilon(c)\left[(c_{het}-c)t+\tau/2\right]}\right], \end{equation*} and \begin{equation*} \partial_x \underline{u}_{c,\epsilon,\tau}(t,(c_{het}t-\tau/2)^+)=\frac{\varphi_{\lambda_\star-\epsilon}'(-\tau/2)}{\varphi_{\lambda_\star-\epsilon}(-\tau/2)}e^{-\lambda_\epsilon(c)\left[(c_{het}-c)t+\tau/2\right]}\left[1- e^{-\gamma_\epsilon(c)\left[(c_{het}-c)t+\tau/2\right]}\right]. \end{equation*} We now use the prescribed asymptotic behavior at $-\infty$ of $\varphi_{\lambda_\star-\epsilon}$ to get that \begin{equation*} \frac{\varphi_{\lambda_\star-\epsilon}'(-\tau/2)}{\varphi_{\lambda_\star-\epsilon}(-\tau/2)} \longrightarrow -\frac{c_{het}}{2d_-}+\frac{1}{2d_-}\sqrt{c_{het}^2-4d_-\alpha+4d_-(\lambda_\star-\epsilon)}, \quad \text{ as } \tau \rightarrow +\infty. \end{equation*} Recall \eqref{eqlambdac}, that is \begin{equation*} \lambda(c_u^*)=\frac{c_{het}}{2d_-}-\frac{1}{2d_-}\sqrt{c_{het}^2-4d_-\alpha+4d_-\lambda_\star}, \end{equation*} and also that $\lambda (c) > \lambda (c_u^*)$ due to $c < c_u^*$. Thus we can select $\epsilon>0$ even smaller to have \begin{equation*} -\lambda_\epsilon(c)< -\frac{c_{het}}{2d_-}+\frac{1}{2d_-}\sqrt{c_{het}^2-4d_-\alpha+4d_-(\lambda_\star-\epsilon)}. \end{equation*} This implies that upon taking $\tau$ larger we can always ensure that \begin{equation*} \partial_x \underline{u}_{c,\epsilon,\tau,\eta}(t,(c_{het}t-\tau/2)^-)<\partial_x \underline{u}_{c,\epsilon,\tau,\eta}(t,(c_{het}t-\tau/2)^+)<0. \end{equation*} This concludes the proof of Proposition~\ref{prop:Msub}. \end{proof} We are now in a position to prove that the solution~$u$ of \eqref{eq:main} with compactly supported initial datum spreads with speed larger than or equal to $c_u^*$. Take any $c \in (c_- ,c_u^*)$ arbitrarily close to $c_u^*$, and notice that $\underline{u}_{c,\epsilon, \tau}$ from Proposition~\ref{prop:Msub} is uniformly bounded from above since it is compactly supported and continuous. In particular, we can find $\delta_0 >0$ small enough so that, for any $0 < \delta \leq \delta_0$, $$0 \leq \delta \underline{u}_{c,\epsilon,\tau}\leq \eta, $$ where $\eta$ is such that \begin{equation*} (\alpha-\epsilon)u <\alpha u(1-u), \quad \text{ for } u\in[0,\eta]. \end{equation*} It is then straightforward to check that, using the linearity of~$M$, $$N ( \delta \underline{u}_{c,\epsilon,\tau} ) < \delta M ( \underline{u}_{c,\epsilon,\tau}) \leq 0,$$ i.e. $\delta \underline{u}_{c,\epsilon,\tau}$ is a sub-solution of~\eqref{eq:main} for any $\delta \leq \delta_0$. Proceeding as in the proof of Proposition~\ref{prop:gen}, we can infer that the solution spreads with speed larger than or equal to $c_u^*$. We omit the details and Theorem~\ref{theo:chi_inc} is proved in the case when $c_{het} \in [ c_+,c_{int})$. \subsection{Case $c_{het} \geq c_{int}$} When $c_{het} \geq c_{int}$, we need to prove that the rightward spreading speed is $c_u^*=c_-$. In this case, using the second statement of Proposition~\ref{prop:gen} we have already proved that the solution spreads with speed larger than or equal to $c_-$, and it only remains to construct a super-solution to conclude the proof of Theorem~\ref{theo:chi_dec} in that case. This is precisely the purpose of the next lemma. \begin{lem} Assume that $c_-<c_+<c_{int} \leq c_{het}$. There exists $\tau_0>0$ such that for each $\tau\geq \tau_0$, \begin{equation*} u_\tau(t,x)=\left\{ \begin{array}{cl} 1, & x\leq c_-t+\tau,\\ e^{-\frac{c_-}{2d_-}(x-c_-t-\tau)}, & c_-t+\tau < x < c_{het}t+\tau,\\ e^{-\frac{c_-}{2d_-}(c_{het}-c_-)t}e^{-\mu_-(x-c_{het}t-\tau)}, & x \geq c_{het}t+\tau, \end{array} \right. \end{equation*} is a super-solution of \eqref{eq:main}, with $\mu_-:=\frac{c_{het}+\sqrt{g(c_-)}}{2d_+}>0$. \end{lem} \begin{proof} As $c_{het} \geq c_{int}$, we have that $$g(c_-) = c_{het}^2 - 4 d_+ \left( \alpha + \frac{c_-}{2d_-} (c_{het} - c_- ) \right) \geq 0,$$ and $\mu_-$ is well-defined. For $x\in (c_-t+\tau,c_{het}t+\tau)$, we have \begin{equation*} N\left(e^{-\frac{c_-}{2d_-}(x-c_-t-\tau)}\right)\geq \left[ \frac{c_-^2}{4d_-^2}\left(d_--\chi(\tau)\right)+\alpha e^{\frac{c_-}{2d_-} \tau}\right]e^{-\frac{c_-}{2d_-}(x-c_-t-\tau)}. \end{equation*} Thus, we fix $\tau_0>0$ such that for all $\tau\geq \tau_0$ \begin{equation*} \frac{c_-^2}{4d_-^2}\left(d_--\chi(\tau)\right)+\alpha e^{\frac{c_-}{2d_-} \tau}>0. \end{equation*} Next, for $x > c_{het}t+\tau$, we have that \begin{equation*} N\left( u_\tau(t,x)\right)>\left(-\frac{c_-}{2d_-}(c_{het}-c_-)+\mu_-c_{het}-\alpha -d_+\mu_-^2\right)e^{-\frac{c_-}{2d_-}(c_{het}-c_-)t}e^{-\mu_-(x-c_{het}t-\tau)}=0, \end{equation*} as $\mu_->0$ is the largest positive root of \begin{equation*} -\frac{c_-}{2d_-}(c_{het}-c_-)+\mu c_{het}-\alpha -d_+\mu^2=0. \end{equation*} Finally, we have that $$\mu_- > \frac{c_-}{2d_-},$$ since $$\mu_- \geq \frac{c_{het}}{2d_+} \geq \frac{c_{int}}{2d_+} > \sqrt{\frac{\alpha}{d_-}} = \frac{c_-}{2d_-}.$$ This insures that the jump of the spatial derivative at $x= c_{het} t + \tau$ has the correct sign and $u_\tau$ is a super-solution of~\eqref{eq:main}. \end{proof} \subsection{Case $c_{het} < c_+$} When $c_{het} < c_+$, we need to prove that the rightward spreading speed is $c_u^*=c_+$. In this case, using the first statement of Proposition~\ref{prop:gen} we have already proved that the spreading speed is less than or equal to~$c_+$ and it only remains to construct a sub-solution to conclude the proof of Theorem~\ref{theo:chi_inc}. We proceed as in the proof of Lemma~\ref{lemsubcmincpchet}. First we let $c_{het}<c<c_+$. Then, one can find $\epsilon>0$ such that $c<2\sqrt{d_+(\alpha-2\epsilon)}<c_+$ together with $\eta_\epsilon>0$ such that \begin{equation*} (\alpha-\epsilon)u\leq \alpha u(1-u), \quad u\in[0,\eta_\epsilon]. \end{equation*} We again define \begin{equation*} \beta_+(\epsilon,c):= \frac{\sqrt{4d_+(\alpha-\epsilon)-c^2}}{2d_+}>0, \text{ and } \beta_+(c):=\beta_+(0,c)= \frac{\sqrt{4d_+\alpha-c^2}}{2d_+}>0, \end{equation*} together with the following family of functions \begin{equation*} u_{\tau,\epsilon}^c(t,x):=\left\{ \begin{array}{lc} \delta_\epsilon \left[ e^{-\frac{c}{2d_+}(x-ct-\tau)}\cos(\beta_+(\epsilon,c)(x-ct-\tau)) +\epsilon \right], & x-ct-\tau \in\Omega_\epsilon(c), \\ 0, & \text{ otherwise,} \end{array} \right. \end{equation*} with $\Omega_\epsilon(c)=\left[-\frac{\pi}{2\beta_+(\epsilon,c)}-z^-_\epsilon(c),\frac{\pi}{2\beta_+(\epsilon,c)}+z^+_\epsilon(c) \right]$, $\delta_\epsilon>0$ is fixed such that $0\leq u_{\tau,\epsilon}^c(t,x)\leq \eta_\epsilon$, and $z^\pm_\epsilon(c)$ are defined through \begin{equation*} e^{\mp \frac{c}{2d_+}\left( \frac{\pi}{2\beta_+(\epsilon,c)}+z^\pm_\epsilon(c)\right)}\sin(\beta_+(\epsilon,c)z^\pm_\epsilon(c))=\epsilon, \end{equation*} with asymptotics \begin{equation*} z^\pm_\epsilon(c)=\frac{e^{\mp \dfrac{c\pi}{4d_+\beta_+(c)}}}{\beta_+(c)} \epsilon+o(\epsilon), \quad \text{ as } \epsilon \rightarrow0. \end{equation*} Next, as $\chi(+\infty)=d_+$, there exists $A>0$ such that for all $\xi\geq A$, we get \begin{equation*} |\chi(\xi)-d_+|\leq \epsilon^2. \end{equation*} Proceeding as for Lemma~\ref{lemsubcmincpchet}, we then find that for any $c$, this is a sub-solution provided that $\epsilon$ is small enough. As in the proof of Proposition~\ref{prop:gen}, one can deduce that the solution of \eqref{eq:main} spreads with speed larger than or equal to $c_+$, which ends the proof of Theorem~\ref{theo:chi_inc}. \section{Traveling fronts in case \eqref{ass:chi_dec}}\label{sec:TW} Throughout this section we assume that $c_{het}\in(c_-,c_+)$. Before proceeding with the proof of Theorem~\ref{thmTF}, we introduce the following notion of generalized principal eigenvalue, which can be found in \cite{BR06,BHR07,BR15}, for the elliptic operator $\mathcal{L}$ defined as \begin{equation*} \mathcal{L} = \chi(x) \partial_x^2 +c_{het} \partial_x +\alpha, \quad x\in\R. \end{equation*} We define $\mu^\star\in\R$ to be \begin{equation*} \mu^\star:=\sup\left\{ \mu ~|~ \exists \varphi \in \mathscr{C}^2(\R),\, \varphi>0, \, \left(\mathcal{L}+\mu \right)\leq 0 \right\}. \end{equation*} One of the key property of the generalized principal eigenvalue $\mu^\star$ is that it can be obtained as the limit of the Dirichlet principal eigenvalue. More precisely, consider the following Dirichlet problem: \begin{equation*} \left\{ \begin{split} \mathcal{L} \varphi &= -\mu \varphi, \quad |x|<r, \\ \varphi(\pm r)&=0 , \end{split} \right. \end{equation*} for each $r>0$ and denote $\mu_d(r)$ the principal eigenvalue given by Krein-Rutman theory \cite{KR}. Then \cite[Proposition 4.2]{BHR07} ensures that $r\mapsto \mu_d(r)\in \R$ decreases and \begin{equation*} \mu_d(r)\longrightarrow \mu^\star, \text{ as } r\rightarrow+\infty. \end{equation*} We claim that we have the following result. \begin{lem}\label{lem:signgp} When $c_{het}\in(c_-,c_+)$ and $\chi$ satisfies \eqref{ass:chi_dec}, then the principal eigenvalue of $\mathcal{L}$ satisfies $\mu^\star<0$. \end{lem} \begin{proof} We check that the conditions of \cite[Theorem 4.3]{BHR07} are satisfied in our case which translate into our setting by checking that the function $q(x):=4\chi(x)\alpha -c_{het}^2$ is above a fixed positive constant on some (large) interval. As $c_{het}\in(c_-,c_+)$, we have that $q(-\infty)=4d_+\alpha -c_{het}^2>0$. As a consequence, there exists $\epsilon>0$ and $x_0<0$ such that for all $x\leq x_0$, we have \begin{equation*} q(x)=4\chi(x)\alpha -c_{het}^2\geq\epsilon, \end{equation*} which implies that $\mu^\star<0$ from \cite[Theorem 4.3]{BHR07}. \end{proof} \paragraph{Existence.} In order to prove the existence of traveling front solutions, we are first going to construct generalized sub and super-solutions for \eqref{TWeq}. The construction of the sub-solution relies on the aforementioned properties of the generalized principal eigenvalue $\mu^\star$. For each $r>0$, we denote by $\varphi_r$ the corresponding eigenfunction to the Dirichlet principal eigenvalue $\mu_d(r)$ which satisfies $\varphi_r>0$ and normalized with $\varphi_r(0)=1$. As $\mu^\star<0$ from Lemma~\ref{lem:signgp}, there exists some $R>0$ such that for any $r\geq R$ we also have $\mu_d(r)<0$. As a consequence, there exists $0<\kappa_r<1$ small enough such that \begin{equation*} (\alpha+\mu_d(r))(\kappa_r \varphi_r) \leq \alpha \kappa_r \varphi_r (1- \kappa_r \varphi_r). \end{equation*} Thus, if one defines $\underline{U}_r$ the following family of functions \begin{equation*} \underline{U}_r(x) = \left\{ \begin{array}{cl} \kappa_r \varphi_r(x), & |x| \leq r, \\ 0 , & \text{ otherwise,} \end{array} \right. \end{equation*} then for all $r\geq R$, the function $\underline{U}_r$ is a generalized sub-solution to \eqref{TWeq}. Next, as $c_{het}\in(c_-,c_+)$, there exists $\epsilon_0>0$ small enough such that for each $0<\epsilon<\epsilon_0$ one has $c_-<2\sqrt{(d_-+\epsilon)\alpha}<c_{het}$. For such an $\epsilon$, one can find $\tau_\epsilon>0$ such that for any $\tau\geq \tau_\epsilon$ we have \begin{equation*} d_-\leq \chi(x)\leq d_-+\epsilon, \quad x\geq \tau. \end{equation*} We now introduce $\overline{U}_{\epsilon,\tau}$ defined as \begin{equation*} \overline{U}_{\epsilon,\tau}(x)=\max\left\{1,e^{-\lambda_\epsilon(x-\tau)}\right\}, \quad \lambda_\epsilon=\frac{c_{het}+\sqrt{c_{het}^2-4(d_-+\epsilon)\alpha}}{2(d_-+\epsilon)}>0. \end{equation*} For all $\tau\geq \tau_\epsilon$, one can check that $\overline{U}_{\epsilon,\tau}$ is a generalized super-solution to \eqref{TWeq}. Up to further reducing~$\kappa_r$ (or taking~$\tau$ larger), we can always ensure that \begin{equation*} 0\leq \underline{U}_r \leq \overline{U}_{\epsilon,\tau} \leq 1, \end{equation*} for some $r\geq R$, $\epsilon\in(0,\epsilon_0)$ and $\tau\geq \tau_\epsilon$. Now denote by $u$ the solution of \begin{equation}\label{TWeq_parab} \partial_t u = \chi (x) \partial_x^2 u + c_{het} \partial_x u + \alpha u (1-u), \end{equation} with the initial condition $$u (t=0, \cdot) \equiv \overline{U}_{\epsilon,\tau}.$$ Since $\overline{U}_{\epsilon, \tau}$ is a super-solution of \eqref{TWeq}, hence also of~\eqref{TWeq_parab}, it follows from parabolic comparison principles that $u$ is nonincreasing in the time variable. Therefore it converges to some function $U$ as $t \to +\infty$, and by parabolic estimates we get that~$U$ is a solution of~\eqref{TWeq}. Moreover, by construction and another use of the comparison principle, we get that \begin{equation*} 0\leq \underline{U}_r \leq U \leq \overline{U}_{\epsilon,\tau} \leq 1, \text{ on } \R. \end{equation*} Using the strong maximum principle, we actually get that $0<U<1$. Indeed, assume there is $x_0\in\R$ for which $U(x_0)=0$, then the strong maximum principle implies that $0\leq \underline{U}_r \leq U \equiv 0$, which is impossible. A similar argument holds for the other inequality. We also remark that $U$ must be nonincreasing. Indeed, notice that $$\partial_x u (t=0) = \overline{U}_{\epsilon,\tau} ' \leq 0.$$ Moreover, derivating~\eqref{TWeq_parab}, we get that $v =\partial_x u$ solves $$\partial_t v = \chi (x) \partial_x^2 v + ( c_{het} + \chi ' (x) ) \partial_x v + \alpha (1-2 u) v.$$ By another comparison principle, we find that $$ v (t,x) \leq 0,$$ for all $t >0$ and $x \in \R$, hence $U ' \leq 0$. This latter fact combined with $0\leq \underline{U}_r \leq U$ ensures that $ U (-\infty )>0$, and one necessarily gets that $U (-\infty)=1$ as $U$ is solution of the ODE \eqref{TWeq}. Next, using the fact that $\overline{U}_{\epsilon,\tau}(x)\rightarrow0$ as $x\rightarrow+\infty$, we get that $U (+\infty)=0$ by comparison. We claim that we actually have $U '<0$ on $\R$. This property is satisfied near $-\infty$ as there exists a unique stable direction. We let $x_*\in\R$ be such that $U '(x_*)=0$ and $U'(x)<0$ for all $x<x_*$. Then, we have \begin{equation*} \chi(x_*)U ''(x_*)=-\alpha U(x_*)(1- U(x_*))<0, \end{equation*} which is a contradiction. \paragraph{Asymptotic behavior at $+\infty$.} As $c_{het}>c_-$ we have that $\frac{\sqrt{c_{het}^2-4d_-\alpha}}{2d_-}>0$, and upon eventually reducing $\epsilon_0>0$, we can ensure that for all $\epsilon\in(0,\epsilon_0)$, \begin{equation*} \lambda_{\epsilon}>\frac{c_{het}}{2d_-}. \end{equation*} As a consequence, we have that for all $x\geq \tau $ \begin{equation*} 0<e^{\frac{c_{het}}{2d_-}x} U(x)\leq e^{\frac{c_{het}}{2d_-}x} \overline{U}_{\epsilon,\tau}(x)=e^{-\left(\lambda_\epsilon-\frac{c_{het}}{2d_-}\right) x+\lambda_\epsilon \tau}. \end{equation*} We now prove that~$U$ has the strong exponential decay given in Theorem~\ref{thmTF}. Near $+\infty$, system~\eqref{TWeq} can be written in condensed form \begin{equation}\label{systemTW} {\bf U} '(x) = A(x){\bf U}(x)+N(x,{\bf U}(x)), \quad x\in\R, \end{equation} with ${\bf U}(x)=(U(x),V(x))^\mathbf{t}$ and \begin{equation*} A(x):=\left(\begin{matrix} 0 & 1 \\ -\frac{\alpha}{\chi(x)} & -\frac{c_{het}}{\chi(x)} \end{matrix}\right), \quad N(x,{\bf U}):=\left(\begin{matrix} 0 \\ \frac{\alpha}{\chi(x)} U^2 \end{matrix}\right). \end{equation*} As $\chi$ converges at an exponential rate at $+ \infty$, so does $A(x)$, and since there is a gap between the strong stable and weak stable eigenvalues of $A_\infty:=\underset{x\rightarrow+\infty}{\lim}~A(x)$, the constant coefficient asymptotic system has an exponential dichotomy. By classical arguments on the roughness of exponential dichotomies \cite{coppel}, the non-autonomous system inherits one with the same decay rates as $\chi$ converges at an exponential rate at $+ \infty$. Note that the strong stable eigenvalue is precisely given by $-\lambda_s$ defined in Theorem~\ref{thmTF} while the weak stable eigenvalue is $-\lambda_w$ given by \begin{equation*} 0<\lambda_w:=\frac{c_{het}-\sqrt{c_{het}^2-c_-^2}}{2d_-}<\lambda_s. \end{equation*} As a consequence, since we have $0<e^{\frac{c_{het}}{2d_-}x} U(x)\leq e^{-\left(\lambda_\epsilon-\frac{c_{het}}{2d_-}\right) x+\lambda_\epsilon \tau}$ for all $x\geq \tau$, we deduce that necessarily \begin{equation*} U (x) \underset{x \rightarrow +\infty}{\sim} \gamma_s e^{-\lambda_s x}, \end{equation*} for some $\gamma_s>0$. \paragraph{Uniqueness.} We first prove that when $c_{het}> c_- = 2\sqrt{d_-\alpha}$ solutions of \eqref{TWeq}-\eqref{TWlim} are unique in $H^1_{\frac{c_{het}}{2d_-}}(\R):=\left\{ U ~|~ e^{\frac{c_{het}}{2d_-} \cdot} U \in H^1(\R)\right\}$. Let $U \in H^1_{\frac{c_{het}}{2d_-}}(\R)$ and $V \in H^1_{\frac{c_{het}}{2d_-}}(\R)$ be two solutions of \eqref{TWeq}-\eqref{TWlim} and assume by contradiction that $U \not\equiv V$. Without loss of generality, we may assume that $U(x)>V(x)$ on some interval $(a,b)\subset\R$ with $U(a)=V(a)$ and $U(b)=V(b)$. Note that $a,b\in \R \cup \left\{\pm\infty\right\}$. Multiplying the equation for $U$ with $e^{\beta(x)}\frac{V(x)}{\chi(x)}$ and the equation for $V$ with $e^{\beta(x)}\frac{U(x)}{\chi(x)}$, where we set $\beta(x):=\int_0^x \frac{c_{het}}{\chi(y)}\mathrm{d} y$, we obtain \begin{equation*} \left\{ \begin{split} 0&=V(x) \frac{\mathrm{d}}{\mathrm{d} x} \left( e^{\beta(x)}U'(x) \right)+\frac{\alpha}{\chi(x)}U(x)V(x)(1-U(x)) e^{\beta(x)},\\ 0&=U(x) \frac{\mathrm{d}}{\mathrm{d} x} \left( e^{\beta(x)}V'(x)\right)+\frac{\alpha}{\chi(x)}U(x)V(x)(1-V(x)) e^{\beta(x)}. \end{split} \right. \end{equation*} As a consequence, we have \begin{equation*} \int_a^b V(x) \frac{\mathrm{d}}{\mathrm{d} x} \left( e^{\beta(x)}U'(x) \right)-U(x) \frac{\mathrm{d}}{\mathrm{d} x} \left( e^{\beta(x)}V'(x)\right)\mathrm{d} x=\alpha \int_a^b \frac{U(x)V(x)}{\chi(x)}(U(x)-V(x))e^{\beta(x)}\mathrm{d} x. \end{equation*} Note that the above integrals are convergent as on the one hand $U,V \in H^1_{\frac{c_{het}}{2d_-}}(\R)$ which ensures integrability when $b=+\infty$, and on the other hand $\beta(x)\sim \frac{c_{het}}{d_+}x$ as $x\rightarrow -\infty$ which ensures integrability when $a=-\infty$ (recall that $U(-\infty) = V (-\infty) =1$, and the convergence must be exponential by classical arguments on \eqref{systemTW}). Integrating by parts the integral on the left-hand side of the equality, we obtain \begin{equation*} \left.e^{\beta(x)}\left(V(x)U'(x)-U(x)V'(x)\right)\right|_a^b=\alpha \int_a^b \frac{U(x)V(x)}{\chi(x)}(U(x)-V(x))e^{\beta(x)}\mathrm{d} x. \end{equation*} When both $a,b\in\R$, we have that the right-hand side is strictly positive while the left-hand side is negative using that $U(x)=V(x)$ at $x\in\left\{a,b\right\}$ and $U(x)>V(x)$ for $x\in(a,b)$. If $a=-\infty$, we have that \begin{equation*} e^{\beta(x)}\left(V(x)U'(x)-U(x)V'(x)\right) \rightarrow 0, \quad x\rightarrow -\infty, \end{equation*} and the left-hand side is negative. If $b=+\infty$, we have that \begin{align*} e^{\beta(x)}\left|V(x)U'(x)\right|=e^{\int_0^{x} c_{het} \left(\frac{1}{\chi(y)}-\frac{1}{d_-}\right) \mathrm{d}y}e^{\frac{c_{het}}{d_-}x}\left|V(x)U'(x)\right| \rightarrow 0, \quad x\rightarrow +\infty,\\ e^{\beta(x)}\left|V'(x)U(x)\right|=e^{\int_0^{x} c_{het} \left(\frac{1}{\chi(y)}-\frac{1}{d_-}\right) \mathrm{d}y}e^{\frac{c_{het}}{d_-}x}\left|V'(x)U(x)\right| \rightarrow 0, \quad x\rightarrow +\infty, \end{align*} and the left-hand side is again negative. Thus, we have reached a contradiction, and the solution of \eqref{TWeq}-\eqref{TWlim} with strong exponential decay at $+\infty$, if it exists, is unique. \paragraph{Non existence of solutions of \eqref{TWeq}-\eqref{TWlim} when $c_{het}< c_- $.} Using the fact that $\chi(+\infty)=d_->0$, we readily obtain the necessary condition that $c_{het}\geq 2\sqrt{d_-\alpha} = c_-$ for the corresponding solution to remain positive near the equilibrium $u=0$. \paragraph{Non existence of solutions of \eqref{TWeq}-\eqref{TWlim} when $c_{het}> c_+ $ with strong exponential decay.} Let us assume that $c_{het}> c_+ = 2\sqrt{d_+\alpha}$. We are going to prove that any solution satisfies \begin{equation} U'(x)>-\frac{c_{het}}{2d_+}U(x), \quad x\in\R. \label{eqweak} \end{equation} We know that the above inequality holds true near $-\infty$, and suppose by contradiction that $x_*\in\R$ is the first time where \begin{equation*} \left\{ \begin{split} 0&=\chi(x_*) U''(x_*)+c_{het}U'(x_*)+\alpha U(x_*)(1-U(x_*)),\\ U'(x_*)&=-\frac{c_{het}}{2d_+}U(x_*). \end{split} \right. \end{equation*} Using the fact that $\alpha U (1-U) \leq \alpha U < \frac{c_{het}^2}{4d_+} U$, we have that \begin{align*} \chi(x_*) U''(x_*)&=-c_{het} U'(x_*)-\alpha U(x_*)(1-U(x_*))\\ &>-c_{het}U'(x_*)-\frac{c_{het}^2}{4d_+}U(x_*),\\ & =-\frac{c_{het}}{2}U'(x_*), \end{align*} from which we deduce that $U''(x_*)>-\frac{c_{het}}{2d_+}U'(x_*)$ as $\chi(x_*)\leq d_+$ and $U'(x_*)<0$. This is a contradiction as $x_*$ is the first time where $U'(x_*)=-\frac{c_{het}}{2d_+}U(x_*)$. Therefore \eqref{eqweak} must hold for all~$x$. Integrating \eqref{eqweak} we obtain that \begin{equation*} U(x)>e^{-\frac{c_{het}}{2d_+}x}U(0), \quad x>0, \end{equation*} and thus the solution $U$, if it exists, has weak exponential decay near $+\infty$. As a consequence, as $0<\frac{c_{het}}{2d_+}<\frac{c_{het}}{2d_-}<\lambda_s$, when $c_{het}>2\sqrt{d_+\alpha}$ there cannot exist a solution of \eqref{TWeq}-\eqref{TWlim} with strong exponential decay given by $\lambda_s$. \section*{Acknowledgements} GF acknowledges support from an ANITI (Artificial and Natural Intelligence Toulouse Institute) Research Chair and from Labex CIMI under grant agreement ANR-11-LABX-0040. The research of MH was partially supported by the National Science Foundation (DMS-2007759). \bibliographystyle{abbrv}
\section{Introduction} Reliable determinations of fluxes and distances are of paramount importance for all large scale galaxy surveys. The same source in the sky (e.g. a star, or a galaxy), observed in different positions on the focal plane, is typically recorded with different count rates. Besides the statistical fluctuations of signal counts and background noise, the detected count rates of the same source will also differ because of the instrument response function dependency on the focal plane position; the dependency of the response function is due both to the optical distortions produced by the telescope optics and large-scale variations in the detector gain. The non-ideal instrument response provides a systematic distortion of the source count rates, propagated as systematic errors on fluxes and magnitudes. In order to compensate for this systematic effect and provide accurate catalogues, the response function on the focal plane must be accurately determined. Several missions are foreseen in the next few years to build a three-dimensional map of the Universe by measuring positions of distant astrophysical sources and their fluxes and spectra. The European Space Agency will launch the Euclid satellite in 2022~\citep{redbook}. Euclid aims at providing a weak-lensing and spectro-photometric survey of a $15\,000$~deg$^2$ area of the extra-galactic sky, up to redshifts of about 2, and map the geometry of the Universe and the growth of structures~\citep{Amendola2018}. NASA is developing the Nancy Grace Roman Space Telescope (formerly known as WFIRST), whose launch is currently scheduled for 2025~\citep{roman}. The Roman Space Telescope will use baryon acoustic oscillations, observations of distant supernovae, and weak gravitational lensing to probe dark energy. The selection of a reliable galaxy sample in a survey heavily relies on an accurate flux calibration. Contamination of the sample selection is caused by all the effects which systematically vary the magnitude limit of the sample across the focal plane. This contamination may bias the cosmological inference on the data, for example by injecting spurious signals in the galaxy clustering power spectrum within baryon acoustic oscillation measurements~\citep{Shafer2015}. To mitigate this effect, an accurate flux calibration is needed. In this work we specifically focus on the \emph{relative in-flight self-calibration} of the instrument response of a generic spectro-photometer as part of a satellite payload. In space missions, in light of the tight observation schedules, having an optimized and automated procedure to derive the response function is of crucial importance. In-flight calibration techniques exploit multiple measurements of bright sources recorded at different focal plane positions, obtained with partially overlapping exposures. The relative instrument response can be inferred by the requirement that each source is reconstructed with statistically consistent count rates, within the whole focal plane. The self-calibration method can accurately constrain the instrument response (and the source rates) when enough sources and exposures are provided. The \emph{relative} flux calibration is determined up to a multiplicative global scale factor (or equivalently, relative to a reference point in the focal plane). The determination of this scale factor (the \emph{absolute} calibration) can be then achieved through the observation of standard sources with known brightness. The partially overlapping \emph{ubercalibration} procedure was first developed and applied to the SDSS imaging data~\citep{Padmanabhan2008}. Further investigations of the method are reported in~\citep{holmes2012designing}, where it has been shown that quasi-random observing strategies provide more uniform coverage on the focal plane with respect to regular and semi-regular patterns. Applications of the method by ground telescopes includes the PS1 survey~\citep{Schlafly2012}. Preliminary studies applied to a space mission have been carried out in~\citep{Markovic2017}. In this work, we first show possible ways to generalize the method outlined in~\citep{holmes2012designing}: we show how to reconstruct the response function using a generic two dimensional function basis, we introduce the possibility to further sectorize the focal plane to account for different macro-detectors, and we derive a rigorous procedure to accurately estimate the calibration uncertainty. We then quantify the performance for generic spectro-photometric surveys. Synthetic simulations of in-flight self-calibration surveys are produced to study the accuracy on the inferred instrument response function (and source rates) under different scenarios. The method described in this paper may be adopted by upcoming or future galaxy surveys to characterise their in-flight self-calibration, in order to consistently infer a parametric instrument response function using real calibration data, or to plan their in-flight calibration with simulated data. This paper is organized as follows: section~\ref{sec:synt} describes the simulation of the synthetic calibration survey; section~\ref{sec:response} illustrates the general relative response functions used in this work; section~\ref{sec:inference} describes the minimization procedure to infer the parameters of the instrument response function and the source rates; section~\ref{sec:test} reports the results obtained in mock-up tests. \section{The synthetic calibration survey} \label{sec:synt} Synthetic calibration surveys are simulated for studying the features of the in-flight self-calibration method. The elements of the survey simulation are: the sources entering the sky catalog, detailed in section~\ref{sec:sources}, the sky catalog, described in section~\ref{sec:sky}, the exposures, illustrated in section~\ref{sec:exposures}, the observations resulting from the exposures, described in section~\ref{sec:obs}. \subsection{Sources} \label{sec:sources} The self-calibration procedure usually relies on bright stars, for both their high signal-to-noise ratio and their almost point-like detection over few pixels. In the case of slitless spectroscopy, bright stars are also employed because of the relatively negligible spectra cross-contamination from fainter neighboring sources and the well defined extraction aperture correction needed to derive the total flux from the extracted spectrum for each object. In our synthetic sky catalogues, a calibration \emph{source} is described by three variables: \begin{itemize} \item the \emph{position} in the sky, identified by the standard Cartesian coordinates $(\xi, \eta)$ under a flat-sky approximation; \item the source \emph{intrinsic count rate} $r$, i.e. the ideal number of detection counts per second in the instrument, due to the source. \end{itemize} \subsection{The sky catalog} \label{sec:sky} \begin{figure*}[tpb] \centering \includegraphics[width=.41\textwidth]{figures/example_exposures.pdf}\hfill \includegraphics[width=.44\textwidth]{figures/example_observations_2x2.pdf} \caption{\emph{Left}: Illustration of mock-up self calibration survey with an average of 7 sources per field of view and 5 exposures. \emph{Right}: Graphical visualization of the total observations in the focal plane, obtained with a sky catalogue with an average of 70 sources per field of view and a set of 60 exposures. The gap between the detector sectors is clearly visible. } \label{fig:observations} \end{figure*} \begin{figure*}[tpb] \centering \includegraphics[width=.43\textwidth]{figures/example_1-ftrue_four2poly2.pdf}\hfill \includegraphics[width=.43\textwidth]{figures/example_1-ftrue_gains_leg6.pdf} \caption{\emph{Left}: Graphical visualization of the mock-up response function $f(x,y)$ in the focal plane, in the case with one unsegmented detector; to enhance the contrast, the quantity $1-f(x,y)$ is plotted. The values of $f(x,y)$ in the four corners of the focal plane are approximately $0.922$ (top-left), $0.910$ (top-right), $0.924$ (bottom-right), $0.931$ (bottom-left). \emph{Right}: Graphical visualization of $1-f(x,y)$ in the case with four detector sectors, each with a different gain $g_s$ in each sector. The sector gains $g_s$ are respectively $(0.98, 1.05, 0.96, 1)$. } \label{fig:1-resp-focalplane} \end{figure*} The synthetic \emph{sky catalog} is a collection of sources, described by the sets $\{ \xi, \eta, r \}_k$ where $k$ is the source index. The positions in the synthetic sky catalog are represented in the flat-sky approximation, which is appropriate for a few partially overlapping exposures over a total of few square degrees. The origin of the sky coordinate and the orientation of the two Cartesian axes are arbitrary. The scale of the coordinate system is chosen such that a unit is half the size of the focal plane edge. \subsection{Exposures} \label{sec:exposures} In our synthetic simulations, an \emph{exposure} is defined by four variables: \begin{itemize} \item a telescope \emph{pointing} in the sky, described by the pair of sky coordinates $(\xi, \eta)$; \item an \emph{orientation} angle $\theta$; \item the exposure \emph{time} $t$. \end{itemize} The set $\{ \xi, \eta, \theta, t \}_i$ describes the $i$-th exposure in the calibration synthetic survey. The exposure is geometrically modelled as a square in the sky: the pointing coincides with the geometric center of the square; the rotation of the square (with respect to the sky coordinate system) is $\theta_i$. In this work, the centers of the telescope pointing are extracted randomly in the central sector of about one third of the simulated sky area; the telescope orientation angles are also extracted randomly. Details are provided in section~\ref{sec:mockup} and~\ref{sec:validation}. The \emph{focal plane coordinate system} origin is defined to be the geometric center of the focal plane, with the Cartesian axes parallel to the edges of the focal plane. The position in the focal plane coordinate system is then represented by a pair of coordinates, denoted by $(x,y)$. The focal plane coordinates $(x,y)_i$ of a source with sky coordinates $(\xi, \eta)_k$, observed in an exposure with pointing $(\xi, \eta)_i$ and orientation $\theta_i$, are derived with a roto-translation: \numparts \begin{eqnarray} \label{eq:transform-x} x_i &=& + (\xi_k - \xi_i) \cos \theta_i \, + \, (\eta_k - \eta_i) \sin \theta_i \\ \label{eq:transform-y} y_i &=& -(\xi_k - \xi_i) \sin \theta_i \, + \, (\eta_k - \eta_i) \cos \theta_i \end{eqnarray} \endnumparts In the case of a photometric survey, the weighted centers of luminosity of the source images can naturally be used as position coordinates. For a slitless spectroscopic survey, the mid-point of the first order spectrum integrated over a proper wavelength range can be used as position coordinate ~\citep{Markovic2017}. We define the domain of the focal plane coordinates to lie between $-1$ and $1$, i.e. $x \in [-1,1]$, $y \in [-1,1]$. The same scale is therefore used for the focal plane coordinates and the sky coordinates (see figure~\ref{fig:observations}). \subsection{Observations} \label{sec:obs} The \emph{expected counts} $\mu_{k(i)}$ for the $k$-th source in the $i$-th observation is obtained as the product of the intrinsic count rate of the source $r_{k}$, the exposure time $t_i$, and the assumed instrument response function $f(x,y)$ evaluated in the focal plane coordinates $(x_{k(i)}, y_{k(i)})$, \begin{equation} \label{eq:meancnt} \mu_{k(i)} = f (x_{k(i)}, y_{k(i)}) \, r_{k} \, t_i \, . \end{equation} The \emph{response function} $f(x,y)$ models the overall light collecting efficiency of the entire telescope and the spectro-photometric instrument, including variations in its optics. In the synthetic survey simulation, $f(x,y)$ is provided as input. In this work, we employed three levels of complexity on top of the response function. In the first level, we assume a single detector with a uniform gain over the whole focal plane; in the second level, the detector is segmented in four equal parts separated by small gaps; in the third complexity level, we account for small instrumental differences in the global performance of the four detectors. Each detector is parametrized with its own multiplicative scale factor called \emph{gain}. Examples of response functions used in the tests are given in figure~\ref{fig:1-resp-focalplane}. The \emph{observed count} of the $k$-th source in the $i$-th observation is denoted by $c_{k(i)}$. In general, the observed count receives contributions from both the signal and the noise. The method presented in this work relies on the assumption that the noise is known with sufficient accuracy, either from a noise model or from data driven methods. A complete noise model includes variations of the noise across the focal plane and the detector elements, and over time. In our simulations, we simply model the noise with a uniform term $n_i$ (for the $i$-th exposure) across the focal plane. The contribution of $n_i$ can be parameterized as the sum of a constant plus a linear term in the exposure time. This noise model is adequate for detectors whose parameters are known either from the manufacturers or from ground calibrations. Implementing more realistic noise models is beyond the scope of this work. Nevertheless, the inference procedure implemented in section~\ref{sec:inference} is suitable for more sophisticated noise models, as long as the noise mean and variance are known. The observed $c_{k(i)}$ is sampled performing an extraction from a Poisson distribution with mean $ \mu_{k(i)} + n_i$ and subtracting the noise term from it, as follows: \begin{equation} \label{eq:extraction} c_{k(i)} = {\rm Poisson}[ \mu_{k(i)} + n_i] - n_i \, . \end{equation} The model simulates the effect of a known stochastic noise which is subsequently subtracted (e.g. in a post-exposure processing phase). The net effect of $n_i$ in equation~(\ref{eq:extraction}) is an increase of the fluctuations of the random variable $c_{k(i)}$, which is ultimately distributed as a Poissonian distribution with expected value $\mu_{k(i)}$ and variance $\mu_{k(i)} + n_i$. The inference procedure implemented in this work is based on a $\chi^2$ statistics; therefore, the method relies on the assumption that the count distribution is well described by a Gaussian. In this work, we consider as usable sources for the in-flight calibrations those with counts in the range $10^4-10^6$, on top of which we include a noise $n_i$ of order $10^3$. With these counts, the random variable distribution $c_{k(i)}$ in~(\ref{eq:extraction}) is well approximated by a Gaussian of mean $\mu_{k(i)}$ and sample variance \begin{equation} \sigma^2_{k(i)} = c_{k(i)} + n_i \, , \end{equation} thus justifying the use of a $\chi^2$-based method for the inference of the response function. The self-calibration procedure provides a method for the statistical inference of the (a priori unknown) response function $f(x,y)$. A key feature of the self-calibration method is that the inferred response function can only be determined up to a uniform scale factor. This can be understood by noting the \emph{degeneracy} between the scale of the response function (i.e. a multiplicative factor in $f$) and the intrinsic source rates $r_{k}$ in equation~(\ref{eq:meancnt}): the detection is only sensitive to their product. A scenario where all the sources are fainter by a common scale factor provides the same expected counts as a scenario where the instrument response function is uniformly lower by the same scale factor. The degeneracy can be handled by interpreting the response function as relative to an arbitrary reference point in the focal plane. The function $f(x,y)$ thus models the ratio of the instrument response to the response in the reference point ${(x,y)}_{\rm ref}$: \begin{equation} f^{\rm{relative}} (x,y) := \frac {f^{\rm{absolute}} (x,y)} {f^{\rm{absolute}} {(x,y)}_{\rm{ref}}} \, . \end{equation} The relative response function clearly returns one in the reference point. We choose the reference point as the center of the focal plane, i.e. in the coordinate pair $(x=0, y=0)$. Throughout the paper, we drop the `relative' and `absolute' specifications in the notation of $f(x,y)$: $f(x,y)$ always refers to the \emph{relative} response function, unless otherwise specified. The \emph{synthetic calibration survey} is then described by the collection of the sets $\{c_{k(i)}, \sigma^2_{k(i)}, (x_{k(i)}, y_{k(i)}), t_i\}$, spanning over $k$ sources and $i$ exposures. \section{The parametric relative response function} \label{sec:response} The reconstructed relative response function, denoted by $\hat f(x,y \, | \qvec, \gvec)$, is parametrized in order to account for a smooth variation due to the telescope optics $\hat f(x,y \, | \qvec)$, on top of possible discontinuous effects due to the use of detectors with slightly difference performances in the different sectors. The function $\hat f(x,y \, | \qvec, \gvec)$ is defined in the domain $x \in [-1,1]$ and $y \in [-1,1]$ and is represented as: \begin{equation} \label{eq:expansion2} \hat f(x,y \, | \qvec, \gvec) = \sum_{\ell=0}^N q_\ell \, w_\ell (x,y) \, \sum_{s} g_s \Theta_s (x, y) \, . \end{equation} The first sum is a linear combination over a basis in a space of two dimensional continuous functions: \begin{equation} \label{eq:recocontinuous} \hat f(x,y \, | \qvec) = \sum_{\ell=0}^N q_\ell \, w_\ell (x,y) . \end{equation} The function $w_\ell$ is the $\ell$-th element of the basis set $\{ w_\ell (x,y) \}$ and the \emph{coefficient} $q_\ell$ is the corresponding element of the coefficient vector $\vec{q}$. The choice of the basis is arbitrary: the method for inferring the coefficients $\vec{q}$ illustrated in this work is general with respect to the choice of the basis. Nevertheless, some of the special functions of mathematical physics are particularly suited as basis set. In this work, we tested three sets of basis: the set of powers, the Legendre polynomials, and the Fourier basis. The construction of these bases is detailed in~\ref{sec:expansion}. The second sum of~(\ref{eq:expansion2}) is extended to all the sectors, and $\Theta_s (x, y)$ is the projector on the $s$-th sector: $\Theta_s (x, y)$ equals one if the coordinate $(x,y)$ belongs to the detector sector $s$, and it is zero elsewhere. The response in each sector is further multiplied by a scale factor $g_s$, that we generically name \emph{sector gain}. The set of the gains $\{g_s\}$'s is conveniently represented as a vector $\vec{g}$. The purpose of the $\{g_s\}$'s is to parametrize the slightly different performances of each detector which may be due to its intrinsic efficiency and signal amplification. Following the conventions outlined in section~\ref{sec:obs}, the relative response function must return unity in the origin of the focal plane coordinates. Once the basis set $\{ w_\ell \}$ is chosen, the normalization of the relative response function $\hat f (0,0 | \vec{q}, \vec{g}) = 1$ can be converted into a constraint on the coefficients $\{ q_\ell \}$'s and on the gain of the central sector $g_c$: \begin{equation} \label{eq:normalizationql} g_c\sum_{\ell=0}^N q_\ell w_\ell (0,0) = 1 \, . \end{equation} The normalization constraint must always be satisfied, regardless of the basis. Without loss of generality, we set the gain in the central sector $g_c$ to one: all the gains in the other sectors are relative to the gain in the central sector. In case there is only one single sector, equation~\ref{eq:expansion2} reduces to equation~\ref{eq:recocontinuous}. \section{Statistical inference} \label{sec:inference} In the in-flight self calibration method, the inference of the set of source rates $\{ r_{k} \}$'s, the relative response coefficients $\{ q_\ell \}$'s, and the relative gains $\{ gs \}$'s is obtained by comparing each observed count $c_{k(i)}$ against its expected count. As described in section~\ref{sec:synt}, we are employing a synthetic calibration survey, and we model an observation by the set $\{c_{k(i)}, \sigma^2_{k(i)}, (x_i, y_i), t_i\}$; nevertheless, the method described here can be employed with no modifications in a realistic survey, e.g. using the detected counts for $c_{k(i)}$ and a combination of data driven methods and simulations for $\sigma^2_{k(i)}$. One of the advantages of the method is that it can be used without any additional prior information about the $\{ r_{k} \}$'s, the $\{ q_\ell \}$'s, and the $\{ g_s \}$'s: both in the synthetic calibration survey output and in a real survey, the intrinsic source count rates and the response function are initially unknown. A test statistics must be chosen in order to perform a statistical parametric inference. Since the in-flight self calibration method deals with counts, a choice could have been made towards a likelihood inference, based on Poisson statistics. However, given the high-statistics of the observed counts, the Gaussian approximation is more than adequate, and a $\chi^2$ can be used instead of the likelihood. Using a Neyman's $\chi^2$ as test statistics, we can derive linear expressions for the best values of the $\{ r_{k} \}$'s, the $\{ q_\ell \}$'s, and the $\{ g_s \}$'s as detailed in~\ref{sec:iterative}. Also, the value of the $\chi^2$ at the minimum is an indicator of the goodness of the model. The matrix of the second derivatives of the $\chi^2$ with respect to the $\{ r_{k} \}$'s, the $\{ q_\ell \}$'s, and the $\{ g_s \}$ can be written in an explicit form. The inverse of the second derivatives matrix, the covariance matrix, is used to estimate the statistical uncertainty on the rates $\{ \delta r_{k} \}$'s and on the reconstructed relative response function, $\delta \hat f(x,y \, | \qvec, \gvec)$. The computation of the uncertainties is detailed in~\ref{sec:uncertainties}. \subsection{The $\chi^2$ of the in-flight self calibration method} \label{sec:kisqminim} A Neyman's $\chi^2$ is used as the test-statistics and for the parameter inference of the source rates $\{ r_{k} \}$'s, the coefficients $\{ q_\ell \}$'s, and the relative gains $\{ g_s \}$'s of the parametric relative response $\hat f(x,y \, | \qvec, \gvec)$. The experimental $\hat \chi^2$ is \begin{equation} \label{eq:kisq} \hat \chi^2 \, = \, \sum_k \, \sum_i^{\nk}{ \frac {\left [ c_{k(i)} \, - \, \hat f(x_{k(i)}, y_{k(i)} \, | \qvec, \gvec) r_{k} t_i \right ]^2} {\sigma^2_{k(i)}} } \, . \end{equation} The sum iterates over each source ($k$ label) and over the $n_k$ exposures ($i$ label) where the $k$-th source has been observed. In the numerator of equation~(\ref{eq:kisq}) the observed count $c_{k(i)}$ of the $k$-th source in the $i$-th exposure is compared to its expected value; the expected (theoretical) count is the product $\hat f(x_{k(i)}, y_{k(i)} \, | \qvec, \gvec) r_{k} t_i$, where the reconstruction function is evaluated at the focal plane coordinates of the observation. The denominator of equation~(\ref{eq:kisq}) is the variance $\sigma^2_{k(i)}$ of the $i$-th observation of the $k$-th source. In a real survey, $\sigma^2_{k(i)}$ can be estimated from data driven methods or Monte Carlo simulations. As described in section~\ref{sec:obs}, the Gaussian approximation is valid and the use of a $\chi^2$ is adequate. At the $\chi^2$ minimum, the experimental $\hat \chi^2$~(\ref{eq:kisq}) follows a $\chi^2$ distribution with the number of degrees of freedom $N_{\rm dof}$ given by the number of source observations, minus the numbers of sources, minus the number of coefficients $\{ q_\ell \}$ except one, minus the number of detector sectors except one: \begin{equation} \label{eq:ndf} N_{\rm dof} \, \equiv \, \sum_k \, (n_k - 1) - \sum_{\ell=1}^N 1 \, - \sum_{s=1}1 \, . \end{equation} The values of the source intrinsic rates $\{ r_{k} \}$'s, of the relative response coefficients $\{ q_\ell \}$'s, and of the relative gains $\{ g_s \}$'s can be inferred by minimizing the $\hat \chi^2$ in~(\ref{eq:kisq}). The minimization must be subject to the additional constraint that the relative response $\hat f(x,y \, | \qvec, \gvec)$ equals one in the focal plane origin. In summary, the minimization of the $\hat \chi^2$ is subject to the following conditions: \begin{equation} \label{eq:kisqminim} \left \{ \begin{array}{l} \frac{\partial \kisqe}{\partial \rate} = 0 \\ \\ \frac{\partial \kisqe}{\partial \ql} = 0 \quad (\ell = 1, \dots, N) \\ \\ \sum_{\ell=0}^N q_\ell w_\ell (0,0) = 1 \\ \\ \frac{\partial \kisqe}{\partial \gs} = 0 \quad (s \mbox{ not central}) \end{array} \right. \end{equation} The minimum of the $\hat \chi^2$ is given by the solution of the system~(\ref{eq:kisqminim}). We choose to solve the system with an expectation-maximization iterative procedure, whose implementation is detailed in~\ref{sec:iterative}. The numeric solution of~(\ref{eq:kisqminim}) starts by initializing $\hat f(x,y \, | \qvec, \gvec)$ to the uniform response: the coefficients $\{ q_\ell \}$'s are all set to zero, except $q_0 = 1/w_0(0,0)$, and all the gains $\{ q_\ell \}$'s are set to one. The iterative procedure then repeats the following four steps: \begin{enumerate} \item The intrinsic source rates $\{ r_{k} \}$'s are estimated with equation~(\ref{eq:dkisqdrarrow}), where the parameters of $\hat f(x,y \, | \qvec, \gvec)$ are fixed at the previous iteration values. \item The response coefficients $\{ q_\ell \}$'s ($\ell = 1, \cdots, N$) are updated with equation~(\ref{eq:dkisqdqarrow}), where the $\{ r_{k} \}$'s and the $\{ g_s \}$'s are fixed at the previous step values. \item The response coefficient $q_0$ is updated following the normalization constraint (equation~\ref{eq:constraintq0}), where the other $\{ q_\ell \}$'s are fixed at the previous step values. \item The gains $\{ g_s \}$'s are updated with equation~(\ref{eq:dkisqdgarrow}), where the $\{ r_{k} \}$'s and the $\{ q_\ell \}$'s are fixed at the previous step values. The gain of the central sector is always fixed to one. \end{enumerate} The iteration is stopped when the $\hat \chi^2$, computed with~(\ref{eq:kisq}) after the fourth step, differs from the $\hat \chi^2$ computed in the previous iteration by less than a configurable amount (set by default to $10^{-3}$). The \emph{statistical uncertainties} of the intrinsic source rates $\{ \delta \rate \}$, of the response coefficients $\{ \delta \ql \}$, and of the gains $\{ g_s \}$ are estimated from the diagonal elements of the covariance matrix, computed as the inverse of the (halved) second derivatives matrix of the $\hat \chi^2$. The computation is detailed in~\ref{sec:uncertainties}. Specific tests, detailed in~\ref{sec:validation}, have been performed to validate the inference procedure. The validation tests confirmed that the inference of the intrinsic source rates $\{ r_{k}\}$'s, the relative response coefficients $\{ q_\ell \}$'s, the relative gains $\{ g_s \}$'s, and the parametric reconstructed relative response function $\hat f(x,y \, | \qvec, \gvec)$ provide unbiased estimates. The test confirmed also that the minimum value of the experimental $\hat \chi^2$ obtained by the iterative minimization procedure follows indeed a $\chi^2$ distribution with $N_{\rm dof}$ given by~(\ref{eq:ndf}). In all our tests, the solution of the system~(\ref{eq:kisqminim}) converged with fewer iterations when using the Legendre polynomial basis, compared to the other bases. \section{Test on mock-up response function with realistic conditions} \label{sec:test} \newcommand{\mbox{MAD}}{\mbox{MAD}} \newcommand{\mbox{CAD}}{\mbox{CAD}} \newcommand{\mbox{UF}(0.7\%)}{\mbox{UF}(0.7\%)} \newcommand{\mbox{UF}(0.5\%)}{\mbox{UF}(0.5\%)} \newcommand{\mbox{UF}(0.1\%)}{\mbox{UF}(0.1\%)} \begin{figure*}[tpb] \centering \includegraphics[width=.48\textwidth]{figures/worst-MAD-2x2-leg6.pdf} \includegraphics[width=.48\textwidth]{figures/worst-CAD-2x2-leg6.pdf} \caption{Mock-up tests results: scatter plot of \mbox{MAD}\ (maximum absolute difference) and \mbox{CAD}\ (cumulative absolute difference), obtained in the realizations with the worst values, against the number of average sources in the field of view and the number of exposures. The reconstruction is performed with a Legendre polynomial basis, with maximum degree 6. } \label{fig:worst-MAD-CAD-leg6} \end{figure*} \begin{figure*}[tpb] \centering \includegraphics[width=.48\textwidth]{figures/tot-CAD-2x2-leg4.pdf} \includegraphics[width=.48\textwidth]{figures/tot-CAD-2x2-leg6.pdf} \caption{Mock-up tests results: scatter plot of $\mbox{CAD}$ (cumulative absolute difference) against the number of degrees of freedom of the realization. The reconstruction is performed with a Legendre polynomial basis, with maximum degree 4 (\emph{left}) and 6 (\emph{right}). } \label{fig:tot-CAD-4567} \end{figure*} \begin{figure*}[tpb] \centering \includegraphics[width=.48\textwidth]{figures/tot-UF-07-2x2-leg4.pdf} \includegraphics[width=.48\textwidth]{figures/tot-UF-07-2x2-gains-leg6.pdf} \caption{Mock-up tests results: scatter plot of $\mbox{UF}(0.7\%)$ (unusable fraction given a threshold of $0.7\%$) against the number of degrees of freedom of the realization. The reconstruction is performed with a Legendre polynomial basis, with maximum degree 4 (\emph{left}) and 6 (\emph{right}).} \label{fig:tot-UF07-4567} \end{figure*} \begin{figure*}[tpb] \centering \includegraphics[width=.49\textwidth]{figures/median-bad-f2p2-2x2-leg468.pdf}\hfill \includegraphics[width=.49\textwidth]{figures/median-bad-f2p2-ideal-leg468.pdf} \medskip \includegraphics[width=.49\textwidth]{figures/median-cumdiff-f2p2-2x2-leg468.pdf} \includegraphics[width=.49\textwidth]{figures/median-cumdiff-f2p2-ideal-leg468.pdf} \medskip \includegraphics[width=.49\textwidth]{figures/median-verybad-f2p2-2x2-leg468.pdf}\hfill \includegraphics[width=.49\textwidth]{figures/median-verybad-f2p2-ideal-leg468.pdf} \caption{Mock-up tests results: trends plots of the goodness metrics against the number of degrees of freedom of the realization and the Legendre basis maximum degree. The \emph{left} column refers to a detector with 4 sectors, each one with a different gain $g_s$ and with small gaps between sectors; the \emph{right} column refers to a single unsegmented detector over the focal plane. Each median of the distributions is represented by the thick line. The distribution enclosed within the $10\%$ and $90\%$ quantiles is represented by the shaded area. The metrics are: $\mbox{MAD}$ (\emph{top}), $\mbox{CAD}$ (\emph{centre}), and $\mbox{UF}(0.7\%)$ (\emph{bottom}). Note that the scale of $\mbox{UF}(0.7\%)$ differs of a factor 10 in the two cases. } \label{fig:trend} \end{figure*} \begin{figure*}[tpb] \centering \includegraphics[width=.49\textwidth]{figures/example_1-freco_leg6_1sector.pdf} \hfill \includegraphics[width=.47\textwidth]{figures/example_residuals_leg6_1sector.pdf} \caption{\emph{left}: reconstructed $1-\hat f(x,y \, | \qvec)$ in a mock-up test with 1 sector, using a Legendre reconstruction basis of maximum degree 6 ($\hat \chi^2/ N_{\rm dof} = 3927.59/3766 = 1.043$); \emph{right}: corresponding residuals $(f(x,y) - \hat f(x,y \, | \qvec) )/ \delta \hat f(x,y \, | \qvec)$ in the focal plane. } \label{fig:mock-residuals-1sector} \end{figure*} \begin{figure*}[tpb] \centering \includegraphics[width=.49\textwidth]{figures/example_1-freco_gains_leg8.pdf} \hfill \includegraphics[width=.47\textwidth]{figures/example_residuals_2x2_leg8.pdf} \caption{\emph{left}: reconstructed $1-\hat f(x,y \, | \qvec, \gvec)$ in a mock-up test with 4 sectors, using a Legendre reconstruction basis of maximum degree 8 ($\hat \chi^2/ N_{\rm dof} = 3228.66/3430 = 0.941$); \emph{right}: corresponding residuals $(f(x,y) - \hat f(x,y \, | \qvec, \gvec) )/ \delta \hat f(x,y \, | \qvec, \gvec)$ in the focal plane. } \label{fig:mock-residuals} \end{figure*} The framework presented in the previous sections can be adopted by upcoming galaxy surveys to characterize the in-flight self-calibrations, simulating distributions of sources, exposures, and response functions representative of realistic conditions. The simulations can be used to evaluate the goodness of the instrument reconstruction function and choose among several self-calibration plans. In this section, we exemplify a way to quantify the performance of the self-calibration for a generic spectro-photometric survey using \emph{mock-up tests} with randomly generated sky catalogues. The mock-up relative response function $f(x,y)$ used is representative of a plausible variation due to the telescope optics. The inference of the reconstruction function $\hat f(x,y \, | \qvec)$ is performed using a Legendre polynomial basis. A set of metrics has been defined to quantify the goodness (or badness) of the reconstructed $\hat f(x,y \, | \qvec, \gvec)$ against the mock-up response function $f(x,y)$. The goodness of the reconstruction is studied against the average number of sources, exposures, number of degrees of freedom, and the degree of the reconstruction basis. \subsection{Mock-up self-calibration setup} \label{sec:mockup} In each mock-up self-calibration test, 500 different synthetic calibration surveys are randomly produced. Each of the 500 calibration surveys shares the same average number of sources in the field of view and the same number of exposures; the sources location $(\xi,\eta)_k$, their magnitude, the exposure sky coordinates $(\xi,\eta)_i$, and their orientation angles are randomly extracted in each realization. An illustration of a mock-up self calibration survey is displayed in figure~\ref{fig:1-resp-focalplane}-\emph{left}. In a given realization, the synthetic sky catalogue is created with a fixed number density of sources in random locations of the sky, extracted uniformly in the range $\xi \in (-3,3)$ and $\eta \in (-3,3)$. The exposure sky coordinates are uniformly extracted in a narrower central region: $\xi \in (-1,1)$ and $\eta \in (-1,1)$. In order to obtain a realistic distribution of count rates in our simulations, we take the distribution of stellar magnitudes from the Besan\c{c}on synthetic model of the Galaxy~\citep{besanconmodel}, approximating it with a power law fit over a suitable magnitude range of interest. We arbitrarily considered stars with AB magnitudes between 17\ and 12, assuming that stars brighter than $m_{\rm AB} = 12$ would saturate the detector pixels and stars fainter than $m_{\rm AB} = 17$ are too low in signal-to-noise ratio to be reliably used for calibration purposes. For a reference Galactic latitude of $80 ^\circ$, the number of calibration bright stars of a given $m_{\rm AB}$ expected in the field of view scales as: \begin{equation} \label{eq:generalnumbermag} N(m_{\rm AB}) \propto \, 10^{0.26 \, (m_{\rm AB} -12)}. \end{equation} The star magnitudes are then converted to intrinsic detector count rates by assuming a constant spectral energy density, the wavelength integration range, and an ideal quantum efficiency over this range. In the case of a slitless spectroscopic survey, in order to increase the signal-to-noise ratio and avoid detector saturation due to bright sources, the source counts can be obtained by integrating the first order spectrum over a proper wavelength range (e.g. $500 \, \mathring{A}$ in~\citep{Markovic2017}). A more accurate modelling of the source population and their respective spectrum is beyond the scope of this study. The conversion from star magnitudes to counts on the detector was computed starting from previous simulations. Sources with magnitude $m_{\rm AB} = 17$ correspond to count rates $r_{\rm low}$ about $10^4 / (\expvisnisps)$; bright sources with magnitude $m_{\rm AB} = 12$ correspond to count rates $r_{\rm high}$ about $10^6 / (\expvisnisps)$. The relative response function $f(x,y)$ used in the mock-up tests is decreasing toward the edges of the focal plane, by a few percents, and has radial symmetry at a first approximation. We parametrize the mock-up relative response function as a superimposition of a quadratic polynomial and a few sinusoidal terms. The radially-symmetric behaviour is representative of vignetting; the sinusoidal terms have been included to further complicate the response and stress the reconstruction procedure. We employed three levels of complexity on top of the mock-up response function. In the first level, we assume a single unsegmented detector with a uniform gain over the whole focal plane; in the second level, the detector is segmented in four equal parts separated by gaps of about $5\%$ of the field of view side; in the third complexity level, the four detector sectors have different relative gains in the range $100\%-90\%$. The response functions used the mock-up tests is shown in figure~\ref{fig:1-resp-focalplane}; all the mock-up tests of complexity level 1 use the function in figure~\ref{fig:1-resp-focalplane}-\emph{left}; the mock-up test for complexity level 2 uses the same function, with the addition of the inter detector gaps; for complexity level 3, the function in figure~\ref{fig:1-resp-focalplane}-\emph{right} is used. In the following figures, the mock-up response function is referred to as \emph{Power2}+\emph{Fourier2}. In the mock-up self-calibration tests, the response function $f(x,y)$ and the reconstruction function $\hat f(x,y \, | \qvec, \gvec)$ are not parametrized in the same form (\emph{e.g.} with the same basis). This mimics a realistic situation, in which the instrumental response is unknown. Following the results of the validation tests (\ref{sec:validation}), we use the Legendre polynomials as reconstruction basis. \subsection{Metrics for the goodness of reconstruction} \label{sec:metrics} The metrics to quantify the goodness of the reconstructed $\hat f(x,y \, | \qvec, \gvec)$ are: the maximum absolute difference, the cumulative absolute difference, and the unusable fractions. The \emph{maximum absolute difference} (MAD) is defined as the maximum of the absolute difference between the mock-up $f(x,y)$ and the reconstructed $\hat f(x,y \, | \qvec, \gvec)$, \begin{equation} \mbox{MAD} \, := \, \mbox{max} \left( \, \left | f(x,y) - \hat f(x,y \, | \qvec, \gvec) \right | \right) \, , \end{equation} evaluated on the whole domain of the focal plane excluding the gaps between the detector sectors. The \emph{cumulative absolute difference} (CAD) is defined as the spatial integral of the absolute difference between the mock up $f(x,y)$ and the reconstructed $f(x,y)$: \begin{equation} \mbox{CAD} \, := \, \frac{\int_{\rm{FP}} \, \left | f(x,y) - \hat f(x,y \, | \qvec, \gvec) \right | \, {\rm d}S \,} {\int_{\rm{FP}} \, {\rm d}S }, \end{equation} where the surface integral runs over the whole focal plane excluding the gaps between the detector sectors. The \emph{unusable fraction}, given a \emph{threshold} (UF(th$\%$)), is defined as the fraction of the focal plane where the absolute deviation $| f(x,y) - \hat f(x,y \, | \qvec, \gvec) | $ exceeds a certain threshold. In particular, we use the unusable fraction for absolute deviations above $0.7\%$, i.e. $\mbox{UF}(0.7\%)$. \subsection{Results of mock-up tests} \label{sec:results} This section reports the relevant results obtained in the mock-up tests. In all our mock-up tests, the iterative minimization procedure (\ref{sec:iterative}) converged. In the mock-up tests with one single unsegmented detector, the minimum of $\hat \chi^2$ is found within a few tens of iterations. The case with four detectors separated by gaps, each one with the same gain, does not present any substantial difference. In the mock-up tests with four detector sectors with different gains, the number of iterations needed is about a few hundreds. As expected, the mock-up tests show that increasing both the average number of sources and the number of exposures is likely to improve the goodness of the reconstruction. The $\hat \chi^2$ is good if the reconstruction basis degree is sufficiently high. The focal plane can then be reconstructed (and thus calibrated) to high accuracy. We studied the trends of the worst (maximum) $\mbox{MAD}$ and $\mbox{CAD}$ values among the 500 realizations of each scenario. Figure~\ref{fig:worst-MAD-CAD-leg6} shows the values of the $\mbox{MAD}$ and $\mbox{CAD}$ metrics, against the number of sources in the field of view and the number of exposures, restricted to the realizations with the worst values. The basis of the reconstructed $\hat f(x,y \, | \qvec)$ is a Legendre polynomial basis with maximum degree 6 in $x$ or $y$ (for maximum degree 6 we mean a basis with $N=28$ terms, including all the polynomials up to a total power of 6). The plots show that increasing both the average number of sources and the number of exposures is likely to improve the goodness of the reconstruction. The trends also suggest that the number of degrees of freedom $N_{\rm dof}$ (equation~\ref{eq:ndf}) of the realization is a driver of the goodness of reconstruction: realizations with similar number of observations (average number of sources times exposures, at a crude approximation) have similar values of $\mbox{MAD}$ or $\mbox{CAD}$ when the number of observations is low, and tend towards an asymptotic value of $\mbox{MAD}$ or $\mbox{CAD}$ when the number of observations is high. Figure~\ref{fig:tot-CAD-4567} and figure~\ref{fig:tot-UF07-4567} show the scatter plots of the $\mbox{CAD}$ and $\mbox{UF}(0.7\%)$ metrics respectively, against the number of degrees of freedom of the realization. The basis of the reconstructed $\hat f(x,y \, | \qvec)$ is a Legendre polynomial basis with maximum degree 4 and 6. The scatter plots show how the number of degrees of freedom drives the goodness of reconstruction. The values of the metrics in realizations with the same number of degrees of freedom are contained within a band, which becomes narrower by increasing the number of degrees of freedom. The lower side of the band (good reconstruction) reaches an asymptotic value, which is strongly driven by the maximum degree of the reconstruction basis: only by increasing the degree of the basis, the asymptotic value can jump to lower values, allowing better reconstructions. Similar results are found for the $\mbox{MAD}$ and the other UF metrics. In order to easily compare the trends, we compute the median and the $10\%-90\%$ quantiles of each of the metric distributions. We show in figure~\ref{fig:trend} the trends of the median and quantiles of each metric against the number of degrees of freedom and the maximum degree of the Legendre basis, for the $\mbox{MAD}$, $\mbox{CAD}$, and $\mbox{UF}(0.7\%)$ metrics respectively. The trends are shown both for the scenario with one single unsegmented detector and in the case with four detectors with small gaps between them and a different relative gain $g_s$ in each detector sector. The trend plots show that it is possible to reach a good level of calibration even with the additional complexity introduced by the estimation of the $\{ g_s \}$'s in $\hat f(x,y \, | \qvec, \gvec)$, as long as $N_{\rm dof}$ is sufficiently high. In our mock-up tests, with the mock-up response function in figure~\ref{fig:1-resp-focalplane}, working with a number of degrees of freedom about 1000 allows one to obtain a calibration maximum discrepancy of less than $0.7\%$ in a fraction of the focal plane larger than $99\%$ (see figure~\ref{fig:trend}-\emph{bottom}). In our simulations, $N_{\rm dof} \approx 1000$ can be reached either with a mean number of 60 sources in the field of view and 20 exposures, or with 30 sources and at least 30 exposures. Figure~\ref{fig:mock-residuals-1sector} and \ref{fig:mock-residuals} show the reconstructed $\hat f(x,y \, | \qvec, \gvec)$ and the residuals $(f(x,y) - \hat f(x,y \, | \qvec, \gvec)) / \delta \hat f(x,y \, | \qvec, \gvec)$ in two different mock-up tests with $N_{\rm dof} \sim 4000$ and a reconstruction with a Legendre polynomial basis with maximum degree 6 and 8 respectively. The mock-up test displayed in figure~\ref{fig:mock-residuals-1sector} is performed with a single detector sector and using the input response function $f(x,y)$ represented in figure~\ref{fig:1-resp-focalplane}-\emph{left}. The reconstructed $\hat f(x,y \, | \qvec)$ (figure~\ref{fig:mock-residuals-1sector}-\emph{left}) approximates the input $f(x,y)$ (figure~\ref{fig:1-resp-focalplane}-\emph{left}) with high accuracy. The residuals of $\hat f(x,y \, | \qvec)$ in every point of the focal plane are contained between $+3.3$ and $-3.5$, showing that the uncertainty is also properly estimated (figure~\ref{fig:mock-residuals-1sector}-\emph{right}). The mock-up test displayed in figure~\ref{fig:mock-residuals} is performed with 4 detector sectors and using the input response function $f(x,y)$ represented in figure~\ref{fig:1-resp-focalplane}-\emph{right}. Similarly, the reconstructed $\hat f(x,y \, | \qvec, \gvec)$ (figure~\ref{fig:mock-residuals}-\emph{left}) accurately approximates the input $f(x,y)$ (figure~\ref{fig:1-resp-focalplane}-\emph{right}) and the residuals are contained between $+3$ and $-3$ (figure~\ref{fig:mock-residuals}-\emph{right}). Similar studies can be performed for specific surveys and instruments to infer quantitative information about the self-calibration survey layout needed to reach a target accuracy. The precise number of calibration sources and exposures needed to reach a target accuracy is affected by the complexity of the instrument response function, the detector noise level, and the distribution of the sources. Nevertheless, the trends shown in this work could represent a plausible scenario. \section{Conclusions} This work illustrates and quantifies a technique for the in-flight relative flux self-calibration method, which generalizes the procedure outlined in~\citep{holmes2012designing}. The technique can be applied for the in-flight calibration of a generic spectro-photometric instrument. The method is based on the repeated observations of sources in different positions of the focal plane, following a random observation pattern. The procedure is based on a $\chi^2$ statistical inference where the reconstruction function accounts for a smooth continuum variation, due to telescope optics, on top of a discontinuous effect due to the segmentation of the detector in different sectors. The method provides an unbiased inference of the count rates of the sources and of the reconstructed relative response function, in the limit of high count rates. Mock-up tests have been used to study the convergence of the reconstructed function to an arbitrarily complicated instrument response. We show that the reconstruction also works in case where the detector is segmented in macro-sectors separated by small gaps. We show that in this procedure the number of repeated observations drives the goodness of the reconstruction. This means that a small number of exposures can be compensated by a large number of sources in the field of view, or vice-versa. If the number of repeated observations is sufficiently high, it is possible to reconstruct the relative instrument response function with high accuracy, without any prior knowledge. This work can help defining the self-calibration plan for future large scale surveys, and is particularly useful for space missions whose observation time is subject to tight schedules. \ack Authors are grateful to the Euclid Consortium and in particular Y.~Copin and the whole OU-SIR group, P.~Schneider, G.~Zamorani, M.~Sauvage and K.~Jahnke for the useful discussions including possible future applications of our method to the NISP instrument of the Euclid experiment, and for the help in the review of the document. Simulations and computations in this work have been performed at the computing facilities of INFN, Sezione di Genova: authors wish to thank the INFN LSF personnel in Genova for their precious and constant support.
\section{Introduction and physics motivations} In the present paper we revisit the operator mixing in asymptotically free gauge theories massless to all perturbative orders, such as QCD with massless quarks. We refer for short to such theories as massless QCD-like theories.\par In fact, nonperturbatively, according to the renormalization group (RG), massless QCD-like theories develop a nontrivial dimensionful scale that labels the RG trajectory -- the RG invariant -- $\Lambda_{RGI}$: \begin{eqnarray} \label{1} \Lambda_{RGI} \sim \mu \, e^{-\frac{1}{2\beta_0 g^2}} g^{-\frac{\beta_1}{ \beta_0^2}} c_0 (1+\sum^{\infty}_{n=1} c_n g^{2n}) \end{eqnarray} -- the only free parameter \cite{MBR,MBL} in the nonperturbative S matrix of confining massless QCD-like theories \cite{MBR,MBL} -- that any physical mass scale must be proportional to, with $\beta_0$ and $\beta_1$ the renormalization-scheme independent first-two coefficients of the beta function $\beta(g)$: \begin{eqnarray} \label{2} \frac{\partial g}{\partial \log \mu}=\beta(g)= -\beta_0 g^3 - \beta_1 g^5 + \cdots \end{eqnarray} and $g=g(\mu)$ the renormalized coupling.\par Hence, our main motivation is for the study of the ultraviolet (UV) asymptotics, implied by the RG, of $2$-, $3$- and $n$-point correlators of gauge-invariant operators for the general case of operator mixing, in relation to an eventual nonperturbative solution, specifically in the large-$N$ limit \cite{H,V,Migdal,W}.\par In this respect, the study of the UV asymptotics for correlators of multiplicatively renormalizable operators \cite{MBM,MBN,MBH}, apart from the intrinsic interest \cite{R}, sets powerful constraints \cite{MBM,MBN,MBH,MBR,MBL,BB} on the nonperturbative solution of large-$N$ confining QCD-like theories.\par Accordingly, the present paper is the first of a series, where we intend to study the structure of the UV asymptotics of gauge-invariant correlators implied by the RG in the most general case above, in order to extend the aforementioned nonperturbative results \cite{MBM,MBN,MBH,MBR,MBL,BB} to operator mixing.\par In particular, since operator mixing is ubiquitous in gauge theories, an important problem, which is hardly discussed in the literature, is to determine under which conditions it may be reduced, to all orders of perturbation theory, to the multiplicatively renormalizable case. \par The aim of the present paper is to solve this problem, and also to classify the cases of operator mixing where the aforementioned reduction is not actually possible. \par \section{Main results and plan of the paper} We can exemplify the structure of the UV asymptotics of $2$-point correlators as follows. In massless QCD-like theories, we consider $2$-point correlators in Euclidean space-time: \begin{eqnarray} G_{ik}(x) = \langle O_i(x) O_k(0) \rangle \end{eqnarray} of renormalized local gauge-invariant operators $O_i(x)$: \begin{eqnarray} O_i(x)= Z_{ik} O_{Bk}(x) \end{eqnarray} where $O_{Bk}(x)$ are the bare operators that mix \footnote{In fact \cite{M01,M02,M03}, gauge-invariant operators also mix with BRST-exact operators and with operators that vanish by the equations of motion (EQM). But correlators of gauge-invariant operators with BRST-exact operators vanish, while correlators with EQM operators reduce to contact terms. Hence, for our purposes it suffices to take into account the mixing of gauge-invariant operators only.} under renormalization and $Z$ is the bare mixing matrix.\par The corresponding Callan-Symanzik equation \cite{C,S,Pes,Zub} reads in matrix notation \cite{BB2}: \begin{equation} \label{2.1} \left(x \cdot \frac{\partial}{\partial x}+\beta(g)\frac{\partial}{\partial g}+2D\right)G+\gamma(g) \, G+G \, \gamma^T(g)=0 \end{equation} with $\gamma^T$ the transpose of $\gamma$, $D$ the canonical dimension of the operators, and $\gamma(g)$ the matrix of the anomalous dimensions \footnote{The sign of the coefficient matrices in eq. \eqref{1.6}, $\gamma_0, \gamma_1, \cdots$, is the standard one, but opposite with respect to the convention employed in \cite{MBM,MBN,MBH,MBR,MBL,BB}.}: \begin{equation} \label{1.6} \gamma(g)=- \frac{\partial Z}{\partial \log \mu} Z^{-1}= \gamma_{0} g^2 + \gamma_{1} g^4 +\cdots \end{equation} The general solution has the form: \begin{equation} \label{2.2} G(x) = Z(x, \mu)\mathcal{G}(x,g(\mu),\mu)Z^T(x, \mu) \end{equation} with $\mathcal{G}(x,g(\mu),\mu)$ satisfying: \begin{equation} \label{2.3} \left(x \cdot \dfrac{\partial}{\partial x}+\beta(g)\dfrac{\partial}{\partial g}+2D \right)\mathcal{G} = 0 \end{equation} and: \begin{equation} \label{01.90} Z(x, \mu)=P\exp\left(-\int^{g(\mu)}_{g(x)}\frac{\gamma(g)}{\beta(g)}dg\right) \end{equation} where $Z(x, \mu)$ is the renormalized mixing matrix in the coordinate representation, $P$ denotes the path ordering of the exponential, and $g(\mu)$, $g(x)$ are short notations for the running couplings $g(\frac{\mu}{\Lambda_{RGI}})$, $g(x \Lambda_{RGI})$ at the corresponding scales, with UV asymptotics: \begin{equation} \label{1.12} g^2(x \Lambda_{RGI}) \sim \dfrac{1}{\beta_0\log(\frac{1}{x^2 \Lambda_{RGI}^2})} \left(1-\dfrac{\beta_1}{\beta_0^2} \dfrac{\log\log(\frac{1}{x^2 \Lambda_{RGI}^2})}{\log(\frac{1}{x^2 \Lambda_{RGI}^2})}\right) \end{equation} We will discuss the UV asymptotics of $\mathcal{G}(x,g(\mu),\mu)$ in \cite{BB2}, while in the present paper we concentrate on the UV asymptotics \footnote{In the present paper $\gamma(g)$ and $\beta(g)$ in eq. \eqref{01.90} are actually only defined in perturbation theory by eqs. \eqref{2} and \eqref{1.6}. In this case, eq. \eqref{01.90} only furnishes the UV asymptotics of $Z(x, \mu)$, thanks to the asymptotic freedom.} of $Z(x, \mu)$.\par In the general case, because of the path-ordered exponential and the matrix nature of eq. \eqref{01.90}, it is difficult to work out the actual UV asymptotics of $Z(x, \mu)$. \par Of course, were $\frac{\gamma(g)}{\beta(g)}$ diagonal, we would get immediately the corresponding UV asymptotics for $Z(x, \mu)$, as in the multiplicatively renormalizable case \cite{Pes,Zub}.\par Therefore, the main aim of the present paper is to find under which conditions a renormalization scheme exists where $Z(x, \mu)$ is diagonalizable to all perturbative orders.\par Another aim is to classify the cases of operator mixing where such a diagonalization is not possible.\par We accomplish the aforementioned purposes in three steps: \par In the first step (section \ref{3}), we furnish an essential differential-geometric interpretation of renormalization: We interpret a change of renormalization scheme as a (formal) holomorphic gauge transformation, $-\frac{\gamma(g)}{\beta(g)}$ as a (formal) meromorphic connection with a Fuchsian singularity at $g=0$, and $Z(x,\mu)$ as a Wilson line. \par In the second step (section \ref{4}), we employ the above interpretation to apply in the framework of operator mixing -- for the first time, to the best of our knowledge -- the theory of canonical forms, obtained by gauge transformations, for linear systems of differential equations with meromorphic singularities \cite{PD0}, and specifically (a formal version of) the Poincar\'e-Dulac theorem \cite{PD1} for Fuchsian singularities, i.e., simple poles. \par In the third step (section \ref{PD}), we provide a condensed proof of the Poincar\'e-Dulac theorem in the case (I) below, where $Z(x,\mu)$ is diagonalizable to all orders of perturbation theory.\par From the three steps above, our conclusions follow:\par As a consequence of the Poincar\'e-Dulac theorem, if the eigenvalues $\lambda_1, \lambda_2, \cdots $ of the matrix $\frac{\gamma_0}{\beta_0}$, in nonincreasing order $\lambda_1 \geq \lambda_2 \geq \cdots$, do not differ by a positive even integer (section \ref{4}), i.e.: \begin{eqnarray} \label{rce} \lambda_i -\lambda_j -2k \neq 0 \end{eqnarray} for $i\leq j$ and $k$ a positive integer, then it exists a renormalization scheme where: \begin{eqnarray} \label{0} -\frac{\gamma(g)}{\beta(g)}= \frac{\gamma_0}{\beta_0} \frac{1}{g} \end{eqnarray} is one-loop exact to all orders of perturbation theory, with $-\frac{\gamma(g)}{\beta(g)}$ defined in eq. \eqref{A}. \par Moreover, according to the terminology of the Poincar\'e-Dulac theorem, our classification of operator mixing is as follows: \par If a renormalization scheme exists where $ -\frac{\gamma(g)}{\beta(g)}$ can be set in the canonical form of eq. \eqref{0}, we refer to the mixing as nonresonant, that by eq. \eqref{rce} is the generic case. Otherwise, we refer to the mixing as resonant.\par Besides, $\frac{\gamma_0}{\beta_0}$ may be either diagonalizable \footnote{A sufficient condition for a matrix to be diagonalizable is that all its eigenvalues are different.} or nondiagonalizable.\par Therefore, there are four cases of operator mixing:\par (I) Nonresonant diagonalizable $\frac{\gamma_0}{\beta_0}$. \par (II) Resonant diagonalizable $\frac{\gamma_0}{\beta_0}$. \par (III) Nonresonant nondiagonalizable $\frac{\gamma_0}{\beta_0}$. \par (IV) Resonant nondiagonalizable $\frac{\gamma_0}{\beta_0}$. \par In the case (I), $Z(x,\mu)$ is diagonalizable to all orders of perturbation theory, since the mixing is nonresonant and $\frac{\gamma_0}{\beta_0}$ is diagonalizable.\par The remaining cases, where $Z(x,\mu)$ is not actually diagonalizable, will be analyzed in a forthcoming paper \cite{BB3}. \par Specifically, we will work out in \cite{BB3} the canonical form of $ -\frac{\gamma(g)}{\beta(g)}$ for resonant mixing -- that is different from eq. \eqref{0} -- . \par In the case (I), the UV asymptotics of $Z(x, \mu)$ reduces essentially to the multiplicatively renormalizable case: \begin{equation} \label{01.9} Z_{i}(x, \mu)=\exp\left(\int^{g(\mu)}_{g(x)}\frac{\gamma_{0i}}{\beta_0 g}dg\right) = \left(\frac{g(\mu)}{g(x)}\right)^{\frac{\gamma_{0i}}{\beta_0}} \end{equation} in the diagonal basis, where $Z_i(x,\mu)$ and $\gamma_{0i}$ denote the eigenvalues of the corresponding matrices.\par Of course, $Z(x, \mu)$ in any other renormalization scheme can be reconstructed from the canonical diagonal form above -- if it exists -- by working out the other way around the appropriate change of basis according to eq. \eqref{Z}.\par Then, in the case (I) Eq. \eqref{2.2} reads: \begin{eqnarray} \label{10} G_{ik}(x) &=& Z_{i}(x, \mu) \mathcal{G}_{ik}(x,g(\mu),\mu) Z_{k}(x, \mu) \end{eqnarray} in the diagonal basis, where no sum on the indices $i,k$ is understood. Eq. \eqref{10} furnishes the UV asymptotics of $G_{ik}(x)$, provided that the asymptotics of $\mathcal{G}_{ik}(x,g(\mu),\mu)$ is known \cite{BB2} as well.\par We believe that the aforementioned employment of the Poincar\'e-Dulac theorem makes the subject of operator mixing in the physics literature more transparent than in previous treatments \cite{Sonoda}. \par \section{Differential geometry of renormalization} \label{3} We point out that renormalization may be interpreted in a differential-geometric setting, where a (finite) change of renormalization scheme, i.e., a coupling-dependent change of the operator basis: \begin{eqnarray} \label{b} O'_i(x)=S_{ik}(g) O_k(x) \end{eqnarray} is interpreted as a matrix-valued (formal \footnote{A formal series is not assumed to be convergent and, indeed, in the present paper we do not assume that the series in eqs. \eqref{2} and \eqref{1.6} are convergent, since they arise from perturbation theory.}) real-analytic invertible gauge transformation $S(g)$. Accordingly, the matrix $A(g)$: \begin{eqnarray} \label{A} A(g)=-\frac{\gamma(g)}{\beta(g)}&=& \frac{1}{g} \left(A_0 + \sum^{\infty}_ {n=1} A_{2n} g^{2n} \right) \nonumber \\ &=& \frac{1}{g} \left(\frac{\gamma_0}{\beta_0} +\cdots \right) \end{eqnarray} that occurs in the system of ordinary differential equations defining $Z(x, \mu)$ by eqs. \eqref{1.6} and \eqref{2}: \begin{eqnarray} \label{1.700} \left(\frac{\partial}{\partial g} +\frac{\gamma(g)}{\beta(g)}\right) Z =0 \end{eqnarray} is interpreted as a (formal) real-analytic connection, with a simple pole at $g=0$, that for the gauge transformation in eq. \eqref{b} transforms as: \begin{eqnarray} A'(g)= S(g)A(g)S^{-1}(g)+ \frac{\partial S(g)}{\partial g} S^{-1}(g) \end{eqnarray} Morevover, \begin{eqnarray} \mathcal{D} = \frac{\partial}{\partial g} - A(g) \end{eqnarray} is interpreted as the corresponding covariant derivative that defines the linear system: \begin{eqnarray} \label{ls} \mathcal{D} X= \left(\frac{\partial}{\partial g} - A(g)\right) X=0 \end{eqnarray} whose solution with a suitable initial condition is $Z(x, \mu)$.\par As a consequence, $Z(x, \mu)$ is interpreted as a Wilson line associated to the aforementioned connection: \begin{eqnarray} Z(x, \mu)=P\exp\left(\int ^{g(\mu)}_{g(x)} A(g) \, dg\right) \end{eqnarray} that transforms as: \begin{eqnarray} \label{Z} Z'(x, \mu)= S(g(\mu)) Z(x, \mu) S^{-1}(g(x)) \end{eqnarray} for the gauge transformation $S(g)$.\par Besides, by allowing the coupling to be complex valued, everything that we have mentioned applies in the (formal) holomorphic setting, instead of the real-analytic one.\par Hence, by summarizing, a change of renormalization scheme is interpreted as a (formal) holomorphic gauge transformation, $-\frac{\gamma(g)}{\beta(g)}$ as a (formal) meromorphic connection with a Fuchsian singularity at $g=0$, and $Z(x,\mu)$ as a Wilson line. \section{Canonical nonresonant form for $-\frac{\gamma(g)}{\beta(g)}$ by the Poincar\'e-Dulac theorem} \label{4} According to the interpretation above, the easiest way to compute the UV asymptotics of $Z(x, \mu)$ consists in setting the meromorphic connection in eq. \eqref{A} in a canonical form by a suitable holomorphic gauge transformation.\par Specifically, if the nonresonant condition in eq. \eqref{rce} is satisfied, a (formal) holomorphic gauge transformation exists that sets $A(g)$ in eq. \eqref{A} in the canonical nonresonant form -- the Euler form \cite{PD1} --: \begin{eqnarray} \label{nr} A'(g)= \frac{\gamma_0}{\beta_0} \frac{1}{g} \end{eqnarray} according to the Poincar\'e-Dulac theorem.\par In this respect, the only minor refinement that we need for applying the Poincar\'e-Dulac theorem to eq. \eqref{A} is the observation that the inductive procedure in its proof \cite{PD1} works as well by only restricting to the even powers of $g$ in eq. \eqref{27} that match the even powers of $g$ in the brackets in the rhs of eq. \eqref{A}.\par As a consequence, the nonresonant condition in eq. \eqref{rce} only involves positive even integers, as opposed to the general case (section \ref{PD}). \section{A condensed proof of the Poincar\'e-Dulac theorem for nonresonant diagonalizable $A_0$} \label{PD} We provide a condensed proof of (the linear version of) the Poincar\'e-Dulac theorem \cite{PD1} for nonresonant diagonalizable $A_0$, which includes the case (I) in the setting of operator mixing for a massless QCD-like theory. \par The proof in the general case will be worked out in \cite{BB3}.\par \emph{Poincar\'e-Dulac theorem for nonresonant diagonalizable $A_0$}:\par The linear system in eq. \eqref{ls}, where the meromorphic connection $A(g)$, with a Fuchsian singularity at $g=0$, admits the (formal) expansion: \begin{eqnarray} \label{sys2} A(g)= \frac{1}{g} \left(A_0 + \sum^{\infty}_ {n=1} A_{n} g^{n} \right) \end{eqnarray} with $A_0$ diagonalizable and eigenvalues $\text{diag}(\lambda_1, \lambda_2, \cdots )=\Lambda$, in nonincreasing order $\lambda_1 \geq \lambda_2 \geq \cdots$, satisfying the nonresonant condition: \begin{eqnarray} \lambda_i -\lambda_j \neq k \end{eqnarray} for $i \leq j$ and $k$ a positive integer, may be set, by a (formal) holomorphic invertible gauge transformation, in the Euler normal form \footnote{In the present paper, we refer to it as the canonical nonresonant diagonal form.}: \begin{eqnarray} \label{canres2} A'(g)= \frac{1}{g} \Lambda \end{eqnarray} We only report the key aspects of the proof, leaving more details to \cite{PD1}. \par \emph{Proof}:\par The proof proceeds by induction on $k=1,2, \cdots$ by demonstrating that, once $A_0$ and the first $k-1$ matrix coefficients, $A_1,\cdots,A_{k-1}$, have been set in the Euler normal form above -- i.e., $A_0$ diagonal and $ A_1,\cdots,A_{k-1}=0$ -- a holomorphic gauge transformation exists that leaves them invariant and also sets the $k$-th coefficient, $A_{k}$, to $0$. \par The $0$ step of the induction consists just in setting $A_0$ in diagonal form -- with the eigenvalues in nonincreasing order as in the statement of the theorem -- by a global (i.e., constant) gauge transformation. \par At the $k$-th step, we choose the holomorphic gauge transformation in the form: \begin{eqnarray} \label{27} S_k(g)=1+ g^k H_k \end{eqnarray} with $H_k$ a matrix to be found momentarily. Its inverse is: \begin{eqnarray} S^{-1}_k(g)= (1+ g^k H_k)^{-1} = 1- g^k H_k + \cdots \end{eqnarray} where the dots represent terms of order higher than $g^{k}$.\par The gauge action of $S_k(g)$ on the connection $A(g)$ furnishes: \begin{eqnarray} \label{ind} A'(g) &=& k g^{k-1} H_k ( 1+ g^k H_k)^{-1} + (1+ g^k H_k) A(g)( 1+ g^k H_k)^{-1} \nonumber \\ &=& k g^{k-1} H_k ( 1+g^k H_k)^{-1}+ (1+ g^k H_k) \frac{1}{g} \left(A_0 + \sum^{\infty}_ {n=1} A_{n} g^{n} \right) ( 1+ g^k H_k)^{-1} \nonumber \\ &=& k g^{k-1} H_k ( 1- \cdots)+ (1+ g^k H_k) \frac{1}{g} \left(A_0 + \sum^{\infty}_ {n=1} A_{n} g^{n} \right) (1- g^k H_k+\cdots) \nonumber \\ &=&k g^{k-1} H_k + \frac{1}{g} \left(A_0 + \sum^{k}_ {n=1} A_{n} g^{n} \right)+g^{k-1} (H_kA_0-A_0H_k) + \cdots\nonumber \\ &=& g^{k-1} (k H_k + H_k A_0 - A_0 H_k)+ A_{k-1}(g) + g^{k-1} A_k+ \cdots \end{eqnarray} where we have skipped in the dots all the terms that contribute to an order higher than $g^{k-1}$, and we have set: \begin{eqnarray} A_{k-1}(g) = \frac{1}{g} \left(A_0 + \sum^{k-1}_ {n=1} A_{n} g^{n} \right) \end{eqnarray} that is the part of $A(g)$ that is not affected by the gauge transformation $S_k(g)$, and thus verifies the hypotheses of the induction -- i.e., that $A_1, \cdots, A_{k-1}$ vanish --. \par Therefore, by eq. \eqref{ind} the $k$-th matrix coefficient, $A_k$, may be eliminated from the expansion of $A'(g)$ to the order of $g^{k-1}$ provided that an $H_k$ exists such that: \begin{eqnarray} A_k+(k H_k + H_k A_0 - A_0 H_k)= A_k+ (k-ad_{A_0}) H_k=0 \end{eqnarray} with $ad_{A_0}Y=[A_0,Y]$. If the inverse of $ad_{A_0}-k$ exists, the unique solution for $H_k$ is: \begin{eqnarray} H_k=(ad_{A_0}-k)^{-1} A_k \end{eqnarray} Hence, to prove the theorem, we should demonstrate that, under the hypotheses of the theorem, $ad_{A_0}-k$ is invertible, i.e., its kernel is trivial. \par Now $ad_{\Lambda}-k$, as a linear operator that acts on matrices, is diagonal, with eigenvalues $\lambda_{i}-\lambda_{j}-k$ and the matrices $E_{ij}$, whose only nonvanishing entries are $(E_{ij})_{ij}$, as eigenvectors. The eigenvectors $E_{ij}$, normalized in such a way that $(E_{ij})_{ij}=1$, form an orthonormal basis for the matrices.\par Thus, $E_{ij}$ belongs to the kernel of $ad_{\Lambda}-k$ if and only if $\lambda_{i}-\lambda_{j}-k=0$. \par As a consequence, since $\lambda_{i}-\lambda_{j}-k \neq 0$ for every $i,j$ by the hypotheses of the theorem, the kernel of $ad_{\Lambda}-k$ only contains the $0$ matrix, and the proof is complete.\\
\section{Introduction} Neutrinos provide a unique possibility to explore physics beyond the standard model with the help of nonaccelerator methods. Such achievements of neutrino physics became possible after the observation of oscillations of atmospheric and solar neutrinos~\cite{Nobel2015}. These experimental facts are the straightforward indications of the nonzero masses and mixing between different neutrino flavors. External fields, e.g., the neutrino interaction with background matter~\cite{Smi05} and electromagnetic fields~\cite{Giu19}, are known to modify the process of neutrino oscillations. The gravitational interaction, in spite of its weakness, was found in Refs.~\cite{PirRoyWud96,CarFul97,For97} to contribute to the neutrino oscillations dynamics. In the majority of studies, neutrino oscillations in curved spacetime were examined when particles move in static gravitational backgrounds, e.g., in the vicinity of a black hole (BH). It is interesting to analyze the propagation and oscillations of astrophysical neutrinos in time dependent metrics, e.g., induced by a gravitational wave (GW). The studies of the fermions evolution in GWs were carried out in Refs.~\cite{Qua16,ObuSilTer17}. Neutrino spin oscillations, i.e. when we deal with transitions between active left polarized and sterile right polarized particles, in background matter under the influence of GW were discussed in Ref.~\cite{Dvo19a}. Neutrino flavor oscillations in GWs, as well as in gravitational fields caused by metric perturbations in the early universe, were considered in Ref.~\cite{KouMet19}. In this paper, we continue the research in Refs.~\cite{Dvo19,Dvo20}, where the influence of stochastic GWs on neutrino flavor oscillations was considered. The main problem of Refs.~\cite{Dvo19,Dvo20} was the consideration of astrophysical neutrinos emitted in decays of charged pions. Although such neutrinos form the major cosmic neutrinos background, their sources are distributed rather uniformly in the universe. Thus, the integral flux in a terrestrial detector should be averaged over the propagation distance of such neutrinos. This fact makes it difficult to separate the contribution of stochastic GWs on the measured flavor composition. To avoid this difficulty, we decide to examine the effect of stochastic GWs on supernova (SN) neutrinos. If an explosion of a core-collapsing SN happens in our galaxy, firstly, it emits a sizable neutrino flux to be measured even by existing neutrino telescopes~\cite{Sch18}. Secondly, SN is almost a point-like neutrino source. Hence one should not average over the neutrino propagation distance. In this situation, we expect that the effect of stochastic GWs is not smeared. The present work is motivated by the recent direct detection of GWs by the LIGO-Virgo collaborations~\cite{Abb16}. There are active multimessenger searches of GWs and high energy neutrinos by existing detectors~\cite{Alb19,Aar20a} and suggestions to implement them in future ones~\cite{Aar20b}. There are also attempts to observe stochastic GWs~\cite{Per19,Arz20}, with various methods for their detection being developed~\cite{RomCor17}. SN neutrinos were reliably detected in 1987 after the SN explosion in the Large Magellanic Cloud (see, e.g., Ref.~\cite{Raf96}). Since then, the experimental techniques in construction of neutrino telescopes made great achievements. Now, if a nearby SN in our galaxy explodes, a huge number of events will be recorded~\cite{VitTamRaf20}. As mentioned above, a simultaneous detection of GWs and SN neutrinos may be possible. Besides a direct neutrino signal from a certain SN, all collapsing stars in the universe emit neutrinos which form the diffuse SN neutrino background. There are prospects to measure it by existing and future neutrino telescopes (see, e.g., Ref.~\cite{An16}). This work is organized in the following way. In Sec.~\ref{sec:DENSMATR}, we formulate the problem of the propagation of flavor neutrinos in a plane GW with an arbitrary polarization. Then, we derive the equation for the density matrix for flavor neutrinos if we deal with stochastic GWs. This equation is exactly solved for the arbitrary energy spectrum of GWs. Then, in Sec.~\ref{sec:APPL}, we apply our results for the description of the interaction of SN neutrinos with stochastic GWs. We find the corrections to neutrino fluxes and the damping decrement in an explicit form. Finally, we summarize our results in Sec.~\ref{sec:CONCL}. The effective Hamiltonian for flavor oscillations under the influence of GW is rederived in Appendix~\ref{sec:DERHG}. \section{Evolution of flavor neutrinos in the GWs background\label{sec:DENSMATR}} The system of three active flavor neutrinos $\nu_{\lambda}$, $\lambda=e,\mu,\tau$, with the nonzero mixing, as well as under the influence of a plane GW with an arbitrary polarization, obeys the following Schr\"odinger equation: \begin{equation}\label{eq:Schreq} \mathrm{i}\dot{\nu}=(H_{0}+H_{1})\nu, \end{equation} where $\nu^\mathrm{T} = (\nu_e,\nu_\mu,\nu_\tau)$, $H_{0}=UH_{m}^{(\mathrm{vac})}U^{\dagger}$ is the effective Hamiltonian for vacuum oscillations in the flavor eigenstates basis, $H_{m}^{(\mathrm{vac})}=\tfrac{1}{2E}\text{diag}\left(0,\Delta m_{21}^{2},\Delta m_{31}^{2}\right)$ is the vacuum effective Hamiltonian for the mass eigenstates $\psi_{a}$, $a=1,2,3$, $\Delta m_{ab}^{2}=m_{a}^{2}-m_{b}^{2}$ is the difference of the squares of masses $m_{a}$ of mass eigenstates, $E$ is the mean energy of a neutrino beam, and $U$ is the unitary matrix which relates flavor and mass bases: $\nu_{\lambda}=U_{\lambda a}\psi_{a}$. To derive $H_{m}^{(\mathrm{vac})}$ in Eq.~(\ref{eq:Schreq}) we assume that neutrinos are ultrarelativistic and subtract a proper diagonal term. The mixing matrix $U$ can be present in the form, \begin{equation}\label{eq:U3f} U= \left( \begin{array}{ccc} 1 & 0 & 0\\ 0 & c_{23} & s_{23}\\ 0 & -s_{23} & c_{23} \end{array} \right) \cdot \left( \begin{array}{ccc} c_{13} & 0 & s_{13}e^{-\mathrm{i}\delta_{\mathrm{CP}}}\\ 0 & 1 & 0\\ -s_{13}e^{\mathrm{i}\delta_{\mathrm{CP}}} & 0 & c_{13} \end{array} \right) \cdot \left( \begin{array}{ccc} c_{12} & s_{12} & 0\\ -s_{12} & c_{12} & 0\\ 0 & 0 & 1 \end{array} \right), \end{equation} where $c_{ab}=\cos\theta_{ab}$, $s_{ab}=\sin\theta_{ab}$, $\theta_{ab}$ are the corresponding vacuum mixing angles, and $\delta_{\mathrm{CP}}$ is the CP violating phase. The values of these parameters can be found in Ref.~\cite{Sal20}. The Hamiltonian $H_{1}$ in Eq.~(\ref{eq:Schreq}), which describes the neutrino interaction with GW, has the form $H_{1}=UH_{m}^{(g)}U^{\dagger}$, where \begin{equation}\label{eq:Hgmass} H_{m}^{(g)}=H_{m}^{(\mathrm{vac})}\left(A_{c}h_{+}+A_{s}h_{\times}\right), \end{equation} is the Hamiltonian in the mass basis, $A_{c}=\tfrac{1}{2}\sin^{2}\vartheta\cos2\varphi\cos[\omega t(1-\cos\vartheta)]$, $A_{s}=\tfrac{1}{2}\sin^{2}\vartheta\sin2\varphi \sin[\omega t(1-\cos\vartheta)]$, $h_{+,\times}$ are the amplitudes corresponding to `plus' and `cross' polarizations of GW, $\omega$ is the frequency of GW, $\vartheta$ and $\varphi$ are the spherical angles fixing the neutrino momentum with respect to the wave vector of GW, which is supposed to propagate along the $z$-axis. To derive Eq.~(\ref{eq:Hgmass}) we assume that~\cite{Dvo19} $\omega L|v_{a}-v_{b}|\ll1$, $a,b=1,2,3$, where $L$ is the distance of the neutrino beam propagation and $v_{a}$ is the velocity of a mass eigenstate. Analogously to $H_{m}^{(\mathrm{vac})}$, we subtract the common diagonal term in $H_{m}^{(g)}$ in Eq.~(\ref{eq:Hgmass}). The Hamiltonian $H_{m}^{(g)}$ for a circularly polarized GW with $h_{+}=h_{\times}$ was obtained in Ref.~\cite{Dvo19} based on the exact solution of the Hamilton-Jacobi equation for a test particle in a plane GW. In the present work, we provide a more straightforward perturbative derivation of the same result which is given in Appendix~\ref{sec:DERHG}; cf. Eq.~(\ref{eq:Hgfin}). Of course, the expression for $H_{m}^{(g)}$ coincides with that in Ref.~\cite{Dvo19} in the limit $h_{+}=h_{\times}$. Now we consider the situation when a neutrino interacts with stochastic GWs. In this case, the angles $\vartheta$ and $\varphi$, as well as the amplitudes $h_{+,\times}$, are random functions of time. To study the neutrino motion in such a background, it is more convenient to deal with the density matrix $\rho$, which obeys the equation, $\mathrm{i}\dot{\rho}=[H_{0}+H_{1},\rho]$. Following Ref.~\cite{LorBal94}, we introduce the density matrix in the interaction picture, $\rho_{\mathrm{int}}=\exp(\mathrm{i}H_{0}t)\rho\exp(-\mathrm{i}H_{0}t)$. It satisfies the equation, \begin{equation}\label{eq:rhoIeq} \mathrm{i}\dot{\rho}_{\mathrm{int}}= [H_{\mathrm{int}},\rho_{\mathrm{int}}], \end{equation} where $H_{\mathrm{int}}=\exp(\mathrm{i}H_{0}t)H_{1}\exp(-\mathrm{i}H_{0}t)$. Using the Baker--Campbell--Hausdorff formula and the fact that that both $H_{m}^{(\mathrm{vac})}$ and $H_{m}^{(g)}$ are diagonal, we get that $H_{\mathrm{int}}=H_{1}$. This result is valid even before setting $v_{a}\to1$ in the phase of the wave in Eq.~(\ref{eq:Habint}) and omitting the common factors proportional to the unit matrix in both $H_{m}^{(\mathrm{vac})}$ and $H_{m}^{(g)}$. The initial condition for $\rho_{\mathrm{int}}$ coincides with that for $\rho$: $\rho_{\mathrm{int}}(0)=\rho(0)\equiv\rho_{0}$. We assume that stochastic GWs form a Gaussian random process. In this situation, all odd correlators of angle factors $A_{c,s}$ and the amplitudes $h_{+,\times}$ are vanishing. Moreover, we take that $h_{+}$ and $h_{\times}$ are independent. After averaging, the formal solution of Eq.~(\ref{eq:rhoIeq}) can be present in the form of a series, \begin{align}\label{eq:serrhoI} \left\langle \rho_{\mathrm{int}} \right\rangle = & \rho_{0}-[H_{0},[H_{0},\rho_{0}]]\int_{0}^{t}\mathrm{d}t_{1}\int_{0}^{t_{1}}\mathrm{d}t_{2} \big\langle \left[ A_{c}(t_{1})h_{+}(t_{1})+A_{s}(t_{1})h_{\times}(t_{1}) \right] \notag \\ & \times \left[ A_{c}(t_{2})h_{+}(t_{2})+A_{s}(t_{2})h_{\times}(t_{2}) \right] \big\rangle + \dotsb \nonumber \\ & = \rho_{0}-[H_{0},[H_{0},\rho_{0}]]\int_{0}^{t}\mathrm{d}t_{1}\int_{0}^{t_{1}}\mathrm{d}t_{2} \big( \left\langle A_{c}(t_{1})A_{c}(t_{2}) \right\rangle \left\langle h_{+}(t_{1})h_{+}(t_{2}) \right\rangle \notag \\ & + \left\langle A_{s}(t_{1})A_{s}(t_{2}) \right\rangle \left\langle h_{\times}(t_{1})h_{\times}(t_{2}) \right\rangle \big)+\dotsb, \end{align} where we show only two nonzero terms in order not to encumber the text. We can see that the series in Eq.~(\ref{eq:serrhoI}) decays into two independent ones corresponding to different polarizations of GW. Each of these series contains only either $\left\langle h_{+}(t)h_{+}(0) \right\rangle$ or $\left\langle h_{\times}(t)h_{\times}(0) \right\rangle$. In the following, we account for all terms in the expansion in Eq.~\eqref{eq:serrhoI}. Further analysis of each of the series corresponding to different GW polarizations is identical to that in Ref.~\cite{Dvo20}. Therefore we omit the details. Now, let us consider the averaging of the angle factors. We should mention that both the amplitudes $h_{+,\times}(t)$ and the angles $\vartheta(t)$ and $\varphi(t)$ are random functions of time. Indeed, we consider random distribution of GWs sources. It means that, when a neutrino interacts with a certain GW, the angle between a neutrino momentum and the wave vector of GW is randomly distributed from zero to $\pi$. However, unlike the correlators $\left\langle h_{+,\times}(t_{1})h_{+,\times}(t_{2}) \right\rangle$, which are taken to be arbitrary, we suppose that both $\langle \vartheta(t_1) \vartheta(t_2) \rangle$ and $\langle \varphi(t_1) \varphi(t_2) \rangle$ are proportional to $\delta(t_1 - t_2)$. This supposition is reasonable since it is based on the assumption of the uniform distribution of the sources of GWs in the universe. The form of the correlators $\left\langle h_{+,\times}(t_{1})h_{+,\times}(t_{2}) \right\rangle$ depends on physical processes underlying the GWs production. Thus, it is inexpedient to take that the amplitudes are $\delta$-correlated. We can study, e.g., the correlator $\left\langle A_{c}(t_{1})A_{c}(t_{2})\right\rangle$, which has the form, \begin{equation}\label{eq:Acav1} \left\langle A_{c}(t_{1})A_{c}(t_{2}) \right\rangle = \frac{1}{4} \left\langle \sin^{2}\vartheta_1 \sin^{2}\vartheta_2 \cos(2\varphi_1) \cos(2\varphi_2) \cos\alpha_1\cos\alpha_2 \right\rangle, \end{equation} where $\alpha_{1,2} = \omega t_{1,2} (1-\cos\vartheta_{1,2})$ and the angles $\vartheta_{1,2}$ and $\varphi_{1,2}$ correspond to $t_{1,2}$. Since the random variables $\vartheta$ and $\varphi$ are taken to be $\delta$-correlated, we get that $\langle \cos\alpha_1\cos\alpha_2 \rangle = 1/2$. Now, we should average Eq.~\eqref{eq:Acav1} over directions of incoming GWs, \begin{equation}\label{eq:AcAc} \left\langle A_{c}(t_{1})A_{c}(t_{2}) \right\rangle = \frac{1}{16\pi^{2}}\int_{0}^{\pi}\mathrm{d}\vartheta\sin^{4}\vartheta \int_{0}^{2\pi}\mathrm{d}\varphi\cos^{2}(2\varphi)=\frac{3}{128}. \end{equation} Analogously we show that $\left\langle A_{s}(t_{1})A_{s}(t_{2})\right\rangle = \tfrac{3}{128}$. The obtained correlators of the angular factors in Eq.~\eqref{eq:AcAc} should be used in Eq.~\eqref{eq:serrhoI}. As we mentioned above, Eq.~\eqref{eq:serrhoI} splits into two independent series. Accounting for all terms in the expansions and applying the results of Ref.~\cite{Dvo20}, we get that $\left\langle \rho_{\mathrm{int}}\right\rangle $ obeys the equation, \begin{equation}\label{eq:rhoIeqfin} \frac{\mathrm{d}}{\mathrm{d}t} \left\langle \rho_{\mathrm{int}} \right\rangle (t)= -g(t)\frac{3}{64}[H_{0},[H_{0}, \left\langle \rho_{\mathrm{int}} \right\rangle (t)]], \end{equation} where \begin{equation}\label{eq:gdef} g(t)=\frac{1}{2}\int_{0}^{t}\mathrm{d}t_{1} \left( \left\langle h_{+}(t)h_{+}(t_{1}) \right\rangle + \left\langle h_{\times}(t)h_{\times}(t_{1}) \right\rangle \right). \end{equation} In case of circularly polarized GWs with $h_{+}=h_{\times}$, we reproduce the results of Ref.~\cite{Dvo20} in Eqs.~(\ref{eq:rhoIeqfin}) and~(\ref{eq:gdef}). To proceed with the analysis of Eq.~(\ref{eq:rhoIeqfin}), we define the new matrix $\rho'=U^{\dagger}\left\langle \rho_{\mathrm{int}}\right\rangle U$, which is the density matrix in the interaction picture for the neutrino mass eigenstates. After some matrix algebra, we get that $\rho'$ satisfies the equation, \begin{equation}\label{eq:rho'eq} \dot{\rho}'=-\tilde{g}[H_{m}^{(\mathrm{vac})},[H_{m}^{(\mathrm{vac})},\rho']]=-\tilde{g}M, \end{equation} where $\tilde{g}=\tfrac{3}{64}g$. The matrix $M$ in Eq.~(\ref{eq:rho'eq}) has the following entries: $M_{ab}=(E_{a}-E_{b})^{2}\rho'_{ab}$. Note that, here, we use the original form of $H_{m}^{(\mathrm{vac})}$ before the energy decomposition: $\left(H_{m}^{(\mathrm{vac})}\right)_{ab}=E_{a}\delta_{ab}$. Thus, Eq.~(\ref{eq:rho'eq}) can be integrated straightforwardly \begin{equation}\label{eq:rho'sol} \rho'_{aa}(t) = \rho'_{aa}(0)=\text{const}, \quad \rho'_{ab}(t) =\rho'_{ab}(0)g_{ab},\ a\neq b, \quad g_{ab}(t) =\exp \left[ -(E_{a}-E_{b})^{2}\int_{0}^{t}\tilde{g}(t')\mathrm{d}t' \right], \end{equation} where the initial condition $\rho'(0)$ has the form, $\rho'(0)=U^{\dagger}\left\langle \rho_{\mathrm{int}}\right\rangle (0)U=U^{\dagger}\rho(0)U$. It can be also expressed in the components as $\rho'_{ab}(0)=\sum_{\sigma}U_{\sigma a}^{*}U_{\sigma b}P_{\sigma}(0)$, where we assume that $\rho_{\lambda\sigma}(0)=\delta_{\lambda\sigma}P_{\sigma}(0)$. Here the emission probabilities $P_{\sigma}(0)$ are proportional to the neutrino fluxes at a source: $P_{\sigma}(0)\propto\left(F_{\nu_{\sigma}}\right)_{\mathrm{S}}$. Accounting for Eq.~(\ref{eq:rho'sol}), we get the expression for the density matrix for flavor neutrinos, $\rho=UR\rho'R^{\dagger}U^{\dagger}$, where $\left(R\right)_{ab}=\delta_{ab}\exp(-\mathrm{i}E_{a}t)$. The probability to detect a certain flavor, after the neutrino beam passes the distance $x\approx t$, reads $P_{\lambda}(x)=\rho_{\lambda\lambda}(t\approx x)$. Using the components of $U$ in Eq.~(\ref{eq:U3f}), it can be represented in the form, \begin{equation}\label{eq:Plambdag} P_{\lambda}^{(g)}(x)=\sum_{\sigma}P_{\sigma}(0) \left[ \sum_{a}|U_{\lambda a}|^{2}|U_{\sigma a}|^{2}+ 2\text{Re}\sum_{a>b}U_{\lambda a}U_{\lambda b}^{*}U_{\sigma a}^{*}U_{\sigma b}\exp \left( -\mathrm{i}\varphi_{ab}x \right) g_{ab} \right], \end{equation} where $\varphi_{ab}=E_{a}-E_{b}=\frac{\Delta m_{ab}^{2}}{2E}$ are the phases of neutrino vacuum oscillations. Equation~(\ref{eq:Plambdag}), which takes into account the neutrino interaction with stochastic GWs, should be compared with the analogous probabilities for neutrino vacuum oscillations $P_{\lambda}^{(\mathrm{vac})}$, which are derived, e.g., in Ref.~\cite{GiuKim07}. The difference $\Delta P_{\lambda}=P_{\lambda}^{(g)}-P_{\lambda}^{(\mathrm{vac})}$, which reveals the effect of GWs on neutrino oscillations, has the form, \begin{align}\label{eq:DeltaPgen} \Delta P_{\lambda}(x)= & 2\sum_{\sigma}P_{\sigma}(0) \sum_{a>b} \left\{ \text{Re} \left[ U_{\lambda a}U_{\lambda b}^{*}U_{\sigma a}^{*}U_{\sigma b} \right] \cos \left( 2\pi\frac{x}{L_{ab}} \right) + \text{Im} \left[ U_{\lambda a}U_{\lambda b}^{*}U_{\sigma a}^{*}U_{\sigma b} \right] \sin \left( 2\pi\frac{x}{L_{ab}} \right) \right\} \nonumber \\ & \times \left\{ 1-\exp \left[ -\frac{4\pi^{2}}{L_{ab}^{2}}\int_{0}^{x}\tilde{g}(t)\mathrm{d}t \right] \right\}, \end{align} where $L_{ab}=\tfrac{4\pi E}{|\Delta m_{ab}^{2}|}$ are the neutrino oscillations lengths in vacuum. If we study the interaction between stochastic GWs and neutrinos emitted by randomly distributed sources, we have to average Eq.~(\ref{eq:DeltaPgen}) over the propagation distance. It gives $\left\langle \Delta P_{\lambda}\right\rangle =0$. Therefore, the effect of stochastic GWs on oscillations of such neutrinos is washed out. The fluxes at a source will coincide with these accounting for only vacuum oscillations. Thus, the claim in Ref.~\cite{Dvo20}, that stochastic GWs result in small changes of observed fluxes of neutrinos from randomly distributed sources, is incorrect. The deviation of fluxes, obtained in Ref.~\cite{Dvo20}, is likely to stem from an inexactitude of numerical simulations. We avoid this inexactitude in the present work since we rely on the analytical solution of Eq.~(\ref{eq:rhoIeqfin}). \section{Application to SN neutrinos\label{sec:APPL}} In this section, we apply the obtained results for the description of the propagation of SN neutrinos in the background of stochastic GWs. A huge amount of energy is carried away by neutrinos from a core-collapsing SN. The major neutrino luminosity was reported, e.g., in Ref.~\cite{Jan17} to take place during a $\nu_{e}$-burst, which happens because of the direct Urca process $e^{-}+p\to n+\nu_{e}$ in the neutronazing matter of a protoneutron star (PNS). This burst occurs at $\sim(3-4)\,\text{ms}$ after the core bounce and lasts $\lesssim0.1\,\text{s}$~\cite{Jan17}; see also references therein. The neutrino luminosity can reach $\sim10^{53}\,\text{erg}\cdot\text{s}^{-1}$ during the burst, with almost all of emitted neutrinos being of the electron type~\cite{Jan17}. We start this section with the study of the interaction between stochastic GWs and SN neutrinos emitted in a $\nu_e$-burst. In this situation, the fluxes at a source are $\left(F_{\nu_{e}}:F_{\nu_{\mu}}:F_{\nu_{\tau}}\right)_{\mathrm{S}}=(1:0:0)$. At later moments of time, other neutrino flavors are emitted. The fluxes of different flavors of SN neutrinos become almost equal by $t \approx (0.05-0.1)\,\text{s}$ after the core bounce. Thus, the initial neutrino fluxes are not in the ratio $(1:0:0)$. The evolution of SN neutrinos with such initial condition in the presence of stochastic GWs is also discussed in this section. A collapsing star, owing to its relatively small size, can be considered as an almost point-like neutrino source. Indeed, the size of a neutrinosphere, i.e. an effective sphere where neutrinos are trapped inside, is $L_{\text{source}}\lesssim100\,\text{km}$ at the moment of a $\nu_{e}$-burst. The energy of SN neutrinos is $E\sim10\,\text{MeV}$~\cite{VitTamRaf20}. The oscillations lengths are $L_{21}\approx330\,\text{km}$ and $L_{31}\approx L_{32}\approx10\,\text{km}$ for this energy and $\Delta m_{ab}^{2}$ from Ref.~\cite{Sal20}. Neutrinos are emitted from any point of a neutrinosphere more or less isotropically. A terrestrial detector can register all SN neutrinos emitted towards it. Thus, we have to integrate the densities of the fluxes over the area of a neutrinosphere, $S_\mathrm{source} \sim L_\mathrm{source}^2$, and divide the result by $S_\mathrm{source}$. We can call this procedure as the averaging over the emission points. Thus, if we carry out this averaging for $\Delta P_{\lambda}$ in Eq.~(\ref{eq:DeltaPgen}), the (31)- and (32)-contributions are smeared. The only nonvanishing contribution is from the solar oscillations channel (21). As we mentioned above, other neutrino flavors are emitted after a $\nu_e$-burst, changing the ratio $(1:0:0)$ of the initial fluxes. However, the absolute value of the SN neutrino luminosity becomes smaller. The neutrinosphere shrinks at these greater times. Nevertheless, its size remains greater than $10\,\text{km}$. Thus, only the (21)-oscillations channel gives a nonzero contribution to Eq.~(\ref{eq:DeltaPgen}) even for $t>t_\mathrm{burst}$. We start by considering neutrinos emitted in a $\nu_e$-burst. Accounting for the ratio of the initial fluxes, we get that $\Delta P_{\lambda}$ for such SN neutrinos takes the form, \begin{align}\label{eq:DeltaP21} \Delta P_{\lambda}(x)= & 2 \left[ \text{Re} \left[ U_{\lambda2}U_{\lambda1}^{*}U_{e2}^{*}U_{e1} \right] \cos \left( 2\pi\frac{x}{L_{21}} \right)+ \text{Im} \left[ U_{\lambda2}U_{\lambda1}^{*}U_{e2}^{*}U_{e1} \right] \sin \left( 2\pi\frac{x}{L_{21}} \right) \right] \left[ 1-\exp \left( -\Gamma \right) \right], \notag \\ \Gamma= & \frac{4\pi^{2}}{L_{21}^{2}}\int_{0}^{x}\tilde{g}(t)\mathrm{d}t. \end{align} In Eq.~(\ref{eq:DeltaP21}), we do not set the sine and cosine factors to zero despite $x\gg L_{21}$. The propagation distance is huge, but it is fixed. The correlators of the amplitudes of GWs $\left\langle h_{+,\times}(t)h_{+,\times}(0)\right\rangle $ are related to the spectral density $S(f)$ of GW by~\cite{Chr19} \begin{equation}\label{eq:S} \sum_{ij} \left\langle h_{ij}(t)h_{ij}(0) \right\rangle = \left\langle h_{+}(t)h_{+}(0) \right\rangle + \left\langle h_{\times}(t)h_{\times}(0) \right\rangle = \int_{0}^{\infty}\mathrm{d}f\cos(2\pi ft)S(f), \end{equation} where $f$ is the frequency measured in Hz. In Eq.~(\ref{eq:S}), we use Eq.~(\ref{eq:hmunu}). Then, we define the function $\Omega(f)=\tfrac{f}{\rho_{c}}\tfrac{\mathrm{d}\rho_{\mathrm{GW}}}{\mathrm{d}f}$, where $\rho_{\mathrm{GW}}$ is the energy density of a GW and $\rho_{c}=0.53\times10^{-5}\,\text{Gev}\cdot\text{cm}^{-3}$ is the closure energy density of the universe. Using Eq.~(\ref{eq:S}), we get that $\Omega(f)=\tfrac{\pi f^{3}}{8\rho_{c}G}S(f)$, where $G=6.9\times10^{-39}\,\text{GeV}^{-2}$ is the Newton's constant. The function $\tilde{g}(t)$ has the form, \begin{equation}\label{eq:tildeg} \tilde{g}(t)=\frac{3}{128}\int_{0}^{t}\mathrm{d}t_{1} \left( \left\langle h_{+}(t)h_{+}(t_{1}) \right\rangle + \left\langle h_{\times}(t)h_{\times}(t_{1}) \right\rangle \right)= \frac{3G\rho_{c}}{32\pi^{2}}\int_{0}^{\infty}\frac{\mathrm{d}f}{f^{4}}\sin(2\pi ft)\Omega(f). \end{equation} Now, choosing the source of stochastic GWs, which is fully characterized by $\Omega(f)$, we can evaluate $\Delta P_{\lambda}$. We suppose that stochastic GWs are emitted by randomly distributed merging supermassive BHs. In the case, we can approximate $\Omega(f)$ by~\cite{Ros11} \begin{equation}\label{eq:Omegaf} \Omega(f)= \begin{cases} \Omega_{0}, & \text{if} \quad f_{\mathrm{min}}<f<f_{\mathrm{max}},\\ 0, & \text{otherwise}, \end{cases} \end{equation} where $\Omega_{0}\sim10^{-9}$, $f_{\mathrm{min}}\sim10^{-10}\,\text{Hz}$, and $f_{\mathrm{max}}\sim10^{-1}\,\text{Hz}$. The main contribution to $\Gamma$ in Eq.~(\ref{eq:DeltaP21}) results from $f_{\mathrm{min}}$. Hence we can put $f_{\mathrm{max}}\to\infty$ since $f_{\mathrm{max}}\gg f_{\mathrm{min}}$. We suppose that $0<x<L$, where $L\sim10\,\text{kpc}$ is the maximal propagation length, which is taken to be comparable with the Galaxy size $\sim32\,\text{kpc}$. Using Eqs.~(\ref{eq:DeltaP21}) and~(\ref{eq:tildeg}), we get the parameter $\Gamma$ in the form, \begin{equation}\label{eq:Gamma} \Gamma = \frac{3G\rho_{c}}{8\pi L_{21}^{2}} \int_{f_{\text{min}}}^{f_{\text{max}}}\frac{\mathrm{d}f}{f^{5}}\sin^{2} \left( \pi fx \right) \Omega(f)\approx7\times10^{9}\times I \left( \tau,324 \right), \quad I(\tau,\omega_{\text{min}}) = \int_{\omega_{\text{min}}}^{\infty}\frac{\mathrm{d}\omega}{\omega^{5}}\sin^{2} \left( \omega\tau \right) \Omega(\omega), \end{equation} where $\tau=x/L$ and $\omega_{\text{min}}=\pi Lf_{\text{min}}$ are the dimensionless parameters. The function $\Gamma(\tau)$ is shown in Fig.~\ref{1a} for $\Omega(\omega)$ corresponding to Eq.~(\ref{eq:Omegaf}). In Fig.~\ref{fig:deltaF}, we depict only the normal mass ordering case since the inverted ordering is almost excluded experimentally~\cite{Sal18}. \begin{figure} \centering \subfigure[] {\label{1a} \includegraphics[scale=.38]{fig1a}} \hskip-.6cm \subfigure[] {\label{1b} \includegraphics[scale=.38]{fig1b}} \\ \subfigure[] {\label{1c} \includegraphics[scale=.38]{fig1c}} \hskip-.6cm \subfigure[] {\label{1d} \includegraphics[scale=.38]{fig1d}} \protect \caption{(a) The parameter $\Gamma$ versus the neutrino beam propagation length $x=\tau L$; (b)-(d) the corrections the neutrino fluxes $\Delta F_{\nu_{\lambda}}\propto\Delta P_{\lambda}$ owing to the neutrino interaction with stochastic GWs. The parameters of the system are~\cite{VitTamRaf20,Sal20,Ros11} $\Delta m_{21}^{2}=7.5\times10^{-5}\,\text{eV}^{2}$ and $E=10\,\text{MeV}$ ($L_{21}=3.3\times10^{2}\,\text{km}$), $\theta_{12}=0.6$, $\theta_{23}=0.85$, $\theta_{13}=0.15$, $\delta_{\mathrm{CP}}=3.77$, $L=10\,\text{kpc}$, $\Omega_{0}=10^{-9}$, and $f_{\mathrm{min}}=10^{-10}\,\text{Hz}$. The normal neutrino mass ordering is adopted.\label{fig:deltaF}} \end{figure} We can see in Fig.~\ref{1a} that $\Gamma$ tends to a constant value at $\tau\to1$. If we study neutrino fluxes at the Earth, we put $x=L$, or $\tau=1$. Then, we suppose that the distance between a source, SN, and a detector, the Earth, is great. It corresponds to the limit $\omega_{\text{min}}\gg1$. Accounting for Eq.~(\ref{eq:Omegaf}), we can rewrite $\Gamma\to\Gamma_{\oplus}$ in the form, \begin{equation}\label{eq:GamEar} \Gamma_{\oplus}=\frac{3G\rho_{c}\Omega_{0}}{8\pi f_{\text{min}}^{4}L_{21}^{2}}\omega_{\text{min}}^{4} \int_{\omega_{\text{min}}}^{\infty}\frac{\mathrm{d}\omega}{\omega^{5}}\sin^{2} \left( \omega \right) \to 8\times10^{-2}\times \left( \frac{\Omega_{0}}{10^{-9}} \right) \left( \frac{f_{\text{min}}}{10^{-10}\,\text{Hz}} \right)^{-4}. \end{equation} If $\Omega_{0}=10^{-9}$ and $f_{\text{min}}=10^{-10}\,\text{Hz}$, $\Gamma_{\oplus}=8\times10^{-2}$ in full agreement with Fig.~\ref{1a}. Although Eq.~(\ref{eq:GamEar}) is valid for $\Omega(f)$ in Eq.~(\ref{eq:Omegaf}), we can see that $\Gamma_{\oplus}\to0$ at great $f_{\text{min}}$. This fact explains the result of Ref.~\cite{Dvo20} that stochastic GWs, emitted by coalescing BHs with stellar masses, do not change the fluxes of neutrinos. Indeed, in that case~\cite{Ros11}, $f_{\mathrm{min}}\sim10^{-5}\,\text{Hz}\gg10^{-10}\,\text{Hz}$. Hence $\Gamma_{\oplus}\to0$ and $\Delta P_{\lambda}\to0$ despite $\Omega$ is greater for such sources. If $\left(F_{\nu_{e}}:F_{\mu}:F_{\nu_{\tau}}\right)_{\mathrm{S}}=(1:0:0)$ for SN neutrinos emitted in a $\nu_e$-burst, the probabilities at the Earth for vacuum oscillations are~\cite{GiuKim07} \begin{equation}\label{eq:Pvac} P_{\lambda}^{(\mathrm{vac})}(x)= \sum_{a}|U_{\lambda a}|^{2}|U_{ea}|^{2} + 2\left\{ \text{Re} \left[ U_{\lambda2}U_{\lambda1}^{*}U_{e2}^{*}U_{e1} \right] \cos \left( 2\pi\frac{x}{L_{21}} \right) + \text{Im} \left[ U_{\lambda2}U_{\lambda1}^{*}U_{e2}^{*}U_{e1} \right] \sin \left( 2\pi\frac{x}{L_{21}} \right) \right\} , \end{equation} where we accounted for the fact that the contributions of the (31)- and (32)-oscillations channels are washed out after the averaging over the neutrino emission points on the neutrinosphere surface. The values of the neutrino fluxes $F_{\nu_{\lambda}}^{(\mathrm{vac})}\propto P_{\lambda}^{(\mathrm{vac})}$ in Eq.~(\ref{eq:Pvac}) are summarized in Table~\ref{tab:fluxes}. Since the fluxes $F_{\nu_{\lambda}}^{(\mathrm{vac})}$ are rapidly oscillating on the distance $L=10\,\text{kpc}$, in Table~\ref{tab:fluxes}, we present only the mean values and the amplitudes of oscillations: $(\text{mean value}\pm\text{amplitude})$. We also give $\left(\Delta F_{\nu_{\lambda}}\right)_{\oplus}$ at $x\lesssim L$, i.e. the asymptotic values, which correspond to Figs.~\ref{1b}-\ref{1d}. The mean value of $\left(\Delta F_{\nu_{\lambda}}\right)_{\oplus}$ equals to zero, as explained above. Thus, we show only the amplitudes of oscillations of $\left(\Delta F_{\nu_{\lambda}}\right)_{\oplus}$. One can see in Table~\ref{tab:fluxes} that the relative contribution of stochastic GWs to the measured neutrino fluxes is at the level of $(5-7)\,\%$. \begin{table} \centering \begin{tabular}{|c|c|c|} \hline & $F_{\nu_{\lambda}}^{(\mathrm{vac})}$ & $\left(\Delta F_{\nu_{\lambda}}\right)_{\oplus}$\tabularnewline \hline \hline $\nu_{e}$ & $0.5421\pm0.4144$ & $\pm0.0321$\tabularnewline \hline $\nu_{\mu}$ & $0.1834\pm0.1636$ & $\pm0.0127$\tabularnewline \hline $\nu_{\tau}$ & $0.2745\pm0.2587$ & $\pm0.02$\tabularnewline \hline \end{tabular} \caption{Second column: the fluxes $F_{\nu_{\lambda}}^{(\mathrm{vac})}$ based on Eq.~(\ref{eq:Pvac}) for different neutrino flavors. Third column: $\left(\Delta F_{\nu_{\lambda}}\right)_{\oplus}$ corresponding to Figs.~\ref{1b}-\ref{1d} for various neutrino types. The parameters of neutrinos and GWs are the same as in Fig.~\ref{fig:deltaF}.\label{tab:fluxes}} \end{table} Now we turn to the discussion of neutrinos which are emitted after a $\nu_e$-burst, i.e. at $t>(3-4)\,\text{ms}$ after the core bounce. As we mentioned above, the ratio of the emission fluxes is not equal to $(1:0:0)$. At these times, the fluxes of different flavors eventually become almost equal. It happens at $t \approx 0.05\,\text{s}$ after the core bounce (see, e.g., the numerical simulation, carried out in Ref.~\cite{Fis11}). At $t > 0.1\,\text{s}$, the absolute values of the fluxes start to decrease~\cite{Fis11}. Let us study the influence of stochastic GWs on SN neutrinos emitted at $t_\text{burst} < t < 0.1\,\text{s}$. We can use the general Eq.~\eqref{eq:DeltaPgen} taking that the emission probabilities are time dependent: $P_\sigma(0) \to P_\sigma^{(0)}(\Delta t)$, where $\Delta t = t - t_\text{burst}$ and $t_\text{burst} = (3 - 4)\,\text{ms}$ is the $\nu_e$-burst time. We can approximate $P_\sigma^{(0)}(\Delta t)$ by the following dependence: \begin{equation}\label{eq:emprob} P_{\nu_e}^{(0)}(\Delta t) = \frac{1}{3} \left[ 1 + 2 \exp(-5 K\Delta t) \right], \quad P_{\nu_\mu}^{(0)}(\Delta t) = P_{\nu_\tau}^{(0)}(\Delta t) = \frac{1}{3} \left[ 1 - \exp(-5 K\Delta t) \right], \end{equation} where $K = 10\,\text{s}^{-1}$ is the fitting factor. The emission probabilities in Eq.~\eqref{eq:emprob} satisfy $\sum_\sigma P_{\sigma}^{(0)} = 1$ at any $\Delta t$. The initial fluxes $(F_{\nu_\lambda})_\text{S} \propto P_{\nu_\lambda}^{(0)}(\Delta t)$ are shown in Fig~\ref{2a}. The value of $(F_{\nu_e})_\text{S}$ at $\Delta t = 0$ corresponds to the luminosity $\sim 10^{53}\,\text{erg}\cdot\text{s}^{-1}$ in a $\nu_e$-burst. One can see that $(F_{\nu_\lambda})_\text{S}$ of different flavors become almost equal at $\Delta t \approx K^{-1}$. \begin{figure} \centering \subfigure[] {\label{2a} \includegraphics[scale=.38]{fig2a}} \hskip-.6cm \subfigure[] {\label{2b} \includegraphics[scale=.38]{fig2b}} \protect \caption{The SN neutrino fluxes for different post bounce times $\Delta t$. The parameters of the neutrino system and GWs are the same as in Fig.~\ref{fig:deltaF}; $K\Delta t = 1$ corresponds to $t=0.1\,\text{s}$ after the core bounce. (a) The fluxes $(F_{\nu_\lambda})_\text{S}$ at a source. The blue and green lines overlap since the fluxes of $\nu_\mu$ and $\nu_\tau$ coincide [see Eq.~\eqref{eq:emprob}]. (b) The maximal values of the deviations of the fluxes $(\Delta F_{\nu_\lambda}^{(\mathrm{max})})_\oplus$ in a detector, owing to the interaction of SN neutrinos with stochastic GWs.\label{fig:deltaFpb}} \end{figure} The detection probabilities in Eq.~\eqref{eq:DeltaPgen} depend on the propagation length $x$. We consider the maximal values of $\Delta P_{\lambda}$ when neutrinos arrive to a terrestrial detector. They are \begin{align}\label{eq:DeltaPmax} \Delta P_{\lambda}^{(\mathrm{max})}= & 2 \left[ 1-\exp \left( -\Gamma_\oplus \right) \right] \sum_{\sigma}P_{\sigma}^{(0)}(\Delta t) \sum_{a>b} |U_{\lambda a}U_{\lambda b}^{*}U_{\sigma a}^{*}U_{\sigma b}|, \end{align} where $\Gamma_\oplus = 8\times 10^{-2}$. Note that $\Delta P_{\lambda}^{(\mathrm{max})}$ in Eq.~\eqref{eq:DeltaPmax} depends on $\Delta t$. The deviations of the maximal fluxes $(\Delta F_{\nu_\lambda}^{(\mathrm{max})})_\oplus \propto \Delta P_{\lambda}^{(\mathrm{max})}$, owing to the interaction with stochastic GWs, for different post bounce emission times $\Delta t$ are shown in Fig~\ref{2b}. One can see that $(\Delta F_{\nu_\lambda}^{(\mathrm{max})})_\oplus$ at $\Delta t = 0$ coincide with the values given in the third column in Table~\ref{tab:fluxes}. If $\Delta t \to K^{-1}$, $(F_{\nu_\lambda})_\oplus \to 0$. Indeed, $P_\sigma^{(0)} = 1/3$ for any neutrino flavor at these emission times. Thus $\sum_{\sigma}U_{\sigma a}^{*}U_{\sigma b}=\delta_{ab}$ and $\Delta P_{\lambda}^{(\mathrm{max})} = 0$, basing on Eq.~\eqref{eq:DeltaPmax}. \section{Discussion\label{sec:CONCL}} In the present work, we have studied the propagation and flavor oscillations of astrophysical neutrinos interacting with stochastic GWs. We have rederived more straightforwardly the effective Hamiltonian for such a system in Appendix~\ref{sec:DERHG}. The analytical expression for the density matrix of flavor neutrinos has been obtained in Sec.~\ref{sec:DENSMATR}. Then, in Sec.~\ref{sec:APPL}, we have applied the obtained results for the description of SN neutrinos. The present research has several advances compared to Ref.~\cite{Dvo20}, where the interaction of astrophysical neutrinos with stochastic GWs was also studied. Firstly, we have accounted for two independent polarizations of GWs contrary to the case of a circularly polarized GW in Ref.~\cite{Dvo20}. Secondly, now we have found the exact solution of the equation for the density matrix in the general case of three neutrino flavors. This fact allowed us to correct some statements about the asymptotic behavior of neutrino fluxes, which were made basing on numerical simulations in Ref.~\cite{Dvo20}. In Ref.~\cite{Dvo20}, we studied the interaction between stochastic GWs and astrophysical neutrinos emitted in decays of charged pions. Sources of such neutrinos are distributed more or less uniformly in the universe. Thus one had to average over the neutrino propagation distance to get the fluxes at the Earth. This fact made it difficult to extract the contribution of stochastic GWs to neutrino fluxes. In the present work, we have considered neutrinos emitted in a SN explosion. It enables us not to perform the averaging over the propagation distance except for (31)- and (32)-oscillations channels. It is valid since the oscillations length $L_{21}$ is greater than the radius of the neutrinosphere, i.e. the size of the neutrino source. The distance $L$ between a possible SN explosion is great, but it is fixed. Therefore we should not average over $L/L_{21}$ in the probabilities for neutrino flavors. We have also obtained the analytical expression for the damping decrement $\Gamma$; cf. Eq.~(\ref{eq:GamEar}). This result allowed us to evaluate the contribution of other sources of stochastic GWs, e.g., merging BHs with stellar masses, to the evolution of neutrino fluxes. The straightforward derivation of the effective Hamiltonian for flavor neutrinos oscillations, presented in Appendix~\ref{sec:DERHG}, can be applied to different metrics perturbations besides GWs considered here. Using this result, we can study, e.g., the evolution of neutrinos in perturbations in the early universe~\cite{KouMet19,BayPen21}. In the present work, we have also studied the interaction between stochastic GWs and SN neutrinos emitted in the time interval $t_\mathrm{burst}<t\lesssim0.1\,\text{s}$. When $t \approx 0.1\,\text{s}$, the initial fluxes are almost equal, $\left(F_{\nu_{e}}:F_{\nu_{\mu}}:F_{\nu_{\tau}}\right)_{\mathrm{S}}=(1:1:1)$. We have found in Sec.~\ref{sec:APPL} that, in this situation, the contribution of stochastic GWs to the evolution of SN neutrinos is washed out; cf. Fig.~\ref{2b}. It means that the major effect is for neutrinos emitted at a $\nu_e$-burst, which corresponds to $\left(F_{\nu_{e}}:F_{\nu_{\mu}}:F_{\nu_{\tau}}\right)_{\mathrm{S}}=(1:0:0)$. The neutrino luminosity in a SN explosion remains significant up to $10\,\text{s}$ after the core bounce, which is the time scale for the neutrino driven PNS cooling~\cite{Bur84}. However, the influence of stochastic GWs on SN neutrinos emitted at $t>0.1\,\text{s}$ is vanishing since such neutrinos are emitted with almost equal probabilities. Thus, in Sec.~\ref{sec:APPL}, it is inexpedient to extend $\Delta t$ beyond the $0.1\,\text{s}$ interval. In Table~\ref{tab:fluxes}, we have summarized the contributions of stochastic GWs to the fluxes of flavor neutrinos at the Earth. They are at the level of a few percent. The current neutrino telescopes are able to detect up to several thousand neutrinos from SN in our Galaxy~\cite{Sch18}. Future detectors, like the Hyper-Kamiokande, can detect about $7.5\times10^{4}$ such events~\cite{Abe18}. Thus, the interaction with stochastic GWs can results in the change of the SN neutrinos fluxes by $\sim\pm350$ events, in case of the Super-Kamiokande, and by $\sim\pm3750$ events, for the Hyper-Kamiokande. \begin{acknowledgments} I am thankful to A.~V.~Yudin and J.~W.~F.~Valle for the communications, as well as to V.~A.~Berezin for the useful discussion. The work is supported by the government assignment of IZMIRAN. \end{acknowledgments}
\section{Introduction} Given two germs of holomorphic functions $f,g \in {\mathbb C}\{x,y\}$, the Jacobian determinant $$J(f,g)=f_x g_y-f_yg_x$$ defines a curve called the {\em jacobian curve} of $f$ and $g$ (see \cite{Mau,Cas-07} for instance). The analytic type of the jacobian curve is an invariant of the analytic type of the pair of curves $f=0$ and $g=0$ but its topological type is not a topological invariant of the pair of curves (see \cite{Mau99}). Properties of the jacobian curve have been studied by several authors in terms of properties of the curves $f=0$ and $g=0$ (see for instance \cite{Kuo-P-2004,Cas-07}, and \cite{Gar-G} when $g$ is a characteristic approximated root of $f$). This notion can be studied in the more general context given by the theory of singular foliations: given two germs of foliations $\mathcal F$ and $\mathcal G$ in $({\mathbb C}^2,0)$, defined by the 1-forms $\omega=0$ and $\eta=0$, the {\em jacobian curve} ${\mathcal J}_{{\mathcal F},{\mathcal G}}$ of $\mathcal F$ and $\mathcal G$ is the curve given by $$\omega \wedge \eta=0.$$ Note that this is the curve of tangency between both foliations. More precisely, if the 1-forms $\omega$ and $\eta$ are given by $\omega=A(x,y) dx + B(x,y) dy$ and $\eta=P(x,y) dx + Q(x,y) dy$, the jacobian curve ${\mathcal J}_{{\mathcal F},{\mathcal G}}$ is defined by $J(x,y)=0$ where \begin{equation} \label{eq:jacobiano} J(x,y)=\left| \begin{array}{cc} A(x,y) & B(x,y) \\ P(x,y) & Q(x,y) \end{array} \right|. \end{equation} Thus the multiplicity at the origin $m_0({\mathcal J}_{{\mathcal F},{\mathcal G}})$ of the jacobian curve satisfies \begin{equation}\label{eq:multiplicidad} m_0({\mathcal J}_{{\mathcal F},{\mathcal G}}) \geq \nu_0({\mathcal F}) + \nu_0({\mathcal G}) \end{equation} where $\nu_0( {\mathcal F} ), \ \nu_0({\mathcal G})$ denote the multiplicity at the origin of the foliations $\mathcal F$ and $\mathcal G$ respectively. It is easy to show that the branches of ${\mathcal J}_{{\mathcal F},{\mathcal G}}$ are not separatrices of $\mathcal F$ or $\mathcal G$ provided that the foliations $\mathcal F$ and $\mathcal G$ do not have common separatrices. In this paper we are interested in describing properties of the equisingularity type of ${\mathcal J}_{{\mathcal F},{\mathcal G}}$ in terms of invariants associated to the foliations $\mathcal F$ and $\mathcal G$. If the foliation $\mathcal G$ is non-singular, the jacobian curve ${\mathcal J}_{{\mathcal F},{\mathcal G}}$ coincides with the polar curve of the foliation $\mathcal F$. Properties of the equisingularity type of polar curves of foliations have been studied in \cite{Rou,Cor-2003,Cor-2009,Cor-2009-BullBraz}. Moreover, if the foliation $\mathcal F$ is given by $df=0$ with $f \in {\mathbb C}\{x,y\}$, we recover the notion of polar curve of a plane curve. The local study of these curves has also been widely treated by many authors (see for instance \cite{Mer,Cas-00,Gar,Le-M-W} or the recent works \cite{Alb-G,Hef-H-I}). Moreover, the use of polar curves of foliations allowed to describe properties of foliations. In \cite{Can-C-M}, the study of intersection properties of polar curves of foliations permitted to characterize generalized curve foliations as well as second type foliations; an expression of the GSV-index can also be given in terms of these invariants (see also \cite{Gen-M} for the dicritical case). The main result in this paper, Theorem \ref{th:desc-general}, gives a factorization of the jacobian curve ${\mathcal J}_{\mathcal{F},\mathcal{G}}$ of two generalized curve foliations $\mathcal F$ and $\mathcal G$ in terms of invariants given by the dual graph of the common minimal reduction of singularities of $\mathcal F$ and $\mathcal G$. This result depends on how ``similar'' are the foliations $\mathcal F$ and $\mathcal G$ in terms of its singularities and Camacho-Sad indices at the common singularities. We introduce the notion of collinear point and collinear divisor to measure this similarity between the foliations. Section \ref{sec:non-collinear} is devoted to study properties of non-collinear divisors; in particular, we give conditions to assure that the minimum multiplicity for the jacobian curve in \eqref{eq:multiplicidad} is attained. The results concerning properties of the jacobian curve ${\mathcal J}_{\mathcal{F},\mathcal{G}}$ when the foliations $\mathcal F$ and $\mathcal G$ have separatrices with only non-singular irreducible components are stated in section \ref{sec:jacobian} and their proofs can be found in section \ref{sec:pruebas}. The main result is proved in section \ref{sec:caso-general}. In section \ref{sec:local-invariants} we introduce some local invariants of singular foliations and we prove some formulas which describe the multiplicity of intersection of the jacobian curve with the separatrices of the foliations $\mathcal F$ and $\mathcal G$ in terms of the local invariants associated to $\mathcal F$ and $\mathcal G$. These formulas generalize some properties of polar curves of a foliation given in \cite{Cor-2003,Can-C-M} which were key in the proof of the characterization of generalized curve foliations and second type foliations given in \cite{Can-C-M}. The last part of the article (sections \ref{sec:curvas}, \ref{sec:aprox-roots}, \ref{sec:polars}) is devoted to explain how our results imply previous results concerning jacobian curves of plane curves or polar curves (given in \cite{Kuo-P-2004,Gar-G,Rou,Cor-2003}) which can be consider as particular cases of our results. \section{Local invariants of foliations and intersection multiplicities}\label{sec:local-invariants} Let $\mathbb F$ be the space of singular foliations in $({\mathbb C}^2,0)$. An element ${\mathcal F} \in {\mathbb F}$ is defined by a 1-form $\omega=0$, with $\omega=A(x,y)dx+B(x,y)dy$, or by the vector field ${\bf v} = -B(x,y) \partial/\partial x + A(x,y) \partial/\partial y$ where $A, B \in {\mathbb C}\{x,y\}$ are relatively prime. The origin is a singular point if $A(0)=B(0)=0$. The {\em multiplicity\/} $\nu_0({\mathcal F})$ of $\mathcal F$ at the origin is the minimum of the orders $\nu_0(A)$, $\nu_0(B)$ at the origin. Thus, the origin is a {\em singular point\/} of $\mathcal F$ if $\nu_0({\mathcal F}) \geq 1$. Consider a germ of irreducible analytic curve $S$ at $({\mathbb C}^2,0)$. We say that $S$ is a {\em separatrix\/} of $\mathcal F$ at the origin if $S$ is an invariant curve of the foliation $\mathcal F$. Therefore, if $f=0$ is a reduced equation of $S$, we have that $f$ divides $\omega \wedge df$. Let us now recall the desingularization process of a foliation. We say that the origin is a {\em simple singularity} of $\mathcal F$ if there are local coordinates $(x,y)$ in $({\mathbb C}^2,0)$ such that $\mathcal F$ is given by a $1$-form of the type $$\lambda y dx - \mu x dy + \text{ h.o.t}$$ with $\mu \neq 0$ and $\lambda/\mu \not\in {\mathbb Q}_{>0}$. If $\lambda=0$, the singularity is called a {\em saddle-node\/}. There are two formal invariant curves $\Gamma_x$ and $\Gamma_y$ which are tangent to $x=0$ and $y=0$ respectively, and such that they are both convergent in the case that $\lambda \mu \neq 0$. In the saddle-node situation with $\lambda=0$ and $\mu\neq 0$, we say that the saddle-node is {\em well oriented\/} with respect to the curve $\Gamma_y$. Let $\pi_1: X_1 \to ({\mathbb C}^2,0)$ be the blow-up of the origin with $E_1=\pi_1^{-1}(0)$ the exceptional divisor. We say that the blow-up $\pi_1$ (or the exceptional divisor $E_1$) is {\em non-dicritical\/} if $E_1$ is invariant by the strict transform $\pi_1^*{\mathcal F}$ of $\mathcal F$; otherwise, the exceptional divisor $E_1$ is generically transversal to $\pi_1^* {\mathcal F}$ and we say that the blow-up $\pi_1$ (or the divisor $E_1$) is {\em dicritical}. A {\em reduction of singularities\/} of $\mathcal F$ is a morphism $\pi: X \to ({\mathbb C}^2,0)$, composition of a finite number of punctual blow-ups, such that the strict transform $\pi^* {\mathcal F}$ of $\mathcal F$ verifies that \begin{itemize} \item each irreducible component of the exceptional divisor $\pi^{-1}(0)$ is either invariant by $\pi^*{\mathcal F}$ or transversal to $\pi^*{\mathcal F}$; \item all the singular points of $\pi^*{\mathcal F}$ are simple and do not belong to a dicritical component of the exceptional divisor. \end{itemize} There exists a reduction of singularities as a consequence of Seidenberg's Desingularization Theorem \cite{Sei}. Moreover, there is a minimal morphism $\pi$ such that any other reduction of singularities of $\mathcal F$ factorizes through the minimal one. The centers of the blow-ups of a reduction of singularities of $\mathcal F$ are called {\em infinitely near points\/} of $\mathcal F$. If all the irreducible components of the exceptional divisor are invariant by $\pi^*{\mathcal F}$ we say that the foliation $\mathcal F$ is {\em non-dicritical}; otherwise, $\mathcal F$ is called a {\em dicritical foliation}. A non-dicritical foliation $\mathcal F$ is called a {\em generalized curve foliation\/} if there are not saddle-node singularities in the reduction of singularities (see \cite{Cam-S-LN}). We will denote $\mathbb G$ the space of non-dicritical generalized curve foliations in $({\mathbb C}^2,0)$. The foliation $\mathcal F$ is of {\em second type} if all saddle-nodes of $\pi^*{\mathcal F}$ are well oriented with respect to the exceptional divisor $E=\pi^{-1}(0)$ (see \cite{Mat-S}). In order to describe properties of generalized curve foliations and second type foliations, let us recall some local invariants used in the local study of foliations in dimension two (see for instance \cite{Can-C-D}). The {\em Milnor number} $\mu_0({\mathcal F})$ is given by $$\mu_0({\mathcal F}) = \text{dim}_{\mathbb C}\frac{{\mathbb C}\{x,y\}}{(A,B)}= (A,B)_0,$$ where $(A,B)_0$ stands for the intersection multiplicity. Note that, if the foliation is defined by $df=0$, the Milnor number of the foliation coincides with the one of the curve given by $f=0$. Given an irreducible curve $S$ and a primitive parametrization $\gamma: ({\mathbb C},0) \to ({\mathbb C}^2,0)$ of $S$ with $\gamma(t)=(x(t),y(t))$, we have that $S$ is a separatrix of $\mathcal F$ if and only if $\gamma^* \omega=0$. In this case, the {\em Milnor number} $\mu_0({\mathcal F},S)$ of $\mathcal F$ {\em along\/} $S$ is given by $$\mu_0({\mathcal F},S)= \text{ord}_t {\bf w}(t), $$ where ${\bf w}(t)$ is the unique vector field at $({\mathbb C},0)$ such that $\gamma_* {\bf w}(t)={\bf v} \circ \gamma(t)$. We have that \begin{equation} \label{multiplicidaderelativa1} \mu_0({\mathcal F},S) = \begin{cases} {\rm ord}_{t}(B(\gamma(t))) - {\rm ord}_{t}(x(t)) + 1 \ \ \ \mbox{if $x(t) \neq 0$} \\ {\rm ord}_{t}(A(\gamma(t))) - {\rm ord}_{t}(y(t)) + 1 \ \ \ \mbox{if $y(t) \neq 0$} \end{cases} \end{equation} If $S$ is not a separatrix, we define the {\em tangency order} $\tau_0({\mathcal F},S)$ by \begin{equation}\label{def-tangencia} \tau_0({\mathcal F},S)= \text{ord}_t (\alpha(t)) \end{equation} where $\gamma^* \omega= \alpha(t) dt$. If $S=(y=0)$ is a non-singular invariant curve of the foliation $\mathcal F$, the {\em Camacho-Sad index of $\mathcal F$ relative to $S$ at the origin} is given by \begin{equation}\label{eq:indice-C-S} I_0({\mathcal F},S) = -\text{Res}_0 \frac{a(x,0)}{b(x,0)} \end{equation} where the 1-form defining $\mathcal F$ is written as $y a(x,y) dx + b(x,y) dy$ (see \cite{Cam-S}). Next result summarizes some of the properties of second type and generalized curve foliations that we will use throughout the text: \begin{Theorem}\cite{Cam-S-LN,Mat-S,Can-C-M} \label{th-curva-gen} Let $\mathcal F$ be a non-dicritical foliation and consider ${\mathcal G}_f$ the foliation defined by $df=0$ where $f$ is a reduced equation of the curve $S_{\mathcal F}$ of separatrices of $\mathcal F$. Let $\pi: X \to ({\mathbb C}^2,0)$ be the minimal reduction of singularities of $\mathcal F$. \begin{itemize} \item[(i)] $\pi$ is a reduction of singularities of $S_{\mathcal F}$. Moreover, $\pi$ is the minimal reduction of singularities of the curve $S_{\mathcal F}$ if and only if $\mathcal F$ is of second type; \item[(ii)] $\nu_0({\mathcal F}) \geq \nu_0({\mathcal G}_f)$ and the equality holds if and only if $\mathcal F$ is of second type; \item[(iii)] $\mu_0({\mathcal F}) \geq \mu_0({\mathcal G}_f)$ and the equality holds if and only if $\mathcal F$ is a generalized curve; \item[(iv)] if $S$ is an irreducible curve which is not a separatrix of $\mathcal F$, then $\tau_0({\mathcal F},S) \geq \tau_0({\mathcal G}_f,S) $ and the equality holds if and only if $\mathcal F$ is of second type. \end{itemize} \end{Theorem} Recall that for the hamiltonian foliation ${\mathcal G}_f$ we have that $\nu_0({\mathcal G}_f)= m_0(S_{\mathcal F})-1$, $\mu_0({\mathcal G}_f) =\mu_0(S_{\mathcal F})$ and $\tau_0({\mathcal G}_f,S)=(S_{\mathcal F},S)_0 -1$ where $m_0(S_{\mathcal F})$ is the multiplicity of the curve $S_{\mathcal F}$ at the origin and $(S_{\mathcal F},S)_0$ denotes the intersection multiplicity of the curves $S_{\mathcal F}$ and $S$ at the origin. \medskip \paragraph{\bf Notation.} Given a plane curve $C$ in $({\mathbb C}^2,0)$, we denote by ${\mathbb F}_C$ the sub-space of $\mathbb F$ composed by the foliations having $C$ as curve of separatrices and ${\mathbb G}_C$ the foliations of ${\mathbb F}_C$ which are generalized curve foliations. \medskip Moreover, for generalized curve foliations we have that \begin{Lemma}\cite{Cor-2009-AnnAcBras} Assume that $\mathcal F$ is a non-dicritical generalized curve foliation. Let $\pi: (X,P) \to ({\mathbb C}^2,0)$ be a morphism composition of a finite number of punctual blow-ups and take an irreducible component $E$ of the exceptional divisor $\pi^{-1}(0)$ with $P \in E$. Then, the strict transforms $\pi^*{\mathcal F}$ and $\pi^* {\mathcal G}_f$ satisfy that \begin{itemize} \item[1.] $\nu_P(\pi^*{\mathcal F})=\nu_P(\pi^* {\mathcal G}_f)$; \item[2.] $\mu_P(\pi^*{\mathcal F},E)=\mu_P(\pi^*{\mathcal G}_f,E)$. \end{itemize} where $f=0$ is a reduced equation of the curve $S_{\mathcal F}$ of separatrices of $\mathcal F$. \end{Lemma} \medskip We state now two results concerning the intersection multiplicity of the jacobian curve of two foliations either with a single separatrix of one of the foliations and with the curve of all separatrices. These intersection multiplicities are computed in terms of local invariants of the foliations. Consider two foliations $\mathcal F$ and $\mathcal G$ in $({\mathbb C}^2,0)$ and denote by $\mathcal{J}_{\mathcal{F},\mathcal{G}}$ the jacobian curve of $\mathcal F$ and $\mathcal G$. \begin{Proposition}\label{prop:int-sep} Assume that $\mathcal F$ and $\mathcal G$ have no common separatrix. If $S$ is an irreducible separatrix of $\mathcal F$, we have that $$(\mathcal{J}_{\mathcal{F},\mathcal{G}},S)_0 = \mu_0({\mathcal F},S)+\tau_0({\mathcal G},S). $$ \end{Proposition} \begin{proof} Let us write $\omega=A(x,y) dx + B(x,y)dy$ and $\eta=P(x,y) dx + Q(x,y) dy$ the 1-forms defining $\mathcal F$ and $\mathcal G$ respectively. Let $\gamma(t)=(x(t),y(t))$ be a parametrization of the curve $S$. We can assume, without lost of generality, that $x(t) \neq 0$ and thus $\dot{x}(t) \neq 0$. Since $S$ is a separatrix of $\mathcal F$, then $A(\gamma(t)) \dot{x}(t) + B(\gamma(t)) \dot{y}(t)=0$. Thus, we have that \begin{align*} (\mathcal{J}_{\mathcal{F},\mathcal{G}},S)_0 & = \text{ord}_t\{A(\gamma(t)) Q(\gamma(t)) - B(\gamma(t)) P(\gamma(t))\} \\ & = \text{ord}_t \left\{ \frac{-B(\gamma(t)) \dot{y}(t)}{\dot{x}(t)} Q(\gamma(t)) - B(\gamma(t)) P(\gamma(t)) \right\} \\ & = \text{ord}_t (B(\gamma(t)))- (\text{ord}_t (x(t))-1) + \text{ord}_t \{P(\gamma(t)) \dot{x}(t) + Q(\gamma(t)) \dot{y}(t) \} \\ &= \mu_0({\mathcal F},S)+\tau_0({\mathcal G},S) \end{align*} where the last equality comes from the expression of $\mu_0({\mathcal F},S)$ given in \eqref{multiplicidaderelativa1} and the definition of $\tau_0({\mathcal G},S)$ given in \eqref{def-tangencia}. \end{proof} When $\mathcal G$ is a non-singular foliation, we obtain Proposition 1 in \cite{Can-C-M} for the polar intersection number with respect to a branch of the curve of separatrices of $\mathcal F$. Note that, although in \cite{Can-C-M} it is assumed that the foliation $\mathcal F$ is non-dicritical, the result is also true when $\mathcal F$ is a dicritical foliation. Using property (iv) in Theorem~\ref{th-curva-gen}, we get following consequence of the above result: \begin{Corollary} If $\mathcal G$ is a non-dicritical generalized curve foliation and $S_{\mathcal G}$ is the curve of separatrices of $\mathcal G$, we have that $$(\mathcal{J}_{\mathcal{F},\mathcal{G}},S)_0 = \mu_0({\mathcal F},S)+(S_{\mathcal G},S)_0 -1.$$ \end{Corollary} Next result gives a relationship among the intersection multiplicities of the jacobian curve with the curves of separatrices and the Milnor number of the foliations. \begin{Proposition}\label{prop:milnor-number} Consider two non-dicritical second type foliations ${\mathcal F}$ and ${\mathcal G}$ without common separatrices. Thus $$({\mathcal J}_{{\mathcal F},{\mathcal G}},S_{\mathcal F})_0-({\mathcal J}_{{\mathcal F},{\mathcal G}},S_{\mathcal G})_0=\mu_0({\mathcal F})-\mu_0({\mathcal G}),$$ where $S_{\mathcal F}$, $S_{\mathcal G}$ are the curves of separatrices of $\mathcal F$ and $\mathcal G$ respectively. \end{Proposition} \begin{proof} Let ${\mathcal B}({\mathcal J}_{{\mathcal F},{\mathcal G}})$ be the set of irreducible components of ${\mathcal J}_{{\mathcal F},{\mathcal G}}$. Given any branch $\Gamma \in {\mathcal B}({\mathcal J}_{{\mathcal F},{\mathcal G}})$, we denote by $\gamma_\Gamma(t)=(x_\Gamma(t),y_\Gamma(t))$ any primitive parametrization of $\Gamma$. Assume that the foliations $\mathcal F$ and $\mathcal G$ are defined by the 1-forms $\omega=A dx + Bdy$ and $\eta=P dx + Qdy$ respectively. Thus we have that $A(\gamma_\Gamma(t)) Q(\gamma_\Gamma(t)) - B(\gamma_\Gamma(t)) P(\gamma_\Gamma(t))=0$. Since $\Gamma$ is not a separatrix of $\mathcal G$, then either $Q(\gamma_\Gamma(t)) \not \equiv 0$ or $P(\gamma_\Gamma(t)) \not \equiv 0$. We will assume that $Q(\gamma_\Gamma(t)) \not \equiv 0$. Let us compute the intersection multiplicity of $({\mathcal J}_{{\mathcal F},{\mathcal G}},S_{\mathcal F})_0$ taking into account property (iv) in Theorem~\ref{th-curva-gen}: \begin{align*} ({\mathcal J}_{{\mathcal F},{\mathcal G}},S_{\mathcal F})_0 & = \sum_{\Gamma \in {\mathcal B}({\mathcal J}_{{\mathcal F},{\mathcal G}})} (\Gamma,S_{\mathcal F})_0 = \sum_{\Gamma \in {\mathcal B}({\mathcal J}_{{\mathcal F},{\mathcal G}})} ( \tau_0({\mathcal F},\Gamma) + 1)\\ & = \sum_{\Gamma \in {\mathcal B}({\mathcal J}_{{\mathcal F},{\mathcal G}})} (\text{ord}_t \{A(\gamma_\Gamma(t)) \dot{x}_\Gamma(t) + B(\gamma_\Gamma(t)) \dot{y}_\Gamma(t) \} +1) \\ & = \sum_{\Gamma \in {\mathcal B}({\mathcal J}_{{\mathcal F},{\mathcal G}})} \left(\text{ord}_t \left\{ \frac{B(\gamma_\Gamma(t)) P(\gamma_\Gamma(t))}{Q(\gamma_\Gamma(t))} \dot{x}_\Gamma(t) + B(\gamma_\Gamma(t)) \dot{y}_\Gamma(t) \right\}+1 \right) \\ & = \sum_{\Gamma \in {\mathcal B}({\mathcal J}_{{\mathcal F},{\mathcal G}})} \text{ord}_t\{B(\gamma_\Gamma(t))\} - \sum_{\Gamma \in {\mathcal B}({\mathcal J}_{{\mathcal F},{\mathcal G}})} \text{ord}_t\{Q(\gamma_\Gamma(t))\} \\ &+ \sum_{\Gamma \in {\mathcal B}({\mathcal J}_{{\mathcal F},{\mathcal G}})} (\text{ord}_t \{P(\gamma_\Gamma(t)) \dot{x}_\Gamma(t) + Q(\gamma_\Gamma(t)) \dot{y}_\Gamma(t)\} +1) \\ & = \mu_0({\mathcal F}) - \mu_0({\mathcal G}) + \sum_{\Gamma \in {\mathcal B}({\mathcal J}_{{\mathcal F},{\mathcal G}})} ( \tau_0({\mathcal G},\Gamma) + 1)\\ & = \mu_0({\mathcal F}) - \mu_0({\mathcal G}) + ({\mathcal J}_{{\mathcal F},{\mathcal G}},S_{\mathcal G})_0. \end{align*} \end{proof} \section{Equisingularity data and dual graph}\label{Apendice:grafo-dual} In this section we will fix some notations concerning the equisingularity data of a plane curve $C=\cup_{i=1}^r C_i$ in $({\mathbb C}^2,0)$. Given an irreducible component $C_i$ of $C$, we will denote $n^i=m_0(C_i)$ the multiplicity of $C_i$ at the origin, $\{\beta_0^i,\beta_1^i,\ldots,\beta_{g_i}^i\}$ the characteristic exponents of $C_i$ and $\{(m_l^i,n_l^i)\}_{l=1}^{g_i}$ the Puiseux pairs of $C_i$. Let us denote $\pi_C : X_C \to ({\mathbb C}^2,0)$ the minimal reduction of singularities of the curve $C$. The {\em dual graph\/} $G(C)$ is constructed as follows: each irreducible component $E$ of the exceptional divisor $\pi_{C}^{-1}(0)$ is represented by a vertex which we also call $E$ (we identify a divisor and its associated vertex in the dual graph). Two vertices are joined by an edge if and only if the associated divisors intersect. Each irreducible component of $C$ is represented by an arrow joined to the only divisor which meets the strict transform of $C$ by $\pi_C$. We can give a weight to each vertex $E$ of $G(C)$ equal to the self-intersection of the divisor $E \subset X_C$ and this weighted dual graph is equivalent to the equisingularity data of $C$. If we denote by $E_1$ the irreducible component of $\pi_{C}^{-1}(0)$ obtained by the blow-up of the origin, we can give an orientation to the graph $G(C)$ beginning from the first divisor $E_1$. The {\em geodesic\/} of a divisor $E$ is the path which joins the first divisor $E_1$ with the divisor $E$. The geodesic of a curve is the geodesic of the divisor that meets the strict transform of the curve. Thus, there is a partial order in the set of vertices of $G(C)$ given by $E < E'$ if and only if the geodesic of $E'$ goes through $E$. Given a divisor $E$ of $G(C)$, we denote by $I_E$ the set of indices $i \in \{1,2,\ldots, r\}$ such that $E$ belongs to the geodesic of the curve $C_i$. A {\em curvette\/} $\tilde{\gamma}$ of a divisor $E$ is a non-singular curve transversal to $E$ at a non-singular point of $\pi_{C}^{-1}(0)$. The projection $\gamma=\pi_{C}(\tilde{\gamma})$ is a germ of plane curve in $({\mathbb C}^2,0)$ and we say that $\gamma$ is an {\em $E$-curvette}. We denote by $m(E)$ the multiplicity at the origin of any $E$-curvette and by $v(E)$ the coincidence ${\mathcal C}(\gamma_E,\gamma_E')$ of two $E$-curvettes $\gamma_E, \gamma_E'$ which cut $E$ in different points. Note that $v(E) < v(E')$ if $E < E'$. Recall that the {\em coin\-cidence\/} ${\mathcal C}(\gamma,\delta)$ between two irreducible curves $\gamma$ and $\delta$ is defined as $$ {\mathcal C}(\gamma,\delta) = \sup_{\ 1 \leq i \leq m_0(\gamma) \atop 1 \leq j \leq m_0(\delta)} \{ \text{ord}_{x}(y^{\gamma}_i(x)-y^{\delta}_j(x))\ \} $$ where $\{y_{i}^{\gamma}(x)\}_{i=1}^{m_0(\gamma)}$, $\{y_{j}^{\delta}(x)\}_{j=1}^{m_0(\delta)}$ are the Puiseux series of $\gamma$ and $\delta$ respectively. \begin{Remark}\label{rmk:coincidencia-mult-int} Note that the coincidence ${\mathcal C}(\gamma,\delta)$ between two irreducible curves $\gamma$ and $\delta$ and the intersection multiplicity $(\gamma,\delta)_0$ of both curves at the origin are related as follows (see Merle \cite{Mer}, prop. 2.4): if $\{\beta_0,\beta_1,\ldots,\beta_g\}$ are the characteristic exponents of $\gamma$ and $\alpha$ is a rational number such that $\beta_q \leq \alpha < \beta_{q+1}$ ($\beta_{g+1}=\infty$), then the following statements are equivalent: \begin{align*} \text{(i)}& \ \ {\mathcal C}(\gamma,\delta) = \frac{\alpha}{m_0(\gamma)} \hspace{8cm}\\ \text{(ii)} & \ \ \frac{(\gamma,\delta)_0}{m_0(\delta)} =\frac{\bar{\beta}_q}{n_1 \cdots n_{q-1}} + \frac{\alpha-\beta_q}{n_1 \cdots n_q} \end{align*} where $\{(m_i,n_i)\}_{i=1}^g$ are the Puiseux pairs of $\gamma$ ($n_0=1$) and $\{\bar{\beta}_0,\bar{\beta}_1,\ldots, \bar{\beta}_g\}$ is a minimal system of generators of the semigroup $S(\gamma)$ of $\gamma$. \end{Remark} Given a vertex $E$ of $G(C)$ we define the number $b_E$ in the following way: $b_E +1$ is the valence of $E$ if $E \neq E_1$ and $b_{E_1}$ is the valence of $E_1$. Given a divisor $E$ of $G(C)$, we say that $E$ is a {\em bifurcation divisor\/} if $b_E \geq 2$ and a {\em terminal divisor\/} if $b_E=0$. A {\em dead arc\/} is a path which joins a bifurcation divisor with a terminal one without going through other bifurcation divisor. We denote by $B(C)$ the set of bifurcation divisors of $G(C)$. Given an irreducible component $E$ of $\pi^{-1}_C(0)$, we denote by $\pi_E: X_E \to ({\mathbb C}^2,0)$ the {\em morphism reduction\/} of $\pi_C$ to $E$ (see \cite{Cor-2009}), that is, the morphism which verifies that \begin{itemize} \item the morphism $\pi_C$ factorizes as $\pi_C= \pi_E \circ \, \pi_E'$ where $\pi_E$ and $\pi_E'$ are composition of punctual blow-ups; \item the divisor $E$ is the strict transform by $\pi_E'$ of an irreducible component $E_{red}$ of $\pi_E^{-1}(0)$ and $E_{red} \subset X_E$ is the only component of $\pi_E^{-1}(0)$ with self-intersection equal to $-1$. \end{itemize} We will denote by $\pi_E^* C$ the strict transform of $C$ by the morphism $\pi_E$. The points $\pi_E^* C \cap E_{red}$ are called {\em infinitely near points\/} of $C$ in $E$. Consider any curvette $\tilde{\gamma}_E$ of $E$, then $\pi_{E}'(\tilde{\gamma}_E)$ is also a curvette of $E_{red} \subset X_E$ and it is clear that $m(E)=m(E_{red})$ and $v(E)=v(E_{red})$. Let $\{ \beta_0^E,\beta_1^E, \ldots, \beta_{g(E)}^{E}\}$ be the characteristic exponents of $\gamma_E = \pi_{C}(\tilde{\gamma}_E)$. Then we have that $m(E)=\beta_0^E=m_0(\gamma_{E})$. There are two possibilities for the value of $v(E)$: \begin{itemize} \item[1.] either $\pi_E$ is the minimal reduction of singularities of $\gamma_E$ and then $v(E)=\beta_{g(E)}^E/\beta_0^E$. We say that $E$ is a {\em Puiseux divisor\/} for $\pi_C$ (or $C$); \item[2.] or $\pi_E$ is obtained by blowing-up $q \geq 1$ times after the minimal reduction of singularities of $\gamma_E$ and in this situation $v(E) = (\beta_{g(E)}^{E}+q \beta_0^E) /\beta_0^E$. In this situation, if $E$ is a bifurcation divisor, we say that $E$ is a {\em contact divisor\/} for $\pi_C$ (or $C$). \end{itemize} Moreover, a bifurcation divisor $E$ can belong to a dead arc only if it is a Puiseux divisor. Take $E$ a bifurcation divisor of $G(C)$ and let $\{(m_1^E,n_1^E), (m_2^E,n_2^E), \ldots, (m_{g(E)}^E,n_{g(E)}^E)\}$ be the Puiseux pairs of an $E$-curvette $\gamma_E$, we denote $$n_E = \left\{ \begin{array}{ll} n_{g(E)}, & \hbox{ if $E$ is a Puiseux divisor;} \\ 1, & \hbox{otherwise,} \end{array} \right. $$ and $\underline{n}_E=m(E)/n_E$. Observe that, if $E$ belongs to a dead arc with terminal divisor $F$, then $m(F)=\underline{n}_E$. We define $k_E$ to be $$ k_E =\left\{ \begin{array}{ll} g(E)-1, & \hbox{if $E$ is a Puiseux divisor;} \\ g(E), & \hbox{if $E$ is a contact divisor.} \end{array} \right. $$ Hence we have that $\underline{n}_E=n_1^E \cdots n_{k_E}^E$. \begin{Remark}\label{rk:bif-div} Let $E$ be a bifurcation divisor of $G(C)$ which is a Puiseux divisor for $C$ and take any $i \in I_E$. We have two possibilities concerning $v(E)$: \begin{itemize} \item either $v(E)=\beta_{k_E+1}^i/\beta_0^i$, then we say that $E$ is a {\em Puiseux divisor for\/} $C_i$; \item or $v(E)$ corresponds to the coincidence of $C_i$ with another branch of $C$, in this situation we say that $E$ is a {\em contact divisor for\/} $C_i$. \end{itemize} Note that, if $E$ is a Puiseux divisor for $C$, then it is a Puiseux divisor for at least one irreducible component $C_i$ with $i \in I_E$, but it can be a contact divisor for other branches $C_j$ with $j \in I_E$, $j\neq i$. Consider for instance the curve $C=C_1 \cup C_2$ with $C_1=(y^2-x^3=0)$ and $C_2=(y-x^2=0)$. The dual graph $G(C)$ is given by \vspace*{0.5\baselineskip} \begin{center} \begin{texdraw} \arrowheadtype t:F \arrowheadsize l:0.08 w:0.04 \drawdim mm \setgray 0 \move(10 20) \fcir f:0 r:0.8 \rlvec (10 0) \fcir f:0 r:0.8 \rlvec (0 -7) \fcir f:0 r:0.8 \move (20 20) \avec (25 23) \move (26 21) \htext{\tiny{$C_1$}} \move (20 13) \avec (25 16) \move (9 16) \htext{\tiny$E_1$} \move (21 17) \htext{\tiny{$E_3$}} \move (16 10) \htext{\tiny{$E_2$}} \move (26 14) \htext{\tiny{$C_2$}} \end{texdraw} \end{center} Thus the divisor $E_3$ is a Puiseux divisor for $C$ and $C_1$ but it is a contact divisor for $C_2$ since $v(E_3)=3/2={\mathcal C}(C_1,C_2)$. \end{Remark} \section{Logarithmic foliations}\label{sec:logarithmic} Consider a germ of plane curve $C=\cup_{i=1}^r C_i$ in $({\mathbb C}^2,0)$. Take $f \in {\mathbb C}\{x,y\}$ such that $C=(f=0)$ and let us write $f= f_1 \cdots f_r$ with $f_i \in {\mathbb C}\{x,y\}$ irreducible. Given $\lambda= (\lambda_1, \ldots, \lambda_r) \in {\mathbb C}^r$, we can consider the logarithmic foliation ${\mathcal L}_{\lambda}^C$ defined by \begin{equation}\label{eq:1-forma-log} f_1 \cdots f_r \sum_{i=1}^{r} \lambda_i \frac{df_i}{f_i}=0. \end{equation} The logarithmic foliation ${\mathcal L}_{\lambda}^C$ belongs to ${\mathbb G}_C$ provided that $\lambda$ avoid certain rational resonances. Each generalized curve foliation ${\mathcal F} \in {\mathbb G}_C$ has a {\em logarithmic model\/} ${\mathcal L}_\lambda^C$, that is, a logarithmic foliation such that the Camacho-Sad indices of ${\mathcal F}$ and ${\mathcal L}_\lambda^C$ coincide along the reduction of singularities (see \cite{Cor-2003}); note that $\mathcal F$ and ${\mathcal L}_\lambda^C$ have the same separatrices and the same minimal reduction of singularities. Moreover, the logarithmic model of $\mathcal F$ is unique once a reduced equation of the separatrices is fixed. Thus, for each foliation ${\mathcal F} \in {\mathbb G}_C$, we denote by $\lambda({\mathcal F})$ the exponent vector of the logarithmic model of $\mathcal F$ and we denote ${\mathbb G}_{C,\lambda}$ the set of foliations ${\mathcal F} \in {\mathbb G}_C$ such that $\lambda({\mathcal F})=\lambda$. A particular case of logarithmic foliation is the ``hamiltonian" foliation defined by $df=0$ which corresponds to $\lambda=(1,\ldots,1)$; this foliation coincides with the foliation ${\mathcal G}_f$ used in section~\ref{sec:local-invariants}. Let us fix some notations concerning logarithmic foliations that will be used in the sequel. Assume that the curve $C=\cup_{i=1}^r C_i$ has only non-singular irreducible components and consider a non-dicritical logarithmic foliation ${\mathcal L}_\lambda^C$ given by~\eqref{eq:1-forma-log}. Let $\pi_C : X_C \to ({\mathbb C}^2,0)$ be the minimal reduction of singularities of $C$, take $E$ an irreducible component of $\pi_C^{-1}(0)$ and consider $\pi_E: X_E \to ({\mathbb C}^2,0)$ the morphism reduction of $\pi_C$ to $E$ (see section~\ref{Apendice:grafo-dual}). Given an irreducible component $C_j$ of $C$ and a divisor $F$ of $\pi_C^{-1}(0)$, we denote $\varepsilon_{F}^{C_j}=1$ if the geodesic of $C_j$ contains the divisor $F$ and $\varepsilon_{F}^{C_j}=0$ otherwise, that is, $$ \varepsilon_{F}^{C_j}= \left\{ \begin{array}{ll} 1, & \hbox{ if } j \in I_F \\ 0, & \hbox{ if } j \not \in I_F. \end{array} \right. $$ The {\em residue of the logarithmic foliation} ${\mathcal L}_\lambda^C$ {\em along the divisor} $E$ is given by \begin{equation}\label{eq:peso-divisor-log} \kappa_E({\mathcal L}_\lambda^C)=\sum_{j=1}^{r} \lambda_j \sum_{E' \leq E} \varepsilon_{E'}^{C_j}, \end{equation} where $E' \leq E$ means all divisors in $G(C)$ which are in the geodesic of $E$ (including $E$ itself). Note that $\kappa_E({\mathcal L}_\lambda^C)= \sum_{j=1}^{r} \lambda_j m_E^{C_j}$ where $m_E^{C_j}$ is the multiplicity of $f_j \circ \pi_E$ along the divisor $E$ (see \cite{Pau-89,Pau-95}). Let $\{R_1^E, R_2^E, \cdots, R_{b_E}^E\}$ be the set of points $\pi_E^* C \cap E_{red}$ and put $I_{R_l^E}^C=\{ i \in \{1,\ldots, r\} \ : \ \pi_E^*C_i \cap E_{red}= \{R_l^E\}\}$ for $l=1,2,\ldots, b_E$. An easy computation shows that the Camacho-Sad index of $\pi_E^* {\mathcal L}_\lambda^C$ relative to $E_{red}$ at a point $R_l^E$ is given by \begin{equation}\label{eq:camacho-sad-log} I_{R_l^E}(\pi_E^* {\mathcal L}_\lambda^C,E_{red})= -\frac{\ \ \sum_{i \in I_{R_l^E}^C} \lambda_i \ \ }{\kappa_E({\mathcal L}_\lambda^C)} \end{equation} (see \cite{Cor-2003}, section 4). Consider now a curve $C=\cup_{i=1}^r C_i$ in $({\mathbb C}^2,0)$ which can have singular irreducible components. Let $\rho: ({\mathbb C}^2,0) \to ({\mathbb C}^2,0)$ be any $C$-ramification, that is, $\rho$ is transversal to $C$ and the curve $\widetilde{C}=\rho^{-1}C$ has only non-singular irreducible components (see Appendix~\ref{ap:ramificacion} for notations concerning ramifications). We have that $\rho^*{\mathcal L}_{\lambda}^C = {\mathcal L}_{\lambda^*}^{\widetilde{C}}$ with $$ \lambda^* = (\overbrace{\lambda_{1}, \ldots,\lambda_{1}}^{n^1}, \ldots, \overbrace{\lambda_{r}, \ldots, \lambda_{r}}^{n^{r}}) $$ where $n^i=m_0(C_i)$ for $i=1,\ldots,r$. We put $\rho^{-1}C_i= \widetilde{C}_i=\{ \sigma_t^i\}_{t=1}^{n^i}$ where each $\sigma_t^i$ is an irreducible curve. Let $\pi_C : X_C \to ({\mathbb C}^2,0)$ be the minimal reduction of singularities of $C$ and $\pi_{\widetilde{C}} : X_{\widetilde{C}} \to ({\mathbb C}^2,0)$ be the minimal reduction of singularities of $\widetilde{C}$. Take $E$ a bifurcation divisor of $G(C)$ and let $\widetilde{E}^l$ be any bifurcation divisor of $G(\widetilde{C})$ associated to $E$. Given any $i \in I_E$, there are $e_E^i$ branches of $\rho^{-1}C_i$ such that $\widetilde{E}^l$ belongs to their geodesics where $e_E^i=n^i/\underline{n}_E$ (see section~\ref{Apendice:grafo-dual} and Appendix~\ref{ap:ramificacion} for notations) and we have that $$ \kappa_{\widetilde{E}^l}({\mathcal L}_{\lambda^*}^{\widetilde{C}})=\sum_{i=1}^{r} \lambda_i \sum_{t=1}^{n^i} \sum_{\widetilde{E} \leq \widetilde{E}^l} \varepsilon_{\widetilde{E}}^{\sigma_t^i}. $$ Let $\{R_1^{\widetilde{E}^l}, R_2^{\widetilde{E}^l}, \cdots, R_{b_{\widetilde{E}^l}}^{\widetilde{E}^l}\}$ be the set of points $\pi_{\widetilde{E}^l}^* \widetilde{C} \cap \widetilde{E}^l_{red}$ and put $m_{R_t^{\widetilde{E}^l}}^i=m_{R_t^{\widetilde{E}^l}} ( \pi_{\widetilde{E}^l}^* \widetilde{C}_i)$ for $t=1,2, \ldots, b_{\widetilde{E}^l}$. Note that $m_{R_t^{\widetilde{E}^l}}^i= \sharp \{ s \in \{1,\ldots, n^i\} \ : \ \pi_{\widetilde{E}^l}^* \sigma_s^i \cap \widetilde{E}^l_{red}= \{ R_t^{\widetilde{E}^l} \} \} =\frac{e_E^i}{n_E}$ (the last equality follows from equations~\eqref{eq:mult-C_i} and \eqref{eq:mult-C_i-2} in Appendix~\ref{ap:ramificacion} where $m_{R_t^{\widetilde{E}^l}}^i$ is also computed). With these notations we have that \begin{equation}\label{eq:camacho-sad-log-ram} I_{R_t^{\widetilde{E}^l}}(\pi_{\widetilde{E}^l}^* {\mathcal L}_{\lambda^*}^{\widetilde{C}},\widetilde{E}^l_{red})= -\frac{\ \ \sum_{i \in I_E} \lambda_i m_{R_t^{\widetilde{E}^l}}^i\ \ }{\kappa_{\widetilde{E}^l}({\mathcal L}_{\lambda^*}^{\widetilde{C}})}. \end{equation} Observe that if $\widetilde{E}^l$ and $\widetilde{E}^k$ are two bifurcation divisors of $G(\widetilde{C})$ associated to the same divisor $E$ of $G(C)$, we have that $\kappa_{\widetilde{E}^l}({\mathcal L}_{\lambda^*}^{\widetilde{C}}) = \kappa_{\widetilde{E}^k}({\mathcal L}_{\lambda^*}^{\widetilde{C}})$. Moreover, there is a bijection between the sets of points $\pi_{\widetilde{E}^l}^* \widetilde{C} \cap \widetilde{E}^l_{red}$ and $\pi_{\widetilde{E}^k}^* \widetilde{C} \cap \widetilde{E}^k_{red}$ induced by the map $\rho_{l,k}: \widetilde{E}^l_{red} \to \widetilde{E}^k_{red}$ (see Appendix~\ref{ap:ramificacion}). Hence, if $\{R_1^{\widetilde{E}^k}, R_2^{\widetilde{E}^k}, \cdots, R_{b_{\widetilde{E}^k}}^{\widetilde{E}^k}\}$ is the set of points $\pi_{\widetilde{E}^k}^* \widetilde{C} \cap \widetilde{E}^k_{red}$ with $R_t^{\widetilde{E}^k}= \rho_{l,k}(R_t^{\widetilde{E}^l})$ for $t=1,2,\ldots, b_{\widetilde{E}^k}$, we have that \begin{equation}\label{eq:indices-ramificados} I_{R_t^{\widetilde{E}^k}}(\pi_{\widetilde{E}^k}^* {\mathcal L}_{\lambda^*}^{\widetilde{C}},\widetilde{E}^k_{red}) = I_{R_t^{\widetilde{E}^l}}(\pi_{\widetilde{E}^l}^* {\mathcal L}_{\lambda^*}^{\widetilde{C}},\widetilde{E}^l_{red}), \qquad t=1,2,\ldots, b_{\widetilde{E}^k}. \end{equation} Moreover, if $R_t^{\widetilde{E}^l}, R_s^{\widetilde{E}^l}$ are two points in $\pi_{\widetilde{E}^l}^* \widetilde{C} \cap \widetilde{E}^l_{red}$ with $\rho_{\widetilde{E}^l,E}(R_t^{\widetilde{E}^l}) =\rho_{\widetilde{E}^l,E}(R_s^{\widetilde{E}^l})$ where $\rho_{\widetilde{E}^l,E}: \widetilde{E}^l_{red} \to E_{red}$ is the ramification defined in Appendix~\ref{ap:ramificacion}, then \begin{equation}\label{eq:indices-ramificados-mismo-divisor} I_{R_t^{\widetilde{E}^l}}(\pi_{\widetilde{E}^l}^* {\mathcal L}_{\lambda^*}^{\widetilde{C}},\widetilde{E}^l_{red}) =I_{R_s^{\widetilde{E}^l}}(\pi_{\widetilde{E}^l}^* {\mathcal L}_{\lambda^*}^{\widetilde{C}},\widetilde{E}^l_{red}) \end{equation} since $m_{R_t^{\widetilde{E}^l}}^i=m_{R_s^{\widetilde{E}^l}}^i=\frac{e_E^i}{n_E}$ for $i \in I_E$ by equations~\eqref{eq:mult-C_i} and \eqref{eq:mult-C_i-2} in Appendix~\ref{ap:ramificacion}. \section{The jacobian curve}\label{sec:jacobian} Consider two singular foliations $\mathcal F$ and $\mathcal G$ in $({\mathbb C}^2,0)$ defined by the 1-forms $\omega=0$ and $\eta=0$ with $\omega=A(x,y) dx + B(x,y) dy$ and $\eta=P(x,y) dx + Q(x,y) dy$. Then the jacobian curve ${\mathcal J}_{{\mathcal F},{\mathcal G}}$ is defined by $J(x,y)=0$ where $$J(x,y)=A(x,y) Q(x,y) - B(x,y) P(x,y).$$ Let us now introduce some notations and definitions in order to describe properties of the jacobian curve. Let $C$ and $D$ be two plane curves in $({\mathbb C}^2,0)$ without common branches and assume that the curve $Z=C \cup D$ has only non-singular irreducible components. Take now ${\mathcal F} \in {\mathbb G}_C$ and ${\mathcal G} \in {\mathbb G}_D$ and let $\pi_Z: X_Z \to ({\mathbb C}^2,0)$ be the minimal reduction of singularities of $Z$ which gives a common reduction of singularities of $\mathcal F$ and $\mathcal G$. Recall that, given an irreducible component $E$ of $\pi_Z^{-1}(0)$, we denote by $\pi_E: X_E \to ({\mathbb C}^2,0)$ the {\em morphism reduction\/} of $\pi_Z$ to $E$ (see section~\ref{Apendice:grafo-dual}). Let $\{R_1^E, R_2^E, \ldots, R_{b_E}^E\}$ be the union of the singular points of $\pi_E^* {\mathcal F}$ and $\pi_E^* {\mathcal G}$ in the first chart of $E_{red}$, that is, $\pi_E^* Z \cap E_{red} = \{R_1^E, R_2^E, \ldots, R_{b_E}^E\}$ are the infinitely near points of $Z$ in $E$. We denote $$\Delta_E^{{\mathcal F},{\mathcal G}}(R_i^E)=\left| \begin{array}{cc} 1 & I_{R_i^E}(\pi_E^* {\mathcal F},E_{red}) \\ & \\ 1 & I_{R_i^E}(\pi_E^* {\mathcal G},E_{red}) \\ \end{array} \right| $$ where $I_{R_i^E}(\pi_E^* {\mathcal F},E_{red})$ is the Camacho-Sad index of $\pi_E^* {\mathcal F}$ relative to $E_{red}$ at the point $R_i^E$ (see definition given in \eqref{eq:indice-C-S}). We will denote $\Delta_E(R_i^E)=\Delta_E^{{\mathcal F},{\mathcal G}}(R_i^E)$ if it is clear the foliations $\mathcal F$ and $\mathcal G$ we are working with. In view of the notations given in \cite{Kuo-P-2002,Kuo-P-2004} for curves, we introduce the following definitions for foliations: \begin{Definition} We say that an infinitely near point $R_l^E$ of $Z$ is a {\em collinear point\/} for the foliations $\mathcal F$ and $\mathcal G$ in $E$ if $\Delta_E(R_l^E)=0$; otherwise we say that $R_l^E$ is a {\em non-collinear point\/}. We say that a divisor $E$ is {\em collinear (for the foliations $\mathcal F$ and $\mathcal G$)\/} if $\Delta_E(R_l^E)=0$ for all $l=1,\ldots, b_E$; otherwise $E$ is called a {\em non-collinear divisor\/}. A divisor $E$ is called {\em purely non-collinear\/} if $\Delta_E(R_l^E) \neq 0$ for each $l=1,\ldots, b_E$. \end{Definition} We denote by $C(E)$ the set of collinear points of $E$ and by $N(E)$ the set of non-collinear points. It is clear that $C(E) \cup N(E) = \{R_1^E, R_2^E, \ldots, R_{b_E}^E\}$. Note that if $E$ is a maximal bifurcation divisor, then $E$ is purely non-collinear. Some properties of non-collinear divisors will be given in section~\ref{sec:non-collinear}. Although the definition of $\Delta_E(R_l^E)$ seems different to the one given by Kuo and Parusi\'nski in \cite{Kuo-P-2002,Kuo-P-2004}, we will show in section~\ref{sec:curvas} that both definitions coincide in the case of curves. \medskip Take coordinates $(x_p,y_p)$ in the first chart of $E_{red}$ such that $\pi_E(x_p,y_p)=(x_p,x_p^p y_p)$, $E_{red}=(x_p=0)$ and assume that $R_{l}^E =(0,c_l^E)$, $l=1,2,\ldots, b_E$, in these coordinates. We define the {\em rational function ${\mathcal M}_E (z)={\mathcal M}^{{\mathcal F},{\mathcal G}}_E(z)$ associated to the divisor\/} $E$ {\em for the foliations $\mathcal F$ and $\mathcal G$} by \begin{equation}\label{eq:funcion-meromorfa} {\mathcal M}_E (z)=\sum_{l=1}^{b_E} \frac{\Delta_E(R_l^E)}{z-c_l^E}. \end{equation} \begin{Remark} Note that although $\Delta_E^{\mathcal{F},\mathcal{G}}(R_l^E)$ and ${\mathcal M}_E^{\mathcal{F},\mathcal{G}}(z)$ depend on the foliations $\mathcal F$ and $\mathcal G$, we have that $$ \Delta_E^{\mathcal{F},\mathcal{G}}(R_l^E) = \Delta_E^{\mathcal{L}_\lambda^C,\mathcal{L}_{\mu}^D}(R_l^E); \qquad {\mathcal M}^{{\mathcal F},{\mathcal G}}_E(z)= {\mathcal M}^{\mathcal{L}_\lambda^C,\mathcal{L}_{\mu}^D}_E(z) $$ provided that ${\mathcal F} \in {\mathbb G}_{C,\lambda}$ and ${\mathcal G} \in {\mathbb G}_{D,\mu}$. \end{Remark} \begin{Remark} Observe that if $E$ is a non-collinear divisor, then ${\mathcal M}_E(z) \not \equiv 0$. \end{Remark} Let $M(E)=\{Q_1^E, \ldots, Q_{s_E}^E\}$ be the set of points of $E_{red}$ given by $Q_l^{E}=(0,q_l)$ in coordinates $(x_p,y_p)$ where $\{q_1, \ldots, q_{s_E}\}$ is the set of zeros of ${\mathcal M}_E (z)$. We denote by $t_{Q_l^{E}}$ the multiplicity of $q_l$ as a zero of ${\mathcal M}_E (z)$ and $t(E)=\sum_{l=1}^{s_E} t_{Q_l^{E}}$. We put $t_P=0$ for any $P \in E \smallsetminus M(E)$. Note that it can happen that $M(E)=\emptyset$ (see example in \cite{Kuo-P-2004}, p. 584). \begin{Lemma}\label{lema:E-no-colineal} If $N(E) \neq \emptyset$, that is, $E$ is a non-collinear divisor, then we have that \begin{equation}\label{eq:no-colineal} N(E) \cap M(E) = \emptyset \quad \text{ and } \quad \sharp N(E) \geq \sum_{P \in M(E)} t_P +1 =t(E)+1. \end{equation} Moreover, if $\sum_{R_l^E \in N(E)} \Delta_{E}(R_l^E) \neq 0$, then we have that $$\sharp N(E) =\sum_{P \in M(E)} t_P +1.$$ \end{Lemma} \begin{proof} If we denote $I_{N(E)}=\{ l \in \{1,\ldots, b_E\} \ : \ R_l^E \in N(E)\}$, we can write ${\mathcal M}_E (z)$ as follows $$ {\mathcal M}_E (z)=\sum_{l \in I_{N(E)}} \frac{\Delta_E(R_l^E)}{z-c_l^E}. $$ Thus, the set of zeros of ${\mathcal M}_E(z)$ is given by the roots of the polynomial \begin{equation}\label{eq:ceros-ME} \sum_{l \in I_{N(E)}} \Delta_{E}(R_l^E) \prod_{\substack{j \in I_{N(E)} \\ j \neq l}} (z-c_j^E). \end{equation} Consequently, if $z=c_{l_0}^E$ is a zero of ${\mathcal M}_E(z)$, then $\Delta_{E}(R_{l_0}^E) \prod_{\substack{j \in I_{N(E)} \\ j \neq l_0}} (c_{l_0}^E-c_j^E)=0$ which implies that $\Delta_E(R_{l_0}^E)=0$ and hence $R_{l_0}^E \not \in N(E)$. Moreover, the degree of the polynomial given in equation~\eqref{eq:ceros-ME} is $\leq \sharp N(E) -1$; the equality is attained when $\sum_{l \in I_{N(E)}} \Delta_{E}(R_l^E) \neq 0$. Thus we have the statements of the lemma. \end{proof} \begin{Remark} Observe that we can have that $\sum_{R_l^E \in N(E)} \Delta_{E}(R_l^E) = 0$ even if $E$ is a purely non-collinear divisor. This can happen for instance when $E=E_1$ is a bifurcation divisor since in this situation $\sum_{i=1}^{b_E} I_{R_i^E} (\pi_E^* \mathcal{F},E_{red})=\sum_{i=1}^{b_E} I_{R_i^E} (\pi_E^* \mathcal{G},E_{red})=-1$ and this implies $\sum_{R_l^E \in N(E)} \Delta_{E}(R_l^E) = 0$ (see also Remark~\ref{rmk:suma-delta} and Corollary~\ref{cor:colinear}). \end{Remark} \begin{Remark}\label{rmk:CE-ME} Note that it can happen that $C(E) \cap M(E) \neq \emptyset$. With the notations of section~\ref{sec:logarithmic}, consider the foliations ${\mathcal F}={\mathcal L}^C_{\lambda}$ and ${\mathcal G}={\mathcal L}^D_{\mu}$ where $$ C=(f=0), \quad f(x,y)=(y-x) (y+x^2) (y-x^2) (y+2x^2), \quad \lambda=(1,1,1,3)$$ $$ D=(g=0), \quad g(x,y)=(y+x) (y+x^2+x^3) (y-x^2+x^3), \quad \mu=(3,3,1).$$ Take $Z=C \cup D$. Consider the morphism $\sigma= \pi_1 \circ \pi_2$ where $\pi_1: X_1 \to ({\mathbb C}^2,0)$ is the blow-up of the origin, $E_1= \pi_1^{-1}(0)$ and $\pi_2: X_2 \to (X_1,P_1)$ is the blow-up of the origin $P_1$ of the first chart of $E_1$ and $E_2=\pi_2^{-1}(P_1)$. Taking coordinates $(x_2,y_2)$ in the first chart of $E_2$ such that $\sigma(x_2,y_2)=(x_2,x_2^2y_2)$ we have that $\sigma^*Z \cap E_2 =\{R_1^{E_2},R_{2}^{E_2},R_{3}^{E_2}\}$ where $R_1^{E_2}=(0,-1)$, $R_{2}^{E_2}=(0,1)$ and $R_{3}^{E_2}=(0,-2)$. A simple computation shows that $$\Delta_{E}(R_1^{E_2})= -\frac{2}{11}; \quad \Delta_{E}(R_2^{E_2})= 0;\quad \Delta_{E}(R_3^{E_2})= \frac{3}{11}.$$ Thus $C(E_2)=\{R_2^{E_2}\}$ and $N(E_2)=\{R_1^{E_2}, R_3^{E_2}\}$. Moreover, we have that $${\mathcal M}_{E_2}(z)= -\frac{2}{11} \frac{1}{(z+1)} + \frac{3}{11} \frac{1}{(z+2)} = \frac{z-1}{11(z+2)(z+1)}$$ which implies that $M(E_2)=\{R_2^{E_2}\}$. \end{Remark} Given a non-collinear divisor $E$ and a point $P \in E_{red}$, we define $$\tau_E(P)=\left\{ \begin{array}{ll} t_P, & \hbox{ if } P \in M(E) \\ - 1, & \hbox{ if } P \in N(E) \\ 0, & \hbox{ otherwise.} \end{array} \right. $$ Note that $\sum_{P \in E_{red}} \tau_E(P)=t(E) - \sharp N(E)$ which is a negative integer. Once we have introduced all these notations, we can state the results concerning the properties of the jacobian curve that will be proved in section~\ref{sec:pruebas}. The first result gives the multiplicity of the jacobian curve at a point in the reduction of singularities in terms of the multiplicities of the curves $C$ and $D$. In particular, we obtain that all infinitely near points of the jacobian curve in the first chart of a divisor $E$ are either infinitely points of $Z$ or a point in $M(E)$. Note that $x=0$ can be tangent to the jacobian curve although it is not tangent to $Z$ and we cannot control this with the rational function ${\mathcal M}_E(z)$ (see Remark~\ref{rmk:x-cono-tg}). More precisely, if we denote by $E_{red}^*$ the points in the first chart of $E_{red}$, we have \begin{Theorem}\label{th-multiplicidad-jac} Let $E$ be an irreducible component of $\pi^{-1}_Z(0)$ and assume that $E$ is a non-collinear divisor. Given any $P \in E_{red}^*$, we have that $$ m_P(\pi_E^*{\mathcal J}_{\mathcal{F},\mathcal{G}})= m_P(\pi_E^* C) + m_P(\pi_E^*D) + \tau_E(P). $$ In particular, if $P \in E_{red}^*$ with $m_P(\pi_E^*{\mathcal J}_{\mathcal{F},\mathcal{G}})>0$, then $P \in C(E) \cup N(E) \cup M(E)$. \end{Theorem} Consider now $E$ and $E'$ two consecutive bifurcation divisors in $G(Z)$, that is, there is a chain of consecutive divisors $$E_0=E < E_1 < \cdots < E_{k-1} < E_k=E'$$ with $b_{E_l}=1$ for $l=1, \ldots, k-1$ and the morphism $\pi_{E'}= \pi_E \circ \sigma $ where $\sigma: X_{E'} \to (X_E,P)$ is a composition of $k$ punctual blow-ups \begin{equation} \label{eq:bifurcacion-consecutivos} (X_E, P) \overset{\sigma_1}{\longleftarrow} (X_{E_1},P_1) \overset{\sigma_2}{\longleftarrow} \cdots \overset{\sigma_{k-1}}{\longleftarrow} (X_{E_{k-1}},P_{k-1}) \overset{\sigma_{k}}{\longleftarrow} X_{E'}. \end{equation} If $E$ and $E'$ are two consecutive bifurcation divisors as above, we say that $E'$ {\em arises from $E$ at $P$} and we denote $E \underset{P}{<} E'$. Now we can explain the behaviour of the branches of the jacobian curve going through a non-collinear point. Next corollary states that the branches of the jacobian curve going through a non-collinear point $P$ in a bifurcation divisor as above go thought the points $P_1, \ldots, P_{k-1}$ given in the sequence \eqref{eq:bifurcacion-consecutivos}, that is, the divisor $E'$ is in the geodesic of those branches of $\mathcal{J}_{\mathcal{F},\mathcal{G}}$ going through $P$ in $E_{red}$. \begin{Corollary}\label{cor:consecutive-divisors} Let $E$ and $E'$ be two consecutive bifurcation divisors in $G(Z)$ with $E \underset{P}{<} E'$. If $P \in N(E)$, then \begin{equation}\label{eq1:consecutive-divisors} \sum_{Q \in E_{red}'} t_Q +1 = \sharp N(E'). \end{equation} In particular, $E'$ is non-collinear. Moreover, we have that $$ m_P(\pi_E^* {\mathcal J}_{\mathcal{F},\mathcal{G}}) = \sum_{Q \in E'_{red}} m_Q(\pi_{E'}^* {\mathcal J}_{\mathcal{F},\mathcal{G}}) $$ that is, there is no irreducible component $\delta$ of ${\mathcal J}_{\mathcal{F},\mathcal{G}}$ such that $$v(E) < {\mathcal C} (\delta,\gamma_{E'}) < v(E')$$ where $\gamma_{E'}$ is a $E'$-curvette. \end{Corollary} In order to explain the behaviour of the branches of the jacobian curve going through a collinear point, we introduce the following definition: \begin{Definition}\label{def:cover} Let $E$ be a bifurcation divisor of $G(Z)$ and take $P \in C(E)$. We say that a set of non-collinear bifurcation divisors $\{E_1,\ldots, E_u\}$ is a {\em (non-collinear) cover\/} of $E$ at $P$ if the following conditions hold: \begin{itemize} \item[(i)] $E$ is in the geodesic of each $E_l$; \item[(ii)] if $\{E_1^l,\ldots, E_{r(l)}^l\}$ is the set of all bifurcation divisors in the geodesic of $E_l$ with $$E <_P E_1^l < \ldots <E_{r(l)}^l < E_l$$ then either $r(l)=0$ or else each $E_j^l$ is collinear; \item[(iii)] if $Z_j$ is an irreducible component of $Z$ with $\pi_E^* Z_j \cap E_{red}=\{P\}$, then there exists a divisor $E_l$ in the cover such that $\pi_{E_l}^* Z_j \cap E_{l} \neq \emptyset$, that is, there is a divisor $E_l$ in the cover which is in the geodesic of $Z_j$. \end{itemize} \end{Definition} Given a point $P \in C(E)$, there is a unique cover of $E$ at $P$. We can find it as follows: take an irreducible component $Z_j$ of $Z$ with $\pi_E^* Z_j \cap E_{red}=\{P\}$. Let $E'$ be the consecutive bifurcation divisor to $E$ with $E<_P E'$ belonging to the geodesic of $Z_j$. If $E'$ is non-collinear, then $E'$ is one of the bifurcation divisors in the cover of $E$ at $P$, otherwise we repeat the process above with the following bifurcation divisor in the geodesic of $Z_j$. Since the maximal bifurcation divisors are non-collinear, we will always find a non-collinear divisor in the geodesic of $Z_j$ verifying condition $(ii)$ in the above definition. \begin{Theorem}\label{th:colinear-point} Consider a non-collinear bifurcation divisor $E$ of $G(Z)$ and $P \in C(E)$. Take a cover $\{E_1,\ldots, E_u\}$ of $E$ at $P$. Then $$ m_P(\pi_E^* {\mathcal J}_{\mathcal{F},\mathcal{G}})-\sum_{l=1}^{u} \sum_{Q \in E_{l,red}} m_Q(\pi_{E_l}^* {\mathcal J}_{\mathcal{F},\mathcal{G}})= t_P + \sum_{l=1}^u (\sharp N(E_l) - t(E_l)). $$ Consequently, there is a curve $J_{P}^E$ composed by irreducible components of ${\mathcal J}_{\mathcal{F},\mathcal{G}}$ such that, if $\delta$ is a branch of $J_{P}^E$, \begin{itemize} \item $\pi_E^* \delta \cap E_{red}=\{P\}$ \item ${\mathcal C}(\delta,\gamma_{E_l}) < v(E_l)$ for $l=1,\ldots, u,$ where $\gamma_{E_l}$ is any $E_l$-curvette. \item $m_0(J_{P}^E)= t_P + \sum_{l=1}^u (\sharp N(E_l) - t(E_l)).$ \end{itemize} \end{Theorem} The results above allow to give a decomposition of ${\mathcal J}_{\mathcal{F},\mathcal{G}}$ into bunches of branches in the sense of the decomposition theorem of polar curves. Recall that given a divisor $E$ of $\pi_Z^{-1}(0)$, we denote by $\pi_E : X_E \to ({\mathbb C}^2,0)$ the morphism reduction of $\pi_Z$ to $E$ and we write $\pi_Z= \pi_E \circ \pi_E'$. Let $B(Z)$ be the set of bifurcation divisors of $G(Z)$. Given any $E \in B(Z)$ which is a non-collinear divisor for $\mathcal F$ and $\mathcal G$, we define $J^E_{nc}$ as the union of the branches $\xi$ of ${\mathcal J}_{\mathcal{F},\mathcal{G}}$ such that \begin{itemize} \item $\pi_E^* \xi \cap \pi_E^* Z = \emptyset$; \item if $E' < E$, then $\pi_E^* \xi \cap \pi'_E(E')=\emptyset$ \item if $E'> E$, then $\pi_{E'}^* \xi \cap E'_{red}=\emptyset$ \end{itemize} Moreover, given a non-collinear divisor $E$, we denote $J_c^E=\cup_{P \in C(E)} J_P^E$ (with $J_c^E=\emptyset$ if $C(E)=\emptyset$). Thus, the previous results allow us to give a decomposition of $J_{{\mathcal F},{\mathcal G}}$ as follows: \begin{Theorem}\label{th:descomposicion-no-sing} Consider ${\mathcal F} \in {\mathbb G}_C$ and ${\mathcal G} \in {\mathbb G}_D$ such that $Z=C \cup D$ is a curve with only non-singular irreducible components. Let $B_N(Z)$ be the set of non-collinear bifurcation divisors of $G(Z)$. Then there is a unique decomposition ${\mathcal J}_{\mathcal{F},\mathcal{G}}= J^* \cup (\cup_{E \in B_N(Z)} J^E )$ where $J^E=J^E_{nc} \cup J_{c}^E$ with the following properties \begin{itemize} \item[(1)] $ m_0(J^E_{nc}) \leq \sharp N(E)-1$. In particular, $ m_0(J^E_{nc}) \leq b_E-1$. \item[(2)] $\pi_E^* J^E_{nc} \cap \pi_E^* Z=\emptyset$ \item[(3)] if $E' < E$, then $\pi_E^* J^E_{nc} \cap \pi_E'(E')=\emptyset$ \item[(4)] if $E' > E$, then $\pi_{E'}^* J^E_{nc} \cap E_{red}' = \emptyset$ \item[(5)] if $\delta$ is a branch of $J_{c}^E$, then $\pi_E^* \delta \cap E_{red}$ is a point in $C(E)$. \item[(6)] $m_0(J_c^E)=\sum_{P \in C(E)} ( t_P + \sum_{l=1}^{u(P)} (\sharp N(E_l^P) - t(E_l^P)))$ where $\{E_1^P, \ldots, E_{u(P)}^P\}$ is a cover of $E$ at $P$. \end{itemize} Moreover, if $E$ is a purely non-collinear divisor with $\sum_{R_l^E \in N(E)} \Delta_{E}(R_l^E) \neq 0$, then \begin{equation}\label{eq:mult-JE-maxima} m_0(J^E)=m_0(J^E_{nc})=b_E-1. \end{equation} \end{Theorem} \begin{proof} We have that $$m_0(J_{nc}^E)=\sum_{P \in M(E) \smallsetminus C(E)} m_P(\pi_E^* {\mathcal J}_{\mathcal{F},\mathcal{G}} ) \leq \sum_{ P \in M(E)} t_P \leq \sharp N(E)-1 \leq b_E -1 $$ where we have used the inequality given in~\eqref{eq:no-colineal} and the fact that $\sharp N(E) \leq b_E$. This gives the first statement of the theorem. Moreover, if $E$ is a purely non-collinear divisor, then $C(E)=\emptyset$, $J^E=J^E_{nc}$ and $\sharp N(E)=b_E$. In addition, when $\sum_{R_l^E \in N(E)} \Delta_{E}(R_l^E) \neq 0$ we have that $\sum_{P \in M(E)} t_P=\sharp N(E)-1$ by lemma~\ref{lema:E-no-colineal}. Consequently, we deduce that $$m_0(J^E)=\sum_{P \in M(E)} m_P(\pi_E^* {\mathcal J}_{\mathcal{F},\mathcal{G}} ) =\sum_{ P \in M(E)} t_P = \sharp N(E)-1 = b_E -1 $$ and we obtain~\eqref{eq:mult-JE-maxima}. Properties (2), (3) and (4) are consequence of the definition of $J_{nc}^E$. Properties (5) and (6) follow directly from the definition of $J_c^E$ and Theorem~\ref{th:colinear-point}. \end{proof} Note that the properties of $J_{nc}^E$ can be stated in terms of coincidences as follows: if $\delta$ is an irreducible component of $J_{nc}^E$ (with $E$ a non-collinear bifurcation divisor) and $Z_i$ is an irreducible component of $Z=C \cup D$, then $$ {\mathcal C}(\delta,Z_i)= \left\{ \begin{array}{ll} v(E), & \hbox{ if } E \text{ is in the geodesic of } Z_i, \\ {\mathcal C}(\gamma_E,Z_i), & \hbox{ otherwise.} \end{array} \right. $$ where $\gamma_E$ is any $E$-curvette which does not intersect $E$ at the points $\pi_E^* Z \cap E$. Observe that $v(E)={\mathcal C}(\gamma_E,Z_i)$ when $E$ is in the geodesic of $Z_i$. Consider now a non-collinear bifurcation divisor $E$ of $G(Z)$ and denote $$t^*(E)=\sum_{Q \in M(E) \smallsetminus C(E)} t_Q,$$ that is, the number of zeros of ${\mathcal M}_E(z)$ (counting with multiplicities) which do not correspond to collinear points. Note that $t^*(E)=m_0(J^E_{nc})$. Next result determines the intersection multiplicity of $J^E_{nc}$ with the curves of separatrices $C$ and $D$ of the foliations $\mathcal F$ and $\mathcal G$. \begin{Corollary}\label{cor:mult-int-J-C-D} If $E$ is a non-collinear bifurcation divisor, then $$(J_{nc}^E,C)_0= \nu_E(C) \cdot t^*(E); \qquad (J_{nc}^E,D)_0= \nu_E(D) \cdot t^*(E) $$ where $\nu_E(C)=(C,\gamma_E)_0$ and $\nu_E(D)=(D,\gamma_E)_0$ with $\gamma_E$ any $E$-curvette. \end{Corollary} As a consequence of the result above and Propositions \ref{prop:int-sep} and \ref{prop:milnor-number} we obtain next corollary for non-dicritical generalized curve foliations which relates invariants of the foliations $\mathcal F$ and $\mathcal G$, such as the Milnor numbers o the tangency orders, with data coming from the decomposition of the jacobian curve. \begin{Corollary}\label{cor:sum-mult-int} With the hypothesis and notations of Theorem~\ref{th:descomposicion-no-sing}, we get that $$ \sum_{E \in B_N(Z)} m_0(J_{nc}^E) \nu_E(C_i) \leq \mu_0({\mathcal F},C_i) + \tau_0({\mathcal G},C_i) $$ and $$ \sum_{E \in B_N(Z)} m_0(J_{nc}^E) ( \nu_E(C) - \nu_E(D)) \leq \mu_0({\mathcal F}) - \mu_0({\mathcal G}). $$ \end{Corollary} The proofs of these results will be given in section~\ref{sec:pruebas}. The general case of foliations with separatrices that can have singular irreducible components will be treated in section~\ref{sec:caso-general}. \section{Non-collinear divisors}\label{sec:non-collinear} This section will be devoted to prove some properties of non-collinear divisors that will be used later in the proofs of the main results of the paper. We will consider two plane curves $C$ and $D$ in $({\mathbb C}^2,0)$ without common branches and two foliations ${\mathcal F} \in \mathbb{G}_C$, $\mathcal{G} \in \mathbb{G}_D$. We will assume that the curve $Z=C \cup D$ has only non-singular irreducible components and let $\pi_Z: X_Z \to ({\mathbb C}^2,0)$ be the minimal reduction of singularities of $Z$. We will use the same notations as in the previous section. \subsection{Collinear and non-collinear infinitely near points} We start explaining the behaviour of collinear (resp. non-collinear) infinitely near points by blowing-up: \begin{Lemma}\label{lema:explosio-colineal} Let $E$ and $E'$ be two consecutive divisors in $G(Z)$ with $E <E'$ and $b_{E'}=1$. We can write $\pi_{E'}= \pi_{E} \circ \sigma $ where $\sigma: X_{E'} \to (X_E,P)$ is the blow-up with center at a point $P \in E_{red}$. Let $Q$ be the point $\pi_{E'}^* Z \cap E_{red}'$. If $P$ is a collinear point (resp. a non-collinear point) for the foliations $\mathcal F$ and $\mathcal G$ in $E$, then $Q$ is a collinear point (resp. non-collinear point) for $E'$. \end{Lemma} \begin{proof} Let us denote by $\widetilde{E}_{red}$ the strict transform of $E_{red}$ by $\sigma$ and $\widetilde{P}=\widetilde{E}_{red} \cap E_{red}'$. Given any singular foliation $\mathcal F$, the Camacho-Sad indices verify the following equalities (see \cite{Cam-S}) $$ I_{\widetilde{P}}(\pi^*_{E'} {\mathcal F},\widetilde{E}_{red}) = I_P(\pi_{E}^*{\mathcal F},E_{red})-1 $$ $$ I_{\widetilde{P}}(\pi^*_{E'}{\mathcal F},E'_{red})+I_Q(\pi^*_{E'}{\mathcal F},E'_{red})=-1 $$ Moreover, since $\mathcal F$ is a generalized curve foliation, then $\widetilde{P}$ is a simple singularity for $\pi_{E'}^* {\mathcal F}$ and hence we have that $$ I_{\widetilde{P}}(\pi^*_{E'} {\mathcal F},\widetilde{E}_{red}) \cdot I_{\widetilde{P}}(\pi^*_{E'} {\mathcal F},E'_{red})=1. $$ Then the index $I_Q(\pi^*_{E'}{\mathcal F},E'_{red})$ can be computed as $$I_Q(\pi^*_{E'}{\mathcal F},E'_{red})= -1 -\frac{1}{I_P(\pi_{E}^*{\mathcal F},E_{red})-1}= - \frac{I_P(\pi_{E}^*{\mathcal F},E_{red})}{I_P(\pi_{E}^*{\mathcal F},E_{red})-1}.$$ Thus, using the expression above for the foliations $\mathcal F$ and $\mathcal G$, we have that $$ \Delta_{E'}(Q) =\left| \begin{array}{cc} 1 & I_Q(\pi^*_{E'} {\mathcal F},E'_{red}) \\ 1 & I_Q(\pi^*_{E'} {\mathcal G},E'_{red}) \end{array} \right| =\frac{\Delta_E(P)}{(I_P(\pi_{E}^*{\mathcal F},E_{red})-1)(I_P(\pi_{E}^*{\mathcal G},E_{red})-1)} $$ and then $\Delta_{E'}(Q)=0$ if and only if $\Delta_E(P)=0$. This gives the result. \end{proof} Consider now two consecutive bifurcation divisors $E$ and $E'$ in $G(Z)$ such that $E'$ arises from $E$ at $P$. As we have explained in section~\ref{sec:jacobian}, this means that there is a chain of consecutive divisors $$E_0=E < E_1 < \cdots < E_{k-1} < E_k=E'$$ with $b_{E_l}=1$ for $l=1, \ldots, k-1$ and the morphism $\pi_{E'}= \pi_E \circ \sigma$ where $\sigma: X_{E'} \to (X_E,P)$ is a composition of $k$ punctual blow-ups \begin{equation} \label{eq:bifurcacion-consecutivos_2} (X_E, P) \overset{\sigma_1}{\longleftarrow} (X_{E_1},P_1) \overset{\sigma_2}{\longleftarrow} \cdots \overset{\sigma_{k-1}}{\longleftarrow} (X_{E_{k-1}},P_{k-1}) \overset{\sigma_{k}}{\longleftarrow} X_{E'}. \end{equation} As a consequence of Lemma~\ref{lema:explosio-colineal}, we have that if $P$ is a collinear point (resp. a non-collinear point) for $\mathcal F$ and $\mathcal G$ relative to $E$, then $P_l$ is a collinear point (resp. non-collinear point) relative to $E_l$ for $l=1,\ldots, k-1$. \begin{Corollary} Let $E$ be the first bifurcation divisor in $G(Z)$. We can write $\pi_E = \sigma_1 \circ \sigma _2 \circ \cdots \circ \sigma_k$ as a composition of $k$ punctual blow-ups $$ ({\mathbb C}^2, 0) \overset{\sigma_1}{\longleftarrow} (X_1,P_1) \overset{\sigma_2}{\longleftarrow} \cdots \overset{\sigma_{k-1}}{\longleftarrow} (X_{k-1},P_{k-1}) \overset{\sigma_{k}}{\longleftarrow} X_k=X_{E}. $$ We denote $E_i=\sigma_i^{-1}(P_{i-1})$ with $P_0=0$. Then all the divisors $E_i$, $1 \leq i \leq k-1$, are collinear. \end{Corollary} \begin{proof} Since $b_{E_l}=1$ for $l=1,\ldots, k-1$, it is enough to prove that $P_1$ is a collinear point for $\mathcal F$ and $\mathcal G$ relative to $E_1$. But this is a consequence of the fact that $I_{P_1} (\sigma_1^{\ast}{\mathcal F},E_{1,red})=I_{P_1} (\sigma_1^{\ast}{\mathcal G},E_{1,red})=-1$. Thus the result follows straightforward. \end{proof} \begin{Remark}\label{rmk:suma-delta} Note that, if $E$ is the first bifurcation divisor, the properties of the Camacho-Sad index imply that $$ \sum_{l=1}^{b_E} \Delta_E(R_l^E)=0$$ where $\pi_E^* Z \cap E_{red}= \{ R_1^E, \ldots, R_{b_E}^E\}$. \end{Remark} The above equality also holds in the following context: \begin{Corollary}\label{cor:colinear} Let $E$ and $E'$ be two consecutive bifurcation divisors in $G(Z)$ such that $E'$ arises from $E$ at $P$. If $P$ is a collinear point, then $$\sum_{l=1}^{b_{E'}} \Delta_{E'}(R_{l}^{E'})=0$$ where $\pi_{E'}^* Z \cap E_{red}'=\{R_1^{E'},\ldots, R_{b_{E'}}^{E'}\}$. \end{Corollary} \begin{proof} As we have explained before we have that $\pi_{E'}=\pi_E \circ \sigma$ where $\sigma: X_{E'} \to (X_E,P)$ is a composition of $k$ punctual blow-ups \begin{equation*} (X_E, P) \overset{\sigma_1}{\longleftarrow} (X_{E_1},P_1) \overset{\sigma_2}{\longleftarrow} \cdots \overset{\sigma_{k-1}}{\longleftarrow} (X_{E_{k-1}},P_{k-1}) \overset{\sigma_{k}}{\longleftarrow} X_{E'}. \end{equation*} We denote $E_i=\sigma_{i}^{-1}(P_{i-1})$ with $P_0=P$ and we have that $b_{E_i}=1$ for $i=1, \ldots, k-1$. Since $P$ is a collinear point, then $I_P(\pi_E^* \mathcal{F},E_{red})= I_P(\pi_E^* \mathcal{G},E_{red})$ and the properties of the Camacho-Sad indices imply that $I_{P_i}(\pi_{E_i}^* \mathcal{F},E_{i,red})= I_{P_i}(\pi_{E_i}^* \mathcal{G},E_{i,red})$ for $i=1, \ldots, k-1$. Consequently, we have that $$ \sum_{l=1}^{b_{E'}} I_{R_l^{E'}} (\pi_{E'}^* \mathcal{F},E_{red}') = \sum_{l=1}^{b_{E'}} I_{R_l^{E'}} (\pi_{E'}^* \mathcal{G},E_{red}') $$ which is equivalent to $\sum_{l=1}^{b_{E'}} \Delta_{E'}(R_{l}^{E'})=0$. \end{proof} \medskip \subsection{Weighted initial forms and non-collinear divisors} Fix coordinates $(x,y)$ in $({\mathbb C}^2,0)$. Given a 1-form $\omega$, we can write $\omega=\sum_{i,j} \omega_{ij}$ where $\omega_{ij}=A_{ij}x^{i-1}y^{j} dx + B_{ij} x^i y^{j-1} dy$. We denote $\Delta(\omega)=\Delta(\omega;x,y)=\{(i,j) \ : \ \omega_{ij} \neq 0\}$ and the {\em Newton polygon\/} ${\mathcal N}({\mathcal F};x,y)={\mathcal N}({\mathcal F})={\mathcal N}(\omega)$ is given by the convex envelop of $\Delta(\omega) + ({\mathbb R}_{\geq 0})^2$. Given a rational number $\alpha \in {\mathbb Q}$, we define the {\em initial form\/} of $\omega$ {\em with weight $\alpha$} $$\text{In}_{\alpha} (\omega;x,y) = \sum_{i+\alpha j =k} \omega_{ij}$$ where $i+\alpha j =k$ is the equation of the first line of slope $-1/\alpha$ which intersects the Newton polygon ${\mathcal N}({\mathcal F})$ in the coordinates $(x,y)$. Note that $k=\nu_{(1,\alpha)}(\omega)$ where $\nu_{(1,\alpha)}(\omega)=\min \{i+\alpha j \ : \ \omega_{ij} \neq 0\}$ is the $(1,\alpha)$-degree of $\omega$. In a similar way, given any function $f =\sum_{ij} f_{ij} x^i y^j \in {\mathbb C}\{x,y\}$, we denote $\Delta(f)=\Delta(f;x,y)=\{(i,j) \ : \ f_{ij} \neq 0\}$ and the Newton polygon ${\mathcal N}(C;x,y)={\mathcal N}(C)$ of the curve $C=(f=0)$ is the convex envelop of $\Delta(f) +({\mathbb R}_{\geq 0})^2$. Note that ${\mathcal N}(C;x,y)={\mathcal N}(df;x,y)$ and ${\mathcal N}({\mathcal F})={\mathcal N}(C)$ if ${\mathcal F} \in {\mathbb G}_{C}$. Thus, we can define the {\em initial form\/} $\text{In}_{\alpha} (f;x,y)=\sum_{(i,j) \in L} f_{ij}x^i y^j$ where $L$ is the first line of slope $-1/\alpha$ which intersects ${\mathcal N}(C)$. Note that, if $f=0$ is an equation of the curve $C$, then $\text{In}_{1} (f;x,y)$ gives an equation of the tangent cone of $C$. Let us introduce the following notation in order to describe the relationship between the Newton polygon and the infinitely near points of a curve (see also \cite{Cor-2009}). From now on we will always assume that we choose coordinates $(x,y)$ such that $x=0$ is not tangent to the curve $Z=C \cup D$ union of the separatrices of $\mathcal F$ and $\mathcal G$. This will imply that the first side of the Newton polygons ${\mathcal N}({\mathcal F};x,y)$ and ${\mathcal N}({\mathcal G};x,y)$ has slope greater or equal to $-1$. \medskip \paragraph{\bf Notation.} Let $Z$ be a curve with only non-singular irreducible components and $\pi_Z:X_Z \to ({\mathbb C}^2,0)$ be its minimal reduction of singularities. Take any divisor $E$ of $\pi^{-1}_Z(0)$ with $v(E)=p$ and consider $\pi_E:X_E \to ({\mathbb C}^2,0)$ the morphism reduction of $\pi_Z$ to $E$ which is a composition of $p$ punctual blow-ups $$ ({\mathbb C}^2,0) \overset{\sigma_1}{\longleftarrow} (X_{1},P_1) \overset{\sigma_2}{\longleftarrow} \cdots \overset{\sigma_{p-1}}{\longleftarrow} (X_{p-1},P_{p-1}) \overset{\sigma_{p}}{\longleftarrow} X_p=X_{E}. $$ Moreover, if $(x,y)$ are coordinates in $({\mathbb C}^2,0)$ there is a change of coordinates $(x,y)=(\bar{x}, \bar{y}+ \varepsilon_E(\bar{x}))$, with $\varepsilon_E(x)= a_1 x + \cdots + a_{p-1} x^{p-1}$, such that the blow-up $\sigma_j$ is given by $x_{j-1}=x_j$, $y_{j-1}=x_j y_j$, for $j=1,2, \ldots, p$, where $(x_j,y_j)$ are coordinates centered at $P_j$ and $(x_0,y_0)=(\bar{x},\bar{y})$. We say that $(\bar{x},\bar{y})$ are {\em coordinates in\/} $({\mathbb C}^2,0)$ {\em adapted to\/} $E$. With these notations, given a divisor $E$ of $\pi_Z^{-1}(0)$ with $v(E)=p$ and $(x,y)$ coordinates adapted to $E$, the points $\pi_E^* Z \cap E_{red}$ are determined by $\text{In}_{p} (h;x,y)$ where $h=0$ is a reduced equation of the curve $Z$. More precisely, if we take $(x_p,y_p)$ coordinates in the first chart of $E_{red}$ with $\pi_E(x_p,y_p)=(x_p,x_p^py_p)$ and $E_{red}=(x_p=0)$, thus the points of $\pi_E^*Z \cap E_{red}$ are given by $x_p=0$ and $\sum_{i+pj=k}h_{ij} y_p^j=0$ where $\text{In}_{p} (h;x,y)=\sum_{i+pj=k}h_{ij} x^i y^j$. We are interested in determine the points $\pi_E^*{\mathcal J}_{\mathcal{F},\mathcal{G}} \cap E_{red}$, thus if $v(E)=p$ and $(x,y)$ are coordinates adapted to $E$, we would like to determine ${\rm In}_p (J(x,y);x,y)$ where $J(x,y)=0$ is an equation of the jacobian curve. Next result proves that the initial form ${\rm In}_p (J(x,y);x,y)$ is determined by the initial forms ${\rm In}_p(\omega), {\rm In}_p(\eta)$ of the 1-forms defining the foliations $\mathcal F$ and $\mathcal G$ provided that the divisor $E$ is non-collinear. \begin{Lemma}\label{lema:parte-inicial-jac} Let $E$ be an irreducible component of $\pi_{Z}^{-1}(0)$ with $v(E)=p$ and take $(x,y)$ coordinates adapted to $E$. If $E$ is a non-collinear divisor, then $${\rm In}_p(\omega) \wedge {\rm In}_p(\eta) \not \equiv 0,$$ where ${\rm In}_p(\omega)= {\rm In}_p(\omega;x,y)$ and ${\rm In}_p(\eta)={\rm In}_p(\eta;x,y)$, and hence $${\rm In}_p (J(x,y);x,y) = J_p(x,y)$$ with ${\rm In}_p(\omega) \wedge {\rm In}_p(\eta) = J_p (x,y) dx \wedge dy$. \end{Lemma} \begin{proof} Take an irreducible component $E$ of $\pi_{Z}^{-1}(0)$ with $v(E)=p$ and let $(x,y)$ be coordinates adapted to $E$. Assume that ${\rm In}_p(\omega) \wedge {\rm In}_p(\eta) \equiv 0$, that is, if we write \begin{align*} {\rm In}_p(\omega) & = A_I(x,y) dx + B_I (x,y) dy \\ {\rm In}_p(\eta) & = P_I(x,y) dx + Q_I (x,y) dy \end{align*} then \begin{equation}\label{eq:parte-inicial} A_I(x,y) Q_I(x,y) - B_I(x,y) P_I(x,y)\equiv 0. \end{equation} Note that $(A_I,B_I)\not \equiv (0,0)$ and $(P_I,Q_I) \not \equiv (0,0)$. Take coordinates $(x_p,y_p)$ in the first chart of $E_{red}$ such that $\pi_E(x_p,y_p)=(x_p,x_p^p y_p)$, $E_{red}=(x_p=0)$ and assume that $R_{l}^E =(0,c_l^E)$, for $l=1,\ldots, b_E$, in these coordinates where $\pi_E^*Z \cap E_{red} = \{ R_1^E, \ldots, R_{b_E}^E\}$. Let $\omega^E$ and $\eta^E$ be the strict transforms of $\omega$ and $\eta$ by $\pi_E$ with \begin{align*} \omega^E &= A^E(x_p,y_p) dx_p + x_p B^E(x_p,y_p) dy_p, \\ \eta^E &= P^E(x_p,y_p) dx_p + x_p Q^E(x_p,y_p) dy_p. \end{align*} From the definition of the Camacho-Sad index we have that \begin{align*} I_{R_l^E}(\pi_E^* {\mathcal F},E_{red}) & = - \text{Res}_{y=c_l^E} \frac{B^E(0,y)}{A^E(0,y)}, \\ I_{R_l^E}(\pi_E^* {\mathcal G},E_{red}) & = - \text{Res}_{y=c_l^E} \frac{Q^E(0,y)}{P^E(0,y)}. \end{align*} Note that $A^E(0,y)=A_I(1,y) + py B_I(1,y)$, $B^E(0,y)=B_I(1,y)$, $P^E(0,y)=P_I(1,y) + p yQ_I(1,y)$ and $Q^E(0,y)=Q_I(1,y)$. Thus, the equality given in~\eqref{eq:parte-inicial} implies $$ \frac{B^E(0,y)}{A^E(0,y)}=\frac{Q^E(0,y)}{P^E(0,y)} $$ and hence $I_{R_l^E}(\pi_E^* {\mathcal F},E_{red})= I_{R_l^E}(\pi_E^* {\mathcal G},E_{red})$ for $l=1,\ldots, b_E$ in contradiction with the fact that the divisor $E$ is non-collinear. \end{proof} Observe that the result above is true for the first divisor $E_1$ although the curves $C$ and $D$ have singular irreducible components. Hence, we have that \begin{Corollary} If $E_1$ is a non-collinear divisor, then $$\nu_0({\mathcal J}_{\mathcal{F},\mathcal{G}})=\nu_0(\mathcal{F}) + \nu_0(\mathcal{G}).$$ \end{Corollary} \begin{proof} Using similar notations as above, we write $\text{In}_1(\omega) =A_I(x,y) dx + B_I(x,y) dy$, with $A_I(x,y)$ and $B_I(x,y)$ homogeneous polynomials of degree $\nu_0(\mathcal{F})$, and $\text{In}_1(\eta)= P_I(x,y) dx + Q_I(x,y) dy$, with $P_I(x,y)$ and $Q_I(x,y)$ homogeneous polynomials of degree $\nu_0(\mathcal{G})$. Now, if $E_1$ is a non-collinear divisor, then $$\text{In}_1(J(x,y);x,y)=J_1(x,y)$$ with $J_1(x,y) = A_I (x,y) Q_I(x,y) - B_I(x,y) P_I(x,y) \not\equiv 0$ is an homogeneous polynomial of degree $\nu_0(\mathcal{F}) + \nu_0(\mathcal{G})$. \end{proof} Moreover, next result shows that given ${\mathcal F}, \widetilde{\mathcal F} \in {\mathbb G}_{C,\lambda}$ and ${\mathcal G},\widetilde{\mathcal G} \in {\mathbb G}_{D,\mu}$, we have that $$\text{In}_p(J_{{\mathcal F},\mathcal{G}}(x,y);x,y)= \text{In}_p(J_{\widetilde{\mathcal F},\widetilde{\mathcal{G}}}(x,y);x,y)$$ provided that $E$ is a non-collinear divisor with $v(E)=p$, where $(x,y)$ are coordinates adapted to $E$ and $J_{{\mathcal F},\mathcal{G}}(x,y)=0$ and $J_{\widetilde{\mathcal F},\widetilde{\mathcal{G}}}(x,y)=0$ are equations of the jacobian curves ${\mathcal J}_{\mathcal{F},\mathcal{G}}$ and ${\mathcal J}_{\widetilde{\mathcal{F}},\widetilde{\mathcal{G}}}$ respectively. Given a foliation $\mathcal F$, we will denote by $\omega_{\mathcal F}$ a $1$-form defining $\mathcal F$ and $\text{In}_p(\omega_{\mathcal F}) =\text{In}_p(\omega_{\mathcal F};x,y)$. Thus we have the following result \begin{Lemma}\label{lema:parte-incial-modelo-log} Let $E$ be an irreducible component of $\pi^{-1}(0)$ with $v(E)=p$ and assume that $(x,y)$ are coordinates adapted to $E$. Consider foliations ${\mathcal F}, \widetilde{\mathcal F} \in {\mathbb G}_{C,\lambda}$ and ${\mathcal G},\widetilde{\mathcal G} \in {\mathbb G}_{D,\mu}$ then $${\rm In}_p(\omega_{\mathcal F})= {\rm In}_p(\omega_{\widetilde{{\mathcal F}}}); \qquad {\rm In}_p(\omega_{\mathcal G})= {\rm In}_p(\omega_{\widetilde{{\mathcal G}}}).$$ Hence, if $E$ is a non-collinear divisor, we have that $${\rm In}_p(J_{{\mathcal F},\mathcal{G}}(x,y);x,y)= {\rm In}_p(J_{\widetilde{\mathcal F},\widetilde{\mathcal{G}}}(x,y);x,y).$$ \end{Lemma} \begin{proof} Let us prove that ${\rm In}_p(\omega_{\mathcal F})= {\rm In}_p(\omega_{\widetilde{{\mathcal F}}})$. We can write \begin{align*} \text{In}_p(\omega_{\mathcal F}) & = A_I^{\mathcal F}(x,y) dx + B_I^{\mathcal F}(x,y) dy \\ \text{In}_p(\omega_{\widetilde{{\mathcal F}}}) & = A_I^{\widetilde{\mathcal F}}(x,y) dx + B_I^{\widetilde{\mathcal F}}(x,y) dy. \end{align*} Take $(x_p,y_p)$ coordinates in the first chart of $E_{red}$ such that $\pi_E(x_p,y_p)=(x_p,x_p^p y_p)$ and $E_{red}=(x_p=0)$. Let $\omega^E_{\mathcal F}$ and $\omega^E_{\widetilde{\mathcal F}}$ be the strict transforms of $\omega_{\mathcal F}$ and $\omega_{\widetilde{{\mathcal F}}}$ by $\pi_E$ with \begin{align*} \omega^E_{\mathcal F} &= A^E_{\mathcal F}(x_p,y_p) dx_p + x_p B^E_{\mathcal F}(x_p,y_p) dy_p, \\ \omega^E_{\widetilde{\mathcal F}} &= A^E_{\widetilde{\mathcal F}}(x_p,y_p) dx_p + x_p B^E_{\widetilde{\mathcal F}}(x_p,y_p) dy_p. \end{align*} Recall that we have that \begin{align*} A^E_{\mathcal F}(0,y) & = A_I^{\mathcal F}(1,y) + pyB_I^{\mathcal F}(1,y); \quad & B^{E}_{\mathcal F}(0,y)& =B_I^{\mathcal F}(1,y) \\ A^E_{\widetilde{\mathcal F}}(0,y) & = A_I^{\widetilde{\mathcal F}}(1,y) + pyB_I^{\widetilde{\mathcal F}}(1,y); \quad & B^{E}_{\widetilde{\mathcal F}}(0,y)&=B_I^{\widetilde{\mathcal F}}(1,y) \end{align*} and that the Camacho-Sad indices coincide for $\mathcal F$ and $\widetilde{\mathcal F}$, that is, $$ I_{P_l^E}(\pi_E^* {\mathcal F},E_{red}) = I_{P_l^E}(\pi_E^* \widetilde{\mathcal F},E_{red}), \qquad \text{ for } l=1,2,\ldots,k, $$ where $\pi^*_E C \cap E_{red}=\{P_1^E,\ldots, P_k^E\}$. If we write $P_l^E=(0,d_l^E)$ in coordinates $(x_p,y_p)$ and denote $m_{l}^C=m_{P_l^E}(\pi_E^*C)$, we have that $$ A^E_{\mathcal F}(0,y)=A^E_{\widetilde{\mathcal F}}(0,y)=\prod_{l=1}^{k} (y-d_l^E)^{m_{l}^C} $$ up to divide $\omega^E_{\mathcal F}$ and $\omega_{\widetilde{\mathcal F}}^E$ by a constant. Moreover, if we consider $(x_l,y_l)$ coordinates centered at $P_l^E$ with $x_l=x_p$ and $y_l=y_p-d_l^E$, the equality of the Newton polygons ${\mathcal N}(\pi_E^* {\mathcal F};x_l,y_l)$, ${\mathcal N}(\pi_E^* \widetilde{\mathcal F};x_l,y_l)$ and ${\mathcal N}(\pi_E^*C;x_l,y_l)$ implies $$ \text{ord}_{y=d_l^E} (B^E_{\mathcal F}(0,y)) \geq m_{l}^C-1 \qquad \text{ord}_{y=d_l^E} (B^E_{\widetilde{\mathcal F}}(0,y)) \geq m_{l}^C-1 $$ (see \cite{Cor-2009-AnnAcBras}, Lemma 1) and we can write $B^E_{\mathcal F}(0,y)=\prod_{l=1}^{k} (y-d_l^E)^{m_{l}^C-1} \tilde{B}^E_{\mathcal F}(y)$, $B^E_{\widetilde{\mathcal F}} (0,y)=\prod_{l=1}^{k} (y-d_l^E)^{m_{l}^C-1} \tilde{B}^E_{\widetilde{\mathcal F}}(y)$. Thus, from the definition of the Camacho-Sad index given in \eqref{eq:indice-C-S}, we have that \begin{align*} I_{P_l^E}(\pi_E^* {\mathcal F},E_{red}) & = - \text{Res}_{y=d_l^E} \frac{B^E_{\mathcal F}(0,y)}{A^E_{\mathcal F}(0,y)}= - \text{Res}_{y=d_l^E} \frac{\tilde{B}^E_{\mathcal F}(y)}{\prod_{l=1}^k(y-d_l^E)}, \\ I_{P_l^E}(\pi_E^* \widetilde{\mathcal F},E_{red}) & = - \text{Res}_{y=d_l^E} \frac{B^E_{\widetilde{\mathcal F}}(0,y)}{A^E_{\widetilde{\mathcal F}}(0,y)} = - \text{Res}_{y=d_l^E} \frac{\tilde{B}^E_{\widetilde{\mathcal F}}(y)}{\prod_{l=1}^k(y-d_l^E)}. \end{align*} The equality of the Camacho-Sad indices $I_{P_l^E}(\pi_E^* {\mathcal F},E_{red})=I_{P_l^E}(\pi_E^* \widetilde{\mathcal F},E_{red})$, for $l=1,\ldots, k$, implies $\tilde{B}^E_{\mathcal F}(y)=\tilde{B}^E_{\widetilde{\mathcal F}}(y)$ and hence $\text{In}_p(\omega_{\mathcal F})=\text{In}_p(\omega_{\widetilde{\mathcal F}})$. Finally, if $E$ is a non-collinear divisor, the equality $$\text{In}_p(J_{{\mathcal F},\mathcal{G}}(x,y);x,y)= \text{In}_p(J_{\widetilde{\mathcal F},\widetilde{\mathcal{G}}}(x,y);x,y)$$ is a direct consequence of Lemma~\ref{lema:parte-inicial-jac}. \end{proof} \begin{Remark}\label{rmk:x-cono-tg} Note that $x=0$ can be a branch of ${\mathcal J}_{\mathcal{F},\mathcal{G}}$ although $x=0$ is not tangent to the curve $Z$. Let us consider the foliations $\mathcal F$ and $\mathcal G$ given by $\omega=0$ and $\eta=0$ with \begin{align*} \omega & = (xy-6x^2)dx + (y^2-6xy+10x^2)dy \\ \eta & = -6x^5 dx + 3y^2 dy. \end{align*} Thus ${\mathcal J}_{\mathcal{F},\mathcal{G}}$ is given by $J(x,y)=0$ with $$J(x,y)=3x (y^3-6xy^2+2x^4y^2-12x^5y+20x^6).$$ In this example, if we consider the blow-up $\pi_1: X_1 \to ({\mathbb C}^2,0)$ of the origin, the first divisor $E_1$ is non-collinear. Thus the result of Lemma~\ref{lema:parte-inicial-jac} above holds: we have that $\text{In}_1(\omega)=\omega$, $\text{In}_1(\eta)=3y^2dy$ and hence $\text{In}_1(J)= 3xy^2(y-6x)$. Note that the rational function ${\mathcal M}_{E_1}(z)$ is given by $${\mathcal M}_{E_1}(z)=- \frac{z-6}{z(z-1)(z-2)(z-3)}$$ which determines the branch $J^{E_1}_{nc}$ whose tangent cone is given by $y-6x=0$ but we cannot determine the branch $x=0$ of ${\mathcal J}_{\mathcal{F},\mathcal{G}}$. \end{Remark} \section{Proofs of the jacobian curve properties}\label{sec:pruebas} This section will be devoted to prove the results stated in section~\ref{sec:jacobian}. Let us consider two singular foliations $\mathcal F$ and $\mathcal G$ in $({\mathbb C}^2,0)$ defined by the 1-forms $\omega=0$ and $\eta=0$ with $\omega=A(x,y) dx + B(x,y) dy$ and $\eta=P(x,y) dx + Q(x,y) dy$. Recall that the jacobian curve ${\mathcal J}_{{\mathcal F},{\mathcal G}}$ is defined by $J(x,y)=0$ where $$J(x,y)=A(x,y) Q(x,y) - B(x,y) P(x,y).$$ Next remark shows that the jacobian curve behaves well by a change of coordinates. \begin{Remark}\label{rk:cambio-coord} If $F:({\mathbb C}^2,0) \to ({\mathbb C}^2,0)$ is a change of coordinates with $F=(F_1,F_2)$, the Jacobian curve of $F^*{\mathcal F}$ and $F^* {\mathcal G}$ is given by $$ \left| \begin{array}{cc} A \circ F & B \circ F\\ P \circ F & Q \circ F \end{array} \right| \cdot \left| \begin{array}{cc} F_{1,x} & F_{1,y} \\ F_{2,x} & F_{2,y} \end{array} \right| =0.$$ Thus, the curve ${\mathcal J}_{F^*{\mathcal F},F^* {\mathcal G}}$ is defined by $J \circ F=0$. Hence, ${\mathcal J}_{F^*{\mathcal F},F^* {\mathcal G}}= F^{-1}({\mathcal J}_{{\mathcal F},{\mathcal G}})$. \end{Remark} Assume that ${\mathcal F} \in {\mathbb G}_{C,\lambda}$ and ${\mathcal G} \in {\mathbb G}_{D,\mu}$ where $C=\cup_{i=1}^r C_i$ and $D=\cup_{i=1}^s D_i$ are two plane curves in $({\mathbb C}^2,0)$ without common irreducible components and such that the curve $Z=C \cup D$ has only non-singular irreducible components. We start proving Theorem \ref{th-multiplicidad-jac} for logarithmic foliations. The general case will be consequence of Lemma~\ref{lema:puntos-jac-log-nolog} below. \begin{proof}[Proof of Theorem \ref{th-multiplicidad-jac}] Consider the logarithmic foliations ${\mathcal L}_\lambda^C$ and ${\mathcal L}_\mu^{D}$ given by $\omega_\lambda=0$ and $\eta_\mu=0$ with \begin{align*} \omega_\lambda & = \prod_{i=1}^r(y-\alpha_i(x)) \sum_{i=1}^{r} \lambda_i \frac{d(y-\alpha_i(x))}{y-\alpha_i(x)} \\ \eta_\mu & = \prod_{i=1}^s(y-\beta_i(x)) \sum_{i=1}^{s} \mu_i \frac{d(y-\beta_i(x))}{y-\beta_i(x)} \end{align*} where the curve $C_i$ is given by $y-\alpha_i(x)=0$ with $\alpha_i(x)=\sum_{j=1}^{\infty} a_j^i x^j \in {\mathbb C}\{x\}$ and the curve $D_i$ is given by $y-\beta_i(x)=0$ with $\beta_i(x)=\sum_{j=1}^{\infty} b_j^i x^j \in {\mathbb C}\{x\}$. Let us denote ${\mathcal J}_{\lambda,\mu}$ the jacobian curve of ${\mathcal L}_\lambda^C$ and ${\mathcal L}_\mu^{D}$ which is defined by $J_{\lambda,\mu}(x,y)=0$ with $$ J_{\lambda,\mu}(x,y) =A_{\lambda}(x,y) Q_{\mu}(x,y) - B_{\lambda}(x,y) P_{\mu}(x,y)$$ where we write $\omega_\lambda=A_\lambda(x,y) dx + B_\lambda(x,y) dy$ and $\eta_\mu=P_\mu(x,y) dx + Q_\mu(x,y) dy$. More precisely, we can write \begin{equation}\label{eq:jacobiano-lambda-mu} J_{\lambda,\mu}(x,y) = f(x,y) g(x,y) \left| \begin{array}{cc} -\sum\limits_{i=1}^{r} \lambda_i \frac{\alpha_i'(x)}{y-\alpha_i(x)} & \sum\limits_{i=1}^{r} \frac{\lambda_i}{y-\alpha_i(x)} \\ & \\ -\sum\limits_{i=1}^{s} \mu_i \frac{\beta'_i(x)}{y-\beta_i(x)} & \sum\limits_{i=1}^{s} \frac{\mu_i}{y-\beta_i(x)} \end{array} \right| \end{equation} where $f(x,y)=\prod_{i=1}^r(y-\alpha_i(x))$ and $g(x,y)=\prod_{i=1}^s(y-\beta_i(x))$ are equations of the curves $C$ and $D$ respectively. Let $\pi_Z: X_Z \to ({\mathbb C}^2,0)$ be the minimal reduction of singularities of $Z$. Take $E$ a bifurcation divisor of $G(Z)$ with $v(E)=p$ and consider $\pi_E : X_E \to ({\mathbb C}^2,0)$ the reduction of $\pi_Z$ to $E$. Since the jacobian curve behaves well by a change of coordinates (see Remark~\ref{rk:cambio-coord}), we can assume that the coordinates $(x,y)$ are adapted to $E$. Take $(x_p,y_p)$ coordinates in the first chart of $E_{red} \subset X_E$ such that $\pi_E(x_p,y_p)=(x_p,x_p^p y_p)$ and $E_{red}=(x_p=0)$. Let us compute the strict transform of ${\mathcal J}_{\lambda,\mu}$ by $\pi_E$. We consider two situations: $E$ being the first bifurcation divisor of $G(Z)$ or not. Assume that $E$ is the first bifurcation divisor of $G(Z)$, then $\alpha_i(x) = \sum_{j \geq p} a_j^i x^j$ and $\beta_l(x) = \sum_{j \geq p} b_j^l x^j$ for $i \in \{1,\ldots,r\}$ and $l \in \{1,\ldots, s\}$. Moreover, we can write $f(x_p,x_p^p y_p)=x^{pr} \tilde{f}(x_p,y_p)$ and $g(x_p,x_p^p y_p)=x^{ps} \tilde{g}(x_p,y_p)$, where the strict transforms $\pi_E^*C$ and $\pi_E^*D$ of $C$ and $D$ by $\pi_E$ are given by $\tilde{f}=0$ and $\tilde{g}=0$ respectively in coordinates $(x_p,y_p)$. If we compute $J_{\lambda,\mu}(x_p,x_p^p y_p)$ using the expression of $J_{\lambda,\mu}$ given in equation~\eqref{eq:jacobiano-lambda-mu}, we get that \begin{align*} &J_{\lambda,\mu} (x_p,x_p^p y_p) = f(x_p,x_p^p y_p) g(x_p,x_p^p y_p) \left| \begin{array}{cc} -\sum\limits_{i=1}^{r} \lambda_i \frac{\alpha_i'(x_p)}{x_p^py_p-\alpha_i(x_p)} & \sum\limits_{i=1}^{r} \frac{\lambda_i}{x_p^py_p-\alpha_i(x_p)} \\ & \\ -\sum\limits_{i=1}^{s} \mu_i \frac{\beta'_i(x_p)}{x_p^py_p-\beta_i(x_p)} & \sum\limits_{i=1}^{s} \frac{\mu_i}{x_p^py_p-\beta_i(x_p)} \end{array} \right| \\ & \\ & = x_p^{p(r+s)} \tilde{f}(x_p,y_p) \tilde{g}(x_p,y_p) \left| \begin{array}{cc} -\frac{1}{x_p} \sum\limits_{i=1}^{r} \lambda_i \frac{p a_p^i + (p+1) a_{p+1}^i x_p + \cdots}{y_p-(a_p^i + a_{p+1}^i x_p + \cdots)} & \frac{1}{x_p^p} \sum\limits_{i=1}^{r} \frac{\lambda_i}{y_p-(a_p^i + a_{p+1}^i x_p + \cdots)} \\ & \\ -\frac{1}{x_p}\sum\limits_{i=1}^{s} \mu_i \frac{p b_p^i + (p+1) b_{p+1}^i x_p + \cdots}{y_p-(b_p^i + b_{p+1}^i x_p + \cdots)} & \frac{1}{x_p^p} \sum\limits_{i=1}^{s} \frac{\mu_i}{y_p-(b_p^i + b_{p+1}^i x_p + \cdots)} \end{array} \right| \\ & \\ & = x_p^{p(r+s-1)-1} \tilde{f}(x_p,y_p) \tilde{g}(x_p,y_p) \left| \begin{array}{cc} -\sum\limits_{i=1}^{r} \lambda_i \frac{p a_p^i + (p+1) a_{p+1}^i x_p + \cdots}{y_p-(a_p^i + a_{p+1}^i x_p + \cdots)} & \sum\limits_{i=1}^{r} \frac{\lambda_i}{y_p-(a_p^i + a_{p+1}^i x_p + \cdots)} \\ & \\ -\sum\limits_{i=1}^{s} \mu_i \frac{p b_p^i + (p+1) b_{p+1}^i x_p + \cdots}{y_p-(b_p^i + b_{p+1}^i x_p + \cdots)} & \sum\limits_{i=1}^{s} \frac{\mu_i}{y_p-(b_p^i + b_{p+1}^i x_p + \cdots)} \end{array} \right| \\ & = x_p^{p(r+s-1)-1} \tilde{f}(x_p,y_p) \tilde{g}(x_p,y_p) M_E(x_p,y_p). \end{align*} If $M_E(0,y_p) \not \equiv 0$, then the points $\pi_E^* {\mathcal J}_{\lambda,\mu} \cap E_{red}$, in the first chart of $E_{red}$, are given by $x_p=0$ and $J_E(y_p)=0$ where $$J_E(y_p)= \tilde{f}(0,y_p) \tilde{g}(0,y_p) M_E(0,y_p),$$ where $\tilde{f}(0,y_p)= \prod_{i=1}^{r} (y_p-a_p^i)$, $\tilde{g}(0,y_p)= \prod_{i=1}^{s} (y_p-b_p^i)$ and $M_E(0,y_p)$ is equal to $$M_E(0,y_p)= \left| \begin{array}{cc} -\sum\limits_{i=1}^{r} \lambda_i \frac{p a_p^i }{y_p-a_p^i} & \sum\limits_{i=1}^{r} \frac{\lambda_i}{y_p-a_p^i} \\ & \\ -\sum\limits_{i=1}^{s} \mu_i \frac{p b_p^i }{y_p-b_p^i} & \sum\limits_{i=1}^{s} \frac{\mu_i}{y_p-b_p^i} \end{array} \right| = \left| \begin{array}{cc} p \sum\limits_{i=1}^{r} \lambda_i & \sum\limits_{i=1}^{r} \frac{\lambda_i}{y_p-a_p^i} \\ & \\ p \sum\limits_{i=1}^{s} \mu_i & \sum\limits_{i=1}^{s} \frac{\mu_i}{y_p-b_p^i} \end{array} \right| = \left| \begin{array}{cc} \kappa_E({\mathcal L}_\lambda^C) & \sum\limits_{i=1}^{r} \frac{\lambda_i}{y_p-a_p^i} \\ & \\ \kappa_E({\mathcal L}_\mu^D) & \sum\limits_{i=1}^{s} \frac{\mu_i}{y_p-b_p^i} \end{array} \right| $$ where $\kappa_E ( \ )$ is defined by equation~\eqref{eq:peso-divisor-log}. Let $\{R_1^E,\ldots, R_{b_E}^E\}$ be the union of the singular points of $\pi_E^*{\mathcal L}_{\lambda}^C$ and $\pi_E^* {\mathcal L}_\mu^D$ in the first chart of $E_{red}$ where $R_l^E=(0,c_l^E)$ in coordinates $(x_p,y_p)$. Note that $\{R_1^E,\ldots, R_{b_E}^E\}=\pi_E^* Z \cap E_{red}$. Put $I_{R_l^E}^C= \{ i \in \{1, \ldots, r\} \ : \ \pi_E^*C_i \cap E_{red} = \{R_l^E\}\}$ and $I_{R_l^E}^D = \{ j \in \{1, \ldots, s\} \ : \ \pi_E^*D_j \cap E_{red} = \{R_l^E\}\}$ and denote $m_l^C=m_{R_l^E}(\pi_E^* C) =\sharp I_{R_l^E}^C$ and $m_l^D=m_{R_l^E}(\pi_E^*D)=\sharp I_{R_l^E}^D $ for $l=1,2,\ldots, b_E$. Thus, we have that $$M_E(0,y_p)= \kappa_E({\mathcal L}_\lambda^C) \kappa_E({\mathcal L}_\mu^D) \left| \begin{array}{cc} 1 & - \sum\limits_{l=1}^{b_E} \frac{I_{R_l^E}(\pi_E^*{\mathcal L}_{\lambda}^C,E_{red})}{y_p-c_l^E} \\ & \\ 1 & - \sum\limits _{l=1}^{b_E} \frac{I_{R_l^E}(\pi_E^*{\mathcal L}_{\mu}^D,E_{red})}{y_p-c_l^E} \end{array} \right| $$ since the Camacho-Sad index are given by (see equation~\eqref{eq:camacho-sad-log}) $$ I_{R_l^E}(\pi_E^*{\mathcal L}_{\lambda}^C,E_{red}) = - \frac{ \ \ \sum_{i \in I_{R_l^E}^C} \lambda_i\ \ }{p \sum_{i=1}^{r} \lambda_i}; \qquad I_{R_l^E}(\pi_E^*{\mathcal L}_{\mu}^D,E_{red}) = - \frac{ \ \ \sum_{i \in I_{R_l^E}^D} \mu_i \ \ }{p \sum_{i=1}^{s} \mu_i}. $$ We conclude that if $M_E(0,y_p) \not \equiv 0$, then $$M_E(0,y_p) = K_E {\mathcal M}_E(y_p) $$ with $K_E= - \kappa_E({\mathcal L}_\lambda^C) \kappa_E({\mathcal L}_\mu^D)$ a non-zero constant and ${\mathcal M}_E(z)$ is the rational function associated to the divisor $E$ for the foliations ${\mathcal L}_\lambda^C$ and $\mathcal{L}_\mu^D$ (see section~\ref{sec:jacobian}). Since the divisor $E$ is non-collinear, then ${\mathcal M}_E(y_p) \not \equiv 0$ (and also $M_E(0,y_p) \not \equiv 0$) and the points $\pi_E^* {\mathcal J}_{\lambda,\mu} \cap E_{red}$, in the first chart of $E_{red}$, are given by $x_p=0$ and $$\prod_{i=1}^{b_E} (y_p -c_l^E)^{m_l^C+m_l^D} {\mathcal M}_E(y_p)=0. $$ Let $\{q_1,\ldots, q_{s_E}\}$ be the set of zeros of ${\mathcal M}_E(z)$. For $l=1,2, \ldots, s_E$, put $Q_l^E=(0,q_l)$ and denote by $t_{Q_l^E}$ the multiplicity of $q_l$ as a zero of ${\mathcal M}_E(z)$. Thus, the points in $\pi_E^* {\mathcal J}_{\lambda,\mu} \cap E_{red}$ belong to $C(E) \cup N(E) \cup M(E)$. Moreover, the multiplicity of $\pi_E^* {\mathcal J}_{\lambda,\mu}$ at a point $P \in E_{red}$, in the first chart of $E_{red}$, is given by $$m_P(\pi_E^* {\mathcal J}_{\lambda,\mu}) = m_P(\pi_E^*C) + m_P(\pi_E^* D) + \tau_E(P)$$ where $$\tau_E(P)=\left\{ \begin{array}{ll} t_P, & \hbox{ if } P \in M(E) \\ - 1, & \hbox{ if } P \in N(E) \\ 0, & \hbox{ otherwise.} \end{array} \right. $$ Consider now the case of $E$ being any bifurcation divisor with $v(E)=p$ and take $(x,y)$ coordinates adapted to $E$. Let us denote $I=\{1,\ldots, r\}$, $J=\{1,\ldots, s\}$, $I^E=\{ i \in I \ : \ E \text{ belongs to the geodesic of } C_i\}$ and $J^E = \{ j \in J \ : \ E \text{ belongs to} \linebreak \text{the geodesic of } D_i\}$. We can write \begin{align*} \omega_\lambda & = f(x,y) \left[ \sum_{i \in I \smallsetminus I^E} \lambda_i \frac{ -\alpha'_i(x) dx + dy}{y-\alpha_i(x)} + \sum_{i \in I^E} \lambda_i \frac{ -\alpha'_i(x) dx + dy}{y-\alpha_i(x)} \right] \\ \eta_\mu &= g(x,y) \left[ \sum_{i \in J \smallsetminus J^E} \mu_i \frac{ -\beta'_i(x) dx + dy}{y-\beta_i(x)} + \sum_{i \in J^E} \mu_i \frac{ -\beta'_i(x) dx + dy}{y-\beta_i(x)} \right] \end{align*} and hence, the jacobian curve ${\mathcal J}_{\lambda,\mu}$ is given by $J_{\lambda,\mu}(x,y)=0$ with $$ J_{\lambda,\mu}(x,y) = f(x,y) g(x,y) \left| \begin{array}{cc} \sum\limits_{i \in I \setminus I^E} \lambda_i \frac{-\alpha'_i(x)}{y-\alpha_i(x)} + \sum\limits_{i \in I^E} \lambda_i \frac{-\alpha'_i(x)}{y-\alpha_i(x)} & \sum\limits_{i \in I \setminus I^E} \frac{\lambda_i}{y-\alpha_i(x)} + \sum\limits_{i \in I^E} \frac{\lambda_i}{y-\alpha_i(x)} \\ \sum\limits_{i \in J \setminus J^E} \mu_i \frac{-\beta'_i(x)}{y-\beta_i(x)} + \sum\limits_{i \in J^E} \mu_i \frac{-\beta'_i(x)}{y-\beta_i(x)} & \sum\limits_{i \in J \setminus J^E} \frac{\mu_i }{y-\beta_i(x)} + \sum\limits_{i \in J^E} \frac{\mu_i}{y-\beta_i(x)} \end{array} \right| $$ Since $v(E)=p$ and $(x,y)$ are coordinates adapted to $E$, we have that \begin{align*} \text{ord}_x(\alpha_i(x)) & \geq p \quad \text{ if } \quad i \in I^E; \quad & \text{ord}_x(\alpha_i(x))=n_i & < p \quad \text{ if } \quad i \in I \smallsetminus I^E; \\ \text{ord}_x(\beta_i(x)) & \geq p \quad \text{ if } \quad i \in J^E; & \text{ord}_x(\beta_i(x))=o_i& <p \quad \text{ if } \quad i \in J \smallsetminus J^E. \end{align*} Thus, $\alpha_i(x) = \sum_{j \geq p} a_j^i x^j $ if $i \in I^E$ and $\beta_i(x) = \sum_{j \geq p} b_j^i x^j$ if $i \in J^E$, but $\alpha_i (x) = \sum_{j \geq n_i} a_j^i x^j$ with $n_i < p$ if $i \in I \smallsetminus I^E$ and $\beta_i (x) = \sum_{j \geq o_i} b_j^i x^j$ with $o_i < p$ if $i \in J \smallsetminus J^E$. Then, $J_{\lambda,\mu}(x_p,x_p^p y_p)$ is given by $$ J_{\lambda,\mu}(x_p,x_p^p y_p) = f(x_p,x_p^p y_p) g(x_p,x_p^p y_p) M_E^*(x_p,y_p) $$ with \begin{align*} & M_E^*(x_p,y_p) = \\ & \frac{1}{x_p^{p+1}} \left| \begin{array}{cc} \sum\limits_{i \in I \smallsetminus I^E} \lambda_i \frac{-n_i a_{n_i}^i + x_p(\cdots) }{x_p^{p-n_i}y_p-a_{n_i}^i + x_p(\cdots)} + \sum\limits_{i \in I^E} \lambda_i \frac{-p a_p^i + x_p(\cdots)}{y_p-a_p^i + x_p(\cdots) } & \sum\limits_{i \in I \smallsetminus I^E} \frac{\lambda_i x_p^{p-n_i}}{x_p^{p-n_i}y_p-a_{n_i}^i + x_p(\cdots)} + \sum\limits_{i \in I^E} \frac{\lambda_i}{y_p-a_p^i + x_p(\cdots)} \\ \sum\limits_{i \in J \smallsetminus J^E} \mu_i \frac{-o_i b_{o_i}^i + x_p(\cdots) }{x_p^{p-o_i} y_p-b_{o_i}^i + x_p(\cdots)} + \sum\limits_{i \in J^E} \mu_i \frac{-pb_p^i + x_p(\cdots)}{y_p-b_p^i + x_p(\cdots)} & \sum\limits_{i \in J \smallsetminus J^E} \frac{\mu_i x_p^{p-o_i} }{x_p^{p-o_i} y_p-b_{o_i}^i + x_p(\cdots)} + \sum\limits_{i \in J^E} \frac{\mu_i}{y_p-b_p^i + x_p(\cdots)} \end{array} \right| \\ & = \frac{1}{x_p^{p+1}} M_E(x_p,y_p) \end{align*} If $M_E(0,y_p) \not\equiv 0$, we have that \begin{align*} M_E(0,y_p) & = \left| \begin{array}{ccc} \sum\limits_{i \in I \smallsetminus I^E} \lambda_i n_i + \sum\limits_{i \in I^E} \lambda_i \frac{-p a_p^i}{y_p-a_p^i} & \quad & \sum\limits_{i \in I^E} \frac{\lambda_i}{y_p-a_p^i} \\ & \\ \sum\limits_{i \in J \smallsetminus J^E} \mu_i o_i + \sum\limits_{i \in J^E} \mu_i \frac{-pb_p^i}{y_p-b_p^i} & & \sum\limits_{i \in J^E} \frac{\mu_i}{y_p-b_p^i} \end{array} \right| \\ & \\ & = \left| \begin{array}{ccc} \sum\limits_{i \in I \smallsetminus I^E} \lambda_i n_i + \sum\limits_{i \in I^E} \lambda_i p & \quad & \sum\limits_{i \in I^E} \frac{\lambda_i}{y_p-a_p^i} \\ & \\ \sum\limits_{i \in J \smallsetminus J^E} \mu_i o_i + \sum\limits_{i \in J^E} \mu_i p & & \sum\limits_{i \in J^E} \frac{\mu_i}{y_p-b_p^i} \end{array} \right| \\ & = -\kappa_E({\mathcal L}_\lambda^C) \kappa_E({\mathcal L}_\mu^D) \left| \begin{array}{ccc} 1 & \quad & \sum\limits_{l=1}^{b_E} \frac{I_{R_l^E}(\pi_E^*{\mathcal L}_\lambda^C,E_{red})}{y_p-c_l^E} \\ & \\ 1 & & \sum\limits_{l=1}^{b_E} \frac{I_{R_l^E}(\pi_E^*{\mathcal L}_\mu^D,E_{red})}{y_p-c_l^E} \end{array} \right| \\ \end{align*} where $\kappa_E({\mathcal L}_\lambda^C) = \sum\limits_{i \in I \smallsetminus I^E} \lambda_i n_i + \sum\limits_{i \in I^E} \lambda_i p $ and $\kappa_E({\mathcal L}_\mu^D) = \sum\limits_{i \in J \smallsetminus J^E} \mu_i o_i + \sum\limits_{i \in J^E} \mu_i p$ (see equation~\eqref{eq:peso-divisor-log}). Consequently, $$M_E(0,y_p)= -\kappa_E({\mathcal L}_\lambda^C) \kappa_E({\mathcal L}_\mu^D) {\mathcal M}_E(y_p)$$ and the points $\pi_E^*{\mathcal J}_{\lambda,\mu} \cap E_{red}$, in the first chart of $E_{red}$, are given by $x_p=0$ and $$ \prod_{i=1}^{b_E} (y_p -c_l^E)^{m_l^C+m_l^D} {\mathcal M}_E(y_p)=0. $$ The result follows as in the case $E$ being the first bifurcation divisor. \end{proof} \begin{Remark}\label{rmk:x-tangente} With the notations of the proof above, if $E_1$ is non-collinear, we have that the tangent cone of ${\mathcal J}_{\mathcal{L}^C_\lambda,\mathcal{L}^D_\mu}$ is given by $J_1(x,y)=0$ where \begin{align*} J_1(x,y) =& - \left(\sum_{i=1}^{r} \lambda_i a_1^i \prod_{j\neq i} (y-a_1^j x ) \right) \left( \sum_{i=1}^{s} \mu_i \prod_{j \neq i} (y-b_1^j x) \right) \\ & + \sum_{i=1}^{r} \lambda_i \prod_{j \neq i} (y-a_1^jx) \sum_{i=1}^{s} \mu_i b_1^i \prod_{j \neq i} (y - b_1^j x) \end{align*} Thus, $x=0$ is not tangent to the jacobian curve ${\mathcal J}_{\mathcal{L}^C_\lambda,\mathcal{L}^D_\mu}$ provided that \begin{equation}\label{eq:x-no-tg} \kappa_{E_1}({\mathcal L}_\lambda^C) \sum_{i=1}^s \mu_i b_1^i - \kappa_{E_1}({\mathcal L}_\mu^D) \sum_{i=1}^r \lambda_ i a_1^i \neq 0 \end{equation} where we recall that $\kappa_{E_1}({\mathcal L}_\mu^D)= \sum_{i=1}^{r} \lambda_i$ and $\kappa_{E_1}({\mathcal L}_\mu^D)=\sum_{i=1}^s \mu_i$. By Lemma~\ref{lema:parte-incial-modelo-log}, the above remarks hold for the jacobian curve ${\mathcal J}_{\mathcal{F},\mathcal{G}}$ for any $\mathcal{F} \in \mathbb{G}_{C,\lambda}$, $\mathcal{G} \in \mathbb{G}_{D,\mu}$. In the example given in Remark~\ref{rmk:x-cono-tg} we have that $\sum_{i=1}^{3} \lambda_i a_1^i = \sum_{i=1}^{3} \mu_i b_1^i =0$ and hence the condition in \eqref{eq:x-no-tg} does not hold whereas in the example given in Remark~\ref{rmk:CE-ME} condition in \eqref{eq:x-no-tg} holds and hence $x=0$ is not tangent to the jacobian curve. \end{Remark} The proof of Theorem~\ref{th-multiplicidad-jac} when ${\mathcal F} \in {\mathbb G}_{C,\lambda}$ and ${\mathcal G} \in {\mathbb G}_{D,\mu}$ but they are not logarithmic foliations follows from next lemma: \begin{Lemma}\label{lema:puntos-jac-log-nolog} Consider foliations ${\mathcal F}, {\mathcal L}_\lambda^C \in {\mathbb G}_{C,\lambda}$ and ${\mathcal G}, {\mathcal L}_\mu^D \in {\mathbb G}_{D,\mu}$. Let ${\mathcal J}_{\mathcal{F},\mathcal{G}}$ be the jacobian curve of $\mathcal F$ and $\mathcal G$ and $\mathcal{J}_{\lambda,\mu}$ the jacobian curve of $\mathcal{L}_\lambda^C$ and $\mathcal{L}_{\mu}^D$. Let $E$ be an irreducible component of $\pi_Z^{-1}(0)$. If $E$ is a non-collinear divisor, we have that $$\pi_E^* {\mathcal J}_{\mathcal{F},\mathcal{G}} \cap E_{red} = \pi_E^* \mathcal{J}_{\lambda,\mu} \cap E_{red}$$ and the multiplicities satisfy that $$m_P(\pi_E^* {\mathcal J}_{\mathcal{F},\mathcal{G}}) = m_P (\pi_E^* \mathcal{J}_{\lambda,\mu})$$ at each point $P \in \pi_E^* {\mathcal J}_{\mathcal{F},\mathcal{G}} \cap E_{red}$. \end{Lemma} \begin{proof} Let $E$ be an irreducible component of $\pi_Z^{-1}(0)$ with $v(E)=p$ and take $(x,y)$ coordinates adapted to $E$. The result is a direct consequence of the equality $$ {\rm In}_p(J_{\mathcal{F},\mathcal{G}};x,y)={\rm In}_p(J_{\lambda,\mu};x,y) $$ given in Lemma~\ref{lema:parte-incial-modelo-log} provided that $E$ is a non-collinear divisor, where jacobian curves ${\mathcal J}_{\mathcal{F},\mathcal{G}}$, $\mathcal{J}_{\lambda,\mu}$ are given by $J_{\mathcal{F},\mathcal{G}}(x,y)=0$ and $J_{\lambda,\mu}(x,y)=0$ respectively. \end{proof} \begin{proof}[Proof of Corollary \ref{cor:consecutive-divisors}] Let $E$ and $E'$ be two consecutive bifurcation divisors in $G(Z)$ with $E <_P E'$ and assume that $P \in N(E)$, thus $\Delta_E(P)\neq 0$ and hence $$m_P(\pi_E^*{\mathcal J}_{\mathcal{F},\mathcal{G}})=m_P(\pi_E^*C)+m_P(\pi_E^*D)-1.$$ Recall that $E <_P E'$ implies the existence of a chain of consecutive divisors $$E_0=E < E_1 < \cdots < E_{k-1} < E_k=E'$$ with $b_{E_l}=1$ for $l=1, \ldots, k-1$ and the morphism $\pi_{E'}= \pi_E \circ \sigma $ where $\sigma: X_{E'} \to (X_E,P)$ is a composition of $k$ punctual blow-ups \begin{equation*} (X_E, P) \overset{\sigma_1}{\longleftarrow} (X_{E_1},P_1) \overset{\sigma_2}{\longleftarrow} \cdots \overset{\sigma_{k-1}}{\longleftarrow} (X_{E_{k-1}},P_{k-1}) \overset{\sigma_{k}}{\longleftarrow} X_{E'}. \end{equation*} Since $P$ is non-collinear, then each $P_i$ is non-collinear by Lemma~\ref{lema:explosio-colineal}, thus $\Delta_{E_i}(P_i) \neq 0$ and hence $M(E_i)=\emptyset$ for $i=1,\ldots, k-1$. In particular, we have that, $$ m_{P_i}(\pi_{E_i}^*{\mathcal J}_{\mathcal{F},\mathcal{G}})=m_{P_i}(\pi_{E_i}^*C)+m_{P_i}(\pi_{E_i}^*D)-1 $$ and $$ m_{P_i}(\pi_{E_i}^*{\mathcal J}_{\mathcal{F},\mathcal{G}})=m_P(\pi_E^*{\mathcal J}_{\mathcal{F},\mathcal{G}}), \quad \text{ for } i=1,\ldots, k-1 $$ since $m_{P_i}(\pi_{E_i}^*C)=m_P(\pi_E^*C)$ and $m_{P_i}(\pi_{E_i}^*D)=m_P(\pi_E^*D)$ for all $i=1,\ldots, k-1.$ This implies that $$ m_P(\pi_E^* {\mathcal J}_{\mathcal{F},\mathcal{G}}) = \sum_{Q \in E'_{red}} m_Q(\pi_{E'}^* {\mathcal J}_{\mathcal{F},\mathcal{G}}). $$ Finally, by Lemma~\ref{lema:E-no-colineal}, it is enough to show that $$\sum_{R \in N(E')} \Delta_{E'}(R) \neq 0$$ to prove the equality given in~\eqref{eq1:consecutive-divisors}. Let us assume that $\sum_{R \in N(E')} \Delta_{E'}(R) = 0$, which implies $$ \sum_{R \in N(E')} I_{R}(\pi_{E'}^* {\mathcal F},E_{red}')= \sum_{R \in N(E')} I_{R}(\pi_{E'}^* {\mathcal G},E_{red}') $$ and, by the properties of the Camacho-Sad indices, we deduce that $$ I_{\widetilde{P}_{k-1}}(\pi_{E'}^* {\mathcal F},E_{red}')= I_{\widetilde{P}_{k-1}}(\pi_{E'}^* {\mathcal G},E_{red}') $$ where we denote $\widetilde{P}_{k-1} = \widetilde{E}_{k-1,red} \cap E_{red}'$ and $\widetilde{E}_{k-1,red}$ is the strict transform of $E_{k-1,red}$ by $\sigma_{k}$. Since $\mathcal F$ and $\mathcal G$ are generalized curve foliations, then $\widetilde{P}_{k-1}$ is a simple singularity for $\pi_{E'}^* {\mathcal F}$ and $\pi_{E'}^*{\mathcal G}$ and hence we have that \begin{align*} I_{\widetilde{P}_{k-1}}(\pi_{E'}^* {\mathcal F},E_{red}') \cdot I_{\widetilde{P}_{k-1}}(\pi_{E'}^* {\mathcal F},\widetilde{E}_{k-1,red})&=1 \\ I_{\widetilde{P}_{k-1}}(\pi_{E'}^* {\mathcal G},E_{red}') \cdot I_{\widetilde{P}_{k-1}}(\pi_{E'}^* {\mathcal G},\widetilde{E}_{k-1,red}) &=1. \end{align*} Consequently, given that \begin{align*} I_{P_{k-1}}(\pi_{E_{k-1}}^* {\mathcal F},E_{k-1,red}) & =I_{\widetilde{P}_{k-1}}(\pi_{E'}^* {\mathcal F},\widetilde{E}_{k-1,red}) +1 = \frac{1}{I_{\widetilde{P}_{k-1}}(\pi_{E'}^* {\mathcal F},E_{red}')} +1, \\ I_{P_{k-1}}(\pi_{E_{k-1}}^* {\mathcal G},E_{k-1,red}) & =I_{\widetilde{P}_{k-1}}(\pi_{E'}^* {\mathcal G},\widetilde{E}_{k-1,red}) +1 = \frac{1}{I_{\widetilde{P}_{k-1}}(\pi_{E'}^* {\mathcal G},E_{red}')} +1, \end{align*} we obtain that $I_{P_{k-1}}(\pi_{E_{k-1}}^* {\mathcal F},E_{k-1,red})=I_{P_{k-1}}(\pi_{E_{k-1}}^* {\mathcal G},E_{k-1,red})$. This implies that $\Delta_{E_{k-1}}(P_{k-1})=0$ which is not possible since $P_{k-1}$ is a non-collinear point by Lemma~\ref{lema:explosio-colineal}. This ends the proof. \end{proof} \begin{proof}[Proof of Theorem~\ref{th:colinear-point}] Let $E$ be an non-collinear bifurcation divisor of $G(Z)$ and a point $P \in C(E)$. Consider a cover $\{E_1,\ldots, E_u\}$ of $E$ at $P$. By Theorem~\ref{th-multiplicidad-jac}, we have that \begin{align*} m_P(\pi_E^* {\mathcal J}_{\mathcal{F},\mathcal{G}}) & = m_P(\pi_E^* C) + m_P(\pi_E^* D) + t_P \\ \sum_{l=1}^{u} \sum_{Q \in E_{l,red}} m_Q(\pi_{E_l}^* {\mathcal J}_{\mathcal{F},\mathcal{G}}) & = \sum_{l=1}^{u} \sum_{Q \in E_{l,red}} (m_Q(\pi_{E_l}^*C) + m_Q(\pi_{E_l}^*D) + \tau_{E_l}(Q)) \end{align*} By the properties of a cover given in definition~\ref{def:cover}, we have that $$m_P(\pi_E^* C) + m_P(\pi_E^* D) =\sum_{l=1}^{u} \sum_{Q \in E_{l,red}} (m_Q(\pi_{E_l}^*C) + m_Q(\pi_{E_l}^*D))$$ and the result is straightforward. \end{proof} \begin{proof}[Proof of Corollary~\ref{cor:mult-int-J-C-D}] Let $E$ be a non-collinear bifurcation divisor of $G(Z)$ and let $\gamma_E$ be any $E$-curvette which does not intersect $E$ at the points $\pi_E^*Z \cap E$. By the properties of $J_{nc}^E$ given in Theorem~\ref{th:descomposicion-no-sing}, we have that if $\delta$ is a branch of $J_{nc}^E$ then $${\mathcal C}(\delta,C_i)=\left\{ \begin{array}{ll} v(E), & \hbox{if } \ \ i \in I_E; \\ {\mathcal C}(\gamma_E,C_i) , & \hbox{othewise.} \end{array} \right. $$ Note that ${\mathcal C}(\gamma_E,C_i)= v(E)$ if $i \in I_E$. Moreover, since $\gamma_E$ and $C_i$ are non-singular curves, we have that ${\mathcal C}(\gamma_E,C_i)=(\gamma_E,C_i)_0$. Therefore, using the relationship between the coincidence and the intersection multiplicity of two branches given in Remark~\ref{rmk:coincidencia-mult-int}, we have that $$(\delta,C_i)_0=m_0(\delta) \cdot (\gamma_E,C_i)_0$$ for a branch $\delta$ of $J_{nc}^E$. Now, if we denote by ${\mathcal B}(J_{nc}^E)$ the set of branches of $J_{nc}^E$, we have that \begin{align*} (J_{nc}^E,C)_0 & = \sum_{i=1}^{r} (J_{nc}^E,C_i)_0 = \sum_{i=1}^{r} \sum_{\delta \in {\mathcal B}(J_{nc}^{E})} (\delta,C_i)_0 \\ & = \sum_{i=1}^{r} \sum_{\delta \in {\mathcal B}(J_{nc}^{E})} m_0 (\delta) \cdot (\gamma_E,C_i)_0 = m_0(J_{nc}^E) \sum_{i=1}^{r} (\gamma_E,C_i)_0 \\ & = t^*(E) \cdot \nu_E(C) \end{align*} \end{proof} \begin{proof}[Proof of Corollary~\ref{cor:sum-mult-int}] We have just proved that $(J_{nc}^E,C_i)_0=m_0(J_{nc}^E) \nu_E(C_i)$. Thus, using Proposition~\ref{prop:int-sep}, we get that $$ \sum_{E \in B_N(Z)} (J_{nc}^E,C_i)_0 = \sum_{E \in B_N(Z)} m_0(J_{nc}^E) \nu_E(C_i) \leq ({\mathcal J}_{\mathcal{F},\mathcal{G}},C_i)_0 = \mu_0({\mathcal F},C_i) + \tau_0({\mathcal G},C_i). $$ Now, from Corollary~\ref{cor:mult-int-J-C-D} and Proposition~\ref{prop:milnor-number}, we obtain that \begin{align*} \sum_{E \in B_N(Z)} ((J_{nc}^E,C)_0 - (J_{nc}^E,D)_0)) & = \sum_{E \in B_N(Z)} m_0(J_{nc}^E) (\nu_{E}(C) - \nu_E(D)) \\ & \leq ({\mathcal J}_{\mathcal{F},\mathcal{G}},C)_0 -({\mathcal J}_{\mathcal{F},\mathcal{G}},D)_0= \mu_0({\mathcal F}) - \mu_0({\mathcal G}) \end{align*} which gives the second inequality. \end{proof} \section{General case}\label{sec:caso-general} Consider two plane curves $C=\cup_{i=1}^r C_i$ and $D=\cup_{j=1}^sD_j$ which can have singular branches. Assume that $C$ and $D$ have no common irreducible components. Let $\rho: ({\mathbb C}^2,0) \to ({\mathbb C}^2,0)$ be a ramification given in coordinates by $\rho(u,v)=(u^n,v)$ such that the curve $\rho^{-1}Z$ has only non-singular irreducible components where $Z=C \cup D$. In this section we will denote $\widetilde{B}$ the curve $\rho^{-1} B$ for any plane curve $B$. See Appendix~\ref{ap:ramificacion} for notations concerning ramifications. Take ${\mathcal F}$ and ${\mathcal G}$ foliations with $C$ and $D$ as curve of separatrices respectively. Let us study the relationship between the curves $\widetilde{\mathcal J}_{{\mathcal F},\mathcal{G}}=\rho^{-1} {\mathcal J}_{{\mathcal F},\mathcal{G}}$ and ${\mathcal J}_{\rho^* \mathcal{F},\rho^* \mathcal{G}}$. Assume that the foliations $\mathcal F$ and $\mathcal G$ are given by $\omega=0$ and $\eta=0$ with $$\omega=A(x,y) dx + B(x,y) dy; \quad \eta=P(x,y) dx + Q(x,y) dy,$$ then $\rho^*{\mathcal F}$ and $\rho^*{\mathcal G}$ are given by $\rho^* \omega=0$ and $\rho^* \eta=0$ where $$\rho^* \omega= A(u^n,v) n u^{n-1} du+B(u^n,v) dv; \quad \rho^* \eta= P(u^n,v) n u^{n-1} du+Q(u^n,v) dv.$$ Therefore, if we write $J(x,y)=A(x,y) Q(x,y) - B(x,y) P(x,y)$, then the curve $\rho^{-1} {\mathcal J}_{{\mathcal F},\mathcal{G}}$ is given by $J(u^n,v)=0$ whereas ${\mathcal J}_{\rho^* \mathcal{F},\rho^* \mathcal{G}}$ is given by $nu^{n-1}J(u^n,v)=0$. Let us see that $\rho^{-1} {\mathcal J}_{{\mathcal F},\mathcal{G}}$ satisfies the statements of Theorem~\ref{th-multiplicidad-jac} with respect to $\rho^{-1} Z$. Let $\pi_{\widetilde{Z}}: \widetilde{X} \to ({\mathbb C}^2,0)$ be the minimal reduction of singularities of $\widetilde{Z}$. We denote by $\widetilde{E}$ any irreducible component of $\pi_{\widetilde{Z}}^{-1}(0)$ and by $\pi_{\widetilde{E}} :\widetilde{X}_{\tilde{E}} \to ({\mathbb C}^2,0)$ the morphism reduction of $\pi_{\widetilde{Z}}$ to $\widetilde{E}$. Let us state some properties concerning the infinitely near points of $\widetilde{\mathcal J}_{\mathcal{F},\mathcal{G}}$ and ${\mathcal J}_{\rho^* \mathcal{F},\rho^* \mathcal{G}}$: \begin{Lemma} Let $\widetilde{E}$ be an irreducible component of $\pi_{\widetilde{Z}}^{-1}(0)$ such that $\widetilde{E}$ is a non-collinear divisor. We have that $$ \pi_{\widetilde{E}}^* \widetilde{\mathcal J}_{{\mathcal F},{\mathcal G}} \cap \widetilde{E}_{red}^* = \pi_{\widetilde{E}}^* {\mathcal J}_{\rho^* \mathcal{F},\rho^* \mathcal{G}} \cap \widetilde{E}_{red}^*, $$ where $\widetilde{E}_{red}^*$ denote the points in the first chart of $\widetilde{E}_{red}$. Moreover, $m_P ( \pi_{\widetilde{E}}^* \widetilde{\mathcal J}_{{\mathcal F},{\mathcal G}}) = m_P( \pi_{\widetilde{E}}^* {\mathcal J}_{\rho^* \mathcal{F},\rho^* \mathcal{G}})$ for each $P \in \pi_{\widetilde{E}}^* \widetilde{\mathcal J}_{{\mathcal F},{\mathcal G}} \cap \widetilde{E}_{red}^*$. \end{Lemma} \begin{proof} Take $\widetilde{E}$ an irreducible component of $\pi_{\widetilde{Z}}^{-1}(0)$ with $v(\widetilde{E})=p$ and assume that $(u,v)$ are coordinates adapted to $\widetilde{E}$. If we denote $\widetilde{J}(u,v)=J(u^n,v)$, we have that $${\rm In}_p (nu^{n-1} \widetilde{J};u,v)=nu^{n-1} {\rm In}_p (\widetilde{J};u,v).$$ Let us denote $\widetilde{J}_I(u,v)={\rm In}_p (\widetilde{J};u,v)$. Hence, if $(u_p,v_p)$ are coordinates in the first chart of $\widetilde{E}_{red} \subset \widetilde{X}_{\widetilde{E}}$ such that $\pi_{\widetilde{E}} (u_p,v_p)=(u_p,u_p^p v_p)$ and $\widetilde{E}_{red}=(u_p=0)$, then the points $\pi_{\widetilde{E}}^* \widetilde{\mathcal J}_{{\mathcal F},{\mathcal G}} \cap \widetilde{E}_{red}$, in the first chart of $\widetilde{E}_{red}$, are given by $u_p=0$ and $\widetilde{J}_I(1,v_p)=0$. This proves that $ \pi_{\widetilde{E}}^* \widetilde{\mathcal J}_{{\mathcal F},{\mathcal G}} \cap \widetilde{E}_{red}^* = \pi_{\widetilde{E}}^* {\mathcal J}_{\rho^* \mathcal{F},\rho^* \mathcal{G}} \cap \widetilde{E}_{red}^* $ and that $m_P ( \pi_{\widetilde{E}}^* \widetilde{\mathcal J}_{{\mathcal F},{\mathcal G}}) = m_P( \pi_{\widetilde{E}}^* {\mathcal J}_{\rho^* \mathcal{F},\rho^* \mathcal{G}})$ for each $P \in \pi_{\widetilde{E}}^* \widetilde{\mathcal J}_{{\mathcal F},{\mathcal G}} \cap \widetilde{E}_{red}^*$. \end{proof} \begin{Corollary}\label{cor:mult-jac-ram} Take $\widetilde{E}$ an irreducible component of $\pi^{-1}_{\widetilde{Z}}(0)$ which is a non-collinear divisor for the foliations $\rho^* {\mathcal F}$ and $\rho^* {\mathcal G}$. Given any $P \in \widetilde{E}_{red}^*$, we have that $$ m_P(\pi_{\widetilde{E}}^*\widetilde{\mathcal J}_{\mathcal{F},\mathcal{G}})= m_P(\pi_{\widetilde{E}}^* \widetilde{C}) + m_P(\pi_{\widetilde{E}}^*\widetilde{D}) + \tau_{\widetilde{E}}(P). $$ In particular, if $P \in \widetilde{E}_{red}^*$ with $m_P(\pi_{\widetilde{E}}^*{\widetilde{\mathcal J}}_{\mathcal{F},\mathcal{G}})>0$, then $P \in C(\widetilde{E}) \cup N(\widetilde{E}) \cup M(\widetilde{E})$. \end{Corollary} Let $E$ be a bifurcation divisor of $G(Z)$ and consider $\widetilde{E}_l, \widetilde{E}_{k}$ two bifurcation divisors of $G(\widetilde{Z})$ associated to $E$. Recall that there is a bijection between the sets of points $\pi_{\widetilde{E}^l}^* \widetilde{Z} \cap \widetilde{E}^l_{red}$ and $\pi_{\widetilde{E}^k}^* \widetilde{Z} \cap \widetilde{E}^k_{red}$ given by the map $\rho_{l,k}: \widetilde{E}^l_{red} \to \widetilde{E}^k_{red}$ (see Appendix~\ref{ap:ramificacion}). Thus we will denote $\{R_1^{\widetilde{E}^l}, R_2^{\widetilde{E}^l}, \cdots, R_{b_{\widetilde{E}^l}}^{\widetilde{E}^l}\}$ and $\{R_1^{\widetilde{E}^k}, R_2^{\widetilde{E}^k}, \cdots, R_{b_{\widetilde{E}^k}}^{\widetilde{E}^k}\}$ the sets of points $\pi_{\widetilde{E}^l}^* \widetilde{Z} \cap \widetilde{E}^l_{red}$ and $\pi_{\widetilde{E}^k}^* \widetilde{Z} \cap \widetilde{E}^k_{red}$ respectively, with $R_t^{\widetilde{E}^k}= \rho_{l,k}(R_t^{\widetilde{E}^l})$ for $t=1,2,\ldots, b_{\widetilde{E}^k}$. By the results in section~\ref{sec:logarithmic} (see equation~\eqref{eq:indices-ramificados}), we get that \begin{align*} I_{R_t^{\widetilde{E}^l}}(\pi_{\widetilde{E}^l}^* \rho^*{\mathcal F},\widetilde{E}^l_{red}) & = I_{R_t^{\widetilde{E}^k}}(\pi_{\widetilde{E}^k}^* \rho^*{\mathcal F},\widetilde{E}^k_{red}) \\ I_{R_t^{\widetilde{E}^l}}(\pi_{\widetilde{E}^l}^* \rho^*{\mathcal G},\widetilde{E}^l_{red}) & = I_{R_t^{\widetilde{E}^k}}(\pi_{\widetilde{E}^k}^* \rho^*{\mathcal G},\widetilde{E}^k_{red}) \end{align*} which implies $$ \Delta_{\widetilde{E}^l}(R_t^{\widetilde{E}^l})=\Delta_{\widetilde{E}^k}(R_t^{\widetilde{E}^k}) \quad \text{ for } \quad t=1,2,\ldots, b_{\widetilde{E}^l}, $$ with $\Delta_{\widetilde{E}^l}(R_t^{\widetilde{E}^l})=\Delta_{\widetilde{E}^l}^{\rho^* \mathcal{F},\rho^*{\mathcal G}}(R_t^{\widetilde{E}^l})$. Thus, $\widetilde{E}^l$ is collinear (resp. non-collinear) if and only if $\widetilde{E}^k$ is also collinear (resp. non-collinear). So we can introduce the following definition \begin{Definition} We say that a bifurcation divisor $E$ of $G(Z)$ is {\em collinear (resp. non-collinear)\/} for the foliations $\mathcal F$ and $\mathcal G$ when any of its associated divisors $\widetilde{E}^l$ is collinear (resp. non-collinear) for the foliations $\rho^{\ast} {\mathcal F}$ and $\rho^{\ast} {\mathcal G}$. \end{Definition} Moreover, if $R_t^{\widetilde{E}^l}, R_s^{\widetilde{E}^l}$ are two points $\pi_{\widetilde{E}^l}^* \widetilde{Z} \cap \widetilde{E}^l_{red}$ with $\rho_{\widetilde{E}^l,E}(R_t^{\widetilde{E}^l}) =\rho_{\widetilde{E}^l,E}(R_s^{\widetilde{E}^l})$ where $\rho_{\widetilde{E}^l,E}: \widetilde{E}^l_{red} \to E_{red}$ is the ramification defined in Appendix~\ref{ap:ramificacion}, then $$ \Delta_{\widetilde{E}^l}(R_t^{\widetilde{E}^l})=\Delta_{\widetilde{E}^k}(R_s^{\widetilde{E}^l}) $$ by equation~\eqref{eq:indices-ramificados-mismo-divisor} in section~\ref{sec:logarithmic}. Thus, we say that an infinitely near point $R^E$ of $Z$ in $E_{red}$ is a {\em collinear point} (resp. {\em non-collinear point}) for the foliations $\mathcal F$ and $\mathcal G$ if for any associated divisor $\widetilde{E}^l$ and any infinitely near point $R_t^{\widetilde{E}^l}$ of $\rho^{-1} Z$ in $\widetilde{E}^l_{red}$ with $\rho_{\widetilde{E}^l,E}(R_t^{\widetilde{E}^l}) =R^E$, the point $R_t^{\widetilde{E}^l}$ is collinear (resp. non-collinear) for the foliations $\rho^* {\mathcal F}$ and $\rho^*{\mathcal G}$. Given a bifurcation divisor $E$ of $G(Z)$, we denote by $C(E)$ the set of collinear points of $E$ and $N(E)$ the set of non-collinear points of $E$. Corollary~\ref{cor:mult-jac-ram} and the results in section~\ref{sec:jacobian} allow to give a decomposition of ${\mathcal J}_{\mathcal{F},\mathcal{G}}$. By Theorem~\ref{th:descomposicion-no-sing}, we have a decomposition $$ \widetilde{\mathcal J}_{\mathcal{F},\mathcal{G}} = \widetilde{J}^* \cup (\cup_{\widetilde{E} \in B_{N}(\widetilde{Z})} J^{\widetilde{E}}) $$ with $J^{\widetilde{E}}=J^{\widetilde{E}}_{nc} \cup J^{\widetilde{E}}_{c}$. Given a non-collinear bifurcation divisor $E$ of $G(Z)$, we define $J^E=J_{nc}^E \cup J_c^E$ to be such that $$ \rho^{-1}{J^E_{nc}}=\bigcup_{l=1}^{\underline{n}_E} J^{\widetilde{E}^l}_{nc}; \qquad \rho^{-1}{J^E_{c}}=\bigcup_{l=1}^{\underline{n}_E} J^{\widetilde{E}^l}_{c} $$ where $\{\widetilde{E}^l\}_{l=1}^{\underline{n}_E}$ are the divisors of $G(\widetilde{Z})$ associated to $E$ and $J^*$ to be such that $\rho^{-1} J^* = \widetilde{J}^*$. Hence, we can state the main result of this paper \begin{Theorem}\label{th:desc-general} If $B_N(Z)$ is the set of non-collinear bifurcation divisors of $G(Z)$, there is a decomposition $$ {\mathcal J}_{\mathcal{F},\mathcal{G}} = J^* \cup (\cup_{E \in B_{N}(Z)} J^{E}) $$ with $J^E=J^E_{nc} \cup J^E_c$ such that \begin{itemize} \item[(i)] $m_0(J^E_{nc}) \leq \left\{ \begin{array}{ll} \underline{n}_E n_E (b_E-1), & \hbox{if $E$ does not belong to a dead arc;} \\ \underline{n}_E n_E (b_E-1) - \underline{n}_E, & \hbox{otherwise.} \end{array} \right. $ \item[(ii)] For each irreducible component $\delta$ of $J_{nc}^E$ we have that \begin{itemize} \item ${\mathcal C}(\delta,Z_i)=v(E)$ if $E$ belongs to the geodesic of $Z_i$; \item ${\mathcal C}(\delta,Z_j)={\mathcal C}(Z_i,Z_j)$ if $E$ belongs to the geodesic of $Z_i$ but not to the one of $Z_j$. \end{itemize} \item[(iii)] For each irreducible component $\delta$ of $J_{c}^E$, there exists an irreducible component $Z_i$ of $Z$ such that $E$ belongs to its geodesic and $${\mathcal C}(\delta,Z_i)>v(E).$$ Moreover, if $E'$ is the first non-collinear bifurcation divisor in the geodesic of $Z_i$ after $E$, then $${\mathcal C}(\delta,Z_i)<v(E').$$ \end{itemize} \end{Theorem} \section{Jacobian of two curves} \label{sec:curvas} In \cite{Kuo-P-2002,Kuo-P-2004}, T.-C. Kuo and A. Parusi\'{n}ki consider the Jacobian $f_x g_y-f_y g_x=0$ of a pair of germs of holomorphic functions $f, g$ without common branches and give properties of its Puiseux series which they called {\em polar roots\/} of the Jacobian. They define a tree-model, noted $T(f,g)$, which represents the Puiseux series of the curves $C=(f=0)$ and $D=(g=0)$ and the contact orders among these series. The tree-model $T(f,g)$ is constructed as follows: it starts with an horizontal bar $B_*$ called {\em ground bar\/} and a vertical segment on $B_*$ called the {\em main trunk} of the tree. This trunk is marked with $[p,q]$ where $p=m_0(C)$ and $q=m_0(D)$. Let $\{y_i^C(x)\}_{i=1}^{m_0(C)}$ and $\{y_i^D(x)\}_{i=1}^{m_0(D)}$ be the Puiseux series of $C$ and $D$ respectively, and denote $\{z_j(x)\}_{j=1}^{N}$ the set $\{y_i^C(x)\}_{i=1}^{m_0(C)} \cup \{y_i^D(x)\}_{i=1}^{m_0(D)}$ with $N=m_0(C)+m_0(D)$. If $h_0=\min \{ \text{ord}_x(z_i(x)-z_j(x)) \ : \ 1 \leq i, j \leq N\}$, a bar $B_0$ is drawn on top of the main trunk with $h(B_0)=h_0$ being the {\em height} of $B_0$. The Puiseux series $\{z_j(x)\}$ are divided into equivalence classes (mod $B_0$) by the following relation: $z_j(x) \sim_{B_0} z_k(x)$ if $\text{ord}_x(z_j(x)-z_k(x))> h_0$. Each equivalence class is represented by a vertical line, called {\em trunk}, drawn on the top of $B_0$. Each trunk is marked by a {\em bimultiplicity} $[s,t]$ where $s$ (resp. $t$) denote the number of Puiseux series of $C$ (resp. of $D$) in the equivalence class. The same construction is repeated recursively on each trunk. The construction finishes with trunks which have bimultiplicity $[1,0]$ or $[0,1]$ representing each Puiseux series of the curve $Z=C \cup D$. Let us now consider the curve $\widetilde{Z}=\rho^{-1}Z$ where $\rho:({\mathbb C}^2,0) \to ({\mathbb C}^2,0)$ is any $Z$-ramification given by $\rho(u,v)=(u^n,v)$ (see Appendix~\ref{ap:ramificacion}). Since the branches of $\widetilde{Z}$ are in bijection with the Puiseux series of $Z$ and the valuations of the bifurcation divisors of $G(\widetilde{Z})$ represent the contact orders among these series, then the tree model above $T(f,g)$ can be recovered from the dual graph of $G(\widetilde{Z})$: there is a bijection between the set of bars of $T(f,g)$ which are not the ground bar and the bifurcation divisors $B(\widetilde{Z})$ of $G(\widetilde{Z})$. For instance, the first bar $B_0$ corresponds to the first bifurcation divisor $\widetilde{E}_1$ of $G(\widetilde{Z})$ and $h(B_0)=\frac{v(\widetilde{E}_1)}{n}$. The number of trunks on $B_0$ is equal to $b_{\widetilde{E}_1}$, that is, each trunk on $B_0$ correspond to an infinitely near point of $\widetilde{Z}$ on $\widetilde{E}_{1,red}$. In particular, given a trunk with bimultiplicity $[s,t]$ corresponding to a point $R_{i}^{\widetilde{E}_1}$, then $s=m_{R_i^{\widetilde{E}_1}} (\pi_{\widetilde{E}_1}^* C)$ and $t=m_{R_i^{\widetilde{E}_1}} (\pi_{\widetilde{E}_1}^* D)$. We shall illustrate with an example the relationship between $T(f,g)$ and $G(\widetilde{Z})$. The following example corresponds to the Example 1.1 in \cite{Kuo-P-2004}. \begin{Example} Take positive integers $d,f$ with $d < f$ and non-zero constants $A,B$. Consider \begin{align*} f(x,y) & =(y+x) (y-x^{d+1}+Ax^{f+1}) (y+x^{d+1}+Bx^{f+1}) \\ g(x,y) & =(y+x) (y-x^{d+1}-Ax^{f+1}) (y+x^{d+1}-Bx^{f+1}) \\ \end{align*} and put $C=(f=0)$ and $D=(g=0)$. Since $Z=C \cup D$ has only non-singular irreducible components, we do not need to consider a ramification. The dual graph $G(Z)$ is given by \begin{center} \begin{texdraw} \arrowheadtype t:F \arrowheadsize l:0.08 w:0.04 \drawdim mm \setgray 0 \move(10 20) \fcir f:0 r:0.8 \avec (17 15) \move (10 20) \avec (17 25) \move (10 20) \rlvec (7 0) \fcir f:0 r:0.8 \lpatt(1 1) \rlvec (10 0) \fcir f:0 r:0.8 \lpatt () \rlvec (7 0) \fcir f:0 r:0.8 \rlvec (10 5) \fcir f:0 r:0.8 \rlvec (7 0) \fcir f:0 r:0.8 \lpatt(1 1) \rlvec (10 0) \fcir f:0 r:0.8 \lpatt () \rlvec (7 0) \fcir f:0 r:0.8 \avec (75 30) \move(68 25) \avec (75 22) \move (34 20) \rlvec (10 -5) \fcir f:0 r:0.8 \lpatt () \fcir f:0 r:0.8 \rlvec (7 0) \fcir f:0 r:0.8 \lpatt(1 1) \rlvec (10 0) \lpatt() \fcir f:0 r:0.8 \rlvec (7 0) \fcir f:0 r:0.8 \avec (75 18) \move(68 15) \avec (75 12) \move(8 15) \htext{\tiny{$E_1$}} \move(31 15) \htext{\tiny{$E_{d+1}$}} \move(64 28) \htext{\tiny{$E_{f+1}$}} \move(64 10) \htext{\tiny{$E_{f+1}'$}} \move (16 26) \htext{\tiny{$C_1$}} \move (16 12) \htext{\tiny{$D_1$}} \move (76 28) \htext{\tiny{$C_2$}} \move (76 21) \htext{\tiny{$D_2$}} \move (76 16) \htext{\tiny{$C_3$}} \move (76 11) \htext{\tiny{$D_3$}} \move (35 5) \htext{$G(Z)$} \end{texdraw} \end{center} while the tree-model is given by \vspace{\baselineskip} \begin{center} \begin{texdraw} \arrowheadtype t:F \arrowheadsize l:0.08 w:0.04 \drawdim mm \setgray 0 \move (40 20) \rlvec (20 0) \move (50 20) \rlvec (0 7) \move (10 27) \rlvec (80 0) \rlvec (0 7) \move (10 27) \rlvec (0 7) \move (50 27) \rlvec (0 7) \move (30 34) \rlvec (40 0) \rlvec (0 7) \move (30 34) \rlvec (0 7) \move (18 41) \rlvec (24 0) \rlvec (0 7) \move (18 41) \rlvec (0 7) \move (58 41) \rlvec (24 0) \rlvec (0 7) \move (58 41) \rlvec (0 7) \move (50 16) \htext{\tiny{$B_*$}} \move (52 22) \htext{\tiny{$[3,3]$}} \move (40 28) \htext{\tiny{$B_0$}} \move (51 29) \htext{\tiny{$[2,2]$}} \move (11 29) \htext{\tiny{$[1,0]$}} \move (83 29) \htext{\tiny{$[0,1]$}} \move (50 35) \htext{\tiny{$B_1$}} \move (31 36) \htext{\tiny{$[1,1]$}} \move (71 36) \htext{\tiny{$[1,1]$}} \move (32 42) \htext{\tiny{$B_3$}} \move (11 42) \htext{\tiny{$[1,0]$}} \move (43 42) \htext{\tiny{$[0,1]$}} \move (71 42) \htext{\tiny{$B_2$}} \move (59 42) \htext{\tiny{$[1,0]$}} \move (83 42) \htext{\tiny{$[0,1]$}} \move (6 33) \htext{\tiny{$C_1$}} \move (91 33) \htext{\tiny{$D_1$}} \move (13 48) \htext{\tiny{$C_2$}} \move (43 48) \htext{\tiny{$D_2$}} \move (54 48) \htext{\tiny{$C_3$}} \move (83 48) \htext{\tiny{$D_3$}} \end{texdraw} \end{center} where we have indicated the branches of $C$ and $D$ corresponding to the terminal trunks. Thus, the bijection among the bars in $T(f,g)$ and the bifurcation divisors in $G(Z)$ is given by $$ B_0 \longleftrightarrow E_1; \qquad B_1 \longleftrightarrow E_{d+1}; \qquad B_2 \longleftrightarrow E'_{f+1}; \qquad B_3 \longleftrightarrow E_{f+1} $$ with $h(B_0)=v(E_1)=1$, $h(B_1)=v(E_{d+1})=d+1$, $h(B_2)=h(B_3)=v(E_{f+1})=v(E_{f+1}')=f+1$. \end{Example} Let us show that the notion of collinear point and collinear divisor given in section~\ref{sec:jacobian} correspond to the ones given in \cite{Kuo-P-2002,Kuo-P-2004} thanks to the bijections explained above. Let $B$ be a bar of $T(f,g)$ and consider a Puiseux series $z_k(x)$ of $Z$ which goes through $B$, this means, that $$ z_k(x)= z_B(x) + c x^{h(B)} + \cdots $$ where $z_B(x)$ depends only on the bar $B$ and $c$ is uniquely determined by $z_k(x)$. If $T$ is a trunk which contains $z_k(x)$, then it is said that the trunk $T$ {\em grows on} $B$ {\em at} $c$. Let $\widetilde{E}$ be the bifurcation divisor of $G(\widetilde{Z})$ corresponding to $B$ and consider $$ v_k(u)=z_k(u^n)= z_B(u^n) + c u^{nh(B)} + \cdots $$ Note that the curve given by $v-v_k(u)=0$ is a branch of $\widetilde{Z}$ such that $\widetilde{E}$ belongs to its geodesic. This curve determines a unique point $R$ in $\widetilde{E}_{red}$; in this way we can establish the bijection among the trunks on $B$ and the infinitely near points of $\widetilde{Z}$ on $\widetilde{E}_{red}$. Let now $B$ be a bar of $T(f,g)$ that corresponds to a bifurcation divisor $\widetilde{E}$ of $G(\widetilde{Z})$ and $T_k$, $1\leq k \leq b_{\widetilde{E}}$, be the set of trunks on $B$ with bimultiplicity $[p_k,q_k]$ where the trunk $T_i$ grows on $B$ at $c_i$. Let us denote $\{R_1^{\widetilde{E}}, \ldots, R_{b_{\widetilde{E}}}^{\widetilde{E}}\}$ the set of infinitely near points of $\widetilde{Z}$ in $\widetilde{E}_{red}$ with $R_i^{\widetilde{E}}$ corresponding to the trunk $T_i$. In \cite{Kuo-P-2004}, the authors define $$\Delta_{B}(c_k)=\left| \begin{array}{cc} \nu_f(B) & p_k \\ \nu_g(B) & q_k \end{array} \right|, \qquad 1 \leq k \leq b_{\widetilde{E}}$$ where $\nu_f(B)=\text{ord}_x(f(x,z_B(x)+cx^{h(B)}))$ for $c \in {\mathbb C}$ generic (resp. $\nu_g(B)$), and the {\em rational function associated to} $B$ as $$ {\mathcal M}_B(z)= \sum_{k=1}^{b_{\widetilde{E}}} \frac{\Delta_B(c_k)}{z-c_k}. $$ Note that, if $E$ is the bifurcation divisor of $G(Z)$ such that $\widetilde{E}$ is associated to $E$, then the curve given by $y=z_B(x)+cx^{h(B)}$ is an $E$-curvette. Thus, taking into account Proposition 2.5.3 of \cite{Cas-00} for instance, we get that $$ \nu_f(B)= \frac{(C,\gamma_E)_0}{m(E)} $$ with $\gamma_E$ any $E$-curvette. Moreover, we can compute $\nu_f(B)$ as follows: \begin{align*} \nu_f(B)&=\sum_{i=1}^{m_0(C)}\text{ord}_x (y_i^C(x)-(z_B(x)+cx^{h(B)})) \\ & = \frac{1}{n} \sum_{i=1}^{m_0(C)} \text{ord}_u (y_i^C(u^n)-(z_B(u^n)+cu^{nh(B)})) \\ & = \frac{1}{n} \sum_{i=1}^{m_0(C)} (\gamma_i^C, \gamma_{\widetilde{E}})_0 \end{align*} where $\gamma_i^C$ is the curve given by $v-y_i^C(u^n)=0$ and $\gamma_{\widetilde{E}}$ is an $\widetilde{E}$-curvette. Note that we can compute the intersection multiplicity $(\gamma_i^C,\gamma_{\widetilde{E}})_0=\sum_{\widetilde{E}' \leq \widetilde{E}} \varepsilon_{\widetilde{E}'}^{\gamma_i^C}$ where the sum runs over all the divisors $\widetilde{E}'$ in $G(\widetilde{C})$ in the geodesic of $\widetilde{E}$ and $\varepsilon_{\widetilde{E}'}^{\gamma_i^C}=1$ if the geodesic of $\gamma_i^C$ contains the divisor $\widetilde{E}'$ and $\varepsilon_{\widetilde{E}'}^{\gamma_i^C}=0$ otherwise. Thus, with the notations given in section~\ref{sec:logarithmic}, we have that $$\nu_f(B)=\frac{1}{n} \kappa_{\widetilde{E}}({\mathcal L}^{\widetilde{C}}) $$ where ${\mathcal L}^{\widetilde{C}}={\mathcal G}_{\tilde{f}}$ is the logarithmic foliation in ${\mathbb G}_{\widetilde{C}}$ with $\lambda=(1,1,\ldots,1)$, that is, the hamiltonian foliation defined by $d \tilde{f}=0$ with $\tilde{f}(u,v)=f(u^n,v)$. Moreover, $$ p_k=m_{R_k^{\widetilde{E}}}(\pi_{\widetilde{E}}^* \widetilde{C}), \qquad k=1,\ldots, b_{\widetilde{E}} $$ and thus $$ I_{R_k^{\widetilde{E}}}(\pi_{\widetilde{E}}^*{\mathcal L}^{\widetilde{C}},\widetilde{E}_{red})= - \frac{p_k}{n \nu_f(B)}, \qquad k=1,\ldots, b_{\widetilde{E}}. $$ Consequently, with the notations introduced in section~\ref{sec:jacobian}, we have that $$\Delta_B(c_k) = -\frac{1}{n} \Delta_{\widetilde{E}}(R_k^{\widetilde{E}})$$ and $$ {\mathcal M}_{\widetilde{E}}(z) = - n {\mathcal M}_B(z). $$ Thus the notions of collinear divisor and collinear point given in section~\ref{sec:jacobian} correspond to the ones given in \cite{Kuo-P-2004} for bars and points on them. Theorem~\ref{th-multiplicidad-jac} implies Theorem T and Corollary 2.4 in \cite{Kuo-P-2004}, Corollary~\ref{cor:consecutive-divisors} implies Corollary 2.6 in \cite{Kuo-P-2004} and Theorem~\ref{th:colinear-point} implies Theorem C in \cite{Kuo-P-2004}. \section{Approximate roots}\label{sec:aprox-roots} The notion of approximated root was introduced by Abhyankar and Moh in \cite{Abh-M} where they proved the following result: \begin{Proposition} Let $A$ be an integral domain and $P(y) \in A[y]$ be a monic polynomial of degree $d$. If $p$ is invertible in $A$ and $p$ divides $d$, then there exists a unique monic polynomial $Q(y) \in A[y]$ such that the degree of $P-Q^p$ is less than $d-d/p$. \end{Proposition} The unique polynomial $Q$ given by the previous proposition is called the {\em $p$-th approximated root\/} of $P$. Let us consider $f(x,y) \in {\mathbb C}\{x\}[y]$ an irreducible Weierstrass polynomial with characteristic exponents $\{\beta_0,\beta_1,\ldots,\beta_g\}$ and denote $e_k=\gcd(\beta_0,\beta_1,\ldots, \beta_k)$ for $k=1,\ldots, g$. Thus $e_k$ divides $\beta_0=deg_y f$. We will denote $f^{(k)}$ the $e_k$-approximate root of $f$ and we call them the {\em characteristic approximate roots\/} of $f$. Next result (Theorem 7.1 in \cite{Abh-M}) gives the main properties of the characteristic approximated roots of $f$ (see also \cite{Gwo-P-1995,Pop-2003}): \begin{Proposition}\label{prop:char-root} Let $f(x,y) \in {\mathbb C}\{x\}[y]$ be an irreducible Weierstrass polynomial with characteristic exponents $\{\beta_0,\beta_1,\ldots,\beta_g\}$. Then the characteristic approximate roots $f^{(k)}$ for $k=0,1,\ldots, g-1$ verify: \begin{itemize} \item[(1)] The degree in $y$ of $f^{(k)}$ is equal to $\beta_0/e_k$ and ${\mathcal C}(f,f^{(k)})=\beta_{k+1}/\beta_0$. \item[(2)] The polynomial $f^{(k)}$ is irreducible with characteristic exponents \linebreak $\{\beta_0/e_k,\beta_1/e_k,\ldots, \beta_k/e_k\}$. \end{itemize} \end{Proposition} In \cite{Gar-G}, E. García Barroso and J. Gwo\'{z}dziewicz studied the jacobian curve of $f$ and $f^{(k)}$ and they give a result concerning its factorization (see Theorem 1 of \cite{Gar-G}). In this section, we will prove that this result of factorization can be obtained as a consequence of Theorem~\ref{th:desc-general}. \begin{Remark} In \cite{Pop-2003}, P. Popescu-Pampu proved that all polynomials in ${\mathbb C}\{x\}[y]$ satisfying condition (1) in the Proposition above also verify condition (2). Hence, given an irreducible Weierstrass polynomial $f(x,y) \in {\mathbb C}\{x\}[y]$ with characteristic exponents $\{\beta_0,\beta_1,\ldots, \beta_g\}$, we can consider the monic polynomials in ${\mathbb C}\{x\}[y]$ satisfying condition (1) above which are called {\em $k$-semiroots\/} of $f$ (see Definition 6.4 in \cite{Pop-2003}). Since we only need the properties of characteristic approximate roots given in Proposition~\ref{prop:char-root}, in the rest of the section, we will denote by $f^{(k)}$ a $k$-semiroot of $f$, $0 \leq k \leq g-1$. \end{Remark} Let $C$ be the curve defined by $f=0$ and denote $C^{(k)}$ the curve given by $f^{(k)}=0$ with $0 \leq k \leq g-1$. Consider ${\mathcal F} \in {\mathbb G}_{C}$ and ${\mathcal F}^{(k)} \in {\mathbb G}_{C^{(k)}}$. Note that the minimal reduction of singularities $\pi_C: X_C \to ({\mathbb C}^2,0)$ of the curve $C$ gives also a reduction of singularities of $C \cup C^{(k)}$. There are $g$ bifurcation divisors in $G(C)$. The set of bifurcation divisors of $G(C)$ will be denote by $\{E_1,\ldots, E_g\}$ with $v(E_i)=\frac{\beta_i}{\beta_0}$. Remark that the dual graph $G(C \cup C^{(k)})$ is given by (see \cite{Pop-2003} for instance): \vspace*{0.5\baselineskip} \begin{center} \begin{texdraw} \arrowheadtype t:F \arrowheadsize l:0.08 w:0.04 \drawdim mm \setgray 0 \move(15 20) \fcir f:0 r:0.8 \lpatt(1 1) \rlvec (10 0) \fcir f:0 r:0.8 \lpatt( ) \rlvec (0 -4) \fcir f:0 r:0.8 \lpatt(1 1) \rlvec (0 -4) \fcir f:0 r:0.8 \move(25 20) \fcir f:0 r:0.8 \rlvec (10 0) \fcir f:0 r:0.8 \lpatt( ) \rlvec (0 -4) \fcir f:0 r:0.8 \lpatt(1 1) \rlvec (0 -4) \fcir f:0 r:0.8 \lpatt( ) \rlvec (0 -4) \fcir f:0 r:0.8 \move(35 20) \fcir f:0 r:0.8 \lpatt(1 1) \rlvec (15 0) \fcir f:0 r:0.8 \lpatt() \rlvec (0 -4) \fcir f:0 r:0.8 \lpatt(1 1) \rlvec (0 -5) \fcir f:0 r:0.8 \move(50 20) \fcir f:0 r:0.8 \rlvec (15 0) \fcir f:0 r:0.8 \lpatt() \rlvec (0 -4) \fcir f:0 r:0.8 \lpatt(1 1) \rlvec (0 -5) \fcir f:0 r:0.8 \lpatt( ) \move(50 11) \avec (55 7) \htext{\tiny$C^{(k)}$} \move(65 20) \avec(70 24) \move (70 21) \htext{\tiny$C$} \move (24 22) \htext{\tiny$E_1$} \move (34 22) \htext{\tiny{$E_2$}} \move (49 22) \htext{\tiny{$E_{k+1}$}} \move (63 22) \htext{\tiny{$E_{g}$}} \end{texdraw} \end{center} Thus the sets of bifurcation divisors of $G(C)$ and $G(C \cup C^{(k)})$ coincide. All bifurcation divisors of $G(C \cup C^{(k)})$ are Puiseux divisors for $C$ while only $E_1, \ldots, E_k$ are Puiseux divisors for $C^{(k)}$. Then we have \begin{Lemma}\label{lema:colinear-irreducible} The set of non-collinear bifurcation divisors of $G(C \cup C^{(k)})$ for the foliations $\mathcal F$ and ${\mathcal F}^{(k)}$ is $\{E_{k+1}, \ldots, E_g\}.$ \end{Lemma} \begin{proof} Let $\{(m_1,n_1), \ldots, (m_g,n_g)\}$ be the Puiseux pairs of $C$, then we remind that $\beta_0=m_0(C)= n_1 \cdots n_g$, $e_k=n_{k+1} \cdots n_g$ and $\beta_k/\beta_0=m_k/n_1 \cdots n_k$ for $k=1,\ldots, g$. Given a bifurcation divisor $E_l$ of $G(C \cup C^{(k)})$, we have that $n_{E_l}=n_l$, $\underline{n}_{E_l}=n_1 \cdots n_{l-1}=\beta_0/e_{l-1}$ and $m(E_l)=\underline{n}_{E_l}n_E = n_1 \cdots n_l$. Consider now the ramification $\rho:({\mathbb C}^2,0) \to ({\mathbb C}^2,0) $ given by $\rho(u,v)=(u^n,v)$ with $n=\beta_0$ and denote $\widetilde{C}=\rho^{-1}C$, $\widetilde{C}^{(k)}=\rho^{-1} C^{(k)}$. Take a bifurcation divisor $E_l$ and let $\{\widetilde{E}_l^t\}_{t=1}^{\underline{n}_{E_l}}$ be the set of bifurcation divisors of $G(\widetilde{C}\cup \widetilde{C}^{(k)})$ associated to $E_l$. In the case $l < k+1$, we have that $\pi_{\widetilde{E}_l^t}^* \widetilde{C} \cap \widetilde{E}_{l,red}^t=\pi_{\widetilde{E}_l^t}^* \widetilde{C}^{(k)} \cap \widetilde{E}_{l,red}^t$ with $b_{\widetilde{E}_l^t}=n_l$ in $G(\widetilde{C} \cup \widetilde{C}^{(k)})$. Let us denote $\pi_{\widetilde{E}_l^t}^* \widetilde{C} \cap \widetilde{E}_{l,red}^t=\{R_1^{\widetilde{E}_l^t}, \ldots, R_{b_{\widetilde{E}_l^t}}^{\widetilde{E}_l^t}\}$. Using the equations given in section~\ref{sec:logarithmic}, the computation of the Camacho-Sad indices for the foliations $\rho^* {\mathcal F}$ and $\rho^* {\mathcal F}^{(k)}$ gives \begin{align} I_{R_s^{\widetilde{E}_l^t}}(\pi_{\widetilde{E}_l^t}^* \rho^* {\mathcal F}, \widetilde{E}_{l,red}^t) & =- \frac{n_{l+1} \cdots n_g}{\sum_{s=1}^{n} \sum_{\widetilde{E} \leq \widetilde{E}_{l}^t } \varepsilon_{\widetilde{E}}^{\sigma_s}} \label{eq:indice-C} \\ I_{R_s^{\widetilde{E}_l^t}}(\pi_{\widetilde{E}_l^t}^* \rho^* {\mathcal F^{(k)}}, \widetilde{E}_{l,red}^t) & =- \frac{n_{l+1} \cdots n_k}{\sum_{s=1}^{n_1 \cdots n_k} \sum_{\widetilde{E} \leq \widetilde{E}_{l}^t } \varepsilon_{\widetilde{E}}^{\sigma_s^{(k)}}} \notag \end{align} where $\widetilde{C}=\cup_{s=1}^n \sigma_s$ and $\widetilde{C}^{(k)}= \cup_{s=1}^{n_1 \cdots n_k} \sigma_s^{(k)}$. Hence, taking into account the results of Appendix~\ref{ap:ramificacion}, we have $$I_{R_s^{\widetilde{E}_l^t}}(\pi_{\widetilde{E}_l^t}^* \rho^* {\mathcal F}, \widetilde{E}_{l,red}^t) =I_{R_s^{\widetilde{E}_l^t}}(\pi_{\widetilde{E}_l^t}^* \rho^* {\mathcal F^{(k)}}, \widetilde{E}_{l,red}^t), \qquad s=1, \ldots, b_{\widetilde{E}_l^t}$$ and consequently, $\Delta_{\widetilde{E}_l^t}(R_s^{\widetilde{E}_l^t}) =0$, $s=1, \ldots, b_{\widetilde{E}_l^t}$, for the foliations $\rho^* {\mathcal F}$ and $\rho^* {\mathcal F}^{(k)}$. This proves that the bifurcation divisors $E_l$ of $G(C \cup C^{(k)})$ with $l < k+1$ are collinear for ${\mathcal F}$ and ${\mathcal F}^{(k)}$. Consider now the bifurcation divisor $E_{k+1}$ of $G(C \cup C^{(k)})$ and let $\{\widetilde{E}_{k+1}^t\}_{t=1}^{\underline{n}_{E_{k+1}}}$ be the set of bifurcation divisors of $G(\widetilde{C}\cup \widetilde{C}^{(k)})$ associated to $E_{k+1}$. Although the curve $\pi_{E_{k+1}}^* C^{(k)}$ does not intersect $E_{k+1,red}$, the curve $\pi_{\widetilde{E}_{k+1}^t}^* \widetilde{C}^{(k)}$ intersects $\widetilde{E}_{k+1,red}^t$ in one point for each $t=1,\ldots, \underline{n}_{E_{k+1}}$ which is different from the $n_{k+1}$ points where $\pi_{\widetilde{E}_{k+1}^t}^* \widetilde{C}$ intersects $\widetilde{E}_{k+1,red}^t$. Note that $b_{E_{k+1}}=2$ in $G(C \cup C^{(k)})$ and, by equation~\eqref{eq:b-tilde}, $b_{\widetilde{E}_{k+1}^t}=n_{k+1}+1$ in $G(\widetilde{C} \cup \widetilde{C}^{(k)})$. Let $\{R_1^{\widetilde{E}_{k+1}^t}, \ldots, R_{b_{\widetilde{E}_{k+1}^t}}^{\widetilde{E}_{k+1}^t}\}$ be the set of points $(\pi_{\widetilde{E}_{k+1}^t}^* \widetilde{C} \cap \widetilde{E}_{k+1,red}^t) \cup (\pi_{\widetilde{E}_{k+1}^t}^* \widetilde{C}^{(k)} \cap \widetilde{E}_{k+1,red}^t)$ with $R_{b_{\widetilde{E}_{k+1}^t}}^{\widetilde{E}_{k+1}^t}=\pi_{\widetilde{E}_{k+1}^t}^* \widetilde{C}^{(k)} \cap \widetilde{E}_{k+1,red}^t$. Thus, we have that \begin{align*} I_{R_s^{\widetilde{E}_{k+1}^t}}(\pi_{\widetilde{E}_{k+1}^t}^* \rho^* {\mathcal F}, \widetilde{E}_{k+1,red}^t) & =- \frac{n_{k+2} \cdots n_g}{\sum_{s=1}^{n} \sum_{\widetilde{E} \leq \widetilde{E}_{k+1}^t } \varepsilon_{\widetilde{E}}^{\sigma_s}} & \text{ for } s=1,\ldots, b_{\widetilde{E}_{k+1}^t}-1 \\ I_{R_{b_{\widetilde{E}_{k+1}^t}}^{\widetilde{E}_{k+1}^t}}(\pi_{\widetilde{E}_{k+1}^t}^* \rho^* {\mathcal F}, \widetilde{E}_{k+1,red}^t) & = 0 &\\ I_{R_s^{\widetilde{E}_{k+1}^t}}(\pi_{\widetilde{E}_{k+1}^t}^* \rho^* {\mathcal F}^{(k)}, \widetilde{E}_{k+1,red}^t) & = 0 & \text{ for } s=1,\ldots, b_{\widetilde{E}_{k+1}^t}-1 \\ I_{R_{b_{\widetilde{E}_{k+1}^t}}^{\widetilde{E}_{k+1}^t}}(\pi_{\widetilde{E}_{k+1}^t}^* \rho^* {\mathcal F^{(k)}}, \widetilde{E}_{k+1,red}^t) & =- \frac{1}{\sum_{s=1}^{n_1 \cdots n_k} \sum_{\widetilde{E} \leq \widetilde{E}_{k+1}^t } \varepsilon_{\widetilde{E}}^{\sigma_s^{(k)}}} & \end{align*} This implies that $\Delta_{\widetilde{E}_{k+1}^t}(R_s^{\widetilde{E}_{k+1}^t}) \neq 0$, $s=1,\ldots, b_{\widetilde{E}_{k+1}^t}$, for the foliations $\rho^* {\mathcal F}$ and $\rho^* {\mathcal F}^{(k)}$, and consequently $E_{k+1}$ is a non-collinear divisor for $\mathcal F$ and ${\mathcal F}^{(k)}$. However, we have that \begin{equation}\label{eq:Delta-E-k+1} \sum_{s=1}^{b_{\widetilde{E}_{k+1}^t}} \Delta_{\widetilde{E}_{k+1}^t}(R_s^{\widetilde{E}_{k+1}^t}) = 0. \end{equation} In fact, the divisor $\widetilde{E}_{k+1}^t$ arises from one of the divisors $\widetilde{E}_{k}^r$ at one of the points $R_t^{\widetilde{E}_{k}^r}$ of the set $\pi_{\widetilde{E}_k^r}^* \widetilde{C} \cap \widetilde{E}_{k,red}^r$. Since $\widetilde{E}_{k}^r$ is a collinear divisor, then $R_t^{\widetilde{E}_{k}^r}$ is a collinear point and equation~\eqref{eq:Delta-E-k+1} follows from Corollary~\ref{cor:colinear}. Consider now a bifurcation divisor $E_l$ of $G(C \cup C^{(k)})$ with $l > k+1$. In this case, we have that the curve $\pi_{E_l}^* C^{(k)}$ does not intersect $E_{l,red}$ , the curve $\pi_{\widetilde{E}_{l}^t}^* \widetilde{C}^{(k)}$ does not intersect $\widetilde{E}_{l,red}^t$ and $b_{\widetilde{E}_{l}^t}=n_{l}$ in $G(\widetilde{C} \cup \widetilde{C}^{(k)})$ (see equation~\eqref{eq:b-tilde}). Let us denote $\{R_1^{\widetilde{E}_l^t}, \ldots, R_{b_{\widetilde{E}_l^t}}^{\widetilde{E}_l^t}\}$ the set of points $\pi_{\widetilde{E}_{l}^t}^* \widetilde{C} \cap \widetilde{E}_{l,red}^t = \pi_{\widetilde{E}_{l}^t}^* (\widetilde{C} \cup \widetilde{C}^{(k)}) \cap \widetilde{E}_{l,red}^t$. With the notations above, for $s \in \{1,\ldots, b_{\widetilde{E}_l^t}\}$, we have that $I_{R_s^{\widetilde{E}_l^t}}(\pi_{\widetilde{E}_l^t}^* \rho^* {\mathcal F}, \widetilde{E}_{l,red}^t)$ is given by equation \eqref{eq:indice-C} while $I_{R_s^{\widetilde{E}_l^t}}(\pi_{\widetilde{E}_l^t}^* \rho^* {\mathcal F^{(k)}}, \widetilde{E}_{l,red}^t)=0$ since the points $R_s^{\widetilde{E}_l^t}$ are non-singular points for $\rho^*{\mathcal F}^{(k)}$. This implies $\Delta_{\widetilde{E}_l^t}(R_s^{\widetilde{E}_l^t}) \neq 0$, $1 \leq s \leq b_{\widetilde{E}_l^t}$, and hence $E_l$ is a non-collinear divisor for the foliations $\rho^* {\mathcal F}$ and $\rho^* {\mathcal F}^{(k)}$. Moreover, we have that $$ \sum_{s=1}^{b_{\widetilde{E}_{l}^t}} \Delta_{\widetilde{E}_{l}^t}(R_s^{\widetilde{E}_{l}^t}) = - \sum_{s=1}^{b_{\widetilde{E}_{l}^t}} I_{R_s^{\widetilde{E}_l^t}}(\pi_{\widetilde{E}_l^t}^* \rho^* {\mathcal F}, \widetilde{E}_{l,red}^t) = 1 + I_Q(\pi_{\widetilde{E}_l^t}^* \rho^* {\mathcal F}, \widetilde{E}_{l,red}^t) $$ where $Q$ is the only singular point of $\pi_{\widetilde{E}_l^t}^* \rho^* {\mathcal F}$ in $\widetilde{E}_l^t$ different from the points $R_s^{\widetilde{E}_l^t}$. By Proposition 4.4 in \cite{Cor-2003}, we know that $I_Q(\pi_{\widetilde{E}_l^t}^* \rho^* {\mathcal F}, \widetilde{E}_{l,red}^t) \neq -1$ and hence $$ \sum_{s=1}^{b_{\widetilde{E}_{l}^t}} \Delta_{\widetilde{E}_{l}^t}(R_s^{\widetilde{E}_{l}^t}) \neq 0. $$ \end{proof} Thus, by Theorem~\ref{th:desc-general} there is a decomposition $${\mathcal J}_{\mathcal{F},{\mathcal F}^{(k)}}= J^* \cup \left( \bigcup_{i=k+1}^g J^{i} \right)$$ where $J^i=J^{E_i}_{nc}$, such that \begin{itemize} \item[(i)] $m_0(J^{k+1}) < n_1 \cdots n_{k+1}$. \item[(ii)] $m_0(J^i)= n_1 \cdots n_{i-1} (n_{i} -1)$ for $k+2 \leq i \leq g$. \item[(iii)] if $\gamma$ is a branch of $J^i$, $k+1 \leq i \leq g$, we have that ${\mathcal C}(\gamma,C)=\frac{\beta_i}{\beta_0}$. \item[(iv)] if $\gamma$ is a branch of $J^*$, then ${\mathcal C}(\gamma,C)< \frac{\beta_{k+1}}{\beta_0}$. \end{itemize} Let us prove that $J^{k+1}= \emptyset$. From section~\ref{sec:caso-general} we have that $\rho^{-1} J^{k+1}= \bigcup_{t=1}^{n_1 \cdots n_{k}} J_{nc}^{\widetilde{E}^t_{k+1}}$ with the notations of the proof of Lemma~\ref{lema:colinear-irreducible}. Let us compute ${\mathcal M}_{\widetilde{E}^t_{k+1}}(z)$ for any $t \in \{1,\ldots, n_1 \cdots n_k\}$. To simplify notations, let us denote $\tilde{b}=b_{\widetilde{E}^t_{k+1}}=n_{k+1}+1$, $\widetilde{R}_s= R_s^{\widetilde{E}^t_{k+1}}$ and $\Delta (\widetilde{R}_l) =\Delta_{\widetilde{E}^t_{k+1}}(\widetilde{R}_l)$. Thus, we have that $$ {\mathcal M}_{\widetilde{E}^t_{k+1}}(z) = \sum_{s=1}^{\tilde{b}-1}\frac{\Delta (\widetilde{R}_s)}{z-\xi^s} + \frac{\Delta (\widetilde{R}_{\tilde{b}})}{z} $$ where $\xi$ is a primitive $n_{k+1}$-root of a value $a=a^{\widetilde{E}^t_{k+1}}$ determined by the Puiseux parametrizations of $C$. From the proof of Lemma~\ref{lema:colinear-irreducible}, we obtain that $\Delta(\widetilde{R}_s)=\Delta(\widetilde{R}_t)$ for any $s,t \in \{1,\ldots, \tilde{b}-1\}$. Thus, taking into account equation~\eqref{eq:Delta-E-k+1}, we get that \begin{align*} {\mathcal M}_{\widetilde{E}^t_{k+1}}(z) & = \Delta (\widetilde{R}_1)\frac{\sum_{s=1}^{\tilde{b}-1} \prod_{t=1 \atop t \neq s}^{n_{k+1}}(z-\xi^t)}{z^{n_{k+1}}-a} + \frac{\Delta (\widetilde{R}_{\tilde{b}})}{z} \\ & = \Delta(\widetilde{R}_1) \frac{n_{k+1} z^{n_{k+1} -1}}{z^{n_{k+1}}-a} + \frac{\Delta (\widetilde{R}_{\tilde{b}})}{z} \\ &= \frac{(\sum_{s=1}^{\tilde{b}} \Delta(\widetilde{R}_s)) z^{n_{k+1}} - a \Delta(\widetilde{R}_{\tilde{b}})}{z(z^{n_{k+1}}-a)} \\ &= \frac{ - a \Delta(\widetilde{R}_{\tilde{b}})}{z(z^{n_{k+1}}-a)} \end{align*} where $a \Delta(\widetilde{R}_{\tilde{b}}) \neq 0$. Hence, $J_{nc}^{\widetilde{E}^t_{k+1}}=\emptyset$ for all $t=1, \ldots,n_1 \cdots n_{k}$ and consequently $J^{k+1}=\emptyset$. \begin{Corollary}\label{Cor-raiz-aprox} Let $C$ be an irreducible curve and $C^{(k)}$ the curve given by the $k$-characteristic approximate root (or by a $k$-semiroot) with $0 \leq k \leq g-1$. Consider ${\mathcal F} \in {\mathbb G}_{C}$ and ${\mathcal F}^{(k)} \in {\mathbb G}_{C^{(k)}}$. Thus, the Jacobian curve ${\mathcal J}_{\mathcal{F},{\mathcal F}^{(k)}}$ has a decomposition $${\mathcal J}_{\mathcal{F},{\mathcal F}^{(k)}}= J^* \cup \left( \bigcup_{i=k+2}^g J^{i} \right)$$ such that \begin{itemize} \item[(1)] $m_0(J^i)= n_1 \cdots n_{i-1} (n_{i} -1)$ for $k+2 \leq i \leq g$. \item[(2)] if $\gamma$ is a branch of $J^i$, $k+2 \leq i \leq g$, we have that ${\mathcal C}(\gamma,C)=\frac{\beta_i}{\beta_0}$. \item[(3)] if $\gamma$ is a branch of $J^*$, then ${\mathcal C}(\gamma,C)< \frac{\beta_{k+1}}{\beta_0}$. \end{itemize} \end{Corollary} In particular, the result above implies the result of E. García Barroso and J. Gwo\'{z}dziewicz (Theorem 1 in \cite{Gar-G}) concerning the jacobian of a plane curve and its characteristic approximated roots. Moreover, in \cite{Sar}, it is considered the jacobian curve ${\mathcal J}_{{\mathcal F},{\mathcal G}^{(k)}}$ of a foliation $\mathcal F$ with an irreducible separatrix $f=0$ and the hamiltonian foliation ${\mathcal G}^{(k)}$ defined by $df^{(k)}=0$ with $f^{(k)}$ a characteristic approximated root of $f$. Corollary \ref{Cor-raiz-aprox} also implies the main result of N. E. Saravia in \cite{Sar} (Theorem 3.4.1) concerning factorization of ${\mathcal J}_{{\mathcal F},{\mathcal G}^{(k)}}$ . \begin{Remark} Note that $E_1$ is always a collinear divisor for the foliations $\mathcal F$ and $\mathcal{F}^{(k)}$ and hence the multiplicity of ${\mathcal J}_{\mathcal{F},\mathcal{F}^{(k)}}$ can be greater than $\nu_0(\mathcal{F}) + \nu_0(\mathcal{F}^{(k)})=m_0(C)+m_0(C^{(k)})-2$ as showed in the examples given in \cite{Gar-G} or \cite{Sar}. \end{Remark} \section{Polar curves of foliations}\label{sec:polars} Given a germ of foliation $\mathcal F$ in $({\mathbb C}^2,0)$, a polar curve of $\mathcal F$ corresponds to the Jacobian curve of $\mathcal F$ and a non-singular foliation $\mathcal G$. If we are interested in the topological properties of a generic polar curve of $\mathcal F$, it is enough to consider a generic curve ${\mathcal P}_{[a:b]}^\mathcal{F}$ in the family of curves given by $$\omega \wedge (a dy - b dx) =0$$ where $\omega=0$ is a 1-form defining $\mathcal F$ and $[a:b] \in {\mathbb P}^1_{\mathbb C}$ (see \cite{Cor-2003} section 2). When $\mathcal F$ is a hamiltonian foliation given by $df=0$ we recover the notion of polar curve of a plane curve. As we mention in the introduction, polar curves play an important role in the study of singularities of plane curves and also of foliations. There is a result, known as ``decomposition theorem'', which describes the minimal topological properties of the generic polar curve of a plane curve $C$ in terms of the topological type of the curve $C$ (see \cite{Mer} for the case of $C$ irreducible; \cite{Gar} for $C$ with several branches). In the case of foliations, the decomposition theorem also holds for the generic polar curve of a generalized curve foliation $\mathcal F$ with an irreducible separatrix (see \cite{Rou}). In the general case of a generalized curve foliation $\mathcal F$ whose curve of separatrices is not irreducible, the decomposition theorem for its generic polar curve only holds under some conditions on the foliation $\mathcal F$ (see \cite{Cor-2003}). Let us see that all these results can be recovered from the results in this paper. In particular, we show that we can prove Theorems 5.1 and 6.1 in \cite{Cor-2003} which give the decomposition theorem for the polar curve of a generalized curve foliation $\mathcal F$ and hence we get all the other results concerning decompositions theorems. Let $\mathcal F$ be a generalized curve foliation in $({\mathbb C}^2,0)$ with $C$ as curve of separatrices and denote by $\mathcal{P}^\mathcal{F}$ a generic polar curve of $\mathcal F$. We can assume that $\mathcal{P}^\mathcal{F}={\mathcal J}_{\mathcal{F},\mathcal{G}}$ where $\mathcal{G}$ is a non-singular foliation. Note that the curve of separatrices $D$ of $\mathcal G$ is an non-singular irreducible plane curve. Let us assume first that $C$ has only non-singular irreducible components, all of them different from $D$, and take the notations of section \ref{sec:jacobian}. Thus the minimal reduction of singularities $\pi_C: X_C \to ({\mathbb C}^2,0)$ is also the minimal reduction of singularities of $Z=C \cup D$. Note that the dual graph $G(Z)$ is obtained from $G(C)$ adding an arrow to the first divisor $E_1$ which represents the curve $D$. Hence, if we denote $b_E^Z$, $b_E^C$ the number associated to a divisor $E$ in $G(Z)$ or $G(C)$ respectively, as defined in section \ref{Apendice:grafo-dual}, then $b_{E_1}^Z=b_{E_1}^C+1$ and $b_{E}^Z=b_{E}^C$ otherwise. Consider $E$ an irreducible component of the exceptional divisor $\pi_C^{-1}(0)$. If $E=E_1$ is the divisor which appears after the blow-up of the origin, then $\pi_{E_1}^* D \cap E_{1,red}=\{Q\}$ and $Q \not \in \pi_{E_1}^* C \cap E_{1,red}$. Thus, for $R \in E_{1,red}$ we have that $$\Delta_{E_{1}}^{\mathcal{F},\mathcal{G}} (R) = \left\{ \begin{array}{ll} I_{Q} (\pi_E^*\mathcal{G},E_{1,red}), & \hbox{ if } R=Q \\ -I_{R} (\pi_E^*\mathcal{F},E_{1,red}), & \hbox{ otherwise.} \end{array} \right. $$ with $I_{Q} (\pi_E^*\mathcal{G},E_{1,red})=-1$. If $E \neq E_1$, then $\pi^{*}_E Z \cap E_{red}= \pi^*_E C \cap E_{red}$ and then $\Delta_E^{\mathcal{F},\mathcal{G}} (R)=-I_{R} (\pi_E^*\mathcal{F},E_{red})$ for any $R \in E_{red}$. With the hypothesis above and the notations of section \ref{sec:non-collinear}, we have that \begin{Lemma} The following conditions are equivalent: \begin{itemize} \item[(i)] There is no corner in $\pi^{-1}_C(0)$ such that $\pi_C^* \mathcal{F}$ has Camacho-Sad index equal to $-1$. \item[(ii)] All the components of the exceptional divisor $\pi^{-1}_C(0)$ are purely non-collinear. \end{itemize} \end{Lemma} \begin{proof} Assume that (i) holds and that there is a component $E$ of the exceptional divisor which is not purely non-collinear, that is, there is a singular point $R \in E_{red}$ of $\pi_E^* \mathcal{F}$ with $I_{R} (\pi_E^*\mathcal{F},E_{red})=0$. Then $R$ is not a simple singularity for $\pi_E^*\mathcal{F}$ and hence, if $\sigma: X_{E'} \to X_E$ is the blow-up with center in $R$, and we denote by $\tilde{E}_{red}$ the strict transform of $E_{red}$ by $\sigma$, then we have that $I_{\tilde{R}} (\pi_{\tilde{E}}^*\mathcal{F},\tilde{E}_{red})=-1$ where $\tilde{R}=E'_{red} \cap \tilde{E}_{red}$. Thus we get a corner in $\pi_C^{-1}(0)$ with Camacho-Sad index equal to $-1$. Conversely, assume now that all the components of the exceptional divisor $\pi^{-1}_C(0)$ are purely non-collinear and there is a corner $\tilde{R} = E_{k-1} \cap E_{k}$ with $I_{\tilde{R}} (\pi_{C}^*\mathcal{F},E_{k-1})=-1$. Consider the morphism $\pi_{E_{k-1}}: X_{E_{k-1}} \to (\mathbb{C}^2,0)$ and take the point $R \in E_{k-1,red}$ that we have to blow-up to obtain the divisor $E_{k}$. Thus, by the properties of the Camacho-Sad, we have that $I_{R} (\pi_{E_{k-1,red}}^*\mathcal{F},E_{k-1,red})=0$ but this contradicts that $E_{k-1}$ is purely non-collinear. \end{proof} In particular, let us see that Theorem 6.1 in \cite{Cor-2003} is consequence of Theorem \ref{th-multiplicidad-jac}. Assume that the logarithmic model of $\mathcal F$ is non resonant, this implies condition (i) in the lemma above (by Proposition 4.4 in \cite{Cor-2003}) and hence all the divisors in $G(Z)$ are non-collinear. Note that $E_1$ is always a bifurcation divisor in $G(Z)$ and we have that $\sum_{R \in E_1} \Delta_{E_1}(R)=0$ by Remark \ref{rmk:suma-delta}. If we write $\pi_{E}^* C \cap E_{1,red}= \{R_1^{E_1},\ldots, R_{b_E^C}^{E_1}\}$ and $\pi_{E}^* D \cap E_{1,red} = \{Q\}$ with $R_{l}^{E_1}=(0,c_l^{E_1})$, $l=1,\ldots, b_{E_1}^C$, and $Q=(0,d)$ in coordinates in the first chart of $E_{1,red}$, then the set of zeros of ${\mathcal M}_{E_1}(z)$ are given by the roots of the polynomial $$\prod_{j =1}^{b_{E_1}^C} (z-c_j^{E_1}) + (z-d) \sum_{l =1}^{b_{E_1}^C} I_{R_l^{E_1}}(\pi_{E_1}^* \mathcal{F},E_{1,red}) \prod_{j \neq l} (z -c_{j}^{E_1}) $$ which has multiplicity equal to $b_{E_1}^C-1$ provided that $$\sum_{j =1}^{b_{E_1}^C} c_j^{E_1} + d \sum_{l =1}^{b_{E_1}^C} I_{R_l^{E_1}}(\pi_{E_1}^* \mathcal{F},E_{1,red}) \neq 0.$$ Note that we can assume that this condition holds since we are consider a generic polar curve. Consider a component $E$ of the exceptional divisor $\pi_{C}^{-1}(0)$. We have that $N(E)=\pi_{E}^* C \cap E_{red}$ if $E \neq E_1$ and $N(E_1)=\pi_{E_1}^* C \cap E_{1,red} \cup \pi_{E_1}^* D \cap E_{1,red}$. Given a point $P$ in $\pi_{E}^* C \cap E_{red}$, by Theorem \ref{th-multiplicidad-jac}, we have that $$m_P( \pi_E^* {\mathcal P}^\mathcal{F})=m_P(\pi_E^* C)-1$$ and hence we have Theorem 6.1 in \cite{Cor-2003}. If we take the point $Q$ given by $\pi_{E}^* D \cap E_{1,red}$ we have that $m_Q( \pi_E^* {\mathcal P}^\mathcal{F})=m_Q(\pi_E^* D)-1=0$. Thus, by Theorem \ref{th:descomposicion-no-sing} we obtain that ${\mathcal P}^\mathcal{F}=\cup_{E \in B(C)} J^E$ with the following properties \begin{itemize} \item[(1)] $m_0(J^E)=b_E^C-1$ \item[(2)] $\pi_E^*J^E \cap \pi_E^* C=\emptyset$ \item[(3)] if $E' < E$, then $\pi_E^* J^E \cap \pi_E'(E')=\emptyset$ \item[(4)] if $E' > E$, then $\pi_{E'}^* J^E \cap E_{red}'=\emptyset$ \end{itemize} which in particular implies the decomposition of the generic polar curve given in Corollary 6.2 of \cite{Cor-2003} for $C$ with non-irreducible components. Thus the decomposition in the general case (Theorem 5.1 in \cite{Cor-2003}) follows from Theorem \ref{th:desc-general}.
\section{Introduction} Time series forecasting is one of the challenging research problems in financial domain. However, majority of transfer learning researches for time series focus on single-source transfer learning, meaning that only a single source dataset is used for training the models. However, when compared to image and text datasets used in training deep learning models for Computer Version (CV) and Natural Language Processing (NLP) applications, a single time series data (e.g. historical price data of a listed company from stock markets) is relatively small (short). In these situations, training process could result in overfitting models. In order to alleviate this problem, we investigate multi-source transfer learning models for forecasting financial time series in this paper. One of the key factors in adopting multiple data sources for transfer learning is motivated by the fact that the future price of a stock could be influenced by the historical prices of stocks within the same industry/sector. For example, the future price trend of Hongkong and Shanghai Banking Corporation (HSBC) could be correlated to the prices of other banks in Hong Kong and Asia Pacific region. In this paper, we aim to exploit this correlation property for generating better deep learning models. In addition, in the context of time series forecasting, the features of time series and the calculation of similarity between two time series are inherently different from CV and Natural Language Processing applications. Besides, in transfer learning for time series forecasting, existing algorithms rarely exploit the similarity between two time series. Against this background, in this paper, we propose two ensemble methods for multi-source transfer learning. They are both parameter-based transfer learning methods~\cite{karl2016survey}. The proposed ensemble methods combine multiple models, each of which is pre-trained by a different source dataset and fine-tuned by the same target dataset. In the first ensemble method called Weighted Average Ensemble for Transfer Learning (WAETL), weights are calculated based on the similarity between source and target time series datasets. In WAETL, models with poor performance are assigned with smaller weights than good performance models. Extensive experiments are also conducted to investigate the effect of distance functions on the transferred models. The second method called Tree-structured Parzen Estimator Ensemble Selection (TPEES) is based on Tree-structured Parzen Estimator (TPE) optimization. In this approach, we treat the process of selecting models from transfer learning model pool as an optimization problem. WAETL use all models in model pool, but some models in model pool may not be selected by TPEES. The contributions of this paper can be summarized as follows: \begin{itemize} \item Two novel ensemble based multi-source transfer learning methods called WAETL and TPEES are proposed for financial time series forecasting. The proposed approaches aim to alleviate the problem of insufficient training data when forecasting stock prices in financial markets. \item Extensive analysis are also performed to investigate the effect of different distance functions to calculate the similarity of time series. Experiment results shows that WD and Coral achieve best results when they are applied with WAETL method. \end{itemize} The rest of the paper is structured as follows. In section 2, we review existing work on multi-source transfer learning for financial time series forecasting. In section 3, we describe our proposed methods. In section 4, we present our experiment results. Finally, we conclude the paper with future work in section 5. \section{Background and Related Work} In~\cite{Ding}, Ding et al. combined the neural tensor network and deep CNN to predict the short--term and long--term influences of events on stock price movements. A deep learning framework based on long-short term memory (LSTM) was also proposed by Bao et al.~\cite{bao2017deep} for time series forecasting. However, when the available data is insufficient for training, the performance of deep learning model can be poorer than traditional statistical methods~\cite{Makridakis}. Besides, training a deep learning model can be time-consuming and expensive. In order to alleviate the above-mentioned problems, transfer learning has been combined with deep learning in~\cite{Yosinski}. Recently, transfer learning was adopted for analyzing time series data. Fawaz et al.~\cite{Fawaz} investigate how to transfer deep CNNs for Time Series Classification (TSC) tasks. Laptev et al. \cite{Laptev} also propose a new loss function and an architecture for time series transfer learning. Ye et al.~\cite{Ye} propose a novel transfer learning framework for time series forecasting. In these approaches, one source dataset is used for pre-training and one target dataset is used for fine-tuning, called single-source transfer learning. In this paper, we use single-source transfer learning as a baseline method. Multi-task learning (MTL) is a parameter based multi-source transfer learning method, which is successfully used in CV and NLP. The goal of MTL is to improve the performance of each individual task by leveraging useful information between multiple related learning tasks \cite{Huang}. In~\cite{hu2016transfer}, MTL is used to forecast short-term wind speed. In this paper, we adopt a model similar to MTL approach in which both all source and target datasets are used for training and target dataset is used to fine-tune the MTL model in the final step. Therefore, the MTL model shares all the hidden layers except the output layer. Christodoulidis et al.~\cite{christodoulidis2016multisource} transfers knowledge from multiple source datasets to a target model with ensemble method called forward ensemble selection (FES) to classify lung pattern. In their approach, CNN is used for classification. First, Christodoulidis et al. utilize improving ensemble selection procedure to select fine-tuned CNN models from model pool. Next, a simple average combination method is used to build an ensemble model. In this paper, we proposed two new ensemble methods for multi-source transfer learning to build a strong ensembled model. In addition, we adopt FES as a baseline method for comparison. However, in order to forecast time series, we replace CNN with LSTM and Multilayer Perceptrons (MLP). \section{Methods} Multi-source transfer learning with ensemble relaxed the assumption of MTL. When some of the models pre-trained by the source datasets and fine-tuned by the target dataset have a negative effect on the target model, multi-source transfer learning with ensemble can mitigate the impact of these models on the target model. Meanwhile, Multi-source transfer learning with ensemble focus on improving the performance of target task with multi-source datasets. Therefore, in this paper, we propose two ensemble methods for multi-source transfer learning namely Weighted Average Ensemble for Transfer Learning (WAETL) and Tree-structured Parzen Estimator Ensemble Selection (TPEES). Model pool contains fine-tuned models which have been pre-trained by source datasets and fine-tuned by the target dataset. We use above ensemble methods to combine the output of each model from the model pool. To evaluate their effectiveness, these two methods are compared with Average Ensemble (AE) and Forward Ensemble Selection (FES) methods in the experiments. \subsection{Weighted Average Ensemble for Transfer Learning (WAETL)} Averaging ensemble (AE) is one of the most common ensemble methods~\cite{tyagi2014survey}. The aggregated output of target model is averaged by the output of each model from model pool. Simple averaging avoids overfitting and creates smoother ensemble model. Therefore, AE is used as baseline method in this paper. However, not all models from model pool have same influence on the target model. Hence, Weighted Averaging Ensemble (WAE) based on Average Ensemble (AE) is proposed in~\cite{Touretzky1997Learning}. In this paper, we further extend WAE for multi-source transfer learning. Unlike AE, where each fine-tuned model has the same weight, the proposed WAETL can increase the importance of one or more fine-tuned models. Rosenstein et al. \cite{Rosenstein} empirically showed that if the source and target datasets are dissimilar, then brute-force transfer may negatively effect the performance of the target dataset. Such effect is also labeled as negative transfer by \cite{Rosenstein}. Mignone et al.~\cite{mignone2019exploiting} compute a weight for each instance according to their similarity with clusters in source and target datasets, which is quite recognized. This method is instance-based transfer learning approach and focus on single source transfer learning. However, WAETL is parameter-based transfer learning approach and compute a weight for each source dataset according to their similarity with the target dataset. In WAETL, we use different distance functions including CORrelation ALignment (CORAL) loss \cite{sun2016return}, Wasserstein Distance (WD) \cite{Ruschendorf1985Wasserstein}, Dynamic Time Warping (DTW) \cite{Berndt1994Dynamic}, Pearson Correlation Coefficient (PCC) \cite{benesty2009pearson} to calculate the similarity between each source and target domain. The similarity value $D(s_i, t)$ calculated by above distance functions can be used as weight $w_i$ in WAETL through a function $f(D(s_i, t))$. The larger the weight $w_i$, the more influence the corresponding $i^{th}$ model has on the target model. The output ($out$) of target model can be formulated as Equation \ref{equation: waetl1} and \ref{equation: waetl2}. \begin{equation}\small w_i = f(D(s_i, t)), \label{equation: waetl1} \end{equation} \begin{equation}\small out = \sum\limits_{i=1}^{n} w_i * out_i, \quad \text{where} \sum\limits_{i=1}^{n} w_i = 1 \label{equation: waetl2} \end{equation} where $out_i$ is output of the $i^{th}$ model in the model pool and $n$ is the size of model pool. $s_i$ is the $i^{th}$ source dataset and $t$ is the target dataset. \subsection{Tree-structured Parzen Estimator Ensemble Selection (TPEES)} In~\cite{christodoulidis2016multisource}, forward ensemble selection (FES) was used to select fine-tuned Convolution Neural Network (CNN) models from model pool. However, FES is primarily designed to select models from thousands of models in~\cite{caruana2004ensemble}. Moreover, models with poor performance may not be selected by FES from the model pool. In such cases, it is likely to cause overfitting. To alleviate this problem, in this paper, we apply Tree-structured Parzen Estimator (TPE) to ensemble selection for multi-source transfer learning. The process of proposed Tree-structured Parzen Estimator Ensemble Selection (TPEES) is shown in Figure \ref{fig:tpees}. TPE is widely used in hyper-parameter optimization~\cite{Bergstra}. \begin{figure}[!htbp] \centering \includegraphics[width=0.4\textwidth]{pic/ES.pdf}\\ \caption{Tree-structured Parzen Estimator Ensemble Selection} \label{fig:tpees} \end{figure} In Figure \ref{fig:tpees}, we use each source dataset to pre-train deep learning models. Next, the pre-trained models are fine-tuned by the target dataset. These fine-tuned models are then stored in the model pool. Afterwards, we adopt TPE algorithm in ensemble selection. We define a configuration space by setting a parameter ($\lambda^{(i)}$) for each model in model pool. In each selection iteration, TPE returns the candidate parameters $\lambda = \left\{\lambda^{(i)}\right\}_{i=1}^{n}$ with the highest Expected Improvement ($EI$). The $E I_{y^{*}}(\lambda)$ is formulated as Equation \ref{equation: tpe1} and \ref{equation: tpe2}. \begin{equation}\small p(\lambda | y)=\left\{\begin{array}{ll}{\ell(\lambda)} & {\text { if } y<y^{*}} \\ {g(\lambda)} & {\text { if } y \geq y^{*}}\end{array}\right. , \label{equation: tpe1} \end{equation} where $\ell(\lambda)$ is the density formed by using the parameters $\lambda^{(i)}$ so that the corresponding loss $y^i$ is less than $y^*$, and $g(\lambda)$ is the density formed by using the remaining parameters. $y^*$ is selected to be r-quantile of the observed $y$. By construction, $\gamma=p\left(y<y^{*}\right)$. Therefore, \begin{equation}\small \begin{aligned} E I_{y^{*}}(\lambda) &=\frac{\gamma y^{*} \ell(\lambda)-\ell(\lambda) \int_{-\infty}^{y^{*}} p(y) d y}{\gamma \ell(\lambda)+(1-\gamma) g(\lambda)} \\ & \propto\left(\gamma+\frac{g(\lambda)}{\ell(\lambda)}(1-\gamma)\right)^{-1} , \end{aligned} \label{equation: tpe2} \end{equation} Finally, the average of ensembled model is calculated based on the output of selected models from the model pool. When $\lambda^{(i)}$ is equal to zero, the $i^{th}$ model is not selected. $out_i$ is output of the $i^{th}$ model in the model pool. The output ($out$) of ensembled model can be formulated as Equation \ref{equation: tpees}. \begin{equation}\small out = (\lambda^{(1)}out_1 + \dots + \lambda^{(n)}out_n) / (\lambda^{(1)}+\dots+\lambda^{(n)}) . \label{equation: tpees} \end{equation} \section{Experiments} During the experiments, the proposed architecture was implemented using open source deep learning library Keras \cite{Keras} with the Tensorflow \cite{Tensorflow} back-end. The experiments were executed on Icosa Core Intel(R) Xeon (R) E5-2670 CPU @ 2.50 GHz. In order to focus on the transfer learning aspect and minimize the model's architecture and parameters involved, the same LSTM architecture used in~\cite{Roondiwala} was adopted for the experiments. The LSTM architecture is composed of a sequential input layer followed by two LSTM layers. The LSTM layers have 128 and 64 units with Tanh activation. A dense layer contains 16 units with ReLU activation and then finally a output layer with linear activation function. Besides, a Multi Layer Perceptron (MLP) model was designed based on the architecture of LSTM. The architectures of MLP and LSTM are shown in Figure \ref{fig:mlp} and \ref{fig:lstm}. Both LSTM and MLP are used in all experiments in this paper. We trained LSTM and MLP model using 22 days (trading days in majority of the stock markets are from Monday to Friday) for the look-back and 1 day for the forecast horizon. Although we only predict one time point in our experiments, our methods can be extended to predict multiple time points~\cite{corizzo2019dencast} \cite{cheng2006multistep}. Deep learning models in the proposed approach can be trained using $x$ days for the look-back and $y$ days for the forecast horizon. \begin{figure}[h] \centering \subfigure[MLP] { \begin{minipage}{0.2\textwidth} \centering \includegraphics[scale=0.5]{pic/MLP.pdf} \label{fig:mlp} \end{minipage} } \subfigure[LSTM] { \begin{minipage}{0.2\textwidth} \centering \includegraphics[scale=0.5]{pic/LSTM.pdf} \label{fig:lstm} \end{minipage} } \caption{MLP and LSTM architectures} \label{fig:architectures} \end{figure} In this paper, existing forecasting methods are compared against the proposed methods. These methods can be divided into 4 categories. Except the first category WTL, all categories are based on transfer learning model. \begin{enumerate} \item Without Transfer Learning (WTL): Training models without transfer learning including Autoregressive Integrated Moving Average (ARIMA), Support Vector Regression (SVR), Multilayer Perceptron (MLP) and Long Short-Term Memory (LSTM). \item Single Best (SB): We use one source dataset to pre-train MLP and LSTM and one target dataset to fine-tune MLP and LSTM. Among the multi-source datasets, we record the best single-source transfer results in MLP and LSTM. \item Multi-source MLP (MSM): We use multi-source datasets to pre-train MLP and one target dataset to fine-tune MLP. This category includes Multi-task Learning (MTL), Average Ensemble (AE), Weighted Average Ensemble for Transfer Learning (WAETL), Forward Ensemble Selection (FES), and Tree-structured Parzen Estimator Ensemble Selection (TPEES). \item Multi-source LSTM (MSL): We use multi-source datasets to pre-train LSTM and one target dataset to fine-tune LSTM. This category includes Multi-task Learning (MTL), Average Ensemble (AE), Weighted Average Ensemble for Transfer Learning (WAETL), Forward Ensemble Selection (FES), and Tree-structured Parzen Estimator Ensemble Selection (TPEES). \end{enumerate} \noindent \paragraph{Training without Transfer Learning:} For training without transfer learning, we use Bayesian optimization to select hyper-parameters of LSTM and MLP model and use gird search to choose hyper-parameters of ARIMA and SVR. For LSTM and MLP, we search hyper-parameters including the number of epochs ($E$), learning rate ($\alpha$), the size of mini-batch ($B$) and optimizer ($O$) within the ranges of [100-2000], [0-0.001], [16, 64, 128, 256, 512, 1024] and [Adam, SGD, RMSProp], respectively. Adaptive Moment Estimation (Adam), Stochastic Gradient Descent (SGD), RMSprop are gradient descent optimization algorithms. The loss function used in the experiment is Mean Square Error (MSE). \noindent \paragraph{Training with Transfer Learning:} For training with transfer learning, we use the LSTM and MLP architecture of Roondiwala et al.~\cite{Roondiwala} for forecasting. The hyper-parameters of $E$, $\alpha$, $B$ and $O$ are chosen via Bayesian optimization within the ranges of [100-1000], [0.001-0.00001], [16, 64, 128, 256, 512, 1024] and [Adam, SGD, RMSProp], respectively. The loss function used in the experiment is Mean Square Error (MSE). \subsection{Datasets} Datasets used in the experiments are downloaded from Yahoo Finance (\url{https://finance.yahoo.com/}). Three different groups of datasets are selected. They are listed in Table \ref{tab:Datasets}. G1 is the stocks of banks in Hang Seng Index (HSI) which includes HSBC, HSB, CCB, BOCHK, BOCOM and BOC as source datasets and ICBC as target dataset. G2 is the health related stocks which includes MRK, NVS, PFE and UNH as source datasets and JNJ as target dataset. G3 is the energy related stocks which includes CVX, RDS-B, TOT and XOM as source datasets and PTR as target dataset. The range of all stocks from the datasets are from 2015 to 2019. \begin{table}[!hbt] \centering \scalebox{0.85}{ \begin{tabular}{lll} \hline Group & Full Name & Short Name\\ \hline &The Hongkong and Shanghai Banking Corporation & HSBC\\ &Hang Seng Bank Limited & HSB\\ G1 &China Construction Bank Corporation & CCB\\ &Bank of China (Hong Kong) Limited & BOCHK\\ &Bank of Communications Co., Ltd & BOCOM\\ &Bank of China Limited & BOC\\ &\textbf{Industrial and Commercial Bank of China} & \textbf{ICBC}\\ \cline{1-3} &Merck \& Co., Inc.& MRK \\ G2 &Novartis AG & NVS\\ &Pfizer Inc. & PFE\\ &UnitedHealth Group Incorporated& UNH\\ &\textbf{Johnson} \& \textbf{Johnson}& \textbf{JNJ}\\ \cline{1-3} &Chevron Corporation& CVX\\ G3 &Royal Dutch Shell PLC & RDS-B\\ &TOTAL S.A. & TOT\\ &Exxon Mobil Corporation& XOM\\ &\textbf{PetroChina Company Limited}& \textbf{PTR} \\ \cline{1-3} \hline \end{tabular}} \caption{Datasets Used in the Experiments} \label{tab:Datasets} \end{table} In the experiments, time series data have been preprocessed before they are fed into supervised learning model. First, time series dataset are transformed into acceptable dataset format. The input vector $x$ consists of 22-day historical close price of stock: $x = [p_{(t)},\dots, p_{(t-21)}]$ and the output vector $y$ consists of 1-day stock price from time $t$: $y = p_{t+1}$. We use min-max scaler to rescale the time series data in [-1, 1] interval. In the experiments, we used 60\%, 20\% and 20\% of the target dataset for training, validating and testing. After the learning process, the output of the model are inverse-normalized before computing the indicators. In this paper, we choose three classical indicators ($MAPE$, $RMSE$ and $R^2$) to measure the predictive accuracy of each model. $MAPE$ measures the size of the error. $RMSE$ is the mean of the square root of the error between the predicted value and the true value. $R^2$ is used for evaluating the fitting situation of the prediction model. The lower the $MAPE$ and $RMSE$, the better the model in forecasting. In contrast, higher the $R^2$, better the trained model. \subsection{Error comparison} In the experiments, we compare our proposed multi-source transfer learning WAETL and TPEES with other different forecasting methods. The experiment results are listed in Table \ref{tab:result1}. The proposed methods are listed in bold letters. \begin{table}[!hbt] \centering \scalebox{0.85}{ \begin{tabular}{llllll} \hline Group & Category & Model & MAPE & RMSE & R$^2$\\ \hline & &ARIMA &4.7079 &0.3300 &-0.2965 \\ &Without Transfer &SVR &0.9739 &0.0746 &0.9347 \\ &Learning (WTL) &MLP &1.0326 &0.0783 &0.9282 \\ & &LSTM &0.9499 &0.0738 &0.9362 \\ \cline{2-6} &Single &MLP &0.9495 &0.0733 &0.9371\\ &Best (SB) &LSTM &0.9059 &0.0707 &0.9416\\ \cline{2-6} & &MTL &1.0027 &0.0767 &0.9312\\ &Multi- &AE &0.9448 &0.0732 &0.9373 \\ G1 &source &\textbf{WAETL} &0.9297 &0.0720 &0.9394 \\ &MLP (MSM) &FES &0.9282 &0.0718 &0.9398 \\ & &\textbf{TPEES} &0.9186 &0.0715 &0.9402 \\ \cline{2-6} & &MTL & 0.9375 &0.0734 &0.9371\\ &Multi &AE &0.8977 &0.0710 &0.9410 \\ &source &\textbf{WAETL} &0.8962 &0.0710 &0.9410 \\ &LSTM (MSL) &FES &0.8980 &0.0710 &0.9411 \\ & &\textbf{TPEES} &\textbf{0.8888} &\textbf{0.0705} & \textbf{0.9419} \\ \hline & &ARIMA &6.4239 &10.4424 &-2.9508 \\ &Without Transfer &SVR &1.1149 &2.1166 &0.8381 \\ &Learning (WTL) &MLP &0.9268 &1.8342 &0.8774 \\ & &LSTM &0.8201 &1.7115 &0.8932 \\ \cline{2-6} &Single &MLP &0.8401 &1.6858 &0.8964\\ &Best (SB) &LSTM &0.8176 &1.7116 &0.8932\\ \cline{2-6} & &MTL &0.8447 &1.7452 &0.8890\\ &Multi- &AE &0.8168 &1.6862 &0.8964\\ G2 &source &\textbf{WAETL} &0.8663 &1.7470 &0.8888\\ &MLP (MSM) &FES &0.8109 &1.6713 &0.8982\\ & &\textbf{TPEES} &\textbf{0.8083} &\textbf{1.6693} &\textbf{0.8984}\\ \cline{2-6} & &MTL &1.5821 &2.7568 &0.7230\\ &Multi- &AE &0.8892 &1.7220 &0.8919 \\ &source &\textbf{WAETL} &0.8637 &1.7064 &0.8939 \\ &LSTM (MSL) &FES &0.8488 &1.6984 &0.8949 \\ & &\textbf{TPEES} &0.8373 &1.6930 &0.8955\\ \hline & &ARIMA &18.7188 &11.4203 &-0.9829 \\ &Without Transfer &SVR &3.5668 &2.6927 &0.8853 \\ &Learning (WTL) &MLP &2.6026 &1.8314 &0.9463 \\ & &LSTM &1.4969 &1.1651 &0.9783 \\ \cline{2-6} &Single &MLP &\textbf{1.4233} &\textbf{1.1215} &\textbf{0.9799}\\ &Best (SB) &LSTM &1.6093 &1.2128 &0.9764\\ \cline{2-6} & &MTL &1.7025 &1.2763 &0.9739\\ &Multi- &AE &1.6940 &1.2672 &0.9743\\ G3 &source &\textbf{WAETL} &1.8794 &1.3879 &0.9691\\ &MLP &FES &1.5585 &1.1895 &0.9773\\ &(MSM) &\textbf{TPEES} &1.5217 &1.1692 &0.9781 \\ \cline{2-6} & &MTL &2.2074 &1.6122 &0.9584\\ &Multi- &AE &1.7058 &1.2777 &0.9738 \\ &source &\textbf{WAETL} &1.7620 &1.3234 &0.9719\\ &LSTM (MSL) &FES &1.7114 &1.2807 &0.9737 \\ & &\textbf{TPEES} &1.7042 &1.2754 &0.9739\\ \hline \end{tabular}} \caption{Experiment Results for Different Forecasting Methods} \label{tab:result1} \end{table} From these results, we can observe that ARIMA is not suitable for financial time series forecasting because it always obtains the worst performance. We can also observe that the performance of MLP and LSTM are better than ARIMA and SVR in most of the cases. Besides, models with transfer learning have significant impact on time series forecasting in most of cases. However, in some situation, we can find that the results of LSTMs in Single Best (SB) and Multi-source category are worse than LSTM in Without Transfer Learning (WTL) category. This situation is often labeled as negative transfer learning \cite{Rosenstein}. In G1 and G2, we can also observe that results of models in multi-source category are better than models from single best category. In addition, we can observe that results of WAETL are worse than results of TPEES. It is possible that the performance of some models in the model pool is indeed poor, resulting in a inferior WAETL model. Furthermore, the similarity of source and target dataset calculated by the distance function may not be accurate. However, in TPEES, poor models in model pool may be not selected since TPEES model selection is based on their impact on the ensembled model. All in all, TPEES achieves the best results in majority of the cases. To further investigate the performance of the proposed approaches, we conduct more detailed experiments on dataset G1. In this experiment, we use each stock in G1 as a target dataset and the rest of the stocks as source datasets. The experiment results are listed in Table \ref{tab:HSBC}, \ref{tab:HSB}, \ref{tab:CCB}, \ref{tab:BOCHK}, \ref{tab:BOC} and \ref{tab:BOCOM}. From these results, we found that models in multi-source MLP, multi-source LSTM and single best category are better than models from Without Transfer Learning category in most of the cases. In Table \ref{tab:HSBC} (HSBC), Table \ref{tab:BOCHK} (BOCHK), Table \ref{tab:BOCOM} (BOCOM), Table \ref{tab:BOC} (BOC), the performance of MTLs in multi-source (MLP) is better than in multi-source LSTM. Besides, the best results are found in multi-source MLP and multi-source LSTM category. TPEES also achieves best results in Table \ref{tab:HSBC} (HSBC), Table \ref{tab:CCB} (CCB), Table \ref{tab:BOCHK} (BOCHK), and Table \ref{tab:BOC} (BOC). \begin{table}[!hbt] \begin{center} \scalebox{0.9}{ \begin{tabular}{lllll} \hline Category &Model & MAPE & RMSE & R$^2$\\ \hline &ARIMA &3.9042 &3.0650 &-0.7349 \\ Without Transfer & SVR &0.8782 &0.7509 &0.8945 \\ Learning (WTL) & MLP &0.8264 &0.7260 &0.8999 \\ &LSTM &0.7481 &0.6649 &0.9160 \\ \cline{1-5} Single &MLP &0.7737 &0.6801 &0.9121\\ Best (SB) &LSTM &0.7335 &0.6552 &0.9185\\ \cline{1-5} &MTL &0.7476 &0.6568 &0.9181\\ Multi- &AE &0.7480 &0.6565 &0.9181 \\ source &\textbf{WAETL} &0.7554 &0.6633 &0.9164 \\ MLP (MSM) &FES &0.7516 &0.6598 &0.9173 \\ &\textbf{TPEES} &0.7486 &0.6554 &0.9184 \\ \cline{1-5} &MTL &0.7930 &0.6959 &0.9080\\ Multi- &AE &0.7502 &0.6654 &0.9159 \\ source &\textbf{WAETL} & 0.7348 &0.6567 &0.9181 \\ LSTM (MSL) &FES &0.7509 &0.6666 &0.9156 \\ &\textbf{TPEES} &\textbf{0.7307} &\textbf{0.6536} &\textbf{0.9189} \\ \hline \end{tabular}} \end{center} \caption{Experiment Results for HSBC as Target Dataset and HSB, CCB, BOCHK, BOCOM, BOC, ICBC as Source Datasets} \label{tab:HSBC} \end{table} \begin{table}[!hbt] \centering \scalebox{0.9}{ \begin{tabular}{lllll} \hline Category &Model & MAPE & RMSE & R$^2$\\ \hline &ARIMA &14.9583 &30.5365 &-5.6414 \\ Without Transfer &SVR &1.3342 &3.2411 &0.9236 \\ Learning (WTL) &MLP &1.3209 &3.2278 &0.9235 \\ &LSTM &1.2924 &3.2787 &0.9211 \\ \cline{1-5} Single &MLP &0.9053 &2.3615 &0.9591\\ Best (SB) &LSTM &0.8928 &2.3208 &0.9605\\ \cline{1-5} &MTL &0.9335 &2.3783 &0.9585\\ Multi- &AE &0.9250 &2.3707 &0.9587 \\ source &\textbf{WAETL} &0.8922 &2.3408 &0.9598 \\ MLP (MSM) &FES &0.8910 &\textbf{2.3061} &\textbf{0.9610} \\ &\textbf{TPEES} &0.8970 &2.3165 &0.9606 \\ \cline{1-5} &MTL &0.9177 &2.3681 &0.9588\\ Multi- &AE & 0.8856 &2.3079 &0.9609 \\ source &\textbf{WAETL} &0.9090 &2.3551 &0.9593 \\ LSTM (MSL) &FES &0.8879 &2.3221 &0.9604 \\ &\textbf{TPEES} & \textbf{0.8854} &2.3157 &0.9606 \\ \hline \end{tabular}} \caption{Experiment Results for HSB as Target Dataset and HSBC, CCB, BOCHK, BOCOM, BOC, ICBC as Source Datasets} \label{tab:HSB} \end{table} \begin{table}[!hbt] \centering \scalebox{0.9}{ \begin{tabular}{lllll} \hline Category &Model & MAPE & RMSE & R$^2$\\ \hline &ARIMA &4.9897 &0.3834 &-0.1024 \\ Without Transfer &SVR &0.9828 &0.0856 &0.9459 \\ Learning (WTL) &MLP &1.0673 &0.0917 &0.9379 \\ &LSTM &\textbf{0.9026} &0.0826 &0.9497 \\ \cline{1-5} Single &MLP &0.9294 &0.0837 &0.9483\\ Best (SB) &LSTM &0.9089 &0.0824 &0.9498\\ \cline{1-5} &MTL &1.0564 &0.0898 &0.9404 \\ Multi- &AE &0.9280 &0.0828 &0.9494 \\ source &\textbf{WAETL} &0.9509 &0.0844 &0.9474 \\ MLP (MSM) &FES &0.9201 &0.0836 &0.9483 \\ &\textbf{TPEES} & 0.9115 &0.0827 &0.9495 \\ \cline{1-5} &MTL &0.9405 &0.0839 &0.9481\\ Multi- &AE &0.9175 &0.0824 &0.9499 \\ source &\textbf{WAETL} &0.9177 &0.0823 &0.9500 \\ LSTM (MSL) &FES &0.9151 &0.0820 &\textbf{0.9504} \\ &\textbf{TPEES} &0.9157 &\textbf{0.0819} &\textbf{0.9504} \\ \hline \end{tabular}} \caption{Experiment Results for CCB as Target Dataset and HSBC, HSB, BOCHK, BOCOM, BOC, ICBC as Source Datasets} \label{tab:CCB} \end{table} \begin{table}[!hbt] \centering \scalebox{0.9}{ \begin{tabular}{lllll} \hline Category &Model & MAPE & RMSE & R$^2$\\ \hline &ARIMA &21.2078 &7.0005 &-7.1548 \\ Without Transfer &SVR &1.5240 &0.6362 &0.9298 \\ Learning (WTL) &MLP &1.4428 &0.5976 &0.9367 \\ &LSTM &1.2458 &0.5461 &0.9471 \\ \cline{1-5} Single &MLP &1.1838 &0.4889 &0.9576\\ Best (SB) &LSTM &1.0467 &0.4632 &0.9619\\ \cline{1-5} &MTL &1.2201 &0.5309 &0.9500 \\ Multi- &AE &1.0866 &0.4788 &0.9593 \\ source &\textbf{WAETL} &1.0822 &0.4757 &0.9599 \\ MLP (MSM) &FES &1.0708 &0.4759 &0.9598 \\ &\textbf{TPEES} &1.0612 &0.4700 &0.9608 \\ \cline{1-5} &MTL &1.7555 &0.7371 &0.9036\\ Multi- &AE &1.0551 &0.4675 &0.9612 \\ source &\textbf{WAETL} &\textbf{1.0298} &0.4673 &0.9613 \\ LSTM (MSL) &FES &1.0440 &0.4618 &0.9622 \\ &\textbf{TPEES} &1.0369 &\textbf{0.4613} &\textbf{0.9623} \\ \hline \end{tabular}} \caption{Experiment Results for BOCHK as Target Dataset and HSBC, HSB, CCB, BOCOM, BOC, ICBC as Source Datasets} \label{tab:BOCHK} \end{table} \begin{table}[!hbt] \centering \scalebox{0.9}{ \begin{tabular}{lllll} \hline Standards &Model & MAPE & RMSE & R$^2$\\ \hline &ARIMA &5.7815 &0.2410 &-0.4019 \\ Without Transfer &SVR &0.9247 &0.0435 &0.9551 \\ Learning (WTL) &MLP &0.8520 &0.0415 &0.9593 \\ &LSTM &0.7812 &0.0397 &0.9628 \\ \cline{1-5} Single &MLP &0.8629 &0.0409 &0.9604\\ Best (SB) &LSTM &0.7825 &0.0395 &0.9632\\ \cline{1-5} &MTL &0.8393 &0.0410 &0.9602\\ Multi- &AE &0.8612 &0.0412 &0.9599 \\ source &\textbf{WAETL} &0.8483 &0.0406 &0.9611\\ MLP (MSM) &FES &0.8358&0.0405 &0.9612 \\ &\textbf{TPEES} &0.8349 &0.0404 &0.9614 \\ \cline{1-5} &MTL &2.3387 &0.1085 &0.7218 \\ Multi- &AE &0.7795 &0.0394 &0.9633 \\ source &\textbf{WAETL} &0.7866 &0.0395 &0.9632 \\ LSTM (MSL) &FES &\textbf{0.7759} &0.0394 &0.9632 \\ &\textbf{TPEES} & 0.7766 &\textbf{0.0393} &\textbf{0.9634} \\ \hline \end{tabular}} \caption{Experiment Results for BOC as Target Dataset and HSBC, HSB, CCB, BOCHK, BOCOM, ICBC as Source Datasets} \label{tab:BOC} \end{table} \begin{table}[!hbt] \centering \scalebox{0.9}{ \begin{tabular}{lllll} \hline Category &Model & MAPE & RMSE & R$^2$\\ \hline &ARIMA &10.4469 &0.7643 &-2.5990 \\ Without Transfer &SVR & 0.9039 &0.0808 &0.9597 \\ Learning (WTL) &MLP &0.9998 &0.0860 &0.9545 \\ &LSTM & 0.9684 &0.0856 &0.9549 \\ \cline{1-5} Single &MLP &0.9640 &0.0819 &0.9587\\ Best (SB) &LSTM &\textbf{0.9024} &0.0798 &0.9608\\ \cline{1-5} &MTL &0.9668 &0.0830 &0.9576 \\ Multi- &AE &0.9198 &0.0803 &0.9603 \\ source &\textbf{WAETL} &0.9885 &0.0846 &0.9559 \\ MLP (MSM) &FES &0.9265 &0.0806 &0.9600 \\ &\textbf{TPEES} &0.9449 &0.0817 &0.9589 \\ \cline{1-5} &MTL &1.3794 &0.1196 &0.9119\\ Multi- &AE &0.9087 &\textbf{0.0797} &\textbf{0.9609} \\ source &\textbf{WAETL} &0.9525 &0.0822 &0.9584 \\ LSTM (MSL) &FES &0.9218 &0.0804 &0.9602 \\ &\textbf{TPEES} & 0.9116 &\textbf{0.0797} &0.9608 \\ \hline \end{tabular}} \caption{Experiment Results for BOCOM as Target Dataset and HSBC, HSB, CCB, BOCHK, BOC, ICBC as Source Datasets} \label{tab:BOCOM} \end{table} \subsection{Evaluation of distance functions} In this paper, we proposed two ensemble methods for multi-source transfer learning. TPEES selects models based on the performance of models and does not calculate the similarity between source and target datasets. However, in WAETL, the similarity between source and target datasets is used as weight. Therefore, in addition to the error comparison, we further investigate the performance of different distance functions which are used for calculating the weights in WAETL. In this experiment, we compare the result of WAETL when different distance functions are used. These algorithms include CORrelation ALignment (CORAL) loss \cite{sun2016return}, Wasserstein Distance (WD) \cite{Ruschendorf1985Wasserstein}, Dynamic Time Warping (DTW)\cite{Berndt1994Dynamic}, and Pearson Correlation Coefficient (PCC)\cite{benesty2009pearson}. The results are listed in Table \ref{tab:distanceMAPE}, \ref{tab:distanceRMSE}, and \ref{tab:distanceR2}. \begin{table}[!hbt] \begin{center} \scalebox{0.9}{ \begin{tabular}{c|c|c|c|c} \hline \multirow{2}{*}{$D_t$}& \multicolumn{4}{|c}{WAETL MLP} \\ \cline{2-5} & Coral &WD &DTW & PCC\\ \hline HSBC&0.7554&\textbf{0.7434}&0.7497&0.7485 \\ HSB&\textbf{0.8922}&0.9128&0.9046&0.9080 \\ CCB&0.9509&0.9293&\textbf{0.9175}&0.9239 \\ ICBC&\textbf{0.9298}&0.9499&0.9368&0.9417 \\ BOCHK&1.0822&\textbf{1.0701}&1.0741&1.0715 \\ BOCOM&0.9885&\textbf{0.9194}&0.9404&0.9367 \\ BOC&0.8483&0.8371&\textbf{0.8353}&0.8354 \\ \hline \multirow{2}{*}{$D_t$}& \multicolumn{4}{|c}{WAETL LSTM}\\ \cline{2-5} & Coral &WD &DTW & PCC\\ \hline HSBC &\textbf{0.7348}&0.7410&0.7415&0.7484\\ HSB &0.9090&\textbf{0.8854}&0.8862&0.8864\\ CCB &0.9177&0.9163&\textbf{0.9146}&0.9161\\ ICBC &0.8962&\textbf{0.8945}&0.8950&0.8969\\ BOCHK &\textbf{1.0298}&1.0413&1.0428&1.0427\\ BOCOM &0.9525&0.9155&0.9139&\textbf{0.9117}\\ BOC &0.7866&\textbf{0.7776}&0.7811&0.7825 \\ \hline \end{tabular}} \end{center} \caption{$MAPE$ of Different Distance Functions Used in WAETL.} \label{tab:distanceMAPE} \end{table} \begin{table}[!hbt] \begin{center} \scalebox{0.9}{ \begin{tabular}{c|c|c|c|c} \hline \multirow{2}{*}{$D_t$}& \multicolumn{4}{|c}{WAETL MLP} \\ \cline{2-5} & Coral &WD &DTW & PCC\\ \hline HSBC&0.6633&0.6576&0.6593&\textbf{0.6569} \\ HSB&\textbf{2.3408}&2.3477&2.3416&2.3454 \\ CCB&0.0844&0.0836&0.0828&\textbf{0.0827} \\ ICBC&\textbf{0.0720}&0.0736&0.0728&0.0730 \\ BOCHK&0.4757&0.4727&0.4724&\textbf{0.4723} \\ BOCOM&0.0846&\textbf{0.0806}&0.0814&0.0812 \\ BOC&0.0406&0.0406&0.0405&\textbf{0.0405} \\ \hline \multirow{2}{*}{$D_t$}& \multicolumn{4}{|c}{WAETL LSTM}\\ \cline{2-5} & Coral &WD &DTW & PCC\\ \hline HSBC &\textbf{0.6567}&0.6598&0.6606&0.6645\\ HSB &2.3551&\textbf{2.3086}&2.3091&2.3097\\ CCB &\textbf{0.0823}&0.0825&0.0825&0.0824\\ ICBC &0.0710&\textbf{0.0709}&0.0709&0.0710\\ BOCHK &0.4673&\textbf{0.4637}&0.4644&0.4648\\ BOCOM &0.0822&0.0801&0.0802&\textbf{0.0801}\\ BOC &0.0395&\textbf{0.0393}&0.0394&0.0394 \\ \hline \end{tabular}} \end{center} \caption{$RMSE$ of Different Distance Functions Used in WAETL.} \label{tab:distanceRMSE} \end{table} \begin{table}[!hbt] \begin{center} \scalebox{0.9}{ \begin{tabular}{c|c|c|c|c} \hline \multirow{2}{*}{$D_t$}& \multicolumn{4}{|c}{WAETL MLP} \\ \cline{2-5} & Coral &WD &DTW & PCC\\ \hline HSBC& 0.9164&0.9179&0.9174&\textbf{0.9180} \\ HSB&\textbf{0.9598}&0.9595&0.9597&0.9596 \\ CCB&0.9474&0.9483&\textbf{0.9495}&0.9494 \\ ICBC&\textbf{0.9394}&0.9367&0.9381&0.9377 \\ BOCHK&0.9599&0.9604&0.9604&\textbf{0.9605} \\ BOCOM&0.9559&\textbf{0.9600}&0.9592&0.9594 \\ BOC&0.9611&0.9611&0.9611&\textbf{0.9612} \\ \hline \multirow{2}{*}{$D_t$}& \multicolumn{4}{|c}{WAETL LSTM}\\ \cline{2-5} & Coral &WD &DTW & PCC\\ \hline HSBC &\textbf{0.9181}&0.9173&0.9171&0.9161\\ HSB &0.9593&\textbf{0.9609}&0.9609&0.9608\\ CCB &\textbf{0.9500}&0.9497&0.9498&0.9499\\ ICBC &0.9410&0.9412&\textbf{0.9413}&0.9411\\ BOCHK &0.9613&\textbf{0.9619}&0.9618&0.9617\\ BOCOM &0.9584&\textbf{0.9605}&0.9604&0.9605\\ BOC &0.9632&\textbf{0.9633}&0.9632&0.9632\\ \hline \end{tabular}} \end{center} \caption{$R^2$ of Different Distance Functions Used in WAETL.} \label{tab:distanceR2} \end{table} From the MAPE results (Table \ref{tab:distanceMAPE}), we can observe that Coral obtains the best results four times, WD achieves six times, DTW achieves three times and PCC achieves once. From the $RMSE$ results (Table \ref{tab:distanceRMSE}), Coral obtains the best results four times, WD achieves five times, DTW achieves none, and PCC achieves five times. From the $R^2$ results (Table \ref{tab:distanceR2}), Coral obtains the best results four times, WD achieves five times, DTW achieves two times and PCC achieves three times. Although we find that WD and Coral do not always produce the best results, they are the most stable and robust among all the tested functions. Therefore, we can conclude that utilizing WD and Coral to calculate the weights for WAETL can get lower $MAPE$, lower $RMSE$ and higher $R^2$ in time series forecasting. \section{Conclusion} In this paper, we propose two multi-source transfer learning methods namely Weighted Average Ensemble for Transfer Learning (WAETL) and Tree-structured Parzen Estimator Ensemble Selection (TPEES). Extensive experiments are conducted to compare the performance of the proposed approaches with other competing methods. The experiment results reveal that TPEES achieves best result in most of the cases. In addition, we further analyze the impact of four similarity functions for multi-source transfer learning. We found that WD and Coral distance functions achieve favorable results when they are used for calculating the weights in WAETL approach. The main contributions of this paper are as follows. First, the proposed approaches allow the effective use of multiple source datasets for training in financial time series forecasting. In other words, the proposed approaches effectively solve the insufficient training data problem in developing deep learning models for financial domain. Second, our approach demonstrates that multi-source transfer learning can be applied to exploit the correlation among stocks from the same industry. Third, our evaluation on using different distance functions can be used as a guideline for calculating the distance among sources in instance based multi-source transfer learning. As for the future work, we are planning to extend our models to take into account negative correlation and other technical indicators from stock market data. \bibliographystyle{IEEEtran}
\section{Introduction} The existence of conformal symmetries in spacetimes has extensive applications in generating new solutions to the Einstein field equations, as well as simplifying solutions to the field equations (i.e., metrics solving the field equations) \cite{ac1,ac2,ac3,ac4,her1,her2,pet1,mt1}. Conformal symmetries, implied by the existence of conformal Killing vector fields (vector fields which preserve the metric up to scale when the metric is Lie dragged along the vector field), also provides information on the kinematical quantities of the spacetime by specifying restrictions on these quantities \cite{rm3,rm4,rm1,rm2,ac1}. Special cases of conformal Killing vector fields - homothety (where the conformal factor is constant), special homothety (where the covariant derivative of the conformal factor is constant), and Killing vector field (where the conformal factor vanishes), all have interesting properties that have proven useful in the study of geodesic motions in spacetimes. The case of homothety, whose existence implies the self-similarity of a spacetime has also been studied extensively by various author, and consequently its implications during gravitational collapse have been explored (for example see the references \cite{c1,c2,br1,rob1,chr1,chr2,chr3,chr4}). In some applications the geometry of the spacetime, in particular the sign of the Ricci curvature tensor can specify the nature of the symmetry induced by the Killing vector fields. The case of conformal symmetries in locally rotationally symmetric spacetimes was studied by Apostolopoulos and Tsamparlis \cite{mt2}, and Tsamparlis \textit{et al.} \cite{mt3} found the proper conformal Killing vector fields, homothetic Killing vector fields and special homothetic Killing vector fields for Bianchi I class of spacetimes. The line element \eqref{sav10} of stationary axisymmetric vacuum (SAV) spacetimes represents a general vacuum spacetime around a central body with arbitrary multipole moments. This solution to the Einstein field equations arises naturally from the solution to the Ernst equation with potential, denoted \(\mathcal{E}\), satisfying \eqref{sav11} \cite{ep1}. Symmetries of \eqref{sav10} provide a means of generating new solutions which come with a set of integrability conditions. In general, the equations of motion arising from \eqref{sav10} are not integrable. This is seen for a special subclass of \eqref{sav10} known as the Zipoy-Voorhees (ZV) metric \cite{zi1,vo1} parametrized by a real constant \(\delta\). The SAV metric \eqref{sav10} also generalizes some well known solutions such as the Manko-Novikov \cite{mn1} and the QM \cite{hq1,hq2,orl1} solutions, which in turn are generalizations of the well known Kerr solution for specified restriction on the quadropole parameter. Various authors have employed varying approaches to investigate integrability of the equations of motion in the ZV spacetime \cite{mv1,jb1,lg1,ni1}. From the general Killing equation (including up to higher orders) \(T^{(\alpha\dots\beta;\gamma)}=0\), it can be shown that the full contraction of an arbitrary symmetric \(n\)-tensor by the momentum of a particle in motion \(T^{(\alpha\dots\beta)}p_{\alpha}\dots p_{\beta}\) is a constant (called a first integral) of along the geodesic of the particle, and thus gives a constant of motion (see the reference \cite{jb2} for more discussion). The independence of SAV spacetimes on the \(t\) and \(\phi\) coordinates provides two constants of motion from the two Killing vectors \(\partial_t\) and \(\partial_{\phi}\) respectively. A third constant of motion is the rest mass, obtained by choosing the symmetric tensor of the Killing equation as the metric \(g^{\alpha\beta}\). Obtaining the fourth constant of motion would indicate complete integrability, and allow for solution by quadrature. This task was rigorously explored, both analytically and numerically, in \cite{mv1,jb2,ni1,jb3}. Kugrlikov and Metveev \cite{mv1} excluded the possibility of finding a first integral as polynomial in momenta up to degree \(6\) for the case \(\delta=2\). The same case was considered by Maciejewski \textit{et al.} \cite{ni1}, where the authors showed that the identity component of the differential Galois group of the variational and new variational equations associated to the equations of motion was non-abelian, which implies non-integrability \cite{am1,mr1}. This proof ruled the existence of a much wider class of functions than that considered by \cite{mv1}, i.e., the class of \textit{meromorphic} functions . A detailed numerical study done by Lukes-Gerakolopoulos \cite{lg1} showed that away from the Schwarzschild's limit \(\delta=1\), geodesic motion was unstable and there was a breakdown in the predictability of the orbits and thus further confirmed the results of \cite{ni1}. Away from the Schwarzschild's case, i.e., \(1<\delta\leq2\), this region of instability was quantified via the computation of the Arnold tongue of instability in \cite{as1}. Brink, through efforts to find first integrals, developed sophisticated analytic algorithms to find second and fourth order Killing tensors (the latter being the first attempt at that order) \cite{jb2,jb3}. A more recent physical application involving the Zipoy-Voorhees metric was carried out in \cite{orl2}, where the authors studied neutrino oscillations in the field of the spacetime by determining the phase shift generating small deformations. In this paper we study homothetic Killing vectors in SAV spacetimes restricting the components of the vectors to be dependent on \(t\) and \(\rho\) coordinates only. The paper has the following structure: Section \ref{soc1} provides the definition and brief discussion of the SAV spacetimes. In Section \ref{soc12} we investigate Homothetic Killing vectors in SAV spacetimes, under certain restriction on their component functions. We also consider the particular case where there is no twisting term in the metric. Finally, we conclude with discussion of our results in Section \ref{soc6}. \section{SAV spacetimes}\label{soc1} We begin this section by introducing the class of SAV spacetime and computing quantities from the metric components, to be used in subsequent calculations. The line element of a general SAV spacetime is given by \begin{eqnarray}\label{sav10} \begin{split} \underline{g}&=k^2e^{-2\psi}\left[e^{2\gamma}\left(d\rho^2+dz^2\right)+R^2d\phi^2\right]-e^{2\psi}\left(dt-\omega d\phi\right)^2, \end{split} \end{eqnarray} with the metric functions \begin{eqnarray*} \begin{split} \underline{g}_{tt}=-\frac{1}{\omega}\underline{g}_{\phi t}=-e^{2\psi};\ \ \underline{g}_{\phi\phi}=W;\ \ \underline{g}_{\rho\rho}=\underline{g}_{zz}=k^2e^{2\left(\gamma-\psi\right)}, \end{split} \end{eqnarray*} where we have defined \begin{eqnarray}\label{micp} W=k^2R^2e^{-2\psi}-\omega^2e^{2\psi}. \end{eqnarray} Here \(k\in \mathbb{R}, \psi=\psi\left(\rho,z\right), \gamma=\gamma\left(\rho,z\right),\omega=\omega\left(\rho,z\right)\) and \(R=R\left(\rho,z\right)\) (see references \cite{ep1,jb1} for details). These spacetimes are constructed from a complex Ernst potential \(\mathcal{E}\) \cite{ep1} via the equation \begin{eqnarray}\label{sav11} \mathfrak{R}\left(\mathcal{E}\right)\bar{\nabla}^2\mathcal{E}=\bar{\nabla}\mathcal{E}\cdot\bar{\nabla}\mathcal{E}, \end{eqnarray} where \(\mathfrak{R}\left(\mathcal{E}\right)=e^{2\psi}\) is the real part of \(\mathcal{E}\), \(\bar{\nabla}^2=\partial_{\rho\rho}+\left(1/\rho\right)\partial_{\rho}+\partial{zz}\), \(\bar{\nabla}=\left(\partial_{\rho},\partial_z\right)\). The functions \(\gamma\) and \(\omega\) can be obtained from line integrals of \(\mathcal{E}\), and the function \(R\) solves \begin{eqnarray}\label{rhoeq} R_{,\rho\rho}+R_{,zz}=0, \end{eqnarray} where the ``comma" denotes partial differentiation. The independent non-zero Christoffel symbols are given by \begin{subequations} \begin{align} \Gamma^k_{jA}&=\frac{1}{2}\underline{g}^{ik}\underline{g}_{ij,A};\ \ \Gamma^{\rho}_{\rho\rho}=-\Gamma^{\rho}_{zz}=\Gamma^{z}_{z\rho}=\frac{1}{2}\underline{g}^{\rho\rho}\underline{g}_{\rho\rho,\rho},\ \ \left(i,j,k\in\lbrace{t,\phi\rbrace};\ \ A\in\lbrace{\rho,z\rbrace}\right)\;, \label{eq29}\\ \Gamma^A_{jk}&=-\frac{1}{2}\underline{g}^{\rho\rho}\underline{g}_{jk,A};\ \ \Gamma^{z}_{zz}=-\Gamma^{z}_{\rho\rho}=\Gamma^{\rho}_{z\rho}=\frac{1}{2}\underline{g}^{\rho\rho}\underline{g}_{\rho\rho,z}\ \ \left(j,k\in\lbrace{t,\phi\rbrace};\ \ A\in\lbrace{\rho,z\rbrace}\right).\label{eq30} \end{align} \end{subequations} \section{The conformal Killing equations and homothetic Killing vectors in SAV spacetimes}\label{soc12} For an arbitrary vector field \(v\), the Lie derivative of the metric along \(v\) is given by \begin{eqnarray}\label{sav30} \mathcal{L}_v\underline{g}_{\mu\nu}=2\Psi \underline{g}_{\mu\nu}. \end{eqnarray} The function \(\Psi\) determines if \(v\) is a Killing vector (KV), a homothetic Killing vector (HKV), a special homothetic Killing vector (SHKV) or \textit{proper} conformal Killing vector (CKV) field: \begin{eqnarray*} \begin{split} \Psi&=0\implies v\ \ KV,\\ \Psi&=const.\neq 0 \implies v\ \ HKV,\\ \Psi&=nonconst.\implies v\ \ \text{\textit{proper}}\ \ CKV. \end{split} \end{eqnarray*} In terms of the covariant derivative \eqref{sav30} may be written as \begin{eqnarray}\label{sav31} v_{(\mu;\nu)}=\Psi \underline{g}_{\mu\nu}, \end{eqnarray} where we have used the ``semicolon" to denote the covariant derivative, and the parenthesis is the usual symmetrization of the indices. We shall seek homothetic Killing vectors of the form \begin{eqnarray}\label{sav32} \eta=C_1\partial_t+C_2\partial_{\rho}+C_3\partial_{z}+C_4\partial_{\phi}. \end{eqnarray} We shall consider cases for which we have the components \(C_i\) for \(i\in\lbrace{1,2,3,4\rbrace}\) are functions of \(t\) and \(\rho\) only. Using \begin{eqnarray}\label{eq35} \nabla_{(\mu}\eta_{\nu)}=\Psi \underline{g}_{\mu\nu}, \end{eqnarray} where \(\Psi\) is the conformal factor, the set of CKEs become \begingroup \begin{subequations} \begin{align} 0&=C_{1,t}-\Psi-\omega C_{4,t}+\psi_{,\rho}C_2+\psi_{,z}C_3,\label{eq101}\\ 0&=\left(C_{1,\rho}-\omega C_{4,\rho}\right)e^{2\psi}-k^2C_{2,t}e^{2\left(\gamma-\psi\right)},\label{eq102}\\ 0&=C_{3,t},\label{eq103}\\ 0&=WC_{4,t}+\biggl[C_2\left(\omega_{,\rho}+2\omega\psi_{,\rho}\right)+C_3\left(\omega_{,z}+2\omega\psi_{,z}\right)+\omega\left(C_{1,t}-2\Psi\right)\biggr]e^{2\psi},\label{eq104}\\ 0&=C_{2,\rho}+C_2\left(\gamma-\psi\right)_{,\rho}+C_3\left(\gamma-\psi\right)_{,z}-\Psi,\label{eq105}\\ 0&=C_{3,\rho},\label{eq106}\\ 0&=WC_{4,\rho}+\omega C_{1,\rho}e^{2\psi},\label{eq107}\\ 0&=C_3\left(\gamma-\psi\right)_{,z}+C_2\left(\gamma-\psi\right)_{,\rho}-\Psi,\label{eq108}\\ 0&=W_{,\rho}C_2+W_{,z}C_3-2W\Psi.\label{eq109} \end{align} \end{subequations} \endgroup From \eqref{eq103} and \eqref{eq106} we have that \(C_3=l\) where \(l\) is an arbitrary constant. Combining \eqref{eq105} and \eqref{eq108} we see that \(C_2=C_2\left(t\right)\). Taking the time derivative of the constraint equations \eqref{eq108} and \eqref{eq109}, and comparing we have \begin{eqnarray}\label{eq120} C_{2,t}\left(W_{,\rho}-2W\left(\gamma-\psi\right)_{,\rho}\right)=0. \end{eqnarray} So either \(C_{2,t}=0\) in which case \(C_2=m=constant\), or \begin{eqnarray}\label{eq121} W_{,\rho}-2W\left(\gamma-\psi\right)_{,\rho}=0. \end{eqnarray} Hence, we have the following proposition. \begin{proposition}\label{lem2} Assume that the metric \eqref{sav10} admits HKVs of the form \eqref{sav32}, where \(C_i=C_i\left(t,\rho\right)\) for \(i\in\lbrace{1,2,3,4\rbrace}\). Then \(C_3\) must be constant, and either \begin{enumerate} \item \(C_2\) is constant, in which case \(C_4=C_4\left(t\right)\); or \item \(C_2=C_2\left(t\right)\) and \(\underline{g}_{\phi\phi}=k^{-2}f\underline{g}_{\rho\rho}\), \end{enumerate} for an arbitrary positive function \(f=f\left(z\right)\). \end{proposition} We will now consider the 2 cases of Proposition \ref{lem2} in detail. \subsection{The case of constant \(C_2\)} Noting that \(C_2=m=constant\), we have the conformal factor \(\Psi\) as \begin{eqnarray}\label{eqmic} \Psi=l\left(\gamma-\psi\right)_{,z}+m\left(\gamma-\psi\right)_{,\rho}, \end{eqnarray} in which case we see that \(\Psi=\Psi\left(\rho,z\right)\). Furthermore, \eqref{eq102} and \eqref{eq107} reduce respectively to \begin{subequations} \begin{align} 0&=C_{1,\rho}-\omega C_{4,\rho},\label{eq122}\\ 0&=WC_{4,\rho}+\omega C_{1,\rho}e^{2\psi},\label{eq123} \end{align} \end{subequations} which can be combined to give \begin{eqnarray}\label{eq124} C_{4,\rho}\left(W+\omega^2e^{2\psi}\right)=0. \end{eqnarray} The determinant \(\det\left(\underline{g}\right)=-e^{2\psi}\underline{g}_{\rho\rho}^2\bar{W}\), where \(\bar{W}=W+\omega^2e^{2\psi}\). Therefore we rule out the case \(\bar{W}=0\), since otherwise \(\underline{g}\) is not invertible. Hence we must have \(C_4=C_4\left(t\right)\). Suppose we have that \(C_4=C_4\left(t\right)\). Then from \eqref{eq122} we have \(C_1=C_1\left(t\right)\). Substituting \eqref{eq101} into \eqref{eq104} and using \eqref{eqmic} we have the following differential equation for \(C_4\): \begin{eqnarray}\label{eqq1} C_{4,t}=-\frac{Me^{2\psi}}{W+\omega^2e^{2\psi}}, \end{eqnarray} which gives \begin{eqnarray}\label{eqq2} C_4=-\left(\frac{Me^{2\psi}}{W+\omega^2e^{2\psi}}\right)t+a_1, \end{eqnarray} (note that the parenthesized term of \eqref{eqq2} is constant since all quantities therein are independent of \(t\)) for an arbitrary constant \(a_1\), where \begin{eqnarray}\label{eqq3} \begin{split} M\left(\rho,z\right)&=m\left(\omega_{,\rho}+2\omega\psi_{,\rho}\right)+l\left(\omega_{,z}+2\omega\psi_{,z}\right)-\omega\left(l\gamma_{,z}+m\gamma_{,\rho}\right). \end{split} \end{eqnarray} Furthermore, we combine \eqref{eqmic} and \eqref{eq101} to obtain \begin{eqnarray}\label{eqq4} \left(C_1-\omega C_4\right)_{,t}=\tilde{M}, \end{eqnarray} which has the solution \begin{eqnarray}\label{eqq5} C_1-\omega C_4=\tilde{M}t+a_2, \end{eqnarray} for an arbitrary constant \(a_2\), where \begin{eqnarray}\label{eqq6} \tilde{M}\left(\rho,z\right)=l\left(\gamma-2\psi\right)_{,z}+m\left(\gamma-2\psi\right)_{,\rho}. \end{eqnarray} Hence we may write \(C_1\) explicitly as \begin{eqnarray}\label{eqq7} C_1=\left(\tilde{M}-\frac{\omega Me^{2\psi}}{W+\omega^2e^{2\psi}}\right)t+a_1\omega+a_2. \end{eqnarray} However, since \(C_1\) and \(C_4\) are functions of \(t\) and \(\rho\) only, we must have \begin{subequations} \begin{align} \frac{Me^{2\psi}}{W+\omega^2e^{2\psi}}&=\alpha^2,\label{eqq8}\\ \tilde{M}&=\beta,\label{eqq9}\\ \omega&=\pi,\label{eqq10} \end{align} \end{subequations} for constants \(\alpha,\beta,\pi\), where \(\alpha,\beta,\pi\neq 0\) (the choice of the square on \(\alpha\) is just to keep the function \(e^{2\psi}\) without the square root). Using \eqref{micp} and simplifying \eqref{eqq8} we have that \begin{eqnarray}\label{eqq11} e^{4\psi}=k^2\alpha^2 \frac{R^2}{M}. \end{eqnarray} Now, suppose we have that \(l,m\neq 0\). As \(\omega=\pi=constant\), \eqref{eqq3} reduces to \begin{eqnarray}\label{eqq12} M=-\pi\left[l\left(\gamma-2\psi\right)_{,z}+m\left(\gamma-2\psi\right)_{,\rho}\right]. \end{eqnarray} We can always choose \(\beta=-1/\pi\) so that \(M=1\) (using \eqref{eqq9}), and hence from \eqref{eqq8} we have \begin{eqnarray}\label{eqq13} e^{2\psi}=k\alpha R. \end{eqnarray} Setting \(M=1\), \eqref{eqq12} has the general solution \begin{eqnarray}\label{eqq14} \gamma-2\psi=-\frac{1}{\pi m}\rho+r\left(z-\frac{l}{m}\rho\right), \end{eqnarray} for any smooth function \(r\left(z-\frac{l}{m}\rho\right)\), which gives \begin{eqnarray}\label{eqq15} e^{2\gamma}=k^2\alpha^2R^2e^{-2\left(\frac{1}{\pi m}\rho-r\left(z-\frac{l}{m}\rho\right)\right)}. \end{eqnarray} We therefore have the component \(C_i=C_i\left(t,\rho\right)\) as \begin{subequations} \begin{align} C_1&=\pi_1t+\pi_2,\label{eqq16}\\ C_2&=m,\label{eqq17}\\ C_3&=l,\label{eqq18}\\ C_4&=-\alpha^2t+a_1,\label{eqq19} \end{align} \end{subequations} where \begin{eqnarray}\label{hellothere} \begin{split} \pi_1&=\frac{1}{\pi}-\pi\alpha^2,\\ \pi_2&=a_1\pi+a_2, \end{split} \end{eqnarray} with metric functions \(\psi,\gamma\) and \(\omega\), given respectively in \eqref{eqq13}, \eqref{eqq15} and \eqref{eqq10}. The associated conformal factor can be written as \begin{eqnarray}\label{eqq20} \Psi_{m,l\neq 0}=\frac{1}{2k\alpha R}\left(mR_{,\rho}+lR_{,z}\right)-\frac{1}{\pi}. \end{eqnarray} To treat the case of homothety for \(m,l\neq 0\), let us go back form of \(\Psi\) \eqref{eqmic}. Taking the \(\rho\) and \(z\) derivatives of \eqref{eqmic} and setting to zero we obtain respectively \begin{subequations} \begin{align} l\left(\gamma-\psi\right)_{,z\rho}+m\left(\gamma-\psi\right)_{,\rho\rho}&=0,\label{eqmicc1}\\ l\left(\gamma-\psi\right)_{,zz}+m\left(\gamma-\psi\right)_{,\rho z}&=0,\label{eqmicc2} \end{align} \end{subequations} which can be combined to give the second order partial differential equation \begin{eqnarray}\label{eqmicc3} m^2\left(\gamma-\psi\right)_{,\rho\rho}-l^2\left(\gamma-\psi\right)_{,zz}=0, \end{eqnarray} which is clearly hyperbolic for \(l,m\neq0\). We shall look at specific examples of this case where the difference of the functions \(\gamma\) and \(\psi\) take on a particular form. Consider first the case where \(\gamma-\psi\) separates as the linear sum \begin{eqnarray}\label{eqmicc20} \gamma-\psi=S+T, \end{eqnarray} where \(S=S\left(\rho\right)\) and \(T=T\left(z\right)\) (an obvious example is one where both \(\psi\) and \(\gamma\) split, i.e. where we may write \(\psi=h_1\left(\rho\right)+\xi_1\left(z\right)\) and \(\gamma=h_2\left(\rho\right)+\xi_2\left(z\right)\) for arbitrary functions \(h_1,h_2,\xi_1,\xi_2\)). Then \eqref{eqmicc3} becomes \begin{eqnarray}\label{eqmicc21} m^2S_{,\rho\rho}-l^2T_{,zz}=0, \end{eqnarray} from which we have the two equations \begin{subequations} \begin{align} m^2S_{,\rho\rho}&=\lambda,\label{eqmicc22}\\ -l^2T_{,zz}&=\lambda,\label{eqmicc23} \end{align} \end{subequations} for some constant \(\lambda\). The solutions to \eqref{eqmicc22} and \eqref{eqmicc23} are respectively \begin{subequations} \begin{align} S&=\frac{\lambda}{m^2}\rho^2+c_1,\label{eqmicc24}\\ T&=-\frac{\lambda}{l^2}z^2+c_2,\label{eqmicc25} \end{align} \end{subequations} for arbitrary constants \(c_1,c_2\neq 0\), and therefore \begin{eqnarray}\label{eqmicc26} \gamma-\psi=\lambda\left(\frac{1}{m^2}\rho^2-\frac{1}{l^2}z^2\right)+c_1\rho + c_2z, \end{eqnarray} which gives \begin{eqnarray}\label{eqmicc27} \Psi=2\lambda\left(\frac{1}{m}\rho-\frac{1}{l}z\right)+mc_1+lc_2, \end{eqnarray} where we have used \eqref{eqmic}. Hence we have that either \(\lambda=0\) or \begin{eqnarray}\label{hehe} l\rho-mz=ml\bar{c}, \end{eqnarray} for an arbitrary constant \(\bar{c}\), for the case of homothety. Using \eqref{eqq13} to substitute for \(\psi\) in \eqref{eqq14}, and comparing the result to \eqref{eqmicc26} we have the required forms of \(R\): \begin{subequations} \begin{align} \lambda=0:\ R&=\frac{1}{k\alpha}e^{2\left[\bar{c}_1\rho+c_2z-r\left(z-\frac{l}{m}\rho\right)\right]},\label{eqmicc28}\\ l\rho-mz=ml\bar{c}:\ R&=\frac{1}{k\alpha\bar{c}_2}e^{\bar{m}\rho},\label{eqmicc29} \end{align} \end{subequations} for constants \begin{eqnarray*} \begin{split} \bar{c}_1&=\frac{1}{\pi m}+c_1;\\ \bar{c}_2&=e^{\left(mlc_2\bar{c}+\lambda\bar{c}^2+r\left(-mlc\right)\right)};\\ \bar{m}&=e^{\left(\frac{2}{\pi m}+c_1+\frac{l}{m}c_2+2\frac{\lambda}{m}\bar{c}\right)}. \end{split} \end{eqnarray*} Hence, from \eqref{eqq20} \(\Psi\) becomes \begin{subequations} \begin{align} \lambda=0:\ \Psi_{m,l\neq 0}&=\frac{1}{k\alpha}\left[m\bar{c}_1+lc_2+\bar{r}\right]-\frac{1}{\pi},\label{aamic1}\\ l\rho-mz=ml\bar{c}:\ \Psi_{m,l\neq 0}&=\frac{1}{2k\alpha}\bar{m}-\frac{1}{\pi},\label{aamic2} \end{align} \end{subequations} where we defined \begin{eqnarray*} \bar{r}=2\left(\frac{l}{m}-1\right)r\left(z-\frac{l}{m}\rho\right)=constant, \end{eqnarray*} i.e. \(r\left(z-\frac{l}{m}\rho\right)\) is constant. Notice that this means that we may write \eqref{eqmicc28} for the case \(\lambda=0\) as \begin{eqnarray}\label{monster} R_{\lambda=0}&=\frac{1}{k\alpha\bar{r}'}e^{2\left[\bar{c}_1\rho+c_2z\right]}\;, \end{eqnarray} where we have set \begin{eqnarray*} \bar{r}'=e^{\frac{\bar{r}m}{l-m}}. \end{eqnarray*} We also have the functions \(\psi\) and \(\gamma\) given respectively by \begin{subequations} \begin{align} \lambda=0:\ e^{2\psi}_{m,l\neq 0}&=\frac{1}{\bar{r}'}e^{2\left[\bar{c}_1\rho+c_2z\right]},\label{atmic1}\\ \lambda=0:\ e^{2\gamma}_{m,l\neq 0}&=\frac{1}{\bar{r}'\bar{r}^2}e^{2\left[\left(\bar{c}_1+c_1\right)\rho+c_2z\right]},\label{atmic2}\\ l\rho-mz=ml\bar{c}:\ e^{2\psi}_{m,l\neq 0}&=\frac{1}{\bar{c}}_2e^{\bar{m}\rho},\label{atmic3}\\ l\rho-mz=ml\bar{c}:\ e^{2\gamma}_{m,l\neq 0}&=\frac{1}{\bar{r}'\bar{c}_2^2}e^{2\left[\left(\bar{c}_1+c_1\right)\rho+c_2z\right]}.\label{atmic4} \end{align} \end{subequations} Let us next consider the case where the difference \(\gamma-\psi\) factors as the product \begin{eqnarray}\label{eqmicc30} \gamma-\psi=ST, \end{eqnarray} where again \(S=S\left(\rho\right)\) and \(T=T\left(z\right)\) (an obvious example here is the case where both \(\psi\) and \(\gamma\) split as products, i.e. where we may write \(\psi=h_1\left(\rho\right)\xi_1\left(z\right)\) and \(\gamma=h_2\left(\rho\right)\xi_2\left(z\right)\), for arbitrary functions \(h_1,h_2,\xi_1,\xi_2\)). Then \eqref{eqmicc3} becomes \begin{eqnarray}\label{eqmicc31} m^2\frac{S_{,\rho\rho}}{S}-l^2\frac{T_{,zz}}{T}=0, \end{eqnarray} from which we have the two equations \begin{subequations} \begin{align} S_{,\rho\rho}&=\frac{\lambda'}{m^2}S,\label{eqmicc32}\\ T_{,zz}&=\frac{\lambda'}{l^2}T,\label{eqmicc33} \end{align} \end{subequations} for some constant \(\lambda'\). The solutions to \eqref{eqmicc32} and \eqref{eqmicc33} are respectively \begin{subequations} \begin{align} \lambda'>0:\ \ S&=\bar{a}_1e^{\frac{\sqrt{\lambda'}}{m}\rho}+\bar{a}_2e^{-\frac{\sqrt{\lambda'}}{m}\rho},\label{eqmicc34}\\ T&=\bar{b}_1e^{\frac{\sqrt{\lambda'}}{l}z}+\bar{b}_2e^{-\frac{\sqrt{\lambda'}}{l}z},\label{eqmicc35}\\ \lambda'<0:\ \ S&=\bar{a}_1\cos\left(\frac{\sqrt{-\lambda'}}{m}\rho\right)+\bar{a}_2\sin\left(\frac{\sqrt{-\lambda'}}{m}\rho\right),\label{eqmicc36}\\ T&=\bar{b}_1\cos\left(\frac{\sqrt{-\lambda'}}{l}z\right)+\bar{b}_2\sin\left(\frac{\sqrt{-\lambda'}}{l}z\right),\label{eqmicc37} \end{align} \end{subequations} for arbitrary constants \(\bar{a}_1,\bar{a}_2,\bar{b}_1,\bar{b}_2\), and therefore \begin{subequations} \begin{align} \lambda'>0:\ \ \gamma-\psi&=\left(\bar{a}_1e^{\frac{\sqrt{\lambda'}}{m}\rho}+\bar{a}_2e^{-\frac{\sqrt{\lambda'}}{m}\rho}\right)\times\left(\bar{b}_1e^{\frac{\sqrt{\lambda'}}{l}z}+\bar{b}_2e^{-\frac{\sqrt{\lambda'}}{l}z}\right),\label{eqmicc38}\\ \lambda'<0:\ \ \gamma-\psi&=\biggl(\bar{a}_1\cos\left(\frac{\sqrt{-\lambda'}}{m}\rho\right)+\bar{a}_2\sin\left(\frac{\sqrt{-\lambda'}}{m}\rho\right)\biggr)\biggl(\bar{b}_1\cos\left(\frac{\sqrt{-\lambda'}}{l}z\right)\notag\\ &+\bar{b}_2\sin\left(\frac{\sqrt{-\lambda'}}{l}z\right)\biggr),\label{eqmicc39} \end{align} \end{subequations} which gives the associated conformal factors as \begin{subequations} \begin{align} \lambda'>0:\ \ \Psi&=2\sqrt{\lambda'}\left(a'e^{\frac{\sqrt{\lambda'}}{ml}\left(l\rho+mz\right)}+b'e^{-\frac{\sqrt{\lambda'}}{ml}\left(l\rho+mz\right)}\right),\label{eqmicc40}\\ \lambda'<0:\ \ \Psi&=\sqrt{-\lambda'}\biggl(a'\sin\left[\frac{\sqrt{-\lambda'}}{ml}\left(l\rho+mz\right)\right]+b'\cos\left[\frac{\sqrt{-\lambda'}}{ml}\left(l\rho+mz\right)\right]\biggr),\label{eqmicc41} \end{align} \end{subequations} for arbitrary constants \(a'\) and \(b'\). Hence we must have that \(l\rho-mz=ml\bar{c}\) for either case \(\lambda'>0\) or \(\lambda'<0\) for the case of homothety. The difference \(\gamma-\psi\) in this case is therefore constant. Hence we have the required forms of \(R\) as \begin{subequations} \begin{align} \lambda'>0:\ R&=\frac{1}{k\alpha}e^{\left[\left(\gamma-\psi\right)_{\lambda'>0}-\bar{r}\right]},\label{eqmicc42}\\ \lambda'<0:\ R&=\frac{1}{k\alpha}e^{\left[\left(\gamma-\psi\right)_{\lambda'<0}-\bar{r}\right]}.\label{eqmicc43} \end{align} \end{subequations} The associated conformal factor in either case is simply, from \eqref{eqq20} \begin{eqnarray}\label{eqmicc44} \Psi=-\frac{1}{\pi}. \end{eqnarray} It is also not difficult to obtain the forms of the functions \(\gamma\) and \(\phi\), which are given by \begin{subequations} \begin{align} \lambda'>0:\ e^{2\psi_{\lambda'>0}}&=e^{-2\bar{r}},\label{emica}\\ \lambda'>0:\ e^{2\gamma_{\lambda'>0}}&=e^{-4\bar{r}},\label{emicb}\\ \lambda'<0:\ e^{2\psi_{\lambda'<0}}&=e^{-2\bar{r}},\label{emicck}\\ \lambda'<0:\ e^{2\gamma_{\lambda'<0}}&=e^{-4\bar{r}},\label{emicd} \end{align} \end{subequations} which implies they are constants. We therefore state the following propositions. \begin{proposition}\label{lem203} Let the metric \eqref{sav10} admit HKVs of the form \eqref{sav32}, where \(C_i=C_i\left(t,\rho\right)\) for \(i\in\lbrace{1,2,3,4\rbrace}\), and let \(C_2\) be constant. Then for \(C_2=m\neq0,C_3=l\neq 0\), the HKVs takes the form \begin{eqnarray}\label{todee100} \eta=\left(\pi_1t+\pi_2\right)\partial_t+m\partial_{\rho}+l\partial_{z}+\left(a_1-\alpha^2t\right)\partial_{\phi}, \end{eqnarray} with \(\pi_1,\pi_2\) given in \eqref{hellothere}, where \(\pi,\alpha\neq 0\). If the difference \(\gamma-\psi\) splits as \eqref{eqmicc20}, then the associated conformal factor is given by \eqref{aamic1} or \eqref{aamic2}, and the functions \(R,\psi\) and \(\gamma\) are given by \eqref{monster} or \eqref{eqmicc29}, \eqref{atmic1} or \eqref{atmic3}, and \eqref{atmic2} or \eqref{atmic4}. On the other hand, if the difference \(\gamma-\psi\) factors as \eqref{eqmicc30}, then the associated conformal factor is given by \eqref{eqmicc40} or \eqref{eqmicc41}, where the coordinates \(\rho\) and \(z\) satisfy \eqref{hehe}, and the functions \(R,\psi\) and \(\gamma\) are all constants given by \eqref{eqmicc42} or \eqref{eqmicc43}, \eqref{emica} or \eqref{emicck}, and \eqref{emicb} or \eqref{emicd}. \end{proposition} Now, let us consider the cases \(m=0,l\neq 0\) or \(m\neq 0,l=0\), in which case \eqref{eqmicc3} is parabolic. Then we have the metric function \(\gamma\) given respectively by \begin{subequations} \begin{align} e^{2\gamma}_{m=0,l\neq 0}&=k^2\alpha^2R^2e^{-2\left(\frac{1}{\pi l}z-r_1\right)},\label{eqq21}\\ e^{2\gamma}_{m\neq 0,l=0}&=k^2\alpha^2R^2e^{-2\left(\frac{1}{\pi m}\rho-r_2\right)},\label{eqq22} \end{align} \end{subequations} for arbitrary smooth functions \(r_1=r_1\left(\rho\right)\) and \(r_2=r_2\left(z\right)\). The functions \(C_i\) and \(\psi\) are given as in \eqref{eqq16} to \eqref{eqq19} and \eqref{eqq13}. The associated conformal factors are given respectively by \begin{subequations} \begin{align} \Psi&_{m=0,l\neq 0}=-\frac{1}{\pi}+l\tilde{\alpha}\frac{R_{,z}}{R},\label{eqq23}\\ \Psi&_{m\neq 0,l=0}=-\frac{1}{\pi}+m\tilde{\alpha}\frac{R_{,\rho}}{R},\label{eqq24} \end{align} \end{subequations} where we have defined \begin{eqnarray*} \tilde{\alpha}=k\alpha-\frac{1}{2k\alpha}. \end{eqnarray*} For the case with \(l=0\) and \(m\neq 0\), substituting \eqref{eqq13} into \eqref{eqq22}, and substituting the result into \eqref{eqmicc3}, and taking twice the \(\rho\) derivative, \eqref{eqmicc3} reduces to \begin{eqnarray}\label{eqmicc4} RR_{,\rho\rho}-R_{,\rho}^2=0, \end{eqnarray} whose solution is given by \begin{eqnarray}\label{eqmicc5} R=g_1e^{f_1\rho}, \end{eqnarray} for arbitrary functions \(f_1=f_1\left(z\right)\) and \(g_1=g_1\left(z\right)\), which gives \eqref{eqq24} as \begin{eqnarray}\label{eqmicc6} \Psi_{m\neq0,l=0}=\frac{1}{\pi}+m\tilde{\alpha}f_1. \end{eqnarray} We therefore have that \(f_1\) must be constant for \(\Psi_{m\neq0,l=0}\) to be constant. Similarly, in the case that \(m=0\) and \(l\neq 0\) we have that \eqref{eqmicc3} becomes \begin{eqnarray}\label{eqmicc7} RR_{,zz}-R_{,z}^2=0, \end{eqnarray} whose solution is given by \begin{eqnarray}\label{eqmicc8} R=g_2e^{f_2\rho}, \end{eqnarray} for arbitrary functions \(f_2=f_2\left(\rho\right)\) and \(g_2=g_2\left(\rho\right)\), which gives \eqref{eqq23} as \begin{eqnarray}\label{eqmicc9} \Psi_{m=0,l\neq 0}=\frac{1}{\pi}+l\tilde{\alpha}f_2. \end{eqnarray} Again, it is clear that \(f_2\) must be constant inorder for \(\Psi_{m=0,l\neq 0}\) to be constant. We therefore state the following \begin{proposition}\label{lem201} Let the metric \eqref{sav10} admit HKVs of the form \eqref{sav32}, where \(C_i=C_i\left(t,\rho\right)\) for \(i\in\lbrace{1,2,3,4\rbrace}\). If \(C_2\) is constant, then for \(C_3=l=0,C_2=m\neq 0\), the HKVs takes the form \begin{eqnarray}\label{todee101} \eta=\left(\pi_1t+\pi_2\right)\partial_t+m\partial_{\rho}+\left(a_1-\alpha^2t\right)\partial_{\phi}, \end{eqnarray} with \(\pi_1,\pi_2\) given in \eqref{hellothere}, where \(\pi,\alpha\neq 0\). The associated conformal factor is given by \eqref{eqmicc6}. The function \(\omega\) is given by \eqref{eqq10} and \(\psi\) and \(\gamma\) are given respectively by \begin{subequations} \begin{align} e^{2\psi}&=k\alpha g_1e^{f_1\rho},\label{live1}\\ e^{2\gamma}&=k^2\alpha^2g_1^2e^{-2\left[\left(\frac{1}{\pi m}-f_1\right)\rho-r_2\right]},\label{live2} \end{align} \end{subequations} where \(g_1\) is a function of \(z\) and \(f_1\) is constant. \end{proposition} \begin{proposition}\label{lem202} Let the metric \eqref{sav10} admit HKVs of the form \eqref{sav32}, where \(C_i=C_i\left(t,\rho\right)\) for \(i\in\lbrace{1,2,3,4\rbrace}\). If \(C_2\) is constant, then for \(C_2=m=0,C_3=l\neq 0\), the HKVs takes the form \begin{eqnarray}\label{todee102} \eta=\left(\pi_1t+\pi_2\right)\partial_t+l\partial_{z}+\left(a_1-\alpha^2t\right)\partial_{\phi}, \end{eqnarray} with \(\pi_1,\pi_2\) given in \eqref{hellothere}, where \(\pi,\alpha\neq 0\). The associated conformal factor is given by \eqref{eqmicc9}. The function \(\omega\) is given by \eqref{eqq10}, and \(\psi\) and \(\gamma\) are given respectively by \begin{subequations} \begin{align} e^{2\psi}&=k\alpha g_2e^{f_2\rho},\label{live1}\\ e^{2\gamma}&=k^2\alpha^2g_2^2e^{-2\left(\frac{1}{\pi m}z-f_2\rho-r_1\right)},\label{live2} \end{align} \end{subequations} where \(g_2\) is a function of \(z\) and \(f_2\) is constant. \end{proposition} Finally, in the case that \(m\) and \(l\) are simultaneously zero, then \(M=\tilde{M}=C_2=C_3=\Psi=0\). Hence \eqref{sav32} are KVs of the form \begin{eqnarray}\label{eqq25} \eta=\pi_2\partial_t+a_1\partial_{\phi}, \end{eqnarray} which allows us to state \begin{proposition}\label{lem6} Let the metric \eqref{sav10} admit HKVs of the form \eqref{sav32}, where \(C_i=C_i\left(t,\rho\right)\) for \(i\in\lbrace{1,2,3,4\rbrace}\). If \(C_2\) is constant, then for \(C_3=l=0,C_2=m=0\), the HKVs are KVs of the form \eqref{eqq25}. \end{proposition} We may also consider another scenario in which \(\eta\) is a KV: The case \(\gamma-\psi=c=constant\) (we will assume that \(m,l\neq 0\)). From \eqref{eqq9} we have \begin{eqnarray}\label{eqq26} l\psi_{,z}+m\psi_{,\rho}=-\beta, \end{eqnarray} which has the general solution \begin{eqnarray}\label{eqq27} \psi=-\frac{\beta}{m}\rho+r\left(l\rho-mz\right), \end{eqnarray} for an arbitrary smooth function \(r\left(l\rho-mz\right)\). We therefore have \begin{subequations} \begin{align} e^{2\psi}&=e^{-2\left(\frac{\beta}{m}\rho-r\left(l\rho-mz\right)\right)},\label{eqq28}\\ e^{2\gamma}&=\tilde{c}e^{-2\left(\frac{\beta}{m}\rho-r\left(l\rho-mz\right)\right)},\label{eqq29} \end{align} \end{subequations} where we have set \(\tilde{c}=e^{2c}\). \subsection{The case \(W_{,\rho}-2W\left(\gamma-\psi\right)_{,\rho}=0\)} The solution to \eqref{eq121} is given by \begin{eqnarray}\label{eq125} W=fe^{2\left(\gamma-\psi\right)}, \end{eqnarray} where \(f=f\left(z\right)>0\) is an arbitrary function of \(z\). Now, substituting for \(\Psi\) and \(W\) into \eqref{eq109} using \eqref{eq108} and \eqref{micp} we obtain (after some simplification) \begin{eqnarray}\label{michg1} l\left(f_{,z}-2f\left(\gamma-\psi\right)_{,z}\right)=0. \end{eqnarray} Hence we either have that \(l=0\) or \begin{eqnarray}\label{michg2} f_z-2f\left(\gamma-\psi\right)_{,z}=0. \end{eqnarray} We consider the two subcases in detail. \subsubsection{\(f_{,z}-2f\left(\gamma-\psi\right)_{,z}=0\)} First let us consider the case that \eqref{michg2} holds. Since \(f\) is a function of \(z\) only, then the solution to \eqref{michg2} is \begin{eqnarray}\label{michg3} f=\bar{k}e^{2\left(\gamma-\psi\right)}, \end{eqnarray} for positive constant \(\bar{k}\), which implies \(\left(\gamma-\psi\right)_{,\rho}=0\), i.e. \(W\) is a function of \(z\) only, in which case \begin{eqnarray}\label{redt1} \Psi=l\left(\gamma-\psi\right)_{,z}. \end{eqnarray} We therefore have that \eqref{eq125} becomes \begin{eqnarray}\label{michg4} W=\bar{k}e^{4\left(\gamma-\psi\right)}. \end{eqnarray} Since the difference \(\left(\gamma-\psi\right)\) is independent of \(\rho\), one has the following form of \(\gamma\) and \(\psi\): \begin{eqnarray}\label{todee} \begin{split} \gamma&=h_1\left(\rho\right)+\xi_1\left(z\right),\\ \psi&=h_2\left(\rho\right)+\xi_2\left(z\right); \end{split} \end{eqnarray} for arbitraty functions \(h_1,h_2,\xi_1,\xi_2\), where \(h_1\) and \(h_2\) differ by a constant (possibly zero). Comparing \eqref{eq102} and \eqref{eq107} we have (also using \eqref{micp}) \begin{eqnarray}\label{todee2} -R^2C_{4,\rho}e^{-2\psi}=C_{2,t}e^{2\left(\gamma-\psi\right)}. \end{eqnarray} Substituting \eqref{michg4} into \eqref{eq107} we have (after rearrangement) \begin{eqnarray}\label{todee3} -C_{4,\rho}e^{-2\psi}=\frac{1}{\bar{k}}\omega C_{1,\rho}e^{-4\left(\gamma-\psi\right)}, \end{eqnarray} which upon comparing with \eqref{todee2} gives \begin{eqnarray}\label{todee4} C_{2,t}=-\frac{1}{\bar{k}}\omega R^2C_{1,\rho}e^{6\left(\gamma-\psi\right)}. \end{eqnarray} Since \(C_2\) is a function of \(t\) only, \(C_1\) can be at most linear in \(\rho\), i.e., \begin{eqnarray}\label{todee5} C_1=g\rho+q_1, \end{eqnarray} for a constant \(q_1\) and some function \(g=g\left(t\right)\). Also, we must have that \begin{eqnarray}\label{todee6} \omega R^2e^{6\left(\gamma-\psi\right)}=q_2, \end{eqnarray} for a constant \(q_2\), in which case we have that \(\omega=\omega\left(z\right)\) and \(R\left(z\right)\). From \eqref{rhoeq} \(R\) takes the form \begin{eqnarray}\label{todee7} R=q_3z+q_4, \end{eqnarray} for constants \(q_3,q_4\). The component \(C_2\), from \eqref{todee4} therefore takes the form \begin{eqnarray}\label{todee8} C_2=-\frac{q_2}{\bar{k}}\int gdt, \end{eqnarray} where the constant \(q_2\) is specified by the functions \(\gamma,\psi\) and \(\omega\) (we will obtain \(\omega\) now) from \eqref{todee6}, while the component \(C_4\) becomes, from \eqref{todee3} \begin{eqnarray}\label{todee9} C_4=-\frac{\omega}{W}ge^{2\xi_2}\int e^{2h_2}d\rho. \end{eqnarray} Also, the function \(\omega\) is linear in \(z\). To see this, we use \eqref{eq101} and \eqref{micp} to simplify \eqref{eq104} as \begin{eqnarray}\label{todee10} C_{4,t}=-\frac{1}{k^2R^2}\left(\omega C_2h_{2,\rho}+l\omega_{,z}+4l\omega\xi_{2,z}-l\omega\xi_{1,z}\right). \end{eqnarray} Since \(C_4\) is a function of \(t\) and \(\rho\) only and \(\omega\) is a function of \(z\) only, \(\omega_{,z}=\sigma_1\) must be constant which gives \begin{eqnarray}\label{todee11} \omega=\sigma_1z+\sigma_2, \end{eqnarray} for constants \(\sigma_1,\sigma_2\). Furthermore, we also have that \(\omega\xi_{1,z}=\bar{\sigma}\) and \(\omega\xi_{2,z}=\sigma'\), for constants \(\bar{\sigma},\sigma'\), from which we obtain \(\xi_1\) and \(\xi_2\) respectively as \begin{subequations} \begin{align} \xi_1&=\frac{\bar{\sigma}}{\sigma_1}\ln\left(\sigma_1z+\sigma_2\right)+\bar{q},\label{todee12}\\ \xi_2&=\frac{\sigma'}{\sigma_1}\ln\left(\sigma_1z+\sigma_2\right)+q',\label{todee13} \end{align} \end{subequations} for constants \(\bar{q},q'\). Hence, using \eqref{todee}we have \begin{eqnarray}\label{todee14} \left(\gamma-\psi\right)_{,z}=\frac{\Delta\sigma}{\sigma_1z+\sigma_2}, \end{eqnarray} which gives \eqref{redt1} as \begin{eqnarray}\label{todee15} \Psi=l\frac{\Delta\sigma}{\sigma_1z+\sigma_2}, \end{eqnarray} where we have set \(\Delta\sigma=\bar{\sigma}-\sigma'\). We see that \(\Psi\) vanishes if and only if \(\Delta\sigma=0\). This is true if the difference \(\Delta\xi=\xi_1-\xi_2\) is constant, for \(\omega\neq 0\). However, notice also that the case \(\omega=0\) gives \(\Delta\sigma=0\), as well as \(\Delta\xi=\xi_1-\xi_2\) being constant. From \eqref{todee15} it is quite easy to see that homothety requires \(\sigma_1=0\). Hence, \(\omega\), \(\xi_1\) and \(\xi_2\) must be constants. We can therefore state to the following \begin{proposition}\label{lem100} Let the metric \eqref{sav10} admit HKVs of the form \eqref{sav32}, where \(C_i=C_i\left(t,\rho\right)\) for \(i\in\lbrace{1,2,3,4\rbrace}\). If \(g_{\phi\phi}=\left(1/k^2\right)fg_{\rho\rho}\), then for \(f\) of the form \eqref{michg3}, \(\psi\) and \(\gamma\) split as \eqref{todee} and \(\omega\) is constant.The HKVs are of the form \begin{eqnarray}\label{todee24} \eta=\left(g\rho+q_1\right)\partial_t-\frac{q_2}{\bar{k}}\tilde{g}\partial_{\rho}+l\partial_z-gG\left(\rho,z\right)e^{2\xi_2}\partial_{\phi}, \end{eqnarray} where we have defined the functions \begin{eqnarray*} \begin{split} \tilde{g}\left(t\right)'&=\int g\left(t\right)dt,\\ G\left(\rho,z\right)&=\frac{\omega}{W}\int e^{2h_2}d\rho, \end{split} \end{eqnarray*} for some function \(h_2=h_2\left(\rho\right)\) and constant \(\xi_2\). The associated conformal factor takes the form \eqref{todee15}, with \(\sigma_1=0\). We also have that \(\xi_1\) is constant. \end{proposition} \subsubsection{\(l=0\)} Next we consider the case \(l=0\). This case gives (from \eqref{eq106}) \begin{eqnarray}\label{todee16} \Psi=C_2\left(\gamma-\psi\right)_{,\rho}. \end{eqnarray} Combining \eqref{eq102} and \eqref{eq107} we have \begin{eqnarray}\label{todee17} C_{2,t}=\frac{1}{k^2}\frac{\bar{W}}{W}C_{1,\rho}e^{-2\left(\gamma-2\psi\right)}. \end{eqnarray} Again, \(C_2=C_2\left(t\right)\) and therefore we write \begin{eqnarray}\label{todee18} C_1=g'\rho+q'_1, \end{eqnarray} for some function \(g'=g'\left(t\right)\) and constant \(q'_1\). Furthermore, we must have \begin{eqnarray}\label{todee19} \frac{\bar{W}}{W}e^{-2\left(\gamma-2\psi\right)}=m', \end{eqnarray} for constant \(m'\), which gives \begin{eqnarray}\label{todee20} C_2=\frac{m'}{k^2}\int g'dt. \end{eqnarray} We obtain \(C_4\) from \eqref{eq107} as \begin{eqnarray}\label{todee21} C_4=-\frac{g'}{k^2}\int \omega e^{-2\left(\gamma-2\psi\right)}d\rho. \end{eqnarray} We therefore state the following \begin{proposition}\label{lem8} Let the metric \eqref{sav10} admit HKVs of the form \eqref{sav32}, where \(C_i=C_i\left(t,\rho\right)\) for \(i\in\lbrace{1,2,3,4\rbrace}\). If \(g_{\phi\phi}=\left(1/k^2\right)fg_{\rho\rho}\), then for \(l=0\), \(\psi\) and \(\gamma\) split as \eqref{todee} and \(\omega\) is constant.The HKVs are of the form \begin{eqnarray}\label{todee24} \left(g'\rho+q'_1\right)\partial_t+\frac{m'}{k^2}\tilde{g}'\partial_{\rho}-\frac{g'}{k^2}F\left(\rho,z\right)\partial_{\phi}, \end{eqnarray} where we have defined the functions \begin{eqnarray*} \begin{split} \tilde{g}'\left(t\right)&=\int g'\left(t\right)dt,\\ F\left(\rho,z\right)&=\int \omega e^{-2\left(\gamma-2\psi\right)}d\rho, \end{split} \end{eqnarray*} for some function \(h_2=h_2\left(\rho\right)\) and constant \(\xi_2\), where \(\tilde{g}'\) and \(\left(\gamma-\psi\right)_{,\rho}\) are nonzero constants (\(\tilde{g}'\) being constant implies \(g'\left(t\right)=0\)). The associated conformal factor is given by \begin{eqnarray}\label{todee23} \Psi=\frac{m'}{k^2}\tilde{g}'\left(\gamma-\psi\right)_{,\rho}. \end{eqnarray} \end{proposition} Indeed, an obvious solution for \(\gamma\) and \(\psi\) satisfying constant \(\left(\gamma-\psi\right)_{,\rho}\) is \begin{subequations} \begin{align} \gamma=h_3+\xi_3,\label{eqmicc442}\\ \psi=h_4+\xi_4,\label{eqmicc443} \end{align} \end{subequations} where \(h_3=h_3\left(\rho\right),h_4=h_4\left(\rho\right)\) are linear polynomials in \(\rho\) and \(\xi_3=\xi_3\left(z\right),\xi_4=\xi_4\left(z\right)\) are arbitrary functions of \(z\). \subsection{A particular case: \(\omega=0\)} We consider the particular case where the metric \eqref{sav10} has no twist term, i.e. \(\omega=0\). This subclass of \eqref{sav10} contains the well studied Zipoy-Voorhees spacetimes \cite{zi1,vo1}, and the functions \(\psi\) and \(\gamma\) satisfy the following system \begin{subequations} \begin{align} 0&=\psi_{,\rho\rho}+\frac{1}{\rho}\psi_{,\rho}+\psi_{,zz},\label{amk1}\\ 0&=\rho\left(\psi_{,\rho}^2-\psi_{,z}^2\right)-\gamma_{,\rho},\label{amk2}\\ 0&=2\rho\psi_{,\rho}\psi_{,z}-\gamma_{,z}.\label{amk3} \end{align} \end{subequations} In this case, from \eqref{eq104} and \eqref{eq107} it is either \(C_4=\bar{m}=constant\) or \(W=0\). We rule out the latter as \(\omega=0\implies \bar{W}=W\), in which case \(W=0\) implies that \(\underline{g}\) is noninvertible. Using \eqref{eq102} we have \begin{eqnarray}\label{todee22} C_{2,t}=\frac{1}{k^2}C_{1,\rho}e^{-2\left(\gamma-2\psi\right)}, \end{eqnarray} and again, as before we may write \begin{eqnarray}\label{todee23} C_1=\bar{g}\rho+\bar{q}_1, \end{eqnarray} for some function \(\bar{g}=\bar{g}\left(t\right)\) and constant \(\bar{q}_1\). Also, we have that \begin{eqnarray}\label{todee24} e^{-2\left(\gamma-2\psi\right)}=k', \end{eqnarray} where \(k'\) is some constant. This gives \(C_2\) as \begin{eqnarray}\label{todee25} C_2=\frac{k'}{k^2}\int \bar{g}dt. \end{eqnarray} It can be shown that either \(\bar{g}\) is constant or the \(\rho=0\). To see this, notice that taking the \(\rho\) and \(z\) derivatives of \eqref{todee24} respectively gives \begin{subequations} \begin{align} \left(\gamma-\psi\right)_{,\rho}&=\psi_{,\rho}\label{todee26}\\ \left(\gamma-\psi\right)_{,z}&=\psi_{,z}.\label{todee27} \end{align} \end{subequations} From \eqref{eq108} this gives \begin{eqnarray}\label{todee28} \Psi=C_2\psi_{,\rho}+l\psi_{,z}, \end{eqnarray} and upon substituting \eqref{todee28} into \eqref{eq101} we have \(C_{1,t}=0\), which gives \(\bar{g}=const.\) or \(\rho=0\) (we shall assume that \(\rho\neq 0\)). Substituting \eqref{todee27} into \eqref{amk3} we obtain \begin{eqnarray}\label{todee281} 2\psi_{,z}\left(\rho\psi_{,\rho}-1\right)=0. \end{eqnarray} Hence, either \(\psi=\psi\left(\rho\right)\) or \begin{eqnarray}\label{todee29} \psi=\ln\rho + \zeta, \end{eqnarray} for some function \(\zeta=\zeta\left(z\right)\). If \(\psi=\psi\left(\rho\right)\), then from \eqref{amk2} we have that either \(\psi\) is constant (\(\implies \gamma\) is constant) or \(\psi=2\ln\rho+d_1\) (\(\implies \gamma=4\ln\rho+d_2\)) for constants \(d_1,d_2\). In the case that \eqref{todee29} holds, we can use \eqref{amk1} and it is not difficult to see that \(\zeta\) is linear in \(z\) which allows us to specify \(\psi\) and \(\gamma\) completely. We therefore have the following three possible configurations of the functions \(\psi\) and \(\gamma\): \(\psi\) is constant (\(\implies \gamma\) is constant); or \(\psi=2\ln\rho+d_1\) (\(\implies \gamma=4\ln\rho+d_2\)) for constants \(d',\tilde{d}\); or \(\psi=\ln\rho + d_3z+d'\) (\(\implies\gamma=2 d_3z+\tilde{d}\)), for constants \(d_1,d_2,d_3,d',\tilde{d}\). Furthermore, the general form of the CKVs is given by \begin{eqnarray}\label{todee30} \eta=\left(\bar{g}\rho+\bar{q}_1\right)\partial_t+\frac{k'\bar{g}}{k^2}t\partial_{\rho}+l\partial_z+\bar{m}\partial_{\phi}, \end{eqnarray} for some function \(\bar{g}=\bar{g}\left(t\right)\) and \(k',\bar{m},\bar{q}_1\) are constants. The associated conformal factor is given as follows: \begin{enumerate} \item If \(\psi\) is constant (\(\implies \gamma\) is constant), then \begin{eqnarray}\label{todee31} \Psi=0, \end{eqnarray} in which case \(\eta\) is a KV. \item If \(\psi=2\ln\rho+d_1\) (\(\implies \gamma=4\ln\rho+d_2\)), then \begin{eqnarray}\label{todee31} \Psi=\frac{2k'\bar{g}}{k^2\rho}t, \end{eqnarray} \item If \(\psi=\ln\rho + d_3z+d'\) (\(\implies\gamma=2 \left(\ln\rho+d_3z\right)+\tilde{d}\)), then \begin{eqnarray}\label{todee31} \Psi=\frac{k'\bar{g}}{k^2\rho}t+ld_3. \end{eqnarray} \end{enumerate} Since the first case associates to trivial HKVs, i.e., the HKVs are KVs, only the last two cases associate to non-trivial HKV. We can therefore state the following \begin{proposition}\label{lem110} Let the metric \eqref{sav10}, with \(\omega=0\), admit CKVs of the form \eqref{sav32}, where \(C_i=C_i\left(t,\rho\right)\) for \(i\in\lbrace{1,2,3,4\rbrace}\). Then \eqref{sav32} are HKVs if neither \(\psi\) nor \(\gamma\) is constant, and \(\rho\) and \(\bar{g}t/\rho\) are constant with \(\rho\neq 0\) (if \(\rho=0\) then \(\bar{g}=0\) or \(t=0\) where we can rule out \(t=0\) as can be seen in \eqref{todee333} below). The form of the HKVs is given by \begin{eqnarray}\label{todee333} \eta=\left(\bar{g}\rho+\bar{q}_1\right)\partial_t+\frac{k'\bar{g}}{k^2}t\partial_{\rho}+l\partial_z+\bar{m}\partial_{\phi}. \end{eqnarray} \end{proposition} Notice that the case \(k=0\) can be avoided, since from \eqref{sav10} the resulting metric is just conformal to the real line, i.e., \begin{eqnarray*} \underbar{g}=-e^{2\psi}dt^2. \end{eqnarray*} \section{Discussion}\label{soc6} In this work, we have presented a detailed analysis for homothetic Killing vectors in the most general metric for SAV spacetimes. Our work has been restricted to analyzing the cases where the components of the homothetic Killing vectors are functions of the \(t\) and \(\rho\) coordinates only. As this is a very general consideration, this restriction simplified the conformal Killing equations and make them tractable. Once the existence of said homothetic Killing vectors is guaranteed, we have obtained the general forms that these vectors can take, along with their associated conformal factors. Firstly, it is seen that the component of any such homothetic Killing vector along the \(z\) direction - which is denoted by \(C_3\) - is necessarily constant. It is then further shown that a homothetic Killing vector must have either the component along the \(\rho\) direction - which is denoted by \(C_2\) - being constant or, the metric components \(\underline{g}_{\rho\rho}\) and \(\underline{g}_{\phi\phi}\) are proportional in a specific way via \eqref{eq125}. In the case that \(C_2\) is constant, the forms of the functions \(\psi\), \(\gamma\) and \(\Psi\) (as well as whether \(\Psi\) is vanishing or non-constant function of the \(\rho\) and \(z\) coordinates) are dependent on the choices of the constants \(C_2\) and \(C_3\). On the other hand, if the metric functions \(\underline{g}_{\rho\rho}\) and \(\underline{g}_{\phi\phi}\) are proportional, then either the component \(C_3\) is identically zero, or there is further restriction on the proportionality factor between \(\underline{g}_{\rho\rho}\) and \(\underline{g}_{\phi\phi}\). The latter presents a case where the functions \(\psi\) and \(\gamma\) split as a sum of functions of \(\rho\) and \(z\). Obtaining the homothetic Killing vectors is reduced to solving a second order partial differential equation in \(\gamma-\psi\), which, given the possible configurations of the constants \(C_2\) and \(C_3\), are either parabolic or hyperbolic. The two parabolic cases where one of the constants vanishes was the easier to solve generally, and the required form of the function \(R\) was obtained. The results are presented in Proposition \ref{lem201} and Proposition \ref{lem202}. For the hyperbolic case, we make some assumptions on the difference \(\gamma-\psi\): \begin{enumerate} \item the first assumption is that the difference \(\gamma-\psi\) can be written as the linear sum of a function \(S\) of \(\rho\) only and a function \(T\) of \(z\) only; and \item the second assumption is that the difference \(\gamma-\psi\) factors as a product of a function \(S\) of \(\rho\) only and a function \(T\) of \(z\) only. \end{enumerate} The results in the two cases are collected in Proposition \ref{lem203}. We also considered the case where the constants \(m\) and \(l\) simultaneously vanish, in which case the homothetic Kiling vectors are trivial, the result which is collected in Proposition \ref{lem6}. On the other hand, for the case where \(\underline{g}_{\rho\rho}\) and \(\underline{g}_{\phi\phi}\) are proportional, if the component \(C_3\) vanishes, then \(\tilde{g}'\) as defined in Proposition \ref{lem8}, and \(\left(\gamma-\psi\right)_{\rho}\) are both constants. If \(C_3=l\neq 0\) then there is further restriction on the proportionality factor between \(\underline{g}_{\rho\rho}\) and \(\underline{g}_{\phi\phi}\), in which case \(\psi\) and \(\gamma\) take the form \eqref{todee}. We also have that \(\omega\) is constant, and \(\xi_1\) and \(\xi_2\) are constants. In the case of vanishing \(\omega\), for non-constant \(\psi\) (and consequently \(\gamma\)), the result is collected in Proposition \ref{lem110}. Indeed, if \(\bar{g}\) is constant, then the coordinates \(t\) and \(\rho\) transform linearly as \(t\mapsto \alpha\rho\), for some arbitrary constant \(\alpha\). This transformation implies that the subclass of the metric \eqref{sav10} with vanishing rotation includes \(3\)-dimensional subspaces of \eqref{sav10}. This work appears to be the first work to provide such considerations to HKV in the general metric \eqref{sav10}, and hence provides an incentive to further generalization and understanding some of the physical implications of the results herein. Another general problem to potentially consider would be investigating proper conformal Killing vectors in these spacetimes. \section*{Acknowledgments} RG is supported by National Research Foundation (NRF) of South Africa. SDM acknowledges that this work is based on research supported by the South African Research Chair Initiative of the Department of Science and Technology and the National Research Foundation. PKSD acknowledges support from the First Rand Bank, South Africa, and AS acknowledges support from the First Rand Bank, through the Department of Mathematics and Applied Mathematics, University of Cape Town, South Africa.
\section{Introduction} \label{sec:intro} % Even before the Covid-19 pandemic, the World Health Organization declared social disconnection a major public health challenge, since the lonely and socially isolated face heightened morbidity and mortality risks: today, lonely people are 30\% more likely to die early than less lonely ones \cite{Leigh2017,Alberti2019,Courtet2020}. To address this crisis and prompted by reports that about 13\% of its population feel lonely some or all of the time and that this social disconnection may be costing its economy 32 billion pounds a year \cite{Cox2017}, the United Kingdom created a Ministry of Loneliness in 2018. Japan followed suit in 2021. Against this current, the Covid-19 pandemic has brought unprecedented efforts to enforce social distancing and quarantining all over the world. While these measures are unarguably pivotal to preventing the spread of this disease, they will undoubtedly have consequences for mental health in both the short and long term. For many people today, the choice is between physical infection and mental breakdown \cite{Miller2020,Galea2020,Saltzman2020}. Understanding those consequences from a quantitative perspective is of sufficient importance to merit a fraction of the attention spent on the mathematical and computational modeling of the Covid-19 transmission dynamics (see, e.g., \cite{Bellomo_20}). In fact, given the well-established influence of positive affect on cognitive function and hence on productivity (see, e.g., \cite{Isen_87,Oswald_15}), the long-term socio-economic implications of the Covid-19 pandemics may be far more serious than the prognoses of the economic pundits \cite{Nicola2020}. Accordingly, to address the impact of social distancing on individual and population level mental health we use an agent-based model to simulate a community dynamics where the feelings of loneliness of an agent is measured by a real variable - the loneliness degree - that determines the propensity of the agent to initiate a social interaction (or conversation) as well as to terminate an ongoing interaction. The loneliness degree increases when the agent is alone and decreases when it is socializing, in agreement with the findings that positive affect increases significantly after social interaction \cite{Phillips_67,McIntyre_91,Cacioppo_09}. Social (or, more correctly, physical) distancing is modeled by controlling the number of attempts an agent makes to find a conversation partner. More importantly, our model takes into account the quality of the social interaction that is measured by the rate at which the degree of loneliness decreases during a social interaction. In fact, a unique characteristic of the current pandemic is the wide access to technology that, in principle, might help buffer loneliness and isolation \cite{Smith2018,Banskota2020}. However, evidence of heightened psychological problems amongst the youth in the wake of this pandemic \cite{Liang2020} indicates that the abundance of virtual social contacts may have actually little or even negative impact on the feelings of loneliness \cite{Miller2018} as the so-called `Zoom fatigue' illustrates so nicely. Hence the quality of the social interactions matters, regardless of whether they are virtual or physical \cite{Moorman2016}. Our approach builds on an agent-based model proposed to address the influence of social distancing on productivity \cite{Peter2021}. However, in addition to the agent-based simulations, here we offer an analytical mean-field approximation that describes the simulation results very well and allows our results and conclusions to be easily verified for distinct parameter settings. Our main finding is that decrease of the number, quality or duration of social contacts lead the community to enter a regime of burnout in which the degree of loneliness diverges. This regime of mental breakdown is separated from the healthy regime, where the degree of loneliness is finite, by a continuous phase transition in the sense that the proportion of lonely agents in the community changes continuously when transitioning between those regimes. This unexpected threshold phenomenon highlights our unfamiliarity with the mental health consequences of isolation and loneliness resulting from the social distancing measures. \section{Model}\label{sec:model} We consider a community composed of $N$ agents that can either interact socially or remain alone depending on their feelings of loneliness. The feeling of loneliness of an agent, say agent $k$, is measured by its loneliness degree $L_k \in \mathbb{R}$ that, in turn, determines the propensity of this agent to seek and engage in social interaction as well as to end an ongoing interaction. Here we assume that lonely people feel the need for company \cite{Alberti2019}. In addition, we assume that $L_k$ is affected differently depending on whether agent $k$ is alone or interacting with another member of the community. This assumption introduces a feedback between loneliness and behavior that is responsible for the nontrivial results of the model dynamics. If agent $k$ is alone then the probability that it will attempt to instigate a conversation with another lonely agent is given by $p_k = p(L_k)$, where $p(x) \in [0,1]$ is an arbitrary function. When the lone agent $k$ decides to instigate a conversation, it selects a number $m$ of contact attempts, where $m =0, 1, \ldots$ is a random variable drawn from a Poisson distribution of parameter $q$. In each contact attempt, a mate is selected at random among the $N-1$ agents in the community and, in case the selected agent is alone at that moment, a conversation is initiated and the agent $k$ halts its search for a mate. If none of the $m$ selected agents are alone, then the attempt of the agent to socialize fails and it remains alone. A conversation or social interaction involves two agents only and the agent that is approached by agent $k$ is obliged to accept the interaction, regardless of its loneliness degree. This pro-social behavior is chosen in order to not further complicate the model, but it can be justified in terms of social norms especially during the current pandemic when there is a pressure to talk to everyone because one worries that they are lonely and one does not want to turn them down. Of course, this pro-social behavior is one of the causes of the Zoom fatigue. If agent $k$ is socializing then the probability that it will unilaterally interrupt the conversation is given by $r_k = r(L_k)$, where $r(x)\in [0,1]$ is another arbitrary function. In addition, the rate of change of the loneliness degree of agent $k$ is determined by the function $M_a(L_k) \in \mathbb{R} $ if it is alone and by the function $ M_s(L_k) \in \mathbb{R} $ if it is socializing. The asynchronous evolution of the community of $N$ agents at time $t$ proceeds as follows. In the time interval $\delta t$, we pick an agent at random, say agent $k$, and check if it is alone or socializing. In case it is alone, we change its loneliness degree according to the prescription \begin{equation}\label{Ma_1} L_k^{t+\delta t} = L_k^{t} + M_a (L_k) \delta t \end{equation} and test if it will attempt to initiate a conversation using the socializing probability $p_k = p(L_k^t)$. As mentioned before, this attempt involves the selection with replacement of at most $m$ members of the community until another lone agent is found. In case agent $k$ is socializing, we change its loneliness degree according to the prescription \begin{equation}\label{Ms_1} L_k^{t+\delta t} = L_k^{t} + M_s (L_k) \delta t \end{equation} and then check if it will terminate the conversation using the termination probability $r_k = r(L_k^t)$. In case it does, both agent $k$ and its mate become lonely at time $ t + \delta t$. As usual in such asynchronous update scheme, we choose the time increment as $\delta t = 1/N$ so that during the increment from $t$ to $t+1$ exactly $N$, though not necessarily distinct, agents are chosen to follow the update rules. To avoid misinterpretations of the behavioral rules described above, it is convenient to write them in a more formal manner. For instance, given that agent $k$ is alone at time $t$, the probability that it will remain alone at time $t+\delta t$ is % \begin{eqnarray}\label{a_a_1} Q_k(a,t+\delta t \mid a, t) & = & \frac{1}{N} \left [ 1-p_k + p_k e^{ -q (N_a^t-1)/(N-1)} \right ] \nonumber \\ & & \mbox{} + \frac{1}{N} \sum_{i \in \mathcal{L}_a^t; i \neq k} [ 1-p_i + p_i e^{- q/(N-1)} ] \nonumber \\ & & \mbox{} + \frac{N-N_a^t}{N}, \end{eqnarray} where $N_a^t$ and $ N - N_a^t$ are the numbers of lone and socializing agents at time $t$, respectively. The sum in the second term of the rhs of this equation is over the subgroup of lone agents $\mathcal{L}_a^t$, except agent $k$, at time $t$. For notational simplicity, we have omitted the time dependence of $p_k$. The first term of the rhs of equation (\ref{a_a_1}) accounts for the possibility that agent $k$ is the agent selected for update, which is an event that happens with probability $1/N$. In this case there are two possibilities: agent $k$ decides to remain alone, which happens with probability $1-p_k$ or decides to instigate a conversation but fails to find another lone agent, which happens with probability \begin{equation} p_k \sum_{m=0}^\infty e^{-q} \frac{q^m}{m!} \left ( 1 - \frac{N_a^t-1}{N-1} \right )^m = p_k e^{-q (N_a^t-1)/(N-1)} . \end{equation} The second term of the rhs of equation (\ref{a_a_1}) accounts for the possibility that a lone agent $i \neq k$ is chosen for update and that this agent either decides to remain alone, which has probability $1-p_i$, or instigate a conversation with any other agent but agent $k$, which has probability \begin{equation} p_i \sum_{m=0}^\infty e^{-q} \frac{q^m}{m!} \left ( 1 - \frac{1}{N-1} \right )^m = p_i e^{- q/(N-1)} . \end{equation} Finally, the third term of the rhs of equation (\ref{a_a_1}) accounts for the possibility that the agent selected for update in the time interval $\delta t$ is one of the $N-N_a^t$ agents that are socializing at time $t$. Since a lone agent at time $t$ can either remain alone or start socializing at time $t+ \delta t$, the probability that the lone agent $k$ at time $t$ starts socializing during the time interval $\delta t$ is readily obtained from the complement rule of probability, \begin{eqnarray}\label{s_a_1} Q_k (s,t+\delta t \mid a, t) & = & \frac{p_k}{N} \left [ 1- e^{-q (N_a^t-1)/(N-1)} \right ] \nonumber \\ & & \mbox{} + \sum_{i \in \mathcal{L}_a^t; i \neq k} \frac{p_i}{N} \left [ 1- e^{ - q/(N-1) } \right ] . \nonumber \\ & & \mbox{} \end{eqnarray} Next, we assume that agent $k$ is socializing with agent $k'$ at time $t$. The probability that this interaction continues during the time interval $\delta t$ is simply \begin{equation}\label{t_t_1} Q_{k,k'} (s,t+\delta t \mid s, t) = \frac{1}{N} (1-r_k) + \frac{1}{N} (1-r_{k'}) + \frac{N-2}{N} , \end{equation} where we have omitted the time dependence of $r_k$ and $r_{k'}$. Here the first two terms of the rhs of this equation account for the events that agents $k$ and $k'$ are selected for update and they choose not to interrupt their conversation. The last term of the rhs of equation (\ref{t_t_1}) accounts for the event that any other agent, aside from $k$ and $k'$, is selected for update at time $t$. As before, the event that $k$ and $k'$ will terminate their conversation during the time increment $\delta t$ is complementary to the event that they will continue the conversation, i.e., \begin{equation}\label{a_s_1} Q_{k,k'} (a,t+\delta t \mid s, t) = \frac{1}{N} \left ( r_k + r_{k'} \right ) . \end{equation} To conclude the set up of our model, two remarks are in order. First, we note that equations (\ref{a_a_1}) and (\ref{t_t_1}) are probabilities of events that occur in the time interval $\delta t $ and so they should be proportional to $\delta t$. This is in fact the case provided we set $\delta t = 1/N$. Here we will not consider the unrealistic limit of infinitely large communities $N \to \infty$ which would correspond to a continuous-time model of the community dynamics. Second, equation (\ref{t_t_1}) introduces a short-time correlation between the loneliness degrees and behaviors of agents $k$ and $k'$ that hinders an exact analytical approach to solve the model. However, in the next section we will set forth a simple mean-field approximation that yields a remarkably good description of some macroscopic features of the community dynamics. \section{Mean-field approximation}\label{sec:MF} Here we offer a simple but surprisingly effective analytical approximation to the agent-based model described in the previous section. A macroscopic quantity of interest is the number of lone agents $N_a^t$ in the community at time $t$. In the time interval $\delta t $ this random variable can increase by two agents, decrease by two agents or remain the same. More pointedly, given $N_a^t$ and the loneliness degrees $L_k^t, k=1, \ldots, N $ at time $t$, the probabilities of those events are \begin{eqnarray} P \left ( N_a^{t+\delta t} = N_a^t + 2 \right) & = & \sum_{k \in \mathcal{L}_s^t} \frac{r_k}{N} \\ P \left ( N_a^{t+\delta t} = N_a^t - 2 \right ) & =& \sum_{k \in \mathcal{L}_a^t} \frac{p_k}{N} \left [ 1 - e^{-q (N_a^t-1)/(N-1)} \right ] \nonumber \\ & & \mbox{} \end{eqnarray} and $P \left ( N_a^{t+\delta t} = N_a^t \right ) = 1 - P \left ( N_a^{t+\delta t} = N_a^t + 2 \right ) - P \left ( N_a^{t+\delta t} = N_a^t - 2 \right )$. Hence the expected number of lone agents at time $t+ \delta t$ given that there are $N_a^t$ lone agents at time $t$ is % \begin{eqnarray}\label{ex_Na} \langle N_a^{t+\delta t} \rangle & = & N_a^t + 2 P \left ( N_a^{t+\delta t} = N_a^t + 2 \right ) \nonumber \\ & & \mbox{} -2 P \left ( N_a^{t+\delta t} = N_a^t - 2 \right ) . \end{eqnarray} In a similar vein, we can write the expected loneliness degree of agent $k$ at $t + \delta t$ as \begin{eqnarray} \langle L_k^{t + \delta t} \rangle & = & \left [ L_k^{t} + M_a (L_k^t) \delta t \right ] \frac{1}{N} \frac{N_a^t}{N} \nonumber \\ & & \mbox{} + \left [ L_k^{t} + M_s (L_k^t) \delta t \right ] \frac{1}{N} \frac{N-N_a^t}{N} + L_k^t \frac{N-1}{N} \nonumber \\ & = & L_k^{t} + \frac{N_a^t}{N} \left [ M_a (L_k^t) - M_s (L_k^t) \right ] \frac{\delta t}{N} \nonumber \\ & & \mbox{} + M_s (L_k^t) \frac{\delta t}{N}, \end{eqnarray} where we have used that the probabilities that agent $k$ is alone or socializing at time $t$ are $N_a^t/N$ and $(N-N_a^t)/N$, respectively. To proceed further we make the usual mean-field assumption $N_a^t \approx \langle N_a^{t} \rangle \equiv N \eta^t $ and $L_k^t \approx \langle L_k^{t} \rangle $ (see, e.g., \cite{Huang_63}). In addition, we assume that the mean loneliness degree is the same for all agents, i.e., $ \langle L_k^{t} \rangle = \langle L^{t} \rangle \equiv l^t$. These assumptions suffice for writing the mean-field version of the community dynamics, \begin{eqnarray}\label{mf_1} \eta^{t+\delta t} & = & \eta^t + 2 (1-\eta^t) r(l^t) \delta t \nonumber \\ & & \mbox{} - 2 \eta^t p (l^t) \left [ 1 - \exp \left (-q \frac{\eta^t-1/N}{1-1/N} \right ) \right ] \delta t \end{eqnarray} \begin{equation}\label{mf_2} l^{t + \delta t} = l^{t} + \left [ \eta^t \left ( M_a (l^t) - M_s (l^t) \right ) + M_s (l^t) \right ] \frac{\delta t}{N} \end{equation} where we have used $\delta t = 1/N $ in equation (\ref{mf_1}) to stress the incremental nature of the intensive variable $\eta^t$. In the case equation (\ref{mf_2}) has a fixed point $l^{t+\delta t} = l^{t} = l^*$, the equilibrium fraction of lone agents $\eta^{t+\delta t} = \eta^{t} = \eta^*_h$ is given by \begin{equation}\label{eta*} \eta^*_h = \frac{M_s (l^*)}{M_s (l^*) - M_a (l^*)} \end{equation} with $l^*$ given by the solution of the transcendental equation \begin{equation}\label{l*} - \frac{M_a (l^*) r(l^*)}{M_s (l^*) p(l^*)} = 1 - \exp \left (-q \frac{\eta^*_h-1/N}{1-1/N} \right ) . \end{equation} The subscript $h$ in our notation for the equilibrium fraction of lone agents $\eta^*_h$ stands for healthy since $l^*$ is finite for this solution. The condition $\eta^*_h \in [0,1] $ requires that either $M_a(l^*) < 0$ and $M_s(l^*) >0$ or $M_a(l^*) > 0$ and $M_s(l^*) <0$. Since $l^t$ measures the degree of loneliness of a generic agent we will assume that $M_a(l^t) > 0$ and $M_s(l^t) < 0$ which, according to equations (\ref{Ma_1}) and (\ref{Ms_1}), means that the loneliness degree of an agent increases when it is alone and decreases when it is socializing. An interesting situation occurs when equation (\ref{l*}) has no solution so that $l^t \to \infty $ in the limit $t \to \infty$. This divergence characterizes a burnout regime where the equilibrium fraction of lone agents $\eta_b^*$ is given by the solution of the equation \begin{equation}\label{etab*} \lim_{l^t \to \infty} \frac{r(l^t)}{p(l^t)} = \frac{\eta^*_b}{1-\eta^*_b} \left [ 1 - \exp \left (-q \frac{\eta^*_b -1/N}{1-1/N} \right ) \right ], \end{equation} which is obtained from equation (\ref{mf_1}) by setting $\eta^{t+\delta t} = \eta^t = \eta^*_b$ and the subscript $b$ in $\eta^*_b$ stands for burnout. \section{Results}\label{sec:res} In the previous sections, we have made no assumptions on the probability functions $p(l) $ and $r(l)$ that determine the effect of the loneliness degree $l$ on the behavior of the agents. The functions $M_a(l) > 0$ and $M_s(l) < 0$ that determine the changes on the loneliness degree of lone and socializing agents, respectively, were left unspecified too. However, in order to simulate the model we need to specify those functions. Here we assume that the propensity to instigate a conversation is a decreasing function of the loneliness degree of the agents, \begin{equation} p(l) = \frac{1}{2} \left [ 1 + \tanh (\beta l ) \right ], \end{equation} where $\beta \geq 0$ is a parameter that determines the influence of the loneliness on the behavior of the agent. For instance, for $\beta =0$, the loneliness has no effect on an agent's decision to instigate or not a conversation, whereas for $\beta \to \infty$ a lone agent will always attempt to socialize when $l > 0$. Moreover, we assume that the probability that a socializing agent terminates a conversation does not depend on its loneliness degree, i.e., $r(l) = r \in [0,1]$, since there are many external factors that may result in the interruption of a conversation, in contrast to the longing to socialize, which is most likely fed by internal factors \cite{Alberti2019}. Finally, for the sake of simplicity, we assume that the rates of change of the loneliness degrees are constant, i.e., $M_a (l) = a > 0$ and $M_s (l) = - s < 0$. Without loss of generality, we set $a=1$, since this parameter can be removed from our equations by a proper rescaling of $L_k$, $s$ and $\beta$. With the above choices we can rewrite equations (\ref{eta*}) and (\ref{l*}) and obtain explicit expressions for $\eta^*_h $ and $l^*$, viz., \begin{equation}\label{eta**} \eta^*_h = \frac{s}{1+s} \end{equation} \begin{equation}\label{l**} l^* = \frac{1}{2 \beta} \ln \left ( \frac{\Lambda}{1-\Lambda} \right) \end{equation} where \begin{equation}\label{lambda} \Lambda = \frac{r/s}{ 1 - \exp \left (-q \frac{s/(1+s)-1/N}{1-1/N} \right ) }. \end{equation} This fixed point exists provided that $\Lambda < 1$ and a necessary (but not sufficient) condition for this happening is $r/s < 1$. In fact, a small value of $r$ implies that the conversations last longer and a large value of $s$ implies that they bring about a substantial diminution of the feelings of loneliness. (We recall that the comparison baseline of $s$ is the increment of the loneliness degree of the lone agents, viz., $a=1$.) Hence, the lesser the rate $r/s$, the healthier the agents, provided, of course, that they can find conversation partners whenever they need one. What happens in the case that $\Lambda \geq 1$? Iterating equations (\ref{mf_1}) and (\ref{mf_2}) with $\delta t = 1/N$ (see figure \ref{fig:1}) we find that $l^t \to \infty $ in the limit $t \to \infty$ whereas $\eta^t$ tends to the finite value $\eta^*_b$ given by equation (\ref{etab*}), which reduces to % \begin{equation}\label{eta2} r = \frac{\eta^*_b}{1-\eta^*_b} \left [ 1 - \exp \left (-q \frac{\eta^*_b -1/N}{1-1/N} \right ) \right ] \end{equation} since $\lim_{t \to \infty} p(l^t) = 1$ and $r(l^t) = r$. We note that for $\Lambda = 1$ equation (\ref{eta2}) reduces to equation (\ref{eta**}), i.e., $\eta^*_b = \eta^*_h$, so that the transition between the healthy and burnout regimes is continuous regarding the asymptotic mean fraction of lone agents. In fact, the condition $\Lambda = 1$ determines the critical value of the mean number of attempts to make a social contact \begin{equation}\label{qc} q_c = - \frac{1-1/N}{s/(1+s)-1/N} \ln \left ( 1 - r/s \right ) \end{equation} with $r/s < 1$. The healthy regime occurs for $q > q_c$ (i.e., $ \Lambda < 1$) and the burnout regime for $q \leq q_c$ (i.e., $ \Lambda \geq 1$). In the case that $r/s > 1$, the model exhibits the burnout regime only with $\eta^*_b$ given by equation (\ref{eta2}). In this case, the equilibrium fraction of lone agents does not depend on $s$. \begin{figure}[t] \centering \includegraphics[width=.8\columnwidth]{fig1.pdf} \caption{Time evolution of the mean fraction of lone agents $\eta^t$ (left panel) and mean loneliness per agent $l^t$ (right panel) for a population of size $N=50 $ and mean number of contact attempts (from top to bottom) $q=0.1, 0.3, 0.5, 1$ and $3$. The other parameters are $r=0.25$, $s=1$ and $\beta = 1$. The critical point occurs at $q_c = 0.587$. The colored thick lines are the mean-field predictions and the black thin lines are the averages over $10^2$ independent agent-based simulations. The initial conditions are $N_a^0=N$ and $L_k^0 = 0, k=1, \ldots, N$ so that $\eta^0 = 1$ and $l^0 = 0$. } \label{fig:1} \end{figure} In figure \ref{fig:1}, we show the time evolution of $\eta^t$ and $l^t$ for the simulation of the agent-based model as well as for the mean-field approximation. The agreement between them is so remarkable that we have averaged those quantities over only 100 independent simulations in order to make the differences noticeable, though with no success in the case of the mean loneliness degree $l^t$. This agreement seems rather puzzling at first sight because the mean-field approximation exhibits a phase transition between the healthy and burnout regimes that cannot be observed in the `finite' agent-based system of our simulations. In fact, the signatures of the phase transition, viz., the discontinuity of the derivative of the asymptotic value of $\eta^t$ with respect to $q$ and the divergence of the asymptotic value of $l^t$ at $q=q_c$, appear in the `thermodynamic' limit only. As just hinted, the thermodynamic limit in our model is the time asymptotic limit $t \to \infty$ and since we cannot run infinitely long simulations we will never see those signatures in our simulation results. In figure \ref{fig:2}, we illustrate this point by showing $\eta^t$ and $l^t$ evaluated at times $t=10^3, 10^4$ and $10^5$. These results indicate that the mean-field fixed points describe very accurately the asymptotic time behavior of the agent-based model. \begin{figure}[t] \centering \includegraphics[width=.8\columnwidth]{fig2.pdf} \caption{ Mean fraction of lone agents $\eta^t$ (left panel) and mean loneliness per agent $l^t$ (right panel) evaluated at $t=10^3$ ($\triangledown$), $t=10^4$ ($\triangle$) and $t=10^5$ ($\circ$) as functions of the mean number of contact attempts $q$. The symbols represent the averages over $10^4$ independent agent-based simulations. The solid lines are the mean-field predictions for the limit $t \to \infty$. The critical point occurs at $q_c = 0.587$. The other parameters are $N=50 $, $r=0.25$, $s=1$ and $\beta = 1$. } \label{fig:2} \end{figure} In figure \ref{fig:3}, we show that the excellent agreement between the simulation and the mean-field results holds for other values of the model parameters too. As pointed out before, the discrepancies observed near the critical region are most likely due to the fact that we evaluate the time-asymptotic quantities at the finite time $t=10^5$. In particular, this figure highlights the curious finding that the rate of decrement of the loneliness degree due socialization $s$ has no influence on the number of lone agents in the burnout regime. The limit $q \to \infty$ guarantees that a lone agent will always find a conversation partner if there is one available. In this case, the mean-field approximation yields $\eta_h^* = s/(1+s)$ and $l^* =(1/2\beta)\ln \left [ (r/s)/(1-r/s) \right ]$ if $r/s < 1$, and $\eta_b^* = r/(1+r)$ and $l^* \to \infty$ if $r/s \geq 1$. Since the mean-field approximation describes the simulation results so well, it is instructive to look into its predictions near the critical point $q_c$ for $r/s < 1$. In the healthy regime ($q > q_c$) we find \begin{equation} l^* \approx \frac{1}{2 \beta} \ln ( q- q_c) \end{equation} and $ \eta^*_h = s/(1+s) $, whereas in the burnout regime ($q < q_c$) we find % \begin{equation} \eta^*_b \approx \frac{s}{1+s} + \mathcal{A} (1 - \frac{q}{q_c}), \end{equation} % where % \begin{equation} \mathcal{A}= - \ln (1-r/s) \frac{s(s-r)(1-1/N)}{q_c s(s-r) + r(1+s)^2(1-1/N)} > 0 . \end{equation} % Hence, if we define the order parameter of the phase transition as $ \rho = \eta_b^* - \eta_h^*$ then $\rho \sim ( q_c - q )$ as we approach the critical point from the burnout regime. \begin{figure}[t] \centering \includegraphics[width=.8\columnwidth]{fig3.pdf} \caption{Mean fraction of lone agents $\eta^t$ (left panel) and asymptotic mean loneliness per agent $l^t$ (right panel) evaluated at $t=10^5$ as functions of the mean number of contact attempts $q$ for (left panel from top to bottom) $s = 2,1.5, 1 $ and $0.5$. The symbols represent the averages over $10^4$ independent agent-based simulations and the solid lines are the mean-field predictions for the limit $t \to \infty$. The other parameters are $N=50 $, $r=0.5$ and $\beta = 1$. The data for $s=0.5$ is not shown in the right panel because $l^*$ diverges in the mean-field approximation and the simulations yield results that are well above the range of the y-axis. } \label{fig:3} \end{figure} At this stage, it is convenient to consider a more microscopic perspective of the community dynamics. We begin by pointing out that, since the $N$ agents are identical regarding the behavioral rules, the mean proportion of time that, say, agent $k$ spends alone equals the mean fraction of lone agents in the population for large $t$. Our simulations indicate that this equality holds true only when those quantities are averaged over many independent simulations, hence the adjective `mean' in the above statement. \begin{figure}[t] \centering \includegraphics[width=.8\columnwidth]{fig4.pdf} \caption{Sequence of flips between the conditions alone (\textsl{a}) and socializing (\textsl{s}) for a single agent in a single run (left panel) and probability distributions of the lengths of time $\tau $ that the agent spends in states \textsl{a} and \textsl{s} as indicated (right panel). The parameters are $N=50 $, $r=0.1$, $s=2$ and $\beta = 1$. The exponential probability distributions with means $\langle \tau_\textsl{a} \rangle/N = 10$ and $\langle \tau_\textsl{s} \rangle/N = 5$ were obtained using $10^4$ independent runs. } \label{fig:4} \end{figure} The left panel of figure \ref{fig:4} shows the flips between the alone ($\textsl{a}$) and the socializing ($\textsl{s}$) states experienced by a particular agent during a single run. The quantities of interest here are the lengths of the periods the agent spends alone $\tau_\textsl{a}$ and socializing $\tau_\textsl{s}$, whose probability distributions are shown in the right panel of the figure. Since those distributions are observed to be exponential distributions for large $t$, knowledge of the means $\langle \tau_\textsl{a} \rangle $ and $\langle \tau_\textsl{s} \rangle $ suffice to describe the random quantities $\tau_\textsl{a}$ and $\tau_\textsl{s}$ in the time-asymptotic limit. The probability distribution of $\tau_\textsl{s}$ is clearly exponential since once a couple of agents start socializing the duration of their conversation does not depend on their previous histories: the conversation is interrupted when either of the two socializing agents chooses to terminate it, which happens with probability $2r/N$ [see equation (\ref{a_s_1})] so that $\langle \tau_\textsl{s} \rangle/N = 1/2r$ \cite{Feller_68}. As expected, the simulation results perfectly agree with this prediction (data not shown) which, we emphasize, does not involve any approximation. However, the waiting time $\tau_\textsl{a}$ for a particular lone agent to start a social interaction does depend on its previous experiences since the propensity to socialize depends on its loneliness degree which, in some sense, encapsulates the life history of the agent. For instance, if the agent has just terminated a long conversation it is likely to spend a long time alone before being tempted to socialize again. Nevertheless, our simulations indicate that the probability distribution of $\tau_\textsl{a}$ can be described exceedingly well by an exponential distribution. In figure \ref{fig:5} we show $\langle \tau_\textsl{a} \rangle/N$ as function of the conversation termination probability $r$ for fixed $q$. In this setting, the phase transition occurs at \begin{equation}\label{rc} r_c /s= 1 - \exp \left (-q \frac{s/(1+s)-1/N}{1-1/N} \right ), \end{equation} which corresponds to the condition $\Lambda = 1$ in equation (\ref{lambda}). Since $r_c \leq 1$ there is a value of $s$ above which there is no phase transition and the model exhibits the healthy regime only. For $q=1$, this happens for $s > 2.06$. In contrast to $\langle \tau_\textsl{s} \rangle/N$, the different time-asymptotic regimes strongly impact the dependence of $\langle \tau_\textsl{a} \rangle/N$ on $r$, as seen in figure \ref{fig:5}. This is expected because the probability of finding a conversation partner (and hence of ending the loneliness period) depends on the fraction of lone agents $\eta^t$ in the community, which, in turn, exhibits rather distinct functional forms in the healthy and burnout regimes, as illustrated in figure \ref{fig:3}. \begin{figure}[t] \centering \includegraphics[width=.8\columnwidth]{fig5.pdf} \caption{Mean time per agent that an agent spends alone $\langle \tau_\textsl{a} \rangle/N $ as function of the conversation termination probability $r$ for (top to bottom) $s=4,2,1,0.5$ and $0$. The symbols represent the averages over $10^3$ independent simulations with the waiting times $\tau_\textsl{a}$ recorded for $t \in [10^5,10^6]$. The solid lines are the predictions of the ansatz (\ref{ansatz}). The other parameters are $N=50 $, $q=1$ and $\beta = 1$. } \label{fig:5} \end{figure} We observed that our simulation results for $\langle \tau_\textsl{a} \rangle/N$ can be described by a rather simple analytical expression (solid lines in figure \ref{fig:5}) for which we have no explanation. The probability of the joint event that the lone agent $k$ is chosen for update at time $t$, decides to instigate a conversation and succeeds in finding another lone agent to interact with is % \begin{equation} Q'_{k} = \frac{ p_k}{N} \left [1- \exp \left (-q \frac{\eta^t-1/N}{1-1/N} \right ) \right ] , \end{equation} % which is the first term of the rhs of equation (\ref{s_a_1}). In the limit of large $t$, we can replace $\eta^t$ by its mean-field estimate, namely, $\lim_{t \to \infty} \eta^t = \eta_h^*$ if $r \leq r_c$ and $\lim_{t \to \infty} \eta^t = \eta_b^*$ if $r > r_c$. We find that the ansatz \begin{equation}\label{ansatz} \langle \tau_\textsl{a} \rangle/N = 1/(2 N Q'_k) \end{equation} % offers a perfect fit for the simulation results, as shown in figure \ref{fig:5}. In particular, using equation (\ref{l*}) for $r \leq r_c$ we obtain $N Q'_k = r/s$ for large $t$ so that $\langle \tau_\textsl{a} \rangle/N = s/2r$. For $r > r_c$ we obtain $\langle \tau_\textsl{a} \rangle/N = \eta_b^*/[2r(1-\eta_b^*)] $ where $\eta_b^*$ is the solution of equation (\ref{eta2}). We note that the natural guess $\langle \tau_\textsl{a} \rangle/N = 1/( N Q_k)$ with $Q_k$ given by equation (\ref{s_a_1}) yields qualitatively similar results but significantly underestimates the simulation results. It is interesting that both waiting times decrease with increasing $r$. While this result is obvious for $\tau_s$, it is less apparent for $\tau_a$. In fact, it is the high availability of lone agents resulting from short conversations that produces the decrease of $\tau_a$. The reverse is also true: long socialization periods lead to long periods of loneliness because of the shortage of available partners. In addition, in the healthy regime, the lengths of the loneliness periods increase with the efficacy of social interactions in reducing loneliness, which is measured by the parameters $s$. This is expected, since the lesser the degree of loneliness of an agent, the less the probability that it will seek social contact. In the burnout regime, however, $\langle \tau_\textsl{a} \rangle/N$ does not depend on $s$ provided, of course, that $s$ does not become sufficiently large to allow the transition to the healthy regime. \section{Conclusion}\label{sec:conc} Since the main measure to curb the spread of SARS-CoV-2 is physical distancing, rather than social distancing, one may argue that internet-based and social media usage may mitigate the feelings of loneliness during the Covid-19 pandemic \cite{Smith2018,Banskota2020}. It is unclear, however, if use of technology to socialize remotely can significantly minimize those feelings \cite{Miller2018}. The key issue here is, of course, the quality of the social interactions. Our model takes this point into account through the parameter $s>0$ that measures the efficacy of the social interactions in decreasing feelings of loneliness. In fact, even if the number of contact attempts is unlimited (i.e., $q \to \infty$) and the community size is very large (i.e., $N \to \infty$), which is likely the case of social media, an agent can experience burnout in the case that $s < r $, where $r$ is the probability that the agent ends the social interaction. We recall that $s < a = 1$ means that the rate of decrease of the feelings of loneliness when the agent is socializing is less than the rate of increase of those feelings when the agent is alone. It is clear then that $s$ can be used as a proxy for the quality of the social interactions. Therefore, our model describes the effects of the number of social contacts as well as of the quality of those contacts on loneliness. Both factors have been strongly affected by the physical distancing and quarantining measures widely implemented to prevent the spread of Covid-19. We find that decrease of the number, quality or duration of social contacts lead the community to enter a regime of burnout in which the feelings of loneliness of the agents, measured by the variable $l^t$, diverge. This happens through a continuous phase transition that separates the healthy from the burnout regimes and that can be identified by the discontinuity of the derivative of the asymptotic fraction of lone agents with respect to the parameters of the model. Since the mean-field approximation reproduces the simulation results very well, equations (\ref{eta*}), (\ref{l*}) and (\ref{etab*}) offer a general formulation of the community dynamics where no assumptions are made on the influence of loneliness on the behavior of the agents, which is determined by the probabilities $p(l^t)$ and $r(l^t)$, as well as on the effect of that behavior on the feeling of loneliness, which is determined by the rates $M_a(l^t)$ and $M_s(l^t)$. In that sense, the community dynamics will exhibit a burnout regime provided that $\lim_{l^t \to \infty} r(l^t)/p(l^t)$ is nonzero. The appearance of this regime in our model illustrates neatly the side effects of the measures employed to curb the transmission of Covid-19 on the population mental health. \bigskip \acknowledgments I thank Peter Hardy (University of Southampton) for sparking my interest on the modeling of the communal effects of social distancing. This research was supported in part by Grant No.\ 2020/03041-3, Fun\-da\-\c{c}\~ao de Amparo \`a Pesquisa do Estado de S\~ao Paulo (FAPESP) and by Grant No.\ 305058/2017-7, Conselho Nacional de Desenvolvimento Cient\'{\i}\-fi\-co e Tecnol\'ogico (CNPq).
\section{Introduction}\label{Introduction} \hspace{0.4cm}The problem we wish to address is the partial slip behaviour of a contact, which may be of general form, and subject to a normal load, $P$, moment, $M$, shear force, $Q$, and differential bulk tension, $\sigma$, see Figure \ref{fig:GeneralContactPorblem}. These quantities vary with time so that each has an oscillatory component and at least the normal load remains positive throughout the cyclic loading. Our practical motivation is to be able to understand how a number of real-world contacts respond. Examples include the flanks of fan blade dovetail roots in gas turbines and the locking segments employed in securing the riser connector in position on a seabed wellhead. \begin{figure}[t!] \centering \includegraphics[scale=0.7, trim= 0 0 0 0, clip]{Fig_GeneralHalf-PlaneContact.eps} \caption{General half-plane contact subject to a normal load, $P$ and a moment, $M$, with a differential tension, $\sigma = \sigma_{\text{A}} - \sigma_{\text{B}}$.} \label{fig:GeneralContactPorblem} \end{figure} Problems of this kind fall into two categories When the differential bulk tension, $\sigma$, is moderate, meaning the slip zones at each side of the contact are of the same sign, a method based on superposition of the full sliding traction, and whose lineage goes right back to the original paper \cite{Cattaneo_1938} may be used. Cattaneo showed that, for a Hertzian contact under constant normal load the sliding shear traction produced a linearly varying surface strain so that, by superposing a second, scaled form of the shear traction of opposite sign the relative slip displacement in the central, stick region is made zero, as required. J\"ager and Ciavarella later demonstrated that the same idea might be applied to a contact of any geometry \cite{Jaeger_1997}, \cite{Ciavarella_1998}. Nowell and Hills found that, for a Hertzian contact under constant normal load, in the presence of moderate tension the stick zone would be offset, and a similar superposition might again be used \cite{Hills_1987}. A major breakthrough came when Barber et al. \cite{Barber_2011} showed that a contact which traced out an a convex loop in normal force-shear force space might also be treated by a variation on the same ideas. Here, we do not wish to consider quite such a general problem in terms of the possible phase shift between the two components of load because we are interested in practical problems where one applied load (the centrifugal force in a gas turbine, the hydraulic locking pressure in a wellhead connector) excites all four components of local contact load but is then held constant while a second load (vibration in the case of a gas turbine, surface waves moving the riser in the case of the connector) induce changes again in all four elements of contact load but, crucially, \emph{in phase}. Figure \ref{fig:CyclicLoop} shows a generic steady-state cycle between the maximum (2) and minimum (1) points, under proportional loading. The $\Delta$-terms indicate the range of the individual load components with the mean point at $0$. Before proceeding to the partial slip problem, we start by writing down the conditions for a contact to remain fully adhered due to small changes in the load quantities \cite{Andresen_2019_3} \begin{equation}\label{fullstickinequality} \frac{4a \,\dd Q\pm\pi a^{2}\,\dd\sigma}{4a\,\dd P\pm 8\,\dd M}<f \; \text{,} \end{equation} where $a$ is the instantaneous contact half-width, $f$ is the coefficient of friction, and where we choose the upper signs when considering the left-hand side of the contact and the lower signs when considering the right-hand side of the contact. We expect microscopic amounts of differential relative motion to ensue when the inequality in Eq. \eqref{fullstickinequality} becomes violated. Figure \ref{fig:ModerateLargeTension} a) illustrates shear tractions in partial slip with regions of slip and the extent of the steady-state stick zone is denoted by $[-m\qquad n]$. We consider that, once the steady-state permanent stick zone in a partial slip problem is known other aspects of the solution, such as the relative surface slip displacement, will fall readily into place. Note that the transient phase has no effect on the extent and position of the steady-state permanent stick zone, but merely on the locked-in tractions, and hence the transient is irrelevant to the solution we seek. In a recent series of articles we have shown how superposition of the sliding tractions, $f p(x)$ may be applied to contact problems which are symmetrical but subject to a change in a normal load (but no moment) \cite{Andresen_2019_2}, and unsymmetrical contacts allowing for the possibility of a moment \cite{Andresen_2019_3}. We emphasize that this whole family of solutions will apply only when the sign of slip is the same at each edge of the contact, i.e. the differential tension is moderate. \begin{figure}[t!] \centering \includegraphics[scale=0.7, trim= 0 0 0 0, clip]{Fig_SteadyStateLoading.eps} \caption{Cyclic loading with in phase changes in all load components.} \label{fig:CyclicLoop} \end{figure} \begin{figure}[b!] \centering \includegraphics[scale=0.33, trim= 0 0 0 0, clip]{Fig_ModerateLargeTractions.eps} \caption{Illustration of a steady-state cycle with a proportionally varying normal load, moment, shear load and differential bulk tension.} \label{fig:ModerateLargeTension} \end{figure} When the bulk tension developed is large, see Figure \ref{fig:ModerateLargeTension} b), it reverses the sign of slip at one contact edge and therefore all of the methods described above do not apply, so a different approach is needed. One emerged when a solution was found for the state of shear traction developed with a glide dislocation present on the interface between two half-planes joined over an interval equal to the size of the contact \cite{Moore_2018}. This made it possible to start with the opposite assumption - that the contact was fully stuck - and then to use the solution for the dislocation as a kernel to add the regions of slip. This approach works well but it is necessary to know the shear traction change under fully stuck conditions, as the contact moves from one turning point in the loading cycle to the other \cite{Andresen_2019_4}. The problem comes when a varying moment is part of the load cycle as this means that it is not possible to obtain a simple recipe to give the shear traction change needed (under conditions of full-stick) \cite{Andresen_2020}. These difficulties mean that attention must be turned to each edge of the contact, in turn, and a solution sought within the framework of an asymptotic formulation, together with the contact law. This paper describes, in detail, how this may be done and makes a comparison with the true answer \cite{Andresen_2019_4} and \cite{Moore_2020} for the case of a shallow wedge contact geometry where applicable. \section{Mossakovskii Methods} \label{mossakovskii_methods} \hspace{0.4cm}One of the key components of the asymptotic methods we describe in detail in \textsection \ref{asymptotic_methods} concerns the behaviour of the contact pressure at the edges of an incomplete contact. As is well known, the contact pressure is square-root bounded at the edges of an incomplete contact \cite{Barber_2010}, and it is the coefficient, $K_{N}$, of this square-root term that we require in our asymptotic approach. Even when the contacting bodies are elastically similar so that the normal and tangential contact problems decouple, the form of $K_{N}$ is geometry dependent, and there are several approaches we could take to isolate it. However, recent work \cite{Moore_2020} using the Mossakovskii method \cite{Mossakovskii_1953} lends itself particularly well to finding $K_{N}$ for general geometries including the effects of both an applied normal force and an applied moment. \begin{figure}[b!] \centering \includegraphics[scale=1.0, trim= 0 0 0 0, clip]{MossakovskiiIdea.eps} \caption{A large, almost flat body $y = g(x)$ is pressed into an elastically-similar half-space with an applied normal force, $P$, and an applied moment, $M$. The Mossakovskii idea approximates the geometry of the indenter by a series of flat punches, whose widths increase as the contact pressure increases.} \label{fig_MossakovskiiMethod} \end{figure} We consider the contact of an indenter with body profile given by $y = g(x)$, where $(x,y)$ are Euclidean coordinates centred at the minimum of the body. Under an applied normal force, $P$, and an applied moment, $M$, the indenter presses into an elastically-similar half space, with the contact extending across $[-a \qquad c]$, where $a,c > 0$. The standard manner of treating this contact is then to invert a singular integral equation relating the contact pressure $p(x)$ to the body geometry gradient, see \cite{Barber_2010} for details. In doing so, one finds that a consistency condition must be satisfied for the contact pressure to be bounded \begin{equation} 0 = \int_{-a}^{c}\frac{g'(s)}{\sqrt{(a-s)(s+c)}}\,\mbox{d}s. \label{eqn:consistencyab} \end{equation} The main drawback of this approach is the difficulty in dealing with the Cauchy principal value integrals that arise, since they have singular kernels within the contact. The Mossakovskii method aims to circumvent this problem by converting the singular integral form to a regular --- albeit non-symmetric --- Abel integral equation. The central idea of the Mossakovskii method is depicted in Figure \ref{fig_MossakovskiiMethod}. The aim is to approximate the geometry of the indenter by an infinite series of flat punches. In order to do this, \cite{Moore_2020} formulate the problem in such a way that (\ref{eqn:consistencyab}) is used as an equation to isolate the left-hand contact point as a function of the right-hand contact point, i.e. giving $a(c)$. The contact pressure, $p(x,c)$, is then given through a superposition of these of the form \begin{equation} p(x,c) = \int_{0}^{c} F(s)h(x,s)\,\mbox{d}s, \label{eqn:PressureSuperposition} \end{equation} where $h(x,a)$ is the contact pressure corresponding to the \emph{complete} contact of a flat punch, that is \begin{equation} h(x,c) = \begin{cases} \displaystyle{\frac{1}{\sqrt{(a(c)+x)(c-x)}}} & \mbox{for} \; -a(c)<x<c \\ \displaystyle{0} & \mbox{otherwise} \end{cases}. \label{eqn:FlatPunchCP} \end{equation} The unknown function $F(\cdot)$ in (\ref{eqn:PressureSuperposition}) can then be shown to satisfy the non-symmetric Abel equation \begin{equation} \frac{E^* g'(x)\pi}{2} = \int_{0}^{x} \frac{F(s)}{\sqrt{(x-s)(x+a(s))}}\,\mbox{d}s \; \mbox{for} \; 0<x<c \; \text{,} \label{eqn:FIE} \end{equation} where $E^* = E/(2 (1-\nu^2))$ is the composite Young's modulus of the contacting bodies\footnote{Note that we assume the contacting bodies to be elastically similar, i.e. $(E, \nu) = (E_A, \nu_A) = (E_B, \nu_B)$, in order to uncouple the normal and tangential problem \cite{Dundurs_1969}}. One key point noted in \cite{Moore_2020} is that in order for the Mossakovskii approach to work, the minimum of the indenter must be fixed as $P$ increases, which precludes a change in $M$ as $P$ varies. To get around this, \cite{Moore_2020} assume that the geometry is known \emph{a priori} and then find the required $M$ necessary to sustain the contact for a given $P$. This is equivalent to choosing a particular path in the $(P,M)$ load space. But, as is well-known, the contact pressure --- and hence, the $K_{N}$ coefficients --- at load state $(P,M)$ is history-independent, so that this requirement is not overly-restrictive. To find the $K_{N}$ coefficients, it transpires that we do not even need to solve (\ref{eqn:FIE}) for $F(\cdot)$. Vertical equilibrium demands that \begin{equation} P = \int_{-a(c)}^{c} p(s,c)\,\mbox{d}s,\label{eqn:NormalEquilibrium} \end{equation} which can be manipulated to show that \begin{equation} F(c) = \frac{1}{\pi}\frac{\mbox{d}P}{\mbox{d}c}. \label{eqn:PFRelation} \end{equation} Then, \cite{Moore_2020} expand (\ref{eqn:PressureSuperposition}) close to the edges of the contact and show that \begin{equation} p \sim \frac{2}{\pi}\frac{P'(c)}{\sqrt{c+a(c)}}\sqrt{c-x} \; \mbox{as} \; c-x\rightarrow 0, \; \mbox{so that} \; K_{N,c} = \frac{2}{\pi}\frac{P'(c)}{\sqrt{c+a(c)}}, \label{eqn:Knc} \end{equation} while \begin{equation} p \sim \frac{2}{\pi}\frac{P'(c)}{a'(c)\sqrt{c+a(c)}}\sqrt{a(c)+x} \; \mbox{as} \; a(c)+x\rightarrow 0, \; \mbox{so that} \; K_{N,a} = \frac{2}{\pi}\frac{P'(c)}{a'(c)\sqrt{c+a(c)}}.\label{eqn:Kna} \end{equation} \section{Asymptotic Methods} \label{asymptotic_methods} As mentioned above, the analytical solution of the contact tractions and slip zone size can be obtained for some specific contact geometries under varying normal, moment, shear and differential bulk tension loading. However, for problems subject to large tension and a varying moment, as explained in \textsection 1, the use of an asymptotic approach, which focuses on one contact edge and its surroundings only, is adopted. Even for cases where an analytical solution exists, it might be of interest to have a succinct and easy-to-apply method at hand and this is what we shall establish here. The asymptotic approach to incomplete contacts was first introduced in \cite{sackfield2003application} and later extended to the tangential contact problem in \cite{dini2004bounded, dini2005comprehensive}, using the Ciavarella-J\"ager theorem \cite{Ciavarella_1998,Jaeger_1998}. Asymptotic approaches have since been used for different contact problems, such as flat and rounded punches \cite{fleury16a,fleury16b}, and incomplete problems with constant normal but varying shear and bulk loading. More recently, the asymptotic approach was extended to the varying normal load case \cite{fleury2017varying}, as an asymptotic version of the work in \cite{Barber_2011}. In the tangential contact problem, the shear tractions are split between the sliding solution, which is similar to the contact pressure but scaled by the coefficient of friction, and the stick solution. The former is bounded for incomplete contacts, as is the contact pressure, and the latter is singular when all slip is inhibited throughout the contact interface. In the asymptotic approach, we focus our interest on the edges of the contact, where here we will present results for the left-hand edge $x = -a$ without loss of generality. We shall retain the global axis set centred at the body minimum to permit the effect of the moving contact edge to be incorporated readily in the analysis. As discussed in \textsection \ref{mossakovskii_methods}, local to $x = -a$, the pressure may be expanded as an asymptotic series. In this analysis, we shall simply take the first term in this expansion and discard the higher-order terms. We can similarly expand the shear traction, $q(x)$, and we shall again only retain the first, inverse square-root term in the expansion. Thus, local to $x = -a$, we have the asymptotic approximations \begin{equation} p(x) \approx K_N \sqrt{a+x}, \; q(x) \approx \frac{K_{T}}{\sqrt{a+x}}. \label{eq:normalasymptote} \end{equation} These asymptotes are illustrated in Figure \ref{fig:asymptotes} alongside sketches of the exact forms of $p(x)$ and $q(x)$. The normal and tangential asymptotes are represented by the coefficients $(K_{N},K_{T})$, which are analogous to generalised stress intensity factors. The coefficient $K_{N}$ for the asymptote approximating the normal contact pressure at the edges of the contact has been explicitly obtained in (\ref{eqn:Knc})--(\ref{eqn:Kna}) for each edge of the contact. Note that the $K_N$ coefficients are geometry dependent. The coefficients of the tangential contact asymptotes, $K_{T}$, on the other hand, are geometry independent and may be obtained from the shear load, $Q$, and differential bulk tension, $\sigma$, as in \cite{hills16} \begin{equation} K_T = \frac{\pm Q}{\pi \sqrt{2 a}} + \frac{\sigma}{4} \sqrt{\frac{a}{2}}. \end{equation \begin{figure}[tbp] \centering \includegraphics[width=0.6\linewidth]{Edge_asymptotes.eps} \caption{Normal and tangential asymptotes at the edge of an incomplete contact.} \label{fig:asymptotes} \end{figure} \subsection{Asymptotic approximation of shear tractions} The shear traction at the maximum shear load during a generic steady-state loading cycle, as depicted by point $2$ in Figure \ref{fig:CyclicLoop}, can be expressed as a scaled superposition of the contact pressure at different load pressures throughout the loading path, i.e.~using the Ciavarella-J\"ager theorem, as in \cite{Barber_2011} \begin{equation} q_1(x) = \int_{0}^{P_Z} \frac{\partial p(x,P,M)}{\partial P} \frac{\dd P}{\dd Q} \dd P + fp(x,P,M) - 2 fp(x, P_S,M_S) + fp(x,P_Z,M_Z) \; \text{,} \label{eq:CJshear} \end{equation where $P_S$ and $P_Z$ are previous loads in the load history defining the current size of the stick zone, $a(P_S,M_S)$, and the permanent stick zone, $a(P_Z,M_Z)$, respectively. These may be obtained by enforcing tangential equilibrium, see \cite{Barber_2011}. The integral in \cref{eq:CJshear} represents the accumulated shear traction in the stick zone during the transient loading, as described in detail in \cite{Barber_2011}. Although calculating the size of the stick zone, current and permanent, when the loading is purely due to $P$ and $Q$ is straightforward as demonstrated in \cite{Barber_2011,fleury2017varying}, it is not so if a moment, $M$, and a differential tension, $\sigma$, are also present. By expanding the shear traction in a series expansion and taking only the leading-order terms, the asymptotic approximation of the shear traction at the left edge of the contact and at the minimum load point of the steady-state in Figure \ref{fig:CyclicLoop} may be obtained by a superposition of the normal bounded asymptote \cite{fleury2017varying} as \begin{align} q_1^{(asy)}(x) = &K_{Q1} \sqrt{x+a_1 - d_1} + f K_{N1} \sqrt{x + a_1} - 2 f K_{N1} \sqrt{x_1 + a_1 - d_1} +\nonumber \\ &f K_{N1} \sqrt{x+a_2 - d_2} \text{;} \label{eq:asymTan1} \end{align} where $d_1$ and $a_1$ are the slip zone size and contact size at the minimum load point, and $d_2$ and $a_2$ are the slip zone size and contact size at the maximum steady-state loading point. The coefficients $K_N$, here, may be obtained as in \textsection 2 and $K_Q$ is scaled from $K_N$ during the transient (and proportional) loading, i.e.~when the loading did not cause slip. At the maximum load point of the steady state the shear traction is given by \begin{equation} q_2(x) = \int_{0}^{P_Z,M_Z} \frac{\partial p(x,P,M)}{\partial P} \frac{\dd P}{\dd Q} \dd P - fp(x,P,M) + fp(x,P_Z,M_Z), \label{eq:CJshear2} \end{equation and its analogous asymptotic approximation is \begin{equation} q_2^{(asy)}(x) = K_{Q2} \sqrt{x+a_2 - d_2} - f K_{N2} \sqrt{x + a_2} + f K_{N2} \sqrt{x+a_2 - d_2}. \label{eq:asymTan2} \end{equation} \subsection{Calculation of the slip zone size} \label{sec:SlipZone} In order to calculate the size of the slip zone at the maximum and minimum points in the steady-state loading, the change in shear traction from the maximum to minimum loading points, $\Delta q$, is compared with the change of traction in the absence of slip \cite{dini2005comprehensive}. One assumption we make here is that the change in $K_N$ and $K_Q$ between the two ends of the steady-state loading can be neglected, which is valid only for moderate loading. The change in shear loading at the left hand side edge of the contact, see Figure \ref{fig:asymptotes}, from the maximum to minimum loading may thus be written as \begin{align} \Delta q(x) =& \;q_1^{(asy)}(x)- q_2^{(asy)}(x) \nonumber \\ =& \;K_{Q1} \sqrt{x+a_1-d_1} + f K_{N1} \sqrt{x + a_1} - 2 f K_{N1} \sqrt{x + a_1 - d_1} + f K_{N1} \sqrt{x+a_2 - d_2} \nonumber \\ & \;- \left( K_{Q2} \sqrt{x+a_2-d_2} - f K_{N2} \sqrt{x + a_2} + f K_{N2} \sqrt{x+a_2 - d_2}\right)\; \text{.} \end{align} Now, let us take the limit ${(K_{N1}, K_{N2}) \rightarrow K_N}$. This simplifies the difference in shear tractions to \begin{align} \Delta q(x) = f K_{N} \left( \sqrt{x+a_1} - 2\sqrt{x+a_1-d_1} + \sqrt{x+a_2 - d_2} +\sqrt{x+a_2} - \sqrt{x+a_2-d_2} \right)\;\text{.} \end{align} We further expand the expression at ${(x+a_1) \rightarrow \infty}$. By doing so the effects of the slip zones on the shear tractions are distant enough to justify the use of a singular traction multiplier, which yields \begin{align} \Delta q(x)\simeq & f K_N \left( 2 \left( \frac{d_2}{2\sqrt{x+a_1}} + . . . \right) + \frac{\Delta a}{2\sqrt{x+a_1}} \right) \label{eq:DeltaQApprox} \\ = & \frac{\Delta K_T}{\sqrt{x + a_1}} \label{eq:DeltaQKT} \; \text{,} \end{align} where $\Delta a = |a_2-a_1|$ is the change in contact size over one half loading cycle at the end of the contact under consideration and where $0\leq \Delta a << a_2 + a_1$. We now have means of expressing the size of the slip zone at either end of the load cycle, so that by combining~\cref{eq:DeltaQKT,eq:DeltaQApprox}, the steady-state slip zone size is given in asymptotic form as \begin{equation} d_1 = -\frac{\Delta K_T}{f K_N} - \frac{\Delta a}{2} \qquad\text{and}\qquad d_2 = \frac{\Delta K_T}{f K_N} + \frac{\Delta a}{2}\; \text{.} \label{eq:slipAsymptotes} \end{equation} We can go one step further and approximate the instantaneous size of the slip zones at every point of the steady-state load cycle. Now, the value of the asymptotic shear traction multiplier, $\Delta K_T$, must be evaluated based on the the finite changes in tangential loading, $\Delta Q = Q_2 - Q_i$ and $\Delta \sigma = \sigma_2 - \sigma_i $, where $i$ represents the instantaneous value of the respective load component. The normal traction multiplier, $K_N$, depends on the instantaneous value of the normal loading, see \textsection \ref{mossakovskii_methods}. The change in contact size is then defined as $\Delta a = |a_2- a_i|$, where $a_i$ is the instantaneous contact size. \section{The Shallow Wedge} \label{examples} \hspace{0.4cm}In this section we wish to draw an instructive comparison between the mathematically exact solution and its asymptotic expressions for the example of a shallow wedge subject to a cyclically varying normal load, moment, shear load and initially \textit{moderate} differential bulk tension. An example illustration of a steady-state load cycle between the minimum and maximum load points, $1$ and $2$ respectively, is given in Figure \ref{fig:CyclicLoop}. Analytical methods reach the limit of what they are able to treat when we look at problems which involve a varying moment and the differential bulk tension becomes \textit{large} enough to reverse the direction of slip at one end of the contact, see Figure \ref{fig:ModerateLargeTension} b). The asymptotic description allows us to go beyond this limitation and, here, we present the results. \subsection{Explicit Solution}\label{explicitsolution} Consider a shallow wedge of apex angle $(\pi-2\phi)$ where $0<\phi\ll1$ that is tilted at an angle $0<\alpha\ll1$ measured anti-clockwise from the unrotated state, Figure \ref{fig:WedgeProblem}. Assuming the wedge angle to be large enough for the half-plane assumption to hold, we establish the contact between the two half-planes by applying a normal force, $P$, acting through the vertex, and also subject to a moment, $M$, which is taken to be positive when $\alpha$ is positive. The normal contact problem was first solved in \cite{Sackfield_2005}, who showed that the pressure distribution is \begin{equation}\label{pressure_distribution_wedge} p(x) = \frac{E^{*}\phi }{\pi}\log\left|\frac{\sqrt{\gamma} + \sqrt{(\gamma a-x)/(x+a)}}{\sqrt{\gamma}-\sqrt{(a\gamma-x)/(x+a)}}\right| \;, \end{equation} where $\gamma$ is given as \cite{Moore_2020} \begin{equation}\label{gamma} \gamma= \left(1-\sin\left(\frac{\pi \alpha}{2 \phi}\right)\right) \left(1+\sin\left(\frac{\pi \alpha}{2 \phi}\right)\right)^{-1}\;. \end{equation} The moment causes the wedge to tilt through the angle $\alpha$ which can be expressed in terms of normal load, $P$, and moment, $M$, as shown in \cite{Moore_2020} is given by \begin{equation}\label{alpha} \alpha = -\frac{2 \phi}{\pi} \arcsin\left(\frac{2 E^* \phi M}{\sqrt{4 (E^{*} \phi M)^2 + P^4}}\right)\;. \end{equation} \begin{figure}[t!] \centering \includegraphics[scale=0.6, trim= 0 0 0 0, clip]{Fig_Wedge.eps} \caption{A tilted wedge contact subject to a normal load, moment, shear load with remote bulk tensions arising in each half-plane.} \label{fig:WedgeProblem} \end{figure} Considering the symmetry of the wedge geometry, we expect there to be a similarity in the solution for the contact coordinates, so that \begin{equation} c=\gamma a \; \text{,} \end{equation} where $a$ can be found from normal equilibrium \begin{equation} \label{normal_equilrbium_wedge} P =\int_{-a}^{c}p(x)\,\mathrm{d}x =E^* \phi \sqrt{\gamma a^2}\;, \end{equation} to give \begin{equation} \label{ca} a=\frac{P}{E^* \phi}\sqrt{\frac{1}{\gamma}}\;;\qquad \qquad c=\frac{P}{E^* \phi}\sqrt{\gamma} \;. \end{equation} For completeness, we also give the expression for the moment, $M$, which is \begin{equation} M =\int_{-a}^{c}p(x) x\,\mathrm{d}x = \frac{E^* \phi}{4} \sqrt{\gamma} (1-\gamma) a^2\;. \end{equation} Note that for the symmetrical \textit{no-moment} case, i.e. $M=0$, $\alpha \rightarrow 0$, $\gamma \rightarrow 1$, and $a = c$. In the case of cyclic proportional loading, as shown in Figure \ref{fig:CyclicLoop}, the normal problem will be defined in terms of the forces $P_i$ and the moments $M_i$ , $i = 1 , 2$, in which case a preliminary stage will involve the determination of the corresponding tilt angles, $\alpha_i$. Now, we state without proof the the coordinates for the permanent stick zone , $[-m \qquad n]$, as \cite{Andresen_2019_3} \begin{equation} m=\frac{1}{E^* \phi}\left(P_0-\frac{\Delta Q}{2f}\right)\sqrt{\frac{1}{\gamma_{\text{t}}}}\;;\qquad n=\frac{1}{E^* \phi}\left(P_0-\frac{\Delta Q}{2f}\right)\sqrt{\gamma_{\text{t}}}\;, \label{m} \end{equation} where $P_0$ is the mean normal load and $\Delta Q$ denotes the range of the shear load during the steady-state cycle. The function relating $m$ and $n$ is given by \begin{equation}\label{gamma_2} \gamma_{\text{t}}= \left(1-\sin\left(\frac{\pi \left(\alpha_0 - \frac{\Delta\sigma}{4 f E^*}\right)}{2 \phi}\right)\right) \left(1+\sin\left(\frac{\pi \left(\alpha_0 - \frac{\Delta\sigma}{4 f E^*}\right)}{2 \phi}\right)\right)^{-1}\;, \end{equation} where $\alpha_{0} = \nicefrac{\alpha_1 + \alpha_2}{2}$ is the average angle of tilt and $\Delta\sigma$ is the range of differential bulk tension throughout the steady-state cycle. With Eq. \eqref{m} we have found the extent and position of the permanent stick zone which depend on $P_0$, $\alpha_0(M_0, P_0)$, $\Delta Q$, and $\Delta\sigma$. Note that the steady-state permanent stick zone does therefore \textit{not} depend on the range of the normal load and moment, $\Delta P$ and $\Delta M$, which merely affect the contact extent at the end points of the steady-state cycle\footnote{We omit the suffix indicating the ends of the load cycle, $i = 1, 2$, for clarity.}, $[-a(P, M) ,\; c(P,M)]$. . \subsection{Asymptotic Solution} As the contact law and the permanent stick zone during the steady-state cycle are known in closed-form, as described above, the mathematically exact maximum extent of the slip zones is given as \begin{equation}\label{slipzones_LHS} d^{\text{LHS}}=a-m \; \text{,} \end{equation} at the left-hand end of the contact and \begin{equation}\label{slipzones_RHS} d^{\text{RHS}}=c-n \; \text{,} \end{equation} at the right-hand end of the contact. Here, we wish to find equivalent explicit statements using the asymptotic description outlined in \textsection \ref{asymptotic_methods}. In its most general form the maximum slip zone extent is given as in \cref{eq:slipAsymptotes}. The values for $\Delta K_T$ and $K_N$ will be different at each end of the load cycle and can be found by two different means. Either we use numerical results from, say, a finite element analysis \cite{Andresen_2020,fleury16a,fleury16b}, or we apply the explicit expressions given in \textsection \ref{mossakovskii_methods} and \textsection \ref{asymptotic_methods} to write \begin{equation}\label{K_T} \Delta K_{T} = \frac{\Delta Q}{\pi \sqrt{2 a}} \pm \frac{\Delta\sigma}{4} \sqrt{\frac{a}{2}}\;\text{,} \end{equation} where we choose the upper sign when looking at the left-hand side and the lower when looking at the right-hand side. Note that the respective contact half-width ($a$, $c$) should be used for the contact edge under consideration. While $\Delta K_T$ is independent of the geometry, i.e. only the range of the tangential loads and the instantaneous contact half-width matter, the asymptotic multiplier for the normal tractions is dependent on the geometry and material of the contacting bodies. For an explicit expression, we need to know the instantaneous contact law, $P'(a)$, so that for the left-hand side of the tilted wedge we can write Eq. \eqref{eqn:Kna} in explicit form by differentiating Eq. \eqref{normal_equilrbium_wedge} with respect to $a$ \begin{equation}\label{K_N} K_{N}^{\text{LHS}} = \frac{2 E^* \phi}{\pi} \sqrt{\frac{\gamma}{a \, (1 + \gamma)}}\;\text{,} \end{equation} which can be readily connected to the other end of the contact by \begin{equation} K_{N}^{\text{RHS}} = \frac{K_{N}^{\text{LHS}}}{\gamma} \; \text{.} \end{equation} \section{Display of Results} There is a multitude of possibilities to illustrate the comparison between analytical and asymptotic results outlined above. The most sensible way seems to be to compare, first, results associated with the classical Cattaneo-Mindlin solution for periodic loading under constant normal load. We then go on to look at how this solution is affected by a varying normal load. The effects of a differential bulk tension, which may be \textit{moderate} or \textit{large}, are studied in the subsequent example. Note that for the asymptotic approach it is irrelevant whether the differential tension is moderate or large, as we only look at one end at a time. We then look at the effect of the mean angle of tilt on the solution. Lastly, we look at the effects of a varying moment in combination with large differential tension. That is, the case in which only the asymptotic approach can provide an answer. \subsection{The Cattaneo-Mindlin Problem} It will be instructive to restrict ourselves, first, to the problem described in the introduction where a contact is established by a normal force, $P$, which is then held constant while a shear load, $Q$, varies between a minimum load point, $1$, and a maximum load point, $2$, over the range $\Delta Q$. This type of loading sequence was first solved for a Hertzian contact subject to a monotonically increasing tangential load \cite{Cattaneo_1938} and later extended to periodically varying tangential forces \cite{Mindlin_1951}. The J\"ager-Ciavarella theorem allows us to apply these ideas to any kind of incomplete geometry, including the shallow wedge. The established contact is symmetrical and, given the coefficient of friction, $f$, is finite, slip zones of equal extent will ensue so that the maximum slip zone extent is found using Eqs. \eqref{ca}, \eqref{m} \begin{equation} d = a - m =\frac{1}{E^* \phi} \left(\frac{\Delta Q}{2f}\right)\;. \label{am} \end{equation} The asymptotic description yields the exact same result using Eqs. \eqref{eq:slipAsymptotes}, \eqref{K_T}, and \eqref{K_N} \begin{equation} d = \frac{\Delta K_T}{f K_N} =\frac{1}{E^* \phi} \left(\frac{\Delta Q}{2f}\right)\;. \label{d} \end{equation} \begin{figure}[t!] \centering \includegraphics[scale=0.4, trim= 0 0 0 0, clip]{Steady_State_Solution_MarchingInTime_DeltaQ.eps} \caption{a) Stand-alone steady-state solutions under constant normal load showing the contact size and maximum slip zone extent for $ 0 < \nicefrac{\Delta Q}{f P} < 2$, b) the marching-in-time solution for $\nicefrac{\Delta Q}{f P} = 1.0$ with zones of forward and reverse slip.} \label{fig:DeltaQ_Steady_state} \end{figure} The reason for this is the proportionality between applied normal load and contact size of the wedge solution, see Eq. \eqref{ca}. For a different geometry, a relative error between the exact and asymptotic solutions is expected, which will depend on the nature of the contact law. Figure \ref{fig:DeltaQ_Steady_state} a) shows the linearity of the steady-state solution associated with this problem for vales of $ 0 < \nicefrac{\Delta Q}{f P} < 2$. For each value of $\nicefrac{\Delta Q}{f P}$ a stand-alone maximum slip zone size extent can be obtained. In Figure \ref{fig:DeltaQ_Steady_state} b) the steady-state solution for $\nicefrac{\Delta Q}{f P} = 1.0$ is plotted in a marching-in-time sense. After a transient phase - note, the path taken to reach the steady-state only affects the locked-in tractions in the permanent stick zone, but not the steady-state slip-stick pattern - the steady-state cycle is established and we see zones of reciprocating slip emerge at both ends of the contact. As said before, since we have chosen the wedge geometry, the Cattaneo-Mindlin problem yields the exact same solution as the asymptotic and analytical approach for the maximum extent of the slip zones, see Eqs. (\ref{am} and \ref{d}). Note that the explicit solution, Eq. \eqref{am}, will allow us to find the maximum extents of the steady-state slip zones only, while the asymptotic solution makes it possible to \textit{march} through the steady-state load cycle and find the slip-stick boundary at every point in time. For the sake of comparability, we will adopt this style of presenting the results for the other loading scenarios considered in this work. \subsection{The Effect of a Varying Normal Load} From Eqs. (\ref{m} and \ref{gamma_2}) we see that the position and extent of the permanent stick zone is independent of variations in normal load, $\Delta P$. The slip zone size will vary, of course, due to the variation in size of the contact. The asymptotic description of the slip zone size, Eq. \eqref{eq:slipAsymptotes}, depends on the instantaneous values of the asymptotic multipliers, $\Delta K_T$ and $K_N$, as well as the overall change in contact size, $\Delta a$, throughout a cycle. This means there is no explicit dependence on the normal load variation, $\Delta P$. Implicitly, however, all three of the stated parameters are affected by changes in normal load. It is therefore of interest to employ the asymptotic framework developed to a varying normal load problem and demonstrate its applicability. In order to simplify comparability, we will use the same parameters as used in the example above, i.e. $\nicefrac{\Delta Q}{f P} = 1.0$ and add a varying normal load of $\nicefrac{\Delta P}{P} = 0.15$ to the problem. Figure \ref{fig:DeltaP_Steady_state} shows a marching-in-time solution for the problem described. We notice that the size and position of the permanent stick zone remains unchanged compared with Figure \ref{fig:DeltaQ_Steady_state} b). The overall contact size, however, increases and decreases throughout the cycle, therefore effectively changing the size of the slip zones not only due to a variation in shear load, but also due to movement of the contact edge. The asymptotic framework tends to underestimate the slip zone size at the minimum load point of the cycle and to overestimate it at the maximum load point of the cycle. While it is not possible to make a general statement regarding the relative error, we regard the results obtained for this example case as acceptable, since the error is certainly less than $5\%$. Encouraged by this comparison, in the examples which follow, we will refrain from adding the effect of a varying normal load, in order to concentrate on the effects of the loading under consideration. \begin{figure}[t!] \centering \includegraphics[scale=0.4, trim= 0 0 0 0, clip]{MarchingInTime_DeltaP.eps} \caption{Marching-in-time solution for a varying normal load problem, $\nicefrac{\Delta P}{P} = 0.15$, while the tangential load variation is $\nicefrac{\Delta Q}{f P} = 1.0$.} \label{fig:DeltaP_Steady_state} \end{figure} \subsection{The Effect of Differential Bulk Tension} Bulk tensions are stresses arising remotely from the contact interface in one or both contacting bodies. In an engineering application like a gas turbine engine, centrifugal loading acting on the components or vibrations might be a source of remote tensions. These cause differential tensions between the contacting components exciting interfacial shear tractions. Note, that in most practical applications the tangential loading is a mix of differential tension and a shear force. Here, we look at what happens to the steady-state solution when in addition to a varying shear force, $\Delta Q$, a varying differential tension, $\Delta\sigma$ is present. We will use the results presented in \textsection \ref{explicitsolution} to compare the closed-form solution for moderate differential tension to the asymptotic description. The solution given in Eq. \eqref{m} is valid as long as the same sign slip direction is maintained at both ends of the contact. That is, the range of differential tension, $\Delta\sigma$, is smaller than or equal to its transition value to the onset of reverse slip, $\Delta\sigma_{th}$, \begin{align}\label{inequalitywedge} \Delta\sigma \leq \Delta\sigma_{th}=\frac{4 E^* f}{\pi} \left[\pi \alpha_0 - 2 \phi \sin^{-1} \left(\frac{8 f^2 P^2}{ \Delta Q \gamma (- 4 f P+\Delta Q)+(1+\gamma) 4 f^2 P^2}-1\right)\right]\;. \end{align} Suppose now, that the range of differential tension is \textit{large} enough for inequality \eqref{inequalitywedge} to be violated, $\Delta\sigma > \Delta\sigma_{th}$, so that the slip directions are of opposite sign as shown in Figure \ref{fig:ModerateLargeTension} b). In order to have a mathematically exact point of comparison against the asymptotic solution, we use the following consistency conditions for constant normal load problems subject to varying \textit{large} differential tension and shear load from Andresen et al. \cite{Andresen_2019_4} and evaluate $m$ and $n$ numerically \begin{align} \frac{\Delta\sigma\pi}{8}= & \,-\int_{-a}^{-m}\frac{fp(\xi)\,\text{sgn}(\xi)}{\sqrt{(\xi-n)(\xi+m)}}\,\mbox{d}\xi+\int_{n}^{a}\frac{fp(\xi)\,\text{sgn}(\xi)}{\sqrt{(\xi-n)(\xi+m)}}\,\mbox{d}\xi,\label{eq17}\\ \frac{\Delta Q}{2}+\frac{(n-m)\Delta\sigma\pi}{16}= & \,-\int_{-a}^{-m}\frac{\xi fp(\xi)\,\text{sgn}(\xi)}{\sqrt{(\xi-n)(\xi+m)}}\,\mbox{d}\xi+\int_{n}^{a}\frac{\xi fp(\xi)\,\text{sgn}(\xi)}{\sqrt{(\xi-n)(\xi+m)}}\,\mbox{d}\xi.\label{eq18} \end{align} \begin{figure}[t!] \centering \includegraphics[scale=0.4, trim= 0 0 0 0, clip]{Steady_State_Solution_MarchingInTime_DeltaSigmaWedge2.eps} \caption{a) Stand-alone steady-state solutions under constant normal load showing the contact size and maximum slip zone extent for $\Delta\sigma/\Delta\sigma_{th} < 3$, b) the marching-in-time solution for $\Delta\sigma/\Delta\sigma_{th} = 2$ with opposing zones of slip at both ends of the contact.} \label{fig:DeltaSigma} \end{figure} A closed-form solution can be obtained for the Hertzian geometry, and we provide this in appendix \ref{explicitsolutionHertz} for reference. In the example we examine in this section, the contact is established by the normal load, $P$ until the contact half-width reaches $a$. The shear force is then varied with range $\Delta Q = 0.3 f P$ and we see the effect of a change in differential bulk tension over $0 \leq \Delta\sigma/\Delta\sigma_{th} < 3$ for the asymptotic and analytical solutions, Figure \ref{fig:DeltaSigma} a). Note that the $\Delta\sigma$ is normalised to its transition value, $\Delta\sigma_{th}$, see Eq. \eqref{inequalitywedge}. When the transition value is reached, $\Delta\sigma/\Delta\sigma_{th} = 1$, we observe that the direction of slip changes at one end of the contact and the underlying analytical approach switches from the explicit branch of its solution for moderate differential tension, Eq. \eqref{m}, to the numerical branch, Eqs. (\ref{eq17} and \ref{eq18}) for large differential tension. The larger the slip zones become relative to the overall contact size, the less accurate the asymptotic description becomes. We will refrain from further assessing the relative error between analytical and asymptotic approach as the number of input parameters is too large to make any general statements beyond the one we have just made. It is the responsibility of the user to acknowledge this trade-off between the mathematically exact analytical approach and the very convenient asymptotic description. Figure \ref{fig:DeltaSigma} b) on the other hand shows the steady-state slip-stick pattern in a marching-in-time sense for large differential tension, $\Delta\sigma/\Delta\sigma_{th} = 2$. Note that the direction of slip is of opposite sign at each end of the contact and that the asymptotic description overestimates the maximum extent of the slip zones at both ends of the contact. \subsection{The Effect of Tilting} In most engineering applications, there is a moment transmitted through the interface causing the bodies to tilt relative to each other. From \textsection \ref{explicitsolution} we know that the coordinates for the permanent stick zone $[-m(\alpha_0) \qquad n(\alpha_0)]$ change with the average angle, $\alpha_0$, unaffected by the actual range of the applied moment, $\Delta M$. Consider Figure \ref{fig:evolution_of_slipstick_with_alpha} a). Note that each value of $\alpha_0$ represents a stand-alone steady-state solution subject to a constant normal load, $P_0$, giving the mean contact size spanning $[-a_0, \qquad c_0]$. In this example, we keep the shear load fluctuation, $\Delta Q = 0.3 f P_0$ constant, giving the permanent stick zone spanning $[-m, \quad n]$. \begin{figure}[t!] \centering \includegraphics[scale=0.4, trim= 0 0 0 0, clip]{Steady_State_Solution_MarchingInTime_Moment_Wedge02.eps} \caption{a) Stand-alone steady-state solutions under constant normal load showing the contact size and maximum slip zone extent for $ 0 < \alpha_0/\phi < 0.5$ subject to a varying shear force, $\Delta Q/f P0 = 0.3$, b) the marching-in-time solution for $\alpha_0/\phi = 0.3$ with zones of forward and reverse slip.} \label{fig:evolution_of_slipstick_with_alpha} \end{figure} The fluctuation in bulk stress, $\Delta\sigma$, is kept zero as the intention is to demonstrate the effects of tilt exclusively. Note that once a differential tension is applied and it becomes large enough to reverse the direction of slip at one end of the contact, the analytical solution used here as a point of comparison becomes inapplicable and only the asymptotic approach provides an answer. From Figure \ref{fig:evolution_of_slipstick_with_alpha}, it is apparent that increasing the average angle of tilt influences not only the extent and position of the contact, but also the extent and position of the permanent stick zone within the contact. The example reflects the solution behaviour indicated by Eq. \eqref{m}. We note that it is the mean normal load, $P_0$, and the average angle of tilt, $\alpha_0$, which affect the tangential solution, together with the tangential load inputs, $\Delta\sigma$ and $\Delta Q$. Here, we have not looked at the effects of the latter two, $\Delta\sigma$ and $\Delta Q$, but the solution developed above will remain valid as long as a shear-dominant behaviour is expected, i.e. the change in differential bulk tension is such that the direction of slip is the same at both ends of the contact during each half-cycle, and the permanent stick zone is in place at both sides of the wedge apex, i.e. the coordinates, $m$ and $n$, remain positive. Figure \ref{fig:evolution_of_slipstick_with_alpha} b) shows the marching-in-time steady-state solution with the expected asymmetrical slip-stick behaviour across the interface. Note that if the average angle of tilt, $\alpha_0$, becomes zero, a symmetrical slip-stick pattern, qualitatively equal to that presented in Figure \ref{fig:DeltaQ_Steady_state}, would be recovered. In the example illustrated in Figure \ref{fig:evolution_of_slipstick_with_alpha} b), the asymptotic solution underestimates the size of the steady-state slip zone at one end, while overestimating it at the other end. Overall, however, we see good agreement between the two different approaches for all depicted values of $\alpha_0/\phi$. \subsection{A varying moment together with large differential tension} \begin{figure}[t!] \centering \includegraphics[scale=0.4, trim= 0 0 0 0, clip]{Steady_State_Solution_MarchingInTime_VaryingMoment_Wedge02.eps} \caption{The marching-in-time solution for a shallow wedge with a normalised angle of tilt, $\alpha/\phi$, varying between $0.28$ and $0.32$ while being subject to mixed shear loading of $\Delta Q/f P0 = 0.3$ and large differential tension, $\Delta\sigma/\Delta\sigma_{th} = 2$ with zones of forward and reverse slip using the asymptotic description.} \label{fig:varyingmoment} \end{figure} In all loading scenarios examined so far in this paper there has always been a mathematically exact solution for the maximum extent of the steady-state slip zones with which to compare their asymptotic description. As explained in the introduction, the analytical approach reaches its limitation once we consider a \textit{large} varying bulk tension in the presence of a varying moment, or angle of tilt. Now that we have gained confidence in the applicability of the asymptotic description, we fill-in this remaining puzzle piece by revisiting the case of Figure \ref{fig:evolution_of_slipstick_with_alpha} b). Now the normalised angle of tilt, $\alpha/\phi$, is going to vary between $0.28$ and $0.32$, as opposed to being kept constant at $0.3$. This is going to cause a repetitive movement of the contact edge throughout the cycle. In addition to varying shear force, $\Delta Q/f P0 = 0.3$, we apply a large differential tension, $\Delta\sigma/\Delta\sigma_{th} = 2$, so that the direction of slip is not the same at both ends of the contact. Figure \ref{fig:varyingmoment} shows the marching-in-time slip-stick pattern throughout the cycle. Note that while the slip zones at one end are small compared with the overall contact half-width, they advance quite significantly into the inner part of the contact at the other end of the contact. From the experience gained with previous examples we know that the smaller the slip zones compared with the overall contact size, the higher the quality of approximation, so we may expect the asymptotic approach to eventually break down at one end of the contact. \section{Conclusions} In this contribution we have outlined recipes for obtaining the slip-stick behaviour for incomplete contacts under oscillatory loading of normal load, moment, shear load and differential bulk tension using asymptotic and analytical approaches. The motivation for this work stems from the limitations of the analytical description, that is, the lack of a mathematically exact solution to the steady-state slip stick behaviour in the presence of a varying moment and a differential bulk tension large enough to reverse the direction of slip at one end of the contact. A comparison is drawn between the asymptotes and the analytical solution for a shallow wedge geometry for different loading scenarios in order to gain confidence in the asymptotic approach. The work concludes with the application of the asymptotic description to a case where no existing analytical approach can provide an answer. The asymptotic approach presented herein equips the user with a simple-to-apply methodology for tackling problems for which these analytical problems manifest. The methods will also be of significant practical use in real-world problems where the complexity of the geometry may preclude analytical progress \section*{Acknowledgements} \hspace{0.4cm}This project has received funding from the European Union's Horizon 2020 research and innovation programme under the Marie Sklodowska-Curie agreement No 721865. David Hills thanks Rolls-Royce plc and the EPSRC for the support under the Prosperity Partnership Grant “Cornerstone: Mechanical Engineering Science to Enable Aero Propulsion Futures”, Grant Ref: EP/R004951/1.
\section{Introduction} Deep Neural Networks (DNN) constitute a major challenge to safety engineers, especially for complex and safety-critical functionality such as Autonomous Driving. Autonomous Driving requires complex perception systems embodying DNNs for Computer Vision to process the enormous amounts of video, lidar, and radar data streams. However, while DNNs have revolutionized the field of computer vision~\cite{lecun_deep_2015}, their characteristics and development process are completely different compared to the conventional software addressed by the automotive safety standard ISO~26262 -- Functional Safety~\cite{international_organization_for_standardization_iso_2018}. The behaviour of a DNN is not explicitly expressed by an engineer in source code following the principle where a developer defines the algorithm based on a specification; instead the developer defines an architecture that learns the algorithm, where engineers use enormous amounts of data complemented with domain-specific labels to let the machine figure out an algorithm that exhibits the desired behavior for a given stimulus. For autonomous driving, this step usually comprises the collection, preprocessing, training, and evaluation of huge amounts of annotated camera, lidar, and radar data using Machine Learning (ML)~\cite{salay_analysis_2017,henriksson_automotive_2018}. In January 2019, ISO/PAS~21448 -- Safety of the Intended Functionality (SOTIF) was published to meet the pressing industrial need of an automotive safety standard that is appropriate for ML~\cite{international_organization_for_standardization_iso_2019}. A PAS (Publicly Available Specification) is not an established standard, but a document that closely resembles what is planned to become a future standard, i.e., a PAS is published to speed up a standardization process in response to market needs. A PAS must be transformed to a standard within six years, otherwise it will be withdrawn\footnote{https://www.iso.org/deliverables-all.html}. ISO~26262 and SOTIF are meant to be complementary standards: ISO~26262 covers ``absence of unreasonable risk due to hazards caused by malfunctioning behaviour'' ¨\cite{international_organization_for_standardization_iso_2018} by mandating rigorous development, which is structured according to the established V-model way-of-working. SOTIF, on the other hand, addresses ``hazards resulting from functional insufficiencies of the intended functionality''~\cite{international_organization_for_standardization_iso_2019}, e.g., miss classifications by an object detector in an automotive perception system, which is different from conventional malfunctions targeted by defect-oriented ISO~26262. SOTIF is not organized according to the V-model but around 1) known safe states, 2) known unsafe states, and 3) unknown unsafe states. Furthermore, SOTIF presents a process to minimize the two unsafe states, represented by a flowchart orbiting around requirements specifications for the functionality under development, where moving hazards from 3) $\rightarrow$ 2) and from 2) $\rightarrow$ 1) originates from hazard identification and hazard mitigation, respectively. Following the SOTIF process, we identify that autonomous driving in environments that differ from what a DNN of the automotive perception was trained for, constitutes a major hazard; in ML literature, this is referred to as dealing with out-of-distribution samples. In previous work, we have proposed various DNN supervisors~\cite{henriksson_automotive_2019} to complement autonomous driving by detecting such samples as part of a safety cage architecture~\cite{borg_safely_2019}, i.e., adding a reject option to DNN classifiers when input does not resemble the training data. As part of a mitigation strategy for out-of-distribution camera data for example, we argue that the SOTIF process should result in a safety requirement mandating the inclusion of a DNN supervisor. However, only a few previous studies have presented structured evaluations of different DNN supervisors for image data; most previous work instead focuses on a single supervisor, e.g., \cite{bendale2016towards,liang2017enhancing} and \cite{hendrycks2018deep}. In this paper we evaluate two supervisor algorithms: a baseline algorithm~\cite{hendrycks2016baseline} and OpenMax~\cite{bendale2016towards}. In this context, the supervisor provides an anomaly score of each input sent to the model to comply with the test setup defined in \cite{henriksson_automotive_2019}. Our evaluation method consists of applying the two supervisors on two established DNNs namely VGG16~\cite{DBLP:journals/corr/SimonyanZ14a} and DenseNet~\cite{DBLP:journals/corr/HuangLW16a}, which are both trained with different hyperparameters on the CIFAR-10 dataset~\cite{CIFAR10}. For the outlier set, the validation set from Tiny ImageNet (a subset of the ImageNet large scale dataset~\cite{ILSVRC15}) is used. More specifically, this paper addresses the following two research questions: \begin{itemize} \item How does the outlier detection performance change with improved training of the DNNs under supervision? \item How does overfitting of the DNNs under supervision affect the supervisor performance? \end{itemize} \hfill We find that the performance of the supervisor is almost linear with regards to the network performance. However, the design and tuning of supervisors can be a volatile development process, especially when applied at different stages during training where network parameters have been shifted. The rest of the paper is organized as follows: Section~\ref{sec:rw} introduces related work on automotive perception and DNN supervisors. In Section~\ref{sec:eval}, we describe our method to evaluate and compare DNN supervisors based on our recent work~\cite{henriksson_automotive_2019}. Section~\ref{sec:results} presents our results and in Section~\ref{sec:disc} we discuss our findings in the light of safety for autonomous driving. Finally, Section~\ref{sec:conc} concludes our paper and outlines directions for future work. \section{Related Work} \label{sec:rw} Recent work on AI/ML has gained a lot of attention for break-through on large-scale pattern recognition for various application scenarios ranging from popular old board games, over text and image analysis, up to complete end-to-end solutions for autonomous driving. As these reported results appear fascinating on the one hand and underline the possible potential of AI/ML, commercializing such solutions into safe products is the apparent next challenge to overcome for a successful roll-out. Hence, recent works are dealing with how to test deep learning models for example. Fei et al.~\cite{deepXplore} and the succeeding study from Guo et al.~\cite{DLFuzz} suggest to evaluate testing coverage of models by evaluating neuron coverage. While such approaches show similarities to code, statement, or branch coverage in software testing as defined in ISO~26262~\cite{international_organization_for_standardization_iso_2018}, they fall short for evaluating the robustness of NNs as increased neuron coverage as achieved by artificially constructed test samples does not necessarily correlate with out-of-distribution samples that a NN might experience in reality. Furthermore, the improvements of these approaches reported by the authors are in the range of 2-3\%. A different approach is suggested by Kim et al.~\cite{GuidedDLTesting} who analyzed the influence of a particular stimulus to a NN with the purpose of providing support when designing specific test data to evaluate the performance of a NN. Czarnecki and Salay postulate in their position paper \cite{Czarnecki_2018} a framework to manage uncertainty originating from perception-related components with the goal of providing a performance metric. Their work provides initial thoughts and concepts to describe uncertainty as present in ML-based approaches; however, in contrast to our work here, uncertainty originating from the trained model itself is only captured briefly and not in a quantitative approach as outlined here. \begin{table}[!t] \centering \caption{Metrics for evaluating supervisor performance \cite{henriksson_automotive_2019}. } \label{tab:evaluation_metrics} \begin{tabular}{| c | p{0.75\linewidth}|} \hline \textbf{Metric} & \textbf{Description} \\ \hline AUROC & Area under the Receiver Operating Characteristic (ROC) curve. Captures how the true/false positive ratios change with varying thresholds. \\ \hline AUPRC & Area under the Precision-Recall curve. Indicates the precision variation over increasing true positive rate.\\ \hline TPR05 & True positive rate at 5\% false positive rate. Determines the rise of the ROC-curve, with minimal FPR. \\ \hline P95 & Precision at 95\% recall. Presents the accuracy when removing the majority of outliers. \\ \hline FNR95 & False negative rate at 95\% false positive rate. Shows how many anomalies are missed by the supervisor. \\ \hline CBPL & Coverage breakpoint at performance level. Measures how restrictive the supervisor has to be to regain similar accuracy as during training. \\ \hline CBFAD & Coverage breakpoint at full anomaly detection. Gives the coverage level where the supervisor has caught all outliers. \\ \hline \end{tabular} \end{table} Regarding out-of-distribution detection, several recent works have been proposed. Hendrycks and Gimpel~\cite{hendrycks2016baseline} describe an approach to monitor the performance of a NN-based system by evaluating the Softmax layer. This is used to predict if the network is classifying a given sample correctly; in addition, they also use this feature as a discriminator between in-distribution and out-of-distribution from the training data. Similarly to Hendrycks and Gimpel, Liang et al.~\cite{Liang18} also use the Softmax layer in their approach named ODIN but without the need for any changes in a given model. Bendale et al.~\cite{bendale2016towards} propose a new model layer OpenMax, which is a replacement for the Softmax layer. This new layer compares the input sample towards an unknown probability element, adapted from meta-recognition of the penultimate layer, thus allowing the layer to learn the behavior of the training set, and correlated classes. Additionally, detection of adversarial perturbations has been a topic of growing interest to highlight vulnerabilities in neural networks. Metzen et al. \cite{metzen2017detecting} proposed to extend the neural net with sub-networks aimed specifically at detect adversarial perturbations. In contrast to related work that aims to increase robustness of the classification task, their work empirically shows that their sub-networks can be trained on specific adversarials and generalized to similar or weaker perturbations. Carlini and Wagner~\cite{carlini2017towards} show how adversarial attacks can break defensive distillation \cite{papernot2016distillation}, a recent approach tailored to reduce the success rate of adversarial attacks from 95\% to 0.5\%. Their adversarial attack is tailored to three distance metrics, which are commonly used when generating adversarial samples. Finally, in contrast to only monitoring the Softmax layer, Tranheden and Landgren~\cite{MattiasLudwig18} compared and extracted information from five different detection methods to craft their own. Their combined solution suggests to supervise activations on all layers as various models and the problems being addressed vary quite a lot and hence, model-specific supervisors are needed. \section{Evaluation Method} \label{sec:eval} The scope of this work consists of training two image classification networks to various degree of accuracy. This is followed by applying two supervisors and documenting the change of supervisor performance. In addition, it is of interest to study how longer sessions of training the network affect the performance of the supervisors. To catch the behavioral change, the supervisor is applied after every $10^{th}$ epoch. The training process, the supervisor algorithms, and how the evaluation is carried out is explained in detail in the following. \textbf{Model training:} The experiments are completed with VGG16~\cite{DBLP:journals/corr/SimonyanZ14a} and DenseNet~\cite{DBLP:journals/corr/HuangLW16a}. VGG16 is a 16-layer deep network with all layers connected in series. DenseNet, a more modern network than VGG, consists of dense blocks of interconnected layers in between traditional convolutional layers. Both networks work in a feed-forward fashion, and are trained with the CIFAR-10 dataset~\cite{CIFAR10}. An interesting aspect of training DNNs is the continuous challenge to avoid overfitting. Over the years, several methods with the intention to improve generalization have been presented such as dropout layers~\cite{srivastava2014dropout}, batch normalization~\cite{ioffe2015batch}, methods of modifying learning rate or augmenting images with noise and shifts \cite{lecun2012efficient}. In this work, we study how the supervisor performance changes when training for longer periods of epochs, with three different levels of support to improve generalization. Thus, the networks are retrained three times; one in a normal fashion; one with the extension of image augmentation; one with the extension of image augmentation and adaptive learning rates and save states. \begin{algorithm}[!tpb] \caption{The \textit{Baseline} algorithm that utilizes the Softmax of the output vector to accept/reject~\cite{hendrycks2016baseline}}\label{Alg:Baseline} \begin{algorithmic}[1] \Require threshold $\epsilon$ \State Compute the output vector \textbf{v}(\textbf{x}) for input sample \textbf{x} \State Let $P$ be the Softmax of output vector \textbf{v} for all classes $j = 1, .., N$ \Statex \begin{equation} P(y=j |\textbf{x})= \frac{ e^{\textbf{v}_{j}(\textbf{x})} }{\sum_{i=1}^{N} e^{\textbf{v}_{i}(\textbf{x})}} \end{equation} \State Let the anomaly score be $A(\textbf{x})$ = 1 - argmax $P(y=j |\textbf{x})$ where $argmax$ is the function argument that maximizes function value. \State Let discriminator $D\{0, 1\}$ be defined as \begin{equation} D = \left\{\begin{matrix} \begin{matrix} 1 & if A(\textbf{x}) < \epsilon \\ 0 & otherwise \end{matrix} \end{matrix}\right. \end{equation} \end{algorithmic} \end{algorithm} \begin{algorithm}[!t] \caption{The \textit{OpenMax}~\cite{bendale2016towards} algorithm finds a Weibull distribution through Meta-Recognition calibration for each class $j$, with $\eta$ largest accepted distance to mean $\mu_{j}$. The rejection criterion first revises $\alpha$ top classes, while adding up distance as an ``unknown unknown'' probability. The sample is rejected if the most likely class is the unknown unknown or below threshold $\epsilon$.}\label{Alg:Openmax} \begin{algorithmic}[tbh] \Require Output vectors of the penultimate layer from the training set $\textbf{V}(x)=\textbf{v}_{1}(x) ... \textbf{v}_{N}(x) $ \Require Hyperparameter $\eta$: Largest accepted distance from sample to mean. \Require Meta Recognition toolbox $LibMR$ for Weibull model fitting \Procedure{Fit Weibull model}{$\mathbf{V}(\mathbf{x}), \eta$} \State For each correct classification let $\textbf{S}_{i,j} = \textbf{v}_{j}(x_{i,j})$ \For{\texttt{each class j = 1 ... N}} \State Compute the mean output vector $\mu_{j} = mean(\textbf{S}_{i,j})$ \State Fit Weibull model $\rho_{j} = libMR.fit(\hat{S}, \mu_{j}, \eta )$ \EndFor \State \textbf{return} $\rho$, $\mu$ \EndProcedure \Statex \Require Hyperparameter $\alpha$: How many possible classes to revise, sorted by their respective probability \State Compute output vector \textbf{v}(\textbf{x}) for input sample \textbf{x} \State Let $s(i) = argsort(v_{j}(x))$ and $\omega_{j}=1$ \For{$i = 1, ..., \alpha$} \Comment{Recallibrate weibull score} \State $\omega_{s(i)} = \rho_{i} (\mathbf{v}(\mathbf{x}), \mu_{i})$ \EndFor \State Revise output vector $\hat{v}(\mathbf{x}) = \mathbf{v}(\mathbf{x}) \cdot \omega (\mathbf{x})$ \State Define $\hat{v}_{o}(\mathbf{x}) = \sum_{i} \mathbf{v}_{i}(\mathbf{x}) (1-\omega_{i}(\mathbf{x}))$ \Statex \Require threshold $\epsilon$ \State Let $\hat{P}$ be the Softmax of output vector $\hat{\mathbf{v}}$ for all classes $j = 1, .., N$ \Statex \begin{equation} \hat{P}(y=j |\textbf{x})= \frac{ e^{\hat{\textbf{v}}_{j}(\textbf{x})} }{\sum_{i=1}^{N} e^{\hat{\textbf{v}}_{i}(\textbf{x})}} \end{equation} \State Let the anomaly score be $A(\textbf{x})$ = 1 - argmax $\hat{P}(y=j |\textbf{x})$ where $argmax$ is the function argument that maximizes function value. \State Let the discriminator $D\{0, 1\}$ be defined as \begin{equation} D = \left\{\begin{matrix} \begin{matrix} 1 & if A(\textbf{x}) < \epsilon \text{ or argmax }\hat{P} == \hat{v}_{o}(\mathbf{x}) \\ 0 & otherwise \end{matrix} \end{matrix}\right. \end{equation} \end{algorithmic} \end{algorithm} \textbf{Evaluation metrics:} The metrics to evaluate the performance of the supervisors are selected based on our previous study~\cite{henriksson_automotive_2019}. The study derived and motivated seven metrics and four plots that describe the performance of a supervisor. The metrics present the supervisors' ability in discriminating samples from an out-of-distribution set, as well as the risk that the sample is wrongly classified depending on the desired level of coverage. All evaluation metrics are described in Tab.~\ref{tab:evaluation_metrics}. This paper uses the first six metrics, and excludes \textit{CBFAD}, since full anomaly detection is not expected from this study.\footnote{Since CIFAR-10 and Tiny ImageNet are not disjoint, it is unreasonable to expect full separability.} \textbf{Supervisors:} This study evaluates a state-of-the-art supervisor, together with a baseline algorithm. In the context of this paper, a supervisor is defined as a monitoring system that refers to an inlier/outlier as a negative/positive sample. The supervisor has access to the training data, the inputs, as well as network activations of the neural network to determine whether or not an input sample should be considered out-of-distribution compared to the accumulated knowledge in the model. A supervisor can be realized in different ways, such as solely comparing the input sample to the training data (variational autoencoders \cite{An2015VariationalAB}), utilizing network layer observations (Baseline \cite{hendrycks2016baseline}, OpenMax \cite{bendale2016towards}), or applying perturbations to the input sample (ODIN \cite{liang2017enhancing}, Generative Adversarial Networks \cite{goodfellow_nips_2016}). To comply with the evaluation metrics, the only requirement is that the supervisor provides a single value: the anomaly score, which measures the similarity of the sample to the accepted inlier domain. This paper compares two methods: OpenMax~\cite{bendale2016towards}, and a baseline algorithm~\cite{hendrycks2016baseline}. The selected supervisors all consist of a manipulation, followed by a discriminate criterion, $D = \{0, 1\}$, that corresponds to if the supervisor accepts or rejects the sample. The methods are described in detail here: \textit{Baseline:} The baseline supervisor utilizes the penultimate layer of a network, to extract the network activations for all classes, as described in Algorithm~\ref{Alg:Baseline}. The algorithm subtracts the Softmax value of the most probable prediction, thus giving high anomaly scores to samples with scattered predictions, i.e., there is no clear best prediction. \textit{OpenMax:} The \textit{OpenMax} supervisor works under the preconception that most categories have a relative consistent pattern for output vectors. The idea is that the combined information in the output vectors for a training class can be used to fit a probability distribution function. Each input sample can then be compared to the most likely distribution, and rejected if the distance is too far from it. The OpenMax supervisor catches fooling samples that are artificially constructed, since their output vectors are quite different compared to real images. Even though it is possible to add an extra class for \textit{known unknowns}, which means incorporating a larger variety of samples as an outlier class for a network, it is infeasible to train with regards to \textit{all} possible unknowns. Hence, tools that account for \textit{unknown unknowns}, or \textit{unknown unsafe states} as defined in the SOTIF specification \cite{international_organization_for_standardization_iso_2019}, are needed to diminish the cause of unknown inputs. \textit{OpenMax} does this by extending the categories by an \textit{unknown unknown} class, that incorporates the likelihood of the DNN to falsely classify a sample. To do this, OpenMax adapts the concept of Meta-Recognition to work for DNNs, see Algorithm~\ref{Alg:Openmax}. \section{Experimental results} \label{sec:results} Each network is trained in three different runs, where each run adds tools to increase generalization of the model. The three runs consist of a normal one with no added support; the second one uses an added preprocessing step where each image is manipulated with added noise or an image transformation such as a rotation, shift or crop; and the third one uses the same as the second one with the addition of variable learning rate, where the learning rate is changed after 100 and 200 epochs. To differentiate between these three runs, the results section include a naming extension for the latter two training runs, i.e., \textit{Augm.} and \textit{Augm. + lr}, respectively. \begin{figure}[!tpb] \includegraphics[width=1\linewidth]{figures/training_results.pdf} \caption{Training results from the six training runs with VGG16 to the left, and DenseNet to the right. The solid and dashed line represent accuracy and loss respectively. Colors orange and blue represent results on training and testing set respectively.} \label{fig:training} \end{figure} \begin{table*}[!t] \centering \caption{Results for VGG16 and DenseNet, over three separate training runs, after applying the two supervisors. Arrows indicate the desired direction of the value, i.e $\uparrow$ indicates higher value is better.} \label{tab:supervisor_best_results} \begin{tabular}{lcllllllllll} \hline & \multicolumn{5}{c}{\textbf{Training results}} & \multicolumn{6}{c}{\textbf{Metrics from \cite{henriksson_automotive_2019}}} \\ \hline \textbf{Model} & \textbf{Augmented} & \textbf{Supervisor} & \textbf{Epoch} & \textbf{Acc} $\uparrow$ & \multicolumn{1}{l|}{\textbf{Loss} $\downarrow$} & \textbf{AUROC} $\uparrow$ & \textbf{AUPRC} $\uparrow$& \textbf{TPR05} $\uparrow$& \textbf{FNR95} $\downarrow$ & \textbf{P95} $\uparrow$& \textbf{CBPL} $\uparrow$ \\ \hline \multirow{6}{*}{VGG16} & - & Baseline & 291 & 86.11 & \multicolumn{1}{l|}{0.00622} & 0.80547 & 0.76597 & 0.20530 & 0.72246 & 0.00450 & 0.50430 \\ & - & OpenMax & 291 & 86.11 & \multicolumn{1}{l|}{0.00622} & 0.80794 & 0.79987 & 0.00000 & 0.60538 & 0.00410 & \textbf{0.50940} \\ & Augm. & Baseline & 293 & 91.20 & \multicolumn{1}{l|}{0.00334} & 0.84490 & 0.80894 & 0.27210 & 0.70305 & 0.00150 & 0.45435 \\ & Augm. & OpenMax & 293 & 91.20 & \multicolumn{1}{l|}{0.00334} & 0.85337 & 0.83897 & 0.34800 & 0.61430 & 0.00120 & 0.46285 \\ & Augm. + LR & Baseline & 291 & 91.95 & \multicolumn{1}{l|}{0.00367} & 0.81447 & 0.84310 & 0.00000 & 0.54946 & \textbf{0.01050} & 0.46010 \\ & Augm. + LR & OpenMax & 291 & 91.95 & \multicolumn{1}{l|}{0.00367} & 0.83994 & 0.82207 & 0.32650 & 0.79910 & 0.00970 & 0.43205 \\ \hline \multirow{6}{*}{DenseNet} & - & Baseline & 297 & 89.84 & \multicolumn{1}{l|}{0.00409} & 0.82407 & 0.79411 & 0.25920 & 0.70025 & 0.00150 & 0.46610 \\ & - & OpenMax & 297 & 89.84 & \multicolumn{1}{l|}{0.00409} & 0.83312 & 0.82654 & 0.41430 & 0.60422 & 0.00230 & 0.47495 \\ & Augm. & Baseline & 298 & 93.11 & \multicolumn{1}{l|}{0.00254} & 0.84762 & 0.81879 & 0.30630 & 0.70392 & 0.00240 & 0.41525 \\ & Augm. & OpenMax & 298 & 93.11 & \multicolumn{1}{l|}{0.00254} & 0.85599 & 0.85198 & 0.38680 & 0.60769 & 0.00350 & 0.41635 \\ & Augm. + LR & Baseline & 284 & 94.56 & \multicolumn{1}{l|}{0.00231} & \textbf{0.87478} & 0.86075 & \textbf{0.41970} & 0.73911 & 0.00490 & 0.41845 \\ & Augm. + LR & OpenMax & 284 & 94.56 & \multicolumn{1}{l|}{0.00231} & 0.85966 & \textbf{0.87657} & 0.00000 & \textbf{0.54820} & 0.00550 & 0.42040 \\ \hline \end{tabular} \end{table*} Each model is trained for 300 epochs, with a batch size of 64. This is more than enough to allow all models to converge. For the two initial runs the learning rate is fixed to $10^{-2}$, whereas for the final run the learning rate is varying between $10^{-1}$ and $10^{-2}$. The complete training results can be seen in Fig.~\ref{fig:training}. For both VGG16 and DenseNet, the addition of random augmentation of the input images allows the network to better generalize and to not get stuck in local minima. Augmentation is a method that is commonly used to do just this, as well as to reduce overfitting. For all our models, already after 10 epochs the test and training losses start to diverge from each other, which indicates that the model is learning faster towards the training set compared to the test set. While this is generally not desired, it is acceptable as long as the general performance on the test set also improves, which is the case for the remaining epochs. The only scenario where the test performance gets worse is when the model is allowed to adjust the learning rate, which intuitively means it will converge to a local optimum. This behavior can be seen in the bottom plots in Fig.~\ref{fig:training}, where the learning rate is reduced after 100 epochs to match the other networks. At this stage, it seems that the training starts overfitting. The learning rate is altered again after 200 epochs, but at this stage the learning rate is so small and hence, the network will only do small fine-tuning. \begin{figure}[!b] \centering \includegraphics[width=1\linewidth]{figures/vggnet-AUROC-vs-accuracy.pdf} \caption{AUROC metrics compared to the accuracy of the VGG16 network. With higher network accuracy, the supervisor can easier distinguish between in- and outliers.} \label{fig:vgg-auroc-accuracy} \end{figure} \begin{figure}[!b] \centering \includegraphics[width=1\linewidth]{figures/densenet-AUROC-vs-accuracy.pdf} \caption{AUROC metric compared to the accuracy of the DenseNet network. With higher network accuracy, the supervisor can easier distinguish between in- and outliers.} \label{fig:dense-auroc-accuracy} \end{figure} To test the supervisors, we saved the model parameters every $10^{th}$ epoch during training for all training variants, as well as the best epoch based on the accuracy on the test set. For each epoch, the supervisors are then evaluated and analyzed. The metrics for each models' best performing epoch are presented in Table~\ref{tab:supervisor_best_results}. The table shows how each training improvement, i.e., approaches to support generalization, applied in this study improved the final accuracy. Coincidentally, we note that also the AUROC increased when the accuracy increased. In fact, further investigation shows that the model accuracy and supervisor AUROC are connected in an almost linear relationship as can be seen in Fig.~\ref{fig:vgg-auroc-accuracy} and~\ref{fig:dense-auroc-accuracy}. This indicates that tools to improve the generalizability of the models also improve the ability to distinguish between in- and out-of-distribution samples, thus increasing the robustness of the system. When studying Figs.~\ref{fig:vgg-auroc-accuracy} and \ref{fig:dense-auroc-accuracy} further, it can be noted that certain locations in the plot are more dense that others. It is reasonable to expect epochs close-by to have similar results, thus have similar performance in the graphs. Since the supervisors are retrained for each epoch, some level of variance is achieved (e.g., around 90\% accuracy in Figs.~\ref{fig:vgg-auroc-accuracy} and~\ref{fig:dense-auroc-accuracy}). This shows how subtle changes in the model can rapidly change the behavior of the supervisor to perform better/worse. Temporary bad performance of the supervisor can potentially be solved with better parameter settings of the supervisors (OpenMax in this case). In this study, a parameter search was conducted through a grid search for one of the epochs. The grid was set up so that the centre of the grid corresponded to the parameter settings in the original paper~\cite{bendale2016towards}. In total 1,000 different runs were conducted, and the best settings were exported and used for all epochs. Since the model changes after each epoch, this can potentially introduce another level of uncertainty for the supervisor, since the supervisors are not optimized at each epoch. When analyzing how the coverage breakpoint to achieve the same accuracy as during the training session compared to the actual accuracy of the DNN, the results also show linear behavior with some dense clusters, see Fig.~ \ref{fig:vgg_coverage} and \ref{fig:densenet_coverage}. Initially, it can be seen that an overal linear trend appears between the accuracy and coverage: As long as the accuracy of the DNN is increasing, the coverage to achieve same accuracy is decreased. Intuitively, this behavior is expected, since the margin error margin is smaller with higher accuracy, the supervisor requires to be stricter to ensure more potential false activations are rejected. This behavior is spotted for both of the supervisors. An important observation is that the ability of the OpenMax supervisor to detect out-of-distribution samples is superior compared to the Baseline algorithm for the majority of epochs. The OpenMax algorithm has only been tuned for one of the epochs, it still manages to perform well on the majority of epochs, even though it is unknown how much the actual parameters have changed between the different runs. The coverage breakpoint can however vary up towards 5\% for epochs with similar accuracy. This indicates that tiny parameter changes causes the stability of the network to vary. A good indication of a robust network+supervisor combination would indicate that these small changes would not affect the coverage in a such a large manner. \begin{figure}[!t] \centering \includegraphics[width=1\linewidth]{figures/vggnet-CBPL-vs-accuracy.pdf} \caption{Coverage breakpoint at performance (CBPL) level compared to the test set accuracy of VGG16. Epochs with higher accuracy requires a stricted supervisor.} \label{fig:vgg_coverage} \end{figure} \begin{figure}[!t] \centering \includegraphics[width=1\linewidth]{figures/densenet-CBPL-vs-accuracy.pdf} \caption{Coverage breakpoint at performance level (CBPL) compared to the test set accuracy of DenseNet. Epochs with higher accuracy requires a stricted supervisor.} \label{fig:densenet_coverage} \end{figure} To further understand the robustness issue, we study how the false negative rate changes as the network gets more accurate. The false negative rate refers to how many samples are missed by the supervisor and hence, lower or close to zero is preferred. The results over all training epochs can be seen in Fig.~ \ref{fig:vgg_fnr95} and \ref{fig:densenet_fnr95}. Interestingly, the miss rate of outliers increases for the most accurate epochs. Intuitively, this is caused by two factors: The overfitting behavior of the fine-tuned networks causes the DNNs to be overconfident on samples it has not previously seen, as well as the fact that the datasets are not disjoint, thus certain samples look similar to the training domain, even though coming from the outlier distribution. This is not the case for earlier epochs, because the DNN has not yet overfit for these specific samples. To summarize, looking at Figs.~\ref{fig:vgg-auroc-accuracy}-\ref{fig:densenet_fnr95}, it is clear that improvements in generalization of the DNNs will increase the performance of the supervisors. Even with bad parameter initialization of the supervisors, the supervisor can exclude the majority of the out-of-distribution samples. Problems occur when the models are starting to fine-tune towards the training set, especially when allowed to use a smaller learning rate. When this happens, it is not guaranteed that the DNN generalizes any further, even though the accuracy might indicate improved results. This is further seen in the false negative rate plots, where the error increases when this fine-tuning starts, it can also be seen in the coverage reduction for higher accuracy epochs. The stability issue of the supervisors are shown for later epochs as well, where the results are dwindling downwards rather than improving, which raises the question of how to properly design and tune supervisors. \section{Discussion and future work} \label{sec:disc} Since more and more promising results gain attention and intended functionality becomes an increasingly discussed topic, the fact that DNNs can act overconfidently on input samples far from the training domain raises an issue. Even though several novel outlier detection methods have been published lately, as well as additional adversarial fooling methods, the lack of comparable results remains an issue. To advance the development of DNN supervisors, an ongoing issue is the comparability of these constructs, where in most cases the developers are training and testing on specific scenarios tailored for the task at hand, rendering it impossible to benchmark and compare in a proper way towards related work. In addition, proper ways to compare and benchmark would improve the way how parameterization of these supervisors would affect the behavior and instability. This is useful to see how they work in a safe environment compared to when exposed to adversarial or extreme case data. For safety critical applications, the need to distinguish between stable inputs (\textit{known safe states}), and uncertain states \textit{unknown states} is a major challenge that needs to be handled properly before deploying learning based systems into the real world, where all possible states are infeasible to record. Indeed, the size of the input space is one of the major challenges when engineering learning based systems~\cite{borg_safely_2019}, since it neither can be specified at design-time nor tested exhaustively before deployment. \begin{figure}[!t] \centering \includegraphics[width=1\linewidth]{figures/vggnet-FNR95-vs-accuracy.pdf} \caption{The false negative rate for all models compared the corresponding network test set accuracy on VGG16. Most missed samples are achieved by the most accurate networks, which suggest fine-tuning of the network increases the miss rate.} \label{fig:vgg_fnr95} \end{figure} While DNN supervisors have been proposed for perception in the literature before, this paper is the first to frame this safety mechanism within SOTIF. Based on the ``Identification and Evaluation of Triggering Events'' step in the ``Evaluate by Analysis'' of the SOTIF process (cf.~Fig.~9 in \cite{international_organization_for_standardization_iso_2019}), we argue that a functional restriction of computer vision is needed to mitigate the SOTIF related risks. Severe hazards remain even in the presence of ISO~26262, since functional insufficiency might result in potentially fatal object detection. We propose to complement DNNs with supervisors to restrict the function, i.e., to introduce an additional means to perform out-of-distribution detection. We posit that supervisors could be a fundamental component in safety cage architectures tailored for computer vision in autonomous drive, and that a corresponding safety requirement should be traced to the DNN supervisor~\cite{borg_traceability_2017}. However, DNN supervisors for perception in autonomous driving are not yet sufficiently understood. Before the SOTIF process can proceed with verification and validation of the intended function (including the proposed DNN supervisors), more research is needed. Open questions include how should the DNNs and their supervisors be trained and how does overfitting affect the results? In this paper, we show that improved generalization of the DNNs initially increases the performance of the associated supervisor. On the other hand, when the DNNs start overfitting, the performance of the supervisor deteriorates -- as made evident by diminishing false negative rates and coverage breakpoints. Further studies are needed to increase the external validity of our conclusion, involving additional DNN architectures and supervisors as well as different datasets. \begin{figure}[!t] \centering \includegraphics[width=1\linewidth]{figures/densenet-FNR95-vs-accuracy.pdf} \caption{The false negative rate for all models compared the corresponding network test set accuracy on DenseNet. Most missed samples are achieved by the most accurate networks, which suggest finetuning of the network increases the miss rate.} \label{fig:densenet_fnr95} \end{figure} \section{Conclusions} \label{sec:conc} In this work we have studied the interplay between the performance of a Deep Neural Network (DNN) in terms of classification accuracy, and the ability of an anomaly detection system to identify out-of-distribution samples when supervising the DNN. For several DNNs, supervisors and performance metrics, we show that there is a clear correlation between network accuracy and the ability of the supervisor to detect out-of-distribution samples. Furthermore, we show that different aspects of the supervisor performance are affected differently as the network accuracy changes. There is for instance a notable trade-off between achieving a high AUROC and a low FNR95 score. It is important to realize that it is the application that determines the relative importance of the different metrics used to evaluate the supervisor. For a safety critical application, a low value of FNR95 (accepting a low number of anomalies) would probably be more important than a high AUROC value. The dependence of supervisor performance on the detailed structure of the DNN, and the choice of evaluation metrics, highlight the fact that the black box nature and high complexity of DNNs make them hard to analyze from a safety perspective. It is difficult to make general statements about a certain supervisor method without proper analysis of the details in both model training and implementation. We therefore encourage the scientific community to put more emphasis on the analysis of supervisor performance when new methods are presented. \section*{Acknowledgments} This work was carried out within the SMILE II project financed by Vinnova, FFI, Fordonsstrategisk forskning och innovation under the grant number: 2017-03066, and partially supported by the Wallenberg AI, Autonomous Systems and Software Program (WASP) funded by Knut and Alice Wallenberg Foundation. \bibliographystyle{IEEEtran} \section{INTRODUCTION} This template, modified in MS Word 2003 and saved as ÒWord 97-2003 \& 6.0/95 Ð RTFÓ for the PC, provides authors with most of the formatting specifications needed for preparing electronic versions of their papers. All standard paper components have been specified for three reasons: (1) ease of use when formatting individual papers, (2) automatic compliance to electronic requirements that facilitate the concurrent or later production of electronic products, and (3) conformity of style throughout a conference proceedings. Margins, column widths, line spacing, and type styles are built-in; examples of the type styles are provided throughout this document and are identified in italic type, within parentheses, following the example. Some components, such as multi-leveled equations, graphics, and tables are not prescribed, although the various table text styles are provided. The formatter will need to create these components, incorporating the applicable criteria that follow. \section{PROCEDURE FOR PAPER SUBMISSION} \subsection{Selecting a Template (Heading 2)} First, confirm that you have the correct template for your paper size. This template has been tailored for output on the US-letter paper size. Please do not use it for A4 paper since the margin requirements for A4 papers may be different from Letter paper size. \subsection{Maintaining the Integrity of the Specifications} The template is used to format your paper and style the text. All margins, column widths, line spaces, and text fonts are prescribed; please do not alter them. You may note peculiarities. For example, the head margin in this template measures proportionately more than is customary. This measurement and others are deliberate, using specifications that anticipate your paper as one part of the entire proceedings, and not as an independent document. Please do not revise any of the current designations \section{MATH} Before you begin to format your paper, first write and save the content as a separate text file. Keep your text and graphic files separate until after the text has been formatted and styled. Do not use hard tabs, and limit use of hard returns to only one return at the end of a paragraph. Do not add any kind of pagination anywhere in the paper. Do not number text heads-the template will do that for you. Finally, complete content and organizational editing before formatting. Please take note of the following items when proofreading spelling and grammar: \subsection{Abbreviations and Acronyms} Define abbreviations and acronyms the first time they are used in the text, even after they have been defined in the abstract. Abbreviations such as IEEE, SI, MKS, CGS, sc, dc, and rms do not have to be defined. Do not use abbreviations in the title or heads unless they are unavoidable. \subsection{Units} \begin{itemize} \item Use either SI (MKS) or CGS as primary units. (SI units are encouraged.) English units may be used as secondary units (in parentheses). An exception would be the use of English units as identifiers in trade, such as Ò3.5-inch disk driveÓ. \item Avoid combining SI and CGS units, such as current in amperes and magnetic field in oersteds. This often leads to confusion because equations do not balance dimensionally. If you must use mixed units, clearly state the units for each quantity that you use in an equation. \item Do not mix complete spellings and abbreviations of units: ÒWb/m2Ó or Òwebers per square meterÓ, not Òwebers/m2Ó. Spell out units when they appear in text: Ò. . . a few henriesÓ, not Ò. . . a few HÓ. \item Use a zero before decimal points: Ò0.25Ó, not Ò.25Ó. Use Òcm3Ó, not ÒccÓ. (bullet list) \end{itemize} \subsection{Equations} The equations are an exception to the prescribed specifications of this template. You will need to determine whether or not your equation should be typed using either the Times New Roman or the Symbol font (please no other font). To create multileveled equations, it may be necessary to treat the equation as a graphic and insert it into the text after your paper is styled. Number equations consecutively. Equation numbers, within parentheses, are to position flush right, as in (1), using a right tab stop. To make your equations more compact, you may use the solidus ( / ), the exp function, or appropriate exponents. Italicize Roman symbols for quantities and variables, but not Greek symbols. Use a long dash rather than a hyphen for a minus sign. Punctuate equations with commas or periods when they are part of a sentence, as in $$ \alpha + \beta = \chi \eqno{(1)} $$ Note that the equation is centered using a center tab stop. Be sure that the symbols in your equation have been defined before or immediately following the equation. Use Ò(1)Ó, not ÒEq. (1)Ó or Òequation (1)Ó, except at the beginning of a sentence: ÒEquation (1) is . . .Ó \subsection{Some Common Mistakes} \begin{itemize} \item The word ÒdataÓ is plural, not singular. \item The subscript for the permeability of vacuum ?0, and other common scientific constants, is zero with subscript formatting, not a lowercase letter ÒoÓ. \item In American English, commas, semi-/colons, periods, question and exclamation marks are located within quotation marks only when a complete thought or name is cited, such as a title or full quotation. When quotation marks are used, instead of a bold or italic typeface, to highlight a word or phrase, punctuation should appear outside of the quotation marks. A parenthetical phrase or statement at the end of a sentence is punctuated outside of the closing parenthesis (like this). (A parenthetical sentence is punctuated within the parentheses.) \item A graph within a graph is an ÒinsetÓ, not an ÒinsertÓ. The word alternatively is preferred to the word ÒalternatelyÓ (unless you really mean something that alternates). \item Do not use the word ÒessentiallyÓ to mean ÒapproximatelyÓ or ÒeffectivelyÓ. \item In your paper title, if the words Òthat usesÓ can accurately replace the word ÒusingÓ, capitalize the ÒuÓ; if not, keep using lower-cased. \item Be aware of the different meanings of the homophones ÒaffectÓ and ÒeffectÓ, ÒcomplementÓ and ÒcomplimentÓ, ÒdiscreetÓ and ÒdiscreteÓ, ÒprincipalÓ and ÒprincipleÓ. \item Do not confuse ÒimplyÓ and ÒinferÓ. \item The prefix ÒnonÓ is not a word; it should be joined to the word it modifies, usually without a hyphen. \item There is no period after the ÒetÓ in the Latin abbreviation Òet al.Ó. \item The abbreviation Òi.e.Ó means Òthat isÓ, and the abbreviation Òe.g.Ó means Òfor exampleÓ. \end{itemize} \section{USING THE TEMPLATE} Use this sample document as your LaTeX source file to create your document. Save this file as {\bf root.tex}. You have to make sure to use the cls file that came with this distribution. If you use a different style file, you cannot expect to get required margins. Note also that when you are creating your out PDF file, the source file is only part of the equation. {\it Your \TeX\ $\rightarrow$ PDF filter determines the output file size. Even if you make all the specifications to output a letter file in the source - if you filter is set to produce A4, you will only get A4 output. } It is impossible to account for all possible situation, one would encounter using \TeX. If you are using multiple \TeX\ files you must make sure that the ``MAIN`` source file is called root.tex - this is particularly important if your conference is using PaperPlaza's built in \TeX\ to PDF conversion tool. \subsection{Headings, etc} Text heads organize the topics on a relational, hierarchical basis. For example, the paper title is the primary text head because all subsequent material relates and elaborates on this one topic. If there are two or more sub-topics, the next level head (uppercase Roman numerals) should be used and, conversely, if there are not at least two sub-topics, then no subheads should be introduced. Styles named ÒHeading 1Ó, ÒHeading 2Ó, ÒHeading 3Ó, and ÒHeading 4Ó are prescribed. \subsection{Figures and Tables} Positioning Figures and Tables: Place figures and tables at the top and bottom of columns. Avoid placing them in the middle of columns. Large figures and tables may span across both columns. Figure captions should be below the figures; table heads should appear above the tables. Insert figures and tables after they are cited in the text. Use the abbreviation ÒFig. 1Ó, even at the beginning of a sentence. \begin{table}[h] \caption{An Example of a Table} \label{table_example} \begin{center} \begin{tabular}{|c||c|} \hline One & Two\\ \hline Three & Four\\ \hline \end{tabular} \end{center} \end{table} \begin{figure}[thpb] \centering \framebox{\parbox{3in}{We suggest that you use a text box to insert a graphic (which is ideally a 300 dpi TIFF or EPS file, with all fonts embedded) because, in an document, this method is somewhat more stable than directly inserting a picture. }} \caption{Inductance of oscillation winding on amorphous magnetic core versus DC bias magnetic field} \label{figurelabel} \end{figure} Figure Labels: Use 8 point Times New Roman for Figure labels. Use words rather than symbols or abbreviations when writing Figure axis labels to avoid confusing the reader. As an example, write the quantity ÒMagnetizationÓ, or ÒMagnetization, MÓ, not just ÒMÓ. If including units in the label, present them within parentheses. Do not label axes only with units. In the example, write ÒMagnetization (A/m)Ó or ÒMagnetization {A[m(1)]}Ó, not just ÒA/mÓ. Do not label axes with a ratio of quantities and units. For example, write ÒTemperature (K)Ó, not ÒTemperature/K.Ó \section{CONCLUSIONS} A conclusion section is not required. Although a conclusion may review the main points of the paper, do not replicate the abstract as the conclusion. A conclusion might elaborate on the importance of the work or suggest applications and extensions. \addtolength{\textheight}{-12cm} \section*{APPENDIX} Appendixes should appear before the acknowledgment. \section*{ACKNOWLEDGMENT} The preferred spelling of the word ÒacknowledgmentÓ in America is without an ÒeÓ after the ÒgÓ. Avoid the stilted expression, ÒOne of us (R. B. G.) thanks . . .Ó Instead, try ÒR. B. G. thanksÓ. Put sponsor acknowledgments in the unnumbered footnote on the first page. References are important to the reader; therefore, each citation must be complete and correct. If at all possible, references should be commonly available publications.
\section{Introduction} Our understanding of the Venusian climate has noticeably increased with progress with General Circulation Models (GCM), powerful 3D tools to investigate the amount of data acquired by space missions, particularly in recent time by Venus Express (VEx) \citep[e.g][]{Drossart2007Nature,Piccioni2007} and Akatsuki \citep[e.g][]{Satoh2017,Fukuhara:2017} missions, as well as on-going ground-based telescope campaigns. For instance, some model experiments agree on the role of thermal tides in the vertical transport of angular momentum in the equatorial region and in maintaining the superrotation \citep{Yamamoto2006, TakagiMatsuda2007,Lebonnois2010, Mendonca2016, Yamamoto2021}. Others succeeded to reproduce the polar atmospheric structure and the ``cold collar" \citep{Ando2016, GarateLopez2018}, in close agreement with the observations, in particular when the latitudinal variations of the cloud structure are taken into account. Despite numerous and increasing observations, our view of the upper mesosphere and lower thermosphere (UMLT) of Venus (i.e. 80 km-140~km approximately) still remains incomplete. Therefore, GCMs are also used to understand the atmospheric conditions of high altitude regions where some key observations are lacking, especially on the dayside \citep{Brecht2012a, Gilli2017}. The UMLT is characterized by strong diurnal variations in atmospheric temperatures which drive Subsolar-to-Antisolar (SS-AS) transport of photolyzed products such as CO, O, NO, H, O$_2$ singlet delta, toward strong nighttime enhancements in the thermosphere \citep{Clancy2012}. VEx observations (2006-2014) revealed an even more variable atmosphere than expected: in particular, the so-called “transition” region ($\sim$ 80-120~km), between the retrograde superrotating zonal (RSZ) flow and the day-to-night circulation, showed latitude and day-to-day variations of temperature up to 80~K above 100~km at the terminator, and apparent zonal wind velocities measured around 96~km on the Venus nighttime highly changing in space and time. Current 3D models do not fully explain those variations, and specific processes (e.g. gravity wave propagation, thermal tides, large scale planetary waves) responsible for driving them are still under investigation. However, it is difficult to simulate all individual wave sources of temporal and spatial variability observed within the Venus atmosphere due to resolution constraints. It is useful for a modeling approach to have a more extensive collection of measurements to provide statistical means. An example of a comprehensive data inter-comparison is the work presented in \cite{Limaye2017} (hereinafter Limaye17), showing the state-of-the-art temperature and total density measurements taken during VEx lifetime by instruments onboard and by ground-based telescopes. The study by Limaye17 put in evidence that, although there is a generally good agreement between the various experiments, differences between individual experiments are more significant than measurement uncertainties, especially above 100 km, revealing a considerable temperature variability. These experiments observed the Venus atmosphere's vertical and latitudinal temperature structure, unveiling features that appear to be systematically present, such as a succession of warm and cold layers. \\Regarding abundances of tracers in the UMLT, \citet{Vandaele2016} reported retrievals of CO spanning the 65-150 km altitude range during the whole VEx mission with the instrument SOIR (Solar Occultation in the InfraRed) together with an updated comparison of CO measurements from the literature. Within the high variability observed in the short term, reaching one order of magnitude on less than one month period, they also found a systematic latitudinal trend: CO abundances in the equatorial region were larger than high-latitude (60$^\circ$-80$^\circ$) and polar (80$^\circ$-90$^\circ$) abundances by a factor 2 and 3 respectively at an altitude of 130 km. However, below 100 km, the trend is reversed (i.e., equator-to-pole increasing), as reported by previous observations \citep{Irwin2008a, Marcq2015}. This trend reversion supports the existence of a Hadley cell circulation type \citep{Taylor1995, TaylorGrinspoon2009,Tsang2008, Marcq2015}. Interestingly, the density profiles measured by SOIR on board VEx showed a distinctive change of slope with altitude occurring in the region usually lying between 100-110 km altitude, also present in the Venus International Reference Atmosphere (VIRA) model, but at a lower altitude \citep{Vandaele2016}. In VIRA, this may be caused by different observations feeding the model for CO: above 100 km, VIRA data is based on measurements reported by \citet{Keating1985}, below 100 km the values are those reported by \citet{vonZahn1983} and later updated by \citet{deBergh2006} and \citet{Zasova2006}. Simultaneous CO and temperature measurements in the lower thermosphere \citep{Clancy2012} suggested instead that a distinctive circulation pattern would force large-scale air masses downward, creating dynamic increases in temperature and CO mixing ratio. SOIR evening abundances are also systematically higher than morning values above 105 km altitude, but the reverse is observed at lower altitudes. Regarding the wind, the most relevant constraints in the mesosphere/thermosphere are provided by the diurnal/meridional distribution of CO and of the O$_2$ 1.27 $\mu$m IR nightglow, whose peak emission occurs at 96 $\pm$ 1 km in limb viewing \citep{Drossart2007}. Both CO and O are produced by CO$_2$ photo-dissociation during daytime and then transported to the nightside by the SS-AS circulation. Light species like CO are expected to pile up at the converging stagnation point of the wind field (i.e., the point where the horizontal velocity converges to zero). This stagnation point is at the anti-solar point for idealized SS-AS flow and displaced toward the morning terminator when a westward retrograde zonal flow is added. The position of the maximum and its magnitude depend on the relative values of equatorial velocity and a maximum cross-terminator velocity. \cite{Lellouch2008} observations showed a moderate (factor 2) CO enhancement near the morning terminator. To first order, this picture should be valid for the O$_2$ airglow. However, the situation is somewhat more complex in this case because the brightness of the O$_2$ emission also depends on chemistry and vertical transport (see companion paper by \citet{Navarro2021}, hereinafter Navarro21). \\In addition, a combination of nightside and terminator Doppler CO wind measurements took advantage of a rare solar transit in June 2012 to address several important questions regarding Venus's upper atmospheric dynamics. \citet{Moullet2012} found a substantial nightside retrograde zonal wind field near the equator, also detected in other nightside distribution studies and less pronounced in the dayside lower thermospheric circulation \citep{ClancyMuhleman1991,Gurwell1995, Lellouch2008,Clancy2012}. This was interpreted as the presence of weaker morning versus evening cross-terminator winds, likely to be associated with morning-evening asymmetric momentum drag due to enhanced gravity wave (GW) absorption over the morning thermospheric region \citep{Alexander1992, Bougher2006,Clancy2015}. Model simulations in \citet{Hoshino2013} showed that gravity wave forcing, coupled with a 40 m/s westward retrograde zonal wind field at 80 km altitude, is sufficient to impart a strong morning-evening asymmetry, as observed apart from the observed extreme temporal variability. \citet{Clancy2015} also measured substantially weaker morning terminator winds compared with evening terminator, consistent with \citet{Hoshino2013} results. However, the theoretical basis for forcing this asymmetry and associated retrograde zonal flow is not provided yet. Overall, wind distributions during nightside show much larger changes (50-100~m/s) over timescales of days to weeks than dayside winds \citep{Clancy2015}. Despite observational and modeling efforts in the last decades, Venusian upper atmosphere's temperature structure and dynamical behavior still raise questions: what are the sources of the variability observed in the airglow emissions on the nightside? Solar flux variation is expected to play only a minor role in the rapid changes observed in the nightglow morphological distribution \citep{Gerard2014, Gerard2017}. Instead, gravity waves have been suggested as a source of variability but have not been demonstrated to provide the required amplitude. In the companion article Navarro21, the state-of-the-art Venus GCM developed at the Institut Pierre-Simon Laplace (IPSL-VGCM) is used as well to investigate the variability of the upper atmosphere caused by a Kelvin wave generated in the cloud deck reaching the UMLT, and a supersonic shock-like structure wave in the thermosphere. In this paper, this same version of the IPSL-VGCM is validated with the most recent literature on observations of Venus UMLT atmospheric region, focusing on temperature, CO$_2$, CO and O abundances, and the effect of propagating non-orographic GW on those abundances is discussed. Section~\ref{Model} contains the description of the state-of-the-art of the IPSL-VGCM. The details on the formalism adopted for the non-orographic GW parameterization, with the GW parameters setup, and the improvement of non-LTE parameterization are in Appendices A and B. In this work, the outputs of the simulations obtained with the current high-resolution version (as Navarro21) are compared with a selection of data in Section~\ref{Comparison}, while an analysis of predicted diurnal and latitudinal variations of O and CO is presented in Section~\ref{Diurnal_Lat_variation}. The results are further discussed in Section~\ref{Discussion} and the possible effects of propagating GW to the predicted abundances analyzed. Section~\ref{Conclusions} is focused on conclusive remarks and recommendations for future studies. \section{Model description and recent improvements} \label{Model} The IPSL Venus GCM (IPSL-VGCM) has been used to investigate all regions of the Venusian atmosphere, as it covers the surface up to the thermosphere (150 km) \citep{Lebonnois2016,Gilli2017, GarateLopez2018,Navarro2018}. The vertical model resolution is approximately $\sim$ 2-3 km between 100 and 150 km, slightly smaller below 100 km. It includes a non-orographic GW parameterization as described in details in the \ref{GWparam}, and a photochemical module with a simplified cloud scheme, with fixed bi-modal log-normal distribution of the cloud varying with altitude. The aerosol number density is calculated for each mode and an explicit description of the H$_2$O and H$_2$SO$_4$ mixing ratios in the liquid phase is included. The mass sedimentation flux is added to tracers evolution, but the microphysical scheme is not coupled with dynamics. The evaluated mass loading in the cloud is not used by the radiative module which instead use a scheme recently updated in \cite{GarateLopez2018}. That takes into account the latitudinal variation of the cloud structure based on Venus Express observations, and lower haze heating rate yielding to a better agreement with in-situ values of wind below the cloud deck (around 45 km altitude) by the Pioneer Venus probes \citep{Schubert1983}. Chemical abundances play a crucial role in non-LTE effects (e.g., the impact of variable atomic O in the CO$_2$ cooling rates) and EUV heating processes, which are key processes in the upper atmosphere of terrestrial planets \citep{Bougher1999}. Our model is currently the only GCM coupled with photochemistry, which enables the study of the upper atmosphere and its composition self-consistently \citep[][; Stolzenbach et al. in preparation]{Stolzenbach2016}. Here we followed the same approach as in Gilli17: the molecular weigh is calculated up to 150 km according to the chemical composition of the atmosphere, and the homopause level is evaluated by the GCM. The potential impact of a variable composition below 100 km, as revealed by N$_2$ concentration measurements between 60 and 100 km of 40 $\%$ higher than the nominal value \citep[][]{Peplowski2020} was not taken into account in this study, since we estimate that it would have a negligible impact on our results. Note that the IPSL-VGCM considers only neutral species so far, but future developments will be addressed to extend the model up to the exobase of Venus ($\sim$ 250 km altitude) and take into account the ionospheric chemistry. Moreover, the inclusion of a stochastic non-orographic gravity wave parameterization is a plus compared to other existent thermospheric models \citep{Brecht2012a, Bougher2015} which accomplished deceleration of supersonic cross terminator winds artificially by Rayleigh friction. \subsection{Recent improvements} \label{rec_improv} Compared with the previous ground-to-thermosphere VGCM described in \cite{Gilli2017} (hereinafter Gilli17), we include here several improvements in both radiative transfer code and non-LTE parameterization. The details of the improved non-LTE parameterization are provided in \ref{nlte_improv}. Also, we increased the horizontal resolution from 7.5$^\circ \times$5.625$^\circ$ to 3.75$^\circ \times$1.875$^\circ$ resulting in qualitative changes of the UMLT nighttime circulation dynamics, as explained in Navarro21. The predicted thermal structure presented in Gilli17 already captured a succession of warm and cold layers, as observed by VEx, but localized data-model discrepancies suggested model improvements. At the terminator and at nighttime thermospheric temperatures were about 40–50~K colder and up to 30~K warmer, respectively. The altitude layer of the predicted mesospheric local maximum (between 100 and 120 km) was also higher than observed, and systematically warmer, indicating an overestimation of daytime heating rates produced by absorption of IR solar radiation by CO$_2$ molecules. Among several sources of discrepancies, we identified one possible candidate. First, we discarded the effect of the uncertainty in the collisional rate coefficient K$_{v-t}$ used in the non-LTE parameterization because, as shown in Figure 12 in Gilli17, the variation associated with this coefficient only modified the temperature profiles in the thermosphere above $10^{-2}$ Pa (about 120 km), not below. We focused instead on the heating rate used as ``reference" in Gilli17, extracted from non-LTE radiative transfer line-by-line model results in \citep{Roldan2000}. In that model, the kinetic temperature and density input profiles were taken from VIRA \citep{Keating1985, Hedin1983}. Nevertheless, VEx observations revealed that VIRA is not representative of the atmosphere of Venus above 90 km \citep{Limaye2017}. VIRA is based on Pioneer Venus measurements below 100 km and above 140 km, leaving a gap where the empirical models perform poorly \citep{Bougher2015}. New measurements of the thermal structure of the Venusian atmosphere offer the opportunity to improve these empirical models. Therefore, we decided to perform here a semi-empirical fine-tuning of the non-LTE parameterization implemented in Gilli17, based on temperature profiles by SOIR and SPICAV, as described in the next session. Note that we first performed baseline simulations with a less computationally intensive version (i.e. low horizontal resolution version 7.5$^\circ$ x 5.625$^\circ$ as in Gilli17). Successively, we increased the horizontal resolution to 3.75$^\circ$ x 1.875$^\circ$, without significant changes in the heating/cooling rates above 90 km. The combination of this high horizontal resolution and a more realistic representation of zonal winds \citep{GarateLopez2018} and temperature gave rise to a very unique GCM, able to describe the circulation of the upper atmosphere of Venus with unprecedented details, as described in the companion paper Navarro21. \vspace{1cm} \begin{table} \centering \begin{scriptsize} \begin{tabular}{l c c} \hline\hline \textbf{Parameter description} & \textbf{Best-Fit} & \textbf{Gilli17} \\ \hline\hline Solar Heating per Venusian day, $Vd$ [$K day^{-1}$] & 15.92 & 18.13 \\ Cloud top pressure level, $p_0$ [$Pa$] & 1985 & 1320 \\ Pressure below which non-LTE are significant, $p_1$ [$Pa$] & 0.1 & 0.008 \\ Central Pressure for LTE non-LTE transition, $ptrans$ [$Pa$] & 0.2 & 0.5 \\ \hline\hline \end{tabular} \end{scriptsize} \caption{"Best-fit" values from the improved non-LTE parameterization used in this work, compared with previous version in Gilli17. See Appendix B for details.} \label{tableNLTE} \end{table} \subsection{Fine-tuning of non-LTE parameters} \label{compar_SOIR-SPICAV} In order to fine-tune and select the set of ``best-fit" parameters listed in Table \ref{tableNLTE} we performed about 100 GCM test simulations with the goal of reducing as best as possible the discrepancies found between the averaged temperature profiles of the IPSL-VGCM and VEx dataset, in particular with SOIR/VEx \citep{Mahieux2012} and SPICAV/VEx \citep{Piccialli2014} profiles at the terminator and at night time, respectively. The major difficulty of this fine-tuning exercise was to find a combination of parameters described in \ref{nlte_improv} which also fulfills model numerical stability requirements (e.g. that allowed to run the model for several Venus days). The range of parameters that have been tested in this fine-tuning exercise is: 15.576 K to 24.60 K/day for the Solar heating per Venusian day, 1200 to 4350 Pa for the cloud-top pressure level, 6$\times 10^{-3}$ to 2.4 Pa for the pressure below which non-LTE effects are significant, and from 0.10 to 5 Pa for the center of the transition between non-LTE and LTE regime. The collisional rate coefficient was not changed compared to Gilli17. It is fixed at 3$\times 10^{-12}$, that is a "median" value commonly used in terrestrial atmosphere models. Figure \ref{soir_spicav_vgcm} shows an example of this improvement. Predicted upper mesospheric temperature (above 110 km approximately) are noticeably reduced by 20 K compared with the previous IPSL-VGCM version in Gilli17, and both the intensity and the altitude of the warm layer around 100~km are in better agreement with SOIR profiles. At nighttime the agreement is improved above 100 km with colder simulated temperature by 20 K, closer to observations. Above approximately 115~km, GCM results are within SPICAV error bars, though there are still data-model differences of about 20 K in the region between 100 and 115 km. The peak observed around 90-95~km is still higher in the model (around 100 km), despite a significant improvement. A detailed comparison of IPSL-VGCM results with a number of temperature measurements by VEx and ground-based experiments is provided in the next section. Temperature cross section (local time versus altitude) before and after the improvement of non-LTE parameterization is shown in Figure \ref{TEMP_maps_LCT_ALT_improvement}. The peak of temperature around midday and midnight is reduced by about 40 K and 20 K, respectively, and it is located about 10 km lower than predicted in Gilli17 (e.g. around 105 km and 100 km at midday and midnight, respectively). The temperature structure predicted by the IPSL-VGCM used in this work is in better agreement not only with VEx observations (see next section), but also with the National Center for Atmospheric Research (NCAR) Venus Thermospheric General Circulation Model presented in \cite{Brecht2012a} (see their Figure~1). \section{IPSL-VGCM high resolution simulations: model-data validation above 90 km} \label{Comparison} The results discussed from this section onwards were performed using high horizontal resolution (96$\times$96$\times$78) simulations of the state-of-the-art IPSL-VGCM described in section \ref{Model}. This is the highest resolution ever used for a Venus upper atmosphere model, corresponding to grid cells of approximately 200~km in the meridional direction and 400 km in the zonal direction, at the equator. This increased resolution allows to resolve smaller-scale waves compared to those in \citet{Gilli2017} and to shed a light on the observed variability in the nightside of Venus (see Navarro21). We aim to present an exhaustive data-model comparison with the state-of-the-art IPSL-VGCM, focusing on the atmospheric layers above 85-90~km, using the most complete compilation of Venus temperature and CO$_2$ density dataset so far, obtained both from space mission and ground based observations as in Limaye2017. Moreover, a selection of CO retrieved measurements by SOIR/VEx at the terminator \citep{Vandaele2016}, by VIRTIS/VEx during daytime \citep{Gilli2015} and from Earth-based telescopes \citep{Clancy2012} are considered here. For the atomic oxygen, only indirect O nighttime densities retrieved from O$_2$ nightglows as in \citet{Soret2012} are available for this comparison exercise. The instruments and measurements used in this validation exercise are listed in Table \ref{Table_obs}. \begin{landscape} \begin{table} \begin{tiny} \begin{tabular}{l |c |c |c |c |c |l} \hline \textbf{Experiment/Instrument} & \textbf{Method} & \textbf{Lat Coverage} & \textbf{LT Coverage} & \textbf{Alt Coverage }& \textbf{Retrieved variable} & \textbf{References} \\ \hline \textit{Remote sensing observations} \\\textit{from spacecraft} \\Magellan & Radio occultation & N/S hemisphere & night/day side & 38-100 km& Temperature & \citet{Jenkins1994} \\ Venera 15 & Radio occultation & N/S hemisphere & night/day side & 38-100 km & Temperature & \citet{Gubenko2008, Haus2013} \\ Pioneer Venus & Radio occultation & N/S hemisphere & night/day side & 38-100 km & Temperature & \citet{Kliore1985, Seiff1985} \\ VeRa/VEx & Radio occultation & N/S hemisphere & night/day side & 38-100 km & Temperature, CO$_2$ & \citet{Tellmann2009} \\SPICAV/VEx & Stellar occultation & N/S hemisphere & night side & 90-140 km & Temperature, CO$_2$ & \citet{Piccialli2010} \\ SOIR/VEx & Solar occultation & N/S hemisphere & terminators & 70-170 km & Temperature, CO$_2$, CO & \citet{Mahieux2010,Vandaele2016} \\ VIRTIS-H/VEx Limb & non-LTE 4.7 $\mu$m CO band & N hemisphere & day side & 100-150 km & Temperature, CO & \citet{Gilli2015} \\ VIRTIS-H/VEx & 4.3 $\mu$m CO$^2$ band & N/S hemisphere & night side & 65-80 km & Temperature & \citet{Migliorini2012} \\ VIRTIS-M/VEx Nadir & 4.3 $\mu$m CO$^2$ band & N/S hemisphere & night side & 65-80 km & Temperature & \citet{Haus2013, Grassi2014} \\VIRTIS-M/VEX & O$_2$ nightglow at 1.27 $\mu$m & N/S hemisphere & night side & $\sim$ 96 km & O & \citet{Soret2012} \\ VExADE-AER/VEX & Aerobraking & 70$^{\circ}$N-80$^{\circ}$N & morning terminator & 130-140 km & CO$_2$ & \citet{Muller-Wodarg2016} \\ VExADE-TRQ/VEX & Torque measurements & 70$^{\circ}$N-80$^{\circ}$N & 78-98$^{\circ}$ SZA & 165-200 km & CO$_2$ & \citet{Persson2015} \\ HMI/SDO & Venus transit & N/S hemisphere & Terminator & 70-110 km & Temperature & \citet{Tanga2012, Pere2016} \\ \textit{Ground-based observations} \\THIS/HIPWAC & non-LTE CO$_2$ emission & N/S hemisphere & day side & 110 km & Temperature &\citet{Sornig2008, Krause2018} \\ JCMT & sub/mm CO line absorption & N/S hemisphere & night/day side & 75-120 km & Temperature, CO & \citet{Clancy2012} \\ HHSMT & sub/mm CO line absorption & N/S hemisphere& night/day side & 75-110 km & Temperature & \citet{Rengel2008} \\ AAT, IRIS2, CFHT, CSHELL & O$_2$ nightglow at 1.27 $\mu$m & N/S hemisphere & night side & 85-110 km & (mean) rotational temperature & \citet{Crisp1996,Bailey2008, Ohtsuki2008} \\ \hline \end{tabular} \end{tiny} \caption{Observations of Temperature, CO$_2$, CO and O densities used in this paper (see Figures \ref{Night_data_VGCM}-\ref{CO2_density}). Adapted from Table 1 in \citet{Limaye2017}} \label{Table_obs} \end{table} \end{landscape} \subsection{Temperature and total density} Our current knowledge of the Venus temperature structure comes from empirical models such as VIRA \citep{Keating1985, Seiff1985} and VTS3 \citep{Hedin1983}, mostly based upon Pioneer Venus orbiter observations (PVO), and from many ground based and VEx observations \citep[e.g.][]{Clancy2008, Clancy2012, Migliorini2012, Grassi2010, Mahieux2010, Gilli2015, Piccialli2015, Krause2018}. A comprehensive compilation of temperature retrievals since the publication of VIRA to Venus Express era was given in Limaye17, which provided for the first time a consistent picture of the temperature and density structure in the 40-180 km altitude range. This data intercomparison also aimed to make the first steps toward generating an updated VIRA model. Beside the high variability observed even on short timescales, a succession of warm and cool layers above 80~km is one of remarkable feature that has been systematically detected. This was also correctly captured by model simulations \citep{Gilli2017, Brecht2012a, Bougher2015} and interpreted as a combination of radiative and dynamical effects: the local maximum at daytime is produced by solar absorption in the non-LTE CO$_2$ IR bands, and then advected to the terminator, while a nighttime warm layer around 90~km is produced by subsidence of day-to-night air at the AS point. Above, the cold layer around 125-130 km is suggested to be caused by CO$_2$ 15~$\mu$m cooling. Nevertheless, especially above 100~km, temperature variation is large and the difference between individual experiments seems to be higher. Figures \ref{Night_data_VGCM}-\ref{Day_data_VGCM} are adapted from Figures 16-19 in Limaye17 and show a selection of observed temperature profiles together with IPSL-VGCM simulations on daytime (local time LT= 7h-17h), nighttime (LT= 19h-7h) and at the terminator regions (LT $\approx$ 18h and 6h), averaged in latitude bins. Here we show only equatorial region (0$^\circ$-30$^\circ$) and middle/high (50$^\circ$-70$^\circ$) latitudes, as examples. Figures \ref{Night_data_VGCM} and \ref{Terminator_data_VGCM} include retrieved temperature profiles from several instruments on board Venus Express binned in a similar latitude/local time range. Both channels of the Visible and Infrared Imaging Spectrometer (VIRTIS) are used here: VIRTIS-M temperature retrieved using CO$_2$ 4.3~$\mu$m band reported by \citep{Grassi2014, Haus2015} and VIRTIS-H profiles as in \citet{Migliorini2012}. Data from solar and stellar occultation experiment on-board VEx, i.e. SOIR \citet{Piccialli2015} and SPICAV \citet{Mahieux2015}, respectively, from Radio occultation measurements \citep{Tellmann2009} and from O$_2$ nightglow observations at low latitudes \citep{Piccioni2009} are added. For daytime, only temperatures retrieved from non-LTE CO$_2$ emissions measured by VIRTIS/VEx \citep{Gilli2015} are available above 110 km, as shown in Figure \ref{Day_data_VGCM}. Mean temperatures derived from the sunlight refraction in the mesosphere during the 2012 Venus transit \citep{Tanga2012, Pere2016}, and ground-based observations by the JCMT \citep{Clancy2008, Clancy2012}, HHSTM \citep{Rengel2008} and THIS/HIPWAC \citep{Krause2018} are also taken into account. Empirical models such as VIRA \citep{Seiff1985, Keating1985} and VTS3 \citep{Hedin1983} are also plotted as reference. As mentioned previously in Sec.~\ref{compar_SOIR-SPICAV}, nightside temperatures (Fig.~\ref{Night_data_VGCM}) predicted by the IPSL-VGCM are still overestimated in the 90-115~km altitude region, by 20 to 30~K, with a peak temperature altitude (around 100~km) that is in agreement with Earth-based observations (e.g. JCMT profiles), but about 5 km altitude higher than the peak of SPICAV temperature retrievals. Below 90~km, predicted temperatures tend to be at the upper limit of the range of observed values. At terminators (Fig.~\ref{Terminator_data_VGCM}), simulated temperature profiles are in good agreement with most of the datasets, except for a cold bias of around 20~K above 130~km, compared to SOIR data. The current uncertainty in the collisional rate coefficients used in the non-LTE parameterization (see Section \ref{rec_improv}) is a possible candidate to explain this bias, since K$_{v-t}$ variation has an impact on the temperature above 120 km approximately. Dayside simulated temperature profiles (Fig.~\ref{Day_data_VGCM}) reproduce the warm and cold layers observed near 110~km and 125~km, respectively, but tend to overestimate their amplitude. Note that the VIRA and VTS3 models, that were under-constrained in the 100-150~km altitude range, do not predict these temperature inversions. Nevertheless, it is difficult to get any conclusion from Figure \ref{Day_data_VGCM}, given the high error bars of daytime temperature measurements obtained with VIRTIS/VEx. Retrieved vertical total density profiles from 80~km to 150~km are shown in Figure \ref{CO2_density} as measured by the different Venus Express experiments mentioned above. In addition, density measurements from Venus Express Atmospheric Drag Experiment (VExADE) are included for high latitudes (panel \textit{d} of Figure \ref{CO2_density}): between 130 and 140~km from accelerometer readings during aerobreaking \citep{Muller-Wodarg2016}, and in the altitude range 165-200~km from spacecraft torque measurements \citep{Persson2015}. Nighttime densities are in very good agreement with SPICAV and VeRa, with the exception of the equatorial region, where IPSL-VGCM densities are a factor of 2-3 greater than SPICAV observations between 120 and 130~km. Densities retrieved by SOIR at the terminator are also up to a factor 2-3 lower then our simulations in the equatorial region, and up to 1 order of magnitude lower in the altitude between 100-140~km at high latitudes. However, in this region, it is worth noticing that our model predicted values fit very well with the VExADE density profile. The discrepancy with SOIR may be linked to the assumption of spherical homogeneous layers made by the authors and on the a-priori CO$_2$ mixing ratio. SOIR and SPICAV measured directly the CO$_2$ number density from its absorption structure, thus have to assume a CO$_2$ volume mixing ratio, taken from VTS3 semi-empirical model \citep{Hedin1983} above 100~km. VTS3 is mainly based on PV measurements above 140~km and on model extrapolations assuming hydrostatic equilibrium between 100-140~km. This model revealed not to be adapted to represent the atomic oxygen densities derived from O$_2$ night-glow observations \citep{Soret2012}, the measured value being 3 times higher than predicted by VTS3. Moreover, the observed high variability of atmospheric quantities by VEx instruments was not reflected in previous empirical models (e.g. VIRA and VTS3) \citep{Limaye2017}. Therefore, the uncertainties of SOIR profiles may reflect uncertainties in the VTS3 densities and have to be taken into account when comparing the observations with models. \subsection{CO densities}\label{COdens} Figures \ref{CO_VIRTIS_day} to \ref{CO_SOIR_ET} show density of CO, compared with a selection of VEx experiments and ground-based measurements at different local time and latitudes. For daytime, retrieved CO density measurements are very scarce. We used here VIRTIS/VEx measurement in the altitude range 100-150~km as in \cite{Gilli2015} retrieved from non-LTE dayside IR CO emission at 4.7~$\mu$m. Below 112~km and for latitudes between 30$^\circ$N-50$^\circ$N, we also included the CO density profile from the semi-empirical model by \citet{Krasnopolsky2012} which is representative of averaged values under intermediate solar conditions. We found that our results are very well comparable with observations in order of magnitude. However, daytime retrieved CO density between 110 and 125 km are about a factor 2 larger than our model profiles for most latitudes, except for high latitude bins (50$^\circ$N-70$^\circ$N) where instead observed CO densities are smaller than simulations, up to a factor 3. Those discrepancies could be related to the biases in the predicted temperature structure that we found above 90~km, the model being systematically warmer than the data between 90-110~km (approximately 10$^{2}$—10$^{-1}$Pa), and colder between 120-150~km. Regarding the terminators (Figs.~\ref{CO_SOIR_MT}-\ref{CO_SOIR_ET}), our predicted CO densities are in overall agreement with SOIR dataset \citep{Vandaele2016} in particular at evening terminator, but with larger differences with observed values below about 110~km on the morning side. The discrepancies are up to one order of magnitude between 90 and 100~km, and factor 2-3 elsewhere. Larger discrepancies are seen in the polar region (80$^\circ$N-90$^\circ$N), where our model is up to one order of magnitude larger than data for both MT and ET. Daytime and nighttime disk averaged CO measurements were also obtained in several ground-based campaigns \citep{deBergh1988, ClancyMuhleman1991, Lellouch1989_CO,Clancy2008, Clancy2012} suggesting not only large variability over daily to weekly timescales, but also a distinct dayside versus nightside circulation in terms of zonal wind in particular \citep{Clancy2012}. Figure \ref{CO_Clancy} shows the comparison of model outputs and CO volume mixing ratio measurements during ground-based campaigns described in \cite{Clancy2012}. They represent 2001-2009 inferior conjunction sub-mm CO line observations, covering most of the disk (e.g. 60$^\circ$S-60$^\circ$N latitudes). Daytime model outputs are averaged for LT 10h-14h, and nighttime for LT 2h-22h, in the observed latitudinal bin. Our results are in general good agreement with observations for pressure ranges 10$^3$-10 Pa, but above that pressure the trends are diverging (i.e. increasing volume mixing ratio (vmr) predicted by the model versus almost constant CO values suggested by observations). Nighttime measurements of the 2007-2008 campaign are within model dispersion bars (calculated as the standard deviation in the selected latitude/local time bin), and show a better agreement than 2000-2002 campaigns. Part of the difference between the two campaigns is likely related to the much reduced beam coverage for those early observations (Clancy, private communication). Given the high variability of CO measurements over short time scales, it is difficult to find a general consensus among observations, and a clear defined trend. Our simulations indicate that the predicted abundances are affected by both the asymmetry of the SS-AS zonal flow at the terminator produced by non-orographic GW propagation in the lower thermosphere and the variability of zonal winds induced by Kelvin waves generated in the cloud deck, and propagating up to the mesosphere, as discussed in Navarro21. A possible interpretation of CO distribution is also provided in Section \ref{Discussion}. \subsection{O densities} Only nighttime oxygen density measurements are available in the UMLT of Venus and they are derived from O$_2$ nightglow in the altitude range 85-110 km observed with VIRTIS/VEX, as described in \cite{Soret2012}. Figure \ref{Odens_Soret_Krasno} shows IPSL-VGCM results together with the observed profile near the equator (24$^\circ$S) and nighttime O density extracted from a semi-empirical model by \citet{Krasnopolsky2012}. In very good agreement with \cite{Soret2012}, modeled values peak at 2$\times$10$^{11}$ cm$^{-3}$ around 110 km. \cite{Brecht2011} also found a similar value at midnight in their thermospheric GCM simulations at lower altitudes (3.4$\times$10$^{11}$ cm$^{-3}$ at 104 km). Below 95~km, O densities predicted by our model are decreasing much faster with altitude than observed in \cite{Soret2014}, but this is still consistent with \citet{Krasnopolsky2012}. A more complete description of the latitudinal and diurnal distribution of O predicted by the IPSL-VGCM is presented in the next section. \section{Diurnal and latitudinal variations of CO and O above 80 km by the IPSL-VGCM} \label{Diurnal_Lat_variation} The latitudinal and diurnal variations of CO and O predicted by the IPSL-VGCM are analysed here in greater detail. Atomic oxygen chemical lifetime is shorter than carbon monoxide. Therefore the O mixing ratio decreases more rapidly with increasing pressure than CO, and its latitudinal variations are not significant in the GCM above $\sim$10 Pa (95 km approximately). This is clearly shown in Figures \ref{lat_var_day}-\ref{lat_var_night}: CO and O \textit{vmr} profiles by IPSL-VGCM as function of pressure are plotted for several latitude bins, at daytime (LT: 10h-14h) and nighttime (LT: 22h-2h). \\In the lower mesosphere CO variations are primarily dominated by the global meridional dynamics, with CO \textit{vmr} increasing from equator-to-pole \citep{Tsang2008, Marcq2008}. At high latitudes, downward fluxes from the Hadley-type cell circulation bring air enriched in CO, whereas the ascending branch of these cells has the opposite effect near the equator \citep{Marcq2008}. This equator-to-pole variation is predicted by our model below 1 Pa ($\sim$ 97-100~km), while oxygen \textit{vmr} variation is negligible. In the upper mesosphere (above 1 Pa), CO as other light species is expected to pile up at the converging stagnation point of the wind field (i.e. where the horizontal velocity converges to zero). This point can be displaced from the anti-solar point when the circulation is not simply the SS-AS flow. Our simulations show that the CO nighttime bulge is shifted toward the morning between 85 and 100~km approximately, notably around the equator (see Figure~\ref{CO_O_LT_var}), suggesting that CO is preferentially transported westwards in the transition region. Interestingly, \citet{Lellouch2008} observations showed a moderate (factor 2) CO enhancement near the morning terminator, although there are no systematic observations supporting this enhancement of CO on the morning side. O chemical lifetime is shorter than the characteristic times of the atmospheric dynamics below 1~Pa approximately, where changes in \textit{vmr} are driven by chemistry. The opposite is expected above 100~km, where the dynamical effects dominate \citep{Brecht2011}. The atomic oxygen density peaks at midnight at the equator between 100 and 110~km, and it is about 1 order of magnitude larger than density values at the same altitude, at noon. The daytime peak is also located below 100~km. This enhancement from day to night side was also predicted in the Venus GCM by \citet{Brecht2011}(e.g. a factor of 6 larger), and it is the result of efficient transport of atomic oxygen atoms from their day sources to their nightside chemical loss at and below about 110 km. In addition, our model predicts a second peak around 120~km (Figure \ref{CO_O_LT_var}), clearly defined for local time 10h-14h and at terminator, but weaker at midnight. Unfortunately, no observational data can be used to validate those trends for daytime and terminator. Only O density retrieved indirectly from O$_2$ nightlow are available so far, and they are in very good agreement with our prediction (see Figure \ref{Odens_Soret_Krasno}). The origin of this second peak is beyond the scope of this paper and deserves a dedicated theoretical study, supported by systematic measurements of O densities. \section{Discussion: dynamical implications} \label{Discussion} \subsection{Impact of the Kelvin wave} \label{KWimpact} Several studies \citep{Hueso2008,Clancy2012,Gerard2014,Lellouch2008, Moullet2012} indicated that both retrograde zonal and SS-AS flows affect the global distribution of CO, O and other light species at mesospheric altitudes (70-120 km). Those chemical tracers are transported by winds and are expected to pile up at the converging stagnation point of the wind. This point is usually at midnight (LT=0h) for pure SS-AS flow but it can be displaced toward the morning terminator if westward retrograde zonal flow is added. The position of the maximum and its magnitude depend on the relative values of equatorial velocity and a maximum cross-terminator velocity. The majority of Doppler winds retrieved at mesospheric and lower thermospheric altitudes \citep{Clancy2008,Clancy2012,Rengel2008, Widemann2007, Gurwell1995} suggested local time variation of the wind velocity and the presence of a substantial retrograde zonal flow at altitudes above 90 km. \citet{Lellouch2008} observations showed a moderate (factor of 2) CO enhancement near the morning terminator, and \citet{Gurwell1995} showed a CO maximum centered at 3h30 at 95 km, and at 2h at 100 km, approaching 2$\times$10$^{-3}$ volume mixing ratio. This retrograde imbalance of the flow towards the morning side is also predicted by our model. CO nighttime bulge is not located at the AS-point but shifted toward the morning (see Figure~\ref{3D_map_CO_u} and Figure~\ref{2D_maps_CO_TN}) and in very good agreement with \citet{Gurwell1995}. The companion paper Navarro21 describes how the nightside mesospheric circulation is perturbed by a Kelvin wave with a period of approximately 5 Earth days In our simulations the equatorial wave appears to be excited between the middle and upper cloud (60-65 km altitude) and it propagates downward as a Kelvin wave, faster than zonal wind but also upward. At the cloud top, this wave propagates slower than the mean zonal wind, while recent Akatsuki UV observations suggest that the Kelvin wave propagates faster \citep{Imai2019}. Kelvin waves with wavenumber-1 have also been predicted by other model experiments \citep[e.g][]{Yamamoto2006, Yamamoto2019, Sugimoto2014} but contrarily to our simulations they are slower near the cloud base ($\sim$ 50 km), with a period of 5-6 days. On average, this perturbation shifts the convergence of equatorial zonal wind between LT 0h and 3h, as shown with the Venus-day averaged view of Figures~\ref{3D_map_CO_u}, or the instantaneous views of Figure~\ref{2D_maps_CO_TN}. In the second column of Figure~\ref{2D_maps_CO_TN} we show how CO, with a longer chemical lifetime than the Kelvin wave period, accumulates preferentially towards the morning terminator, particularly at altitudes 90 to 110~km. On the contrary, atomic oxygen (not shown here), with a shorter life span, peaks near the AS point. To our knowledge, there is no such observation of CO matching this GCM result. Kelvin wave impact on the nightside also enhances the poleward meridional circulation. As a consequence, CO and O are also periodically transported to high latitudes likewise, as explained in Navarro2021 and shown in the third column of Figure~\ref{2D_maps_CO_TN}. The poleward episodes create the high-latitude events of oxygen nightglow observed by VEx as high as 80$^\circ$ \citep{Soret2014}. However, our GCM simulations did not produce such events at latitudes higher than 60$^\circ$, probably due to SS-AS too strong in the simulations. Therefore, we would expect that high-latitude nighttime CO is also underestimated in these simulations. Figures~\ref{CO_SOIR_MT}-\ref{CO_SOIR_ET} instead show that the GCM largely overestimate SOIR measurements at the terminator in the latitude range 80$^\circ$N-90$^\circ$N. There are not CO nighttime measurements available at high-latitudes to contrast this result so far. Another remarkable characteristic of the Venus upper atmosphere emerging from the IPSL-VGCM results is the quiet daytime upper mesosphere (above 100~km) compared with highly variable nighttime, in agreement with observations. \subsection{Impact of non-orographic GW} \label{GWimpact} Non-orographic GW breaking above 100 km also have a modest impact on the CO concentration. Previous theoretical studies (e.g. \citet{Hoshino2013} and \citet{Zalucha2013}) included a GW-drag parameterization in their model to investigate the effect of GW on the general circulation in the Venusian mesosphere and thermosphere. \citet{Hoshino2013} found the existence of weak wind layer at $\sim$125~km, not seen in previous simulations which used the Rayleigh friction scheme. Instead, \citet{Zalucha2013} suggested that gravity waves did not propagate above an altitude of nearly 115~km at the terminator because of total internal reflection. \\The non-orographic GW paramerization and the baseline parameters chosen here are described in \ref{Sec_inputs}. An analysis of the horizontal distribution of the wind velocity driven by GW is beyond the scope of this work, but the role of non-orographic GW forcing to the retrograde zonal flow in the transition region may be identified in our simulations. They show a clear asymmetry of the SS-AS zonal flow between the morning and the evening branches and at altitudes above 100~km (see Figure~\ref{2D_maps_CO_TN}). As just explained in section \ref{KWimpact}, this asymmetry is caused by Kelvin wave impacting the mesosphere, but also by non-orographic GW. Indeed, these waves deposit momentum where they break, above 10$^{-1}$ Pa (110 km approximately), decelerating wind speed (e.g. causing acceleration of the SS-AS morning branch and deceleration of the SS-AS evening branch). The GW drag predicted by our model is stronger at the terminator, as in previous studies \citep[e.g.][]{Alexander1992,Hoshino2013, Zalucha2013}, but has similar times values for the morning and evening terminator near the equator, as shown in Figure~\ref{GWdrag_2D_map}. The deceleration of the evening branch of the SS-AS flow is stronger between LT 16h and LT 18h, with a maximum of $\sim$ 0.02 m s$^{-2}$ at 3$\times$10$^{-1}$ Pa. The acceleration instead occurs over larger local time and altitude ranges, reaching the maximum around LT 5h-8h (e.g. 0.018 m s$^{-2}$). Therefore, the mean zonal forcing integrated over local times (not shown here) is positive on average. All in all, the cause of the westwards dominant nightside winds and CO bulge towards the morning terminator is twofold: a westwards propagating Kelvin wave impacting the mesosphere, up to 110 km, and a weaker westwards acceleration by GW in the lower thermosphere, above 110 km. \section{Conclusions} \label{Conclusions} This paper presents a comprehensive data-model comparison of temperature, CO$_2$, CO and O abundances in the Venus upper atmosphere using the results of an improved high resolution ground-to-thermosphere (0-150~km) version of the IPSL-VGCM. For this validation exercise we selected a collection of data from VEx experiments and coordinated ground-based campaigns available so far following Limaye17. \begin{itemize} \item Improvements of the non-LTE parameterization previously implemented in the IPSL-VGCM and described in \ref{nlte_improv} allow to predict a thermal structure in better agreement with observations. Both the intensity and the altitude of warm layer around 100~km is closer to measurements. The peak of temperature around midday and midnight is reduced by 40~K and 20~K, respectively and it is located about 10 km lower than in Gilli17. The temperature inversion observed by SOIR \citep{Vandaele2016} around 125~km, with a minimum of 125-130~K is also very well captured by our model. Despite significant improvements, a number of discrepancies still remain. Nighttime temperature are still overestimated in the 90-115~km altitude region, by 20 to 30~K, with a peak temperature altitude $\sim$ 5 km higher than SPICAV \citep{Piccialli2015} retrieved profiles. Below 90~km, predicted temperatures tend to be at the upper limit of the range of observed values. A cold bias of 20~K to 50~K above 130~km is systematically found, compared to SOIR data. A candidate to explain this bias is the uncertainty in the collisional rate coefficients used in the non-LTE parameterization, that have an impact on the heating/cooling rate at thermosphere layers. Daytime simulated temperature profiles reproduce the warm and cold layers observed near 110 km and 125 km, respectively, but tend to overestimate their amplitude. \item CO$_2$ observed densities are also in overall agreement with IPSL-VGCM results, with the exception of the equatorial region, where predicted values are 2-3 times larger than SPICAV between 120 and 130 and than SOIR everywhere. Our model predicts very well density profiles measured during the VExADE aerobraking experiment \citep{Persson2015}. The tion on the a-priori of CO$_2$ mixing ratio used to retrieve density and temperature in SOIR may partially explain the discrepancies that we found, in addition to the temperature cold bias found above 130 km at the terminator, mentioned above. \item Regarding the CO and O, model predictions are very well comparable with observations in order of magnitude and trend. Discrepancies found at daytime with VIRTIS data \citep{Gilli2015} at low/middle latitudes between 110 and 125 km (the model slightly underestimates the CO density) could be linked to the biases in the predicted temperature, the model being systematically warmer than the data between 90-110 km and colder between 120-150 km. At the terminator, CO densities are in overall agreement with SOIR dataset, in particular at the ET, but with larger differences (up to one order of magnitude between 90 and 100 km and a factor 2-3 elsewhere) at the MT, especially at low latitudes. O densities are in very good agreement with nighttime indirect measurements from O$_2$ nightglow, peaking at 2$\times 10^{11}$ cm$^{-3}$ around 110 km, as observed. \item The latitudinal and diurnal variation of CO and O has also been investigated. We found that the CO nighttime bulge is shifted toward the morning between 85 and 100~km, approximately, suggesting that CO is preferentially transported westwards in the transition region. This feature is supported by ground-based observations of CO at nighttime \citep{Gurwell1995,Lellouch2008,Moullet2012} which suggested the presence of a substantial westward retrograde zonal flow at altitudes above 90~km. Atomic oxygen density instead peaks at midnight in the equatorial region between 100 and 110 km, and they are about one order of magnitude larger than at noon, at the same altitude, as a result of efficient transport of atomic oxygen atoms from their day sources to their nighttime chemical loss at and below the peak. \item Our model includes a non-orographic GW parameterization following a stochastic approach as in \citet{Lott2012,Lott2013}. Both westward and eastward GW generated above typical convective cells propagate upwards. In our simulations they break mostly above 10$^{-1}$ Pa (110~km altitude approximately) and accelerate/decelerate zonal wind by momentum deposition near the terminator. The mean zonal forcing is positive on average, contributing to retrograde imbalance of the flow in the lower thermosphere, above 110 km. \\However, given the lack of systematic observations of GW, which are necessary to constrain model parameters, our experience with different GCM configurations let us conclude that the total zonal wind (i.e. averaged for all local times) value is very sensitive to many GCM quirks, and can be either negative or positive. Therefore, it is not excluded that this weak acceleration in the lower thermosphere is linked to the sensitivity of the model to unconstrained parameters. \item The increased horizontal resolution used in this paper had a negligible impact on the heating/cooling rate above 90 km compared to the lower resolution version in Gilli17, therefore a small influence on the validation of the temperature and densities. However, the shock-like feature above 110 km which reduces horizontal wind speeds and increases the number of large-scale eddies, is obtained only in the high-resolution case (see Navarro21). Those eddies may be responsible of the high variation observed in O$_2$ nightglow and not explained by other models using a lower resolution in the thermosphere \citep{Hoshino2013, Brecht2011}. \item A retrograde imbalance of the flow towards the morning side is predicted by our model at equatorial regions, and interpreted as a combination of non-orographic GW asymmetric drag on the zonal wind and perturbation produced by a Kelvin wave generated at the cloud deck. The impact of this $\sim$5 Earth day wave on the middle/upper atmosphere of Venus is described in details in the companion paper Navarro21. \end{itemize} \section*{Acknowledgements} GG was supported by the European Union's Horizon2020 research and innovation programme under the Marie Sklodowska-Curie grant agreement No. 796923 and by Fundaç\~ao para a Ci\^encia e a Tecnologia (FCT) through the research grants UIDB/04434/2020, UIDP/04434/2020, P-TUGA PTDC/FIS-AST/29942/2017. The authors thank A.C. Vandaele for providing VAST and CO database from SOIR, and T. Clancy for sharing JCMT CO measurements. TN and GS acknowledge NASA Akatsuki Participating Scientist Program under grant NNX16AC84G. SL thanks the support from the Centre National d'Etudes Spatiales (CNES). FL thanks the Programme National de Planétologie (PNP) for financial support. This work used computational and storage services associated with the Hoffman2 Shared Cluster provided by UCLA Institute for Digital Research and Education’s Research Technology Group, as well as the High-Performance Computing (HPC) resources of Centre Informatique National de l’Enseignement Supérieur (CINES) under the allocations A0060110391 and A0080110391 made by Grand Equipment National de Calcul Intensif (GENCI).\\ \section*{Figures} \begin{figure}[!htbp] \centering \includegraphics[width=0.66\linewidth]{Figures2/Fig1a.pdf} \includegraphics[width=0.66\linewidth]{Figures2/Fig1b.pdf} \caption{Averaged temperature vertical profiles as function of altitude predicted by the IPSL-VGCM before (solid black line) and after (solid red line) improving the non-LTE parameterization, together with observational data from Venus Express. Top panel: temperature retrieval results at the terminator (green for morning and blue for evening terminator) at the latitude bin 30ºN-60ºN extracted from the Venus Atmosphere from SOIR data at the Terminator (VAST) database \citep{Mahieux2015}. SOIR standard deviation is also plotted as shaded green and blue areas. Bottom panel: Temperature retrieval results from SPICAV/VEx for the Northern Hemisphere (SPICAV - NH), 30ºN-50ºN in dark blue, and for the Southern Hemisphere (SPICAV - SH), 30ºS-50ºS in green (after \cite{Piccialli2015}). Standard deviation of the predicted temperature mean, in the same local time and latitude range as observed, is represented by dashed lines.} \label{soir_spicav_vgcm} \end{figure}{} \begin{figure}[!htbp] \includegraphics[width=1.1\linewidth]{Figures2/Fig2.pdf} \caption{Temperature field (local time versus altitude) obtained with IPSL-VGCM before (left panel) and after (right panel) the non-LTE parameterization improvements, listed in Table \ref{tableNLTE}. } \label{TEMP_maps_LCT_ALT_improvement} \end{figure}{} \begin{figure}[!htbp] \centering \includegraphics[width=0.7\linewidth]{Figures2/fig3a.pdf} \includegraphics[width=0.7\linewidth]{Figures2/fig3b.pdf} \caption{Compilation of available nighttime Venus temperature profiles above 80 km both from spacecrafts and ground based telescopes versus model predictions averaged at equatorial latitudes 0-30$^\circ$ from Southern and Northern hemispheres (top panel) and 50$^\circ$-70$^\circ$ N/S (bottom panel). Corresponding approximate values for altitude is given on the right hand side of the panel. Panel a) and panel b) are adapted from Figure 15 and 17 in \citet{Limaye2017}, respectively. See text for details. Uncertainties (one standard deviation) are either plotted as colored areas for averaged profiles in the same bin (Venus Express datasets, JCMT, HHSMT) or as error bars (O$_2$ nightglow). The IPSL-VGCM predicted profile is plotted with solid black line.} \label{Night_data_VGCM} \end{figure}{} \begin{figure}[!htbp] \centering \includegraphics[width=0.7\linewidth]{Figures2/Fig4a.pdf} \includegraphics[width=0.7\linewidth]{Figures2/Fig4b.pdf} \caption{Same as Figure \ref{Night_data_VGCM} but at the terminators (morning and evening) and with the addition of the mean temperature values retrieved at the evening terminator during the Venus transit in 2012. See text for details. Panel a) and panel b) are adapted from Figure 15 and 17 in \citet{Limaye2017}, respectively. The IPSL-VGCM predicted profiles are in solid and dashed black lines for the ET and MT, respectively.} \label{Terminator_data_VGCM} \end{figure}{} \begin{figure}[!htbp] \centering \includegraphics[width=0.7\linewidth]{Figures2/Fig5a.pdf} \includegraphics[width=0.7\linewidth]{Figures2/Fig5b.pdf} \caption{Same as Figure \ref{Night_data_VGCM} but for daytime and with the addition of temperature retrieved from CO non-LTE emissions observed by VIRTIS/VEx. See text for details. Panel a) and panel b) are adapted from Figure 15 and 17 in \citet{Limaye2017}, respectively.} \label{Day_data_VGCM} \end{figure}{} \begin{figure}[!htbp] \centering \includegraphics[width=0.45\linewidth]{Figures2/Fig6a.pdf} \includegraphics[width=0.45\linewidth]{Figures2/Fig6b.pdf} \includegraphics[width=0.45\linewidth]{Figures2/Fig6c.pdf} \includegraphics[width=0.45\linewidth]{Figures2/Fig6d.pdf} \caption{Measured total density profiles (molecule/cm$^3$) retrieved with different Venus Express instruments at nighttime (Panels a and b) and at the terminators (Panels c and d) for two latitude bins 0-30$^\circ$ and 70$^\circ$-80$^\circ$ (North/South averages) as indicated. The colored areas mark the uncertainty of the respective averaged profiles at one standard deviation. The figures are adapted from Figures 20 and 23 in \citet{Limaye2017}. Model predictions averaged at same latitudes and local time as observations are plotted with solid and dashed black lines. Vertical axis is given in altitudes, and approximate pressure (in mbar) is shown as the right hand side vertical axis.} \label{CO2_density} \end{figure}{} \begin{figure}[!htbp] \centering \includegraphics[width=1.\linewidth]{Figures2/Fig7.pdf} \caption{CO density retrieved by VIRTIS/VEx during daytime (LT 10h-14h) after \cite{Gilli2015} together with IPSL-VGCM averaged profiles binned at similar latitude and local time, as indicated in the panels. In addition, semi-empirical CO profile from \citet{Krasnopolsky2012} representative of mean conditions is shown for comparison with mid-latitude (30$^\circ$N-50$^\circ$N) daytime averaged profiles.} \label{CO_VIRTIS_day} \end{figure}{} \begin{figure}[!htbp] \centering \includegraphics[width=1.\linewidth]{Figures2/Fig8.pdf} \caption{IPSL-VGCM CO volume mixing ratio profiles (green dots) as function of pressure, averaged in latitude bin 60$^\circ$N-60$^\circ$S, 10h-14h LT for daytime and 22h-2h for nighttime, with variability indicated as standard deviation of the average. CO profiles retrieved from sub-mm CO absorption line observations as in \cite{Clancy2012} for daytime (top panel) and nighttime (bottom panel) are also plotted. 2000-2002 disk average daytime/nighttime measurements are in dark red/blue solid lines, while 2007-2008 disk average daytime/nighttime measurements are in red/blue solid line. } \label{CO_Clancy} \end{figure}{} \begin{figure}[!htbp] \centering \includegraphics[width=1.\linewidth]{Figures2/Fig9.pdf} \caption{IPSL-VGCM simulated CO density profiles as function of altitude (green dashed lines) at the morning terminator (MT) (LT 6h) averaged at four selected latitude bins as indicated in the panels: 0$^\circ$-30$^\circ$N, 30$^\circ$N-40$^\circ$N, 60$^\circ$N-80$^\circ$N, 80$^\circ$N-90$^\circ$N. CO density profiles and relative error bars retrieved by SOIR/VEx at the MT in the same latitude bins are plotted in blue. VAST stands for: ``Venus Atmosphere from SOIR data at the Terminator", after \cite{Vandaele2016}.} \label{CO_SOIR_MT} \end{figure}{} \begin{figure}[!htbp] \centering \includegraphics[width=1.\linewidth]{Figures2/Fig10.pdf} \caption{Same as Figure \ref{CO_SOIR_MT} but for evening terminator (ET), LT = 18h} \label{CO_SOIR_ET} \end{figure}{} \begin{figure}[!htbp] \centering \includegraphics[width=1.\linewidth]{Figures2/Fig11.pdf} \caption{Nigthtime O density retrieved by VIRTIS/VEx from O$_2$ nightglow observations at the equator (Lat: 24$^\circ$S) as in \cite{Soret2012} (blue line) and from \citet{Krasnopolsky2012} semi-empirical model (green line). IPSL-VGCM simulated nighttime profile (LT: 22h-2h) for the same latitude is shown with red dashed line.} \label{Odens_Soret_Krasno} \end{figure}{} \begin{figure}[!htbp] \includegraphics[width=1\linewidth]{Figures2/Fig12.pdf} \caption{Latitudinal variations of CO and O vmr during daytime (10h-14h) predicted by the IPSL-VGCM. The latitude bins are indicated in each panel. The pressure levels correspond to an altitude range between 75 and 140 km, approximately. CO profiles show a clear transition of regime at around 1 Pa (100-110 km)} \label{lat_var_day} \end{figure}{} \begin{figure}[!htbp] \includegraphics[width=1\linewidth]{Figures2/Fig13.pdf} \caption{Latitudinal variations of CO and O vmr during nighttime predicted by the IPSL-VGCM. The latitude bins are indicated in each panel.} \label{lat_var_night} \end{figure}{} \begin{figure}[!htbp] \centering \includegraphics[width=0.8\linewidth]{Figures2/Fig14a.pdf} \includegraphics[width=0.8\linewidth]{Figures2/Fig14b.pdf} \caption{Local time variations of IPSL-VGCM CO (top panels) and O (bottom panels) density profiles at equatorial regions 10S-10N (left panels) and middle-high latitudes 50N-70N (right panels). Daytime and nighttime profiles are averaged between LT=10h-14h and LT=22h-2h, respectively. Evening (18h) and morning (6h) terminators are also plotted.} \label{CO_O_LT_var} \end{figure}{} \begin{figure}[!htbp] \includegraphics[width=0.5\linewidth]{Figures2/Fig15a.pdf} \includegraphics[width=0.5\linewidth]{Figures2/Fig15b.pdf} \caption{3D maps of Venus nightside at 5 Pa (left) and 0.1 Pa (right) averaged for one Venus solar day, the anti-solar point is indicated with a star. Contour white lines: CO vmr and colors are zonal wind fields. Yellow lines indicate where the horizontal wind converges to zero values. The location of the terminator is represented by red dashed lines.} \label{3D_map_CO_u} \end{figure}{} \clearpage \begin{figure}[!hbtp] \includegraphics[width=1.1\linewidth]{Figures2/Fig16.pdf} \caption{Four consecutive snapshots, from left to right, of: (1) 2D local time vs. altitude map of zonal wind averaged for latitudes 20$^\circ$S-20$^\circ$N, (2) 2D local time vs. altitude map of CO vmr [mol/mol] averaged for latitudes 20$^\circ$S-20$^\circ$N (3) 3D map of CO vmr [mol/mol] at 100 km, the AS point is indicated by a black star.} \label{2D_maps_CO_TN} \end{figure}{} \begin{figure}[!htbp] \includegraphics[width=1.2\linewidth]{Figures2/Fig17.pdf} \caption{Local time-pressure distribution of the GW zonal drag (contours) integrated over all latitudes ($\theta$) and normalized by $\cos$($\theta$) to account for conservation of angular momentum. Zonal winds (color) at equator regions (10$^\circ$S-10$^\circ$N) are also shown. Solid line indicates acceleration, dotted line deceleration. Positive zonal wind values are westward and negative zonal wind values are eastward. Dashed-line indicates the region where the zonal wind converges to zero. } \label{GWdrag_2D_map} \end{figure} \newpage
\section{Introduction} Over the last few years, Deep Learning (DL) \cite{lecun2015deep} has been successfully applied across numerous applications and domains due to the availability of large amounts of labeled data, such as computer vision and image processing \cite{ribeiro2019deep, wu2020recent, thota2020multi, NEURIPS2020_47fd3c87}, signal processing \cite{caliva2018deep, purwins2019deep, he2020new}, autonomous driving \cite{liu2020video, wang2019deep, ghosh2019segfast}, agri-food technologies \cite{alhnaity2020autoencoder, khan2020iot}, medical imaging \cite{karakanis2020lightweight, li2020anatomical}, etc. Most of the applications of DL techniques, such as the aforementioned ones, refer to supervised learning, it requires manually labeling a dataset, which is a very time consuming, cumbersome and expensive process that has led to the widespread use of certain datasets, e.g. ImageNet, for model pre-training. On the other hand, unlabeled data is being generated in abundance through sensor networks, vision systems, satellites, etc. One way to make use of this huge amount of unlabeled data is to get supervision from the data itself. Since unlabeled data are largely available and are less prone to labeling bias issues, they tend to provide visual information independent from specific domain styles. Nowadays, self-supervised visual representation learning has been largely closing the gap with, in some cases, even surpassing supervised learning methods. One of the most prominent self-supervised visual representation learning techniques that has been gaining popularity is contrastive learning, which aims to learn an embedding space by contrasting semantically positive and negative pairs of samples \cite{chen2020simple, chen2020big, he2020momentum}. However, whether these self-supervised visual representation learning techniques can be efficiently applied for domain adaptation has not yet been satisfactorily explored. When, one applies a well performing model learned from a source training set to a different but related target test set, generally the assumption is that both these sets of data are drawn from the same distributions. When this assumption is violated, the DL model trained on the source domain data will not generalize well on the target domain, due to the distribution differences between the source and the target domains known as domain shift. Learning a discriminative model in the presence of domain shift between source and target datasets is known as Domain Adaptation. Existing domain adaptation methods rely on rich prior knowledge about the source data labels, which greatly limits their application, as explained above. This paper introduces a contrastive learning based domain adaptation approach that requires no prior knowledge of the label sets. The assumption is that both the source and target datasets share the same labels, but only the marginal probability distributions differ. One of the fundamental problems with contrastive self-supervised learning is the presence of potential false negatives that need to be identified and eliminated; but without labels, this problem is rather difficult to solve. Some notable work related to this area has been proposed in \cite{kalantidis2020hard} and \cite{robinson2020contrastive}, where both methods focused on mining hard negatives; \cite{huynh2020boosting} developed a method for false negative elimination and false negative attraction and \cite{chuang2020debiased} proposed a method to correct the sampling bias of negative samples. Over the past few years, ImageNet pre-training has become a standard practice, but using contrastive learning has demonstrated a competitive performance without access to labeled data by training the encoder using the input data itself. In this paper, we extend contrastive learning also referred as unsupervised representation learning without access to labeled data or pretrained imagenet weights, where we leverage the vast amount of unlabeled source and target data to train an encoder using random initialized parameters to the domain adaptation setting, a particular situation occurring where the similarity is learned and deployed on samples following different probability distributions. We also present an approach to address one of the fundamental problems of contrastive representation learning, i.e. identifying and removing the potential false negatives. We performed various experiments and tested our proposed model and its variants on several benchmarks that focus on the downstream domain adaptation task, demonstrating a competitive performance against baseline methods, albeit not using any source or target labeled data. The rest of the paper is laid out as follows: Section 2 presents the related work in self-supervised contrastive representation learning and domain adaptation methods. Section 3 describes our proposed approach, Section 4 presents the datasets and experimental results on domain adaptation after applying our model, and finally, Section 5 summarizes our work and future directions. \subsection{Contributions} The main contributions of this work can be summarised as follows: \begin{itemize} \item We explore contrastive learning in the context of Domain Adaptation, attempting to maximize generalization between source and target domains with different distributions. \item We propose a Domain Adaptation approach that does not make use of any labeled data or involves imagenet pretraining. \item We incorporate false negative elimination to the domain adaptation setting, resulting in improved accuracy and without incurring any additional computational overhead. \item We extend our domain adaptation framework and perform various experiments to learn from more than two views. \end{itemize} \begin{figure*}[t!] \centering \includegraphics[scale=0.47]{CDAv7.png} \caption{Overview of our proposed Contrastive Domain Adaptation model. Image on the \textbf{Left}, shows the pipeline of our model and image on the \textbf{Right} shows the loss function. } \label{fig-Network} \end{figure*} \section{Related Work} \textit{Domain Adaptation}: Domain adaptation is a special case of transfer learning where the goal is to learn a discriminative model in the presence of domain shift between source and target datasets. Various methods have been introduced to minimize the domain discrepancy in order to learn domain-invariant features. Some involve adversarial methods like DANN \cite{ganin2016domain}, ADDA\cite{tzeng2017adversarial} that help align source and target distributions. Other methods propose aligning distributions through minimizing divergence using popular methods like maximum mean discrepancy \cite{gretton2012kernel, long2015learning, long2017deep}, correlation alignment \cite{sun2016deep, chen2019joint}, and the Wasserstein metric \cite{chen2019deep, lee2019sliced}. MMD was first introduced for the two-sample tests of the hypothesis that two distributions are equal based on observed samples from the two distributions \cite{gretton2012kernel}, and this is currently the most widely used metric to measure the distance between two feature distributions. The Deep Domain Confusion Network proposed by Tzeng et al.\cite{tzeng2014deep} learns both semantically meaningful and domain invariant representations, while Long et al. proposed DAN \cite{long2015learning} and JAN \cite{long2017deep} which both perform domain matching via multi-kernel MMD (MK-MMD) or a joint MMD (J-MMD) criteria in multiple domain-specific layers across domains. \textit{Contrastive Learning}: Recently, contrastive learning has achieved state-of-the-art performance in representation learning, leading to state-of-the-art results in computer vision. The aim is to learn an embedding space where positive pairs are pulled together, whilst negative pairs are pushed away from each other. Positive pairs are drawn by pairing the augmentations of the same image, whereas the negative pairs are drawn from different images. Existing contrastive learning methods have different strategies to generate positive and negative samples. Wu et al.\cite{wu2018unsupervised} maintains all the sample representations of the images in a memory bank, MoCo \cite{he2020momentum} maintains an on-the-fly momentum encoder along with a limited queue of previous samples, Tian et al.\cite{tian2019contrastive} uses all the generated multi view samples with the mini-batch approach, whereas both SimClr V1 \cite{chen2020simple} and SimClr V2 \cite{chen2020big} use momentum encoder and utilize all the generated sample representations within the mini batch. The above methods can provide a pretrained network for a downstream task, but do not consider domain shift if they are applied directly. However, our approach aims to learn representations that are generalizable without any need of labeled data. Recently, contrastive learning was applied in Unsupervised Domain Adaptation setting \cite{kang2019contrastive, park2020joint, kim2020cross}, where models have access to the source labels and/or used models pretrained on imagenet as their backbone network. In comparison, our work is based on contrastive learning, which is also referred to as unsupervised representation learning, without having access to labeled data or pretrained imagenet parameters, but instead leveraging the vast amount of unlabeled source and target data to train a encoder from random initialized parameters. \textit{Removal of false negatives}: As the name suggests, contrastive learning methods learn by contrasting semantically similar and dissimilar pairs of samples. They rely on the number of negative samples for generating good quality representations and favor large batch size. As we do not have access to labels, when an anchor image is paired with the negative samples to form a negative pair, there is a probability that these images could share the same class, in which case the contribution towards the contrastive loss becomes minimal, limiting the ability of the model to converge quickly. These false negatives remain a fundamental problem in contrastive learning methodology, but relatively limited work has been in this area thus far. Most existing methods focus on mining hard negatives; \cite{kalantidis2020hard} developed hard negative mixing to synthesize hard negatives on the fly in the embedding space, \cite{robinson2020contrastive} developed new sampling methods for selecting hard negative samples where the user can control the hardness, \cite{huynh2020boosting} proposed an approach for false negative elimination and false negative attraction and \cite{chuang2020debiased} developed a debiased contrastive objective that corrects for the sampling bias of negative samples. \cite{huynh2020boosting} use additional support views and aggregation as part of their elimination and attraction strategy. Regarding our proposed approach and inspired by \cite{huynh2020boosting}, we have further simplified and only applied the false elimination part to the domain adaptation framework. Instead of using additional support views, we compute the similarity loss between the anchor and the negatives in the mini-batch, we then sort the corresponding negative pair similarity losses for each anchor and remove the negative pairs similar to the anchor. For each anchor in the mini-batch, we remove the exact same number of negative pairs, for example in $FNR_1$ we remove one potential false negative from a total of 1023 negative samples with a batch size of 512, totalling 512 total potential false negatives for all the anchor images in the mini-batch of 512. \begin{algorithm} \SetKwFunction{isOddNumber}{isOddNumber} \SetKwInOut{KwInput}{Input} \SetKwInOut{KwOutput}{Output} \KwInput{Source Data S:${(x_1^s, ...., x_n^s)}$, \\ Target Data T:${(x_1^t,...., x_n^t)}$ } \KwOutput{Encoder network $f(.)$, Projection-head network $g(.)$} \For{sampled minibatch}{ Make two augmentations per source image $a_1^s, a_2^s \sim S$\\ \# source augmentation-1 \\ $h_1^s=f(a_1^s)$ \\ $z_1^s=g(h_1^s)$ \\ \# source augmentation-2 \\ $h_2^s=f(a_2^s)$ \\ $z_2^s=g(h_2^s)$ \\ Calculate $L_{FNR\_S}$ for $z_1^s, z_2^s$ using Eq-\ref{FNR-Loss}\\ Make two augmentations per target image $a_1^t, a_2^t \sim T$ \\ \# target augmentation-1 \\ $h_1^t=f(a_1^t)$ \\ $z_1^t=g(h_1^t)$ \\ \# target augmentation-2 \\ $h_2^t=f(a_2^t)$ \\ $z_2^t=g(h_2^t)$ \\ Calculate $L_{FNR\_T}$ for $z_1^t, z_2^t$ using Eq-\ref{FNR-Loss}\\ Calculate $L_{FNR\_DA}$ using Eq-\ref{FNR-DA}\\ Calculate $L_{MMD}$ using Eq-\ref{MMD loss} \\ Update $f(.)$ and $g(.)$ by back propogating $L_{FNR\_DA}$ and $L_{MMD}$ } \caption{Algorithm for Contrastive Domain Adaptation with False Negative Removal and Maximum Mean Discrepancy summarizing our proposed method.} \end{algorithm} \section{Method} \subsection{Model Overview} Contrastive Domain Adaptation (CDA): We explore a new domain adaptation setting in a fully self-supervised fashion without any labelled data, that is where both the source and the target domain contains unlabelled data. In the normal UDA setting, we have access to the source domain whereas, our goal is to train a model using these unlabelled data sources in order to generalize visual features in both the domains. The aim is to obtain pre-trained weights that are robust to domain-shift and generalizable to the downstream domain adaptation task. Our model uses unlabelled source and target datasets in an attempt to learn and solve the adaptation between domains. Inspired by the recent successes of learning from unlabeled data, the proposed learning framework is based on SimClr \cite{chen2020simple} for domain adaptation setting where data from unlabelled source and target domains is used in task-agnostic way. SimClr \cite{chen2020simple} method learns visual similarity where a model pulls together visually similar-looking images nearby while pushing away dissimilar-looking images. However, in domain adaptation, the same class images may look very different due to domain gap, so that learning visual similarity alone does not ensure semantic similarity and domain-invariance between domains. So using CDA, we aim to learn general visual class-discriminative and domain-invariant features from both the domains via unsupervised pretraining. We introduce each specific component in detail below which is illustrated in Figure-\ref{fig-Network} and Figure-\ref{fig-Network-4views} for four views. From randomly sampled mini-batch of images N, we augment each image S twice creating two views of same anchor image $s_i$ and $s_j$. We use base encoder(Resnet50 architecture \cite{he2016deep}) that is trained from scratch to encode augmented images in order to generate representations $hs_i$ and $hs_j$. These representations are then inputted into a non-linear MLP with two hidden layers to get the projected vector representations $zs_i$ and $zs_j$. We find that this MLP projection benefits our model by compressing our images into a latent space representation, enabling the model to learn the high-level features of the images. We apply contrastive loss on the vector representations using the NT-Xent loss \cite{chen2020simple} that has been modified to identify and eliminate false negatives, thus resulting in improved accuracy, details of which are discussed in section 4.2. We also introduce MMD to measure domain discrepancy in feature space in order to minimize domain shift, details of which are discussed later in this section. The aim is to obtain the pretrained weights that are robust to domain-shift and efficiently generalizable. In the later stage, we perform linear evaluation using the encoder whilst entirely discarding the MLP projection head after pretraining. \subsection{Contrastive Loss for DA setting:} The goal of contrastive learning is to maximize the similarities between positive pairs and minimize the similarities of negative ones. We randomly sample mini batch of N images, each anchor image x is augmented twice creating two views of the same sample $x_i$ and $x_j$, resulting in 2N images. We do not explicitly sample the negative pairs, we instead follow \cite{chen2020simple}, and treat other 2(N-1) augmented image samples as negative pairs. The contrastive loss is defined as follows: \begin{equation}\label{Simclr-loss} L_{CONT} = -log\frac{exp \left ( \\sim \left ( z_{i}, z_{j} \right)/ T \right )} {\sum_{k=1}^{2N} 1_{\left ( k\neq i \right )} \\sim \left (z_{i}, z_{k} \right )/ T} \end{equation} where sim(u, v) is a cosine similarity function $u^Tv/\left \| u \right \|\left \| v \right \|$ and $T$ is a temperature parameter. However If we use the above contrastive loss is used in a domain adaptation scenario, as the mini-batch contains image samples from both domains, it may treat all other samples as negatives against the anchor image even though they may belong to the same class without distinguishing domains which could further widen the distance between them due to the difference in the domain specific visual characteristics, and therefore unable to learn domain invariance. In order to overcome these problems, we propose to use perform contrastive learning in the source and target domain independently by randomly sampling instances from source and target domain. Finally, our contrastive loss for DA is defined as follows: \begin{equation}\label{contrastive-loss-da} L_{CONT\_DA} = L_{CONT\_S} + L_{CONT\_T} \end{equation} where $L_{CONT\_S}$ and $L_{CONT\_T}$ are source contrastive loss and target contrastive loss \begin{figure}[t!] \centering \includegraphics[width=0.4\textwidth]{test1.png} \caption{Overview of CDA with four views} \setlength{\belowcaptionskip}{-4pt} \label{fig-Network-4views} \end{figure} \subsection{Removal of False Negatives:} Unsupervised contrastive representation learning methods aim to learn by contrasting semantically positive and negative pairs of samples. As we do not have access to the true labels in this type of setting, positive pairs are drawn by pairing the augmentations of the same image whereas the negative pairs are drawn from different images within the same batch. So, for a batch of N images, augmented images form N positive pairs for a total of 2N images and 2N-1 negative pairs. From those 2N-1, there could be images which are similar to the anchor, hence treated as false negative. During training, an augmented anchor image is compared against the negative samples to contribute towards a contrastive loss, as a result, there is a possibility that some of these pairs may have the same semantic information (label) as that of the anchor, and therefore can be treated as false negatives. But in cases where the original image sample and a negative image sample share the same class, the contribution towards the contrastive loss becomes minimal, limiting the ability of the model to converge quickly, as the presence of these false negatives discard semantic information leading to significant performance drop, we therefore identify and remove the negatives that are similar to the anchor in order to improve the performance of the contrastive learning. Inspired by \cite{huynh2020boosting}, we have simplified and only applied the false elimination part to the domain adaptation framework in order to improve the performance of contrastive learning. Instead of using additional support views, we compute the similarity loss between the anchor and the negatives within the mini-batch, we then sort the corresponding negative pair similarity losses for each anchor and remove the negative pairs' similar to the anchor. For each anchor we remove the same number of negative pairs, example $FNR_1$ removes 1 negative pair per anchor in the mini-batch. After removing the false negatives, the contrastive loss can be defined as follows: \begin{equation} \label{FNR-Loss} L_{FNR} = -log\frac{exp \left ( \\sim \left ( z_{i}, z_{j} \right)/ T \right )} {\sum_{k=1}^{2N} 1_{\left ( k\neq i,k\neq S_{i} \right )} \\sim \left (z_{i}, z_{k} \right )/ T} \end{equation} where Si is the set of the negative pair that are similar to the anchor i. However If we use the above loss is used in a domain adaptation scenario, similar to the contrastive loss, as the mini-batch contains image samples from both domains, it may treat all other samples as negatives against the anchor image even though they may belong to the same class without distinguishing domains, further widening the distance between them due to the difference in the domain specific visual characteristics, and therefore unable to learn domain invariance. In order to overcome these problems, we propose to use FNR loss in the source and target domain independently by randomly sampling instances from source and target domain. Finally, our joint FNR loss for DA is defined as follows: \begin{equation}\label{FNR-DA} L_{FNR\_DA} = L_{FNR\_S} + L_{FNR\_T} \end{equation} where $L_{FNR\_S}$ and $L_{FNR\_T}$ are source contrastive loss and target contrastive loss \subsection{Revisiting Maximum Mean Discrepancy(MMD):} MMD defines the distance between the two distributions with their mean embeddings in the Reproducing Kernel Hilbert Space (RKHS). MMD is a two sample kernel test to determine whether to accept or reject the null hypothesis $p = q$ \cite{gretton2012kernel}, where $p$ and $q$ are source and target domain probability distributions. MMD is motivated by the fact that if two distributions are identical, all of their statistics should be the same. The empirical estimate of the squared MMD using two datasets is computed by the following equation: \begin{equation}\label{MMD loss} \begin{split} L_{{MMD}} & = \left\|\frac{1}{N}\sum_{i=1}^N\phi (x^s_i)-\frac{1}{M}\sum_{j=1}^M\phi (x^t_j) \right\|^2_{H}... \\ & = \frac{1}{N^2}\sum_{i=1}^N\sum_{i^\prime=1}^Nk(x^s_i,x^s_{i^\prime})-\frac{2}{NM}\sum_{i=1}^N\sum_{j=1}^Mk(x^s_i,x^t_j) \\ & + \frac{1}{M^2}\sum_{j=1}^M\sum_{j\prime=1}^Mk(x^t_j,x^t_{j^\prime}) \end{split} \end{equation} where $ \phi\left ( . \right ) $ is the mapping to the RKHS H, $k\left ( .,. \right ) = \left \langle \phi\left ( . \right ) , \phi\left ( . \right ) \right \rangle$ is the universal kernel associated with this mapping, and N, M are the total number of items in the source and target respectively. In short, the MMD between the distributions of two datasets is equivalent to the distance between the sample means in a high-dimensional feature space. \begin{figure}[t!] \centering \centerline{\includegraphics[width=90mm,scale=0.5]{methods-comparision-3.png}} \caption{Average Accuracy comparision of proposed CDA frameworks with CDA-Base.} \label{fig-FNR} \end{figure} \section{Experiments} \subsection{Datasets} Since we propose a new task, there is no benchmark that is specifically designed for our task. We illustrate the performance of our method for the contrastive domain adaptation task comparing with the SimClr-Base and CDA-Base explained later in the section-4.2, we apply it on the standard digits dataset benchmarks using accuracy as the evaluation metric. MNIST $\longrightarrow$ USPS (M$\rightarrow$U): MNIST \cite{lecun1998gradient} which stands for “modified NIST” is treated as source domain, it consists of black-and-white handwritten digits and USPS \cite{denker1989neural} is treated as target domain, it consists handwritten digit datasets scanned and segmented by the U.S. Postal Service. As both these datasets contain grayscale images the domain shift between these two datasets is relatively small. Figure \ref{fig-FNR-digit1} below shows sample images from M$\rightarrow$U. \begin{figure}[h!] \centering \caption{Sample images from datasets: MNIST-USPS} \centerline{\includegraphics[width=75mm,scale=0.5]{mnist-usps.png}} \label{fig-FNR-digit1} \end{figure} SVHN $\longrightarrow$ MNIST (M$\rightarrow$S): In this setting, SVHN \cite{netzer2011reading} is treated as source domain and MNIST \cite{lecun1998gradient} is treated as the target domain. MNIST consists of black-and-white handwritten digits, SVHN consists of crops of coloured, streetview house numbers consisting of single digits extracted from images of urban house numbers from Google Street View. SVHN and MNIST are two digit classification datasets with a drastic distributional shift between the two of them. The adaptation from MNIST to SVHN is quite challenging because MNIST has a significantly lower intrinsic dimensionality than SVHN. Figure below \ref{fig-FNR-digit2} shows sample images from M$\rightarrow$S. \begin{figure}[h!] \centering \caption{Sample images from datasets: SVHN-MNIST} \centerline{\includegraphics[width=75mm,scale=0.5]{svhn-mnist.png}} \label{fig-FNR-digit2} \end{figure} MNIST $\longrightarrow$ MNISTM (M$\rightarrow$MM): MNIST \cite{lecun1998gradient}, which consists of black-and-white handwritten digits is treated as the source domain and MNISTM is treated as a target domain. MNISTM is a modification of MNIST dataset where the digits are blended with random patches from BSDS500 dataset color photos. Figure below \ref{fig-FNR-digit3} shows sample images from M$\rightarrow$MM. \begin{figure}[h!] \centering \caption{Sample images from datasets: MNIST-MNISTM} \centerline{\includegraphics[width=75mm,scale=0.5]{mnist-mnistm.png}} \label{fig-FNR-digit3} \end{figure} \subsection{Implementation Details} CDA uses a base encoder ResNet-50 \cite{he2016deep} trained from scratch followed by a two layered non-linear MLP. During pretraining, we train CDA on 2 Titan Xp GPUs, using LARS optimizer \cite{you2017large} with a batch size of 512 and weight decay of le-6 for a total of 300 epochs. Similar to SimClr\cite{chen2020simple}, we report performance by training a linear classifier on top of a fixed representation, but only with source labels to evaluate representations which is a standard benchmark that has been adopted by many papers in the literature \cite{chen2020simple,chen2020big,oord2018representation}. \subsection{Evaluation} We conducted various experiments using unlabeled source and target digit datasets. The goal of our experiments is to introduce contrastive learning to the domain adaptation problem in order to maximize generalization between source and target datasets by learning class discriminative and domain-invariant features along with improving the performance of contrastive loss by eliminating the false negatives which is one of the main drawbacks in the contrastive learning without access to labels. We have performed multiple experimented using two views and four views \cite{tian2019contrastive}. Figure-\ref{fig-FNR} compares the average accuracy of our proposed two view CDA frameworks with the CDA-Base. Following are the various experimental scenarios we performed on the digit datasets. SimClr-Base: We start our experimental analysis by evaluating using SimClr. We have trained on source dataset using the same setup as SimClr, whilst testing on the target dataset. We treat this as a strong baseline which we call SimClr-Base and use this as reference for comparison against other methods. CDA-Base: We followed the methodology as described in section-3.2, trained the model using the equation-\ref{contrastive-loss-da} and evaluated on the target domain. Looking at table-\ref{tab:FNR-Removal-Table}, we can clearly observe that the model shows higher performance compared to the SimClr-Base. The model has clearly learnt both visual similarity and domain-invariance resulting in minimizing the distance between the domains and maximizing the classification accuracy. Overall, the average accuracy for all the datasets has increased by around 19\% compared to the SimClr-Base model. We treat this result as a second strong baseline and call it CDA-Base. CDA\_FNR: We followed the methodology as described in section-3.3, and trained the model using the equation-\ref{FNR-DA}. We then evaluated the model trained using this method on the target domain. Looking at table-\ref{tab:FNR-Removal-Table}, in addition to learning visual similarity and domain-invariance, model also successfully identified and eliminated the potential false negatives as they contain the same semantic information as that of the anchor, resulting in converging faster and increased accuracy. We experimented on two scenarios, firstly we removed one false negative which we call FNR1 and in the second case, we experimented by removing two false negatives which we call FNR2. The results of these experiments can be seen in table-\ref{tab:FNR-Removal-Table}, which concludes that removal of false negatives improves accuracy resulting in converging faster. The average accuracy has increased by 2.3\% after removing one false negative. Additionally by removing two false negatives, we observe that the average accuracy has increased by 3.8\% in comparison to CDA-Base and 1.5\% in comparison to FNR1. Compared to the SimClr-Base, the average accuracy has increased around 21\%. CDA-MMD: We have used the same setup as that of CDA-Base. Additionally we introduced MMD as described in section 3.4, which is computed between vector representations extracted from each domain as per the equation-\ref{MMD loss}, in order to reduce the distance between the source and target distributions. We backpropagate NT-Xent loss from equation-\ref{contrastive-loss-da} along with MMD loss equation-\ref{MMD loss}. From table-\ref{tab:my-table-MMD}, we observe that by minimizing both these losses together, our model achieves much better alignment of the source and target domains, showing the usefulness of combined contrastive loss and MMD alignment. In comparison to the CDA-Base method, the performance gain tends to be large as we can see that it has increased by 4.5\%. CDA\_FNR-MMD: We have used the same setup as that of CDA\_FNR, additionally we have introduced MMD which is computed between vector representations extracted from each domain as per the equation-\ref{MMD loss}, in order to reduce the distance between the source and target distributions. We calculate FNR loss both for source and target domains using equation-\ref{FNR-DA} and backpropagate FNR loss equation-\ref{FNR-DA} along with MMD loss equation-\ref{MMD loss}. From table-\ref{tab:my-table-MMD}, we observe that by removing the potential false negatives and minimizing the discrepancy together, our model retains semantic information, hence converges faster and learns both visual similarity and domain-invariance by aligning source and target datasets efficiently, showing the effectiveness of this method. In comparison to the CDA-Base method, the average performance gain tends to be larger as we can see that it has increased by huge margin of 5.1\%. Comparison with the state of art methods: As the proposed framework is new, unfortunately, there are no benchmarks specifically designed for our task so it’s very difficult for a like for like comparison. Using our method, we demonstrate that our model can perform as well to the domain adaptation setting without access to labelled data and imagenet parameters, just by training using the unlabeled data itself, whereas all the unsupervised domain adaptation methods have access to the source labels. We have compared our results with the state-of-the-art models and can conclude our model performs favorably in comparison with other state-of-the art models. From table-\ref{tab:my-table-other-methods}, we can conclude that our model has outperformed in the MNIST-USPS and SVHN-MNIST tasks compared to the other state-of-the-art models like DANN, DAN, ADDA, DDC and Simclr-Base \cite{ganin2016domain, long2015learning, tzeng2017adversarial, liu2016coupled, tzeng2014deep, chen2020simple} \begin{table}[] \centering \caption{Accuracy values on the digits datasets evaluated using the proposed SimClr-Base and proposed CDA framework, along with the introduction of false negative removal. The best average is indicated in \textbf{bold}. M:MNIST, U:USPS, S:SVHN and MM:MNISTM.} \label{tab:FNR-Removal-Table} \begin{tabular}{lcccc} \hline Method & \multicolumn{1}{l}{\begin{tabular}[c]{@{}l@{}}M$\rightarrow$U\end{tabular}} & \multicolumn{1}{l}{\begin{tabular}[c]{@{}l@{}}S$\rightarrow$M\end{tabular}} & \multicolumn{1}{l}{\begin{tabular}[c]{@{}l@{}}M$\rightarrow$MM\end{tabular}} & Avg \\ \hline SimClr-Base \cite{chen2020simple} & 92.0 & 31.7 & 34.9 & 53.1 \\ CDA-Base & 92.5 & 64.8 & 57.9 & 71.7 \\ CDA\_FNR1 & 93.2 & 69.4 & 59.5 & 74.0 \\ CDA\_FNR2 & 94.1 & 71.7 & 60.6 & \textbf{75.5} \\ \hline \end{tabular} \end{table} Inspired by \cite{tian2019contrastive}, we have also performed similar experiments using four views, following are the experimental scenarios we performed on the digit datasets which we compare with the CDA-Base and Contrastive Domain Adaptation with Four Augmentations(CDAx4aug). CDAx4aug: We have tested our method by using four augmentations per anchor per source and followed the methodology as described in section-3.2, by training the model using the equation-\ref{contrastive-loss-da}. The only change is that we now backpropagate four contrastive losses two from source and two from target. From table-\ref{tab:Multiview-FNR-Removal-Table}, we can observe that the additional augmentations have significantly improved the average method accuracy compared to the two view CDA-Base due to the availability of additional positive and negative samples. Overall, by adding two additional views to the CDA-Base method we have gained an average accuracy of 5.1\% compared to the CDA-Base method. \begin{table}[] \centering \caption{Accuracy values on the digits datasets evaluated using CDA framework with the introduction of MMD and compared against base models. The best average is indicated in \textbf{bold}. M:MNIST, U:USPS, S:SVHN and MM:MNISTM.} \label{tab:my-table-MMD} \begin{tabular}{lcccl} \hline Method & \multicolumn{1}{l}{\begin{tabular}[c]{@{}l@{}}M$\rightarrow$U\end{tabular}} & \multicolumn{1}{l}{\begin{tabular}[c]{@{}l@{}}S$\rightarrow$M\end{tabular}} & \multicolumn{1}{l}{\begin{tabular}[c]{@{}l@{}}M$\rightarrow$MM\end{tabular}} & Avg \\ \hline SimClr-Base \cite{chen2020simple} & 92.0 & 31.7 & 34.9 & 53.1 \\ CDA-Base & 92.5 & 64.8 & 57.9 & 71.7 \\ CDA-MMD & 93.4 & 74.8 & 60.6 & 76.2 \\ CDA\_FNR-MMD & 94.2 & 76.2 & 60.2 & \textbf{76.8} \\ \hline \end{tabular} \end{table} \begin{table}[] \centering \caption{Comparision of the proposed CDA method with state-of-the-art methods, using ACCURACY as the performance metric. The best numbers are indicated in \textbf{bold}. M:MNIST, U:USPS, S:SVHN and MM:MNISTM.} \label{tab:my-table-other-methods} \begin{tabular}{lccc} \hline Method & \multicolumn{1}{l}{\begin{tabular}[c]{@{}l@{}}M$\rightarrow$S\end{tabular}} & \multicolumn{1}{l}{\begin{tabular}[c]{@{}l@{}}S$\rightarrow$M\end{tabular}} & \multicolumn{1}{l}{\begin{tabular}[c]{@{}l@{}}M$\rightarrow$MM\end{tabular}} \\ \hline SimClr-Base \cite{chen2020simple} & 92.0 & 31.7 & 34.9 \\ DDC & 79.1 & 68.1 & - \\ ADDA & 89.4 & 76.0 & - \\ DANN & - & 73.8 & 76.6 \\ DAN & 81.1 & 71.1 & \textbf{76.9} \\ CDA\_FNR-MMD\\ (our method) & \textbf{94.2} & \textbf{76.2} & 60.2 \\ \hline \end{tabular} \end{table} \begin{table}[] \centering \caption{Accuracy values on the digits datasets compared with Base models and evaluated using CDA framework with four views along with the introduction of false negative removal. The best average is indicated in \textbf{bold}. M:MNIST, U:USPS, S:SVHN and MM:MNISTM.} \label{tab:Multiview-FNR-Removal-Table} \begin{tabular}{lcccc} \hline Method & \multicolumn{1}{l}{\begin{tabular}[c]{@{}l@{}}M$\rightarrow$U\end{tabular}} & \multicolumn{1}{l}{\begin{tabular}[c]{@{}l@{}}S$\rightarrow$M\end{tabular}} & \multicolumn{1}{l}{\begin{tabular}[c]{@{}l@{}}M$\rightarrow$MM\end{tabular}} & \textbf{Avg} \\ \hline SimClr-Base \cite{chen2020simple} & 92.0 & 31.7 & 34.9 & 53.1 \\ CDA-Base & 92.5 & 64.8 & 57.9 & 71.7 \\ CDAx4aug & 92.9 & 74.1 & 63.5 & 76.8 \\ CDAx4aug\_FNR & 93.6 & 75.0 & 64.0 & \textbf{77.5} \\ \hline \end{tabular} \end{table} \begin{table}[] \centering \caption{Accuracy values on the digits datasets evaluated using CDA framework with four views, along with the introduction of MMD compared with Base models. The best average is indicated in \textbf{bold}. M:MNIST, U:USPS, S:SVHN and MM:MNISTM.} \label{tab:Introducing MMDFNR multiple views} \begin{tabular}{lcccc} \hline Method & \begin{tabular}[c]{@{}c@{}}M$\rightarrow$S\end{tabular} & \begin{tabular}[c]{@{}c@{}}S$\rightarrow$M\end{tabular} & \begin{tabular}[c]{@{}c@{}}M$\rightarrow$MM\end{tabular} & Avg \\ \hline SimClr-Base \cite{chen2020simple} & 92.0 & 31.7 & 34.9 & 53.1 \\ CDA-Base & 92.5 & 64.8 & 57.9 & 71.7 \\ CDAx4aug & 92.9 & 74.1 & 63.5 & \textbf{76.8} \\ CDAx4aug-MMD & 92.7 & 69.3 & 58.6 & 73.5 \\ CDAx4aug\\\_FNR-MMD & 92.5 & 70.6 & 61.5 & 74.9 \\ \hline \end{tabular} \end{table} CDAx4aug\_FNR: We followed the methodology as described in section-3.3, and trained the model using the equation-\ref{FNR-DA}, by training the model on four augmentations per domain as opposed to two. We then evaluated the model trained using this method on the target domain. Looking at table-\ref{tab:Multiview-FNR-Removal-Table}, we can clearly establish that the additional views helped the model learn visual similarity and domain-invariance resulting in minimizing the distance between the domains, it also helped the model with successful identification and elimination of the potential false negatives, thus resulting in converging faster with average accuracy increase of 5.8\% compared to CDA-Base and 0.7\% compared to CDAx4aug-Base. CDAx4aug-MMD: We have used the same setup as that of CDAx4aug, additionally we introduced MMD computed between vector representations extracted from each domain as per the equation-\ref{MMD loss}. We backpropagate XT-Xent loss equation-\ref{contrastive-loss-da} for two pairs of source and two pairs of target along with MMD loss-\ref{MMD loss}. From table-\ref{tab:Introducing MMDFNR multiple views} we can observe that performance gain using MMD was not significant due to the noise from additional augmentations, resulting in slow convergence between the source and target distributions. CDAx4aug\_FNR-MMD: We have used the same setup as that of CDAx4aug\_FNR, additionally we have introduced MMD computed between vector representations extracted from each domain as per the equation-\ref{MMD loss}. We backpropagate FNR loss using equation-\ref{FNR-DA} along with MMD loss using equation-\ref{MMD loss}. From table-\ref{tab:Introducing MMDFNR multiple views}, we can see that the average performance gain has increased compared to CDAx4aug-MMD method due to the false negative removal, but addition of MMD has comparatively slowed the convergence. \section{Conclusion} Over the past few years, ImageNet pre-training has become a standard practice. Employing our proposed contrastive domain adaptation approach and its variants, we demonstrate that our model can perform competitively in a domain adaptation setting, without having access to labelled data or imagenet parameters, just by training using the unlabeled data itself. CDA also introduces identification and removal of the potential false negatives in the DA setting, resulting in improved accuracy. We also extend our framework to learn from more than two views in the DA setting. We tested our model using various experimental scenarios demonstrating that it can be effectively used for downstream domain adaptation task. We hope that our work encourages future researchers to apply contrastive learning to domain adaptation. {\small \bibliographystyle{ieee}
\section{Conclusion} \label{sec:conclusion} We have introduced Pyfectious , an agent-based individual-level simulation software built upon sophisticated statistical models capable of high-granularity simulation of an epidemic disease in a structured population. The modularity and hierarchical structure allow the simulator to quickly adapt to various sizes of the population such as cities, countries, continents, or even worldwide. Thanks to several algorithmic and implementational novelties such as multiresolution timelines, Pyfectious can be used on machines with a wide range of computational resources. The control and monitoring modules are designed to facilitate implementing real-world inspired testing and quarantining at various scales from subsets of the population to every individual. These features altogether make Pyfectious a full-fledged environment to search for the most effective policy that controls the spread of the epidemic with minimum economic side-effects. As the next step, we explore general-purpose reinforcement learning algorithms, especially those that combine an effective representation learning with Monte Carlo Tree Search, such as AlphaZero, to learn the policies that might be impossible for human experts to find due to the immense complexity of the problem. \section{Experiments} \label{sec:experiments} The concepts, novelties and implementation details of Pyfectious were presented in-depth in the previous sections. To showcase the wide range of applications this simulator can be used for, here we present a few examples by conducting illustrative experiments. In \Cref{sec:general_experiment_setup}, the general settings of the experiments are described and the results are discussed in \Cref{sec:evaluation_and_assessment_results}. \subsection{General experimental setup} \label{sec:general_experiment_setup} In order to assess the simulation using a real-world scenario, the simulator requires a sample population structure, defining the primary properties of the population and the attributes of the disease that is planned to spread through the population. This data is provided to the software by two configuration files, one containing the population settings and the other containing the disease attributes. Prior to running the simulation engine, the configuration files need to be prepared. For our experiments, a configuration file for the population generator is designed based on the structure of a small town's population. Likewise, a configuration file is prepared based on the known attributes of COVID-19 as an exemplary infectious disease. Before the simulation starts, the software parses these configuration files and constructs the population based on the retrieved information. This section is dedicated to explaining the properties involved in the configuration files, along with a concise justification of the design procedure. \subsubsection{Population generator} \label{sec:population_generator_setting} Designing a representative population structure is critical for the simulation to generate reasonable results that bear a resemblance to the available real-world statistics of the pandemic. Thus, the configuration file for the population generator must be designed carefully and based on realistic assumptions. We use the information provided by reputable population census and statistics centers. In particular, we use two primary sources of information to adjust the structure of the generated population. First, the United States Census Bureau's tables and data of the US population \cite{us2020census}. Second, the Eurostat \cite{eurostat2020census} data collection that provides information on the demographics of a number of European countries. \begin{table}[] \caption{ Set of family patterns and the probability of their occurrence (M: male, F: female, \{\}: A family gender pattern). Any other arbitrary family pattern can be easily defined in Pyfectious . For brevity, the age and the health condition of the family members are excluded from this table. They are sampled from a truncated normal distribution for every family member.} \centering \begin{tabular}{@{}ccc@{}} \hline Family Size & Genders & Probability \\ \hline 2 & \{M, F\} & 0.21 \\ \hline 3 & \{M, F, M\} , \{M, F, F\} & 0.3 \\ \hline 4 & \{M, F, M, F\} , \{M, M, M, F\} & 0.19 \\ \hline 1 & \{F\} , \{M\} & 0.126 \\ \hline 5 & \{M, F, M, F, F\} & 0.124 \\ \hline 6 & \{M, M, M, F, F, F\} & 0.05 \\ \hline \end{tabular} \label{tab:family_patterns} \end{table} The population generator configuration file comprises the following items. \begin{enumerate} \item \texttt{Population Size}: This attribute determines the total size of the population and is set to 20,000 in our experiments, which is roughly the average population of a small town. \item \texttt{Family Patterns}: A list of family patterns and the probability of their existence in society are required to disperse the population among the families. Furthermore, as discussed in \Cref{sec:population_generative_model}, a family pattern enables the simulation to assign individual attributes, for instance, gender and health condition, to the people. Six family patterns are designed and reported in \Cref{tab:family_patterns} for our intended experiments. \item \texttt{Community Types}: As illustrated in \Cref{sec:population_generative_model}, after distributing the individuals of the population to families based on the provided family patterns, the individuals are also assigned to communities that are the closest match to their personal attributes and the attributes of the family they belong to. The conducted experiments in this section are based on the communities briefly described in \Cref{tab:communities_information}. \item \texttt{Distance Function}: A function that determines if two individuals are in close contact. Here, the \emph{Euclidean distance} is used as a measure of proximity between two individuals. Other measures can be employed depending on the real-world circumstances. \end{enumerate} \begin{table}[!t] \centering \caption{The design of the communities and subcommunities for an exemplary city (society).} \begin{tabular}{@{}ccccc@{}} \toprule \begin{tabular}[c]{@{}c@{}}Community Type\\ Name\end{tabular} & \begin{tabular}[c]{@{}c@{}}Number of\\ Communities\end{tabular} & \begin{tabular}[c]{@{}c@{}}Sub-Community\\ Types\end{tabular} & \begin{tabular}[c]{@{}c@{}}Transmission \\ Potential\end{tabular} & \begin{tabular}[c]{@{}c@{}}Connectivity \\ Matrix\end{tabular} \\ \midrule School & 40 & \begin{tabular}[c]{@{}c@{}}Teacher \\ Student\end{tabular} & Very High & High Density \\ \midrule \begin{tabular}[c]{@{}c@{}}Workspace \\ (Medium)\end{tabular} & 800 & \begin{tabular}[c]{@{}c@{}}Worker\\ Potential Client\end{tabular} & Very High & Medium Density \\ \midrule \begin{tabular}[c]{@{}c@{}}Workspace \\ (Large)\end{tabular} & 50 & \begin{tabular}[c]{@{}c@{}}Worker\\ Potential Client\end{tabular} & Moderate to High & Medium Sparsity \\ \midrule Gym & 50 & \begin{tabular}[c]{@{}c@{}}Trainer\\ Client\end{tabular} & Moderate to High & Medium Density \\ \midrule Public Transportation & 10 & \begin{tabular}[c]{@{}c@{}}Commuter\\ Staff\end{tabular} & Low to Moderate & High Sparsity \\ \midrule Restaurant & 80 & \begin{tabular}[c]{@{}c@{}}Staff\\ Costumer\end{tabular} & Moderate to High & Medium Density \\ \midrule Cinema & 15 & \begin{tabular}[c]{@{}c@{}}Staff\\ Costumer\end{tabular} & Low to Moderate & Medium Sparsity \\ \midrule Mall & 5 & \begin{tabular}[c]{@{}c@{}}Staff\\ Costumer\end{tabular} & Very Low & High Sparsity \\ \bottomrule \end{tabular} \label{tab:communities_information} \end{table} \subsubsection{Disease properties} \label{sec:disease_properties_setting} The disease configuration file contains the fundamental attributes of an infectious disease. Here, we explain these attributes and the reasoning behind the selected value for each of them. \begin{enumerate} \item \texttt{Infection Rate}: Sampled from a uniform distribution whose support is determined based on real-world reports. We adjusted the support of the distribution, i.e. $\textrm{Uniform}[0.1, 0.6]$, in the experiments based on the data available from Wuhan \cite{ChinaData}, where there was less restrictive measures at the beginning. \item \texttt{Immunity}: Based on the previous studies on COVID-19, e.g., \cite{tay2020trinity}, no prior immunity has been detected in most of the studied cases. Therefore, the immunity against infection for the first time must be sampled from a distribution with a support relatively close to zero. However, once a person recovers from the disease, the possibility of reinfection in the short term is infinitesimal. The immunity parameter is sampled from a distribution that is designed based on this assumption: A person has a negligible immunity against the virus in the first infection, and the immunity is exponentially raised upon each infection. \item \texttt{Incubation Period}: We consider a truncated normal distribution (mean = 5.44, 95\%-CI\footnote{Confidence Interval} = (4.98, 5.99), STD = 2.3) for the the duration of the incubation period based on the reported values in the data collected by \cite{shan2020epidemiological} and more notably the study conducted by \cite{li2020early}. \item \texttt{Disease Period}: This parameter is sampled from a truncated normal distribution (mean = 6.25, 95\%-CI = (5.09, 7.51), STD = 3.72) based on the values reported in \cite{backer2020incubation,li2020early}. \item \texttt{Death Probability}: The value of death probability, also known as mortality rate, is available through the hospital's statistics for patients who are diagnosed with COVID-19. Here, the death probability is sampled from a truncated normal distribution (mean = 1.4\%, 95\%-CI = (1.1\%, 1.6\%), STD = 2.4) as reported in \cite{hauser2020estimation, riou2020pattern}. \end{enumerate} \subsection{Evaluation and assessment of the results} \label{sec:evaluation_and_assessment_results} To illustrate the simulator's potential and applications, we have conducted several experiments, ranging from exploring the outcome of changing the disease parameters to imposing restrictions to control the disease's spread. The conducted experiments are based on the configurations described in \Cref{sec:disease_properties_setting,sec:population_generator_setting}. We deployed our experiments on a cluster distributed on a multitude of computational nodes to accelerate using parallel execution. Every particular curve that we obtained through our experiments is produced by 32 simultaneous executions combined in a single graph. We use the moving average, with a window size of 2, to reduce the effect of high-frequency oscillations and improve the visibility of the trend. The variations are typically caused by the chosen sampling rate that is 7 hours in our experiments. Comparing our observations in \Cref{fig:normal_execution_plus_average} with the statistics published by the authorities, for instance, the US COVID-19 statistics \cite{cdc2020graphs}, we conclude that the observed oscillations are not unexpected and do not affect the trend of the simulation graphs. To deliberately evaluate the experiments, they are divided into five categories, each explained in the subsequent sections. \subsubsection{Performance and sanity checks} In this section, we present primary experiments related to the soundness and performance of the simulation software Pyfectious . \paragraph{Performance measures.} The first experiment in this section, shown in \Cref{fig:simulator_performance}, aims at measuring the required time for the model generation and simulation phases. Since the generated models may be saved and reused when running the simulation more than once, its required time can be amortized when simulating the same model multiple times or with different disease attributes. Evidently, the experiment proves a linear relationship between the population size and both the simulation and model generation times. This result is promising and shows the scalability of Pyfectious for simulating larger cities with more complex population structures. \begin{figure}[!t] \begin{subfigure}{0.5\columnwidth} \centering \includegraphics[width=1\columnwidth]{img/plot/Simulator_Performance.pdf} \caption{} \label{fig:simulator_performance} \end{subfigure} \hfill \begin{subfigure}{0.5\columnwidth} \centering \includegraphics[width=1\columnwidth]{img/plot/Normal_Executions_Plus_Average.pdf} \caption{} \label{fig:normal_execution_plus_average} \end{subfigure} \caption{a) The time it takes to generate the population and to simulate the propagation of the disease for 48 hours is plotted for six cities with population sizes from 6k to 30k. The horizontal axis represents the population size, and the vertical axis represents the total process time. The experiment for every size of the population is repeated multiple times (each vertically aligned dot corresponds to an experiment) to achieve confidence, and the straight line indicates the trend. b) The number of active cases versus time is shown for a sample city with a population size of 20k. To emphasize the probabilistic nature of Pyfectious , the same experiment is repeated multiple times, and the effect of this randomness is seen by observing slightly different trajectories. The blue curve is the moving average (window size of 2) of all executions to show the trend.} \label{fig:simulation_performance_normal_executions_average} \end{figure} \paragraph{Sanity checks.} In the experiment whose result is shown in \Cref{fig:normal_execution_plus_average,fig:normal_execution_plus_error_band}, the graphs of the number of active cases versus time are reported for six executions. The oscillations caused by sudden changes in the active cases' statistics are observable, especially near the curve's global maximum, where there is the largest number of active cases. As mentioned before, the moving average of these curves is shown to illustrate the trend better. Notice that a slight difference between the produced trajectories in \Cref{fig:normal_execution_plus_average} is expected due to the probabilistic nature of Pyfectious at multiple levels. Numerous sampled trajectories similar to those shown in \Cref{fig:normal_execution_plus_average} form a halo around the average trajectory as in \Cref{fig:normal_execution_plus_error_band} to obtain confidence in the results. Every experiment in this paper is executed multiple times to obtain such confidence intervals and be robust against randomness artifacts. \paragraph{Discussion on herd immunity.} Although no control measure is applied during the simulation in \Cref{fig:normal_execution_plus_error_band}, the number of active cases declines after reaching a certain level. This incident, called~\emph{herd immunity}~\cite{anderson1985vaccination}, is aligned with the course of infectious diseases in the real world. It shows a reduction in the number of active cases after a certain fraction of the population has been infected by the virus and developed a level of immunity. We implemented an immunity model based on the available real-world information. Inspired by~\cite{duggan2021novel}, our model incorporates a minor chance of reinfection (about 1\%), which significantly drops after the second infection. Aligned with the real-world experiences, a decline occurs in the number of cases after a sufficient portion of the population (about 70-80\% in our simulation) recovers from the disease. \begin{figure}[!t] \begin{subfigure}{0.5\columnwidth} \centering \includegraphics[width=1\columnwidth]{img/plot/Normal_Executions_Plus_Error_Band.pdf} \caption{} \label{fig:normal_execution_plus_error_band} \end{subfigure} \hfill \begin{subfigure}{0.5\columnwidth} \centering \includegraphics[width=1\columnwidth]{img/plot/Immunity_Effect_On_Infected.pdf} \caption{} \label{fig:immunity_effect_on_infected} \end{subfigure} \caption{a) The simulation is executed without any control measure, and the number of infected individuals is plotted versus time for the period of 10 months. The halo around the solid curve is the confidence interval obtained by multiple runs. At each round, the parameters of the population and the disease are re-sampled from the specified distributions. b) The curves of the number of active cases versus time are plotted for different immunity rates. The immunity rate is sampled from three uniform distributions with different mean values. As can be seen, that more significant immunity rates give rise to flatter curves. Note that AI initials in the legend stand for Average Immunity, which is the mean of the uniform distribution from which each curve's immunity rate is sampled.} \label{fig:normal_executions_errorbands_immunity_effect} \end{figure} \subsubsection{Changing the attributes of the disease} To investigate the effect of changing the disease properties, this section covers a comprehensive study on how changing disease attributes affect its spread through a structured population. \paragraph{Immunity variations. }To assess the influence of immunity distribution on the results, we organize three sets of experiments, depicted in \Cref{fig:immunity_effect_on_infected}. Each curve shows the evolution of the number of active cases where the immunity rate is sampled from a uniform distribution with a specified range. In the lowest immunity level, a larger population contracts the disease as the population has the least resistance against the infection. Notably, increasing the immunity level to intermediate and high results in lowering the peak of the active cases' curve. For instance, if a fraction of the population is vaccinated, the immunity rises within that group, and the trajectory of active cases reorients from the blue curve to the red or the green one. This incident is often referred to as "flattening the curve." \begin{figure}[!t] \begin{subfigure}{0.5\columnwidth} \centering \includegraphics[width=1\columnwidth]{img/plot/Infectious_Effect_On_Infected.pdf} \caption{} \label{fig:infectious_effect_on_infected} \end{subfigure} \hfill \begin{subfigure}{0.5\columnwidth} \centering \includegraphics[width=1\columnwidth]{img/plot/Reduce_Initially_Infecteds.pdf} \caption{} \label{fig:reduce_initially_infecteds} \end{subfigure} \caption{a) The number of currently infected individuals is plotted versus time for different values of the infection rates. The infection rates are sampled from uniform distributions with different mean values. It is observed that a larger infection rate increases the slope of the curve that means a faster spread of the disease early after the advent of the outbreak. As a result, it takes less time for the number of active cases to reach its peak. Notice that AIR stands for the Average Infection Rate, which is the mean of the distribution from which the infection rate is sampled. b) The spread of the infection is shown versus time for different numbers of initial spreaders where the smaller set is chosen from communities such as large workspaces and schools that are suitable places for infecting many people. The confidence intervals are expectedly wider for smaller initially infected set because it results in some communities without an initial spreader and consequently a less homogeneous spread of the disease. The observation that the peak of the graph with a smaller initial set is higher than the one with a larger initial set emphasizes the hypothesis that some roles and places need special treatment early in an epidemic even though only a few of their individuals can be initially infected.} \label{fig:infectious_effect_reduce_initially_infected} \end{figure} \paragraph{Modifying the infection rate.} In this experiment, we investigate the effect of infection rate on the disease's spread in the population. To obtain confidence in the results, each experiment is executed 32 times with the infection rate that is sampled from a uniform distribution with a specified range. The curves in~\Cref{fig:infectious_effect_on_infected} indicate the results for five non-overlapping uniform distributions from which the infection rate is sampled. It can be seen that for the exceptionally high rate of infection (i.e., the infection rate is sampled from a uniform distribution whose support occupies larger values), the number of active cases increases with a significant slope before reaching the peak of the curve. As the area under the curve of active cases shows in~\Cref{fig:infectious_effect_on_infected}, the total number of infected people during the epidemic increases with an increase in the infection rate. \begin{figure}[!t] \begin{subfigure}{0.5\columnwidth} \centering \includegraphics[width=1\columnwidth]{img/plot/Disease_Properties_Variations.pdf} \caption{} \label{fig:disease_properties_variations} \end{subfigure} \hfill \begin{subfigure}{0.5\columnwidth} \centering \includegraphics[width=1\columnwidth]{img/plot/Quarantine_Unquarantine_Infected_Effect.pdf} \caption{} \label{fig:quarantine_unquarantine_infecteds} \end{subfigure} \caption{a) The effect of the length of the incubation period (the period in which the infection is not detectable) and the disease period (the period in which the individual is infectious) is shown by changing these parameters of the disease. The curves correspond to a normal incubation and disease period, increased incubation period by 3.5 days, decreased incubation period by 3.5 days, and the decrease disease period by seven days. b) The outcome of two quarantine strategies. Strategy A: Enforce a quarantine 20 days after the outbreak and lift it 20 days later. Strategy B: Enforce a quarantine 40 days after the outbreak, lift it after 20 days and enforce it again after 40 days. The oscillatory curve is expected as the remaining active cases after the initial quarantine will be the initial spreaders for the next wave of the epidemic. } \label{fig:disease_periods_quarantine} \end{figure} \paragraph{Initially infected cases.} The first set of infected individuals in a population plays a crucial role in spreading the disease. Here, we check this effect by studying the course of the epidemic when the number of initially infected people is set to either $6$ or $25$ with the added information that the smaller set is chosen from the large workspaces and schools. Again, we run every experiment multiple times to ensure the results are not by accident. As \Cref{fig:reduce_initially_infecteds} shows, when only six infected people exist at the beginning of the simulation, the error bounds are wider compared to when there are $25$ initially infected people. This effect is expected because, for a more significant number of initially infected people that are randomly assigned to communities, most of the communities will have at least one infectious member. Hence, there will be minor variations across the executions of the simulation compared to the situation when a few individuals are chosen from a different set of communities at each execution. The other notable observation is that even though the blue curve initiates from fewer infected people, it shows a larger set of infected people eventually. The reason is that its initial set is intentionally chosen from communities, such as schools or large workspaces, making it easier to spread the disease throughout a large population in a short time. \paragraph{Incubation and disease period.} As already discussed in \Cref{sec:disease_properties_setting}, incubation and disease period parameters define the temporal behavior of the infectious disease. As \Cref{fig:disease_properties_variations} shows, changing these parameters has a significant effect on the curve of active cases. For instance, increasing the incubation period creates a longer flat curve at the beginning of the outbreak. It can also be seen that an elongated incubation period shifts the curve forward in time with an almost equal peak of the number of active cases. Simultaneously, a shortened length of the disease period decreases the peak and the total cumulative number of active cases. This result is expected because a longer period of disease without a strict control measure to keep the infected individuals away from the others increases the chance of spreading the infection. \begin{figure}[!t] \begin{subfigure}{0.5\columnwidth} \centering \includegraphics[width=1\columnwidth]{img/plot/Quarantine_Infected_Effect.pdf} \caption{ } \label{fig:quarantine_infected_effect} \end{subfigure} \hfill \begin{subfigure}{0.5\columnwidth} \centering \includegraphics[width=1\columnwidth]{img/plot/Quarantine_Partially_Infected_Effect.pdf} \caption{ } \label{fig:quarantine_partially_effect} \end{subfigure} \caption{a) This experiment focuses on enforcing universal quarantines (isolating every infected individual after detection) on a specific day after the outbreak. Here, the quarantines are applied both before and after the day when the curve of the active cases reaches its peak. Strategies A, B, C, and D enforce a quarantine at 40, 60, 100, and 200 days after the outbreak, respectively. b) This experiment studies the effect of partial quarantine where a specified ratio of currently infected individuals are isolated at a specified date (i.e., the control measure is triggered by a time point condition). The partial quarantine represents a real-world scenario where there is uncertainty in detecting the infected individuals that can be caused by numerous reasons such as inaccurate test kits or individuals with mild symptoms that do not visit hospitals or test facilities.} \label{fig:quarantine_infected_quarantine_infected_partially} \end{figure} \subsubsection{Applying control measures} As introduced in \Cref{sec:commands}, Pyfectious offers a straightforward and flexible way to impose control measures during the course of the simulation to emulate real-world epidemic containment policies. The control policies can appear in numerous forms, including quarantining people or communities and reducing the number of people in some sectors of society. Here, we present a couple of experiments to illustrate the effect of control measures that are similar to those applied in the real world. Typically, there is a trade-off between the strength of the control measure and its outcome. The most strict measures, such as forcing everyone to stay at home and in isolation from other family members, stop the spread of the disease but entails enormous economic and societal costs. Pyfectious allows us to investigate this trade-off by changing the strength of the control measures in an almost continuous way to find the optimal restrictive rules with a reasonable cost. In the following, some of the control measures inspired by real-world policies are tested. \paragraph{Full quarantine. } This policy, whose result is shown in \Cref{fig:quarantine_infected_effect} refers to the most strict quarantine method isolating every discovered infected individual. Each curve of~\Cref{fig:quarantine_infected_effect} represents the effect of applying the strict full quarantine with different starting dates. As the quarantined infected people are no longer able to infect others, the complete isolation causes a sharp drop in the number of active cases until the epidemic eventually vanishes. As expected, it is clear that the full quarantine is most effective if it is applied as early as possible after the outbreak of the infection. \paragraph{Enforce and remove a quarantine. } In \Cref{fig:quarantine_unquarantine_infecteds}, the effect of enforcing a quarantine early and removing it after some time is presented. As appears of the results, an early quarantine could be effective if placed and removed at particular time points (as in Strategy A). However, it could also fail to contract the virus if not appropriately planned (as in Strategy B), i.e., the start and termination time are not sufficient to control the spread, and the pandemic strikes back after removing the quarantine. \paragraph{Partial quarantine. } As opposed to the full quarantine measures, in \Cref{fig:quarantine_partially_effect}, we study the effect of quarantine under, a more realistic assumption that the detection of the infected people is not absolute. For instance, a $50\%$ error indicates that the detection and testing mechanisms are cables of detecting only half of the infected population. Once infected people are detected, they are treated with total isolation as in the full quarantine policy. Nevertheless, complete isolation is still effective in controlling the epidemic even when the detection rate is significantly lower, e.g., only $20\%$ of infections are detected. \begin{figure}[!t] \begin{subfigure}{0.5\columnwidth} \centering \includegraphics[width=1\columnwidth]{img/plot/Quarantine_Society_Sectors.pdf} \caption{} \label{fig:quarantine_society_sectors} \end{subfigure} \hfill \begin{subfigure}{0.5\columnwidth} \centering \includegraphics[width=1\columnwidth]{img/plot/Quarantine_Workers_Effect.pdf} \caption{} \label{fig:quarantine_roles} \end{subfigure} \caption{a) This graph shows the effect of control policies that target specific sectors of society. Each curve corresponds to shutting down a different place. Group A includes all the workplaces of any size. Group B consists of gyms, restaurants, and cinemas. Group C includes more public places such as malls and public transportation. b) This graph shows the effectiveness of quarantining specific roles (subcommunities) in society. The curves show the spread of the infection when different ratios of the workers of any kind are quarantined. The effect is expectedly significant because the workers spend so much time in their workplaces every day, and many individuals often visit a workplace during working hours that makes it a suitable place for spreading the infection.} \label{fig:quarantine_society_sector_quarantine_roles} \end{figure} \paragraph{Quarantining specific sectors. } This control measure restricts specific communities or sub-communities, such as gyms, public transportation, and schools. The result of shutting down some communities is shown in~\Cref{fig:quarantine_society_sectors}. We study the effect of closing gyms, restaurants, cinemas, malls, and public transportation. As a result, we observe that the most effective decision is to impose a general lock-down on workspaces. It can be seen that closing the public transportation and shopping malls has a negligible impact on flattening the epidemic curve. This seemingly counterintuitive observation is justified as people will end up in close contact with the infected individuals at their destinations regardless of how they get there. Moreover, due to the size of the considered city, the passengers spend a short period in public transport facilities that decreases the chance of getting infected. \paragraph{Restricting specific roles. }This class of control measures, also known as working from home (WFH) policies, concerns restricting the physical presence of the employees of specified jobs whose physical presence is not absolutely necessary. It was described in~\Cref{sec:population_generation} that, in Pyfectious and inspired by the real-world population structure, each community (e.g., schools) can have multiple roles (e.g., teachers, students, staffs) with their own special daily schedule. This control measure is especially effective and less costly because workspaces are critical hubs in the spread of the disease, and many jobs can be performed remotely thanks to the developed online communications in many areas. The results in~\Cref{fig:quarantine_roles} show a decline in the active cases a couple of days after the restrictions are enforced. It is observed that the ratio of the isolated employee plays an essential role in the outcome. In our experimented setting, a restriction that involves only $30\%$ of the working force seems ineffective compared to a situation where $60\%$ of the employees are working from home. \subsubsection{Closed-loop policies} \label{section:automated_restrictions} The experimented policies in the previous sections did not automatically react to the changes in the epidemic condition in the population. A more innovative policy should be able to adjust its commands when the conditions change. Pyfectious is equipped with special objects that constantly monitor the population and fire a trigger signal when a pre-specified condition is met. As discussed in~\Cref{sec:condition}, the trigger signal of condition objects can be fed to either an observer object to record the statistics or a command object to issue a new restrictive rule or relieve the existing ones based on the current state of the epidemic. This closes the loop between command and observation and renders a closed-loop policy. To illustrate closed-loop policies, a simple controller is designed and is triggered when a condition is satisfied. Here, we define the condition as the moment when a ratio of two statistics from the population surpasses a specified threshold. These experiments also illustrate the substantial flexibility of the simulator to assess unlimited scenarios for epidemic control. \paragraph{Simple cut-off mechanism.} Viewing the entire population as a dynamic system, this policy acts as a~\emph{step} controller~\cite{vidyasagar2002nonlinear} that gets activated when more than $10\%$ of the population are infected (see~\Cref{fig:cutoff_control}). The ratio threshold implies the tolerance of the policymakers and may be imposed by economic and societal factors. \paragraph{Bang-bang controller.} This policy, called \emph{bang-bang} controller, switches between two defined states: enforce and release the quarantine. As depicted in \Cref{fig:bang_bang_controller}, this strategy keeps the ratio of active cases to the population size between 0.1 and 0.15 until the disease is no longer capable of spreading, i.e., herd immunity is reached. This scenario is specifically important since it reduces the burden on the healthcare systems by keeping the active cases below the capacity of the hospitals and, at the same time, controls the financial burden of a long-term comprehensive lockdown. Multiple executions are plotted in~\Cref{fig:bang_bang_controller} whose oscillations between two thresholds depict the actions of the bang-bang controller. It can be seen that based on the initial condition of the simulation and the initially infected individuals, some curves start dropping earlier than others. However, all dropping curves share the same slope from the point when herd immunity occurs and no new individual gets infected. \begin{figure}[!t] \begin{subfigure}{0.5\columnwidth} \centering \includegraphics[width=1\columnwidth]{img/plot/Cut_Off_Control.pdf} \caption{ } \label{fig:cutoff_control} \end{subfigure} \hfill \begin{subfigure}{0.5\columnwidth} \centering \includegraphics[width=1\columnwidth]{img/plot/Bang_Bang_Controller.pdf} \caption{ } \label{fig:bang_bang_controller} \end{subfigure} \caption{a) In this experiment, a command is set to quarantine the infected individuals in the population when $10\%$ of the whole population is infected (a ratio condition triggers the control command). b) In this experiment, infected individuals are quarantined when more than 15\% of the population are infected, and the quarantine is lifted when the ratio of infected individuals drops below 10\%. In the terminology of control theory, this strategy is known as a~\emph{bang-bang} controller.} \label{fig:cutoff_control_bang_bang_controller} \end{figure} \subsubsection{Finding an optimal policy} \label{section:finding_an_optimal_policy} As mentioned earlier in~\Cref{sec:introduction}, in addition to predicting the course of an epidemic under different individual-level control policies, the ultimate goal of Pyfectious is to discover smart and detailed policies that might be hard for humans experts to find. The purpose of this experiment is to showcase this feature and find the most effective policy that minimizes the negative impacts of an epidemic of a specified disease on a specified population. In the real world, the outcome of the employed control measures in previous epidemics combined with the knowledge of the epidemiologists is used to devise control strategies to contain the spread of a novel infection. However, the complexity of the problem grows so quickly that the predicted outcome becomes unreliable even if there is a slight difference between the current and the previously experienced conditions. Pyfectious as a detailed and high-performance simulator gives the possibility to test many proposed control strategies quickly and accurately. To find the best control measure, we offer an automatic method that cleverly searches in the space of fine-grained policies to approach the one that performs best in the specified population. The experiment follows the following steps. \begin{enumerate} \item Constructing the structure of the population of interest: We employ the structure as the previous experiments with the exception that the population size is one-tenth. Since the population structure, i.e., communities and family patterns, is unchanged, the results are still practical. \item Defining a cost function: We pick the maximum height of the curve of the active case as the cost function. Then, the goal will be finding the control measure during the entire course of the epidemic such that the number of active cases never gets so large at any time. This objective function assures that the health system will not saturate. \item Determining the optimization parameters: Every optimization is done concerning a set of parameters. As we search in the space of control measures, the control policy needs to be encoded in a few numerical parameters. In our experiment, the control measure consists of restricting students, workers, and customers. The ratio of the restricted fraction of each community is a controllable variable denoted by $\alpha, \beta$, and $\gamma$, respectively, for instance, in the case where $\alpha = 0.8$, only 20\% of students are permitted to attend the schools physically. Hence, searching for an optimal policy amounts to finding the best values for these parameters. \item Defining the economic constraints: Searching for the optimal control measure is essentially an optimal control problem where the control action always comes with some cost. Moreover, in order to avoid picking a trivial solution, we have to introduce a set of constraints on the restriction ratios. For instance, setting all restriction ratios to 1 is clearly the most effective and yet, the most expensive solution. We introduce some constraints to eliminate the trivial solutions. To do so, the sum of the restricted proportion of the roles is constrained as $\alpha + \beta + \gamma = 1.4.$. Moreover, the ratio of each role that can be isolated is also upper bounded as $0 < \alpha < 0.7$, $0 < \beta < 0.7$, and $0 < \gamma < 1$, implying that some roles cannot be completely remote. In the absence of these constraints, the trivial solution would be isolating the $100\%$ ratio of all three considered roles. \item Selecting an optimization algorithm: After defining the above-mentioned components of the problem, various non-gradient-based methods can be employed to carry out the optimization. It is clear that gradient-based methods cannot be used here because the gradients need to be back-propagated through the entire simulator that is not differentiable. Viewing the population and disease as the environment and control commands as the policies, the discovery of the optimal epidemic control policy can be seen as a reinforcement learning problem. We postpone further elaboration on this application of Pyfectious to future work. Here, a simple probabilistic search method (Bayesian optimization) is employed that can be regarded as a special subset of reinforcement learning algorithms. We use Hyperopt \cite{bergstra2011algorithms} package to find the optimal set of restriction ratios based on the predetermined criteria. Hyperopt exploits the Tree of Parzen Estimator (TPE) algorithm, explained in \cite{bergstra2011algorithms}, to find the set of parameters corresponding to the most significant expected improvement at each iteration. \end{enumerate} \begin{figure}[!t] \begin{subfigure}{0.5\columnwidth} \centering \includegraphics[width=1\columnwidth]{img/plot/Policy_Optimization_Trials.pdf} \caption{ } \label{fig:optimization_trials} \end{subfigure} \hfill \begin{subfigure}{0.5\columnwidth} \centering \includegraphics[width=1\columnwidth]{img/plot/Policy_Optimization_Curves.pdf} \caption{ } \label{fig:optimization_curves} \end{subfigure} \caption{a) The agent aims to minimize the loss function defined as the peak of the active cases. The optimization variables are the ratio of three roles that must be quarantined, and the ratios are constrained to be bounded from above and sum up to a constant value. The upper bound constraints are placed to take into account the cost of shutting down the economy and the trivial solution that is quarantining all individuals. The graph shows the result for 200 trials. The blue dashed line is the lower envelope of the cost produced by the discovered solution at every trial. Each point from A to H corresponds to the minimum cost up until that trial. The discovered policy associated with each of these points can be seen in~\Cref{tab:optimization_summary}. b) The curves that show the number of active cases versus time for each round of the optimization are plotted in this figure. These are actually the curves we need to flatten to protect the healthcare system against overloading. It can be seen that the discovered strategy with the least cost corresponds to the flattest curve. (The population size is reduced by a scale of 10 to boost the computation time.)} \label{fig:optimized_policy_procedure} \end{figure} \begin{table}[!t] \centering \caption{A summary of the discovered control strategies during the rounds of the optimization process. The first column is the index of the discovered quarantine strategy. Each strategy consists of three ratios that show the portion of the size of each group of \{students, workers, customers\} to put under quarantine. The second column indicates the iteration at which the associated strategy is found, and the rightmost column shows the value of the cost function for that strategy. This table only incorporates the iterations at which the agent improves the strategy. It can be seen that, at earlier rounds, the agent picks a large ratio for students, and only in later rounds, it realizes the critical effect of quarantining workers.} \label{tab:optimization_summary} \begin{tabular}{@{}cccccc@{}} \toprule Optimization State & Iteration & Students & Workers & Customers & Max Infected People \\ \hline A & 0 & 0.4 & 0.3 & 0.7 & 283 \\ \hline B & 4 & 0.6 & 0.3 & 0.5 & 179 \\ \hline C & 6 & 0.6 & 0.2 & 0.6 & 137 \\ \hline D & 16 & 0.5 & 0.6 & 0.3 & 135 \\ \hline E & 21 & 0.6 & 0.4 & 0.4 & 108 \\ \hline F & 31 & 0.7 & 0.1 & 0.6 & 102 \\ \hline G & 55 & 0.7 & 0.5 & 0.2 & 75 \\ \hline \rowcolor{LightGreen} H & 73 & 0.6 & 0.6 & 0.2 & 64 \end{tabular} \end{table} \paragraph{Discussion on optimization results.} The course of the optimization process is shown in \Cref{fig:optimized_policy_procedure}. The found optimal restriction rule is to enforce 60\% of students and workers to stay home. The restriction is more severe for the customers of unnecessary activities where only 20\% of their population are allowed to be physically present in their communities. The found policy is aligned with our experience of the real-world scenarios, where schools and workspaces have the highest risk for spreading the infection since people are in close contact for a relatively long period per day. More importantly, based on the constraints mentioned in item 4 of~\Cref{section:finding_an_optimal_policy}, maximally 70\% of students and workers can be restricted while this ratio is unbounded for customers. As seen in~\Cref{tab:optimization_summary}, it turns out that, although workers and students are considered the groups with the highest spreading potential, imposing the maximum possible restriction on these groups is not the most effective policy. Instead, and in light of the economic constraint $\alpha+\beta+\gamma=1.4$, the algorithm learns to restrict 60\% of the population of students and workers and leave the other 20\% of the restriction budget for customers. This solution is relatively counter-intuitive, which emphasizes the benefit of Pyfectious to find control strategies that might be difficult to find by human experts. \section{Introduction} \label{sec:introduction} The approaches to control an epidemic disease such as COVID-19 are divided into two main categories: {\bf 1)} pharmaceutical and {\bf 2)} non-pharmaceutical. While the first category involves medication and vaccination, the second approach, which is the main interest of the current work, concerns interventions on human communities to slow down the spread of the disease~\cite{specktor2020coronavirus}. The objective of non-pharmaceutical methods is to reduce the growth rate of the infection to prevent collapsing the healthcare systems that are widely known as~\emph{flattening the curve}~\cite{specktor2020coronavirus}. When infectious diseases cause an epidemic, strict control measures such as bans on crowded public events, travel restrictions, limiting public transportation, and minimizing physical contacts are commonly adopted by countries to control the number of infections and prevent their healthcare system overburdening~\cite{ferguson2020report}. These methods are collectively known as~\emph{social distancing}. Social distancing policies are often based on expert's common sense and previous experiences in partially similar conditions~\cite{specktor2020coronavirus}. For instance, vaccination~\cite{tseng2012immunization}, travel restrictions~\cite{chinazzi2020effect}, school closure~\cite{viner2020school}, and wearing protective instruments such as masks~\cite{leung2020respiratory} were used during SARS-CoV\footnote{Severe Acute Respiratory Syndrome Corona Virus} in $2003$ whose effect were evaluated through several studies. A detailed study of the effect of various policies after an epidemic breaks out requires a precise population model. Models are developed at different levels of abstraction. Compartment models divide the population into sub-groups and model the spread of the disease as a system of differential equations whose states are the size of each sub-group~\cite{wang2020four}. By defining more fine-grained sub-groups, the model becomes more accurate and realistic, while at the same time, it becomes computationally more demanding. In a more detailed extreme, the model states are the health conditions of every individual in the population. There are two primary benefits in modeling the population at the level of individuals: {\bf 1)} They can be utilized to verify more abstract models; that is, the collective behavior observed in compartment models must be aligned with the aggregation of the states of the fine-grained models. {\bf 2)} They allow investigating the policies influencing every individual uniquely. Therefore, more sophisticated policies can be proposed compared to compartment-level policies that equally affect all members of a particular community. For example, superspreaders are known to have a critical role in driving a pandemic. Investigating the effect of controlling them is crucial to direct the limited control resources more effectively. This study and similar ones of fine-grained control measures are not feasible in compartment models. We have developed Pyfectious , a light-weight python-based individual-level simulator software together with a probabilistic generative model of the structured population of an arbitrary city. This software's components are developed by having the ultimate idea that it is going to be used as a reinforcement learning environment that is fast yet detailed enough to discover non-trivial control policies for real-world pandemics in the future. We hope that the same role that the Chess rules played for AlphaZero to learn a superhuman chess player~\cite{silver2017mastering}, Pyfectious would play for a general-purpose reinforcement learning algorithm to learn the best policy to control epidemic diseases. The software and its accompanying examples are available at \href{https://github.com/amehrjou/Pyfectious}{\color{blue}{https://github.com/amehrjou/Pyfectious}}. Therefore, our work's main contributions compared to existing simulators in different aspects such as population generation, simulation, policy enforcement, and runtime details are discussed below. \begin{itemize} \item \textbf{Population model:} We enumerate below various aspects of generating the society by creating the individuals. These aspects include attributes of each individual, their roles in the society, their daily schedule, the types of interaction with each other, etc. (See~\Cref{results_table_population_model} for comparison). \begin{itemize} \item \textbf{Generality:} This criterion determines the detail level of the population, that is, the granularity of the simulator in modeling the attributes of individuals and their interactions in the real world. For instance, in a school, the simulator's ability in modeling students, teachers, cleaning crew, and other roles is pivotal to be faithful to the real-world dynamics of schools. Here, we exemplified some details that Pyfectious take into account when simulating schools at this granularity level. The population of a school community is divided into roles such as students and teachers based on the individuals' attributes. For example, students of the same class belong to the same age group. The other important factor is the type of interactions among individuals of different groups. For example, the interactions among the students of the same class are more frequent and effective in transmitting the disease than interactions among the students of different classes. Moreover, unlike the simulators that allow individuals to take simple roles, Pyfectious is capable of modeling individuals with complicated and compound roles. For example, an individual may have a job, be a member of some friend gatherings, use public transport, eat regularly at some restaurants, be a member of a gym, and so on. The design of Pyfectious is entirely suitable to model these details. \item \textbf{Extendability: } The roles of the individuals, their corresponding daily schedule, the interactions among them, and their personal attributes are all manually configurable in Pyfectious . The format of providing these parameters as the input to Pyfectious is detailed in~\Cref{manual-simulation}. This level of flexibility allows Pyfectious to be configured for any arbitrary city based on the real-world statistics of that city's population structure. Having maximum flexibility has been one of the initial design goals for Pyfectious to make it suitable for a wide range of applications, including discovering the optimal control measures for any target city. \item \textbf{Probabilisticity: } Another fundamental design principle of Pyfectious is to make the conclusions derived from the simulation's outcomes robust against slight change in the provided settings. Therefore, every parameter of the simulation is assumed to be a realization of a distribution that can be provided as the input configuration. Therefore, the entire structured population of the city is a large hierarchical random variable. Many cities with almost the same population structure can be sampled from this random variable to derive confidence bounds on the simulation's obtained results. \end{itemize} \item \textbf{Simulation:} The configuration parameters of the simulator (See ~\Cref{results_table_simulation}) that are explained below determine the accuracy vs. computation trade-off of the simulation. \begin{itemize} \item \textbf{Event/clock-based simulation: } The simulators of temporal events often belong to one of two categories: event-based or clock-based. In an event-based simulation, queues of planned events are executed by their order of occurrences. In a clock-based simulation, a series of periodic changes to simulator modules occur at specified time intervals. To gain more computational efficiency for the purpose of this work, we combine these two methods into a clock/event-based approach. Briefly speaking, it acts as an event-based simulation equipped with a running background clock. Even though the events in the queue are executed by the specified order, the event of interest (transmission of the disease) occurs only at the clock edges. The detailed description of this mixed proposed simulation method and its advantages come in~\Cref{sec:timer}. \item \textbf{Multiresolution time: } The settable clock/event method that was briefly described above allows Pyfectious to be multiresolution. The resolution is controlled by the running background clock period and is adjustable according to the available computational resources. \item \textbf{Interaction model: } The transmission of the disease is through an underlying graph that determines the structure of the population. This structure allows a detailed simulation of the individuals' mobility and their interactions. The daily schedule of each individual and her exposure time to other individuals can be thoroughly modeled. The further details, such as the transmission of disease by touching a surface that an infected individual already touches, can also be modeled thanks to the flexibility of the underlying connectivity graph. \end{itemize} \item \textbf{Policy enforcement: } To mitigate the spread of the virus and mortality, governments enforce policies to limit the potential ways of disease transmission. A special feature of Pyfectious is the possibility to construct smart policies that can act on each individual differently according to her condition. A mixture of policies with different levels of granularity can be enforced during the simulation; at the same time, the statistics of the disease are fed back to the controller and update the policy concurrently. A diverse set of built-in policies is provided with Pyfectious , and they can be a good starting point for a user to modify and investigate the result of an arbitrary policy. This feature makes Pyfectious a fast and full-fledged environment for a reinforcement learning algorithm to infer optimal policies given a specified cost function such as mortality, active infected cases, etc. To showcase this possibility, an experiment for policy discovery is provided in~\Cref{section:finding_an_optimal_policy}. The features mentioned above are summarized in~\Cref{results_table_policy}. \begin{itemize} \item \textbf{Flexibility: } The design architecture of Pyfectious gives maximum flexibility for the policy design in terms of what features can be altered by a policy. Any dynamic change in the connectivity graph, testing resources, disease, and individual attributes are possible. Hence, in addition to common real-world policies such as contact tracing, social distancing, testing, vaccination, closures, quarantines, full or partial lockdowns, more complicated and individual-specific policies can be easily studied. \item \textbf{Probabilistic control: } Probabilistic control measures are allowed in Pyfectious . For example, a policy may enforce quarantining randomly chosen $50\%$ of school's students each day. \item \textbf{Conditional policy: } Conditional policies are critical for smart and efficient control of an epidemic disease. In the terminology of control theory, this resembles feedback controllers where the action applied to the system depends on the observations from the systems' states. This feature allows modeling real-world policies such as the closure of public places when the number of active cases increases and re-opening them when it decreases. Examples of these feedback policies are discussed in~\Cref{section:automated_restrictions}. \item \textbf{Extendability: } A simple user-friendly language is developed to write policies of interest or extend the wide set of built-in policies. Each policy consists of two components: The condition that triggers the policy and the control measure, which is the action taken by the policy when the triggering condition is satisfied. \item \textbf{Policy discovery: } By defining a cost function, e,g, the peak of the confirmed infected cases, a wide range of policies can be tested in parallel at each round and use their outcome as a learning signal for the RL agent to move in the space of feasible policies towards those with more desirable results. As an example, in~\Cref{section:finding_an_optimal_policy}, the optimal policy is inferred using Bayesian optimization when the peak of the curve of confirmed cases is taken as the cost function. \end{itemize} \item \textbf{Implementation overview: } Thanks to the aforementioned novelties in the implementation at multiple levels from algorithms to software architecture, Pyfectious achieves superior scalability in the size of the simulated population and also simulation's duration compared with other simulators (see~\Cref{results_table_technical}). Comprehensive documentation and code-snippets of the use cases are provided as Jupyter notebooks to facilitate a quick start in running experiments with an arbitrary setting for epidemic researchers or policymakers. \end{itemize} This paper aims to describe the novelties of the proposed light-weight and scalable simulator software called Pyfectious . The software is designed with the ultimate goal to become a fast environment for a reinforcement learning agent to discover detailed and effective individual-level policies to control the spread of the disease in a structured population. An extensive set of experiments shows the application of Pyfectious in simulating the disease's dynamics in the population, testing the effectiveness of expert-designed policies, and automatic discovery of effective policies. \setlength{\tabcolsep}{4pt} \begin{table}[t] \renewcommand{\arraystretch}{1.3} \caption{Comparing the population model in various epidemic simulation softwares.} \label{results_table_population_model} \centering \scriptsize \begin{tabular}{|l | c c c c c | } \hline & \multicolumn{5}{c|}{Population Model} \\ \hline \multirow{2}{*}{Method} & \multirow{2}{*}{Type} & \multirow{2}{*}{Detail Level} & \multirow{2}{*}{Probabilistic} & \multirow{2}{*}{Generative} & Real-world Data\\ & & & & & Awareness \\ \hline \hline SNDS ~\cite{block2020social} & Social Network & Moderate & \cmark & \cmark & \xmark \\ \hline Age-structured SEIR ~\cite{prem2020effect} & Compartment Level & Low & \xmark & \xmark & \cmark\\ \hline EpiFlex ~\cite{hanley2006object} & Individual Level & High & \cmark & \cmark & \cmark\\ \hline EpiSimS ~\cite{mniszewski2008episims, stroud2007spatial} & Individual Level & High & \cmark & \cmark & \cmark\\ \hline EpiModel ~\cite{jenness2018epimodel} & Network Model & Moderate & \cmark & \cmark & \cmark\\ \hline SAMSCE ~\cite{hoertel2020stochastic} & Individual Level & Moderate & \cmark & \cmark & \cmark \\ \hline CHIME ~\cite{weissman2020locally} & Compartment Level & Low & \xmark & \xmark & \cmark \\ \hline TDCO ~\cite{weissman2020locally} & Compartment Level & Low & \xmark & \xmark & \cmark \\ \hline SCEDS ~\cite{carcione2020simulation} & Compartment Level & Low & \xmark & \xmark & \cmark \\ \hline Diamond Princess Analysis ~\cite{fang2020many} & Individual Level & Moderate & \xmark & \xmark & \cmark \\ \hline Epidemiology Workbench ~\cite{nunez2020epidemiology} & Individual Level & Moderate & \cmark & \cmark & \cmark \\ \hline How to Restart? ~\cite{d2020restart} & Individual Level & Moderate & \cmark & \xmark & \cmark \\ \hline SoEcNetwork Heterogenity ~\cite{akbarpour2020socioeconomic} & Individual Level & High & \cmark & \cmark & \cmark \\ \hline QECTTC ~\cite{lorch2020quantifying} & Individual Level & High & \cmark & \cmark & \cmark \\ \hline \hline \textbf{Pyfectious (ours)} & \textbf{Individual Level} & \textbf{High} & \textbf{\cmark} & \textbf{\cmark} & \textbf{\cmark} \\ \hline \end{tabular} \end{table} \begin{table}[!t] \renewcommand{\arraystretch}{1.3} \caption{Comparing the employed methods to simulate the dynamics of epidemic disease in various epidemic simulation softwares.} \label{results_table_simulation} \centering \scriptsize \begin{tabular}{|l | P{3.5cm} P{3.5cm} c c | } \hline & \multicolumn{4}{c|}{Simulation Model} \\ \hline Method & Type & Interactions types for disease Transmission & Detail level & Multi-resolution\\ \hline \hline SNDS ~\cite{block2020social} & Actor stepwise & Interaction in network & Moderate & \xmark\\ \hline Age-structured SEIR ~\cite{prem2020effect} & Continuous-time & Location-based contacts & Low & \xmark\\ \hline EpiFlex ~\cite{hanley2006object} & Event-based model & Location-based contacts & Moderate & \xmark\\ \hline EpiSimS ~\cite{mniszewski2008episims, stroud2007spatial} & Event-based model & Location-based contacts & High & \xmark\\ \hline EpiModel ~\cite{jenness2018epimodel} & Clock-based model & Interaction in network & Moderate & \xmark\\ \hline SAMSCE ~\cite{hoertel2020stochastic} & Clock-based model & Network/Location contacts & Moderate & \xmark\\ \hline CHIME ~\cite{weissman2020locally} & Clock-based model & Contacts & Low & \xmark\\ \hline TDCO ~\cite{weissman2020locally} & Clock-based model & Contacts & Low & \xmark\\ \hline SCEDS ~\cite{carcione2020simulation} & Clock-based model & Contacts & Low & \xmark\\ \hline Diamond Princess Analysis ~\cite{fang2020many} & Event-based model & Location-based contacts & Moderate & \xmark\\ \hline Epidemiology Workbench ~\cite{nunez2020epidemiology} & Clock-based model & Location-based (Lattice) contacts & High & \xmark\\ \hline How to Restart? ~\cite{d2020restart} & Clock-based model & Proximity-based and Exposure-time-based contacts & Moderate & \xmark\\ \hline SoEcNetwork Heterogenity ~\cite{akbarpour2020socioeconomic} & Clock-based model & Contact matrices derived from contact network & High & \xmark\\ \hline QECTTC ~\cite{lorch2020quantifying} & Event-based model & Mobility-based contacts & High & \xmark \\ \hline \hline \textbf{Pyfectious (ours)} & \textbf{Clock/Event-based model} & \textbf{Graph/Location-based contacts} & \textbf{High} & \textbf{\cmark}\\ \hline \end{tabular} \end{table} \begin{table}[!t] \renewcommand{\arraystretch}{1.3} \caption{Comparing simulation softwares in terms of the policy enforcement methods. Entries indicated by "-" for EpiModel~\cite{jenness2018epimodel} show that polices are not implemented yet. } \label{results_table_policy} \centering \scriptsize \begin{tabular}{|l | p{3.5cm} c c c c c| } \hline & \multicolumn{6}{c|}{Policy Enforcement} \\ \hline \multirow{2}{*}{Method} & \multirow{2}{*}{Types} & \multirow{2}{*}{Flexibility} & Probabilistic & Conditional & \multirow{2}{*}{Extendability} & Policy\\ & & & Policies & Policies & & Discovery\\ \hline \hline \multirow{3}{*}{SNDS~\cite{block2020social}} & -seek similarity & \multirow{3}{*}{Moderate} & \multirow{3}{*}{\cmark} & \multirow{3}{*}{\xmark} & \multirow{3}{*}{\xmark} & \multirow{3}{*}{\xmark}\\ & -strengthen community & & & & &\\ & -repeat-contact bubble & & & & &\\ \hline \multirow{2}{*}{Age-structured SEIR ~\cite{prem2020effect}} & -school break and holidays & \multirow{2}{*}{Low} & \multirow{2}{*}{\xmark} & \multirow{2}{*}{\xmark} & \multirow{2}{*}{\xmark} & \multirow{2}{*}{\xmark}\\ & -school closure, stop $90\%$ workforce & & & & &\\ \hline \multirow{1}{*}{EpiFlex ~\cite{hanley2006object}} & -decrease infection prob. & \multirow{1}{*}{Very Low} & \multirow{1}{*}{\xmark} & \multirow{1}{*}{\xmark} & \multirow{1}{*}{\xmark} & \multirow{1}{*}{\xmark}\\ \hline \multirow{6}{*}{EpiSimS ~\cite{mniszewski2008episims, stroud2007spatial}} & -household quarantine & \multirow{6}{*}{Moderate} & \multirow{6}{*}{\xmark} & \multirow{6}{*}{\xmark} & \multirow{6}{*}{\xmark} & \multirow{6}{*}{\xmark}\\ & -therapeutic treatment & & & & &\\ & -school closures & & & & &\\ & -social distancing & & & & &\\ & -vaccination & & & & &\\ & -contact tracing & & & & &\\ \hline \multirow{1}{*}{EpiModel ~\cite{jenness2018epimodel}} & Not Implemented Yet & \multirow{1}{*}{Moderate} & \multirow{1}{*}{-} & \multirow{1}{*}{-} & \multirow{1}{*}{\cmark} & \multirow{1}{*}{-}\\ \hline \multirow{4}{*}{SAMSCE ~\cite{hoertel2020stochastic}} & -lockdown & \multirow{4}{*}{Moderate} & \multirow{4}{*}{\xmark} & \multirow{4}{*}{\xmark} & \multirow{4}{*}{\xmark} & \multirow{4}{*}{\xmark}\\ & -physical distancing & & & & &\\ & -mask-wearing & & & & &\\ & -shielding of the population at risk & & & & &\\ \hline \multirow{1}{*}{CHIME ~\cite{weissman2020locally}} & -social distancing & \multirow{1}{*}{Low} & \multirow{1}{*}{\xmark} & \multirow{1}{*}{\xmark} & \multirow{1}{*}{\xmark} & \multirow{1}{*}{\xmark}\\ \hline \multirow{2}{*}{TDCO ~\cite{weissman2020locally}} & -quarantine individual & \multirow{2}{*}{Very Low} & \multirow{2}{*}{\xmark} & \multirow{2}{*}{\xmark} & \multirow{2}{*}{\xmark} & \multirow{2}{*}{\xmark}\\ & -government control & & & & &\\ \hline \multirow{2}{*}{SCEDS ~\cite{carcione2020simulation}} & -isolation measures & \multirow{2}{*}{Very Low} & \multirow{2}{*}{\xmark} & \multirow{2}{*}{\xmark} & \multirow{2}{*}{\xmark} & \multirow{2}{*}{\xmark}\\ & -social distancing & & & & &\\ \hline \multirow{2}{*}{Diamond Princess Analysis ~\cite{fang2020many}} & -self-protection scenarios & \multirow{2}{*}{Moderate} & \multirow{2}{*}{\xmark} & \multirow{2}{*}{\xmark} & \multirow{2}{*}{\xmark} & \multirow{2}{*}{\xmark}\\ & -control scenarios & & & & &\\ \hline \multirow{4}{*}{Epidemiology Workbench ~\cite{nunez2020epidemiology}} & -self-isolation & \multirow{4}{*}{Moderate} & \multirow{4}{*}{\xmark} & \multirow{4}{*}{\xmark} & \multirow{4}{*}{\xmark} & \multirow{4}{*}{\xmark}\\ & -social distancing & & & & &\\ & -testing & & & & &\\ & -contact tracing & & & & &\\ \hline \multirow{3}{*}{How to Restart? ~\cite{d2020restart}} & -social distancing solutions & \multirow{3}{*}{Moderate} & \multirow{3}{*}{\xmark} & \multirow{3}{*}{\xmark} & \multirow{3}{*}{\xmark} & \multirow{3}{*}{\xmark}\\ & -use of respiratory protective devices & & & & &\\ & -control of COVID-19 infectors & & & & &\\ \hline \multirow{1}{*}{SoEcNetwork Heterogenity ~\cite{akbarpour2020socioeconomic}} & social distance policies (change the structure of network) & \multirow{1}{*}{High} & \multirow{1}{*}{\xmark} & \multirow{1}{*}{\xmark} & \multirow{1}{*}{\xmark} & \multirow{1}{*}{\xmark}\\ \hline \multirow{3}{*}{QECTTC ~\cite{lorch2020quantifying}} & -lockdown & \multirow{3}{*}{Moderate} & \multirow{3}{*}{\xmark} & \multirow{3}{*}{\xmark} & \multirow{3}{*}{\xmark} & \multirow{3}{*}{\xmark}\\ & -contact tracing & & & & &\\ & -localized interventions & & & & &\\ \hline \hline \textbf{Pyfectious (ours)} & \textbf{Almost Every Possible Policy} & \textbf{Very High} & \textbf{\cmark} & \textbf{\cmark} & \textbf{\cmark} & \textbf{\cmark} \\ \hline \end{tabular} \end{table} \begin{table}[!t] \renewcommand{\arraystretch}{1.3} \caption{A comparison of the simulators considering different technical aspects.} \label{results_table_technical} \centering \scriptsize \begin{tabular}{|l | c c c| } \hline & \multicolumn{3}{c|}{Technical Details} \\ \hline Method & Sizewise Scalable & Timewise Scalable & Language\\ \hline \hline SNDS ~\cite{block2020social} & \xmark (500-4000) & \xmark & R\\ \hline Age-structured SEIR ~\cite{prem2020effect} & \cmark & \cmark & R\\ \hline EpiFlex ~\cite{hanley2006object} & \cmark & \cmark & Windows Software written in C++\\ \hline EpiSimS ~\cite{mniszewski2008episims, stroud2007spatial} & \cmark & \cmark & C++\\ \hline EpiModel ~\cite{jenness2018epimodel} & - & - & R\\ \hline SAMSCE ~\cite{hoertel2020stochastic} & \cmark & \cmark & C++\\ \hline CHIME ~\cite{weissman2020locally} & \cmark & \xmark & ?\\ \hline TDCO ~\cite{weissman2020locally} & \cmark & \cmark & Python \\ \hline SCEDS ~\cite{carcione2020simulation} & \cmark & \cmark & Fortran \\ \hline Diamond Princess Analysis ~\cite{fang2020many} & \xmark & \xmark & ?\\ \hline Epidemiology Workbench ~\cite{nunez2020epidemiology} & \cmark & \cmark & Python \\ \hline How to Restart? ~\cite{d2020restart} & \xmark & \xmark & R \\ \hline SoEcNetwork Heterogenity ~\cite{akbarpour2020socioeconomic} & \cmark & \cmark & R \\ \hline QECTTC ~\cite{lorch2020quantifying} & \cmark & \cmark & Python \\ \hline \hline \textbf{Pyfectious (ours)} & \textbf{\cmark} & \textbf{\cmark} & \textbf{Python} \\ \hline \end{tabular} \end{table} We have separated two processes in the developed software package. The first process, called~\emph{Population Model}, concerns the constant part of the simulation process. It creates individuals with specified features and divides them into subsets to model the population structure of the city of interest. The other process, called~\emph{Propagation Model}, takes the properties of the disease and the dynamic interactions among the generated individuals to evolve the states of the population model in time. \section{Population and the propagation models} \label{sec:population_generative_model} Many existing simulators have been developed for a particular population that is determined by their hyper-parameters. Even though it might be possible to change the hyper-parameters of a simulated city manually, it may not be straightforward to transfer the simulator to populations from which we only have partial knowledge or uncertain about some of their features. We develop a probabilistic model for every feature of the population, rendering it a fully probabilistic generative model. To explain the logic behind the developed generative model for the population, we first introduce some terms and their role in the software. The full description of each term is discussed in \Cref{sec:population_generation}. \begin{enumerate} \item \texttt{Population Generator}: This object is instantiated from a class called \texttt{Population Generator} and will be a primary container that stores the information required to generate a population, e.g., people, families, and communities. The~\texttt{Population Generator} is a wrapper around the items inscribed below. \item \texttt{Person}: The most fundamental object acting as the building block of the population by representing an individual is an object instantiated from the class called \texttt{Person}. The object also contains the attributes related to an individual, e.g., age, gender, and health condition. \item \texttt{Family}: Every family is an instance of the class called \texttt{Family} and is a group of multiple individuals (modeled by \texttt{Person} objects) that live together in the same house. Each family's general composition is described by a family pattern that is itself an instance of the class \texttt{Family Pattern}. A family pattern object comprises necessary attributes to generate a \texttt{Family}, such as the number of family members and their gender, age, and health condition. Similar to any other attribute in Pyfectious , these attributes are also provided as probability distributions rather than single values. Therefore, every family pattern can be sampled multiple times to generate a set of families with an almost similar pattern but distinct values for their members' attributes. \item \texttt{Community}: An instance of the \texttt{Community} class that describes a social unit consisting of individuals with a commonality, particularly in time and location. It is defined by a community type object and inductively by its smaller social units called subcommunities. A community type object is an instance of a class called \texttt{Community Type} that describes the attributes and subcommunities and the community's connectivity graph. A subcommunity is an instance from the \texttt{SubCommunity} class and comprises people with the same role in the community (for example, the subcommunity of teachers in a school community). A connectivity graph is an instance from the class named \texttt{Connectivity Graph} that represents the possible interactions among the individuals in the community. \end{enumerate} Once the population is generated, the individuals' dynamic interactions and the features of the disease yield a model of the propagation of infection in the population. The essential factors in the propagation model are listed below and will be explained in more detail in the subsequent sections. \begin{enumerate} \item \texttt{Disease Properties}: Maintains the information related to the key characteristics of the disease that affects its propagation in a structured population. These properties include infection rate, immunity rate, mortality rate, incubation period, and disease period. These quantities are typically sampled from predetermined probability distributions leading to a stochastic representation of the disease. \item \texttt{Simulator}: The simulator employs the propagation features of the disease and the population model to evolve the simulation in time. Moreover, similar to every control task, the containment of an infectious disease demands both measurement and control. To emulate real-world processes, we develop two classes named~\texttt{Command} and~\texttt{Observer}. The former class instances are objects that mimic a single control decision (for example, shutting down schools if the number of infected students surpasses a threshold). The latter class instances mimic the measurement and monitoring processes such as testing to find dormant infected cases. Both command and observer objects need a starting time. As a general solution, we built a class named \texttt{Condition}. Each instance of this class gets activated when a defined condition in the population is met. The binary output of this object can be fed into any control or monitoring option that is supposed to be triggered when this condition is satisfied. \item \texttt{Time}: The chronological flow of the simulation is mainly based on a queue of events, and the propagation of the disease occurs at the edges of a background timer whose frequency trades off accuracy versus computational demand. \begin{enumerate} \item \texttt{Event}: The time evolution of the system is implemented in an event-driven paradigm. A sequence of events determines the daily interactions among individuals. The connectivity of the population is updated when an event occurs. Three types of events are defined in Pyfectious : \begin{enumerate} \item \texttt{Plan-Day Event} occurs at the beginning of each day and sets the schedule of that day for every individual belonging to the population. \item \texttt{Transition Event} occurs at times indicated by a plan-day event, and it changes the location of an individual. \item \texttt{Virus Spread Event} occurs when the virus propagates to an individual. \item \texttt{Infection Event} occurs when the infection of an individual ends. \item \texttt{Incubation Event} occurs when the incubation period is over and indicates a transition from the incubation period to the illness period during which the patient becomes infectious. \end{enumerate} \item \texttt{Infection}: This is an object associated with every infected individual and keeps track of the disease-related information. The infection object must not be confused with the infection event. The former is a container that is created for every individual when she gets infected and contains all infection-related information during the course of the disease, including the outcome that can be a recovery or death. On the other hand, an \emph{infection event} is an event object that occurs when an individual's infection ends, and she can no longer infect other individuals. \end{enumerate} \end{enumerate} In the subsequent sections, the details of the novelties in the architecture of Pyfectious are presented. The detailed description of the probabilistic algorithm that generates the population and the event-based algorithm that evolves the simulation are discussed. To follow the details, knowing the definitions mentioned above of the objects are assumed. \section{Software architecture of Pyfectious } \label{sec:simulator} In this section, the architecture and technical details of the simulator software Pyfectious are presented. We divide the software system into three separate components that can be considered independently: {\bf 1)} population generation, {\bf 2)} disease propagation, and {\bf 3)} time management. The first process generates the structure of a city containing a certain number of individuals that form different communities such as households, schools, shops, etc. The second process determines the properties of the disease and the way it propagates through the population. The third process ties the previous two processes together to produce the evolution of a specified disease in a population with a specified structure. The overall pipeline of the software is illustrated in~\Cref{fig:overall_pipeline_schematic}. Each process is explained in detail in the following subsections. \begin{figure}[!t] \includegraphics[width=0.99\columnwidth]{img/WholeProcess3.pdf} \caption{The pipeline of Pyfectious . The population generator creates the individuals and assigns them their roles to form the connectivity graph. The connectivity graph, the disease properties, the clock, and the simulation settings are then fed to the simulator to create the time evolution of the disease. Furthermore, the observers and the policies are provided to the simulator in order to log data and make specific alternations to the simulation to emulate real-world epidemic control measures.} \label{fig:overall_pipeline_schematic} \end{figure} \subsection{Population generation} \label{sec:population_generation} Generating the population consists of creating a structured set of individuals together with a connectivity graph that models the interactions among them. The connectivity graph essentially shows the possible paths where the virus can transmit among individuals. Whether the graph is directed or undirected depends on the properties of the virus for which the simulation is performed. For the type of viruses that are still infectious after being on a surface for a while, the connectivity graph must be directed. The infected person who touches the surface at time $t_0$ can infect the person who touches the surface at a time $t>t_0$, but the other direction of virus transmission is clearly blocked due to the time direction. The more common way of virus transmission, especially for respiratory diseases, is via close interactions while being at the same location. In this case, the connecting edges are symmetric (bi-directional). These two ways of virus transmission are illustrated in~\Cref{fig:real_world}. Regardless of the edge direction, the connectivity of the population graph determines the structure of the city. The creation of such structure is presented in~\Cref{sec:pg:pc,sec:family_pattern,sec:population_generation_procedure,sec:community,sec:community_assignment}. The connectivity details, such as the direction and the strength of edges is then presented in~\Cref{sec:connectivity_graph}. \subsubsection{Person attributes} \label{sec:pg:pc} A human individual is realized as an instance of a class named~\texttt{Person}. A person object represents the most fundamental unit of the simulation and has the succeeding attributes: age, gender, and health condition; These attributes are used to determine the role of the individual in the family and the society, her hobbies, and her daily plan. Here, we list the description for these attributes of an individual. Notice that the fundamental logic behind Pyfectious is to create a significant hierarchical probability distribution for the city so that the whole city can be seen as a random variable. Hence every property is indeed a realization of a probability distribution. \begin{itemize} \item age ($a \sim A, a \geq 0.$): A real positive number realized from a probability distribution $A$. \item gender ($g \sim G$): A binary value realized from a binomial distribution $G$. \item health condition ($ h \sim H, h \in [0, 1]$): A real number realized from a specified distribution $H$ supported on $[0, 1]$ that represents the health condition of the person as an aggregated function of medical variables such as body mass index (BMI), diabetes, background heart disease, blood pressure, and etc. Greater $h$ signals a better aggregated health condition. \end{itemize} \subsubsection{Family pattern} \label{sec:family_pattern} A class named \texttt{Family Pattern} represents the pattern of the families who live in the society. The pattern of a family consists of three types of information. Firstly, the structural information, i.e., the existence of each of the parents and the number of children. Secondly, the distributions from which the attributes (see \Cref{sec:pg:pc}) of the family members are sampled. Lastly, the distribution from which the living location of the household within the city is sampled. Let $(S, L, \{\varphi_1, \varphi_2, \dots, \varphi_n\})$ represent a family pattern where $S$ is the structural information, $L$ is the distribution of the family location, and $\{\varphi_1, \varphi_2, \dots, \varphi_n\}$ is the set distributions over the attributes of $n$ members of the family. Each $\varphi_i$ is itself a set of distributions of each attribute of a family member, i.e., $\varphi_i = [A_i, G_i, H_i]$. Let $p_i$ refers to the $i$-th member of the family. Its attributes are then are sampled from $\phi_i$ independent of the other members. \begin{equation} (p_i \sim \varphi_i) \equiv (p_i := [a_i\sim A_i, g_i \sim G_i, h_i\sim H_i]). \end{equation} \begin{figure}[!t] \begin{subfigure}{0.49\columnwidth} \centering \begin{tikzpicture}[ bidirected/.style={Latex-Latex}, inner/.style={inner sep=0.2pt}, outer/.style={inner sep=4pt} ] \node[{shape=circle, text=black, minimum size=0.1em}] (v) at (0,-1) {(1)}; \node (img) {\includegraphics[width=\columnwidth]{img/talk3.pdf}}; \end{tikzpicture} \end{subfigure} \hfill \begin{subfigure}{0.49\columnwidth} \centering \begin{tikzpicture}[ bidirected/.style={Latex-Latex}, inner/.style={inner sep=0.2pt}, outer/.style={inner sep=4pt} ] \node[{shape=circle, text=black, minimum size=0.1em}] (v) at (0,-1) {(2)}; \node (img) {\includegraphics[width=\columnwidth]{img/buy3.pdf}}; \end{tikzpicture} \end{subfigure} \caption{1) Two people talking to each other (bi-directional connectivity). Each person can infect the other one 2) A person touching an item that was touched before by another person is modeled as single directional connectivity. Only the first person can infect the second person.} \label{fig:real_world} \end{figure} \subsubsection{Generating the population} \label{sec:population_generation_procedure} To generate the population of the city, two pieces of information are requested from the user: {\bf 1)} total size of the population {\bf 2)} a set of family patterns with the probability of their occurrence. Recall that every level of the city hierarchy is probabilistic in Pyfectious . Therefore, each family pattern can also be regarded as a random variable from which the family instances are realized. The instantiation process continues until the total number of people in the society exceeds the population size provided by the user. Let $\Pcal=\{\Phi_1, \Phi_2, \dots, \Phi_k\}$ and $\{\pi_1, \pi_2, \ldots, \pi_k\}$ be the set of family patterns and their probabilities respectively. Each family in the society is a realization from one of these patterns. To instantiate a family, first, a family pattern is chosen with its corresponding probability, then a family instance is realized from the chosen pattern. Hence, an instantiated family pattern $\phi$ in the society follows a mixture of distributions of each family pattern in $\Pcal$, that is $\phi\sim \sum_{i=1}^k\pi_i \Phi_i$ where $\{\pi_i\}_{i=1}^{k}$ is a simplex and $\sum_{i=1}^k \pi_i=1$. This indicates that each family pattern $\phi$ follows $\Phi_1$ with probability $\pi_1$, $\Phi_2$ with probability $\pi_2$, ..., and $\Phi_k$ with probability $\pi_k$. Until the sum of the people in the families exceed the provided population of the city, new families are kept adding to the city. Each time one of the $\{\Phi_1, \Phi_2, \dots, \Phi_k\}$ patterns with their corresponding probabilities $\{\pi_1, \pi_2, \dots, \pi_k\}$ is chosen and its members are generated from the corresponding pattern. Unlike~\cite{lorch2020quantifying}, this strategy prioritizes creating families over individuals. The advantages of this approach compared to those that create individuals first and then assign them to families are discussed below. \paragraph{Family first vs person first.} The structured population of existing real-world society is the end product of passing many generations over the years. Hence, the most accurate approach to model the current state of the society is to emulate the entire time evolution from the very beginning of the formation of the city until the current time. The emulation is possible only if the emulator is given an accurate account of all major events that has occurred over hundreds or thousands of years with a significant impact on the population structure. This information is obviously unavailable at the present time. Hence, to emulate the current structured population of a society, a membership problem needs to be solved at multiple levels. Let's focus on the structure of the population at the level of families and ignore other structures such as workplaces, schools, and etc. Recall that the only information we get from the user is the population size and the family patterns. One approach would be generating as many individuals as the requested population size with attributes defined by the set of family patterns. Once this pool of individuals is created, an immensely heavy importance sampling process needs to be solved to bind individuals that are likely to form a family under the mixture distribution of family patterns. To tackle the computational intractability, we propose an alternative method that puts families first and create individuals that already match a family. This method releases us from the computationally heavy importance sampling process at the cost of having less strict control on the population size. However, the resultant population does not exceed the provided population by the user more than the size of the largest family defined in the family patterns. Clearly, one family more or less in an entire society does not alter the results of the simulations for the problem for which this software is developed. \begin{algorithm}[!t] \SetAlgoLined \KwData{Population size $M$, Family patterns $\{\varphi_1, \varphi_2, \ldots, \varphi_n\}$.} \KwResult{A structured society consisting of almost $M$ individuals instantiated from the~\texttt{Person} class and distributed to families.} \Begin{ Society = [$\;$] \While{ $i < M$}{ $j\leftarrow$ generate a sample from $\textrm{Multinomial}(\pi_1, \pi_2, \ldots, \pi_k)$ $\phi\leftarrow$ generate the set of family members from the pattern $\varphi_j$ Society.append($\phi$) $i\leftarrow i+|\phi|$ } } \KwRet{Society} \caption{Generating the population} \end{algorithm} \subsubsection{Community} \label{sec:community} The class \texttt{Community} consists of a set of \texttt{Person} objects with a shared interest that makes them interact closely. The class \texttt{Family} is the simplest class inherited from \texttt{Community}. The concept of community in this software covers a wide range of real-world communities. It can be as small as two or three friends talking to each other, or it can refer to larger entities such as everyone who walks in the streets of a city. Each \texttt{Community} object consists of multiple \texttt{SubCommunity} objects each of which contains a subset of the members of the enclosing \texttt{Community} that belong to that subcommunity. As an example, every school is an instance of the \texttt{Community} class. The concept of the school contains two main roles, students and teachers, each of which is a \texttt{SubCommunity} object of the school community. An overview of this hierarchical structure is depicted in~\Cref{fig:community_overview} and its benefits are explained below. \paragraph{The advantages of a hierarchical structure. } The members of a community are assigned to subcommunities based on their shared role. In the following, we provide a list of reasons that explains the logic behind such division: \begin{enumerate} \item The members of every subcommunity in a given community have special attributes. Hence, the persons of a society who are instantiated from a class~\texttt{Person} need to pass through different filters to be assigned to each subcommunity. \item Each subcommunity has a special pattern of internal interactions. As a result, separating them allows us to capture their influence on the spread of the infection more realistically. For example, in a school, teachers have different kinds of internal interactions compared to internal interactions among students. \item Each subcommunity may have its own daily time schedule even though all belong to the same community. For instance, in a restaurant that is an instance of a community, the time that a cashier spends in the restaurant is different (much longer) than the time that a customer spends there. Hence, the risk of getting infected in the restaurant is much higher for the cashier compared to the customer. \end{enumerate} \begin{figure}[!t] \begin{subfigure}{0.33\columnwidth} \centering \begin{tikzpicture} \node (img) {\includegraphics[width=\columnwidth]{img/community_overview1.png}}; \node[{shape=circle, text=black, minimum size=0.1em}] (v) at (0,-2.7) {a}; \end{tikzpicture} \end{subfigure} \begin{subfigure}{0.33\columnwidth} \centering \begin{tikzpicture} \node (img) {\includegraphics[width=\columnwidth]{img/community_overview2.png}}; \node[{shape=circle, text=black, minimum size=0.1em}] (v) at (0,-2.7) {b}; \end{tikzpicture} \end{subfigure} \hfill \begin{subfigure}{0.33\columnwidth} \centering \begin{tikzpicture} \node (img) {\includegraphics[width=\columnwidth]{img/community_overview3.png}}; \node[{shape=circle, text=black, minimum size=0.1em}] (v) at (0,-2.72) {c}; \end{tikzpicture} \end{subfigure} \caption{(a) In the first phase, all individuals of the society are created based on the population size and the set of provided family patterns as explained in~\Cref{sec:population_generation}. (b) The abstract hierarchical structure of the communities and subcommunities of the society is created. Observe that communities may be intersecting as an individual may be a member of various communities such as family, school, restaurant, etc. Within a community, there are two types of interactions shown as red arrows. One type of interactions is inter-subcommunity, such as the interactions among teachers and students in a school. (c) Another type of interactions, shown with red arrows, is within a subcommunity. For example, the way students interact with each other in a school.} \label{fig:community_overview} \end{figure} \subsubsection{Community assignment} \label{sec:community_assignment} Once the needed \texttt{Community} and \texttt{SubCommunity} classes for a target society are constructed, the individuals who are instantiated from the~\texttt{Person} class in~\Cref{sec:population_generation} take their role by being assigned to the instances of \texttt{SubCommunities}. The challenge is that the assignment process is not trivial in the sense that we can not fill the subcommunities from top to bottom by an ordered list of individuals. Each subcommunity accepts people whose attributes belong to a certain range. For example, the subcommunity of students in a particular school accepts individuals whose \texttt{age} attribute is less than those that are acceptable to the subcommunity of teachers. Each subcommunity has its own set of special admissible attributes. A trivial assignment process would be an exhaustive search over the entire population to find the individuals whose attributes match those of the target subcommunity. In addition to the time intractability of this approach, the individuals may race for positions in some subcommunities while other subcommunities do not receive sufficient individuals. Hence, we developed a~\emph{stochastic filtering} approach inspired by importance sampling where the importance score is determined by how fit an individual's attributes are for a specific subcommunity. Therefore, it is helpful to view each subcommunity as a probabilistic filter that passes its matched attributes with higher probability. Individuals are assigned to their roles in the society by passing through a number of these stochastic filters. To decide whether an individual can be accepted to a subcommunity, the unnormalized density of the joint attributes is computed as a fitness score. Consider the subcommunity $S$ and the individual $p$. Assume $S$ has the $L$ admissible types of attributes and their corresponding probability densities $\{f_1, f_2, \ldots, f_L\}$. Suppose the individual $p$ has the set of attributes $\{\alpha_1, \alpha_2, \ldots, \alpha_L\}$ matching with the types of attributes that are admissible to $S$. Thus, the fitness score of $p$ for the subcommunity $S$ is calculated by $\prod_{l=1}^L f_l(\alpha_l)$. Notice that this score is not a probability, and computing its normalizing constant is intractable. However, this is not a problem because only the relative values matter. The scores are computed for all individuals in the society, and those with the highest scores are assigned to each subcommunity. Among all attributes, the profession of an individual requires special treatment, as discussed below. \paragraph{Special case of profession assignment. } Among the attributes of an individual, the profession needs special treatment. Every member of the society can be given only one profession. Hence, once the profession is assigned to an individual, she cannot be given another profession. Hence, the subcommunities that model professions (e.g., teachers, students, cashiers, bus drivers, etc.) must become blocking against her. This effect is modeled by multiplying the fitness score by $(1- 1_\text{has profession}\infty)$. \subsubsection{Connectivity graph} \label{sec:connectivity_graph} The backbone of Pyfectious is a connectivity graph that captures the interactions among the individuals of the society. Let $G(V, E)$ be the connectivity graph with the set of nodes $V$ and the set of edges $E$. In the following, we explain how this graph is created. \begin{enumerate} \item Every individual is represented by a node of the graph (See~\Cref{fig:community_overview2}(a)). \item Due to the tight connections among the family members, a family is modeled by a complete and directed graph (See~\Cref{fig:community_overview2}(b)). \item A community defines the pattern of connections within and between its subcommunities. Assume the community $C$ has the set of $J$ subcommunities $\{S_1, S_2, \ldots, S_J\}$ and a $J\times J$ connectivity matrix $(c_{ij})$ with $1\leq i \leq j \leq J$. The entry $c_{ij}$, called~\emph{connectivity density}, represents the probability of the existence of an edge from an individual in the subcommunity $i$ to an individual in the subcommunity $j$. Formally speaking, Let $X_{a\rightarrow b}$ be an indicator random variable denoting whether there is a directed edge from node $a$ to node $b$. Then $X_{a\rightarrow b}$ follows a Bernoulli distribution with parameter $c_{ij}$ if $a \in S_i$ and $b \in S_j$. The connectivity density $c_{ij}$ itself comes from a Beta distribution. That is, \begin{equation} X_{a\rightarrow b}\sim \textrm{Bernoulli}(c_{ij}), \quad \text{for } a\in S_i, b\in S_j,\textrm{ and } 1\leq i\leq j \leq J \label{eq:edges_across_subcommunties} \end{equation} where $c_{ij}\sim \textrm{Beta}(\alpha_{ij}, \beta_{ij})$ with $\alpha_{ij}$ the shape and $\beta_{ij}$ the scale parameter. See~\Cref{fig:community_overview2}(c) for an overview of the created edges. The Erdős–Rényi model of generating random graphs~\cite{erdHos1960evolution} is used. Notice, that the above edge creation process does not differentiate between edges within a subcommunity and among subcommunities. However, the connections are expected to be denser within a subcommunity, that is, $c_{ij}\ll c_{ii}$ for $i\neq j$. Because $c_{ij}$ itself is a sample from Beta($\alpha_{ij}$, $\beta_{ij}$), the parameters, $\alpha_{ij}$ and $\beta_{ij}$, of the corresponding beta distribution are chosen such that the probability mass is concentrated around $1$ for $i=j$ and around smaller values for $i\neq j$. The detailed pseudocode is given in~\Cref{alg:graph}. \begin{figure}[!t] \begin{subfigure}{0.33\columnwidth} \label{fig:community_overview_a} \centering \begin{tikzpicture} \node (img) {\includegraphics[width=\columnwidth]{img/graph_generation1.png}}; \node[{shape=circle, text=black, minimum size=0.1em}] (v) at (0,-2.7) {a}; \end{tikzpicture} \end{subfigure} \begin{subfigure}{0.33\columnwidth} \label{fig:community_overview_b} \centering \begin{tikzpicture} \node (img) {\includegraphics[width=\columnwidth]{img/graph_generation2.png}}; \node[{shape=circle, text=black, minimum size=0.1em}] (v) at (0,-2.7) {b}; \end{tikzpicture} \end{subfigure} \hfill \begin{subfigure}{0.33\columnwidth} \label{fig:community_overview_c} \centering \begin{tikzpicture} \node (img) {\includegraphics[width=1.04\columnwidth]{img/graph_generation3.2.png}}; \node[{shape=circle, text=black, minimum size=0.1em}] (v) at (0,-2.72) {c}; \end{tikzpicture} \end{subfigure} \caption{a) A node is added to the graph for every individual to generate the population. b) Due to the tight interactions within a family, a family's subgraph is a complete directed graph (red edges). c) The interactions across communities and subcommunities are represented by the blue edges, which are created according to~\Cref{eq:edges_across_subcommunties}.} \label{fig:community_overview2} \end{figure} \end{enumerate} \begin{algorithm}[!t] \SetAlgoLined \KwData{People $\{p_i\}$, families $\{f_i\}$, communities $\{C_i\}$ and their subcommunities $\{S_k^i\}$.} \KwResult{The connectivity graph $G(V, E)$ with the set of nodes $V$ and the set of edges $E$.} \Begin{ $V \longleftarrow [\;]$ $E \longleftarrow [\;]$ \lForEach{person $p_i$}{add a vertex $v_i$ to $V$} \tcp{creating within-family interactions} \For{family $f_i$} { \For{bidirected edge $e$ in the complete subgraph $K_{\text{size}(f_i)}$}{ add $e$ to $E$\; } } \For{community $C_i$}{ \For{sub-communities $S_j^i$ and. $S_k^i$ in $C_i$}{ $c_{jk} \longleftarrow \text{generate a random variable from } \Gamma_{jk} \text{ distribution}$\; $p \longleftarrow c_{jk}$\; \For{sub-communities $S_j^i$ and $S_k^i$ in $C_i$}{ \For{person $a$ in $S_j^i$}{ \For{person $b$ in $S_k^i$}{ $X_{a\rightarrow b} \longleftarrow \text{flip a biased coin with head probability } p$\; \If{$X_{a\rightarrow b} = 1$}{ \tcp{creating inter-subcommunity interactions} add directed edge $a\rightarrow b$ to $E$\; } } } } } } } \KwRet{$G(V, E)$} \caption{Creating the connectivity graph} \label{alg:graph} \end{algorithm} \subsection{Propagation of the infection} \label{sec:disease_propagation} After the population is created in \Cref{sec:population_generation_procedure} and its structure is determined in \Cref{sec:connectivity_graph} to model the potential interactions among every pair of individuals of the society, this section describes how Pyfectious models the propagation of a generic disease in the population. \subsubsection{Disease transmission between two individuals} \label{sec:disease_transmission} The probability of the disease transmission from an individual to another depends on both the parameters of the disease and the attributes of the individuals. The following three parameters are critical in modeling the disease propagation. \begin{itemize} \item Immunity ($\upsilon$): A real-valued parameter $v\in[0, 1]$ that shows how immune an individual is against being infected. For example, being infected once or being vaccinated increases this number towards the upper limit. Similar to other parameters of the model, immunity is also a random variable with an arbitrary distribution. A natural choice would be a beta distribution, i.e., $\upsilon \sim \textrm{Beta}(\alpha_\upsilon, \beta_\upsilon)$ whose parameters $\alpha_\upsilon, \beta_\upsilon$ needs to be determined according the the characteristics of the disease. Note that Pyfectious comes with a versatile family of distributions that can be used for any model parameter, including immunity, if they are more suitable for a certain scenario. \item Infection rate ($r$): A real-valued parameter $r\in[0, 1]$ that models how easily an infection transmits. It is determined by either how fast a specific infection transmits in a society with no control measure or how robust the society is against the infection by observing the control measures such as wearing a mask, using hand sanitizer, etc. The infection rate is also a random variable for which we assume a Beta distribution here, i.e., $ r \sim \textrm{Beta}(\alpha_r, \beta_r)$. \item Transmission potential ($\gamma$): A real-valued parameter $\gamma\in[0, 1]$ that models the possibility for the transmission of the disease between two individuals based on the type of interaction they have. Hence, this parameter is determined by the connectivity graph under the population. The individuals who meet regularly (e.g., being the members of the same family) have strong connectivity and hence stronger potential for transmitting the infection. This parameter is also a random variable with Gamma distribution whose hyper-parameters are functions of the connectivity strength, i.e., $ \gamma^{\text{edge}} \sim \textrm{Beta}(\alpha_\gamma, \beta_\gamma)$. \end{itemize} Given the above influential variables in the disease transmission, the probability of the transmission of the infection from an infected individual (sender) to another individual (receiver) is calculated by: \begin{equation} P(\textrm{sender} \xrightarrow[]{\text{Transmit}}\text{receiver}) = \upsilon_{\text{receiver}} \times r_{\text{sender}} \times r_{\text{receiver}} \times \gamma_{\text{edge}}. \end{equation} At each interaction between an infected and uninfected individuals, the above probability is calculated and kept as a threshold $p_{\textrm{thresh}}$. Then, a sample is generated from a uniform distribution $\zeta\sim \text{U}[0, 1]$ and a disease transmission event occurs if $\zeta\leq p_{\textrm{thresh}}$. \subsubsection{The dynamics of infection in a patient} When an individual gets infected, the period of the disease $\tau$ and the probability of death $p_\textrm{death}$ is calculated based on the specified properties of the disease and the attributes of the individual. More specifically, the disease period is a random variable whose distribution is calculated from the real-world experimental data. The same holds for death probability (see the examples in~\Cref{sec:disease_properties_setting}). It can be seen that the death probability usually depends on the health condition and age. High ages and poor health conditions increase the likelihood of fatality when other factors are alike. The diseased individual contributes to the propagation of the infection up to time $\tau$. At time $\tau$, the outcome is decided as death by probability $p_\textrm{death}$ or recovery by probability $1-p_\textrm{death}$. If the patient recovers, her attributes will be updated according to the characteristics of the infection and her attributes before getting infected. For example, a temporary immunity may be gained as a result of surviving the infection once. \subsection{Time management} A challenging issue when simulating a physical phenomenon is the immense computational resources needed to approximate the continuous evolution of the system in time. As a result, a reliable simulation becomes quickly intractable even for fairly low-dimensional systems. However, not all temporal details of the environment are relevant to the target application. When the goal is to simulate how an infectious disease propagates through a population, the only relevant events are those in which there is a potential in transmitting the disease. Simulators often implement the evolution of time by either an event-based or clock-based method. In event-based methods, a queue of events is formed and ordered by the time-of-occurrence of them. In clock-based methods, any change in the system occurs at the pulses of a running clock. We propose a novel mixture event/clock-driven method to bring together the benefits of both worlds. The queue of events is formed similar to the event-based methods, but the pulses of a background clock determine which events are effective in the outcome. By changing the frequency of the background clock, the details of the timeline can be traded off with the computational demand. The constituent components of the time management module of Pyfectious are explained in~\Cref{sec:events,sec:initialize_simulator,sec:standardizing_disease_transmission_prob} below. \subsubsection{Timer} \label{sec:timer} The timer object is a pointer to a specific position of the time axis during the simulation. This pointer keeps moving forward as the simulation progresses. \subsubsection{Events} \label{sec:events} An event refers to any alternation of the simulation setting, i.e., individuals' states, connectivity graph, virus spread, disease properties, etc. Every event is an instance of a class called~\texttt{Event} with the following two properties: the \texttt{Activation Time} (time-of-occurrence) and the \texttt{Activation Task}. When the simulator's timer reaches the activation time, the associated task to that event (defined by the activation task) is executed. A series of events are kept in a queue and are executed in the order of their activation times (See~\Cref{fig:timer}). To prevent the events from racing for execution, each event is given a distinct priority index as a tiebreaker in case two events happen to have the same activation time. The following events are included in the current version (V1.0) of Pyfectious. The events with higher priorities come earlier in the list: \{Incubation Event, Infection Event, Plan Day Event, Transition Event, Virus Spread Event\}. Each of these events is explained in the following. \begin{figure}[t] \begin{subfigure}{0.4\columnwidth} \centering \begin{tikzpicture} \node[{shape=circle, text=black, minimum size=0.1em}] (v) at (-0.33,0) {(a)}; \begin{axis}[ height=2cm, width = 7.5cm, xmin=0, xmax=21, axis x line=bottom hide y axis, ymin=0,ymax=5, xlabel={Time (h)}, scatter/classes={% a={mark=o,draw=black}} ] \addplot[scatter,only marks, mark=otimes*, mark size = 3pt, fill = yellow, scatter src=explicit symbolic] table { 3 0 6 0 }; \addplot[scatter,only marks, mark=*, mark size = 3pt, fill = yellow, scatter src=explicit symbolic] table { 9 0 12 0 15 0 18 0 }; \addplot[scatter,only marks, mark=triangle*, mark size = 3pt, fill = black, scatter src=explicit symbolic] table { 9 0 }; \end{axis} \end{tikzpicture} \caption{} \label{fig:time_transition_before} \end{subfigure} \hfill \begin{subfigure}{0.45\columnwidth} \centering \begin{tikzpicture} \node[{shape=circle, text=black, minimum size=0.1em}] (v) at (-0.33,0) {(b)}; \begin{axis}[ name=boundary, height=2cm, width = 7.5cm, xmin=0, xmax=21, axis x line=bottom hide y axis, ymin=0,ymax=5, xlabel={Time (h)}, scatter/classes={% a={mark=o,draw=black}} ] \addplot[scatter,only marks, mark=otimes*, mark size = 3pt, fill = yellow, scatter src=explicit symbolic] table { 3 0 6 0 9 0 }; \addplot[scatter,only marks, mark=*, mark size = 3pt, fill = yellow, scatter src=explicit symbolic] table { 12 0 15 0 18 0 }; \addplot[scatter,only marks, mark=triangle*, mark size = 3pt, fill = black, scatter src=explicit symbolic] table { 12 0 }; \end{axis} \node[draw,fill=white,inner sep=2pt,below left=2em] at (boundary.south east) {\small \begin{tabular}{cc} \begin{tikzpicture} \node [shape=circle, draw, fill=yellow, minimum size=0.7em] {}; \end{tikzpicture} & Event \end{tabular}}; \end{tikzpicture} \caption{} \label{fig:time_transition_after} \end{subfigure} \caption{Yellow circles on the timeline axis indicate events. The crossed circles represent the events that are already executed. The filled triangle represents the current simulation time. After a task is executed, the simulation time jumps to the next event in the queue. An exemplary transition is shown by moving from from~\Cref{fig:time_transition_before} to~\Cref{fig:time_transition_after}.} \label{fig:timer} \end{figure} \paragraph{Transition event} Each transition event is associated with a certain individual, and it is triggered when that individual changes its location from one subcommunity to another. The change of location is implemented by changing the weights of the edges connected to an individual in the connectivity graph. \paragraph{Plan-Day event} The daily dynamics of society consist of the motion of the people and their interactions based on the role they play in society. Hence, individuals' daily schedule in a city is roughly determined by their attributes and their role. In Pyfectious , the daily schedule for every individual is determined by the activation of an event at the beginning of each day. The Plan-Day event is a sequential random variable that takes the attributes and associated communities / subcommunities to an individual and generates a sample from the schedule suited to her. Looking more closely into the implementation, every daily plan is an ordered sequence of events whose start time and duration are sampled from specified probability distributions. The hyper-parameters of these distributions are determined by the attributes of the individual and the subcommunities that are related to a certain event. To prevent the overlapping between the time intervals of the events, a time priority index is assigned to each event to resolve potential conflicts. For example, mandatory events, such as \emph{going to work} and \emph{going to school} have a higher priority compared with optional events such as \emph{going to restaurant}. \paragraph{Incubation event} After a disease transmission occurs, an incubation event is added to the event queue containing the end time of the incubation period. This marks the period in which the disease is still dormant in the body. When this event is activated at the end of the incubation period, the state of the respective individual will be updated to infected. \paragraph{Infection event} After the incubation period, the respective individual's health condition is updated to infected, and an infection event is added to the event queue. This event's activation time marks the end time of the duration of the disease as a function of the individual's attributes. When this event is activated at the end of the disease period, the outcome of the disease is decided, and the individual's condition is updated to either~\emph{dead} or~\emph{recovered}. \paragraph{Virus spread event} The running clock of the simulator is converted to a series of virus spread events. The period of the clock works as temporal snapshots on which a virus transmission can occur. Hence, it trades off the needed computational resources with the temporal resolution of the simulator. To save computational time, the temporal resolution can be chosen long enough that assures the spread of the infection in the city does not change drastically within that period. For example, for respiratory diseases such as COVID-19, the fastest transmission way takes two individuals to get near each other. Hence, the temporal resolution can be set accordingly. \subsubsection{Initializing the simulator} \label{sec:initialize_simulator} To initiate the simulation, an empty queue of events is created. Then, the following two tasks are carried out to populate the queue with \texttt{Events} to be run. \begin{enumerate} \item The simulator clock period is set, and the virus spread events are added to the queue. In~\Cref{fig:execution_a}, the clock pulses every 5 hours, and the virus spread events are placed on consecutive 5-hour intervals starting from hour 0. \item The Plan-Day events are placed at the beginning of each day. They create the daily schedule for every individual and fill in the time progression queue with the events that make up the daily plan (See Figure \Cref{fig:execution_b} and \Cref{fig:execution_d} for illustration.) \end{enumerate} \begin{figure}[!t] \captionsetup[subfigure]{labelformat=empty, aboveskip=-3pt,belowskip=-3pt} \begin{subfigure}{0.99\columnwidth} \centering \begin{tikzpicture} \node[{shape=circle, text=black, minimum size=0.1em}] (v) at (-0.35,0) {(a)}; \begin{axis}[ width=15cm,height=2cm, xmin=0, xmax=50, axis x line=bottom hide y axis, ymin=0,ymax=5, xtick distance=4, xlabel={Time (hour)}, scatter/classes={% a={mark=o,draw=black}} ] \addplot[scatter,only marks, mark=*, mark size = 3pt, fill = yellow, scatter src=explicit symbolic] table { 0 0 5 0 10 0 15 0 20 0 25 0 30 0 35 0 40 0 45 0 }; \end{axis} \end{tikzpicture} \caption{} \label{fig:execution_a} \end{subfigure} \begin{subfigure}{0.99\columnwidth} \centering \begin{tikzpicture} \node[{shape=circle, text=black, minimum size=0.1em}] (v) at (-0.35,0) {(b)}; \begin{axis}[ width=15cm,height=2cm, xmin=0, xmax=50, axis x line=bottom hide y axis, ymin=0,ymax=5, xtick distance=4, xlabel={Time (hour)}, scatter/classes={% a={mark=o,draw=black}} ] \addplot[scatter,only marks, mark=*, mark size = 3pt, fill = yellow, scatter src=explicit symbolic] table { 0 0 5 0 10 0 15 0 20 0 25 0 30 0 35 0 40 0 45 0 }; \addplot[scatter,only marks, mark=*, mark size = 3pt, fill = orange, scatter src=explicit symbolic] table { 0 0 24 0 48 0 }; \end{axis} \end{tikzpicture} \caption{} \label{fig:execution_b} \end{subfigure} \begin{subfigure}{0.99\columnwidth} \centering \begin{tikzpicture} \node[{shape=circle, text=black, minimum size=0.1em}] (v) at (-0.35,0) {(c)}; \begin{axis}[ width=15cm,height=2cm, xmin=0, xmax=50, axis x line=bottom hide y axis, ymin=0,ymax=5, xtick distance=4, xlabel={Time (hour)}, scatter/classes={% a={mark=o,draw=black}} ] \addplot[scatter,only marks, mark=*, mark size = 3pt, fill = yellow, scatter src=explicit symbolic] table { 0 0 5 0 10 0 15 0 20 0 25 0 30 0 35 0 40 0 45 0 }; \addplot[scatter,only marks, mark=*, mark size = 3pt, fill = orange, scatter src=explicit symbolic] table { 0 0 24 0 48 0 }; \addplot[scatter,only marks, mark=triangle*, mark size = 3pt, fill = black, scatter src=explicit symbolic] table { 0 0 }; \end{axis} \end{tikzpicture} \caption{} \label{fig:execution_c} \end{subfigure} \begin{subfigure}{0.99\columnwidth} \centering \begin{tikzpicture} \node[{shape=circle, text=black, minimum size=0.1em}] (v) at (-0.35,0) {(d)}; \begin{axis}[ width=15cm,height=2cm, xmin=0, xmax=50, axis x line=bottom hide y axis, ymin=0,ymax=5, xtick distance=4, xlabel={Time (hour)}, scatter/classes={% a={mark=o,draw=black}} ] \addplot[scatter,only marks, mark=*, mark size = 3pt, fill = yellow, scatter src=explicit symbolic] table { 0 0 5 0 10 0 15 0 20 0 25 0 30 0 35 0 40 0 45 0 }; \addplot[scatter,only marks, mark=*, mark size = 3pt, fill = orange, scatter src=explicit symbolic] table { 0 0 24 0 48 0 }; \addplot[scatter,only marks, mark=triangle*, mark size = 3pt, fill = black, scatter src=explicit symbolic] table { 0 0 }; \addplot[scatter,only marks, mark=*, mark size = 3pt, fill = lime, scatter src=explicit symbolic] table { 1 0 3 0 7 0 9 0 21 0 23 0 13 0 }; \end{axis} \end{tikzpicture} \caption{} \label{fig:execution_d} \end{subfigure} \begin{subfigure}{0.99\columnwidth} \centering \begin{tikzpicture} \node[{shape=circle, text=black, minimum size=0.1em}] (v) at (-0.35,0) {(e)}; \begin{axis}[ width=15cm,height=2cm, xmin=0, xmax=50, axis x line=bottom hide y axis, ymin=0,ymax=5, xtick distance=4, xlabel={Time (hour)}, scatter/classes={% a={mark=o,draw=black}} ] \addplot[scatter,only marks, mark=*, mark size = 3pt, fill = yellow, scatter src=explicit symbolic] table { 0 0 5 0 10 0 15 0 20 0 25 0 30 0 35 0 40 0 45 0 }; \addplot[scatter,only marks, mark=*, mark size = 3pt, fill = orange, scatter src=explicit symbolic] table { 24 0 48 0 }; \addplot[scatter,only marks, mark=otimes*, mark size = 3pt, fill = orange, scatter src=explicit symbolic] table { 0 0 }; \addplot[scatter,only marks, mark=*, mark size = 3pt, fill = lime, scatter src=explicit symbolic] table { 1 0 3 0 7 0 9 0 21 0 23 0 13 0 }; \addplot[scatter,only marks, mark=triangle*, mark size = 3pt, fill = black, scatter src=explicit symbolic] table { 1 0 }; \end{axis} \end{tikzpicture} \caption{} \label{fig:execution_e} \end{subfigure} \begin{subfigure}{0.99\columnwidth} \centering \begin{tikzpicture} \node[{shape=circle, text=black, minimum size=0.1em}] (v) at (-0.35,0) {(f)}; \begin{axis}[ width=15cm,height=2cm, xmin=0, xmax=50, axis x line=bottom hide y axis, ymin=0,ymax=5, xtick distance=4, xlabel={Time (hour)}, scatter/classes={% a={mark=o,draw=black}} ] \addplot[scatter,only marks, mark=*, mark size = 3pt, fill = yellow, scatter src=explicit symbolic] table { 0 0 5 0 10 0 15 0 20 0 25 0 30 0 35 0 40 0 45 0 }; \addplot[scatter,only marks, mark=*, mark size = 3pt, fill = orange, scatter src=explicit symbolic] table { 24 0 48 0 }; \addplot[scatter,only marks, mark=otimes*, mark size = 3pt, fill = orange, scatter src=explicit symbolic] table { 0 0 }; \addplot[scatter,only marks, mark=*, mark size = 3pt, fill = lime, scatter src=explicit symbolic] table { 3 0 7 0 9 0 21 0 23 0 13 0 }; \addplot[scatter,only marks, mark=otimes*, mark size = 3pt, fill = lime, scatter src=explicit symbolic] table { 1 0 }; \addplot[scatter,only marks, mark=triangle*, mark size = 3pt, fill = black, scatter src=explicit symbolic] table { 3 0 }; \end{axis} \end{tikzpicture} \caption{} \label{fig:execution_f} \end{subfigure} \begin{subfigure}{0.99\columnwidth} \centering \begin{tikzpicture} \node[{shape=circle, text=black, minimum size=0.1em}] (v) at (-0.35,0) {(g)}; \begin{axis}[ width=15cm,height=2cm, xmin=0, xmax=50, axis x line=bottom hide y axis, ymin=0,ymax=5, xtick distance=4, xlabel={Time (hour)}, scatter/classes={% a={mark=o,draw=black}} ] \addplot[scatter,only marks, mark=*, mark size = 3pt, fill = yellow, scatter src=explicit symbolic] table { 0 0 5 0 10 0 15 0 20 0 25 0 30 0 35 0 40 0 45 0 }; \addplot[scatter,only marks, mark=*, mark size = 3pt, fill = orange, scatter src=explicit symbolic] table { 24 0 48 0 }; \addplot[scatter,only marks, mark=otimes*, mark size = 3pt, fill = orange, scatter src=explicit symbolic] table { 0 0 }; \addplot[scatter,only marks, mark=*, mark size = 3pt, fill = lime, scatter src=explicit symbolic] table { 7 0 9 0 21 0 23 0 13 0 }; \addplot[scatter,only marks, mark=otimes*, mark size = 3pt, fill = lime, scatter src=explicit symbolic] table { 1 0 3 0 }; \addplot[scatter,only marks, mark=triangle*, mark size = 3pt, fill = black, scatter src=explicit symbolic] table { 5 0 }; \end{axis} \end{tikzpicture} \caption{} \label{fig:execution_g} \end{subfigure} \begin{subfigure}{0.99\columnwidth} \centering \begin{tikzpicture} \node[{shape=circle, text=black, minimum size=0.1em}] (v) at (-0.35,0) {(h)}; \begin{axis}[ width=15cm,height=2cm, xmin=0, xmax=50, axis x line=bottom hide y axis, ymin=0,ymax=5, xtick distance=4, xlabel={Time (hour)}, scatter/classes={% a={mark=o,draw=black}} ] \addplot[scatter,only marks, mark=*, mark size = 3pt, fill = yellow, scatter src=explicit symbolic] table { 0 0 5 0 10 0 15 0 20 0 25 0 30 0 35 0 40 0 45 0 }; \addplot[scatter,only marks, mark=*, mark size = 3pt, fill = orange, scatter src=explicit symbolic] table { 24 0 48 0 }; \addplot[scatter,only marks, mark=otimes*, mark size = 3pt, fill = orange, scatter src=explicit symbolic] table { 0 0 }; \addplot[scatter,only marks, mark=*, mark size = 3pt, fill = lime, scatter src=explicit symbolic] table { 7 0 9 0 21 0 23 0 13 0 }; \addplot[scatter,only marks, mark=otimes*, mark size = 3pt, fill = lime, scatter src=explicit symbolic] table { 1 0 3 0 }; \addplot[scatter,only marks, mark=triangle*, mark size = 3pt, fill = black, scatter src=explicit symbolic] table { 5 0 }; \addplot[scatter,only marks, mark=*, mark size = 3pt, fill = cyan, scatter src=explicit symbolic] table { 32 0 37 0 44 0 49 0 }; \end{axis} \end{tikzpicture} \caption{} \label{fig:execution_h} \end{subfigure} \begin{subfigure}{0.99\columnwidth} \centering \begin{tikzpicture} \node[{shape=circle, text=black, minimum size=0.1em}] (v) at (-0.35,0) {(i)}; \begin{axis}[ name=boundary, width=15cm,height=2cm, xmin=0, xmax=50, axis x line=bottom hide y axis, ymin=0,ymax=5, xtick distance=4, xlabel={Time (hour)}, scatter/classes={% a={mark=o,draw=black}} ] \addplot[scatter,only marks, mark=*, mark size = 3pt, fill = yellow, scatter src=explicit symbolic] table { 10 0 15 0 20 0 25 0 30 0 35 0 40 0 45 0 }; \label{pgfplots:virus} \addplot[scatter,only marks, mark=otimes*, mark size = 3pt, fill = yellow, scatter src=explicit symbolic] table { 0 0 5 0 }; \addplot[scatter,only marks, mark=*, mark size = 3pt, fill = orange, scatter src=explicit symbolic] table { 24 0 48 0 }; \addplot[scatter,only marks, mark=otimes*, mark size = 3pt, fill = orange, scatter src=explicit symbolic] table { 0 0 }; \addplot[scatter,only marks, mark=*, mark size = 3pt, fill = lime, scatter src=explicit symbolic] table { 7 0 9 0 21 0 23 0 13 0 }; \addplot[scatter,only marks, mark=otimes*, mark size = 3pt, fill = lime, scatter src=explicit symbolic] table { 1 0 3 0 }; \addplot[scatter,only marks, mark=*, mark size = 3pt, fill = cyan, scatter src=explicit symbolic] table { 32 0 37 0 44 0 49 0 }; \addplot[scatter,only marks, mark=triangle*, mark size = 3pt, fill = black, scatter src=explicit symbolic] table { 7 0 }; \end{axis} \node[draw,fill=white,inner sep=2pt,below left=2em] at (boundary.south east) {\small \begin{tabular}{ccl} \begin{tikzpicture} \node [shape=circle, draw, fill=yellow, minimum size=0.7em] {}; \end{tikzpicture} & Virus Spread Event \\ \begin{tikzpicture} \node [shape=circle, draw, fill=orange, minimum size=0.7em] {}; \end{tikzpicture} & Plan Day Event \\ \begin{tikzpicture} \node [shape=circle, draw, fill=lime, minimum size=0.7em] {}; \end{tikzpicture} & Transition Event \\ \begin{tikzpicture} \node [shape=circle, draw, fill=cyan, minimum size=0.7em] {}; \end{tikzpicture} & Incubation Event \end{tabular}}; \end{tikzpicture} \caption{} \label{fig:execution_i} \end{subfigure} \caption{In this figure, a toy example of the execution process for two days is depicted. Events are indicated by yellow circles on the horizontal axis that represents the timeline. The current time of the simulation is shown by the filled triangle. The crossed circles represent those events that are already executed. After the execution of each event, the simulator time jumps forward to the nearest event in the queue. Each row of this figure shows one step of the simulation time. a) The simulator is initialized. The clock period is set to 5 hours based on which the virus spread events are placed. b) The plan day events are placed at the beginning of each day. These events are supposed to schedule the individuals' daily lives based on their roles in society. c) The timer is set at the start of the simulation time. d) During the execution of the plan day events, transition events are added to the event queue. These events will change the location of the individuals. e) The timer takes a step forward. f, g) The transition events are executed that change the locations of the individuals. h) The infection is being spread by interactions among individuals. New infections create new incubation events, which are added to the queue. i) The simulation moves on with the same rules. } \label{fig:execution} \end{figure} The progress of a simple case of the simulation for two days (48 hours) is depicted in \Cref{fig:execution}. In~\Cref{fig:execution_c}, the plan day event is activated as the first event of the day. As a result, the transition events are added to the timeline as is shown in~\Cref{fig:execution_d}. The transition events are activated in~\Cref{fig:execution_e,fig:execution_f} that leads to changing the location of the respective individuals. A virus spread event is executed in~\Cref{fig:execution_g,fig:execution_h} and the virus transmission occurs depending on the individual's location and the connectivity graph. If a new individual gets infected as a result of a virus spread event, the infection end events are added as shown in~\Cref{fig:execution_h}. This process continues, and the added events to the timeline get executed in order until the end of the simulation time. \subsubsection{Standardizing the probability of disease transmission} \label{sec:standardizing_disease_transmission_prob} We propose a multiresolution simulator to make the simulation possible on machines with weaker computational resources. A crucial point in the multiresolution simulator is to make sure the outcome is consistent regardless of the employed resolution (the period of the clock). We argue that consistency is achieved if the probability of the virus transmission between two individuals is invariant with respect to the clock's period. Equivalently, it is sufficient to show that the probability of the virus not being transmitted remains invariant to the period of the clock. Hence, we equate the probability of non-transmission under clock periods $T_1$ and $T_2$ before time $t$ as \begin{equation} {(1-p_1)}^{\lfloor t/T_1 \rfloor} = {(1-p_2)}^{\lfloor t/T_2 \rfloor}, \end{equation} where $p_1$ and $p_2$ are the probabilities of a single virus transmission. Hence, as can be seen in~\Cref{fig:standard_probability}, the virus transmission probability under a target clock period can be derived as a function of the transmission probability under a different clock period and the ratio of clock periods. That is \begin{equation} p_2 = 1 - {(1 - p_1)}^{\frac{\lfloor t/T_1 \rfloor}{\lfloor t/T_2 \rfloor}}. \end{equation} \begin{figure}[!t] \begin{subfigure}{0.99\columnwidth} \centering \begin{tikzpicture} \node[{shape=circle, text=black, minimum size=0.1em}] (v) at (-0.35,0) {(a)}; \begin{axis}[ width=14.5cm,height=2cm, xmin=0, xmax=80, axis x line=bottom hide y axis, ymin=0,ymax=5, xtick={0, 9, 18, 27, 36, 45, 54, 67, 80}, xticklabels={0, $T_1$, $2T_1$, $3T_1$, $4T_1$, $5T_1$, $6T_1$, $\dots k T_1 \dots$, $t$}, extra x ticks={0, 9, 18, 27, 36, 45, 54, 67, 80}, extra x tick style={ ,grid=major ,ticklabel pos=top }, extra x tick labels={$1$, ${(1-p_1)}^1$, ${(1-p_1)}^2$, ${(1-p_1)}^3$, ${(1-p_1)}^4$, ${(1-p_1)}^5$, ${(1-p_1)}^6$, ${(1-p_1)}^k$, ${(1-p_1)}^{\lfloor t/T_1 \rfloor}$}, xlabel={Time (hour)}, scatter/classes={% a={mark=o,draw=black}} ] \addplot[scatter,only marks, mark=*, mark size = 3pt, fill = yellow, scatter src=explicit symbolic] table { 0 0 9 0 18 0 27 0 36 0 45 0 54 0 67 0 }; \end{axis} \end{tikzpicture} \end{subfigure} \begin{subfigure}{0.99\columnwidth} \centering \begin{tikzpicture} \node[{shape=circle, text=black, minimum size=0.1em}] (v) at (-0.35,0) {(b)}; \begin{axis}[ width=14.5cm,height=2cm, xmin=0, xmax=80, axis x line=bottom hide y axis, ymin=0,ymax=5, xtick={0, 17, 34, 51, 67, 80}, xticklabels={0, $T_2$, $2T_2$, $3T_2$, $\dots k T_2 \dots$, $t$}, extra x ticks={0, 17, 34, 51, 67, 80}, extra x tick style={ ,grid=major ,ticklabel pos=top }, extra x tick labels={$1$, ${(1-p_2)}^1$, ${(1-p_2)}^2$, ${(1-p_2)}^3$, ${(1-p_2)}^k$, ${(1-p_2)}^{\lfloor t/T_2 \rfloor}$}, xlabel={Time (hour)}, scatter/classes={% a={mark=o,draw=black}} ] \addplot[scatter,only marks, mark=*, mark size = 3pt, fill = yellow, scatter src=explicit symbolic] table { 0 0 17 0 34 0 51 0 67 0 }; \end{axis} \node[draw,fill=white,inner sep=2pt, below left = 22pt] at (boundary.south east) {\small \begin{tabular}{cc} \begin{tikzpicture} \node [shape=circle, draw, fill=yellow, minimum size=0.7em] {}; \end{tikzpicture} & Simulator's Clock \end{tabular}}; \end{tikzpicture} \end{subfigure} \caption{Simulator's clock is translated to Virus Spread Events indicated by yellow circles on the timeline axis. In (a) and (b) two characteristically similar simulators' timelines are displayed that only differ in their clock periods ($T_1$ for (a) and $T_2$ for (b)). If the probability of transmission in a single clock trigger is $p$, the probability of disease transmission for the whole time is a geometric distribution with parameters equals to $(p, \lfloor t/T \rfloor)$, where $T$ is the clock period. The probability of disease not being transmitted is shown above the axes for a simple interaction between two individuals. In order to have consistent results for both similar simulators with different resolutions, the mentioned probabilities should be equal to each other for the simulators. In other words, ${(1-p_1)}^{\lfloor t/T_1 \rfloor} = {(1-p_2)}^{\lfloor t/T_2 \rfloor}.$} \label{fig:standard_probability} \end{figure} \subsection{Even management} To emulate the real-world condition, Pyfectious is equipped with event-based measurement and control modules. These modules are triggered by the occurrence of certain events along the timeline. \subsubsection{Conditions} \label{sec:condition} A condition object is instantiated from the class~\texttt{Condition} and acts as a watchdog that triggers when a certain event occurs. Hence, the purpose of a condition to notify the simulator about a predetermined event. The triggering event is a property of the condition instance. For example, one condition triggers when a specific date arrives. Another condition triggers when the number of infected people surpasses a specified threshold. Every condition object has two standard methods. One determines whether the condition should be triggered while the other method checks if the condition has served its purposes, i.e., whether the simulator still needs the condition. Each type of condition may have its own attributes that are implemented on demand. A list of conditions implemented in the current version (V1.0) of Pyfectious is explained below. They can be extended fairly easily by the user to support customized conditions. \begin{itemize} \item \texttt{Time Point Condition} notifies the simulator when the simulation time reaches a specified point in the timeline. Having the deadline as its parameter, the condition compares the current time with the simulation time on each pulse of the simulator's clock. \item \texttt{Time Period Condition} operates based on a given period. Starting from the beginning of the simulation, the condition notifies the simulator periodically whenever the simulator timer is divisible by the mentioned period. By increasing this divisor period, we can reduce the simulation's time resolution to reduce the computational burden at the cost of missing some short events that occur in an interval between two pulses. \item \texttt{Statistical Ratio Condition} is an example of time-independent conditions that are defined by three items: a threshold ratio, a mathematical operator, and a pair of statistics from the population. For example, let the threshold ratio be $0.2$, the mathematical operator be division and the pair of statistics be the number of deaths, and the number of active infected cases. Hence, this condition is triggered when more than $20\%$ of the infected people die. \item \texttt{Statistical Family Condition} and \texttt{Statistical Role Condition} are other time-independent conditions. They follow the same logic as the \texttt{Statistical Ratio Condition} except that the given statistics that trigger the condition are taken from a specific family, role, subcommunity, or community. For example, an instance of this condition can get triggered if the number of infected students in a school surpasses a threshold. This allows interventions on specific roles within a particular community instead of treating all members of the same role alike. For example, suppose the infection is spread in a specific school instead of shutting every school in the society. In that case, Pyfectious allows investigating the outcome of quarantining the subcommunities (teachers or students) of that particular school. \end{itemize} \subsection{Commands} \label{sec:commands} A command object is an instance of a class named \texttt{Command}, and its function is to intervene on the other objects in a running simulation. Every command corresponds to a real-world action that changes one or more attributes in individuals, communities, subcommunities, or the edges of the connectivity graph. These actions allow the implementation of a wide range of quarantine and restriction policies. Since the command objects are designed to mimic the policies issued by the health authorities to contain the infection, they cannot change the parameters that such policies in the real world cannot alter. For example, a command can shut down a school but cannot change the inherent attributes of the disease or fixed attributes of individuals such as age and background health condition. To elaborate more, the currently implemented commands in Pyfectious are explained below. \begin{itemize} \item \texttt{Quarantine Single Person or Quarantine Multiple People} force an individuals or a group of individuals to stay at home. The quarantine remains effective until another command lifts it. In the \texttt{Quarantine Multiple People} command, the quarantined people can be any subset of the population and do not need to belong to the same community or subcommunity. For example, if the infection is detected in the schools of a certain neighborhood of the city, a command can be issued to quarantine $50\%$ of the students and teachers of that neighborhood's schools \item \texttt{Quarantine Infected People} puts the currently infected people in quarantine. This command operates with the idealistic assumption that there is no inaccuracy in detecting the infected people. \item \texttt{Quarantine Single Family} and \texttt{Quarantine Multiple Families} put people living in the same residence in quarantine. \item \texttt{Quarantine Infected People Noisy} resembles \texttt{Quarantine Infected People} command but emulates some inaccuracy in the detection of the infected people. It also models another stochasticity in the application of the quarantine policy to better mimic real-world scenarios. \item \texttt{Restrict Certain Roles} imposes restrictions on one or more roles in the communities of the society. It has a parameter called \texttt{Restriction Ratio} that shows what ratio of the people with the target role must obey the restriction. For example, it can enforce that only $30\%$ of the students of a school can be present on-site, and the other $70\%$ must remain at home for a specified period. \item \texttt{Quarantine Single Community} or \texttt{Quarantine Multiple Communities} are relatively coarse-grained commands that shut down a specific community such as a particular school or restaurant. \item \texttt{Quarantine Community Type} is a coarse-grained command that shuts down all communities of the same type. For example, shutting down all the schools or restaurants of society are examples of this \texttt{Command}. \item \texttt{Change Immunity Level} is capable of increasing or decreasing the immunity level of a given set of individuals. Consequently, this command enables us to investigate the situations in which the immunity level of a specific group of individuals changes during the pandemic. In particular, as the vaccination increases the immunity level, the effect of vaccinating specific groups on changing the course of the pandemic can be helpful in designing the distribution of vaccines when the resources are limited. \item \texttt{Change Infection Rate} emulates the effect of the policies on individuals' behavior that affect how infectious a disease is. For example, in respiratory diseases transmitted via droplets while sneezing, coughing, or talking, governmental policies such as mandatory mask-wearing in certain locations result in decreasing the infection rate in those locations. \end{itemize} \subsection{Data logging with observers} In reality, the virus spread information is logged with limited spatial and temporal coverage and resolution. Meaning that the information of only a subset of the population and at a sparse set of time points is logged and available to the policymakers. To emulate this real-world condition and at the same time to reduce the computational and memory usage, Pyfectious is equipped with a class named~\emph{Observer} whose instances are meant to emulate the limitations of the real-world measurements. Similar to the command objects, the observer objects are also invoked by the activation of a condition object (see~\Cref{sec:condition}). For instance, to collect the simulation data at regular intervals, a \texttt{Time Period Condition} is created to activate an observer that measures the health condition of a specific group of individuals. Every observer stores the data related to individuals, families, communities, and subcommunities into a database. Pyfectious is equipped with a comprehensive interface to get detailed reports form this database during or after the simulation is carried out for a desired duration. \section*{Supplementary Materials} \label{sec:supplementary_material} In this section, some supplementary materials are presented to clarify the capabilities and applications of the simulator's library, introduce a step-by-step guide to run the simulator, and provide further experiments conducted with different criteria than what was already discussed in \Cref{sec:experiments}. The information provided in the next three sections aims at guiding developers to customize and deploy the simulator. To illustrate how the simulator interface works, we divide the tutorials into three major parts, each focused on a general aspect of the simulator's operation. \begin{enumerate} \item Manual simulation: Designing a simulation from scratch. \item Configured simulation: Deploying a configured simulation. \item Sanity check: Assessment of the simulator results. \end{enumerate} The simulator's programming tutorials presented in the first two parts can be significantly helpful for someone starting to work with the simulator for the first time, even with a basic knowledge of the Python programming language. Furthermore, the code snippets presented in this section are already accessible on GitHub by \href{https://github.com/amehrjou/Pyfectious/tree/master/example}{\color{blue}{https://github.com/amehrjou/Pyfectious/tree/master/example}}. In the last section, we present complementary results of our experiments, created by a different setting and smaller duration than the one introduced earlier in \Cref{sec:experiments}. \input{supplementary_materials/manual_simulation} \input{supplementary_materials/configured_simulation} \input{supplementary_materials/sanity_checks} \input{supplementary_materials/additional_experiments} \section{Additional experiments} \label{sec:additional_experiments} In addition to the experiments presented in \Cref{sec:experiments}, another set of experiments has been developed here in order to demonstrate the simulator's ability to cope with any given criteria. The upcoming experiments are fundamentally the same as \Cref{sec:experiments}. However, the following differences in the configuration files are notable. \begin{enumerate} \item Incubation and disease period: the disease period and incubation rate are derived from uniform distributions of lower values (incubation period: Uniform [1, 2] and disease period: Uniform [5, 9]), as opposed to a normal distribution. \item The population has a more simple structure but the same size, which means that people are divided into large communities instead of what is described in \Cref{tab:communities_information}. \item The simulation duration is shorter than before, four months instead of ten months in \Cref{sec:experiments}. \end{enumerate} The results presented in \Cref{fig:plots_additional_experiments_part1}, \Cref{fig:plots_additional_experiments_part2}, and \Cref{fig:plots_additional_experiments_part3}, imply that the simulator is flexible with regard to various population and disease structures. Moreover, as appears in the mentioned experiments, our inference in a larger population is quite the same as what we observe in a simpler structure, indicating that the simulator is expandable to any population size if enough information is available about the overall structure. \begin{figure} \begin{subfigure}{\linewidth} \includegraphics[width=.5\linewidth]{supplementary_materials/Additional_Experiments_files/Normal_Executions_Plus_Average.pdf}\hfill \includegraphics[width=.5\linewidth]{supplementary_materials/Additional_Experiments_files/Normal_Executions_Plus_Error_Band.pdf} \caption{Left) Normal executions of the sample city. Due to the stochastic characteristics of the simulation, each run is slightly different compared to the others. Therefore, the blue line is introduced as the average of all executions, smoothed by a moving average of windows size 2. Right) A plain execution of the simulation without any interference, i.e., the virus spreads from the initially infected people to others without the presence of any prevention measures. Since the simulation has a stochastic nature, the error bands are displayed as a confidence measure when making deterministic conclusions.} \end{subfigure}\par\medskip \begin{subfigure}{\linewidth} \includegraphics[width=.5\linewidth]{supplementary_materials/Additional_Experiments_files/Immunity_Effect_On_Infected.pdf}\hfill \includegraphics[width=.5\linewidth]{supplementary_materials/Additional_Experiments_files/Infectious_Effect_On_Infected.pdf} \caption{Left) The effect of the immunity rate on the simulation. In this set of experiments, the immunity rate is sampled from three different uniform distributions. The results indicate that larger immunity rates give rise to flatter curves. Note that AI (Average Immunity) is the mean of the uniform distribution from which the immunity rate of each curve is sampled. Right) Effect of infection rate on the statistic of active cases. Each curve corresponds to a specific infection rate distribution. The results indicate that the larger the infection rate gets, the higher the spread slope will be. As a result, it takes less time for the number of active cases to reach its peak. Notice that AIR stands for the Average Infection Rate, which is the mean distribution from which the infection rate is sampled.} \end{subfigure}\par\medskip \caption{First part of the additional experiment results, including disease properties and normal executions.} \label{fig:plots_additional_experiments_part1} \end{figure} \begin{figure} \begin{subfigure}{\linewidth} \includegraphics[width=.5\linewidth]{supplementary_materials/Additional_Experiments_files/Quarantine_Infected_Effect.pdf}\hfill \includegraphics[width=.5\linewidth]{supplementary_materials/Additional_Experiments_files/Quarantine_Partially_Infected_Effect.pdf} \caption{Left) Quarantine the currently infected people activated by time point conditions. This experiment focuses on enforcing universal quarantines on a specific day of the simulation. Quarantines may be applied at any time point during a simulation. In this figure, the quarantines are mandated both before and after the active cases' curve reaches its maximum value. A, B, C, and D strategies enforce a quarantine after 40, 60, 100, and 200 days after the beginning of the outbreak. Right) Quarantine the currently infected people activated by time point conditions and detection error. This experiment focuses on enforcing a probabilistic quarantine after a specific number of days. In this experiment, the process of quarantining the infected people suffers from an error in the detection of active cases; therefore, changing the last part's deterministic nature into a probabilistic one.} \end{subfigure}\par\medskip \begin{subfigure}{\linewidth} \includegraphics[width=.5\linewidth]{supplementary_materials/Additional_Experiments_files/Quarantine_Society_Sectors.pdf}\hfill \includegraphics[width=.5\linewidth]{supplementary_materials/Additional_Experiments_files/Quarantine_Workers_Effect.pdf} \caption{Left) Quarantine specific sectors of society. Aiming at the importance of quarantining various economic sectors of society, this experiment is dedicated to displaying the outcomes of this type of quarantine on the population and the graph of currently infected cases. Group A includes all the workspaces of any size. Group B consists of gyms, restaurants, and cinemas, while group C is focused on more public groups like malls and public transportation. Right) Quarantine specific roles of the society. The simulator is also capable of contracting the virus spread by enforcing restrictions on certain roles in society. Specifically, in this experiment, we quarantine only workers of any kind, e.g., industry and offices. The effect is quite tremendous since the workplaces, in general, have a considerable transmission potential due to highly possible and repetitive close contacts.} \end{subfigure}\par\medskip \caption{Second part of the additional experiment results, including exemplary restriction measures.} \label{fig:plots_additional_experiments_part2} \end{figure} \begin{figure} \begin{subfigure}{\linewidth} \includegraphics[width=.5\linewidth]{supplementary_materials/Additional_Experiments_files/Reduce_Initially_Infecteds.pdf}\hfill \includegraphics[width=.5\linewidth]{supplementary_materials/Additional_Experiments_files/Bang_Bang_Controller.pdf} \caption{Left) The effect of the number of initially infected people. The confidence intervals are expectedly wider for smaller initially infected set because it results in some communities without an initial spreader and consequently a less homogeneous spread of the disease. Right) The bang-bang controller. In this experiment, two different conditions are in place. One triggers quarantining the infected people; the other one triggers lifting the quarantine. Whenever the ratio of currently infected cases to the population reaches $15\%$, quarantines are enforced, and when the ratio declines below $10\%$, the quarantine is lifted.} \end{subfigure}\par\medskip \caption{Last part of the additional experiment results, including bang-bang controller and effect of initially infected individuals.} \label{fig:plots_additional_experiments_part3} \end{figure} \section{Configured Simulation}\label{configured-simulation}} This section is dedicated to explaining the automated setup procedure of the simulator. As opposed to the previous section, the data required by the simulator is obtained by prepared JSON configuration files. \hypertarget{create-a-setting-folder}{% \subsection{Create a setting folder}\label{create-a-setting-folder}} A folder called 'data', located in the project's main directory, consists of four major parts: json, figure, pickle, and sql. The sql folder, as appears of its name, is related to the simulation database, and the database files are stored there. The json folder is used to prepare the simulator's configuration files. By opening the json folder, some samples are already designed and placed there under the respective folders. These are some experimental configuration files that may be used to run a simulation. For instance, open the folder named `test'. Under this folder, there are three JSON files as explained below. \begin{enumerate} \item Population\_Generator.json: This file consists of the information required to build an entire population generator object. \item Disease\_Properties.json: This file consists of the information required to build an entire disease properties object. Parameters like the infection rate and immunity are sub-fields of this JSON file. \item Simulator.json: This file consists of the data required to call the simulate function in the Simulator class, including end\_time, spread\_period, commands, etc. \end{enumerate} \hypertarget{customized-json-files}{% \subsubsection{Customized configuration files}\label{customized-json-files}} To build a customized setting, the folder named `test' must be copied and pasted as a new folder, and name it as you like. For instance, here, we create a copy and call it `configured\_test'. Afterward, it is possible to change the JSON files' values to fit other criteria such as larger population, other diseases, and more complex population structures. \begin{lstlisting}[language=Python] import os import sys sys.path.insert(1, os.path.join(os.pardir, 'src')) # Check if we are in 'test' folder right now print(f'Current directory: {os.getcwd()}') # Change directory to 'data' and then to 'json' folder os.chdir(os.path.join(os.pardir, 'data', 'json')) \end{lstlisting} \begin{lstlisting}[language=Python] # Build the configure_test folder if does not exists try: os.mkdir('configured_test') except FileExistsError: pass # Determine source and destination for copy operation destination = os.path.join(os.getcwd(), 'configured_test') source = os.path.join(os.getcwd(), 'test') # Copy the items in 'test' to 'configured_test' import shutil src_files = os.listdir(source) for file_name in src_files: full_file_name = os.path.join(source, file_name) if os.path.isfile(full_file_name): shutil.copy(full_file_name, destination) \end{lstlisting} Now, we can try to make some changes to the JSON configuration files. For the sake of simplicity, we change the population size to 800. This can be done either manually, from an editor, or using a script like the following. \begin{lstlisting}[language=Python] # Considering the last section, we are now in the 'json' folder, so we move to the 'data' folder again so that the configured test is accessible. os.chdir(os.pardir) # Import and initialize the parser from json_handle import Parser parser = Parser(folder_name='configured_test') # Parse the Population_Generator.json in 'configured_test' population_generator = parser.parse_population_generator() print(f'Population size before the change is: {population_generator.population_size}') # Change the population size population_generator.population_size = 800 # Save the new population generator as json parser.build_json(population_generator) parser.save_json() # Parse the Population_Generator.json in 'configured_test' population_generator = parser.parse_population_generator() print(f'Population size after the change is: {population_generator.population_size}') \end{lstlisting} \hypertarget{simulate-based-on-the-configured-data}{% \subsection{Simulation}\label{simulate-based-on-the-configured-data}} In this section, we simulate data based on the settings saved inside the `configured\_test' folder. \begin{lstlisting}[language=Python] # Import and initialize the parser from json_handle import Parser parser = Parser(folder_name='configured_test') # Load Simulator from JSON file simulator = parser.parse_simulator() simulator.generate_model() # Check the population size after generation print(f'Population size is: {len(simulator.people)}') \end{lstlisting} Additionally, the policy and simulation specifics must be obtained from the Simulator.json as described below. \begin{lstlisting}[language=Python] # Load Simulator Data from JSON file end_time, spread_period, initialized_infected_ids, commands, observers = parser.parse_simulator_data() # Run the simulation simulator.simulate(end_time=end_time, spread_period=spread_period, initialized_infected_ids=initialized_infected_ids, commands=commands, observers=observers) \end{lstlisting} We have completed the simulation, and the results may be obtained from the database or statistics. \begin{lstlisting}[language=Python] from utils import Health_Condition observers[0].plot_disease_statistics_during_time(Health_Condition.IS_INFECTED) \end{lstlisting} Finally, having access to a summary of the simulation is possibly either by setting the report\_statistics option of the simulate function, or separately calling in the statistics class. \begin{lstlisting}[language=Python] simulator.statistics.show_people_statistics(simulator=simulator) \end{lstlisting} \begin{lstlisting} INFO - utils.py - 303 - show_people_statistics - 2020-12-04 12:58:56,722 - +----------------------------+-------+ | People | Count | +============================+=======+ | Population Size | 800 | +----------------------------+-------+ | Confirmed (Active + Close) | 150 | +----------------------------+-------+ | Total Death Cases | 5 | +----------------------------+-------+ | Total Recovered | 795 | +----------------------------+-------+ | Currently Active Cases | 0 | +----------------------------+-------+ \end{lstlisting} \hypertarget{the-example-town}{% \subsection{The example town}\label{the-example-town}} In this section, our sample town, implemented under the 'json' folder with 50k population size, six family patterns, and major communities, including schools and workplaces, gyms, and restaurants, is being tested. \hypertarget{parse-the-configuration-files}{% \subsubsection{Parse the configuration files}\label{parse-the-configuration-files}} Prior to anything else, we have to parse the configuration files located in the town folder, under data/json directory. \begin{lstlisting}[language=Python] # Import libs import sys, time, os sys.path.insert(1, os.path.join(os.pardir, 'src')) # Import and initialize the parser from json_handle import Parser parser = Parser(folder_name='town') # Load Simulator from JSON file simulator = parser.parse_simulator() \end{lstlisting} \hypertarget{generate-and-save-the-model}{% \subsubsection{Generate and save the model}\label{generate-and-save-the-model}} Since the model obtained by the generate\_model function in this simulation is often large, we can utilize the simulator power to save the model for later use by employing the simulator.save\_model method, and later use it using the simulator.load\_model method. \begin{lstlisting}[language=Python] # Generate the simulation model simulator.generate_model() # Time the generation process end_generate_model = time.time() # Save the simulation model simulator.save_model('town') # Save the simulation model simulator.load_model('town') \end{lstlisting} \hypertarget{simulate-the-town}{% \subsubsection{Simulate the town}\label{simulate-the-town}} After the model is generated, we simulate the town in this section. \begin{lstlisting}[language=Python] # Load Simulator Data from JSON file end_time, spread_period, initialized_infected_ids, commands, observers = parser.parse_simulator_data() # Run the simulation simulator.simulate(end_time=end_time, spread_period=spread_period, initialized_infected_ids=initialized_infected_ids, commands=commands, observers=observers, report_statistics=2) \end{lstlisting} \hypertarget{evaluate-the-results}{% \subsubsection{Evaluate the results}\label{evaluate-the-results}} In the end, we present some plots in \Cref{fig:configure_simulation_plots} to illustrate the simulation's results. \begin{lstlisting}[language=Python] observers[0].plot_disease_statistics_during_time(Health_Condition.IS_INFECTED) observers[0].plot_disease_statistics_during_time(Health_Condition.DEAD) observers[0].plot_disease_statistics_during_time(Health_Condition.HAS_BEEN_INFECTED) observers[0].plot_disease_statistics_during_time(Health_Condition.IS_NOT_INFECTED) \end{lstlisting} \begin{figure} \begin{subfigure}{\linewidth} \includegraphics[width=.5\linewidth]{supplementary_materials/Configured_Simulation_files/Configured_Simulation_23_0.png}\hfill \includegraphics[width=.5\linewidth]{supplementary_materials/Configured_Simulation_files/Configured_Simulation_24_0.png} \caption{Statistics of dead and infected people over time} \end{subfigure}\par\medskip \begin{subfigure}{\linewidth} \includegraphics[width=.5\linewidth]{supplementary_materials/Configured_Simulation_files/Configured_Simulation_25_0.png}\hfill \includegraphics[width=.5\linewidth]{supplementary_materials/Configured_Simulation_files/Configured_Simulation_26_0.png} \caption{Statistics of healthy and confirmed cases over time} \end{subfigure}\par\medskip \caption{The results of observer plots} \label{fig:configure_simulation_plots} \end{figure} \section{Manual simulation}\label{manual-simulation}} This example is the best place to understand the simulator's software interface and a comprehensive guide to designing and executing desired simulations with Pyfectious . Please follow each section and carefully read the instructions about customizing the simulation to fit any specific settings and requirements. \hypertarget{import-necessary-libraries}{% \subsection{Import the required libraries}\label{import-necessary-libraries}} The source libraries have to be included in the environment to start a simulation. \begin{lstlisting}[language=Python] import sys, os # All the required lib files are located in the source folder sys.path.insert(1, os.path.join(os.pardir, 'src')) \end{lstlisting} \hypertarget{build-a-test-environment}{% \subsection{Build a test environment}\label{build-a-test-environment}} This section starts from scratch and builds up all the necessary elements of a simulation environment. Moreover, these settings can also be saved in JSON format for later use cases. In the following steps, we demonstrate the process of building a simple simulation configuration. Note that this process is just for understanding the fundamental software concepts; therefore, in reality, there is no need to start from scratch, and one can use the tutorial presented in \Cref{configured-simulation} to run their customized simulation. \hypertarget{family-patterns-dictionary}{% \subsubsection{Family patterns dictionary}\label{family-patterns-dictionary}} The family pattern is the first object required to build the population generator class. Below is the procedure to construct a family pattern dictionary. The family pattern dictionary resembles the general pattern of the families in the simulation. \hypertarget{location}{% \paragraph{Location}\label{location}} Creating a sample location distribution can be as easy as importing the Test module. Alternatively, customized distributions may be developed with the help of modules in distributions.py. \begin{lstlisting}[language=Python] from population_generator import Test location_distribution = Test.get_location_distribution() \end{lstlisting} \hypertarget{age}{% \paragraph{Age}\label{age}} Age distributions can be created using the distribution classes implemented in distributions.py, like the following code snippet. Accordingly, build the age distributions list to gather all the distributions in one place. A more advanced distribution can be developed using the interface provided in the distributions.py. \begin{lstlisting}[language=Python] from distributions import Truncated_Normal_Distribution # Adults age distribution age_distribution_2 = Truncated_Normal_Distribution({"lower_bound": 30, "upper_bound": 50, "mean": 40, "std": 5}) age_distribution_1 = Truncated_Normal_Distribution({"lower_bound": 20, "upper_bound": 40, "mean": 30, "std": 5}) # Children age distribution age_distribution_3 = Truncated_Normal_Distribution({"lower_bound": 5, "upper_bound": 15, "mean": 10, "std": 3}) age_distribution_4 = Truncated_Normal_Distribution({"lower_bound": 0, "upper_bound": 5, "mean": 2.5, "std": 2}) age_distributions = [age_distribution_1, age_distribution_2] \end{lstlisting} \hypertarget{health-condition}{% \paragraph{Health condition}\label{health-condition}} Health condition distribution is more or less determined in the same way as age distribution. However, a person's health condition is modeled by a number between 0 and 1, where one means the person has no history of significant health problems. \begin{lstlisting}[language=Python] # Normal distribution is used here to describe the population's health condition health_condition_distribution_1 = Truncated_Normal_Distribution({"lower_bound": 0, "upper_bound": 1, "mean": 0.5, "std": 0.1}) health_condition_distribution_2 = Truncated_Normal_Distribution({"lower_bound": 0, "upper_bound": 1, "mean": 0.5, "std": 0.1}) # A list of all the distributions must be assembled health_condition_distributions = [health_condition_distribution_1, health_condition_distribution_2] \end{lstlisting} \hypertarget{family-pattern}{% \paragraph{Family pattern}\label{family-pattern}} Now we have almost all the required fields to generate a family pattern. We also need to create a gender list consisting of all the family members, respectively. Two instances of creating a family pattern are mentioned in the following code snippet to demonstrate the object's flexibility in modeling any patterns. \begin{lstlisting}[language=Python] # Size of the family number_of_members = 2 # Create a genders list based on the number of members genders = [0, 1] # Build the family pattern object from population_generator import Family_Pattern family_pattern_1 = Family_Pattern(number_of_members, age_distributions, health_condition_distributions, genders, location_distribution) # Family size is increased here number_of_members = 4 # For a four member family, age and health condition distributions most be of length 4, respectively age_distributions = [age_distribution_1, age_distribution_2, age_distribution_3, age_distribution_4] health_condition_distributions = [health_condition_distribution_1, health_condition_distribution_2, health_condition_distribution_1, health_condition_distribution_2] # Here we have male and female equally genders = [0, 1, 1, 0] # Build the family pattern object family_pattern_2 = Family_Pattern(4, age_distributions, health_condition_distributions, genders, location_distribution) \end{lstlisting} \hypertarget{probability-dictionary}{% \paragraph{Probability dictionary}\label{probability-dictionary}} Last but not least, the job here is to build a family probability dictionary. This structure represents the presence probability of each family pattern in society. Naturally, the accumulative sum of the probabilities must be equal to 1. \begin{lstlisting}[language=Python] # note that the sum of probabilities must be 1 family_pattern_probability_dict = {family_pattern_1: 0.4, family_pattern_2: 0.6} \end{lstlisting} \hypertarget{community-types}{% \subsubsection{Community types}\label{community-types}} A community type object represents the overall structure of a specific community, e.g., a school, in the simulation environment. Each community type consists of a list of sub-community types, for instance, teacher, student, etc., and a sub-community connectivity dictionary, representing the interactions between sub-communities as a graph. Name and location distribution are also other parts of the structure. \hypertarget{sub-community-types}{% \paragraph{Sub-community types}\label{sub-community-types}} Sub-community types represent a smaller community, generally attached to a particular community type role, e.g., student and teachers. To build a sub-community type, the procedure indicated in the following code snippet must be followed. \begin{lstlisting}[language=Python] # Generate an age distribution for this sub-community age_distribution = Truncated_Normal_Distribution({"lower_bound": 5, "upper_bound": 15, "mean": 10, "std": 1}) # Create a time cycle distribution, when people are present in this community from distributions import Uniform_Whole_Week_Time_Cycle_Distribution time_cycle_distribution = Uniform_Whole_Week_Time_Cycle_Distribution({ "start": { "lower_bound": 300, "upper_bound": 301 }, "length": { "lower_bound": 250, "upper_bound": 500 } }) # Generate a community type role object from population_generator import Community_Type_Role student_type = Community_Type_Role(age_distribution, Test.get_gender_distribution(), time_cycle_distribution, True, 1) # Build the number of members distribution from distributions import UniformSet_Distribution number_of_members_distribution = UniformSet_Distribution({ "probability_dict": { 30: 1, } }) # Generate the sub community type using the Role, members and a connectivity distribution from population_generator import Sub_Community_Type sub_community_type_1 = Sub_Community_Type(student_type, "Student", number_of_members_distribution, Test.get_connectivity_distribution(), Test.get_transmission_potential_distribution()) \end{lstlisting} Another sub-community type is generated below. \begin{lstlisting}[language=Python] age_distribution = Truncated_Normal_Distribution({"lower_bound": 20, "upper_bound": 40, "mean": 30, "std": 5}) teacher_type = Community_Type_Role(age_distribution, Test.get_gender_distribution(), time_cycle_distribution, True, 1) number_of_members_distribution = UniformSet_Distribution({ "probability_dict": { 5: 1, } }) sub_community_type_2 = Sub_Community_Type(teacher_type, "Teacher", number_of_members_distribution, Test.get_connectivity_distribution(), Test.get_transmission_potential_distribution()) \end{lstlisting} \hypertarget{build-a-community-type}{% \paragraph{Build a community type}\label{build-a-community-type}} The community type object can now be created by putting together the sub-community types and connectivity distributions. It is noteworthy that connectivity dictionary explains the level of mutual contacts between sub-communities by employing a probabilistic distribution. Here, we use a prepared distribution that has already been implemented in the Test class. The transmission potential explains the possibility of virus transmission between the individuals of a community. For instance, infectious diseases can spread more quickly in a closed environment such as a classroom. \begin{lstlisting}[language=Python] from population_generator import Community_Type # Build the community types list subcommunity_types_list = [sub_community_type_1, sub_community_type_2] # Build the connectivity dictionary for sub-communities sub_community_connectivity_dict = {0: {1:Test.get_connectivity_distribution()}, 1: {0:Test.get_connectivity_distribution()}} # Prepare a transmission potential dictionary transmission_potential_dict = {0: {1:Test.get_transmission_potential_distribution()}, 1: {0:Test.get_transmission_potential_distribution()}} # Build the community type object school_type = Community_Type(sub_community_types=subcommunity_types_list, name="School", number_of_communities=4, sub_community_connectivity_dict=sub_community_connectivity_dict, location_distribution=Test.get_location_distribution(), transmission_potential_dict=transmission_potential_dict) \end{lstlisting} \hypertarget{population-generator}{% \subsubsection{Population generator}\label{population-generator}} Having the family pattern dictionary and community types, a population generator may be created in the following way. This class contains all the necessary information to generate a sample population in the simulation environment. \begin{lstlisting}[language=Python] from population_generator import Population_Generator # Build the Population Generator class population_generator = Population_Generator(population_size=500, family_pattern_probability_dict=family_pattern_probability_dict, community_types=[school_type, school_type]) \end{lstlisting} Moreover, the following command examines how the population is spread among the families and communities. More importantly, The generate\_population method is necessary in order to build an operational set of parameters later used during the simulation procedure. For large populations, it is also possible to run this task using the python multiprocessing library by just setting is\_parallel to True. \begin{lstlisting}[language=Python] people, graph, families, communities = population_generator.generate_population(is_parallel=False) \end{lstlisting} \hypertarget{disease-properties}{% \subsubsection{Disease properties}\label{disease-properties}} The disease properties class represents the major specifications related to the spread of the target infectious disease. Any disease specifications may be applied here, e.g., attributes related to COVID-19, MERS, and SARS behavior. \begin{lstlisting}[language=Python] from distributions import Uniform_Disease_Property_Distribution from time_handle import Time # infection rate infection_rate_distribution = Uniform_Disease_Property_Distribution({ "lower_bound": 0.6, "upper_bound": 0.8 }) # Immunity rate immunity_distribution = Uniform_Disease_Property_Distribution({ "lower_bound": 0.05, "upper_bound": 0.15 }) # Disease period disease_period_distribution = Uniform_Disease_Property_Distribution({ "lower_bound": Time.convert_day_to_minutes(2), "upper_bound": Time.convert_day_to_minutes(5) }) # Incubation period incubation_period_distribution = Uniform_Disease_Property_Distribution({ "lower_bound": Time.convert_day_to_minutes(7), "upper_bound": Time.convert_day_to_minutes(16) }) # Death probability death_probability_distribution = Uniform_Disease_Property_Distribution({ "lower_bound": 0.05, "upper_bound": 0.1 }) from disease_manipulator import Disease_Properties # Creating the disease properties object disease_properties = Disease_Properties(infection_rate_distribution=infection_rate_distribution, immunity_distribution=immunity_distribution, disease_period_distribution=disease_period_distribution, death_probability_distribution=death_probability_distribution, incubation_period_distribution=incubation_period_distribution) \end{lstlisting} \hypertarget{run-the-simulation}{% \subsection{Deploying the simulation}\label{run-the-simulation}} Now we start working with the simulator class. The upcoming sections will illustrate the entire simulator's execution process. \hypertarget{primary-settings}{% \subsubsection{Primary settings}\label{primary-settings}} The simulator starts with the population generator and disease properties objects as base settings. Afterward, the generate\_model function steps in to generate a simulation environment, such as people, families, and communities, as well as preparing the ground for simulating in the following steps. \begin{lstlisting}[language=Python] from time_simulator import Simulator # Instantiate the simulator object using previously prepared population generator and disease properties objects simulator = Simulator(population_generator, disease_properties) # Execute the model generation method simulator.generate_model() \end{lstlisting} \hypertarget{end-time}{% \paragraph{End time}\label{end-time}} The simulation end time is crucial since it determines how long the simulation should keep going. Here we set a 60-day simulation, starting from now. \begin{lstlisting}[language=Python] from datetime import datetime, timedelta from time_handle import Time end_time = Time(delta_time=timedelta(days=60), init_date_time=datetime.now()) \end{lstlisting} \hypertarget{spread-period}{% \paragraph{Spread period}\label{spread-period}} Determining the spread period is crucial since it clarifies the simulation's granularity. To have a detailed simulation, the user must set lower values where the spread sequence is investigated frequently. Otherwise, increasing the virus spread period causes a reduction in computational costs. \begin{lstlisting}[language=Python] spread_period = Time(delta_time=timedelta(hours=1)) \end{lstlisting} \hypertarget{initial-infected-ids}{% \paragraph{Initially infected people}\label{initial-infected-ids}} Any pandemic must start from certain people, i.e., the initially infected subjects. A list of id numbers represents the initially infected people. \begin{lstlisting}[language=Python] import random initial_infected_ids = random.sample(range(500), 10) \end{lstlisting} \hypertarget{observers-list}{% \paragraph{Observers}\label{observers-list}} The observer is the module responsible for saving data into the database. Using the observer, the data during the simulation can be stored and later be used in plots, reasoning, etc. The simulator can handle a list of observers with various trigger conditions. \begin{lstlisting}[language=Python] from observer import Observer from conditions import Time_Period_Condition # Build the observer object observer = Observer(Time_Period_Condition(Time(delta_time=timedelta(hours=5))), True) # Generate the observers list observers_list = [observer] \end{lstlisting} \hypertarget{commands}{% \paragraph{Commands}\label{commands}} The command list is used to create a policy to contract the pandemic. A simple strict command may be to quarantine all the communities. At this point, we leave the list empty to run a simple simulation. \begin{lstlisting}[language=Python] commands_list = [] \end{lstlisting} \hypertarget{run-the-simulation-1}{% \subsubsection{Simulate}\label{run-the-simulation-1}} At this stage, the only remaining step is running the simulation. This might take a while, depending on the population size and the total end time. Other factors, such as the number of observers, are also influential in determining the simulation time. The report statistics can be varied from 0 (default) to 1 and 2 if there is a need of reviewing more details of the simulation at the end. \begin{lstlisting}[language=Python] # Execute the simulation using the simulate method simulator.simulate(end_time=end_time, spread_period=spread_period, initialized_infected_ids=initial_infected_ids, commands=commands_list, observers=observers_list, report_statistics=2) \end{lstlisting} \hypertarget{plot-the-results}{% \subsection{Plot the results}\label{plot-the-results}} Here are some useful plots obtained by utilizing the observer's methods to evaluate and analyze the simulation's results. The data associated with a specific observer may be retrieved using the simulator.database functions. However, the observer object provides some useful plots and automatic data derivation without any need to be directly connected to the simulation database. The plots associated with the following code snippet are presented in \Cref{fig:plots_manual_simulation}. \begin{lstlisting}[language=Python] observer.plot_initial_bar_gender() observer.plot_initial_hist_age() observer.plot_initial_hist_health_condition() from utils import Health_Condition, Infection_Status observer.plot_disease_statistics_during_time(Health_Condition.DEAD) observer.plot_disease_statistics_during_time(Health_Condition.HAS_BEEN_INFECTED) observer.plot_final_hist_age(Health_Condition.HAS_BEEN_INFECTED) observer.plot_disease_statistics_during_time(Health_Condition.IS_INFECTED) \end{lstlisting} \begin{figure} \begin{subfigure}{\linewidth} \includegraphics[width=.5\linewidth]{supplementary_materials/Manual_Simulation_files/Manual_Simulation_45_0.png}\hfill \includegraphics[width=.5\linewidth]{supplementary_materials/Manual_Simulation_files/Manual_Simulation_46_0.png} \caption{Gender and age distribution of the simulator's population} \end{subfigure}\par\medskip \begin{subfigure}{\linewidth} \includegraphics[width=.5\linewidth]{supplementary_materials/Manual_Simulation_files/Manual_Simulation_48_0.png}\hfill \includegraphics[width=.5\linewidth]{supplementary_materials/Manual_Simulation_files/Manual_Simulation_49_0.png} \caption{Statistics of dead and confirmed cases over time} \end{subfigure}\par\medskip \begin{subfigure}{\linewidth} \includegraphics[width=.5\linewidth]{supplementary_materials/Manual_Simulation_files/Manual_Simulation_50_0.png}\hfill \includegraphics[width=.5\linewidth]{supplementary_materials/Manual_Simulation_files/Manual_Simulation_51_0.png} \caption{Statistics of active cases and frequency of confirmed cases at the end of the simulation time} \end{subfigure} \caption{The results of observer plots} \label{fig:plots_manual_simulation} \end{figure} \hypertarget{add-a-condition}{% \subsection{Add a condition}\label{add-a-condition}} A new condition can be designed and developed using the following structure and by inheriting the Condition class. The is\_satisfied function determines whether the condition is satisfied and is\_able\_to\_be\_removed determines whether the condition is useless from now on or not. \begin{lstlisting}[language=Python] from conditions import Condition # Build your own customized condition class More_Than_X_Deaths_Condition(Condition): def __init__(self, x): super().__init__() self.x = x self.satisfied = False def is_satisfied(self, simulator: Simulator, end_time: Time): temp = self.x for person in simulator.people: if not person.is_alive: temp -= 1 if temp <= 0: self.satisfied = True return [simulator.clock] return [] def is_able_to_be_removed(self): return self.satisfied \end{lstlisting} The newly generated condition may be used in both observers and commands. Here is an example of how to use the condition in an observer. \begin{lstlisting}[language=Python] from observer import Observer observer = Observer(More_Than_X_Deaths_Condition(10), True) # Generate the observers' list observers_list = [observer] simulator.simulate(end_time=end_time, spread_period=spread_period, initialized_infected_ids=initial_infected_ids, commands=commands_list, observers=observers_list) \end{lstlisting} \hypertarget{add-a-command}{% \subsection{Add a command}\label{add-a-command}} Similarly, as adding a condition, a developer can also add a command using the Command class. New commands should follow the base class structure and functions in order to work correctly. The action that a particular command is supposed to take can be specified in the take\_action method. \begin{lstlisting}[language=Python] from commands import Command # Build your own customized command class Quarantine_Diseased_People(Command): def __init__(self, condition: Condition): super().__init__(condition) self.condition = condition def take_action(self, simulator: Simulator, end_time: Time): if self.condition.is_satisfied(simulator, end_time): for person in simulator.people: if person.infection_status is Infection_Status.CONTAGIOUS or \ person.infection_status is Infection_Status.INCUBATION: person.quarantine() # This method is necessary due to automation purposes def to_json(self): return dict(name=self.__class__.__name__, condition=self.condition) \end{lstlisting} \hypertarget{save-the-main-objects-as-json-configuration-files}{% \subsection{Save the main objects as JSON configuration files}\label{save-the-main-objects-as-json-configuration-files}} The objects can be saved as JSON files. These files may also be employed later to avoid preparations. \begin{lstlisting}[language=Python] from json_handle import Parser # Build parser object json_parser = Parser() # Save population generator json_parser.build_json(population_generator) json_parser.save_json() # Save disease properties json_parser.build_json(disease_properties) json_parser.save_json() # Save population generator json_parser.build_json(simulator) json_parser.save_json() \end{lstlisting} \section{Sanity checks}\label{sanity-checks}} In this section, we demonstrate the procedure of conducting further experiments in order to evaluate the basic functionality and sanity of the simulator. Prior to engaging with this part, one should take a look at Manual Simulation. \hypertarget{import-the-necessary-libs}{% \subsection{Import the necessary libraries}\label{import-the-necessary-libs}} In the beginning, we import some necessary simulation libraries from the code folder. \begin{lstlisting}[language=Python] import sys, os sys.path.insert(1, os.path.join(os.pardir, 'src')) \end{lstlisting} \hypertarget{run-a-normal-simulation}{% \subsection{Run a normal simulation}\label{run-a-normal-simulation}} This is the most basic form of the simulation, with no commands or, in other words, no applied policies. In the first step, we initialize the parser and load population generator and disease properties configuration files from the individual JSON files. \begin{lstlisting}[language=Python] # Import Parser from json_handle import Parser parser = Parser('test') # Load Population Generator from JSON file population_generator = parser.parse_population_generator() # Load Disease Properties from JSON file disease_properties = parser.parse_disease_properties() \end{lstlisting} Then, simulator settings are parsed and loaded into the simulator. This also includes the last two steps, so there is no need for the previous code snippet, and it is generally used for explanation or debug purposes. \begin{lstlisting}[language=Python] # Load the simulator from JSON file simulator = parser.parse_simulator() simulator.generate_model() \end{lstlisting} Now we load simulator data as well. \begin{lstlisting}[language=Python] # Load simulator's data from JSON file end_time, spread_period, initialized_infected_ids, _, observers = parser.parse_simulator_data() \end{lstlisting} We set the commands to an empty list and run the simulation. \begin{lstlisting}[language=Python] # Run the simulation simulator.simulate(end_time=end_time, spread_period=spread_period, initialized_infected_ids=initialized_infected_ids, commands=[], # No commands needed at this time observers=observers) \end{lstlisting} To observe the simulation results, we plot the curve of the active cases using the observer object. The result appears in \Cref{fig:sanity_plain_quarantine_everyone}. \begin{lstlisting}[language=Python] from utils import Health_Condition observers[0].plot_disease_statistics_during_time(Health_Condition.IS_INFECTED) \end{lstlisting} \hypertarget{simulate-with-a-quarantine-everyone-policy}{% \subsection{Quarantine everyone}\label{simulate-with-a-quarantine-everyone-policy}} In the next step, we add a policy to quarantine all the people after 20 days, a trivial form of quarantine, and see how the results change. You can compare the results from this section and \cref{simulate-with-a-quarantine-everyone-policy} in \Cref{fig:sanity_plain_quarantine_everyone}. \begin{lstlisting}[language=Python] # Import Parser from json_handle import Parser parser = Parser('test') # Load the simulator from JSON file simulator = parser.parse_simulator() simulator.generate_model() # Load simulator's data from JSON file end_time, spread_period, initialized_infected_ids, _, observers = parser.parse_simulator_data() # Build a general quarantine policy from datetime import timedelta from commands import Quarantine_Multiple_People from conditions import Time_Point_Condition commands = [Quarantine_Multiple_People( condition=Time_Point_Condition(Time(timedelta(days=20))), ids=[i for i in range(500)])] # Execute the simulation simulator.simulate(end_time, spread_period, initialized_infected_ids, commands, observers, report_statistics=2) # Plot the results observers[0].plot_disease_statistics_during_time(Health_Condition.IS_INFECTED) \end{lstlisting} \hypertarget{simulate-with-quarantine-diseased-people}{% \subsection{Quarantine infected people}\label{simulate-with-quarantine-diseased-people}} A more logical form of quarantine is to quarantine only the infected people at some point during the simulation, e.g., day 15, and naturally the results, presented in \Cref{fig:sanity_quarantine_infecteds_infectious}, should be the same as \Cref{simulate-with-a-quarantine-everyone-policy} since the people who are not infected do not pose any threats in case they are not quarantined. \begin{lstlisting}[language=Python] # Import Parser from json_handle import Parser parser = Parser('test') # Load the simulator from JSON file simulator = parser.parse_simulator() simulator.generate_model() # Load simulator's data from JSON file end_time, spread_period, initialized_infected_ids, _, observers = parser.parse_simulator_data() # Build a policy from datetime import timedelta from commands import Quarantine_Diseased_People from conditions import Time_Point_Condition commands = [Quarantine_Diseased_People( condition=Time_Point_Condition(Time(timedelta(days=15))))] # Execute the simulation simulator.simulate(end_time, spread_period, initialized_infected_ids, commands, observers, report_statistics=2) # Plot the results from utils import Health_Condition observers[0].plot_disease_statistics_during_time(Health_Condition.IS_INFECTED) \end{lstlisting} \hypertarget{infectious-rate}{% \subsection{Infection rate}\label{infectious-rate}} Here, we set the infection rate to a meager amount and check the test result. After setting the infection rate to another higher value, we compare the two curves in \Cref{fig:sanity_quarantine_infecteds_infectious}. \begin{lstlisting}[language=Python] # Import Parser (default constructor is the 'test' folder) from json_handle import Parser parser = Parser('test') # Load the simulator from JSON file simulator = parser.parse_simulator() # Change the infection rate here (or just change in the respective JSON file and then parse the simulator) from distributions import Uniform_Disease_Property_Distribution simulator.disease_properties.infectious_rate_distribution = \ Uniform_Disease_Property_Distribution(parameters_dict={"upper_bound":0.2, "lower_bound":0.1}) # Generate the simulation model simulator.generate_model() # Load simulator's data from JSON file end_time, spread_period, initialized_infected_ids, _, observers = parser.parse_simulator_data() # No policy is required commands = [] # Execute the simulation simulator.simulate(end_time, spread_period, initialized_infected_ids, commands, observers, report_statistics=2) \end{lstlisting} In the following code snippet, we increase the infection rate by assigning a uniform distribution with much higher lower and upper bounds. \begin{lstlisting}[language=Python] # Load the simulator from JSON file simulator = parser.parse_simulator() # Change the infection rate here (or just change in the respective JSON file and then parse the simulator) from distributions import Uniform_Disease_Property_Distribution simulator.disease_properties.infectious_rate_distribution = \ Uniform_Disease_Property_Distribution(parameters_dict={"upper_bound":0.95, "lower_bound":0.9}) # Generate the simulation model simulator.generate_model() # Load simulator's data from JSON file end_time, spread_period, initialized_infected_ids, _, observers = parser.parse_simulator_data() # No policy is required commands = [] # Execute the simulation simulator.simulate(end_time, spread_period, initialized_infected_ids, commands, observers, report_statistics=2) \end{lstlisting} The results of both lower and higher infection rates are shown in \Cref{fig:sanity_quarantine_infecteds_infectious}. A significant displacement in the peak of the curve is observable that exactly matches our expectations from changing the infection rate. \begin{lstlisting}[language=Python] from utils import Health_Condition data_2 = observers[0].get_disease_statistics_during_time(Health_Condition.IS_INFECTED) from plot_utils import Plot Plot.plot_multiple_lines(data_1[1], [data_1[0], data_2[0]]) \end{lstlisting} \hypertarget{decrease-immunity}{% \subsection{Decrease immunity}\label{decrease-immunity}} In this section, the immunity is decreased, and the results of the simulation are shown in the following figure. With this amount of immunity, almost every person should get infected. The pandemic curve will also not become flat since there is a small generated immunity after catching the infectious disease for the first time. The results of this experiment are observable in \cref{fig:sanity_immunity_quarantine_families}. \begin{lstlisting}[language=Python] # Import Parser from json_handle import Parser parser = Parser('test') # Load the simulator from JSON file simulator = parser.parse_simulator() # Change the infection rate here (or just change in the respective JSON file and then parse the simulator) from distributions import Uniform_Disease_Property_Distribution simulator.disease_properties.immunity_distribution = \ Uniform_Disease_Property_Distribution(parameters_dict={"upper_bound":0.03, "lower_bound":0.02}) # Generate the simulation model simulator.generate_model() # Load simulator's data from JSON file end_time, spread_period, initialized_infected_ids, _, observers = parser.parse_simulator_data() # No policy is required commands = [] # Execute the simulation simulator.simulate(end_time, spread_period, initialized_infected_ids, commands, observers, report_statistics=2) # Plot the results from utils import Health_Condition observers[0].plot_disease_statistics_during_time(Health_Condition.IS_INFECTED) \end{lstlisting} \hypertarget{quarantine-all-the-families}{% \subsection{Quarantine all families}\label{quarantine-all-the-families}} The simulator is capable of enforcing quarantines based on families, in addition to persons and communities. In this part, we impose a full quarantine over all the families and observe the results. This should have the same effect as quarantining all the people. The result of this quarantine is depicted in \Cref{fig:sanity_immunity_quarantine_families}. \begin{lstlisting}[language=Python] # Import Parser from json_handle import Parser parser = Parser('test') # Load the simulator from JSON file simulator = parser.parse_simulator() simulator.generate_model(is_parallel=False) # Load simulator's data from JSON file end_time, spread_period, initialized_infected_ids, _, observers = parser.parse_simulator_data() # Build a policy from datetime import timedelta from commands import Quarantine_Multiple_Families from conditions import Time_Point_Condition commands = [Quarantine_Multiple_Families( condition=Time_Point_Condition(Time(timedelta(days=15))), ids=[i for i in range(len(simulator.families))])] # Execute the simulation simulator.simulate(end_time, spread_period, initialized_infected_ids, commands, observers, report_statistics=2) \end{lstlisting} \begin{figure} \begin{subfigure}{\linewidth} \includegraphics[width=.49\linewidth]{supplementary_materials/Sanity_Check_files/Sanity_Check_12_0.png}\hfill \includegraphics[width=.49\linewidth]{supplementary_materials/Sanity_Check_files/Sanity_Check_15_0.png} \caption{A plain simulation run- without interference- (left) and enforcing quarantine on everyone (right).} \label{fig:sanity_plain_quarantine_everyone} \end{subfigure}\par\medskip \begin{subfigure}{\linewidth} \includegraphics[width=.49\linewidth]{supplementary_materials/Sanity_Check_files/Sanity_Check_19_0.png}\hfill \includegraphics[width=.49\linewidth]{supplementary_materials/Sanity_Check_files/Sanity_Check_25_0.png} \caption{Enforcing quarantine on infected people (left) and effect of the infection rate (right).} \label{fig:sanity_quarantine_infecteds_infectious} \end{subfigure}\par\medskip \begin{subfigure}{\linewidth} \includegraphics[width=.49\linewidth]{supplementary_materials/Sanity_Check_files/Sanity_Check_28_0.png}\hfill \includegraphics[width=.49\linewidth]{supplementary_materials/Sanity_Check_files/Sanity_Check_31_0.png} \caption{Effect of reducing immunity (left) and enforcing quarantine on all families (right).} \label{fig:sanity_immunity_quarantine_families} \end{subfigure} \caption{The results of observer plots} \label{fig:sanity_check_experiments} \end{figure}
\section{Contrastive Taxonomy - User Study and Analysis} \label{appendixA} \subsection{Purpose} \label{ref:methodology} We conducted a study to test our hypothesis that users would ask more local, contrastive \textit{why} questions than global \textit{how}, or \textit{what} questions. Our null hypothesis and alternate hypothesis, $H_0$ and $H_a$ are as follows: \begin{quote}$H_0$: Users ask an equal distribution of \textit{why}, \textit{how}, and \textit{what} questions about planning scenarios, when the model is well known.\end{quote} \begin{quote}$H_a$: Users ask more \textit{why} questions than \textit{how} or \textit{what} questions about planning scenarios, when the model is well known.\end{quote} We also wanted to support our compilation approach by creating a taxonomy of the user questions we procured, called the \textit{Contrastive Taxonomy}. \subsection{Methodology} We designed a study to elicit questions from users about plans. We recruited participants, from a website (\url{https://wwww.prolific.co)} that specialises in sourcing eligible subjects, each of which were compensated \pounds{10} for their time. We selected a sample size of 15 which is a typical number for this type of study~\cite{cha18,kul19}. The participants were from different, non-planning related, backgrounds and professions between the ages of 21 and 39 years old. In the study, participants were presented with three planning scenarios which were described to them in detail. They were first asked to watch a short video~\cite{pla19} showing an animation of a planning problem being performed~\footnote{https://youtu.be/MSCakpJUcpc}. Once the participants were familiar with the content of the animation they were asked to re-watch the video and write down any questions they had, and (if applicable) a reason for why they asked the question. For each question the participants were told to note down the time during the video that caused it to be asked. The participants were asked to do this twice more with two videos of new planning problems. However, this time they were told to only ask questions that were specific to decisions, or actions that were made in the plan. Participants were asked to re-watch each video until they could not produce any new questions. From this data, we performed a content analysis to extract a taxonomy of the types of questions that people answered in our scenarios. We used three different scenarios in the study: (1) a family of five must sail to the other side of a river, with some constraints placed on sailing the boat; (2) a logistics problem where six packages have to be delivered to specific locations using trucks and aeroplanes; and (3) a robot must place different objects into positions on a grid. We chose these domains because they are simple to understand and reason about without much participant training, and are varied in what they model. \begin{table}[t] \centering \begin{tabular}{ l p{13cm} r} \toprule & Question Type& \#\\ \midrule FQ1 & Why is action A not used in the plan, rather than being used? & 17\\ FQ2 & Why is action A used in the plan, rather than not being used? & 75\\ FQ3 & Why is action A used in state S, rather than action B? & 35\\ FQ4 & Why is action A used outside of time window W, rather than only being allowed within W? & 6\\ FQ5 & Why is action A not performed before (after) action B, rather than A being performed after (before) B? & 10\\ FQ6 & Why is action A not used in time window W, rather than being used within W? & 2\\ FQ7 & Why is action A used at time T, rather than at least some time T' after/before T? & 6\\ FQ8 & Non-contrastive & 17\\ \bottomrule \end{tabular} \caption{Frequency of questions categorised by the Contrastive Taxonomy, the types are numbered for ease of reference.} \label{table1} \end{table} \begin{table}[t] \centering \begin{tabular}{lrrrr} \toprule Question & & & \\ Type & Video 1 & Video 2 & Video 3 \\ \midrule What? & 2 & 1 & 3\\ How? & 0 & 3 & 2\\ Why? & 65 & 50 & 42\\ \bottomrule \end{tabular} \caption{Frequency of questions by video categorised by Miller's taxonomy.} \label{table2} \end{table} \subsection{Results} The results of our study are shown in Tables~\ref{table1} and \ref{table2}. Table~\ref{table1} shows the the number of questions in each category in our taxonomy of formal questions (FQ). Table~\ref{table2} shows the number of questions in each category in the taxonomy proposed by~\citet{mil19} and compares the questions asked in Video 1, where users were asked to propose any questions, and the videos 2 and 3, where the questions had to be related to the plan. We categorised the questions into the Contrastive Taxonomy by splitting the question into the fact and the, sometimes implied, contrast case. For example, take the question, posed by a participant about the first planning situation: \begin{quote} ``Why did Son swap with Fisherman?... Fisherman should [have] pick up Daughter'' \end{quote} The fact is that the Son swapped places on the boat with the Fisherman, and the contrast case is that the Fisherman should have picked up the Daughter. If, like in this example, the contrast case was an explicit action which the user expected in place of some other action in the plan, the question was categorised as type FQ3. If the contrast case was implicit or explicitly negating the fact, the question was categorised as either type FQ1 or FQ2, depending on the fact. If the user questioned an ordering between two actions the question was categorised as type FQ5. If the question was in these types FQ1 or FQ2 but referred to a specific time, it was categorised as type FQ4, FQ6 or FQ7. \textit{What} and \textit{how} questions were categorised as type FQ8, as they are not regarded as contrastive questions. We also categorised any question about the video itself, i.e discrepancies in the animation as FQ8. Our proposed compilation techniques do not extend to these types of questions. The questions were categorised into Miller's taxonomy by the interrogative word used in the question. \subsection{Analysis} The results in Table~\ref{table2} show that users want to understand why certain decisions were made by the planning system rather than how the planning system works, or what a specific component of the system's purpose is. There were 157 instances of contrastive \textit{why} questions, of which 151 were contrastive \textit{why} questions in reference to specific decisions made in the plan. There were only 11 \textit{what} and \textit{how} questions which asked for a deeper understanding of the planner behaviour. Of the questions posed by users, 89.9\% were contrastive \textit{why} questions. Performing a chi-square test, $\chi^2(2, 168) = 273.25$, P-value $< 0.00001$, these results are therefore significant at $p < 0.001$. We can therefore reject our null hypothesis, $H_0$, and accept our alternate hypothesis, $H_a$. Table~\ref{table2} supports this further when comparing the results of video 1 with videos 2 and 3. This shows that when there are no constraints on the questions users can ask, or when they are explicitly asked to question the plan, in both cases they want to understand why certain decisions were made in the plan. There were a small number (6) of \textit{why} questions that classified as out of the scope of this paper. These were questions that were not related to the planning system or the plan produced. For example a participant asked about one of the videos, ``Why did the pink square change to green?'' This is not a question about a decision but the inner workings of the animation software used. Another asked the question, ``Why am I still expecting the AI to make a human logical decision?'', which is clearly a complex question outside the scope of this paper. Notice that these questions are still contrastive in nature, just not questions relevant to planning systems and therefore not ones we are concerned with answering. Table~\ref{table1} shows that the most commonly asked questions (type FQ2) are about actions that were performed, rather than absent actions they expected to have been in the plan. However, when users do question why an action they expected did not happen, they are more likely to ask it as an explicit contrastive question with respect to some other action that did happen (type FQ3). Users do not question the times in which actions are performed (types FQ4, FQ6, FQ7), or the ordering of actions (type FQ5) as much as why an action was performed or not. The results show that the majority of user questions are constrastive. The contrast case is more likely to be the negation of the fact (types FQ1, FQ2, FQ4 - 7). However, a significant proportion of the questions specify a specific action as the contrast case which the user expected to have been performed instead of the factual action (type FQ3). This shows that users likely have an idea (mental model) of a plan which they use to question the factual plan. They might question why an action was performed, when it was not part of their ideal plan. Or they might question why an action, that was present in their ideal plan, did not appear in the factual plan. We can provide compilations of 89.8\% of the 168 questions that users asked. \section{Background}\label{sec:back} The primary thrust of this work is in the explanation of automatically generated plans, which can be seen as a special case of explanation of the output of AI programs in general. Even though the area of Explainable AI Planning (XAIP) is relatively young, there has been considerable work in the field in recent years. Chakraborti et al.~\citeyear{cha20} outline the different approaches to XAIP that have emerged in the last couple of years, and contrast them with earlier efforts in the field. They group the approaches for XAIP into two main categories: algorithm-based explanations and model-based explanations. Algorithm-based explanations are typically {\em global} in nature, as they attempt to explain the underlying planning algorithm so that a user can better understand the workings of the planning system. For example, Magnaguagno et al.~\citeyear{mag17} provide an interactive visualisation of the search tree for a given problem. Model-based explanations are algorithm-agnostic methods for generating explanations for the solutions to a planning problem. These can be considered to be global or {\em local} explanations depending on whether the user is interested in the model itself, or in explaining particular decisions resulting from the model for a particular problem. In this work, we focus on model-based local explanation. Within this framework, user questions about a plan can still result from two different sources: 1) differences between the user's domain model and the domain model used by the system, and 2) limitations in the user's (or planner's) reasoning abilities. When the planner and user have different models, the explanation problem becomes one of \textit{model reconciliation} -- identifying the differences between the two models so that the models can be updated to achieve reconciliation and an understanding of the source of the differences in plans (see, for example, work by Chakraborti et al.~\citeyear{cha17} and Sreedharan~\citeyear{sre18}, further discussed in Section~\ref{sec:rel}). In this paper, we present explanation as an iterative and collaborative process. We focus on contrastive questions that are motivated by some implied gap between the models of the world held by the user and by the system. The framework for within which the collaborative process takes place is the four-stage mixed-initiative process illustrated in Figure~\ref{fig:process}. In this figure, (i) the user asks a contrastive question in natural language; (ii) a constraint is derived from the user question (forming the \textit{formal question}); (iii) a hypothetical planning model (HModel) is generated which encapsulates this constraint; (iv) a solution for the HModel is called the HPlan, and it contains the contrast case expected by the user, and that can be compared to the original plan to show the consequence of the user suggestion. \begin{figure}[thb] \centering \includegraphics[width=0.4\columnwidth]{images/3layer.png} \caption{The four-stage iterative process for generating a contrastive explanation from a user question. The hypothetical model is created by compiling the formal question into the planning model (in PDDL 2.1). } \label{fig:process} \end{figure} The user can compare plans and iterate the process by asking further questions, and refining the hypothetical model, or HModel. This allows the user to combine different compilations to create a more constrained HModel, producing more meaningful explanations, until the explanation is satisfactory. The process ends when the user is either satisfied with the explanation provided or with the plan generated for the HModel at some stage in this process. As a user engages with this process, through an interface that supports the construction of appropriate contrastive questions (see Section~\ref{sec:iter}), a collection of HModels can be constructed. The need for explanations typically arises when the solution generated by a planner does not match the users expectations. The user might expect a particular solution, or they might expect that the solution exhibit qualities that the proposed solution does not. These expectations usually arise from a model held by the user (which might not be fully specified) that differs in some respects from the model used by the planner. We say `usually', because it could also be that the user holds an under-specified model and, in seeking an explanation of a plan, fills in details of their model leading to acceptance of the proposed plan. On the other hand, if the differences between the user model and the system model are more significant, the user can add constraints to the system model in order to generate HModels that more closely approximate their own model. We discuss this process more formally in Section~\ref{sec:plans}, but here we observe that it can be seen as a restricted form of model reconciliation that we refer to as {\em model restriction}. Model reconciliation arises when two different models attempt to describe the same phenomenon and yield different responses. In order to align the responses, one or both of the models must change. In general, for planning models, these changes could include a revision of the actions, the structure of the actions (pre- or post-conditions), changes in the collection of objects identified in the state, changes in the properties of those objects, the goal, the constraints on the plan and also the preferences and metric used to evaluate the plan. In the work we present in this paper, we limit the range of these changes. We start with an assumption that the user and system share the same collection of actions, with essentially the same pre- and post-conditions (we will discuss the slight qualification in Section~\ref{sec:plans}), the same collection of objects and the same goal. We also assume that the initial state given to the planner is essentially shared (again, we return to the qualification at a later point). Therefore, we focus on differences that arise from the constraints, preferences and plan metric in each of the models. Smith~\citeyear{smi12} argued that for mission planning, questions about plans often arise because of differences in preferences between the users and the planner. Smith~\citeyear{smi12} also observed that planning and explanation is an iterative process in which the user comes to understand and helps to improve a plan. We have taken inspiration from this idea in creating our framework for explanation as an iterative process described in Section~\ref{sec:iter}. Our framework allows a user to specify a sequence of tightening constraints to be applied to the original model. In this way, the user can {\em restrict} the original system model in an attempt to find a reconciliation between the tightened model and their own. We do not assume that the user maintains a static model throughout the process, so we acknowledge the possibility that the reconciliation might lead to an alignment between a restricted HModel and a modified, or more closely specified, user model. Furthermore, the outcome of the process is simply an explanation generated from a series of plans that satisfies the user in some sense, but that does not imply that the restricted models necessarily include a model that is aligned with the model the user holds. The user might conclude the process persuaded that their own plan is better than any plan the planner produces. Equally, even if a particular HModel leads to a plan that the user accepts, it is not necessarily the case that that HModel is the same as the user's model. We are only concerned with reconciling the models to the extent that the HModel responds satisfactorily to the specific planning problem under consideration. There is no generalisation of the restrictions added to the original model, so it cannot be assumed that the HModel would yield a satisfactory plan for a different initial state, or different goal. \section{Model-Based Compilations} \label{sec:comp} Armed with a formal description of the interactive process of model refinement that underpins the construction of our explanations, we now consider how the system can generate plans for the series of models generated in the process. In particular, given a planning model $\Pi$ and a constraint $\phi$, we aim to construct a plan for $\Pi \times \phi$. The approach we adopt is to {\em compile} the constraint $\phi$ into the model $\Pi$, so that $\Pi \times \phi$ can be presented to a generic planner as another model to be solved. This approach avoids embedding the iterative process inside a planner, instead using a planner as a service inside the process of iterative model refinement. Although the point was not explicitly addressed in Definitions~\ref{def:constraintaddition} and~\ref{def:negprob}, it is not necessarily possible to combine an arbitrary constraint, $\phi$ with a model $\Pi$ to yield a model $\Pi \times \phi$ that is expressible in the language we use to describe our planning models (Definition~\ref{defn:planning-model}). The compilation strategy exploits the case in which $\Pi \times \phi$ {\em can} be expressed in our modelling language and, in this section, we demonstrate how this is achieved for a collection of different forms for $\phi$. In the case where the user wishes to capture some constraint that cannot be captured in this way, it is often possible to incrementally converge on a model restriction that approximates the constraint, by the addition of constraints that can be expressed and that steadily remove parts of the plan space that violate the intended constraint. This process is discussed further in Section~\ref{comp:composition}, and is analogous to the addition of cuts to a linear program in order to find a solution to an integer program. The constraints in this section, for which we present compilations, were chosen in response to the user study presented in Section~\ref{sec:taxonomy} and are examples of real questions for which users sought explanations. The addition of a constraint to a model never increases the collection of feasible solutions, and so might make the search for a solution harder. There are two reasons that this intuition might not match observations. First, let us consider the construction of feasible solutions by an incremental series of choices to variables (such as actions added to the head of a developing plan, as in forward search planning). The addition of constraints will prune the collection of feasible solutions in this space, but it can also prune early partial solutions that were previously feasible, but for which there were no extensions into complete feasible solutions. That is, the constraints can act to prune partial solutions that previously appeared promising, leading to a reduction in search in that part of the space. Secondly, where solutions are constructed by search, the addition of features to the model can lead to choices being explored in a different order, possibly for entirely implementation-dependent reasons (such as reordering of action choices inside an internal data-structure, based on order of grounding). These changes can lead to unpredictable effects on the performance of a planner, possibly leading to a lucky reduction of search or an unlucky increase in search. These effects will be observed in all search-based solvers and different families of constraints might interact with the solution strategy of specific planners in different ways. For example, adding timed-effects to the initial conditions of a problem for {\sc popf}~\cite{popf} can create additional choice branches at every step in the construction of a plan. In Section~\ref{sec:eval} we explore the effects of the compilations on performance for a range of representative examples. \subsection{Explanation Problem} \begin{definition} An \textbf{explanation problem} is a tuple $E = \langle \Pi, \pi, Q\rangle$, in which $\Pi$ is a planning model (Definition~\ref{defn:planning-model}), $\pi$ is the plan generated by the planner, and $Q$ is the specific question posed by the user. \end{definition} We are interested when the user question $Q$ is a \textit{contrastive question} of the form \textit{``Why A rather than B?''}, where A occurred in the plan and B is the hypothetical alternative expected by the user. This question can be captured as a constraint that enforces the \textit{foil}. A foil is normally partial -- i.e. a set of additional constraints on the form of the solution rather than being a complete alternative. This fits with the framing of this entire process as being one of iterative model restriction. As in our user study, we assume that the user knows the model $\Pi$ and the plan $\pi$, so responses such as stating the goal of the problem will not increase their understanding. Based on the outcome of the user study, we provide a formal description for compilations of the questions in the Contrastive Taxonomy (Table~\ref{table0}), reiterated here: \begin{itemize} \item \textbf{FQ1} - Why is action $a$ not used in the plan, rather than being used? (Section~\ref{comp:add}) \item \textbf{FQ2} - Why is action $a$ used in the plan, rather than not being used? (Section~\ref{comp:remove}) \item \textbf{FQ3} - Why is action $a$ used in state $s$, rather than action $b$? (Section~\ref{comp:replace}) \item \textbf{FQ4} - Why is action $a$ not performed before (after) action $b$, rather than $a$ being performed after (before) $b$? (Section~\ref{comp:reschedule}) \item \textbf{FQ5} - Why is action $a$ used outside of time window $w$, rather than only being allowed within $w$? (Section~\ref{comp:tw1}) \item \textbf{FQ6} - Why is action $a$ not used in time window $w$, rather than being used within $w$? (Section~\ref{comp:tw2}) \item \textbf{FQ7} - Why is action $a$ used at time $t$, rather than at least some time $t'$ after/before $t$? (Section~\ref{comp:delay}) \end{itemize} This section formalises the compilations of the questions in the Contrastive Taxonomy to produce an HModel $\Pi' = \Pi\times\phi$, where $\phi$ is a constraint derived from \textit{Q} and $\Pi$ is a PDDL2.1 model~\cite{fox03}. The HModel $\Pi'$ is: $$ \Pi' = \langle \langle Ps', Vs, As', arity' \rangle, \langle Os, I', G', W'\rangle \rangle $$ After the HModel is formed, it is solved to give the HPlan. Any new operators that are used in the compilation to enforce some constraint are trivially renamed to the original operators they represent. For each iteration of compilation the HPlan is validated against the original model $\Pi$. \subsection{Add an Action to the Plan}\label{comp:add} Given a plan $\pi$, a formal question $Q$ is asked of the form: \begin{quote} \textit{Why is the operator $o$ with parameters $\chi$ not used, rather than being used?} \end{quote} For example, given the example plan in Figure~\ref{fig:plan} the user might ask: \begin{quote} ``Why is \textit{(load\_pallet Tom p2 sh6)} not used, rather than being used?'' \end{quote} They might ask this because a goal of the problem is to load and move the pallet \textit{p2} to shelf \textit{sh1}. As the robot \textit{Tom} moves to shelf \textit{sh6} where the pallet \textit{p2} is located early in the plan, and the pallet \textit{p2} is located at \textit{sh6} and the shelves \textit{sh6} and \textit{sh1} are connected, it might make sense to the user for the robot \textit{Tom} to deliver this pallet. To generate the HPlan, a compilation is formed such that the action $a=ground(o,\chi)$ must be applied for the plan to be valid. The compilation introduces a new predicate $has\_done\_a$, which represents which actions have been applied. Using this, the goal is extended to include that the user suggested action has been applied. The HModel $\Pi'$ is: $$ \Pi' = \langle \langle Ps', Vs, As', arity' \rangle, \langle Os, I, G', W\rangle \rangle $$ where \begin{itemize} \item $Ps' = Ps \cup \{has\_done\_a\}$ \item $As' = \{o_a\} \cup As \setminus \{o\}$ \item $arity'(x) = arity(x),\, \forall x\in arity$ \item $arity'(has\_done\_a) = arity'(o_a) = arity(o)$ \item $G' = G \cup \{ground(has\_done\_a,\chi)\}$ \end{itemize} where the new operator $o_a$ extends $o$ with the add effect $has\_done\_a$ with corresponding parameters, i.e. $$ \mathit{Eff}^+_{\dashv}(o_a)=\mathit{Eff}^+_{\dashv}(o) \cup \{has\_done\_a\} $$ For example given the user question above where $a = ground(load\_pallet,\{Tom, p2, sh6\})$, the operator \textit{load\_pallet} from the running example is extended to \textit{load\_pallet\_prime} with the additional add effect \textit{has\_done\_load\_pallet}. The new operator is shown in the PDDL2.1 syntax in Figure~\ref{fig:loadpalletprime}. \begin{figure}[h!] \begin{lstlisting}[xleftmargin=.15\textwidth] (:durative-action load_pallet_prime :parameters (?v - robot ?p - pallet ?shelf - waypoint) :duration(= ?duration 2) :condition (and (over all (robot_at ?v ?shelf)) (at start (pallet_at ?p ?shelf)) (at start (not_holding_pallet ?v))) :effect (and (at start (not (pallet_at ?p ?shelf))) (at start (not (not_holding_pallet ?v))) (at end (pallet_at ?p ?v)) @\textbf{(at end (has\_done\_load\_pallet ?v ?p ?shelf)))}@ ) \end{lstlisting} \caption{The operator \textit{goto\_waypoint\_prime} which extends the original operator \textit{load\_pallet} with the new add effect \textit{has\_done\_load\_pallet}.} \label{fig:loadpalletprime} \end{figure} The goal is then extended to include the proposition: \textit{(has\_done\_load\_pallet Tom p2 sh6)}. The HPlan produced from solving the HModel described is shown in Figure~\ref{fig:addplan}. \begin{figure}[h!] \begin{lstlisting}[xleftmargin=.15\textwidth] 0.000: (goto_waypoint Tom sh5 sh6) [3.000] 0.000: (load_pallet Jerry p1 sh3) [2.000] 2.000: (goto_waypoint Jerry sh3 sh4) [5.000] 3.001: (set_shelf Tom sh6) [1.000] 4.001: (goto_waypoint Tom sh6 sh1) [4.000] 7.001: (goto_waypoint Jerry sh4 sh5) [1.000] 8.001: (set_shelf Tom sh1) [1.000] 9.001: (goto_waypoint Tom sh1 sh6) [4.000] 13.001: (load_pallet Tom p2 sh6) [2.000] 15.001: (goto_waypoint Tom sh6 sh1) [4.000] 19.001: (unload_pallet Tom p2 sh1) [1.500] 19.002: (goto_waypoint Jerry sh5 sh6) [3.000] 22.002: (unload_pallet Jerry p1 sh6) [1.500] \end{lstlisting} \caption{The HPlan containing the user suggested action \textit{load\_pallet Tom p2 sh6} with a duration of 23.502} \label{fig:addplan} \end{figure} \subsubsection{Justified Actions and Expected Plans}\label{comp:keycausal} Usually, a user asks a contrastive question about a plan when they expected a different outcome or some sub-goal to be achieved in a certain way. In the example shown in~\ref{comp:add}, the user expected the robot \textit{Tom} to load the pallet \textit{p2} onto the shelf \textit{sh6}, which their question reflects. It is clear why the user asked this question as it fully describes the goal they wish to achieve and how to achieve it. The constraint derived from this question causes an immediate impact in the plan. The package is delivered using a different robot than previously. However, the objective of some questions are not as clear. For example, if a user questioned ``Why is \textit{(set\_shelf Tom sh4)} not used, rather than being used?'', it is not clear what they intend to achieve with this action. The HPlan produced from the HModel containing the constraint for this question is shown in Figure\ref{fig:unjustified_plan}. The plan starts with some preliminary movement actions that allow the robot \textit{Tom} to set up the required shelf \textit{sh4}. \textit{Tom} then traverses to the shelf \textit{sh6}, the plan then continues the same as the original plan in Figure~\ref{fig:plan}. The action \textit{(set\_shelf Tom sh4)} does not affect the plan and it would still be valid if the action were removed. The reason for this could be due to the plan that utilises the action being more expensive, or it could be due to it not being possible for the action \textit{(set\_shelf Tom sh4)} to achieve anything useful. However, it could also be because the planner could not find a plan where the action is used in such a way that it contributes to the goal. For this reason, a user may not be satisfied with an HPlan where the action is not used in a way that is necessary for achieving a goal, we discuss what this means in more detail in Section~\ref{comp:just}. Although the compilations formalised in this section do not guarantee that any actions a user suggests are necessary for achieving a goal, the rest of this subsection provides a step towards this with the description and formalisation of a compilation. \begin{figure}[h!] \centering \begin{BVerbatim} 0.000: (load_pallet jerry p1 sh3) [2.000] 0.000: (goto_waypoint tom sh5 sh4) [1.000] 1.001: (set_shelf tom sh4) [1.000] 2.001: (goto_waypoint tom sh4 sh5) [1.000] 3.002: (goto_waypoint jerry sh3 sh4) [5.000] 3.002: (goto_waypoint tom sh5 sh6) [3.000] 6.002: (set_shelf tom sh6) [1.000] 7.002: (goto_waypoint tom sh6 sh1) [4.000] 8.003: (goto_waypoint jerry sh4 sh5) [1.000] 11.002: (set_shelf tom sh1) [1.000] 11.003: (goto_waypoint jerry sh5 sh6) [3.000] 12.002: (goto_waypoint tom sh1 sh2) [4.000] 14.003: (unload_pallet jerry p1 sh6) [1.500] 15.504: (load_pallet jerry p2 sh6) [2.000] 17.504: (goto_waypoint jerry sh6 sh1) [4.000] 21.504: (unload_pallet jerry p2 sh1) [1.500] \end{BVerbatim} \caption{ The HPlan with a cost of 23.004 generated to satisfy the constraint derived from the question ``Why is \textit{(set\_shelf Tom sh4)} not used, rather than being used?''.} \label{fig:unjustified_plan} \end{figure} The compilation works by tracking the facts that have been produced through effects of actions that the user suggested action $\tau$ has causally supported. One of these facts then has to be a goal fact. Therefore, there is a causal chain from $\tau$ to a goal and the action $\tau$ is necessary for achieving the goal in any plan produced by a model with this constraint applied. For example this compilation ensures that, in the HPlan $\pi'$, there will be a causal chain, $\mu \subseteq \pi' = \langle \tau, a_1, a_2, \dots, a_n \rangle$ where for the state $s_{n + 1}$ after $a_n$ is finished executing and some $g \in G$ then $s_{n + 1} \models g$, and for all actions $a_i \in \mu$ if $a_i$ was removed then $\pi' \not \models G$, assuming $g$ is not already satisfied in the initial state. To generate an HPlan that adheres to these properties and satisfies the user question ``Why is \textit{a = (set\_shelf Tom sh4)} not used, rather than being used?'', the model is compiled in the following way. A new operator $o_a$ is created which has the same preconditions and effects as $a$, but for each positive effect, has a new effect which adds a copy of the fact, we call this the prime-fact. A new operator is then created for each precondition $p$ for each operator $o$ in the domain. The precondition to this new operator is the same as $o$ with a new precondition $prime_{p}$. The effects are the same as $o$ but for each positive effect the corresponding prime-fact is also made true. These new actions behave the same as the existing actions in the domain, but they propagate the causal chains originating from $a$ through the prime-facts. A final set of operators is added for each goal which can be applied if both a goal and it's corresponding prime-fact are true, and at least one of these actions must appear in the plan for it to be valid. This is a work around used because the majority of PDDL2.1 planners do not accommodate disjunctive goals, however, this can be simplified by changing the goal to $G \wedge (\vee_{i=0}(g_i \wedge prime_{gi}))$. If a goal has already been achieved by another action in the plan that is not part of the causal chain from $a$ then this action can no longer be applied. The causality of the actions is tracked through these prime-facts and for any valid plan there will exist a goal that can have it's origin traced through prime-facts back to the user suggested action $a$. The HModel $\Pi'$ is: $$ \Pi' = \langle \langle Ps', Vs, As', arity' \rangle, \langle Os, I', G', W\rangle \rangle $$ where: \begin{itemize} \item $Ps_{p} = \{prime_{p} , \forall p \in Ps\}$ \item $G_{p} = \{goal\_prime_{p}, \forall p \in Ps$ where $ground(p, \chi) = g \in G$ for some $\chi\}$ \item $Ps' = Ps \cup \{has\_done\_a, can\_do\_a, true, Ps_{p}, G_{p}\}$ \item $As' = As \cup \{o_a\} \cup \{conjunct_{xp}, \forall x \in As :\forall p \in Pre{\vdash \dashv}(x)\} \cup \{check\_conjunct_{g}, \forall g \in G_p$\} \item $arity'(x) = arity(x),\, \forall x\in Ps$ \item $arity'(goal\_prime_{p}) = arity(p),\, \forall p \in Ps$ where $ground(p, \chi) = g \in G$ for some $\chi\}$ \item $arity'(prime_{p}) = arity(p),\, \forall p \in Ps$ \item $arity'(has\_done\_a) = arity'(can\_do\_a) = arity'(o_a) = arity(o)$ \item $arity'(true) = \emptyset$ \item $I' = I \cup \{ground(can\_do\_a, \chi) \cup \{ground(goal\_prime_{p}, \chi'), \forall p \in G_{p}$ where $ground(p, \chi') = g, \forall g \in G\}$ \item $G' = G \cup \{ground(has\_done\_a,\chi)\} \cup true$ \end{itemize} and the actions are defined such that the preconditions and effects are:$$ \begin{array}{r@{}l} Pre_{\vdash}(o_a) = Pre_{\vdash}(o)\ &\cup\ \{can\_do\_a\} \\ \mathit{Eff}^+_{\dashv}(o_a) = \mathit{Eff}^+_{\dashv}(o)\ &\cup\ \{has\_done\_a\} \\ & \cup\ \{prime_{y} \in Ps_{p}, \forall y \in \mathit{Eff}^+_{\vdash \dashv }(o)\}\\ Pre_{\vdash \dashv}(conjunct_{xp}) = Pre_{\vdash \dashv}(x)\ &\cup\ prime_{p}, \forall x \in As :\forall p \in Pre{\vdash \dashv}(x)\\ \mathit{Eff}^{+}_{\vdash \dashv}(conjunct_{xp}) = \mathit{Eff}^{+}_{\vdash \dashv}(x)\ &\cup\ \{prime_{y} \in Ps_{p}, \forall y \in \mathit{Eff}^+_{\vdash \dashv}(x)\},\forall x \in As :\forall p \in Pre{\vdash \dashv}(x)\\ Dur(check\_conjunct_{g}) \, & = \epsilon \, \text{where} \, \epsilon \, \text{is a very small number}, \forall goal\_prime_{g} \in G_{p}\\ Pre_{\vdash}(check\_conjunct_{g}) \, &= prime_{g} \cup goal\_prime_{g}, \forall g\in Ps' \text{where} \, prime_{g} \in Ps_{p} \wedge goal\_prime_{g} \in G_p \\ \mathit{Eff}^{+}_{\vdash \dashv}(check\_conjunct_{g}) \, &= true \\ \mathit{Eff}^{-}_{\dashv}(o) = \mathit{Eff}^{-}_{\dashv} \,&\cup \, \{goal\_prime_{g}, \forall g \in \mathit{Eff}^{+}_{\vdash \dashv}(o)\, \text{where} \, goal\_prime_{g} \in G_p \}, \forall o \in As \end{array} $$ \begin{figure}[h!] \centering \begin{BVerbatim} 0.000: (goto_waypoint jerry sh3 sh2) [8.000] 0.000: (goto_waypoint tom sh5 sh4) [1.000] 1.001: (done-set_shelf tom sh4) [1.000] 8.001: (goto_waypoint jerry sh2 sh1) [4.000] 8.001: (goto_waypoint tom sh4 sh3) [5.000] 12.002: (set_shelf jerry sh1) [1.000] 13.001: (load_pallet tom p1 sh3) [2.000] 13.002: (goto_waypoint jerry sh1 sh6) [4.000] 15.001: (goto_waypoint tom sh3 sh4) [5.000] 17.002: (set_shelf jerry sh6) [1.000] 18.002: (load_pallet jerry p2 sh6) [2.000] 20.001: (unload_pallet-2-conjunct tom p1 sh4) [1.500] 20.002: (goto_waypoint jerry sh6 sh1) [4.000] 21.502: (load_pallet-0-conjunct tom p1 sh4) [2.000] 23.502: (goto_waypoint tom sh4 sh5) [1.000] 24.002: (unload_pallet jerry p2 sh1) [1.500] 24.503: (goto_waypoint tom sh5 sh6) [3.000] 27.503: (unload_pallet-0-conjunct tom p1 sh6) [1.500] 29.003: (check-conjunct-pallet_at p1 sh6 true) [0.100] \end{BVerbatim} \caption{ The HPlan with a cost of 29.003 generated to satisfy the constraint derived from the question ``Why is \textit{(set\_shelf Tom sh4)} not used, rather than being used?'', such that the action is necessary in the plan for achieving a goal. The action names are trivially renamed back to their corresponding actions, and the action (check-conjunct-pallet\_at p1 sh6 true) is removed.} \label{fig:justified_plan} \end{figure} The plan for this is shown in Figure~\ref{fig:justified_plan} where the action \textit{(set\_shelf tom sh4)} is necessary for performing the action \textit{(unload\_pallet tom p1 sh6)} which achieves the goal \textit{(pallet\_at p1 sh6)}. However, this compilation does not guarantee that the action $a$ will be perfectly justified in the plan $\pi$, that is that there is no set of actions $A$ where $a \in A$ and $A \subseteq \pi$, such that if you removed the set of actions $A$ then $\pi \models G$~\cite{fin92}. This means that there are no groups of actions that together are redundant in the plan. This is not the case for the HPlan in Figure~\ref{fig:justified_plan}, if the set of actions \{(done-set\_shelf tom sh4), (unload\_pallet-2-conjunct tom p1 sh4), (load\_pallet-0-conjunct tom p1 sh4)\} is removed, the plan is still valid. To attempt to determine whether there is a plan where $a$ is perfectly justified would likely require an extended search over these redundancy sets. This search would be the repeated process of disallowing an action in the redundancy set to be applied in the plan, re-planning, and generating the new redundancy set. The search would end when a plan is found where the action is used in a perfectly justified way, or all the redundancy sets have been searched over and no plan was found, meaning the action cannot be used in a perfectly justified way. This approach also works if the goal contains primitive numeric expressions in the same way. Any effects that alter the values of PNEs, will duplicate the behaviour with a prime-effect. The goal is checked in the same way as with a simple proposition. For example, if an action $\tau$ decreases the value of a PNE $n$, and there is a goal such that $5 < n < 10$ is true at the end of the plan. Then $\tau$ affects $prime_n$ in the same way as it does $n$ and both $5 < n < 10$ and $5 < prime_n < 10$ must be true at the end of the plan for it to be valid. This approach can be adapted for use in the compilations for all formal questions apart from FQ2 where it would have no use as an action is removed rather than added. \subsection{Remove a Specific Grounded Action}\label{comp:remove} Given a plan $\pi$, a formal question $Q$ is asked of the form: \begin{quote} \textit{Why is the operator $o$ with parameters $\chi$ used, rather than not being used?} \end{quote} For example, given the example plan in Figure~\ref{fig:plan} the user might ask: \begin{quote} ``Why is \textit{(goto\_waypoint Tom sh1 sh2)} used, rather than not being used?'' \end{quote} A user might ask this because \textit{Tom} has already set up all of the shelves that are required. The user might question why \textit{Tom} is doing this extra action. The specifics of the compilation is similar to the compilation in Section~\ref{comp:add}. The HModel is extended to introduce a new predicate \textit{not\_done\_action} which represents actions that have not yet been performed. The operator \textit{o} is extended with the new predicate as an additional delete effect. The initial state and goal are then extended to include the user selected grounding of \textit{not\_done\_action}. Now, when the user selected action is performed it deletes the new goal and so invalidates the plan. This ensures the user suggested action is not performed. For example, given the user question above, an HPlan is generated that does not include the action \textit{(goto\_waypoint Tom sh1 sh2)}, and is shown in Figure~\ref{fig:removeplan}. This shows a plan with a longer duration than the original plan shown in Figure~\ref{fig:plan}. In this HPlan \textit{Tom} has to deliver pallet \textit{p2} because he is occupying shelf \textit{sh1} and cannot vacate it by going to shelf \textit{sh2}. This means \textit{Jerry} cannot pass by him to deliver the pallet more efficiently. \begin{figure}[h!] \begin{lstlisting}[xleftmargin=.15\textwidth] 0.000: (goto_waypoint Tom sh5 sh6) [3.000] 0.000: (load_pallet Jerry p1 sh3) [2.000] 2.000: (goto_waypoint Jerry sh3 sh4) [5.000] 3.001: (set_shelf Tom sh6) [1.000] 4.001: (goto_waypoint Tom sh6 sh1) [4.000] 7.001: (goto_waypoint Jerry sh4 sh5) [1.000] 8.001: (set_shelf Tom sh1) [1.000] 9.001: (goto_waypoint Tom sh1 sh6) [4.000] 13.001: (load_pallet Tom p2 sh6) [2.000] 15.001: (goto_waypoint Tom sh6 sh1) [4.000] 19.001: (unload_pallet Tom p2 sh1) [1.500] 19.002: (goto_waypoint Jerry sh5 sh6) [3.000] 22.002: (unload_pallet Jerry p1 sh6) [1.500] \end{lstlisting} \caption{The HPlan without the action \textit{(goto\_waypoint Tom sh1 sh2)} with a duration of 23.502} \label{fig:removeplan} \end{figure} \subsection{Replacing an Action in a State}\label{comp:replace} Given a plan $\pi$, a formal question $Q$ is asked of the form: \begin{quote} \textit{Why is the operator $o$ with parameters $\chi$ used in state $s$, rather than the operator $n$ with parameters $\chi'$? where $o \neq n$ or $\chi \neq \chi'$ } \end{quote} For example, given the example plan in Figure~\ref{fig:plan} the user might ask: \begin{quote} ``Why is \textit{(set\_shelf Tom sh6)} used, rather than \textit{(load\_pallet Tom p2 sh6)}?'' \end{quote} The user might ask this because a goal of the problem is to deliver the pallet \textit{p2} to the shelf \textit{sh1}. As \textit{Tom} is by the pallet, the user might question why \textit{Tom} does not load the pallet in order to deliver it instead of setting up the shelf \textit{sh6}. To generate the HPlan, a compilation is formed such that the ground action $b = ground(n, \chi')$ appears in the plan in place of the action $a_i = ground(o, \chi)$. Given the example above $b = ground(load\_pallet,\{Tom, p2, sh6\})$, and $a_i = ground(set\_shelf,\{Tom, sh6\})$. Given a plan: $$\pi = \langle a_1,a_2,\ldots,a_n \rangle$$ The ground action $a_i$ at state $s$ is replaced with $b$, which is executed, resulting in state $I'$, which becomes the new initial state in the HModel. A time window is created for each durative action that is still executing in state $s$. These model the end effects of the concurrent actions. A plan is then generated from this new state with these new time windows for the original goal, which gives us the plan: $$\pi' = \langle a'_1,a'_2,\ldots,a'_n \rangle$$ The HPlan is then the initial actions of the original plan $\pi$ concatenated with $b$ and the new plan $\pi'$: $$\langle a_1,a_2,\ldots,a_{i-1}, b, a'_1,a'_2,\ldots,a'_n \rangle$$ \noindent Specifically, the HModel $\Pi'$ is: $$ \Pi' = \langle \langle Ps, Vs, As, arity \rangle, \langle Os, I', G, W \cup C \rangle \rangle $$ where: \begin{itemize} \item $I'$ is the final state obtained by executing\footnote{We use VAL to validate this execution. We use the add and delete effects of each action, at each happening (provided by VAL), up to the replacement action to compute $I'$.} $\langle a_1,a_2,\ldots,a_{i-1}, b \rangle$ from state $I$. \item $C$ is a set of time windows $w_x$, for each durative action $a_j$ that is still executing in the state $I'$. For each such action, $w_x$ specifies that the end effects of that action will become true at the time point at which the action is scheduled to complete. Specifically: $w_x=\langle (Dispatch(a_j) + Dur(a_j)) - (Dispatch(b) + Dur(b)), inf, u \rangle$ where $u = \mathit{Eff}(a_j)_{\dashv}^- \cup \mathit{Eff}(a_j)_{\dashv}^+ \cup \mathit{Eff}(a_j)_{\dashv}^n$. \end{itemize} \noindent In the case in which an action $a_j$ that is executing in state $I'$ has an overall condition that is violated, this is detected when the plan is validated against the original model. As an example, given the user question above, the new initial state $I'$ from the running example is shown in Figure~\ref{fig:replaceinit}. \begin{figure}[h!] \hspace{1cm}\vdots \begin{lstlisting} (:init (not_occupied sh1) (not_occupied sh2) (not_occupied sh5) (connected sh1 sh2) (connected sh2 sh1) (connected sh2 sh3) (connected sh3 sh2) (connected sh3 sh4) (connected sh4 sh3) (connected sh4 sh5) (connected sh5 sh4) (connected sh5 sh6) (connected sh6 sh5) (connected sh6 sh1) (connected sh1 sh6) (pallet_at p1 jerry) (pallet_at p2 tom) (robot_at tom sh6) (at 3 (robot_at Jerry sh4)) (at 3 (not_occupied sh3)) (= (travel_time sh1 sh2) 4) (= (travel_time sh1 sh6) 4) (= (travel_time sh2 sh1) 4) (= (travel_time sh2 sh3) 8) (= (travel_time sh3 sh2) 8) (= (travel_time sh3 sh4) 5) (= (travel_time sh4 sh3) 5) (= (travel_time sh4 sh5) 1) (= (travel_time sh5 sh4) 1) (= (travel_time sh5 sh6) 3) (= (travel_time sh6 sh5) 3) (= (travel_time sh6 sh1) 4)) (:goal (and (pallet_at p1 sh6) (pallet_at p2 sh1)))) \end{lstlisting} \caption{The initial state \textit{I'} which captures the state directly after executing the alternate action \textit{b = \textit{(load\_pallet Tom p2 sh6)}} suggested by the user.} \label{fig:replaceinit} \end{figure} This captures the state $I'$, resulting from executing the actions $a_1, a_2, a_3$, and $b$:\\ \noindent\verb|0.000: (goto_waypoint Tom sh5 sh6) [3.000]|\\ \noindent\verb|0.000: (load_pallet Jerry p1 sh3) [2.000]|\\ \noindent\verb|2.000: (goto_waypoint Jerry sh3 sh4) [5.000]|\\ \noindent\verb|3.001: (load_pallet Tom p2 sh6) [2.000]| In this state \textit{Tom} is at shelf \textit{sh6} and has loaded the pallet \textit{p2}. \textit{Jerry} has loaded the pallet \textit{p1} and is currently moving from shelf \textit{sh3} to \textit{sh4}, This new initial state is then used to plan for the original goals to get the plan $\pi'$, which, along with $b$ and $\pi$, gives the HPlan. However, the problem is unsolvable from this state as a robot cannot set up a shelf whilst it is transporting a pallet, a shelf must be set up to unload a pallet, \textit{Tom} and \textit{Jerry} are both holding pallets, and there are no shelves set up. Therefore, neither \textit{Tom} nor \textit{Jerry} can unload a pallet at any of the shelves and so can not achieve the goal. By applying the user's constraint, and showing there are no more applicable actions, it answers the above question: ``because by doing $b$ rather than $a$, there is no way to complete the goals of the problem''. This compilation keeps the position of the replaced action in the plan, however, it may not be optimal. This is because we are only re-planning after the inserted action has been performed. The first half of the plan, because it was originally planned to support a different set of actions, may now be inefficient, as shown by~\citeauthor{bor18} \shortcite{bor18}. If the user instead wishes to replace the action without necessarily retaining its position in the plan, then the add and remove compilations shown in Sections~\ref{comp:add} and~\ref{comp:remove} can be applied iteratively. This is an example of how the compilations can be combined into something greater than the sum of it's parts, that answers an entirely new question. \subsection{Reordering Actions}\label{comp:reschedule} Given a plan $\pi$, a formal question $Q$ is asked of the form: \begin{quote} \textit{Why is the operator $o$ with parameters $\chi$ used before (after) the operator $n$ with parameters $\chi'$, rather than after (before)? where $o \neq n$ or $\chi \neq \chi'$} \end{quote} For example, given the example plan in Figure~\ref{fig:plan} the user might ask: \begin{quote} ``Why is \textit{(unload\_pallet Jerry p1 sh6)} used before \textit{(unload\_pallet Jerry p2 sh1)}, rather than after?'' \end{quote} A user might wonder what would be the outcome if \textit{Jerry} delivered the pallets the other way around. There are the same amount of shelves to traverse between each of the delivery points so the user might wonder if there is a reason it was done in this order. They can therefore ask the question posed above and see what happens if \textit{Jerry} delivered pallet \textit{p2} before \textit{p1}. The compilation to the HModel is performed in the following way. First, a directed-acyclic-graph (DAG) $\langle N,E \rangle$ is built to represent each ordering between actions suggested by the user. For example the ordering of $Q$ is $a \prec b$ where $a = ground(o, \chi)$ and $b = ground(n, \chi')$. This DAG is then encoded into the model $\Pi$ to create $\Pi'$. For each edge $(a, b)\in E$ two new predicates are added: $ordered_{ab}$ representing that an edge exists between $a$ and $b$ in the DAG, and $traversed_{ab}$ representing that the edge between actions $a$ and $b$ has been traversed. For each node representing a ground action $a\in N$, the action is disallowed using the compilation from Section~\ref{comp:remove}. Also, for each such action a new operator $o_a$ is added to the domain, with the same functionality of the original operator $o$. The arity of the new operator, $arity(o_a)$ is the combined arity of the original operator plus the arity of all of $a$'s sink nodes. Specifically, the HModel $\Pi'$ is: $$ \Pi' = \langle \langle Ps', Vs, As', arity' \rangle, \langle Os, I', G', W\rangle \rangle $$ where: \begin{itemize} \item $Ps' = Ps \cup \{ordered_{ab}\} \cup \{traversed_{ab}\},\,\forall (a,b)\in E$ \item $As' = As \cup \{o_a\},\,\forall a\in N$ \item $arity'(x) = arity(x), \forall x \in arity$ \item $arity'(o_a) = arity(o) + \sum_{(a,b) \in E} arity(b), \forall a \in N$ \item $arity'(ordered_{ab}) = arity(a) + arity(b), \forall (a, b) \in E$ \item $arity'(traversed_{ab}) = arity(b), \forall (a, b) \in E$ \item $I' = I \cup ground(ordered_{ab}, \chi + \chi'),\,\forall (a,b)\in E$, where $\chi$ and $\chi'$ are the parameters of $a$ and $b$, respectively. \end{itemize} In the above, we abuse the $arity$ notation to specify the arity of an action to mean the arity of the operator from which it was ground; e.g. $arity(a) = arity(o)$ where $a=ground(o,\chi)$. Each new operator $o_a$ extends $o$ with the precondition that all incoming edges must have been traversed, i.e. the source node has been performed. The effects are extended to add that its outgoing edges have been traversed. That is: $$ \begin{array}{r@{}l} Pre_{\vdash}(o_a) = Pre_{\vdash}(o)\ &\cup\ \{ordered_{ab} \in Ps', \forall b\}\\ &\cup\ \{traversed_{ca} \in Ps', \forall c\}\\ \mathit{Eff}^+_{\dashv}(o_a) = \mathit{Eff}^+_{\dashv}(o)\ & \cup\ \{traversed_{ab} \in Ps' , \forall b\} \end{array} $$ This ensures that the ordering the user has selected is maintained within the HPlan. As the operator $o_a$ has a combined arity of the original operator plus the arity of all of $a$'s sink nodes, there exists a large set of possible ground actions. However, for all $b\in N$, $ordered_{ab}$ is a precondition of $o_a$; and for each edge $(a,b)\in E$ the ground proposition $ground(ordered_{ab}, \chi + \chi')$ is added to the initial state to represent that the edge exists in the DAG. This significantly prunes the possible, valid, groundings of $o_a$. Given the user question above, two new operators \textit{node\_unload\_pallet\_Jerry\_p2\_sh1} (shown in Figure~\ref{fig:reorderaction}) and \textit{node\_unload\_pallet\_Jerry\_p1\_sh6} will be added to the domain. These extend operator \textit{unload\_pallet} from Figure~\ref{fig:domain} as described above. The HPlan generated is shown in Figure~\ref{fig:reorderplan}. In this case the plan does not contain the action \textit{unload\_pallet Jerry p1 sh6} and instead uses \textit{Tom} to deliver the pallet \textit{p1}. If the user wants both the before and after actions to be performed in the plan they can successively apply the add compilation shown in Section~\ref{comp:add}. \begin{figure}[h!] \begin{small} \begin{lstlisting} (:durative-action node_unload_pallet_Jerry_p2_sh1 :parameters (?v - robot ?p - pallet ?shelf - waypoint ?v0 - robot ?p0 - pallet ?shelf0 - waypoint) :duration (= ?duration 1.5) :condition (and (at start (pallet_at ?p ?v)) (over all (robot_at ?v ?shelf)) (over all (scanned_shelf ?shelf))) (at start (ordered-node-unload_pallet-Jerry-p2-sh1-unload_pallet -Jerry-p1-sh6 ?v ?p ?shelf ?v0 ?p0 ?shelf0)) :effect (and (at end (not_holding_pallet ?v)) (at end (pallet_at ?p ?shelf)) (at start (not (pallet_at ?p ?v))) (at end (traversed-node-unload_pallet-Jerry-p2-sh1-unload_pallet -Jerry-p1-sh6 ?v0 ?p0 ?shelf0))) ) \end{lstlisting} \end{small} \caption{An operator added to the original domain to capture an ordering constraint between actions. The operator extends the original \textit{unload\_pallet} operator.} \label{fig:reorderaction} \end{figure} \begin{figure}[h!] \begin{lstlisting} 0.000: (goto_waypoint jerry sh3 sh2) [8.000] 0.000: (goto_waypoint tom sh5 sh6) [3.000] 3.001: (set_shelf tom sh6) [1.000] 4.001: (goto_waypoint tom sh6 sh5) [3.000] 7.002: (goto_waypoint tom sh5 sh4) [1.000] 8.001: (goto_waypoint jerry sh2 sh1) [4.000] 8.003: (goto_waypoint tom sh4 sh3) [5.000] 12.002: (set_shelf jerry sh1) [1.000] 13.002: (goto_waypoint jerry sh1 sh6) [4.000] 13.003: (load_pallet tom p1 sh3) [2.000] 15.003: (goto_waypoint tom sh3 sh4) [5.000] 17.002: (load_pallet jerry p2 sh6) [2.000] 19.002: (goto_waypoint jerry sh6 sh1) [4.000] 20.004: (goto_waypoint tom sh4 sh5) [1.000] 23.002: (node-unload_pallet-jerry-p2-sh1 jerry p2 sh1 jerry p1 sh6) [1.500] 23.003: (goto_waypoint tom sh5 sh6) [3.000] 26.003: (node-unload_pallet-tom-p1-sh6 tom p1 sh6) [1.500] \end{lstlisting} \caption{The HPlan with the action \textit{(unload\_pallet Jerry p2 sh1)} before \textit{(unload\_pallet Jerry p1 sh6)} with a duration of 27.503} \label{fig:reorderplan} \end{figure} \subsection{Forbid an Action Outside a Time Window}\label{comp:tw1} Given a plan $\pi$, a formal question $Q$ is asked of the form: \begin{quote} \textit{Why is the operator $o$ with parameters $\chi$ used outside of time $lb < t < ub$, rather than only being allowed within this time window?} \end{quote} For example, given the example plan in Figure~\ref{fig:plan} the user might ask: \begin{quote} ``Why is \textit{(unload\_pallet Jerry p2 sh1)} used outside the interval 11 to 13, rather than being restricted to that time window?'' \end{quote} From the HPlan provided as a result of the question asked in Section~\ref{comp:reschedule}, the user might wonder why changing the original order of the actions \textit{a = unload\_pallet Jerry p2 sh6} and \textit{b = unload\_pallet Jerry p2 sh1}, caused \textit{b} to be performed at the time 23.002 rather than at 11.002, which was the time that action \textit{a} was originally performed. The user might then ask the question above about the original plan, to receive an explanation for why the action \textit{b} cannot be performed at the same time as when \textit{a} was performed. To generate the HPlan, the planning model is compiled so that the ground action $a = ground(o, \chi)$ can only be used between times $lb$ and $ub$. To do this, the original operator $o$ is replaced with two operators $o_{a}$ and $o_{\neg a}$, which extend $o$ with extra constraints. Operator $o_{\neg a}$ replaces the original operator $o$ for all other actions $ground(o,\chi')$, where $\chi'\neq \chi$. The action $ground(o_{\neg a}, \chi)$ cannot be used (this is enforced using the compilation for forbidding an action described in Section~\ref{comp:remove}). Operator $o_{a}$ acts as the operator $o$ specifically for the action $a=ground(o, \chi)$, which has an added constraint that it can only be performed between $lb$ and $ub$. \noindent Specifically, the HModel $\Pi'$ is: $$ \Pi' = \langle \langle Ps', Vs, As', arity' \rangle, \langle Os, I', G', W'\rangle \rangle $$ where: \begin{itemize} \item $Ps' = Ps \cup \{can\_do\_a, not\_done\_a\}$ \item $As' = \{o_{a}, o_{\neg a}\} \cup As \setminus \{o\} $ \item $arity'(x) = arity(x), \forall x \in arity$ \item $arity'(can\_do\_a) = arity'(not\_done\_a) = arity'(o_a) = arity'(o_{\neg a}) = arity(o)$ \item $I' = I \cup \{ground(not\_done\_a, \chi)\}$ \item $G' = G \cup \{ground(not\_done\_a, \chi)\}$ \item $W' = W \cup \{\langle lb, ub, ground(can\_do\_a, \chi) \rangle\}$ \end{itemize} where the new operators $o_{\neg a}$ and $o_{a}$ extend $o$ with the delete effect $not\_done\_a$ and the precondition $can\_do\_a$, respectively. i.e: $$ \begin{array}{c} \mathit{Eff}_\vdash^-(o_{\neg a}) = \mathit{Eff}_\vdash^-(o) \cup \{not\_done\_a\}\\ Pre_\vdash(o_{a}) = Pre_\vdash(o) \cup \{can\_do\_a\} \end{array} $$ As the proposition $ground(can\_do\_a,\chi)$ must be true for $ground(o_{a}, \chi)$ to be performed, this ensures that the action $a$ can only be performed within the times $lb$ and $ub$. Other actions from the same operator can still be applied at any time using the new operator $o_{\neg a}$. As in Section~\ref{comp:remove} we make sure the ground action $ground(o_{\neg a}, \chi)$ can never appear in the plan. For example, given the user question above, the operator \textit{unload\_pallet} from Figure~\ref{fig:domain} is extended to $o_{\neg a}$ and $o_{a}$ as shown below in Figure~\ref{fig:tw1action}. \begin{figure}[h!] \begin{lstlisting} (:durative-action unload_pallet_nota :parameters (?v - robot ?p - pallet ?shelf - waypoint) :duration (= ?duration 1.5) :condition (and (at start (pallet_at ?p ?v)) (over all (robot_at ?v ?shelf)) (over all (scanned_shelf ?shelf))) :effect (and (at end (not_holding_pallet ?v)) (at end (pallet_at ?p ?shelf)) (at start (not (pallet_at ?p ?v))) (at start (not (not-done-unload_pallet ?v ?p ?shelf))))) \end{lstlisting} \begin{lstlisting} (:durative-action unload_pallet_a :parameters (?v - robot ?p - pallet ?shelf - waypoint) :duration (= ?duration 1.5) :condition (and (at start (pallet_at ?p ?v)) (over all (robot_at ?v ?shelf)) (over all (scanned_shelf ?shelf)) (over all (applicable-unload_pallet ?v ?p ?shelf))) :effect (and (at end (not_holding_pallet ?v)) (at end (pallet_at ?p ?shelf)) (at start (not (pallet_at ?p ?v))))) \end{lstlisting} \caption{The PDDL2.1 representation of the operators $o_{\neg a}$ and $o_{a}$.} \label{fig:tw1action} \end{figure} The initial state is extended to include the proposition \textit{(not\_done\_unload\_pallet Jerry p2 sh1)} and the time window $\langle 11, 13, (can\_do\_load\_pallet\,Jerry\,p2\,sh1) \rangle$, which enforces that the proposition is true only between the times 11 and 13. The resulting HPlan is shown in Figure~\ref{fig:tw1plan}, in this case the action \textit{(unload\_pallet Jerry p2 sh1)} is no longer present in the plan as \textit{Tom} delivers the pallet \textit{p2} instead. \begin{figure}[h!] \begin{verbatim} 0.000: (goto_waypoint tom sh5 sh6) [3.000] 0.000: (load_pallet jerry p1 sh3) [2.000] 2.000: (goto_waypoint jerry sh3 sh4) [5.000] 3.001: (set_shelf tom sh6) [1.000] 4.001: (goto_waypoint tom sh6 sh1) [4.000] 7.001: (goto_waypoint jerry sh4 sh5) [1.000] 8.001: (set_shelf tom sh1) [1.000] 9.001: (goto_waypoint tom sh1 sh6) [4.000] 13.001: (load_pallet tom p2 sh6) [2.000] 15.001: (goto_waypoint tom sh6 sh1) [4.000] 19.001: (unload_pallet_nota tom p2 sh1) [1.500] 19.002: (goto_waypoint jerry sh5 sh6) [3.000] 22.002: (unload_pallet_nota jerry p1 sh6) [1.500] \end{verbatim} \caption{The HPlan produced from solving the HModel that allows the action \textit{(unload\_pallet Jerry p2 sh1)} to only be performed between the times 11 and 13. \textit{Tom} was, therefore, chosen to deliver the package instead.} \label{fig:tw1plan} \end{figure} \subsection{Add an Action Within a Time Window}\label{comp:tw2} Given a plan $\pi$, a formal question $Q$ is asked of the form: \begin{quote} \textit{Why is the operator $o$ with parameters $\chi$ not used at time $lb < t < ub$, rather than being used in this time window?} \end{quote} For example, given the example plan in Figure~\ref{fig:plan} the user might ask: \begin{quote} ``Why is \textit{(unload\_pallet Jerry p2 sh1)} not used between times 11 and 13, rather than being used in this time window?'' \end{quote} The HPlan given in Section~\ref{comp:tw1} shows the user that there is a better plan which does not have the action in this time window. However, the user may only be satisfied once they have seen a plan where the action is performed in their given time window. To allow this the action may have to appear in other parts of the plan as well. This constraint differs from Section~\ref{comp:tw1} in two ways: first the action is now forced to be applied in the time window, and second the action can be applied at other times in the plan. This constraint is useful in cases such as a robot that has a fuel level. As fuel is depleted when travelling between waypoints, the robot must refuel, possibly more than once. The user might ask ``why does the robot not refuel between the times $x$ and $y$ (as well as the other times it refuels)?''. To generate the HPlan, the planning model is compiled into a form that forces the ground action, $a = ground(o, \chi)$, to be used between times $lb$ and $ub$, but can also appear at any other time. This is done using a combination of the compilation in Section~\ref{comp:add} and a variation of the compilation in Section~\ref{comp:tw1}. The former ensures that new action $ground(o_{a},\chi)$ must appear in the plan, and the latter ensures that the action can only be applied within the time window. The variation of the latter compilation is that the operator $o_{\neg a}$ is not included, and instead the original operator is kept in the domain. This allows the original action $a=ground(o,\chi)$ to be applied at other times in the plan. Given this, the HModel $\Pi'$ is: $$ \Pi' = \langle \langle Ps', Vs, As', arity' \rangle, \langle Os, I, G', W'\rangle \rangle $$ where: \begin{itemize} \item $Ps' = Ps \cup \{can\_do\_a, has\_done\_a\}$ \item $As' = As \cup \{o_{a}\}$ \item $arity'(x) = arity(x), \forall x \in arity$ \item $arity'(can\_do\_a) = arity'(has\_done\_a)\\ = arity'(o_a) = arity(o)$ \item $G' = G \cup \{ground(has\_done\_a, \chi)\}$ \item $W' = W \cup \{\langle lb, ub, ground(can\_do\_a, \chi) \rangle\}$ \end{itemize} \textit{Jerry} cannot deliver the pallet \textit{p2} in the time period required by the user and so the plan is unsolvable. \subsection{Delay/Advance an Action}\label{comp:delay} Given a plan $\pi$, a formal question $Q$ is asked of the form: \begin{quote} \textit{Why is the operator $o$ with parameters $\chi$ used at time $t$, rather than at least some duration $t'$ earlier/later $t$?} \end{quote} For example, given the example plan in Figure~\ref{fig:plan} the user might ask: \begin{quote} ``Why is \textit{set\_shelf Tom sh1} used at time \textit{8.001}, rather than at least \textit{8} minutes later?'' \end{quote} A user would ask this type of question when they expected an action to appear earlier or later in a plan. This could happen for a variety of reasons. In domains with resources that are depleted by specific actions, and are replenished by others, such as fuel for vehicles, these questions may arise often. A user might want an explanation of why a vehicle was refueled earlier or later than was expected. In this case the refuel action can be delayed or advanced to answer this question. A user might ask the question posed above about our running example because they think that \textit{Tom} is rushing to set up the shelf. \textit{Tom} sets up the shelf \textit{sh1} in preparation for the delivery of the pallet \textit{p2} eight minutes into the plan. However, \textit{Jerry} is not ready to deliver the pallet until the very end of the plan. \textit{Tom} might be able to complete other goals before he is required to set up the shelf for the delivery. The reasoning behind the early preparation can be explained by delaying setting up the shelf until it is completely necessary and comparing the HPlan produced with the original solution. To generate the HPlan, the planning model is compiled such that the ground action $a = ground(o, \chi)$ is forced to be used in time window $w$ which is at least $t'$ before/after $t$. This compilation is an example of a combination of two other compilations: adding an action (in Section~\ref{comp:add}) and forbidding the action outside of a time window (in Section~\ref{comp:tw1}). The latter enforces that the action can only be applied within the user specified time window, while the former enforces that the action must be applied. The HModel $\Pi'$ is: $$ \Pi' = \langle \langle Ps', Vs, As', arity' \rangle, \langle Os, I', G', W'\rangle \rangle $$ where: \begin{itemize} \item $Ps' = Ps \cup \{can\_do\_a, not\_done\_a, has\_done\_a\}$ \item $As' = \{o_{a}, o_{\neg a}\} \cup As \setminus \{o\} $ \item $arity'(x) = arity(x), \forall x \in arity$ \item $arity'(can\_do\_a) = arity'(not\_done\_a) =\\ arity'(has\_done\_a) = arity'(o_{a}) =\\ arity'(o_{\neg a}) = arity(o)$ \item $I' = I \cup \{ground(not\_done\_a, \chi)\}$ \item $G' = G \cup\{\begin{array}{ll}ground(not\_done\_a, \chi),\\ground(has\_done\_a, \chi)\end{array}\}$ \item $W' = W \cup \begin{cases} before:\langle 0, tReal, ground(can\_do\_a, \chi) \rangle\\ after:\langle tReal, \textit{inf}, ground(can\_do\_a, \chi) \rangle \end{cases}$ \end{itemize} where \textit{tReal} is \textit{t} ${\displaystyle \pm }$ \textit{t'} and the new operators $o_{a}$ and $o_{\neg a}$ both extend $o$. The latter with the delete effect $not\_done\_a$, while $o_{a}$ extends $o$ with the precondition $can\_do\_a$ and the add effect $has\_done\_a$; i.e.: $$ \begin{array}{c} \mathit{Eff}_{\dashv}^-(o_{\neg a}) = \mathit{Eff}_{\dashv}^-(o) \cup \{not\_done\_a\}\\ Pre_{\leftrightarrow}(o_{a}) = Pre_{\leftrightarrow}(o) \cup \{can\_do\_a\}\\ \mathit{Eff}_{\dashv}^+(o_{a}) = \mathit{Eff}_{\dashv}^+(o) \cup \{has\_done\_a\} \end{array} $$ This ensures that the ground action $a = ground(o_{a}, \chi)$ must be present in the plan between the times $0$ and $tReal$, or $tReal$ and \textit{inf}, depending on the user question, and between those times only. In addition, the user selected action is forced to be performed using the same approach as in Section~\ref{comp:add}. The HPlan produced for the users question is shown in Figure~\ref{fig:tw3plan}. The delayed action \textit{(set\_shelf tom sh1)} is now performed at time 17 which, as the action takes one minute, would allow \textit{Jerry} to unload the pallet . However, \textit{Tom} is blocking \textit{Jerry} from getting to shelf \textit{sh1}. Consequently, \textit{Jerry} has to wait for \textit{Tom} to evacuate the shelf which delays the completion of the delivery by 7.5 minutes. Additionally, it can be seen from the plan that \textit{Tom} does not contribute to the completion of any other goals in the time before setting up shelf \textit{sh1}. \begin{figure}[h!] \begin{lstlisting} 0.000: (goto_waypoint tom sh5 sh6) [3.000] 0.000: (set_shelf_nota jerry sh3) [1.000] 1.000: (load_pallet jerry p1 sh3) [2.000] 3.000: (goto_waypoint jerry sh3 sh4) [5.000] 3.001: (set_shelf_nota tom sh6) [1.000] 4.001: (goto_waypoint tom sh6 sh1) [4.000] 8.001: (goto_waypoint jerry sh4 sh5) [1.000] 9.002: (goto_waypoint jerry sh5 sh6) [3.000] 12.002: (unload_pallet jerry p1 sh6) [1.500] 13.503: (load_pallet jerry p2 sh6) [2.000] 17.000: (set_shelf_a tom sh1) [1.000] 18.000: (goto_waypoint tom sh1 sh2) [4.000] 22.001: (goto_waypoint jerry sh6 sh1) [4.000] 26.001: (unload_pallet jerry p2 sh1) [1.500] \end{lstlisting} \caption{The HPlan with the action \textit{(set\_shelf Tom sh1)} performed at least 8 minutes later than it was originally performed.} \label{fig:tw3plan} \end{figure} \subsection{Composition of Compilations}\label{comp:composition} Each compilation defined in this section can be used to answer one of the formal questions from the contrastive taxonomy that was identified in our user study. However, through the iterative approach described in Definition~\ref{def:negprob} the set of questions that can be answered is not restricted to the formal questions found in the Contrastive Taxonomy. Instead a composition of these compilations can be used to produce more complex constraints that answer a much wider set of questions. More complex questions that are not easy to specify without refinement can be posed through the iterative process of query and feedback. Moreover, humans themselves have trouble understanding a decision from a ``one shot'' justification, they are more likely to comprehend a decision through a conversational process resulting in a more complete explanation~\cite{hil90}. For example, consider the multiple questions asked in sequence $\text{q}_1, \text{q}_2, \ldots, \text{q}_n$ that have constraints $\phi_1, \phi_2, \ldots, \phi_n$. The user could instead have asked a single complex question $\text{q}_x$ that has the corresponding constraint $\phi_x$: $$\Pi \times \phi_x = ((\Pi \times \phi_1) \times \phi_2) \ldots \times \phi_n$$ This compilation $\Pi \times \phi_x$ would have produced the same HPlan as the final HPlan resulting from the iterative process. However, this assumes that the user knows the question $\text{q}_x$ in advance. In practice, each question might have been prompted by the result of the previous iteration, allowing the user to refine their question during the process. This refinement also has the consequence that the user is able to pose questions about artefacts and processes of the plan that are not obviously representable in the model. As an example a user might want to know why the pallet \textit{p1} took too long to be transported from shelf \textit{sh3} to \textit{sh6}. This question refers to the time between two ground actions in the plan, and the vocabulary of the model does not allow a constraint on this time to be expressed. However, through the iterative process it is possible to incrementally converge to a set of constraints that force these two events to happen closer together in time. Moreover, it is possible to follow this process without explicitly and immediately defining the duration that the user considers to be "too long", instead allowing the user to refine their question as their understanding grows. That these compilations can be used to produce more complex constraints that answer a much wider set of questions can be stated more strongly as: for every valid plan $\pi$ for a model $\Pi$, there exists a sequence of constraints, $\phi_1,\ldots, \phi_n$, such that $\pi$ is the only valid plan for $((\Pi\times\phi_1),\ldots\phi_n)$. Trivially, we can achieve any expected HPlan by iteratively applying the replace compilation shown in~\ref{comp:replace}. In practice our user study in Section~\ref{sec:userstudy} showed that by using a variety of questions, the users converged quickly on their desired plans. \subsection{Justified User Suggestions}\label{comp:just} For a planning model $\Pi$ with goals $G$ there can be many valid plans that satisfy $G$, which we call the space of plans for a planning model. Generating the plan that will best satisfy the user at each stage of the negotiation process is not guaranteed. Firstly, temporal planning tasks are intractable and in fact in the general case belongs to the complexity class EXPSPACE-complete~\cite{rin07b} and the introduction of numeric variables makes the problem undecidable~\cite{hel02}. Our approach is limited by these impediments, just as a human might try to explain a decision they have made. Secondly, even should an optimal plan be returned, it might not be the plan that most increases the user's understanding of the problem, or provides the fastest route to concluding a negotiation. However, while it might not be possible to completely specify the metric of user satisfaction in a plan, it is possible to make some assumptions. One reasonable assumption is that the user wants to see their suggestion have an impact in the plan. When a user questions why an action was not used in the plan, a hypothetical plan containing that action would not be satisfactory if its effects are immediately undone, or it does not contribute towards a goal. Fink and Yang~\citeyear{fin92} use ``justified actions'' to refer to actions that are necessary for achieving a goal. That is to say an action $B$ is justified in a plan $\pi$ if there is a sequence of actions in $\pi$ where $a_1, ..., B, ..., a_n \models G$ and if we remove the action $B$ then, $a_1, ..., a_n \not \models G$. Similarly, a valid plan is \textit{perfectly justified} if it does not have any legal proper subplan that also achieves the goal. Our compilations alone do not guarantee that the action suggested by the user is justified in the resultant plan. The resultant plan should show, if possible, the user's suggestion make a purposeful contribution to the satisfying the goals of the problem. In future work we aim to build on the compilations strategy in Section~\ref{comp:keycausal} to develop compilations that ensure that user suggestions are used purposefully within the plan. That is, to enforce that the resultant plan is perfectly justified, or that at least the user suggestion appears in every valid subplan. A second open question is whether the assumption is indeed reasonable. While it might seem clear that the user should be interested in their suggestion contributing towards the goal, it should also be considered that the goal $G$ does not necessarily capture all of the user's preferences and interests in the problem. As an example, the user might be interested in investigating the space of plans to determine if there remains enough flexibility to add additional exploratory actions, or achieve goals that they do not yet know how to concretely specify. \section{Conclusion}\label{sec:conc} In this paper we considered the problem of plan explanation to be an iterative process, in which the user repeatedly asks questions that are contrastive in nature. To motivate our focus on contrastive questions, in Section~\ref{sec:taxonomy} we presented a user study examining the kinds of questions users asked about problems in three small planning domains. This study demonstrated that the vast majority of user questions were indeed contrastive. We categorised these questions into a taxonomy of 7 different types, which served as the focus for the remainder of the paper. Each contrastive question, such as ``{\em why did you do A rather than B?}'' leads to a ``constrained'' or {\em restricted} planning problem -- in this case, one in which ``B'' must be in the plan instead of ``A''. This restricted planning problem must then be solved by the planning system in order to compare and contrast the user's proposed alternative solution (foil) with the original plan generated by the planning system. Through this iterative process, the user is able to explore the space of possible solutions. This may result in the user increasing their understanding of the problem and the solutions being proposed by the planning system, but may also lead to improvement of those solutions, as a result of the constraints imposed by the user's questions. Ultimately, it is up to the user to decide when they are satisfied with the resulting plan. This process increases transparency for the user, and ultimately leads to greater trust and understanding of the planning problem and the possible solutions. \subsection{Contributions} There are several contributions in this paper: \begin{itemize} \item In Section~\ref{sec:taxonomy} we hypothesised that users are more likely to ask contrastive why questions about plans. We supported this hypothesis with a user study, and formalised the results into a contrastive taxonomy of questions. \item In Section~\ref{sec:plans} we formalised the iterative process as being one of {\em model restriction}, where each contrastive question leads to a hypothetical problem characterised by restrictions imposed on the model of the planning problem. \item In Section~\ref{sec:comp} we showed how these restrictions can be compiled into a PDDL2.1 model for the contrastive questions in our taxonomy. \item In Section~\ref{sec:iter} we presented the implementation of this framework as a service - namely as a wrapper around an existing temporal/numeric planning system, with a simple user interface for comparing plans. \item In Section~\ref{sec:eval} we evaluated the computational consequences of model restriction, and solution quality of the plans generated from those restricted models, and efficacy of the explanation framework as a whole. \end{itemize} In Section~\ref{sec:eval_perf} we evaluated the impact of adding constraints on the efficiency of the plan generation process for the constraints imposed by the different types of contrastive questions. The results show that for the majority of problems and questions, the planning time for restricted planning problems is quite similar to that for the original unconstrained problem. As we noted, adding constraints to a planning problem reduces the number of possible solutions and could make it more difficult to find a plan solution. However, the constraints can also rule out significant portions of the plan search space, making it easier for the planner to find a solution. Predicting the performance impact for a particular question and problem is therefore not easy or obvious, but in general, performance does not appear to be a significant issue. The results in Section~\ref{sec:eval_iteration} shows that the number of constraints is of less importance on the planning time than the ultimate constrained problem, whether this be the result of one compilation or of multiple. This demonstrates that the difficulty in answering questions does not necessarily increase with the number of questions asked, and therefore supports our iterative model restriction approach. We also evaluated the impact of constraints on plan quality. For easier problems the compilations had little impact on the quality of plans produced by the planner, but for harder problems, the addition of constraints sometimes resulted in significant improvement in plan quality. This is an important feature of the plan negotiation problem, where a user can impose restrictions that lead to a better plan. This demonstrates that the original plan was not optimal and that the addition of constraints can actually narrow the search space in a way that guides the planner toward better quality solutions. Through a comparative user study, described in Section~\ref{sec:userstudy}, we evaluated the effectiveness of the framework in improving the user's understanding of the proposed plan. The results indicate that the iterative framework and plan comparison helps users to understand plans better. In particular, it helps them to understand why actions are in the plan, why actions are in a particular order, and how changes affect the plan. However, the study also pointed out some of the weaknesses in the current system, namely in the quality of the explanations. User's expected a more in-depth explanation of the differences between plans, rather than just a simple highlighting of the differences. We discuss this further in the next section. \subsection{Future Work} All of the below issues present interesting technical challenges that warrant further investigation. \subsubsection*{Compiling Constraints} Current PDDL languages do not have the ability to express constraints on action inclusion, exclusion, or ordering, and do not allow us to place more complex constraints on \textit{how} something is achieved or on plan structure. For example, the question ``Why did you use action A rather than action B for achieving P?'' requires planning with the HModel where B is required to be in the causal support for achieving P, but A is not in that causal support. This is substantially more difficult than just excluding A from the plan and forcing B into the plan. This has been touched upon in the paper with a first step towards a solution in Section~\ref{comp:keycausal} and a further discussion of the nuance of this issue in Section~\ref{comp:just}. However, we believe for a robust solution, LTL will likely play a key role in defining the semantics of any new language which enables the expression of such constraints. As we discussed in Section~\ref{comp:composition}, there are possible questions that cannot obviously be represented in the vocabulary of the planning model. For example, the user might ask ``why did it take so long to accomplish A?'' Such a constraint requires a richer language that allows one to impose trajectory constraints on the plan itself, e.g. requiring that A be achieved before some time limit. Such trajectory constraints might be expressible in PDDL 3.0, but this issue requires further investigation. These types of questions might be unexplicitly expressible through a series of questions which give the same effect, however this currently requires a user to infer which questions should be asked and in which order to achieve this. In the future we would like to automatically infer these more robust questions from natural language. We believe that both issues highlighted in this section are needed for automatic inference of complex questions, and that a contrastive language that is both representable, expressible, and actionable will be a crucial part of any solution. \subsubsection*{Explanation} Currently, our explanations for contrastive questions consist of comparing two plans side-by-side, highlighting the action differences between them. However, there is clearly room to do much more. We do not take advantage of the causal structure of the plans within our explanations. As we indicated above, in the user study, the users wanted deeper explanations of the differences between plans. Considering the causal structure of the two plans and how they differ appears to be part of the solution. For example, a plausible explanation might be ``because you asked me not to use action A, I had to use another action to achieve P, and action B appeared to be the best choice.'' However, this approach is likely only part of the solution -- abstraction may also play a key role. For example, abstracting away some of the predicates, variables, and actions that are the same in both plans would allow the explanation to focus on the key differences between the two plans. This is related to the problem of explaining unsolvability discussed below. \subsubsection*{Unsolvability} By adding constraints to a planning problem, it's possible that the problem will become unsolvable. Sreedharan et al.~\citeyear{sre19} address the problem of explaining unsolvability by considering relaxations of the planning problem until a solution can be found, and then looking for landmarks of this relaxed problem that cannot be satisfied in less relaxed versions of the problem. The unsatisfiability of these landmarks provides a more succinct description of critical propositions that cannot be satisfied. This approach is appealing, but for temporal/numeric planning problems, it becomes more challenging. This is because the number and character of possible relaxations increases dramatically. For example, in addition to abstracting away certain predicates, one could consider abstracting away some of the numeric variables, or relaxing certain action preconditions, or allowing actions to have arbitrary durations. A more targeted approach would be to consider relaxing the constraints imposed by the user's question until the problem becomes solvable again. The removed constraints could then be analysed to determine how they prevent milestones from being achieved. A satisfying explanation for the question ``Why did you not do B?'', might be something like ``Action B takes too long and makes it impossible for me to achieve (milestone) M''. The advantage of this more targeted approach is that it reduces the number of abstractions that need to be considered -- only the actions involved in the user imposed constraints, and the variables and predicates they reference, need to be considered for abstraction. \section*{Acknowledgements} This work was partially supported by {EPSRC}{} grant {EP/R033722/1} for the project Trust in Human-Machine Partnership (THuMP) and AirForce Office of Scientific Research award number FA9550-18-1-0245. \section{Evaluation}\label{sec:eval} Our evaluation falls into two parts: we evaluate the performance of the compilation of constraints by examining the planning time and plan quality produced for a large sample of problems, and we also present the user study that explores the value of the iterative process of plan explanation. The latter evaluation is based on observed interactions with an implemented system and is, therefore, more qualitative in style than the former evaluation. Nevertheless, both evaluations together serve to support our claims that the approach we have described provides a paradigm that allows users to usefully explore explanations of plans, by asking contrastive questions and being supplied plans in response to the constraints implied by those questions. \subsection{Performance Evaluation}\label{sec:eval_perf} Compilations can increase the difficulty of solving a problem so that it can no longer be solved in a reasonable time. For example, LTL constraints represented as B{\"u}chi-Automata and compiled into PDDL can scale very poorly and would not be appropriate for a real-time iterative dialogue with our system~\cite{ede06}. In order to evaluate the impact of the compilations listed in Section~\ref{sec:comp} we perform two experiments. The first is to evaluate the effect of single compilations on planning time, and the second is to determine the impact of multiple iterative compilations on planning time. Explanation is a form of social interaction and and takes the form of a conversation~\cite{hil90}. If it takes substantially longer to answer the explanatory question a user poses than to generate the original solution, it might be unreasonable to expect a user to want to wait for the explanation (depending on the context). In this case, the explanation process would be impractical in real world settings and that would undermine the value of the paradigm we have created of explanation as an iterative, conversational process. Moreover, it must not get exponentially harder to answer multiple iterations of questions. The time to apply the compilations and generate the HModel is negligible for all the cases we consider so we do not take this into account in our evaluation. We used four temporal domains from the recent ICAPS international planning competitions (IPC)~\cite{lon03} in our experiments. The IPC produces a new set of benchmark domains each year to test the capabilities and progress made by AI planners for different types of problems. We selected domains to be varied in what they modelled and the most interesting in terms of explainability. These are the \textbf{ZenoTravel}, \textbf{Depots} (IPC3), \textbf{Crew Planning} and \textbf{Elevators} (IPC8) domains. In both experiments we used the Crew Planning and Elevators domains, in the first experiment we used the Depots domain and used the ZenoTravel domain in the second. We explain the reason for the difference in the domains in the design of the second experiment in Section~\ref{sec:eval_iteration}. ZenoTravel is a logistics domain which models a scenario in which a number of pilots have to deliver a number of packages by plane. The planes can travel at different speeds which consumes fuel at different rates. The pilots must fly their planes at the correct speeds to minimise the time whilst maintaining the fuel to successfully deliver all of the packages. The Depots domain combines the transportation style problem of Logistics with the well-known Blocks domain. In this domain crates must be stacked in a certain order at their destinations. Trucks are used to move the crates between locations and hoists are used to stack the crates. The Crew Planning domain is designed to plan the itinerary of a crew on the International Space Station over a period of days. The crew have to complete tasks critical to maintenance of the station such as configuring thermals and facilitating the delivery of payloads, whilst also performing the tasks necessary for survival such as eating and sleeping. In the Elevators domain there are multiple elevators, with different speeds, that service portions of different building blocks. Each of the blocks share at least one mutual floor. The goal is to get a set of people to their desired floors using the elevators. \subsubsection{Compilation Impact by Question}\label{sec:eval_comp} \paragraph{Purpose} We first designed an experiment to evaluate the impact each type of compilation in Section~\ref{sec:comp} has on the time taken to find a solution and the quality of the resultant solution. We designed this experiment to show that explanations can be produced in a reasonable time. We also wanted to see what effect compilations have on the quality of the solution. An explanation generated from an inefficient HPlan would not be satisfactory to the user. Although we cannot evaluate the quality of any given solution in the context of it's optimal solution, the large set of results for any problem will allow us to draw conclusions about possible inefficiencies. We also looked to determine whether there were any questions, or question types, for which it is harder to produce HPlans and so took longer to find solutions. \paragraph{Design} For each of the domains (Crew Planning, Depots, and Elevators) we selected four problems of varying complexity provided by the same IPC benchmark. We first used the planner to find the solutions to these as the control. Then, for each question type categorised in the Contrastive Taxonomy, we randomly generated the formal question and generated and solved the HModel, we repeated this ten times. All tests used a Core i7 1.9GHZ machine, and 16GB of memory. We used the POPF~\cite{col10} planner and recorded all solutions found in the time allocated to test the effect compilations have on optimisation and solution quality. However, for the purpose of this experiment it is sufficient to evaluate if there are any obvious inefficiencies in our compilation approach, not to try to find the optimal plans for each constrained problem. We conducted preliminary tests to determine the amount of planning time to allocate to each instance. We found that for each of the problems 3 minutes planning time was sufficient, other than problem 10 for the Depots domain which required 6 minutes. To illustrate the efficiency of our compilations, the experiment required many tests of each type of compilation, so we chose the minimum sufficient planning time. It was not practical to evaluate our approach with questions composed by humans. Therefore we randomly generated the questions used in our experiments. To ensure that the questions made sense, we had to take slightly different approaches to generating each question type. For each formal question other than FQ1 and FQ3, the actions were randomly selected from the original plan found from the appropriate model. We took the extra precaution, with FQ5, to ensure that the order of the selected actions in the original plan was the opposite of the new order enforced by the question. For the formal questions FQ4, FQ6, and FQ7, time windows were also generated. The lower bound was generated using a pseudo-random number generator, constrained to within the original plan time. The upper bound was formed by first generating a number between 1.5 and 4 and then multiplying the number by the duration of the selected action. This produced a spectrum of time windows from those that are very tight to those that are quite relaxed, which mimicked how a user might ask these types of questions. To generate the formal questions FQ1 and FQ3 we had to create questions with actions that were not already present in the original plan. To do this we created a list of the possible grounded actions in the model and then randomly selected one of these grounded actions, that was not present in the original plan, to form the question. For FQ3 we also randomly selected an action from the original plan to replace. We then verified that the randomly selected (replacement) action was applicable in the state directly before the action chosen to be replaced. If the action was not applicable, a new action was generated and the process repeated until an applicable action was found. The rest of the compilation process then continued as normal. The questions generated in this way might not be ones users would ask, being artificially constructed. However, evaluating how users interact with our framework was not the purpose of these experiments (that we consider in Section~\ref{sec:userstudy}), but the broad coverage of generated questions gives a reasonable assessment of the performance of the planner on compiled HModels. \begin{figure} \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=1.0\linewidth]{images/performance_graphs/crewplanning_problem1_time_scatter.png} \caption{Crew Planning Problem 1, Literals 30, \\Planning Time 0} \label{fig:easy_sfig1} \end{subfigure}% \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=1.0\linewidth]{images/performance_graphs/crewplanning_problem2_time_scatter.png} \caption{Crew Planning Problem 2, Literals 38, Planning Time 0} \label{fig:easy_sfig2} \end{subfigure} \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=1.0\linewidth]{images/performance_graphs/depots_problem1_time_scatter.png} \caption{Depots Problem 1, Literals 44, \\Planning Time 0} \label{fig:easy_sfig3} \end{subfigure} \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=1.0\linewidth]{images/performance_graphs/elevators_problem1_time_scatter.png} \caption{Elevators Problem 1, Literals 86, Planning Time 0.1} \label{fig:easy_sfig4} \end{subfigure} \caption{Scatter graph comparing the planning times of each compilation type over the simplest problems in each of the tested domains.} \label{fig:performance_graphs_easy_scatter} \end{figure} \begin{figure} \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=1.0\linewidth]{images/performance_graphs/elevators_problem5_time_scatter.png} \caption{Elevators Problem 5, Literals 138, \\Planning Time 0.38} \label{fig:hard_sfig1} \end{subfigure}% \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=1.0\linewidth]{images/performance_graphs/depots_problem10_time_scatter.png} \caption{Depots Problem 10, Literals 192, Planning Time 245.06} \label{fig:hard_sfig2} \end{subfigure} \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=1.0\linewidth]{images/performance_graphs/depots_problem13_time_scatter.png} \caption{Depots Problem 13, Literals 224, \\Planning Time 0.12} \label{fig:hard_sfig3} \end{subfigure} \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=1.0\linewidth]{images/performance_graphs/crewplanning_problem20_time_scatter.png} \caption{Crew Planning Problem 20, Literals 270, Planning Time 17.45} \label{fig:hard_sfig4} \end{subfigure} \caption{Scatter graph comparing the planning times of each compilation type over the hardest problems in each of the tested domains.} \label{fig:performance_graphs_hard_scatter} \end{figure} \begin{figure} \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=1.0\linewidth]{images/performance_graphs/crewplanning_problem1_time_box.png} \caption{Problem 1, Literals 30, Planning Time 0} \label{fig:sfig1} \end{subfigure}% \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=1.0\linewidth]{images/performance_graphs/crewplanning_problem2_time_box.png} \caption{Problem 2, Literals 38, Planning Time 0} \label{fig:sfig2} \end{subfigure} \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=1.0\linewidth]{images/performance_graphs/crewplanning_problem5_time_box.png} \caption{Problem 5, Literals 62, Planning Time 0} \label{fig:sfig3} \end{subfigure} \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=1.0\linewidth]{images/performance_graphs/crewplanning_problem20_time_box.png} \caption{Problem 20, Literals 270, Planning Time 17.45} \label{fig:sfig4} \end{subfigure} \caption{Box and whisker plots comparing the planning times of each compilation type in the Crew Planning domain over four problems.} \label{fig:performance_graphs_box} \end{figure} \paragraph{Results} A subset of the results of this experiment is shown in Figures~\ref{fig:performance_graphs_easy_scatter},~\ref{fig:performance_graphs_hard_scatter},~\ref{fig:performance_graphs_box},~\ref{fig:performance_graphs_easy_metric_scatter}, and~\ref{fig:performance_graphs_hard_metric_scatter}. The results in these figures are a representative sample of the entire population of results and illustrate the performance characteristics we evaluated with this experiment. The full results of this experiment are available at~\url{https://tinyurl.com/xairesults}. Figures~\ref{fig:performance_graphs_easy_scatter} and~\ref{fig:performance_graphs_hard_scatter} demonstrate that our compilation approach does not significantly impact planning time. These graphs include results from every domain we evaluated as well as multiple problems and show that on average the planning time is not critically affected over multiple domains and problem variants. We show the easiest and hardest domains and problems, to reveal how the compilations effected planning time at the extremes of the range of difficulty of the problems. Figures~\ref{fig:performance_graphs_easy_scatter} and~\ref{fig:performance_graphs_hard_scatter} each contain four scatter graphs. The former containing the results of what we consider to be the easiest problems to solve in our test set, and the latter the most difficult. We classified the degree of difficulty for a problem as its size (number of literals in the problem) and the time taken to find any solution for the problem. However, the difficulty of a problem is only comparable for different problems in the same domain. Some domains are easier to solve than others, regardless of the problem size. Therefore, to keep the results representative we selected the easiest and hardest problems to solve for each domain, and the next easiest and hardest domain-problem pairs from any of the three domains. Each data point on the graphs in Figures~\ref{fig:performance_graphs_easy_scatter} and~\ref{fig:performance_graphs_hard_scatter} corresponds to a compilation, the colour corresponds to compilation type categorised by the Contrastive Taxonomy, the key is displayed on each graph. The horizontal axis of each graph displays an arbitrary count to distinguish between each compilation. The vertical axis measures the difference between the time taken to find a plan for a compiled HModel and the time to find the original plan for the original model, in seconds. This means the zero on the vertical axis represents there being no difference in the time to find solution plans between the compiled model and the original model, a positive value means there was an increase in the time taken to find a solution for the compiled model, and the opposite holds for a negative value. As these plots are used to demonstrate that there is no significant impact on the planning time for constrained problems, we have not shown any results using further optimising search after the discovery of the first solution. As any optimisations will only increase the planning time, it is unfair to compare the planning time of a heavily optimised plan to one with no optimisations. For example, for a model $\Pi$ a planner might find the plan $\pi$ in 10 seconds with a metric of $M(\pi) = 10$ and then then no further plans within it's 3 minutes of allotted time. For a constrained model $\Pi \times \phi = \Pi'$ a planner might then take 9, 10, and 11 seconds to find plans with metrics of 12, 11.5, and 11 respectively, and nothing further in its 3 minutes. How then should the planning times of the two models $\Pi$ and $\Pi'$ be compared? They both have 3 minutes to find solutions, however the quality of the solutions compared to the optimal solution is not known. It might seem sensible to select the two plans with the closest metrics for comparison. However, the quality of the optimal solutions compared to either the original or constrained problems is not known, one of the discovered solutions could be optimal and the other very sub-optimal. To use a comparison that is well-defined, only the results for the first plan found in the graphs is included in Figures~\ref{fig:performance_graphs_easy_scatter},~\ref{fig:performance_graphs_hard_scatter}, and~\ref{fig:performance_graphs_box}. However, the full table of results, including optimisations, can be found at~\url{https://tinyurl.com/xairesults}. The majority of points lie close to the horizontal axis showing that the compiled HModels in general are similar to the original models in terms of planning time. The median average increase in planning times for each of the domain-problem pairs are all below 4 seconds with one negative showing an improvement in planning time. This substantiates our claim that there is an insignificant impact on the planning time to solve constrained problems. On average, a user will have to wait less than 4 seconds longer than the time taken to solve the original problem to see the outcome of their question and receive an explanation. The highest and lowest increase in planning time both occur in the Depots domain problem 10, shown in Figure~\ref{fig:hard_sfig2}. The highest comes from a compilation of the formal question FQ2, removing an action, increasing the planning time by 117.4 seconds. The lowest increase in planning time, and in fact improvement in planning time, comes from a compilation of the formal question FQ3, replacing an action, improving the planning time by 245.02 seconds. The question types FQ6 and FQ7, the compilation of which is shown in Sections~\ref{comp:tw2} and~\ref{comp:delay} respectively, tend to negatively impact the planning time the most, with a median increase of 1.10 and 1.18 seconds. Whereas the compilations for the question types FQ2 and FQ3 have the least effect on the planning time with an average of 0.02 and 0.00 seconds, respectively. We report the median averages to ensure extreme values do not skew the results. The median effect on planning time across all problems ranges from -59.64 to 3.74 seconds. The domain-problem pairs that we consider to be easy have a range of 0.02 to 1.2 seconds, and the domain-problem pairs that we consider to be hard have a range of -59.64 to 0.925 seconds. Although this data suggests that compilations applied to the harder problems have a much higher chance of improving the planning time over the easier problems, actually the difficulty of the original problem does not have a significant effect on the planning time of the corresponding constrained problem. The results of a Mann-Whitney U test show that the sets of planning times from the easy and hard problems are statistically equal with $p < 0.05$. This shows that the impact of compilations on the planning time does not grow with the difficulty of the original problem. Figure~\ref{fig:performance_graphs_box} contains four box-and-whisker plots, comparing the planning times of each compilation type in the Crew Planning domain. Each sub-figure displays the results for each of the problems we tested. This data shows that there is minimal difference between the types of compilations in their impact on the planning time. These graphs show results from each of the problems for the Crew Planning domain, this exemplifies a typical use case of our approach where a user may have a domain for which they have multiple problems, requiring explanations for each. Each box and whisker plot corresponds to a data set of 10 compilations of a specific type and problem. The horizontal axis displays each of the compilation types labelled by their corresponding formal question. Figures~\ref{fig:sfig1} and~\ref{fig:sfig2} do not have formal question FQ2, removing an action, because no plans could be found in the allocated time, we discuss why this is the case later. The vertical axis represents the same as the graphs in Figures~\ref{fig:performance_graphs_easy_scatter} and~\ref{fig:performance_graphs_hard_scatter}. Each box in the plot represents the interquartile range (IQR) of the difference in planning times; that is, the middle 50 percent of planning times for HModels generated from one compilation type. The whiskers represent the largest and smallest difference in the planning times. The results suggest that the impact the compilations have on planning time is quite inconsequential, and that there are not any compilation types that are substantially more difficult. The planning times for HModels generated from each compilation type are consistent across their problems. This can be seen with the overlapping interquartile ranges on most data sets. This shows that there is little variation in planning time between the types of compilations and seems to suggest that the difficulty of the original problems impacts the planning time more significantly than the type of compilation. The interquartile range of the data sets is generally small, showing there to be little variation in the planning time for each compilation type. The IQRs of the data sets are also grouped around the horizontal axis showing that there is not a large increase or decrease in planning time for the majority of the compilations across the problems. A compilation for a question type FQ7 in Figure~\ref{fig:sfig4} gives the greatest increase in planning time of 33.01 seconds. However, this is an extreme value for this data set as can be seen from the IQR of 2~--~3.08. There are a few other significant changes on planning time from compilations. For example, for a question type FQ1 in Figure~\ref{fig:sfig1} there is an increase of 0.08 seconds. This is quite substantial considering that the original planning time was essentially 0 seconds. However, in practice the increase in planning time is negligible. For each of these significant changes in planning time, the IQR of the data set shows that it is an extreme value. The largest IQR is for FQ4 in Figure~\ref{fig:sfig4} of 0.055~--~2.145. This is expected, because problem 20 is the hardest to solve for this domain. The other ranges in this problem are similar and also show little negative impact in the planning time. The data set with the largest interquartile range compared to the other compilations performed in the problem is FQ6, which corresponds to the compilation shown in Section~\ref{comp:tw2}, in Figure~\ref{fig:sfig2} with an IQR of 0.045~--~0.455. This stands out compared to the other results in the plot where the ranges are very small, and the values show close to zero, however, in practice an increase in planning time of 0.045 to 0.455 seconds is still negligible. the results for problem 20, shown in Figure~\ref{fig:sfig4} show that for some compilations there was an improvement in planning time. For FQ4 this seems to be an extreme case where only the lowest planning time was an improvement of 17.09 seconds. Whereas, for compilations of the question type FQ3, the majority improved the planning time. In fact, across all problems the compilations for FQ3 had the least negative impact on planning time. \begin{figure} \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=1.0\linewidth]{images/performance_graphs/crewplanning_problem1_metrics_scatter.png} \caption{Crew Planning Problem 1, Literals 30, Metric 1440} \label{fig:easy_metric_sfig1} \end{subfigure}% \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=1.0\linewidth]{images/performance_graphs/crewplanning_problem2_metrics_scatter.png} \caption{Crew Planning Problem 2, Literals 38, Metric 1440} \label{fig:easy_metric_sfig2} \end{subfigure} \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=1.0\linewidth]{images/performance_graphs/depots_problem1_metrics_scatter.png} \caption{Depots Problem 1, Literals 44, Metric 53.182} \label{fig:easy_metric_sfig3} \end{subfigure} \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=1.0\linewidth]{images/performance_graphs/elevators_problem1_metrics_scatter.png} \caption{Elevators Problem 1, Literals 86, Metric 80.001} \label{fig:easy_metric_sfig4} \end{subfigure} \caption{Scatter graph comparing the metrics of each compilation type over the simplest problems in each of the tested domains.} \label{fig:performance_graphs_easy_metric_scatter} \end{figure} \begin{figure} \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=1.0\linewidth]{images/performance_graphs/elevators_problem5_metrics_scatter.png} \caption{Elevators Problem 5, Literals 138, Metric 90.002} \label{fig:hard_metric_sfig1} \end{subfigure}% \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=1.0\linewidth]{images/performance_graphs/depots_problem10_metrics_scatter.png} \caption{Depots Problem 10, Literals 192, Metric 256.171} \label{fig:hard_metric_sfig2} \end{subfigure} \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=1.0\linewidth]{images/performance_graphs/depots_problem13_metrics_scatter.png} \caption{Depots Problem 13, Literals 224, Metric 91.601} \label{fig:hard_metric_sfig3} \end{subfigure} \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=1.0\linewidth]{images/performance_graphs/crewplanning_problem20_metrics_scatter.png} \caption{Crew Planning Problem 20, Literals 270, Metric 2880.001} \label{fig:hard_metric_sfig4} \end{subfigure} \caption{Scatter graph comparing the metrics of each compilation type over the hardest problems in each of the tested domains.} \label{fig:performance_graphs_hard_metric_scatter} \end{figure} Figures~\ref{fig:performance_graphs_easy_metric_scatter} and~\ref{fig:performance_graphs_hard_metric_scatter} show the impact of the compilations on the solution quality for the easy and hard problems we defined earlier. In each of the three domains used in our experiments, the metric for quality is defined to be the total duration of the plan, keeping in mind that actions can be performed in parallel. The horizontal axis is the same as in Figures~\ref{fig:performance_graphs_easy_scatter} and~\ref{fig:performance_graphs_hard_scatter} whereas the vertical axis measures the difference between the metric for the plan for a compiled HModel and the metric for the original plan for the original model. Zero on the vertical axis represents no difference in metric for the plans from the original and compiled models, a positive value indicates the metric for a compiled model was higher, and vice versa for a negative value. As opposed to the results comparing the impact of the compilations on planning time, these results do contain the most optimised plan. This is because each problem had the same amount of time within which to find a solution, including the original problem. Although the ultimate planning time for two problems may have differed, they both had the same opportunity to improve. Therefore, we consider the quality of two plans found in the same allotted time comparable. Nonetheless, as we observed earlier, the constraint added in response to a question could increase the metric for the solution significantly, but still be optimal under the new constraint. However, another constraint added to the same problem could marginally increase the metric, but be sub-optimal. From the spread of the values in the results, potentially inefficient solutions are recognisable. Data points that lie in the same metric range are likely caused by constraints that limit the search space of the problem, causing better quality solutions to be pruned away. Whereas lone data points such as for FQ1 in Figure~\ref{fig:easy_metric_sfig3} may indicate inefficient solutions. The results show that the majority of the compilations do not impact the metric significantly. Six of the seven compilation types have a median average increase in metric of less than 8.5, whilst the seventh has an average increase of 21.502. A compilation of the question type FQ3 for problem 20 of the Crew Planning domain had the largest impact on the metric, with an increase of 2541, shown in Figure~\ref{fig:hard_metric_sfig4}. A compilation of the question type FQ3 also lead to the biggest decrease in metric, an improvement of 84.83 to the original solution of problem 10 of the Depots domain, shown in~\ref{fig:hard_metric_sfig2}. The compilation for FQ3 on average lead to the largest increase in the metric, whereas the compilation for FQ2 had the lowest. The compilations applied to the easier problems had no improvements on the metric. This could be due to the solutions to the original problems being optimal. The compilations when applied to the easier problems had a worse effect on the metric than the harder problems, with a median increase of 3.681 compared to 2.002. \begin{table}[t] \centering \begin{tabular}{| *{13}{c|} } \hline \multirow{2}{*}{} & \multicolumn{4}{c|}{Crew Planning} & \multicolumn{4}{c|}{Depots} & \multicolumn{4}{c|}{Elevators} \\ \cline{2-13} & 1 & 2 & 5 & 20 & 1 & 3 & 10 & 13 & 1 & 2 & 3 & 5 \\ \hline FQ1 & 0 & 0 & 0 & 0 & 0 & 1 & 4 & 0 & 0 & 0 & 0 & 0 \\ \hline FQ2 & 10 & 10 & 3 & 0 & 3 & 2 & 2 & 0 & 0 & 0 & 0 & 0 \\ \hline FQ3 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ \hline FQ4 & 0 & 1 & 0 & 0 & 0 & 4 & 8 & 2 & 0 & 2 & 1 & 0 \\ \hline FQ5 & 2 & 2 & 1 & 0 & 2 & 0 & 2 & 0 & 0 & 0 & 0 & 0 \\ \hline FQ6 & 0 & 0 & 0 & 1 & 0 & 2 & 8 & 0 & 0 & 2 & 0 & 0 \\ \hline FQ7 & 1 & 0 & 0 & 0 & 0 & 0 & 5 & 0 & 0 & 4 & 0 & 1 \\ \hline \end{tabular} \caption{Table showing the number of problems for which a solution could not be found grouped by question type. The table is divided into the domain type and then sub-divided by the problem number.} \label{tab:compilation_fails} \end{table} Although any constrained problems that were provably unsolvable were discounted and repeated, we did not repeat the tests for problems where the planner failed to find a solution. However, because there was no data for these problems the results were not displayed in the graphs. Table~\ref{tab:compilation_fails} displays the number of problems for which a solution could not be found within the allotted planning time. Overall, 86 of the 840 constrained problems failed to be solved within the required time. 29 of the 86 were derived from compilations applied to problem 10 for the Depots domain. This problem took the longest time to solve at 245.06 seconds, this being closer to the maximum planning time could be the reason for the failures in finding solutions. However as stated above there were many compilations that improved the planning time for this problem, so it was possible to solve (efficiently) with the correct constraints. 30 of the 120 HModels produced to answer questions of the type FQ2 were not solvable within the allotted time. This question is unlike the others as the constraint it produces enforces that an action cannot be present in a solution, rather than forcing it to. Therefore, the number of these questions that can be asked about a plan is limited by the number of actions that appear in the plan. The limited choice on questions may have impacted the ability to find a solution, for example the plan for problem 1 for the Crew Planning domain had only 12 actions. If any of the actions were landmarks or crucial for achieving a goal in the plan, then removing these actions would have a large consequence the resultant solution, potentially even making the problem unsolvable. Although none of the constrained problems were found to be provably unsolvable, removing an action from the larger problems with larger plans had less of an impact. The process for proving if a problem is unsolvable is difficult, therefore it is infeasible to definitively determine if these problems are provably unsolvable or not. \paragraph{Analysis} Many of the compilations when applied to the harder problems lead to better solution plans than the originals. This is an important feature of the plan negotiation problem, where a user can suggest a counterfactual that leads to a better plan. This observation is very important: it demonstrates that the original plan is not optimal and that the addition of constraints in these cases actually narrows the search space in a way that reduces the work required to find a good quality plan in the remaining space. It is perhaps surprising that automatically generated questions that do not target observed weaknesses in an original solution should so often lead to improved plans. These results highlight the difficulty in finding optimal plans, the necessity to be able question unconvincing plans, and the effectiveness of our compilation approach in finding suspected improvements in plans. The spread of results on metrics is noticeably larger than for the results on planning time. We believe that this is because the performance of the planner in finding a first solution to a problem is most significantly affected by the domain and the size of the problem being solved, neither of which is significantly altered by the compilation of constraints. In contrast, the quality of the best plan that can be found in a given time can be very much affected by the constraints in the problem: high quality solutions can be excluded by the addition of constraints, and poor quality solution branches can be pruned by the addition of constraints. This was discussed in further detail in Section~\ref{sec:comp}, we see evidence for both patterns of behaviour in these results, which substantiates the discussion. The compilations applied to problem 10 for the Depots domain, the results of which are shown in Figure~\ref{fig:hard_sfig2}, produced unusual results. The planning times are considerably more varied than the results found for any other domain-problem pairs. The compilations also improved the planning time more than any other domain-problem pair. A possible reason for this is due to the planner having difficulties finding a solution to the original problem because of failing to select the choice branch leading to a simpler solution. For example in the search space there could be a more complex path which which the planner is biased to go towards through a misleading heuristic. The constrained HModels produced for this problem might not have this issue. The heuristic for the new model could more accurately lead the search to a goal, or the complex parts of the search tree could be pruned away in the new model entirely. The compilation for the formal question FQ3, shown in Section~\ref{comp:replace}, had the lowest impact on the planning time out of any of the question types. This is likely due to the nature of the question requiring a part of the plan be fixed. Therefore unlike the other compilations, the compiled problem is smaller than the original. Although this does not guarantee that the problem will always be easier to solve, as the specifics of the replacement performed by the compilation could have a substantial effect on the difficulty of the constrained problem. \subsubsection{Performance of Iterated Compilations}\label{sec:eval_iteration} We now present experiments exploring the effects of iterating multiple compilations of constraints. The iterated model restrictions that underpin the interaction we describe in Section~\ref{subsec:problem} depends on the planner meeting the demands of planning for models in which multiple constraints have been compiled (using the approach described in Section~\ref{sec:comp}). As we have already observed, the addition of constraints to a model can, in general, be expected to make the problem harder to solve. A well-known phenomenon affecting combinatorial optimisation problems is the {\em phase transition}~\cite{phasetrans}: members of a family of combinatorial problem include instances that are very easy to solve and other instances that are so over-constrained that it is trivial to determine that they are unsolvable. As constraints are added to the former, or removed from the latter, instances are created that are progressively more difficult to solve or more difficult to show unsolvable, respectively. Between these two advancing problem sets lies a transition from solvable to unsolvable and the problems at this boundary are typically the most difficult to tackle (which ever way the resolution lies). Thus, as we iteratively add constraints to a problem, we are pushing towards the phase transition where the problems are likely to become harder to solve. In these experiments we seek to determine the extent to which that expectation affects the performance in practice. \paragraph{Purpose} The second experiment was designed to evaluate the competence of the compilations when used within the iterative approach to explanations. For a user to engage in a conversational process with the explanation system they must receive efficient responses to their questions. As shown in the first experiment above, each type of compilation generally scales well with the complexity of the original problem. However, the results of the first experiment do not give any insight into how the compilations interact or interfere with one another and whether it is reasonable to expect a planner to produce solutions for more precisely constrained models. Therefore, a second experiment was designed to evaluate the impact of iterative compilations on the planning time and the quality of solutions. \paragraph{Design} In this experiment we used the same domains as the first experiment but instead of the Depots domain the ZenoTravel domain was selected from IPC-3. This is because there was not enough feasibly solvable problems provided by the benchmarks for the Depots domain for the breadth of this experiment. We chose the ZenoTravel domain because it belongs to the same set of benchmarks as the Depots domain and there are clear justifications for the need of explanations in the domain. For each domain we selected ten problems of varying complexity provided by the IPC benchmarks. We selected problems with the same range of complexities across each of the domains. For the Crew Planning domain this was problems 1 to 10, for Elevators 1 to 9 and 14, and problems 3 to 12 were selected for the ZenoTravel domain. We did not select problems 1 or 2 in the ZenoTravel domain because they were too easy to solve, and we did not select problems 10 to 13 in the Elevators domain because they could not be solved within the designated time. We first solved each of these domain-problem pairs to get the original plans that are used as the control and to generate the first set of questions. We then selected a question type from the Contrastive Taxonomy at random, and generated an appropriate question. We then compiled this question into the original model to generate the HModel and used a planner to find the solution HPlan. We repeated this step for a total of twelve times, but each time generated a question from the last HPlan and compiled the question into the last HModel. The results from the user study in Section~\ref{sec:userstudy} suggest that users only ask five questions on average, however for the sake of robustness we simulated twelve for each problem. We generated questions using the same approach as the first experiment and disregarded questions that lead to provably unsolvable models. All tests used a Core i7 1.9GHZ machine, limited to five minutes and 16GB of memory. We increased the planning time from the first experiment by two minutes to offer a larger window through which to view any growth trends in the planning time for models with iterated constraints. We used the POPF~\cite{popf} planner and recorded all solutions found in the time allocated to test the effect compilations have on solution quality with optimisation. The compilation for the formal question FQ3, was not used in this experiment. This is because, by the nature of the question, the part of the plan up until the action that is being replaced is fixed. Unlike any other compilation, for all subsequent questions, the compilation is applied to an HModel that has a partially solved problem expressed as its initial state. Therefore, the FQ3 compilation is the only one that reduces the size of the problem to be solved, having a distorting effect on the impact of other compilations. \begin{table}[t] \centering \begin{tabular}{lrrrr} \toprule Problem & & & \\ Number & Crew Planning & Elevators & ZenoTravel \\ \midrule 1, 1, 3 & 12 & 12 & 7\\ 2, 2, 4 & 8 & 12 & 12\\ 3, 3, 5 & 9 & 12 & 12\\ 4, 4, 6 & 12 & 4 & 12\\ 5, 5, 7 & 12 & 12 & 12\\ 6, 6, 8 & 12 & 9 & 12\\ 7, 7, 9 & 12 & 12 & 10\\ 8, 8, 10 & 12 & 12 & 9\\ 9, 9, 11 & 12 & 12 & 6\\ 10, 14, 12 & 12 & 2 & 4\\ \bottomrule \end{tabular} \caption{Table showing the largest number of cumulative compilations applied to each domain-problem pair that was still solvable within the five minutes of allocated planning time. The Problem Number column denotes the problem for each domain in order, for example the bottom row shows the results from problem 10 for the Crew Planning domain, problem 14 for the Elevators domain, and problem 12 for the ZenoTravel domain.} \label{tab:iterations_success} \end{table} \begin{figure} \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=1.0\linewidth]{images/performance_graphs/crewplanning_second_test_all_time.png} \caption{Crew Planning Domain Problems 1 - 10} \label{fig:second_test_time_sfig1} \end{subfigure}% \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=1.0\linewidth]{images/performance_graphs/elevators_second_test_all_time.png} \caption{Elevators Domain Problems 1 - 9, 14} \label{fig:second_test_time_sfig2} \end{subfigure} \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=1.0\linewidth]{images/performance_graphs/zenotravel_second_test_all_time.png} \caption{ZenoTravel Domain Problems 3 - 9, 10 - 12} \label{fig:second_test_time_sfig3} \end{subfigure} \caption{Line chart displaying the change in planning time over multiple iterations of compilations applied to 10 problems for 3 planning domains.} \label{fig:performance_graphs_second_test_time} \end{figure} \begin{figure} \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=1.0\linewidth]{images/performance_graphs/crewplanning_second_test_all_metric.png} \caption{Crew Planning Domain Problems 1 - 10} \label{fig:second_test_metric_sfig1} \end{subfigure}% \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=1.0\linewidth]{images/performance_graphs/elevators_second_test_all_metric.png} \caption{Elevators Domain Problems 1 - 9, 14} \label{fig:second_test_metric_sfig2} \end{subfigure} \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=1.0\linewidth]{images/performance_graphs/zenotravel_second_test_all_metric.png} \caption{ZenoTravel Domain Problems 3 - 9, 10 - 12} \label{fig:second_test_metric_sfig3} \end{subfigure} \caption{Line chart displaying the change in planning quality (metric) over multiple iterations of compilations applied to 10 problems for 3 planning domains.} \label{fig:performance_graphs_second_test_metric} \end{figure} \paragraph{Results} The results of this experiment are shown in Table~\ref{tab:iterations_success} and Figures~\ref{fig:performance_graphs_second_test_time} and~\ref{fig:performance_graphs_second_test_metric}. Table~\ref{tab:iterations_success} shows the number of iterations of compilations successfully applied to a problem. For example, the HModel formed from the constraints derived from 8 questions compiled into problem 2 for the Crew Planning domain was able to be solved within 5 minutes, the 9th question and compilation produced an HModel where no plan could be found within 5 minutes. The majority of the problems were still solvable after the full 12 iterations of compilations were applied, with 20 of the 30 producing plans for the most constrained problems. Of the problems that failed to find plans before the full number of iterations, only three of these were below the average number of questions users asked about plans, as found in our user study. Figure~\ref{fig:performance_graphs_second_test_time} displays the change in planning time as the iterations of compilations applied to problems increases. This Figure contains three line charts, one for each domain used in the experiment. Each line corresponds to a planning problem, the key is shown on the right of each chart. The horizontal axis displays the iteration of the compilation applied, for each subsequent iteration, the compilation is applied to the previous HModel so each iteration is more constrained than the last. The vertical axis displays the difference in planning time in seconds. For each of the plots the difference is relative to the planning time for the original problem, so the zero on the vertical axis represents there being no difference in planning time between the compiled model (at any iteration) and it's corresponding original problem, a positive value means there was an increase in the time taken to find a solution for the compiled model, and the opposite holds for a negative value. The results displayed in Figure~\ref{fig:performance_graphs_second_test_time} show various trends on the impact iterative compilations have on the planning time. There are problems where the impact is negligible from start to finish, such as in problems 1, 4, 5, 6, 9, and 10 for the Crew Planning domain, and problems 5 and 6 for the ZenoTravel Domain. There are problems where the planning time drastically increases for a single iteration, this can lead to no solution being found within the allocated time for the HModel produced from the next iteration, such as in problem 3 in the Crew Planning domain, and problem 12 for the ZenoTravel domain. However, sometimes the planning time decreases again in subsequent iterations, for example in problem 7 in the ZenoTravel domain. This also happens multiple times in problems 7, 8, and 9 in the Elevators domain where the planning times fluctuate between drastic increases and decreases in planning time from one iteration to the next. In other cases the planning time can increase, stay level for some iterations, and then decrease again such as in problem 2 in the Elevators domain and problem 4 in the ZenoTravel domain. In some cases the compilations can decrease the planning time such as in problems 6 and 8 in the Elevators and ZenoTravel domains respectively which both have improvements in the planning time over several iterations. Although, for most of these plots there tends to be no correlations or a slightly positive correlation between the number of iterations and the planning time. This is quite easy to see in Figures~\ref{fig:second_test_time_sfig1} and~\ref{fig:second_test_time_sfig3} where the increase in planning times lies below 30 seconds for the final iteration for the majority of problems. The Elevators domain has a more positive correlation between the number of iterations and the planning time than the other domains, where the majority of problems finish with an increase in planning time of between 50 and 100 seconds. Although it does also have an example of a significant improvement in planning time for even the most constrained HModel in problem 7. Figure~\ref{fig:performance_graphs_second_test_metric} displays the change in the quality of the solutions as the iterations of compilations applied to the problem increases. This figure contains three line charts for each domain in the experiment. The charts are set up the same as those in Figure~\ref{fig:performance_graphs_second_test_time}, but the vertical axis displays the difference in the quality of the solutions as measured by the metric defined in the domains. The results displayed in Figure~\ref{fig:performance_graphs_second_test_metric} show that the quality of the solutions vary over the number of compilations applied to a problem. The quality of the solutions tends to get worse over the full number of compilations applied in the Crew Planning and ZenoTravel domains. At a more granular level, the metric increases and decreases from one iteration to the next quite drastically for some problems, for example in problems 9 and 10 in the ZenoTravel domain. However, some others have a more steady increase, such as in problem 7 in the ZenoTravel domain. For all problems, but problem 8, in the Crew Planning domain there is one compilation that causes a drastic increase in the metric, the subsequent compilations then have much less of an impact. Problem 8 in the Crew Planning domain is only problem where each iterative compilation had no impact on the metric. The compilations have a much lower impact on the metric for the problems in the Elevators domain. Again, there are small fluctuations in the metric from one iteration to the next, but the overall change in the metric for the majority of the problems is minimal. This can be observed by noticing that the majority of the problems end with a insignificant increase in metric of between 4 and 65. \paragraph{Analysis} The results show that the majority of the constrained problems produced from a large number of iterations of compilations are still solvable and within a reasonable time. There were a few instances where a problem was constrained in such a way that it became unsolvable within the 5 minutes of allotted planning time. The results indicate that this is not because of incremental increases in the difficulty over the number of compilations applied to a model, but because of a single compilation that makes the subsequent HModel significantly more difficult to solve. This is likely due to the same reasons that have been discussed in the introduction to Section~\ref{sec:comp}. The results show that problems do not get significantly harder to solve as the number of constraints applied to the problem increases. This can be shown by running a Wilcoxon Signed-Rank test on the differences between the planning times for consecutive iterations of HModels. For each problem two populations were created from the data, $\mu_1$ and $\mu_2$ where $\mu_1 = \{0, p_1, \dots, p_{n-1}\}$ and $\mu_2 = \{p_1, ..., p_n\}$ and $p_i$ is the planning time for a model at iteration $i$ and $n$ is the number of iterations. We performed a Wilcoxon Signed-Rank test with the null hypothesis $H_0: \mu_1 = \mu2$ and alternate hypothesis $H_1: \mu_1 \neq \mu_2$. The results were not significant for 26 of the 30 problems with $p = 0.05$. This shows that for these 26 problems the compilations did not significantly worsen the planning time as the iterations progressed. Four of the problems were statistically different and so we could reject $H_0$ and accept $H_1$ with $p = 0.05$. More specifically a one tailed test showed that for these four problems we could accept the alternate hypothesis $H_2: \mu_1 < \mu_2$. Even though for these four problems the compilations worsened the planning time as the iterations progressed, this does not mean that they got exponentially harder. The results on the impact in the metric, as discussed in the results, mostly show that the greatest increase in the metric comes from a single compilation. This is likely due to the constraint compiled into the model constraining the search space in such a way that the better solution plans are no longer valid, or are much harder to find. This also makes sense when noticing that subsequent compilations rarely improve the metric once it has been drastically increased. Any constraint compiled into an HModel produces a new HModel that also has the constraints that were applied previously. If one of these constraints limits the space of valid plans by removing a plan with a better quality, then any subsequent constrained HModels will also be limited in this way. This is also supported by, more severely, the failure to find solutions for some sufficiently constrained problems within the time allotted. Unrelated to the number of constraints that have been applied, a problem can go from solvable to unsolvable with a single additional constraint. This leads us to believe that the number of constraints is of less importance than the ultimate constrained problem, whether this be the result of one compilation or of multiple. \subsection{User Study} \label{sec:userstudy} We designed a comparative user study to evaluate the effectiveness of our XAIP-as-a-Service framework and the iterative model restriction approach that it utilises. We designed the study based on recommendations for metrics on Explanation Satisfaction by Hoffman et al.~\shortcite{hoff18b}. Explanation Satisfaction is a measure of the degree to which users feel that they understand the AI system or process being explained to them and is a contextualised, a posteriori judgment of explanations. The rest of this section describes the design of our user study and discusses the results it produced. \begin{table}[h!] \begin{tabular}{|p{0.8cm}p{12cm}|} \hline \textbf{EQ1:} & ``How well did the XAIP system help you to understand the plan?'' \\ \hline \textbf{EQ2:} & ``What do you expect from a good explanation?'' \\ \hline \textbf{EQ3:} & ``What would make an explanation satisfactory?'' \\ \hline \textbf{EQ4:} &``In what ways does it help if explanations are contrastive?'' \\ \hline \end{tabular} \caption{Open-ended questions for users} \label{tab:user_questions} \end{table} \begin{figure}[!b] \centering \includegraphics[width=0.43\columnwidth]{images/times.png} \includegraphics[width=0.56\columnwidth]{images/questions.png} \caption{Standard deviation of the time participants spent understanding the plan and using the framework (left). Standard deviations of total number of questions that participants asked and of number of questions that were asked as iterative questions (right).} \label{fig:stats} \end{figure} \begin{figure}[!b] \centering \includegraphics[width=1.0\columnwidth]{images/formalQs.png} \caption{Standard deviation of the number of formal questions (defined in Section~\ref{sec:taxonomy}) utilised by study participants. G1 label and blue colour denote results for Group 1, while green and G2 for Group 2.} \label{fig:statsFQ} \end{figure} \begin{figure*}[t!] \centering \includegraphics[width=0.85\textwidth]{images/satisfactionscaleV.pdf} \caption{Explanation Satisfaction Scale results collected in the user study. Likert bar plot visualises distributions of users answers on their attitudes towards statements about explanations on the left side of the figure.} \label{fig:sat_scale} \end{figure*} \paragraph{Design} A comparative study, also called a true experiment, is a method of data collection designed to test hypotheses under controlled conditions in behavioural research. True experimental designs involve manipulation of the independent variable by exposing participants to different conditions by varying this variable. In the experiment that we designed, participants were randomly divided into two groups - the experimental group who interacted with the original framework, and the control group who interacted with a simplified framework. Participants were using the XAIP as a Service framework in order to understand the plan in Figure~\ref{fig:plan}. They were asked to imagine themselves as employees of the warehouse that we use as our running example described in Section~\ref{sec:running_example}. The chosen domain was simple enough so participants could identify themselves in the roles, and complex enough to judge the XAIP system. 20 participants were divided in two groups in order to compare user experience. The experimental group \textbf{Group~1}~(G1) had the opportunity to use the framework's full capabilities and get explanations in the form of highlighted comparisons between plans, as disc in Section~\ref{sec:xaip_human_interface} and illustrated in Figure~\ref{fig:guib}. The control group \textbf{Group~2}~(G2) used the framework where the $comparison$ of plans (with coloured differences and highlighted costs) was disabled. As the explanation, they only got the HPlan next to the original plan. Both groups were asked to use the framework until they were satisfied with their understanding of the system and the plan or until they found interaction with the framework useful. We did not attempt to track how the model of the users evolved whilst using the system, or what triggered their termination with the system, but to determine the overall experience the users had in using they framework. To evaluate understanding of plans that participants gained using the framework, they rated the system using the Explanation Satisfaction Scale, which is a 5-point Likert scale for Explainable AI systems designed by Hoffman, Klein, and Mueller~\citeyear{hoff18a}. The scale measures an attitude on a continuum from `strongly agree' to `strongly disagree' corresponding linearly to values from 1.0 to 5.0. Additionally, we collected qualitative information about the experiences and expectations Group 1 had whilst partaking in the study by asking them four open-ended questions as defined in Table~\ref{tab:user_questions}. \paragraph{Data} We conducted a study with 20 volunteers (5 students, 4 engineers, 4 software developers, 3 researchers, 2 assistant professors, a chemist and a copywriter) divided in two groups with 10 persons each. Participants’ ages ranged from 23 to 43 years, with 35\% identified as female and 65\% identified as male. The average time G1 spent with the plan and the framework is 24.2 minutes, and on average, they asked 5.1 questions. The average time G2 spent with the plan and the framework is 21.1 minutes, and on average, they asked 3.7 questions as it can be seen in Figure~\ref{fig:stats}. The maximum number of question asked was 10, while the minimum number was 1. The most commonly utilised formal questions were types FQ1 and FQ2 which require removing actions from the plan or adding new actions to the plan. Quantity distributions of each formal question asked are given in Figure~\ref{fig:statsFQ}. \paragraph{Quantitative results} The results of the evaluation with the Explanation Satisfaction Scale are shown in Figure~\ref{fig:sat_scale}. The median of all responses for Group 1 is 4.0, and the interquartile range (IQR) is 2.0, which corresponds to the overall attitude ``somewhat agree'' that information gained through usage of the framework is satisfying. Some of the participants did not find the plan comparisons useful to their goals, and some of them somewhat disagreed that the explanations as presented are complete. The median of all responses for Group 2 is 3.0, and IQR is 2.0, which corresponds to the overall attitude ``neutral'' that explanations obtained through interaction with the framework are satisfying. We also performed t-test with the results of both groups and got the values $t=5.57$ and $p=1.038\mathrm{e}{-7} $ telling us that there is a significant difference in explanation satisfaction of two groups. Generally, the users found plan comparisons as in Figure~\ref{fig:guib} useful for understanding how the AI planning system works and that the process of iterative model restriction is satisfying. Also, they agreed that explanations in this way could be useful for improving judgement about whether or not to trust the system. \paragraph{Qualitative results}6 out of 10 participants of Group 1 filled out all answers for the questions in Table~\ref{tab:user_questions} and, overall, there was an 82.5\% response rate to the questions. In the text below, we denote the study participants as P1-P10. By analysing the collected data, we were able to determine several patterns and themes amongst users' responses. Participants agreed that the framework is helpful and that they had ``no problem understanding the plan thanks to the system''(P3). Also, they found the presentation of plan comparisons useful ``to understand why ... something (is) possible or not''(P2), to see ``how the changes ... affect the original plan''(P3) and to aid in ``allowing to reach some conclusions''(P10). However, for a good explanation, users expect more details ``explaining the rules for the plan''(P6) and ``showing the logic behind the reason that a specific action has been decided''(P7). Also, they ``expect that it (good explanation) would explain each step of the plan in an understandable way, to explain every change that has been made and how does that change affect the plan''(P4) and they ``expect an argument for the usage of one thing over anything else''(P9). This theme also complements their attitude towards explanation completeness as revealed in the Explanation Satisfaction Scale results (Figure~\ref{fig:sat_scale}). Additionally, participants reflected on the explanation presentation. Even though they think ``it (is) great to compare plans and see what makes the difference''(P5), they also expect more user-friendly presentation of final explanation such as ``in the format of a sentence''(P8) or ``a visual representation of what the robots are doing''(P9). \section{Explainable Planning as an Iterative Process}\label{sec:iter} In this section we present a framework within which we have implemented the iterative model restriction process described in Section~\ref{subsec:problem} and instantiated through the compilations described in Section~\ref{sec:comp}. We use an approach we call Explainable Planning as a Service (XAIP-as-a-service). This paradigm is motivated by Definition~\ref{def:negprob} and consists of an iterative conversational process between the user and the planning system. The user asks contrastive questions about a presented plan and receives explanations until the user terminates the process. Explainable Planning \textit{as a service} means implementing the approach as a wrapper around an existing planning system that takes as input the current planning problem and domain model, the current plan, and the user's question. It has the ability to invoke the existing planning system on hypothetical problems in order to address contrastive questions. In Section~\ref{sec:eval} we present the results of the user study conducted with this XAIP-as-a-service framework, alongside an evaluation of the computational costs and effectiveness of the compilations. The XAIP-as-a-service paradigm has the benefit that the known and trusted planner and model can be used to provide explanations. At each step a new hypothetical plan is created using the planner chosen by the user, and is validated against the user's original trusted model. As described in Definition~\ref{def:constraintaddition} a model restriction satisfies the condition that any plan for the restricted model is also a plan for the original model. Updates to the model serve to force decisions from the planner and so explore the consequences of those decisions. Figure~\ref{fig:overview} summarises the implementation described in Definition~\ref{def:negprob} and user interaction illustrated in Figure~\ref{fig:tree2}, following these steps: \begin{enumerate}[align=parleft, label=\textbf{Step \arabic*:}, leftmargin=*] \item The \textit{XAIP Service} takes as input the planning problem and the domain, the plan, and a question from the user. \item The contrastive question implies a \textit{hypothetical model} characterised as an additional set of constraints on the actions and timing of the original problem. These constraints can then be compiled into a revised domain model (HModel) suitable for use by the original planner. \item The \textit{original planner} uses the HModel as input to produce the \textit{hypothetical plan} (HPlan) which contains the user suggestion. \item The XAIP Service validates the HPlan according to the original model. \item The original plan and HPlan are shown to the user, with differences highlighted. \item The user may choose to repeat the process from Step 1, selecting the original model or any HModel and a new question. \end{enumerate} \begin{figure}[t!] \centering \includegraphics[width=0.7\linewidth]{images/xaipaas2.pdf} \\ \caption{ Proposed approach for Explainable Planning as a service } \label{fig:overview} \end{figure} \subsection{Implementation details}\label{sec:imp} \begin{figure} \centering \includegraphics[width=0.75\columnwidth]{images/XAIPService.pdf} \caption{Architecture of the framework for Explainable Planning as a service. } \label{fig:framework} \end{figure} \begin{figure} \centering \begin{subfigure}[b]{.75\textwidth} \centering {\includegraphics[width=1\linewidth]{images/comparisonN1.png}} \caption{Plan visualisation and question selection.} \label{fig:guia} \end{subfigure} \begin{subfigure}[b]{.75\textwidth} \centering \includegraphics[width=1\linewidth]{images/comparisonN2.png} \caption{Explanation visualisation.} \label{fig:guib} \end{subfigure} \caption{Screenshots of the graphical user interface of the \textit{XAIP Service} framework. The first image displays the original plan, a user can formulate a question about the plan using the dialogue. The second image displays the side by side comparison of the original plan and the HPlan produced from the user's question. The differences in the plans are highlighted. Actions that are unchanged are coloured blue, those that are new in the HPlan are coloured yellow (only appear in the HPlan), actions are coloured green if they appear in both the plan and the HPlan but have different dispatch times, and actions are coloured red if they are removed from the plan (do not appear in the HPlan).} \label{fig:gui} \end{figure} We implemented the XAIP-as-a-Service as modular framework for domains and problems written in PDDL2.1.~\cite{fox03}. This framework interfaces with any planner capable of reasoning with PDDL2.1, such as POPF~\cite{col10}, Metric-FF~\cite{hof03}, OPTIC~\cite{col12}, etc. The architecture of the framework is illustrated in Figure~\ref{fig:framework}. Interaction with a user is enabled through a graphical user interface, implemented with Qt-Designer. The modularity of the framework decouples the interfaces for providing user questions (\textit{Step 1}), synthesising the HModel (\textit{Step 2}), interfacing with the planner (\textit{Step 3}), and returning HPlans to the user (\textit{Step 5}).\footnote{All source code and example domain and problem files are open source and available online:\\ \url{https://github.com/KCL-Planning/XAIPFramework}.} The process is controlled by the \textit{XAIP controller} module of Figure~\ref{fig:framework}. This module uses the interfaces of each other module of the framework described below. The controller is also responsible for validating hypothetical plans against the original domain (\textit{Step 4}), using the plan validation system \textit{VAL}~\cite{Dlong_val}. \subsubsection{XAIP-Human Interface}\label{sec:xaip_human_interface} The XAIP-human interface module of Figure~\ref{fig:framework} implements \textit{Step 1}, and \textit{Step 5} of the XAIP-as-a-service process. The module consists of a Qt interface through which the user is able to select an existing model (either the original model or a previous HModel), construct a question, and view the resulting HPlan. The questions that can be constructed by the interface consist of those that are defined in the Contrastive Taxonomy in Table~\ref{tab:user_questions} in Section~\ref{sec:taxonomy}. A screenshot of the interface is shown in Figure~\ref{fig:guia}. In this screenshot the user has already selected a model and plan for which to ask a question, and selected the formal question ``Why is action A not used in the plan, rather than being used?'' (FQ1). The user has populated the details of the question so that the final question reads: \begin{quote} ``Why is the action \textit{(unload\_pallet top p2 sh1)} not involved in the plan?'' \end{quote} The interface presents the HPlan to the user, as shown in Figure~\ref{fig:guib}. In this plan comparison both plans are shown side-by-side with differences highlighted. These differences include added actions which were not present in the original plan, actions which have been rescheduled/reordered, and actions which have been removed. The user is also able to compare the costs of each plan, and view the validation report produced by VAL. In Figure~\ref{fig:guib} the action that was suggested by the user, \textit{(unload\_pallet top p2 sh1)}, appears in the HPlan at time $19.001$. \subsubsection{XAIP Software Interface and Compilations} The \textit{XAIP software interface} module implements \textit{Step 3} of the XAIP-as-a-service process, interacting with the planner to produce hypothetical plans. This is done by parsing the original domain and problem and storing the resultant model in an internal knowledge base. This knowledge base contains a collection of models that can be queried or passed to the planner. The \textit{Compilation} module implements \textit{Step 2} by providing an interface that given a formal question and model, applies the model restriction to produce the HModel. The Compilations module implements the model restriction in Section~\ref{sec:comp}. When triggered by the event of the user selecting a model and formal question through the XAIP Human Interface, the Controller will fetch the model from the XAIP Software Interface, pass the model and question to the Compilations module, and store the resulting model in the XAIP Software Interface Knowledge Base. \subsubsection{Modularity} The design of the framework's architecture allows the components to be independently adapted to better fit different XAIP scenarios. For example, the XAIP-Human Interface can be adapted to explanations for a robotic agent or an augmented reality setting~\cite{cha18b}. The explanation visualisation can be adapted to provide different information to the user, for example to illustrate discrepancies in the model highlighting what prevents the planner from solving the restricted model~\cite{sre19}. The Compilations module can be replaced or extended to add new compilations that accommodate niche questions that are specific to the scenario. An actualised example of a modification to the explanation framework is demonstrated by comparing the ethics of plans~\cite{kra20}. In this work Krarup et al. modified the architecture of the framework with an additional module called the Ethical Explanation Generator. With extra information about the ethical attributes of the model (the extrinsic value of actions, utilities of facts, etc.) and the moral principle, the Ethical Explanation Generator shows whether a plan is permissible under the principle and provides a causal explanation. The resulting extended framework allows users to compare the ethics of plans within the iterative process. \section{Introduction} Automated planning is being used in increasingly complex applications, and explanation plays an important role in building trust, both in planners and in the plans they produce. A plan is a form of communication, either as a set of instructions to be enacted by autonomous or human agents, or as a proposal of intention communicated to a user. In either case, the plan conveys the means by which a goal is to be achieved, but not the reasons for the choices it embodies. When the audience for a plan includes humans then it is natural to suppose that the audience might wish to question the reasoning, intention and underlying assumptions that lead to those choices. The need for explanations arises when there is a mismatch between a proposed plan and the audience's expectation. This might be because the audience had not managed to form an expected plan, or because a plan was successfully constructed, but it did not match the proposed plan. Explanations attempt to bridge the gap between these mismatched positions and might be {\em local}, focusing on the specific proposed plan and its properties, or {\em global}, focusing on the assumptions on which the plan rests, or the process by which it was constructed. In this paper we focus on local explanations, investigating the form of queries made by a user in interaction with a planner or plan-based system. We suppose that the audience might want to question why the plan is structured as it is, what intentions the plan seeks to address, and what alternative plans might be considered. Through active exploration of these specific cases, the user might also gain global insight into the way in which the planner makes decisions~\cite{lipton_1990,lip16,rib16}. We treat explanation as a form of dialogue, an iterative process in which the user asks contrastive questions~\cite{mil18} (that is, questions of the form `why $A$ rather than $B$?') where the constrasting position is specified as a constraint that restricts the forms of acceptable solutions to the original problem, and responses are given in the form of alternative plans, satisfying the newly added constraints. We observe that many purposeful queries made by a user in interaction with a planner or plan-based system are contrastive. Fox et al.~\citeyear{fox17} highlight the \textit{why} query as an important one for XAI, and discuss possible responses. To answer these kinds of questions, one must reason about the hypothetical alternative $B$, which means constructing an alternative plan for which $B$ is satisfied, rather than $A$. We address the problem of planning subject to additional constraints by compiling the constraints into the planning model. This approach offers a useful benefit, that the same planner can be used to solve the constrained problem and its use is unaffected by the iterative explanation process in which it is exploited. The fact that the compilation is independent of the planner serves to emphasise that the explanations cannot directly address questions the user might have about the planning process, but focus on reconciling the planning models held by the planner and by the user. This iterative model restriction process does not require that the planning models used by the planner and the user be the same. Indeed, the focus on model reconciliation presupposes that there is some difference between the models. Nevertheless, the formulation of questions as constraints does require that the user and the planner share vocabulary, including the names and parameter types of actions and predicates, and the names of objects appearing in the problem. We also do not assume that the user has necessarily formulated an explicit alternative plan. In some cases, the user might not have such a plan in mind and, in that case, the iterative process might simply reflect the user exploring the family of plans around the initial plan in order to gain some insight into the alternatives that exist. In this paper we: \begin{itemize} \item Present a user study investigating the queries that arise when humans are confronted with plans, from which we develop a taxonomy of common questions. \item Formally define the iterative model restriction process, through which explanations can be provided as part of a dialogue. \item Present compilations for the common questions into PDDL2.1 constraints that can be used in a model-based approach for explanations within the iterative model restriction process. We empirically evaluate the computational impact of these compilations. \item Describe an implementation of this process, and the framework in which plans are presented to the user for comparison. \item Present an evaluation of the framework using a second user study. \end{itemize} The paper is structured as follows: in Section~\ref{sec:taxonomy} we introduce the idea of the Contrastive Taxonomy and present the list of formal user questions that will be considered throughout the paper. In Section~\ref{sec:back} we briefly cover the background in Explainable AI Planning. Then, in Section~\ref{sec:plans} we formally describe the iterative model restriction process along with a running example. In Section~\ref{sec:comp}, we present the compilations that can be used within the plan negotiation problem to encode the list of formal user questions. We describe the implementation of our Explainable Planning framework in Section~\ref{sec:iter}. In Section~\ref{sec:eval} we describe the user study carried out with the framework and present the results. Section~\ref{sec:eval} also includes empirical evaluations of the computational costs of the compilations. Section~\ref{sec:rel} contains a discussion of related work in explainable planning and model reconciliation. The paper concludes in Section~\ref{sec:conc} with a discussion of future work. \section{Plans: Queries and Explanations}\label{sec:plans} In this section we provide the formal definitions that support our approach to explanation. We define the planning model and give a reference example, and then focus on the process of model restriction as a special case of model reconciliation, as described in Section~\ref{sec:back}. \subsection{Formal Definition of a Planning Problem} \label{sec:formalplan} Our definition of a planning model follows the definition of PDDL2.1 given by \cite{fox03}, extended by a set of time windows and explicit record of the plan metric. The formal description of such a planning model is as follows. \begin{definition} \label{defn:planning-model} A \textbf{planning model} is a pair $\Pi = \langle D, Prob \rangle$. The domain $D = \langle Ps, Vs, As, arity \rangle$ is a tuple where $Ps$ is a finite set of predicate symbols, $Vs$ is a finite set of function symbols, $As$ is a set of action schemas, called operators, and $arity$ is a function mapping all of these symbols to their respective arity. The problem $Prob = \langle Os, I, G, M, W \rangle$ is a tuple where $Os$ is the set of objects in the planning instance, $I$ is the initial state, $G$ is the goal condition, $M$ is a plan-metric function from plans to real values (plan costs) and $W$ is a set of time windows. \end{definition} A set of atomic \textit{propositions} $P$ is formed by applying the predicate symbols $Ps$ to the objects $Os$ (respecting arities). One proposition $p$ is formed by applying an ordered set of objects $o \subseteq O$ to one predicate $ps$, respecting its arity. For example, applying the predicate \textit{(robot\_at ?v - robot ?wp - waypoint)} with arity $2$ to the ordered set of objects $\{Jerry,sh3\}$ forms the proposition \textit{(robot\_at Jerry sh3)}. This process is called ``grounding'' and is denoted with: $$ground(ps,\chi) = p$$ where $\chi\subseteq O$ is an ordered set of objects. Similarly the set of \textit{primitive numeric expressions} (PNEs) $V$ are formed by applying the function symbols $Vs$ to $Os$. A state $s$ consists of a time $t\in\mathbb{R}$, a logical part $s_{l}\subseteq P$, and a numeric part $s_{v}$ that describes the values for the PNE's at that state. The initial state $I$ is the state at time $t=0$. The goal $G = g_1, ..., g_n$ is a set of constraints over $P$ and $V$ that must hold at the end of an action sequence for a plan to be valid. More specifically, for an action sequence $\pi = \langle a_1, a_2,\ldots,a_n \rangle$ each with a respective time denoted by $Dispatch(a_i)$, we use the definition of plan validity from \cite{fox03} (Definition 15 ``Validity of a Simple Plan''). A simple plan is the sequence of actions $\pi$ which defines a happening sequence, $t_{i=0\ldots k}$ and a sequence of states, $s_{i=0\ldots k+1}$ such that $s_0 = I$ and for each $i = 0\ldots k$, $s_{i+1}$ is the result of executing the happening at time $t_i$. The simple plan $\pi$ is valid if $s_{k+1}\models G$. The plan-metric function is, by default, the makespan of the plan to which it is applied. More generally, the metric assesses plan quality by taking into account both the extent to which a plan respects user preferences and also the costs associated with choices of action or combinations of actions within a plan. It is often the case that plans fail to meet expectations because of a mismatch in the way that plans are evaluated. Each time window $w\in W$ is a tuple $w = \langle w_{lb}, w_{ub}, w_v \rangle$ where $w_v$ is a proposition which becomes true or a numeric effect which acts upon some $n \in V$. $w_{lb}\in\mathbb{R}$ is the time at which the proposition becomes true, or the numeric effect is applied. $w_{ub}\in\mathbb{R}$ is the time at which the proposition becomes false. The constraint $w_{lb} < w_{ub}$ must hold. Note that the numeric effect is not applied or reverted at $w_{ub}$, so $w_{ub}$ is superfluous for numeric effects. Similar to propositions and PNEs, the set of ground actions $A$ is generated from the substitution of objects for operator parameters with respect to it's arity. Each ground action is defined as follows: \begin{definition} A \textbf{ground action} $a \in A$ has a duration $Dur(a)$ which constrains the length of time that must pass between the start and end of $a$; a start (end) condition $Pre_{\vdash}(a)$ ($Pre_{\dashv}(a)$) which must hold at the state that $a$ starts (ends); an invariant condition $Pre_\leftrightarrow(a)$ which must hold throughout the entire execution of $a$; add effects $\mathit{Eff}(a)_{\vdash}^+, \mathit{Eff}(a)_{\dashv}^+ \subseteq P$ that are made true at the start and end of the action respectively; delete effects $\mathit{Eff}(a)_{\vdash}^-, \mathit{Eff}(a)_{\dashv}^- \subseteq P$ that are made false at the start and end of the action respectively; and numeric effects $\mathit{Eff}(a)^n_{\vdash}$, $\mathit{Eff}(a)^n_{\leftrightarrow}$, $\mathit{Eff}(a)^n_{\dashv}$ that act upon some $n \in V$. \end{definition} \subsection{Running Example}\label{sec:running_example} \begin{figure}[t!] \centering \includegraphics[width=0.9\linewidth]{images/warehousedomaindiagram.png} \caption{Diagram of the warehouse delivery system domain.} \label{fig:runningexample} \end{figure} As a reference example, we use a simplified version of a model of a warehouse delivery system. There are multiple robots that work to move pallets from their delivery location to the correct storage shelf. Before the pallets can be stored, the shelf must be set up. Figure~\ref{fig:domain} defines the domain for this model. There are four durative actions, $goto\_waypoint$, $set\_shelf$, $load\_pallet$, and $unload\_pallet$. The $goto\_waypoint$ action is used for the robots to navigate the factory. The $set\_shelf$ action ensures that the shelf is ready to store a package (the robot cannot perform this action while holding a pallet). The $load\_pallet$ action loads the pallet from a shelf on to the robot. Finally, the $unload\_pallet$ action unloads the pallet onto a previously set shelf. For illustration purposes, we use a very simple problem with two robots, two pallets, and six waypoints. An example problem is shown in Figure~\ref{fig:problem}, and an example plan for this planning problem is shown in Figure~\ref{fig:plan}. Figure~\ref{fig:plan} consists of a sequence of actions each with two attached values denoting the time they are executed and for how long. A diagram illustrating this domain is shown in Figure~\ref{fig:runningexample}. For simplicity, we assume the cost of this plan is its duration (20.003) which in this case is optimal% ~\footnote{Optimal under PDDL 2.1 epsilon semantics with epsilon equal to .001. The plan is obtained using the planner POPF~\cite{col10}. However, our framework theoretically works with any PDDL2.1 planner.}. \begin{figure} \centering \begin{minipage}{.48\textwidth} \footnotesize \centering \begin{BVerbatim} (:types waypoint robot - locatable pallet) (:predicates (robot_at ?v - robot ?wp - waypoint) (connected ?from ?to - waypoint) (visited ?wp - waypoint) (not_occupied ?wp - waypoint) (set_shelf ?shelf - waypoint) (pallet_at ?p - pallet ?l - locatable) (not_holding_pallet ?v - robot)) (:functions (travel_time ?wp1 ?wp2 - waypoint)) (:durative-action goto_waypoint :parameters (?v - robot ?from ?to - waypoint) :duration(= ?duration (travel_time ?from ?to)) :condition (and (at start (robot_at ?v ?from)) (at start (not_occupied ?to)) (over all (connected ?from ?to))) :effect (and (at start (not (not_occupied ?to))) (at end (not_occupied ?from)) (at start (not (robot_at ?v ?from))) (at end (robot_at ?v ?to))) ) (:durative-action set_shelf :parameters (?v - robot ?shelf - waypoint) ...) (:durative-action load_pallet :parameters (?v - robot ?p - pallet ?shelf - waypoint) ...) (:durative-action unload_pallet ...) \end{BVerbatim} \caption{A fragment of a robotics domain used as a running example. Some of the operator bodies have been omitted for space. The full description of the goto\_waypoint action is shown.} \label{fig:domain} \end{minipage} \hspace{0.02\textwidth} \begin{minipage}{.48\textwidth} \footnotesize \begin{BVerbatim} (define (problem task) (:domain warehouse_domain) (:objects sh1 sh2 sh3 sh4 sh5 sh6 - waypoint p1 p2 - pallet Jerry Tom - robot) (:init (robot_at Jerry sh3) (robot_at Tom sh5) (not_holding_pallet Jerry) (not_holding_pallet Tom) (not_occupied sh1) (not_occupied sh2) (not_occupied sh4) (not_occupied sh6) (pallet_at p1 sh3) (pallet_at p2 sh6) (connected sh1 sh2) (connected sh2 sh1) (connected sh2 sh3) (connected sh3 sh2) (connected sh3 sh4) (connected sh4 sh3) (connected sh4 sh5) (connected sh5 sh4) (connected sh5 sh6) (connected sh6 sh5) (connected sh6 sh1) (connected sh1 sh6) (= (travel_time sh1 sh2) 4) (= (travel_time sh2 sh1) 4) (= (travel_time sh2 sh3) 8) (= (travel_time sh3 sh2) 8) (= (travel_time sh3 sh4) 5) (= (travel_time sh4 sh3) 5) (= (travel_time sh4 sh5) 1) (= (travel_time sh5 sh4) 1) (= (travel_time sh5 sh6) 3) (= (travel_time sh6 sh5) 3) (= (travel_time sh6 sh1) 4) (= (travel_time sh1 sh6) 4) ) (:goal (and (pallet_at p1 sh6) (pallet_at p2 sh1)))) \end{BVerbatim} \caption{The problem instance used in the running example.} \label{fig:problem} \end{minipage} \end{figure} \begin{figure}[h!] \centering \begin{BVerbatim} 0.000: (goto_waypoint Tom sh5 sh6) [3.000] 0.000: (load_pallet Jerry p1 sh3) [2.000] 2.000: (goto_waypoint Jerry sh3 sh4) [5.000] 3.001: (set_shelf Tom sh6) [1.000] 4.001: (goto_waypoint Tom sh6 sh1) [4.000] 7.001: (goto_waypoint Jerry sh4 sh5) [1.000] 8.001: (set_shelf Tom sh1) [1.000] 8.002: (goto_waypoint Jerry sh5 sh6) [3.000] 9.001: (goto_waypoint Tom sh1 sh2) [4.000] 11.002: (unload_pallet Jerry p1 sh6) [1.500] 12.503: (load_pallet Jerry p2 sh6) [2.000] 14.503: (goto_waypoint Jerry sh6 sh1) [4.000] 18.503: (unload_pallet Jerry p2 sh1) [1.500] \end{BVerbatim} \caption{ The Plan with a cost of 20.003 generated from the example domain and problem.} \label{fig:plan} \end{figure} Tying the reference example back to the definitions in Section~\ref{sec:formalplan}, the first action present in Figure~\ref{fig:plan} is the operator \textit{goto\_waypoint} in Figure~\ref{fig:domain} grounded with the objects \textit{\{Tom,sh5,sh6\}}. Each operator parameter is substituted with the corresponding object to give a ground action, this is represented in Figure~\ref{fig:groundaction} which shows the duration, conditions, and effects. \begin{figure}[h!] \centering \begin{BVerbatim} (:ground-action goto_waypoint Tom sh5 sh6 :duration (= 3.000) :condition (and (at start (robot_at Tom sh5)) (at start (not_occupied sh6)) (over all (connected sh5 sh6))) :effect (and (at start (not (not_occupied sh6))) (at end (not_occupied sh5)) (at start (not (robot_at Tom sh5))) (at end (robot_at Tom sh6))) ) \end{BVerbatim} \caption{The ground action \textit{(goto\_waypoint Tom sh5 sh6)}.} \label{fig:groundaction} \end{figure} For ease of notation we allow access to multiple types of effects or preconditions through the ground action functions at once. For example for some ground action $a$, $\mathit{Eff}^+$ denotes all add effects of $a$, $Pre_{\vdash \dashv}(a)$ denotes all start and end preconditions of $a$ but not invariant conditions, $\mathit{Eff}(a)$ denotes all effects of $a$ including numeric effects. \subsection{Plan Negotiation Problem} \label{subsec:problem} Fundamentally, the need for plan explanation is driven by the fact that a human and a planning agent may have different models of the planning problem and different computational capabilities. In Definition~\ref{defn:planning-model} a planning model $\Pi$ was defined in terms of a domain $D = \langle Ps, Vs, As, arity \rangle$ and problem $Prob = \langle Os, I, G, M, W \rangle$. As mentioned in Section ~\ref{sec:back}, for purposes of this paper we assume that the human's planning model $\Pi^H$, and planning agent's model $\Pi^P$ share the same vocabulary, namely the same predicate symbols $Ps$, function symbols $Vs$, and actions $As$ from the domain $D$, and objects $Os$ from the problem. However, the action durations, conditions, and effects may be different, and the initial states $I$, goals $G$, and plan metric $M$ may be different. We do not assume that the human knows the planning agent's model $\Pi^P$, or vice versa. This assumption differs from previous work on model reconciliation~\cite{cha17} in that we do not assume that the planner knows (or learns) the planning model of the human. Even when a human and a planning agent have the same planning models $\Pi^H=\Pi^P$, there are typically multiple plans satisfying this planning model. Although a planner is intended to optimise the plan with respect to the plan metric, it is common to produce only one of the valid plans, rather than an optimal plan for a model. A planner might even fail to produce a plan at all, for some problems. In part, this is an inevitable consequence of the undecidability of planning problems with numeric variables and functions~\cite{hel02}, but it is also a consequence of the practical limits on the computational resources available to a planner (time and memory). These observations are equally valid for automated and human planners. In order to discuss the process of developing plan explanations, it is helpful to define the planning abilities of both the planner and the user. We model the planning capability of an agent as a partial function from planning models to plans: \begin{definition}\label{def:capability} The {\bf planning capability} of an agent $A$ (human or machine), is a partial function, $\mathbb{C}^A$, from planning models to plans. Given the agents planning model, $\Pi^A$, if $\mathbb{C}^A(\Pi^A)$ is defined, then it is a candidate plan $\pi^A$ for the agent. \end{definition} The planning capability $\mathbb{C}^A$, can be affected by a multitude of factors. The part of the function domain on which $\mathbb{C}^A$ is defined determines the planning competency of the agent~-- domain-problem pairs for which the agent cannot find a plan lie outside this competency. Note that the planning competency of an agent can be restricted by a bound on the computational resources the agent is allowed to devote to the problem, as well as by the capabilities of the agent in constructing and adequately searching the search space that the problem defines. When $A$ is an automated AI planner $P$, the computational ability is determined by the search strategy implemented in the planner, its heuristic (if there is one), and the resources allocated to the task. For sound planners, when $\mathbb{C}^P(\Pi^P)$ is defined it is a valid plan for $\Pi^P$. When $A$ is a human planner $H$, the planning capability is determined by the understanding that the human has of the planning model and the patience and problem-solving effort they are willing to devote to solving the problem. It cannot be assumed that, if $\mathbb{C}^H(\Pi^H)$ is defined, that the human's model $\Pi^H$ accurately reflects the world, or that the reasoning $\mathbb{C}^H$ is sound. This means that the plan may not be valid. One aspect of the process of planning and explanation is that the user can revise their model $\Pi^H$ as the process unfolds. However, it is also possible that the user can change their planning capability $\mathbb{C}^H$, by coming to a greater understanding of the model, by engaging in more reasoning, or by simply concluding that the solution provided by an automated system is satisfactory. It is also possible that the planner responses lead to the user changing their view of what might be a good plan to solve a problem, while still not adopting the solution offered by the planner. Thus, the user's planning model and capability might be extended or modified by consideration of the planner output or question responses. This revision might include correcting flawed plans produced by the original planning model and capability of the user. In this paper, we do not explicitly attempt to model any learning process on the part of the human, although we allow that this may happen. Furthermore, we do not consider any learning by the planning agent. Instead, we adopt the approach that the human user asks contrastive questions that impose additional restrictions $\phi$ on the agent's planing problem $\Pi^P$ to generate a succession of hypothetical planning problems. The object of these questions and the resulting hypothetical plans is for the user to understand and ultimately arrive at a satisfactory plan. Model learning and reconciliation by the human and planning agent can be seen as complementary techniques that could make this process more effective and more efficient. Given the planning models $\Pi^H$ and $\Pi^P$, and planning capabilities $\mathbb{C}^H$ and $\mathbb{C}^P$ of a human and planning agent, the two agents disagree when $\mathbb{C}^H(\Pi^H) \not = \mathbb{C}^P(\Pi^P)$, which can arise in the case that either of these terms is undefined, or if both terms are defined and yield different plans. We assume that, in this case, the user is capable of inspecting the planner output and determining a question that will expose some part of the explanation for this difference. By questioning why certain decisions were made in the plan and receiving contrastive explanations the user can gain an initial understanding. As their understanding of the plan develops they can ask more educated questions to gain a deeper understanding or try to arrive at an alternative plan that they consider more satisfactory. Ultimately, this process concludes when the user is satisfied with some plan. In an ideal case, this will be when the user and the planner have converged on the same plan, but this need not happen. For example, suppose $\mathbb{C}^P(\Pi^P) = \pi$ and $\mathbb{C}^H(\Pi^H) = \pi'$ and $\pi \not = \pi'$. The user might inspect $\pi$ and, after seeking explanation for the differences between it and $\pi'$, conclude that there is some deficiency in the planner's model $\Pi^P$ or planner's reasoning $\mathbb{C}^P$ and therefore decide that $\pi'$ is the plan they want. Thus, the sequence, in this case, might conclude with the user rejecting the plan offered by the planner and not changing their own model or computational ability at all. We formalise the iterative process of questioning and explanation as one of successive {\em model restriction}, in which the user asks contrastive questions in an attempt to understand the planning agent's plan and potentially steer the planning agent towards a satisfactory solution. We suppose that, when $\mathbb{C}^H(\Pi^H) \not = \mathbb{C}^P(\Pi^P)$, the user can construct some {\em foil}, $\phi$, in the form of a constraint that $\mathbb{C}^P(\Pi^P)$ does not satisfy, so that seeking an explanation for the plan, $\mathbb{C}^P(\Pi^P)$, can be seen as seeking a plan for $\Pi^P$ that also satisfies $\phi$. This requirement acts as a restriction on $\Pi^P$ and is captured as follows. \begin{definition}\label{def:constraintaddition} A {\bf constraint property} is a predicate, $\phi$, over plans. A {\bf constraint operator}, $\times$ is defined so that, for a planning model $\Pi$ and any constraint property $\phi$, $\Pi \times \phi$ is a model (an {\em HModel}), $\Pi'$, called a {\bf model restriction} of $\Pi$, satisfying the condition that any plan for $\Pi'$ is a plan for $\Pi$ that also satisfies $\phi$. A plan for an HModel is refered to as an {\em HPlan}. \end{definition} The process in which the user interacts with a planner is an iterative one -- the user successively views plans and seeks explanations by generating foils that impose additional restrictions on the planning problem. The collection of model restrictions forms a tree, rooted at the original model and extended by the incremental addition of new constraint properties, as shown in Figure~\ref{fig:tree}. The user can visit the nodes of this tree in any order. As the user inspects the result of applying $\mathbb{C}^P$ to a node in this tree, their own planning model and capability, $\Pi^H$ and $\mathbb{C}^H$, may change, reflecting accumulating understanding of the plans that can be constructed for the model. As a result, the order in which the user visits the nodes matters and can lead to different outcomes. One possible path, showing the evolving capability and model for the user, is shown in Figure~\ref{fig:tree2}. This figure should not be interpreted as implying that the user must explore the tree in a systematic way. It is also worth emphasising that any constraint, $\phi$, may be added to any model, so that the user is not forced to develop a tree of models in any particular way to arrive at the consequence of adding any specific constraint to a model. \begin{figure} \centering \tikzset{every picture/.style={line width=0.75pt}} \begin{tikzpicture}[x=0.5pt,y=0.5pt,yscale=-1,xscale=1] \draw (331,52) -- (408.5,119) ; \draw (310.5,54) -- (236.5,120) ; \draw (319,55) -- (318.5,123) ; \draw (210.5,153) -- (131.5,201) ; \draw (224,155) -- (305.5,209) ; \draw [fill={rgb, 255:red, 0; green, 0; blue, 0 } ,fill opacity=1 ] (362,203.25) .. controls (362,201.46) and (363.46,200) .. (365.25,200) .. controls (367.04,200) and (368.5,201.46) .. (368.5,203.25) .. controls (368.5,205.04) and (367.04,206.5) .. (365.25,206.5) .. controls (363.46,206.5) and (362,205.04) .. (362,203.25) -- cycle ; \draw [fill={rgb, 255:red, 0; green, 0; blue, 0 } ,fill opacity=1 ] (376,203.25) .. controls (376,201.46) and (377.46,200) .. (379.25,200) .. controls (381.04,200) and (382.5,201.46) .. (382.5,203.25) .. controls (382.5,205.04) and (381.04,206.5) .. (379.25,206.5) .. controls (377.46,206.5) and (376,205.04) .. (376,203.25) -- cycle ; \draw [fill={rgb, 255:red, 0; green, 0; blue, 0 } ,fill opacity=1 ] (390,203.25) .. controls (390,201.46) and (391.46,200) .. (393.25,200) .. controls (395.04,200) and (396.5,201.46) .. (396.5,203.25) .. controls (396.5,205.04) and (395.04,206.5) .. (393.25,206.5) .. controls (391.46,206.5) and (390,205.04) .. (390,203.25) -- cycle ; \draw (423,157) -- (507.5,212) ; \draw (121,235) -- (89.5,297) ; \draw [fill={rgb, 255:red, 0; green, 0; blue, 0 } ,fill opacity=1 ] (304,300.25) .. controls (304,298.46) and (305.46,297) .. (307.25,297) .. controls (309.04,297) and (310.5,298.46) .. (310.5,300.25) .. controls (310.5,302.04) and (309.04,303.5) .. (307.25,303.5) .. controls (305.46,303.5) and (304,302.04) .. (304,300.25) -- cycle ; \draw [fill={rgb, 255:red, 0; green, 0; blue, 0 } ,fill opacity=1 ] (318,300.25) .. controls (318,298.46) and (319.46,297) .. (321.25,297) .. controls (323.04,297) and (324.5,298.46) .. (324.5,300.25) .. controls (324.5,302.04) and (323.04,303.5) .. (321.25,303.5) .. controls (319.46,303.5) and (318,302.04) .. (318,300.25) -- cycle ; \draw [fill={rgb, 255:red, 0; green, 0; blue, 0 } ,fill opacity=1 ] (332,300.25) .. controls (332,298.46) and (333.46,297) .. (335.25,297) .. controls (337.04,297) and (338.5,298.46) .. (338.5,300.25) .. controls (338.5,302.04) and (337.04,303.5) .. (335.25,303.5) .. controls (333.46,303.5) and (332,302.04) .. (332,300.25) -- cycle ; \draw (313,29) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle \Pi^P $}; \draw (182,128) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle \Pi^P \ \times \ \phi _{1}$}; \draw (290,127) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle \Pi^P \ \times \ \phi _{2}$}; \draw (385,129) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle \Pi^P \ \times \ \phi _{3}$}; \draw (70,212) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle \Pi^P \ \times \ \phi _{1} \ \times \ \phi _{4}$}; \draw (243,214) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle \Pi^P \ \times \ \phi _{1} \ \times \ \phi _{5}$}; \draw (459,215) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle \Pi^P \ \times \ \phi _{3} \ \times \ \phi _{x}$}; \draw (41,310) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle \Pi^P \ \times \ \phi _{1} \ \times \ \phi _{4} \times \phi _{y}$}; \end{tikzpicture} \caption{A fragment of a tree of model restrictions for a planner $P$.} \label{fig:tree} \end{figure} \begin{figure} \centering \tikzset{every picture/.style={line width=0.75pt}} \begin{tikzpicture}[x=0.65pt,y=0.65pt,yscale=-1,xscale=1] \draw (284.5,147) -- (210.5,213) ; \draw (198,339) -- (197.5,407) ; \draw [fill={rgb, 255:red, 0; green, 0; blue, 0 } ,fill opacity=1 ] (375,414.5) .. controls (375,416.43) and (376.46,418) .. (378.25,418) .. controls (380.04,418) and (381.5,416.43) .. (381.5,414.5) .. controls (381.5,412.57) and (380.04,411) .. (378.25,411) .. controls (376.46,411) and (375,412.57) .. (375,414.5) -- cycle ; \draw [fill={rgb, 255:red, 0; green, 0; blue, 0 } ,fill opacity=1 ] (389,414.5) .. controls (389,416.43) and (390.46,418) .. (392.25,418) .. controls (394.04,418) and (395.5,416.43) .. (395.5,414.5) .. controls (395.5,412.57) and (394.04,411) .. (392.25,411) .. controls (390.46,411) and (389,412.57) .. (389,414.5) -- cycle ; \draw [fill={rgb, 255:red, 0; green, 0; blue, 0 } ,fill opacity=1 ] (403,414.5) .. controls (403,416.43) and (404.46,418) .. (406.25,418) .. controls (408.04,418) and (409.5,416.43) .. (409.5,414.5) .. controls (409.5,412.57) and (408.04,411) .. (406.25,411) .. controls (404.46,411) and (403,412.57) .. (403,414.5) -- cycle ; \draw (331,148) -- (395.5,212) ; \draw [fill={rgb, 255:red, 0; green, 0; blue, 0 } ,fill opacity=1 ] (529,320.25) .. controls (529,318.46) and (530.46,317) .. (532.25,317) .. controls (534.04,317) and (535.5,318.46) .. (535.5,320.25) .. controls (535.5,322.04) and (534.04,323.5) .. (532.25,323.5) .. controls (530.46,323.5) and (529,322.04) .. (529,320.25) -- cycle ; \draw [fill={rgb, 255:red, 0; green, 0; blue, 0 } ,fill opacity=1 ] (543,320.25) .. controls (543,318.46) and (544.46,317) .. (546.25,317) .. controls (548.04,317) and (549.5,318.46) .. (549.5,320.25) .. controls (549.5,322.04) and (548.04,323.5) .. (546.25,323.5) .. controls (544.46,323.5) and (543,322.04) .. (543,320.25) -- cycle ; \draw [fill={rgb, 255:red, 0; green, 0; blue, 0 } ,fill opacity=1 ] (557,320.25) .. controls (557,318.46) and (558.46,317) .. (560.25,317) .. controls (562.04,317) and (563.5,318.46) .. (563.5,320.25) .. controls (563.5,322.04) and (562.04,323.5) .. (560.25,323.5) .. controls (558.46,323.5) and (557,322.04) .. (557,320.25) -- cycle ; \draw (251.5,72) .. controls (251.5,61.51) and (260.01,53) .. (270.5,53) -- (352.79,53) .. controls (363.29,53) and (371.79,61.51) .. (371.79,72) -- (371.79,129) .. controls (371.79,139.49) and (363.29,148) .. (352.79,148) -- (270.5,148) .. controls (260.01,148) and (251.5,139.49) .. (251.5,129) -- cycle ; \draw (299.36,99.5) -- (305.78,99.5) -- (305.78,91.1) -- (318.62,91.1) -- (318.62,99.5) -- (325.03,99.5) -- (312.2,105.1) -- cycle ; \draw (124.5,459) .. controls (124.5,448.51) and (133.01,440) .. (143.5,440) -- (248.5,440) .. controls (258.99,440) and (267.5,448.51) .. (267.5,459) -- (267.5,516) .. controls (267.5,526.49) and (258.99,535) .. (248.5,535) -- (143.5,535) .. controls (133.01,535) and (124.5,526.49) .. (124.5,516) -- cycle ; \draw [dash pattern={on 4.5pt off 4.5pt}] (251,112) .. controls (220.31,127.84) and (93.08,224.05) .. (135.17,262.84) ; \draw [shift={(136.5,264)}, rotate = 219.56] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ; \draw [dash pattern={on 4.5pt off 4.5pt}] (129,314) .. controls (98.31,329.84) and (63.21,445.65) .. (107.14,484.84) ; \draw [shift={(108.5,486)}, rotate = 219.56] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ; \draw [dash pattern={on 4.5pt off 4.5pt}] (277.5,498) .. controls (342.18,525.86) and (242.51,227.01) .. (325.24,286.08) ; \draw [shift={(326.5,287)}, rotate = 216.54] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ; \draw (138.5,261) .. controls (138.5,250.51) and (147.01,242) .. (157.5,242) -- (239.79,242) .. controls (250.29,242) and (258.79,250.51) .. (258.79,261) -- (258.79,318) .. controls (258.79,328.49) and (250.29,337) .. (239.79,337) -- (157.5,337) .. controls (147.01,337) and (138.5,328.49) .. (138.5,318) -- cycle ; \draw (186.36,288.5) -- (192.78,288.5) -- (192.78,280.1) -- (205.62,280.1) -- (205.62,288.5) -- (212.03,288.5) -- (199.2,294.1) -- cycle ; \draw (334.5,263) .. controls (334.5,252.51) and (343.01,244) .. (353.5,244) -- (435.79,244) .. controls (446.29,244) and (454.79,252.51) .. (454.79,263) -- (454.79,320) .. controls (454.79,330.49) and (446.29,339) .. (435.79,339) -- (353.5,339) .. controls (343.01,339) and (334.5,330.49) .. (334.5,320) -- cycle ; \draw (382.36,290.5) -- (388.78,290.5) -- (388.78,282.1) -- (401.62,282.1) -- (401.62,290.5) -- (408.03,290.5) -- (395.2,296.1) -- cycle ; \draw (185.58,487.5) -- (192,487.5) -- (192,479.1) -- (204.84,479.1) -- (204.84,487.5) -- (211.25,487.5) -- (198.42,493.1) -- cycle ; \draw (311,26) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle \Pi ^{P}$}; \draw (168,217) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle \Pi ^{P} \ \times \ \phi _{1}$}; \draw (362,221) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle \Pi ^{P} \ \times \ \phi _{3}$}; \draw (142,409) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle \Pi ^{P} \ \times \ \phi _{1} \ \times \ \phi _{2}$}; \draw (236,11) node [anchor=north west][inner sep=0.75pt] [align=left] (initial_computational_ability) {$\displaystyle \mathbb{C}^{H}_{0}$}; \draw (22,13) node [anchor=north west][inner sep=0.75pt] [left = 3pt of initial_computational_ability] [align=left] {{\fontfamily{ptm}\selectfont User's initial Planning Capability}:}; \draw (129,446) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle \mathbb{C}^{P}\left( \Pi ^{P} \times \phi _{1} \times \phi _{2}\right)$}; \draw (151.62,501) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle \mathbb{C}^{H}_{3} ,\ \Pi ^{H}_{3} ,\ \phi _{3}$}; \draw (344.65,249) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle \mathbb{C}^{P}\left( \Pi ^{P} \times \phi _{3}\right)$}; \draw (346.62,303) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle \mathbb{C}^{H}_{4} ,\ \Pi ^{H}_{4} ,\ \phi _{4}$}; \draw (148.65,247) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle \mathbb{C}^{P}\left( \Pi ^{P} \times \phi _{1}\right)$}; \draw (150.62,301) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle \mathbb{C}^{H}_{2} ,\ \Pi ^{H}_{2} ,\ \phi _{2}$}; \draw (263.62,112) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle \mathbb{C}^{H}_{1} ,\ \Pi ^{H}_{1} ,\ \phi _{1}$}; \draw (280.65,58) node [anchor=north west][inner sep=0.75pt] [align=left] (initial_planner_model) {$\displaystyle \mathbb{C}^{P}\left( \Pi ^{P}\right)$}; \draw (140,93) node [anchor=north west][inner sep=0.75pt] [left = 27pt of initial_planner_model] [align=left] {{\fontfamily{ptm}\selectfont First interaction:}}; \end{tikzpicture} \caption{An example of a sequence of interactions between a user and a planner. At each interaction the user updates their planning model and capability, identifies a new constraint, which may or may not incorporate previous constraints. The order in which nodes are explored, as indicated by the dotted line, is entirely under the control of the user. } \label{fig:tree2} \end{figure} We call what we have described above the \textit{Plan Negotiation Problem}. In this problem the user and the planning system must negotiate, through the planning process, to produce an acceptable plan. This problem can arise for many reasons. In the case where a user has an expectation of what the plan should look like that differs from the proposed plan, the user may not accept the proposed plan without understanding why it was produced, or exploring other plan options. A user might be unsure of the quality of the plan but not have the reasoning abilities to properly evaluate the plan quality. The user can explore how alternate actions and decisions that could have been made in the plan affects the plan quality. This will either refute or support their concerns, that either the plan they were presented was of good quality or that there is a plan with better quality. If a better plan cannot be found under the added constraint, this might allay their concerns, while, if a better plan is found, it will confirm the user's suspicions. In either case, the user might go on to explore additional constraints, in search of a better plan, or of better understanding of the plan space. A user might have hidden preferences that are not modelled, and through the addition of constraints can make sure that the plan behaves in such a way that their preferences are fulfilled. Or the user might simply intend to increase their understanding of the model by questioning why certain decisions were made in the plan before being willing to accept it. In each of these cases, reasoning about what did not happen in the plan can give a deeper understanding of the decisions made in the plan and simultaneously explore potentially more suitable plan candidates. The user is offered the opportunity to consider what did not happen in a plan (in particular, why a plan does not satisfy some constraint), by asking the contrastive question ``why is the plan for this model as it is and not one that also satisfies the constraint $\phi$?". As indicated earlier, we require that the user and the system share the same vocabulary. This qualification ensures that any user restriction $\phi$ can actually be understood by the planner -- i.e. that the model $\Pi^P \time \phi$ makes sense. As a result, the user can restrict a model in a way that prevents the planner from using an action in states where some condition is not satisfied, effectively adding a precondition to that action. Similarly, the model can be restricted to prevent the planner exploiting an effect of an action, by constraining the actions that can be applied after the particular action. Although this process will not allow the user to add arbitrary preconditions or eliminate arbitrary effects (since the states that are generated remain faithful to the model the planner is actually using), this observation makes the point that the model restrictions can include close approximations to model revisions that act directly on the actions themselves. An example that illustrates a fragment of the negotiation process is as follows. Using the model $\Pi$ shown in Figures~\ref{fig:domain} and~\ref{fig:problem} and the plan $\pi$ shown in Figure~\ref{fig:plan}, the user might think that the action \textit{(goto\_waypoint Jerry sh4 sh5)} should not be present in the plan ($\phi$), so $\Pi \times \phi = \Pi'$ where the plan $\pi'$ for $\Pi'$ does not contain \textit{(goto\_waypoint Jerry sh4 sh5)}. The user either needs an explanation that will support acceptance of the original plan $\pi$ (by modifying the user's model or planning capability to make this plan acceptable), or the constraint, $\phi$, will guide the search of the planner to a plan $\pi'$ where $M(\pi') > M(\pi)$. The new plan $\pi'$ might not entirely reconcile the user's concerns. It might trigger new questions or still not satisfy the user's expectations. The user can explore the space of plans by iteratively extending and specifying the foil $\phi$, until they are satisfied with the result. It should be noted that, depending on the planning models and capabilities of the two participants, there might not exist any constraint achieving a common solution. For example, in the degenerate case in which $\mathbb{C}^P$ produces no plan at all, for any value of $\phi$, then there can be no negotiated common plan. Typically, the greater the differences between the planning models and capabilities of the two agents, the more likely it will be that there is no common satisfactory solution. We formally capture the iterative process of model restriction and planning as: \begin{definition}\label{def:negprob} \textbf{Iterative Model Restriction} For a planner $P$, and a user $H$: Let $\mathbb{C}^P$ and $\Pi^P$ be the planner's underlying capability and planning model and $\mathbb{C}^H_0$ and $\Pi^H_0$ be the initial capability and planning model of $H$. Let $\phi_i$ be the set of user imposed constraints, which is initially empty, i.e. $\phi_0 = \emptyset$. Each stage, $i$ (initially zero), of this process starts with the planner producing a plan $\pi^P_i = \mathbb{C}^P(\Pi^P_i)$ for the model $\Pi^P_i = \Pi^P \times \phi_i$. The user responds to this plan $\pi^P_i$ by potentially updating their capability and model to $\mathbb{C}^H_{i+1}$ and $Pi^H_{i+1}$ and then either terminating the interaction, or asking a question that imposes a new constraint $\phi_{i+1}$ on the problem. This results in the planner solving a new constrained problem $\Pi^P_{i+1} = \Pi^P \times \phi_{i+1}$ at the next step . \end{definition} Although it is possible that the planner will fail to produce a plan at some stage, $i$, we do not address the problem of explaining the unsolvability of plans in this paper~\cite{bel10,sre19}. Nevertheless, the failure will be observed by the user and it can trigger a decision to either select a previous plan $\pi^P_j$ for some $j<i$, or explore a new constraint $\phi_{i+1}$ for the next iteration. We have assumed here that the planners underlying capability and planning model $\mathbb{C}^P$ and $\Pi^P$ do not evolve during the process. While this is not strictly necessary, possible evolution or improvement of the planner capabilities and model based on the sequence of user questions and the resulting $\phi_i$ is an issue we do not consider here. In contrast, the user's capability and planning model $\mathbb{C}^H$ and $\Pi^H$ are assumed to evolve, but in unknown ways. Again, we do not attempt to model the user's learning process. \subsection{Ending Negotiation} The process we have described is one in which a user explores a tree of model restrictions, rooted at the original model. At each node in the tree the planner will produce some output (although possibly no plan) and the user will revise their personal planning model and capability. This revision might be trivial, in that the user might simply retain the model and capability they held at the previous iteration. The model revisions need not converge in any sense, but at some point the negotiation will end. We now briefly consider the status of the negotiation at the conclusion of an interaction. One way that the negotiation can end is that the plan produced for the final model yields a plan that is acceptable to the user, so that the user adopts this plan for the original model. This is a case where the system and the user converge on a plan that is mutually agreed to be a solution to the original model, meeting conditions that might or might not have been part of the original model and that the user might or might not have envisaged at the outset of the negotiation. Another way the negotiation can end is with the user having explored the plans for several models and, finally, having been persuaded in this process that the first plan produced by the planner for the original model is actually the desired plan, the user modifies their planning model and capability so that this is a plan for the original model of the planner and revised model of the user. Again, this is a mutually agreed plan, but in this case it is not the last plan produced, but the first; the negotiation process in this case acts to help the user to arrive at a point where they are persuaded that it is the plan that they want. In contrast to the first case, where the user might not ever modify their planning model or capability, in this second case the user must modify their planning model and capability to accept the plan for the original planner model. This process is the idealised form of plan explanation we anticipate: the user explores the plans for restricted models in order to understand why the original plan is the correct plan for the problem and they adapt their own planning model and capability to reflect this conclusion. The negotiation can also lie somewhere between these two variants, with the user concluding the negotiation after adopting a plan produced for some intermediate model in the negotiation, modifying their planning model and capability to include this mutually agreed plan. A final outcome is one in which the user explores the space and then rejects all of the plans the planner offers. In this case, the user might modify their planning model and capability as a consequence of what they observe and they might or might not conclude the process with a satisfactory plan for the original model. In this case, there is no mutually agreed plan and the negotiation might not even have helped the user arrive at any useful conclusions about the problem. Despite the fact that all of these outcomes are possible, it is impossible to determine, from the perspective of the system, which of them has been achieved at the end of a negotiation. The system has no access to the planning model or capability of the user and does not construct queries to probe it. The hypothesis we explore, in the user study we describe in Section~\ref{sec:userstudy}, is that the user will usually find value in the negotiation and conclude in one of the three cases in which a mutually agreed plan is identified. As can be seen, it remains impossible to be sure which plan is the mutually agreed plan at the conclusion of the negotiation. \section{Related Work} \label{sec:rel} As discussed earlier, several researchers (e.g: Mueller et al.~\citeyear{mue19}) have drawn a distinction between local and global questions and the corresponding explanations. The study in Section~\ref{sec:taxonomy} showed that local questions are significant for XAIP, and that many of these questions are contrastive in nature. In this section we present an overview of additional related research on explanation with a focus on local questions and explanations. We start with a brief description of relevant background ideas from Philosophy, Psychology and Cognitive Science, which have contributed to current views on explanation. We then focus in on more recent related work on local explanation from XAI, and finally on work in XAIP, which is most closely related to the work described here. \subsection{Philosophy, Psychology and Cognitive Science} There is a vast body of literature in the fields of philosophy, psychology, and cognitive science on the topic of explanation. Much of the early work in this area focused on \textit{causal explanation}, namely the idea that questions could be answered by identifying and elucidating the causes for a particular event or result being questioned. Hume~\citeyear{hum48} noted that if there is a cause between two events, the first is always followed by the second. Lewis~\citeyear{lew74} expanded on this, arguing that we should understand Hume's definition wherein if an event \textit{C} causes the event \textit{E} and, if under some hypothetical case, \textit{C} did not happen then neither would \textit{E}. Lewis~\citeyear{Lewis1986-LEWCE} then argued that to explain an event one must provide some information about its causal history. Although, this may be enough to explain why an event happened, it does not answer all questions about an event. One could not use the causal history of an event alone to answer if it was the best outcome, what would happen if the event did not occur, or if another event occurred in it's place. As a consequence, more recent work on explanation has introduced and considered notions of contrastive questions and explanations. In particular, philosophers, such as van Fraassen~\citeyear{van80}, have argued that ``why"-questions can be implicitly or explicitly understood as: ``why is A better than some alternatives?". This is what we describe as a local contrastive question, where the questioner wants to understand why a plan is good, or why a particular decision was made. These questions can be answered with contrastive explanations. Van Bouwel and Weber~\citeyear{bou02} defined four types of explanatory questions, three of the four are explicit local contrastive why questions that call for explaining the differences between either real or hypothetical alternatives. They argue that the final explanatory question is not contrastive, and is asked when the user wants a global understanding of the properties of objects. However, most other researchers think all ``why" questions ask for contrastive explanations, whether the contrast case is implicitly or explicitly stated~\cite{hil90,lipton_1990,lom12}. Hilton~\citeyear{hil90} recognised that one does not explain an event, but instead explains why the event occurred in one case but not in a counterfactual (hypothetical) contrast case. This is the basis of contrastive explanations. Lipton~\citeyear{lipton_1990} argues that the cognitive burden of complete explanations is too great. He goes further by demonstrating that explaining a contrastive question is less demanding because it is enough to show what is different between the two cases instead of a full causal analysis. Miller~\citeyear{mil18} extended structural causal models~\cite{hal05c,hal05e} to contrastive explanations based on Lipton's Difference Condition. Lipton's difference condition states that to explain why \textit{P} rather than \textit{Q}, one must cite a causal difference between \textit{P} and not-\textit{Q}, consisting of a cause of \textit{P} and the absence of a corresponding event in the history of not-\textit{Q}~\cite{lipton_1990}. Hilton~\citeyear{hil90} argues that explanation is a conversation. We have adopted this strategy by treating explanation as an iterative process where the human continues to ask contrastive questions as a means of understanding plans, and imposing additional constraints on the planning problem. \subsection{Explainable AI} Meuller et al.~\citeyear{mue19} provide an overview of the landscape of research into Explainable AI (XAI). This work spans several decades, and includes work carried out with intelligent tutoring systems, XAI hypotheses and models, and explanation in expert systems. The early work on explanation in expert systems provided causal explanation for conclusions, often in the form of chains of rules contributing to the conclusion~\cite{van78}. Recently, there has been a resurgence of interest in explanation in XAI, both when the model is and is not interpretable. This is, in large part, due to the difficulty of understanding the results of deep learning systems~\cite{rud19}. Madumal et al.~\citeyear{mad19} use structural causal models to answer \textit{``why?"} and \textit{``why not?"} questions in Reinforcement Learning systems. They learn approximate causal models for counterfactuals to explain the local contrastive question \textit{``why not action B (rather than A)?"}, by simulating what would happen if B was performed, and providing a contrastive explanation showing the difference between the causal chain of \textit{A} and \textit{B}. They provide minimally complete explanations to answer questions of the form \textit{''why action A?"}. However, the explanation is more of a justification that the action \textit{A} contributes to the goal in some way based on the global model, rather than explaining why the decision was made to perform the action as opposed to some other action or not at all. We argue that users need explanations to a wider set of questions to understand the reasoning behind a particular decision. As a user may not have any knowledge of the inner workings of a black box system, researchers have focused on providing global explanations for how a system came to a particular outcome~\cite{kri99,joh09,aug12}. However, researchers have recently tried to tackle the problem of providing local explanations for why a black box system arrived at an outcome. For example an image classifier might recognise an image as a bird; Ribeiro et al.~\citeyear{rib16} provide a way to highlight features of the image to help justify its decision, for example highlighting the birds beak and wings. However, Hoffman et al.~\citeyear{hof18c} have argued that neither of these approaches is enough and that users must be able to ask contrastive why questions through a process they call explanation as exploration to best understand black box models. Our approach of explanation as an iterative process is similar to what they propose. Hoffman et al.~\citeyear{hof18} give a thorough overview on evaluating explanations. They focus mainly on techniques that can be used to measure XAI constructs. These include measuring explanation goodness and satisfaction, mental models, curiosity, and trust. We adopted the proposed metrics for evaluating explanation goodness and satisfaction in our experimental evaluation in Section~\ref{sec:userstudy}. There have also been recent efforts within XAI on \emph{human-centered} explainability \cite{miller2017inmates,mil19,lim09}. Until recently, there has been only limited investigation to determine what users actually want explained. Haynes, Cohen, and Ritter~\citeyear{hay09} proposed a taxonomy, based on that of Graesser et al.~\citeyear{gra92} and Lehnert~\citeyear{leh78}, that they empirically tested using a pilot simulation tool. In this case, they found that \textit{definition} questions were the most common, as the users were tasked with operating an unfamiliar tool. Their end-goal was to understand how to use the tool rather than a plan. Lim, Dey, and Avrahami~\citeyear{lim09} looked at the following questions, ``why", ``why-not", ``how", and ``what if". They found that ``why" and ``why-not" questions led to the best improvement in understanding amongst users. Penney et al.~\citeyear{pen18} used this taxonomy to study how users foraged for information in the game StarCraft. For assessing an agent, they found that ``what" questions were asked most frequently (over 70\%), followed by ``why" questions. They reasoned that, in their domain, the most common questions related to uncovering hidden information about the current and past states. In contrast, the taxonomy presented in Section~\ref{sec:taxonomy} shows that, when presented with a plan, user questions are more commonly the ``why'' questions that relate to actions. \subsection{Explainable AI Planning} In the specific context of AI Planning, explanation has received attention from a number of researchers. We consider relevant related work in this section, focusing on three issues: the role of model reconciliation, the role of contrastive explanations and the explanation of unsolvable planning problems. \subsubsection{Model Reconciliation} Chakraborti et al.~\citeyear{cha17} adopt the position that explanation is a {\em model reconciliation problem (MRP)}~-- namely, that the need for explanation is due to differences between the agent's and the human's model of the planning problem. The planning system therefore ``suggests changes to the human's model, so as to make its plan be optimal with respect to that changed human model''. In that work, Chakraborti et al. describe an approach for generating minimally complete and monotonic explanations that update the users model, so that it will accept a plan as correct. The approach assumes that the user model is known. In contrast, Sreedharan~\citeyear{sre18} generates conformant explanations that are applicable to a set of possible user models in cases where the user's model is not precisely known. Both approaches consider only {\em optimal} solutions for classical planning problems. In general, the assumption that plans must be optimal in order to support explanation is troublesome. Optimal planning for temporal and numeric problems (which we consider here) is undecidable. In addition, the metric or preferences by which plans should be assessed might differ between the human and agent, as Smith~\citeyear{smi12} suggests. Of course, the preferences and optimisation criteria could be considered as part of the model, in which case the {\em model reconciliation} perspective would still be appropriate. However, to date, these aspects of the model have not received much attention. As in the model reconciliation work, we suppose that the user and agent may have different models. We also suppose that they may have different preferences, and different computational abilities. However, we don't assume that either the agent or the human have direct knowledge about the other's model or capabilities, or that they do optimal planning. Instead, we have considered the problem of plan explanation to be one of {\em model restriction} where the human can impose additional constraints on the planning problem (through contrastive questions). As we noted in Section~\ref{subsec:problem}, model restriction could be considered as a special case of model reconciliation, in which the planning agent's model is temporarily revised by imposing the constraints implied by a contrastive question. However, these constraints do not result in permanent changes to the agent's model of the world, or model of the planning domain~-- they are temporary restrictions on the plan trajectory. It's also true that the human's interaction and questioning might result in evolution of their own model of the planning domain or problem. However, we do not assume that the agent has any knowledge of the human's model, and we do not attempt to model the human's learning process. A complementary line of work is that of generating plans that are more \textit{explicable} within the framework of a human user's model. Zhang et al.~\citeyear{zha17} proposed generating explicable plans by postulating that humans understand plans by associating the actions in the plan with abstract tasks. They learn what abstract tasks humans associate to actions and use this to produce new more explicable plans. Kulkarni et al.~\citeyear{kul16} model explicability by first computing the distances between the plans generated by a planning agent and plans expected by the user. Human subjects are then asked to label the actions in the agent plans as explicable. These results are used along with the plan distances to form a regression model called explicability distance. Explicability distance is then used as the heuristic to search for explicable plans. It is not always possible to produce explicable plans if the agent model does not allow for what the user expected and explanations are needed. Work on generating explicable plans can be seen as complementary to work on explanation; explicable plans should reduce the need for explanation, but do not eliminate it. To date, this work has assumed different models for the planner and the human. As a result, an explicable plan is one which is reasonable in the human's model, so that a planner can use that model to generate explicable plans. This work has not seriously addressed situations in which the models are the same, but the plan is simply too complicated for the user to understand easily or quickly. In this case, a more explicable plan would presumably be one which is smaller and simpler for the human to reason about. This work has also not seriously addressed situations where the human and agent have the same models of actions and of the world state, but different preferences or optimisation criteria. In this case, an explicable plan would be one which is good according to the user's preferences and optimisation criteria. \subsubsection{Contrastive Explanations of Plans} In addition to the work previously cited~\cite{fox17}, highlighting the role of contrastive questions in XAIP, Eifler et al.~\citeyear{eif20} approach answering local contrastive questions by explaining the reason that a contrast case \textit{B} was not in the plan, or a feature of the plan, by using the properties that would hold if \textit{B} {\em were} the case. This is in contrast to our approach in which we give a specific plan trace containing \textit{B}. Kim et al.~\citeyear{kim19} detail a general approach for generating differences between plan traces using Bayesian inference with search for inferring contrastive explanations as linear temporal logic specifications. These resulting differences can then be used to generate contrastive explanations. However, they do not consider how to generate the different plan traces, or how they can be used to answer specific questions. Kasenberg et al.~\citeyear{kas19} focus on justifying an agent's behaviour based on deterministic Markov decision problems. They construct explanations for the behaviour of an agent governed by temporal logic rules and answer questions including contrastive \textit{``why"} queries. However, they only recognise implicit contrastive questions of the form \textit{``why A?"} (or \textit{``why }$\neg$\textit{A?"}) which they explain by citing rules and goals dictating that they had to (or could not) perform \textit{A}. Whereas we argue that users must be able to ask explicit contrastive questions of the form \textit{``why A rather than B?"} which can usually only be answered by generating a hypothetical plan where \textit{B} is included and \textit{A} is absent. Bercher et al.~\citeyear{ber14b} also provide explanations for implicit contrastive \textit{why} questions in a system that helps users to assemble a home theatre. The explanations consist of the set of reasons that an action is present in the plan. Chakraborti et al.~\citeyear{cha19b} show how these kinds of explanations can be minimised by selecting the most relevant explanatory content. Like the previous work by Kasenberg et al., these approaches do not utilise more comprehensive techniques for counterfactual reasoning in order to construct alternative plans, and compare them with the original. \subsubsection{Unsolvability} A special kind of ``why'' question is: ``why didn't you find a solution to this problem?'' While there has been recent work on the generation of unsolvability certificates for planning problems~\cite{eri17,eri20}, these are not very satisfying as explanations. Gobelbecker et al.~\citeyear{gob10} argue that excuses must be made for why a plan cannot be found. These are counterfactual alterations to the planning task such that the new planning task will be solvable. They provide an algorithm to produce these excuses in a reasonable time. Sreedharan et al.~\citeyear{sre19} address the problem of explaining unsolvability by considering relaxations of the planning problem until a solution can be found, and then looking for landmarks of this relaxed problem that cannot be satisfied in less relaxed versions of the problem. The unsatisfiability of these landmarks provides a more succinct description of critical propositions that cannot be satisfied. Eifler et al.~\citeyear{eif20} has taken a somewhat different approach by deriving properties that must be obeyed by all possible plans. Although this is not the focus of this work, these too could serve as explanations in cases of unsolvability. We have not attempted to provide explanations for unsolvability of planning problems in this paper. However, since we allow for the user's and agent's models and computational abilities to differ, it is certainly possible that the model restriction imposed by a contrastive question may result in a planning problem that is unsolvable by the planning system. Addressing this issue is left to future work. \section{Contrastive Taxonomy}\label{sec:taxonomy} Several researchers have observed (e.g: Mueller et al.~\citeyear{mue19}) that it is useful to draw a distinction between {\em local} and {\em global} questions and the corresponding explanations. Local questions are asked when users want explanations for specific decisions made in a system. Whereas global questions are asked when users want a better understanding of how the system makes decisions in general. In both cases, the context might be restricted to explanations relative to a specific model, so that a local question asks about a specific decision made in solving a problem framed within that model, while a global question asks about the model as a whole or the way that the model is used by the system. In the context of a plan, a global question might be asked because the inquirer does not fully understand the model used by the planner, and therefore does not understand how the plan represents a solution. On the other hand, a local question can be asked even in the case that the user fully understands the model, but does not wish to reason through the details themselves, or does not understand why the plan is a good one. As an example, when plan-based control was used to automate drilling~\cite{der18}, the process involved a series of stages during which the nature of required explanations evolved. During initial development users primarily asked global questions to validate their understanding of the model, ensuring its correctness, and building trust in the system. As this trust was built and the model used by the planner became well-understood, users were more likely to ask local questions seeking to understand the intention behind specific actions in a plan, or to better understand alternatives to that choice. These local explanations are asked in a variety of contexts. Domain experts wish to challenge a decision made by the planner when they possess insight into the domain that they believe can improve upon a sub-optimal plan. Often the users are simply interested in exploring the space of plans and ask questions to suggest alternative decisions, and better understand their impact. In the former case, a sceptical expert might seek to demonstrate weakness in the way that the system made a decision, while in the latter case the role of the system is promoted to an advisor or aide, with the user relying on the system to support exploration of the space of alternative solutions. The interrogative word used when asking local questions is \textit{why}, whereas for global questions it is usually \textit{how} or \textit{what}. Research from the social sciences \cite{mil18} argues that \textit{why} questions are typically \emph{contrastive}; that is, they are of the form ``Why A rather than some hypothetical \textit{foil} B?". Based on these observations, we hypothesise that when the model is well-known users ask more local, contrastive \textit{why} questions than global \textit{how} or \textit{what} questions. Contrastive questions capture the context of the question, they provide an insight into what the questioner needs in an explanation~\cite{Lewis1986-LEWCE}. Garfinkel~\citeyear{gar82} illustrates this with a story about a famous bank robber, Willie Sutton, who, when asked asked why he robbed banks, replied ``That's where the money is.". Sutton answered the question ``Why do you rob banks rather than other things?", instead of the question ``Why do you rob banks rather than not robbing them?". The foil was not explicitly stated in the question and so was left ambiguous. Garfinkel argues that explanations are relative to these contrastive contexts, and that they can be made unambiguous by explicitly stating the contrast case. A contrastive question asked about a plan can be answered with a \textit{contrastive explanation} which will highlight the differences between the original plan and a contrastive plan that accounts for the user suggested foil. Providing contrastive explanations is not only effective in improving understanding, but is simpler than providing a full causal analysis~\cite{mil19}. They are also naturally good for comparisons, as we can directly compare the original plan with a plan containing the user foil. To support our hypothesis empirically we investigated which questions users ask when faced with a plan produced by a planner. We conducted a study with 15 participants, which is a typical number for this type of user study~\cite{nie00,fau03}, to gain an insight into the types of questions that users pose about a planning system in three planning scenarios. Our null hypothesis and alternate hypothesis, $H_0$ and $H_a$ are as follows: \begin{quote}$H_0$: Users ask an equal distribution of \textit{why}, \textit{how}, and \textit{what} questions about planning scenarios, when the model is well known.\end{quote} \begin{quote}$H_a$: Users ask more \textit{why} questions than \textit{how} or \textit{what} questions about planning scenarios, when the model is well known.\end{quote} Each question asked was categorised by the interrogative word used, either \textit{what}, \textit{how}, or \textit{why}. The full description of the experiment design, results, and analysis can be found in Appendix~\ref{appendixA}. The results are summarised in Table~\ref{tablehyp}. Performing a chi-square test, $\chi^2(2, 168) = 273.25$, P-value $< 0.00001$, these results are therefore significant at $p < 0.001$. We can therefore reject our null hypothesis, $H_0$, and accept our alternate hypothesis, $H_a$. \begin{table}[t] \centering \begin{tabular}{lrrrr} \toprule Question & & & \\ Type & Video 1 & Video 2 & Video 3 \\ \midrule What? & 2 & 1 & 3\\ How? & 0 & 3 & 2\\ Why? & 65 & 50 & 42\\ \bottomrule \end{tabular} \caption{Frequency of questions by video categorised by Miller's taxonomy.} \label{tablehyp} \end{table} \subsection{Taxonomy of Questions} Following our accepted hypothesis, we focus on providing explanations for \textit{why} questions. We categorised each \textit{why} question from the three different domains in the user study above into a taxonomy of questions which we call the \textit{Contrastive Taxonomy}. The Contrastive Taxonomy is shown in Table~\ref{table0}. This shows the frequency of questions asked by users about the plans produced for three different domains, and represents a set of questions that are important for a plan-based system to answer. The Contrastive Taxonomy shown in Figure~\ref{table0} illustrates the breakdown of the questions categorised by the explanatory objective of the question. The questions in categories FQ1 to FQ7 are of the form ``Why \textit{A} rather than \textit{B}?" and are clearly contrastive. They are also local questions because they each query decisions made in the plan in terms of actions that were or were not chosen to be performed and when. Prompted by the results gained from this study, we have chosen to focus on explanation for local \textit{why} questions. In this categorization, 89.9\% of the 168 questions are contrastive and local in nature. As a result, the remainder of this paper focuses on explanation for contrastive local questions. A small number of questions that were not contrastive or local, \textit{how} (5) and \textit{what} (6) questions, were classed in the final category FQ8. There were also a small number (6) of \textit{why} questions that were classified as out of the scope of this paper. A question was classed out of the scope of the paper if it was not related to the planning system or the plan produced. For example, some participants questioned the animation system used to visualise the plan execution. These questions were still local and contrastive in nature, just not questions relevant to planning systems and therefore not ones we are concerned with answering. In Section~\ref{sec:comp} we present a novel approach to compiling constraints derived from these questions into planning models to demonstrate the users query. Using the Contrastive Taxonomy, we can assert the percentage of user questions that we can address with this approach, as well as gain insights into the different types of questions users ask in real world examples. Our approach directly addresses formal question (FQ) types FQ1-7 which cover all of the contrastive questions asked by the users about plans in the above study. We can provide compilations of 89.8\% of the 168 questions that users asked. \begin{table}[!t] \centering \begin{tabular}{ l p{13cm} r} \toprule & Question Type& \#\\ \midrule FQ1 & Why is action A not used in the plan, rather than being used? & 17\\ FQ2 & Why is action A used in the plan, rather than not being used? & 75\\ FQ3 & Why is action A used in state S, rather than action B? & 35\\ FQ4 & Why is action A used outside of time window W, rather than only being allowed within W? & 6\\ FQ5 & Why is action A not performed before (after) action B, rather than A being performed after (before) B? & 10\\ FQ6 & Why is action A not used in time window W, rather than being used within W? & 2\\ FQ7 & Why is action A used at time T, rather than at least some time T' after/before T? & 6\\ FQ8 & Non-contrastive or out of scope& 17\\ \bottomrule \end{tabular} \caption{Frequency of questions categorised into the Contrastive Taxonomy. We provide explanations for questions FQ1 - 7.} \label{table0} \end{table}
\section{Introduction} The analysis of free-hand sketches using deep learning \cite{pengxu_survey} has flourished over the past few years, with sketches now being well analysed from classification \cite{sketchanet1,sketchanet2} and retrieval \cite{sketchx_fgsbir_1,sketchx_fgsbir_2,bhunia2020sketch} perspectives. Sketches for digital analysis have always been acquired in two primary modalities - \emph{raster} (pixel grids) and \emph{vector} (line segments). Raster sketches have mostly been the modality of choice for sketch recognition and retrieval \cite{sketchanet1,sketchx_fgsbir_1}. However, generative sketch models began to advance rapidly \cite{ha2017neural} after focusing on vector representations and generating sketches as sequences \cite{bowman2016generating,srivastava2015unsupervised} of waypoints/line segments, similarly to how humans sketch. As a happy byproduct, this paradigm leads to clean and blur-free image generation as opposed to direct raster-graphic generations \cite{dcgan}. Recent works have studied creativity in sketch generation \cite{ha2017neural}, learning to sketch raster photo input images \cite{song2018learn2Sketch}, learning efficient human sketching strategies \cite{bhunia2020pixelor}, exploiting sketch generation for photo representation learning \cite{wang2020sketchembednet}, and the interaction between sketch generation and language \cite{huang2020scones}. \begin{figure} \centering \includegraphics[width=\linewidth]{figs/banner_v4.pdf} \caption{Cloud2Curve capability teaser. Top: Our trained model can vectorize a pen-on-paper sketch using scalable parametric curves. Bottom: Cloud2Curve can be trained on raster datasets such as KMNIST, where existing generative models cannot.} \label{fig:teaser} \end{figure} \ayandas{ We present Cloud2Curve, a framework that advances the generative sketch modeling paradigm on two major axes: (i) by generating \emph{parametric sketches}, i.e., a compositions of its constituent strokes as scalable parametric curves; and (ii) providing the ability to sample such sketches given point-cloud data, which is trivial to obtain either from raster-graphic or waypoint sequences. Altogether, our framework uniquely provides the ability to generate or deterministically vectorize scalable parametric sketches based on point clouds, as illustrated in Figure~\ref{fig:teaser} and explained below. } First, we note that although existing frameworks like SketchRNN \cite{ha2017neural} and derivatives generate vector sketches, they do so via generation of a dense sequence of short straight line segments. \ayandas{Consequently, (i) the output sketches are not \emph{spatially scalable} as required, e.g., for digital art applications, (ii) they struggle to generate \emph{long} sketches due to the use of recurrent generators \cite{pascanu2013difficulty}, and (iii) the generative process suffers from low interpretability compared to human sketching, where the human mental model relies more on composing sketches with smooth strokes.} While there have been some initial attempts at scalable vector sketch generative models \cite{das2020bziersketch}, they were limited by the need for a two step training process, and to generate parametric B\'ezier curves of a fixed complexity, which poorly represent the diverse kinds of strokes in human sketches. In contrast, we introduce a machinery to dynamically determine the optimal complexity of each generated curve by introducing a continuous \emph{degree} parameter; and our model can further be trained end-to-end. \ayandas{Second, existing generative sketch frameworks require purely sequential data in order to train their sequence-to-sequence encoder-decoder modules. This necessitates the usage of specially collected sequential datasets like \emph{Quick, Draw!}{} and not general purpose raster sketch datasets. In contrast, we introduce a framework that encodes point-cloud training data and decodes a sequence of parametric curves. We achieve this through an inverse-graphics \cite{kulkarni2015vig,romaszko2017vig} approach of reconstructing training images/clouds by rendering its constituent strokes individually through a white-box B\'ezier decoder over several time-steps. To train this framework we compare reconstructed curves with the original segmented point cloud strokes with an Optimal Transport (OT) based objective. We show that such objectives, when coupled with appropriate regularizers, can lead to \emph{controllable abstraction} of sketches. } To summarize our contributions: \textbf{1)} We introduce a novel formulation of B\'ezier curves with a continuous degree parameter that is automatically inferred for each individual stroke of a sketch. \textbf{2)} \ayandas{We develop Cloud2Curve, a generative model capable of training and inference on point cloud data to produce spatially scalable \emph{parametric sketches}}. \textbf{(3)} We demonstrate scalable parametric curve generation from point-clouds, using \emph{Quick, Draw!}{} and a subset of K-MNIST \cite{kmnistdataset} datasets. \section{Related Works} \keypoint{Generative Models} Generative models have been widely studied in machine learning literature \cite{bishop2006pattern} as a way of capturing complex data distributions. Probabilistic Graphical Models \cite{koller2009probabilistic} were hard to scale with variational methods \cite{blei2017variational}. With the advent of deep learning, neural approaches based on Variational Autoencoder (VAE) \cite{Kingma2013AutoEncodingVB} and Generative Adversarial Networks (GAN) \cite{GANgoodfellow14} were more scalable and able to generate high-quality images. The general formulation of VAE has been adapted to numerous problem settings. \cite{srivastava2015unsupervised} proposed the first model to encode sequential video data to a smooth latent space. Later, \cite{bowman2016generating} showed an effective way to train sequential VAEs for generating natural language. SketchRNN \cite{ha2017neural} followed a sequence model very similar to \cite{graves2013generating} and learned a smooth latent space for generating novel sketches. \cite{ganin2018imagePrograms} proposed a generative agent that learns to draw by exploring in the space of programs. Its sample inefficiency was ameliorated by \cite{zheng2018strokenet} through creating an environment model. More recently, the Transformer \cite{vaswani2017transformer} has been used to model sketches \cite{ribeiro2020sketchformer} due to the permutation invariant nature of strokes. \keypoint{Parametric representation} Although used heavily in computer graphics \cite{salomon2007curves}, parametric curves like B\'ezier, B-Splines, Hermite Splines have not been used much in mainstream Deep Learning. An early application of splines to model handwritten digits \cite{digit_splines_hinton} used a density model around b-splines and learns the parameters from a point-cloud using log-likelihood. B-Splines have been used as stroke-segments while representing handwritten characters with probabilistic programs \cite{lake_bpl}. SPIRAL \cite{ganin2018imagePrograms} is a generative agent that produces program primitives including cubic B\'ezier curve. The font generation model in \cite{fontgen_iccv} and more recently DeepSVG Icon generator \cite{carlier2020deepsvg} treats fonts/icons as a sequence of SVG primitives. However, this requires the ground-truth SVG primitives. In contrast, we take an inverse graphics approach that learns to render point-clouds using parametric curves -- without any parametric curve ground-truth in the training pipeline. Stroke-wise embeddings are studied in \cite{aksan2020cose}, but this produces non-interpretable representations of each stroke, and still requires sequence data to train, unlike our inverse graphics approach. In summary, none of these methods can apply to raster data such as K-MNIST which we demonstrate here. \keypoint{Learning parametric curves} The field of computer graphics \cite{salomon2007curves} has seen tremendous use of parametric curves \cite{deboor} in synthesizing graphics objects. However, parametric curves are still not popular in mainstream deep learning due to their usage of an extra latent parameter which is difficult to incorporate into a standard optimization setting. The majority of algorithms for fitting B\'ezier \cite{cubicbezierfit,advancecubicbezierfit} or B-Splines \cite{splienfit_persample1,splinefit_persample2,bspline_lbfgs} are based on alternatively switching between optimizing control points and latent $t$ values which is computationally expensive, requires careful initialization and not suitable for pluging into larger computational graphs trained by backpropagation. Recently, B\'ezierEncoder \cite{das2020bziersketch} was proposed as a fitting method for B\'ezier curves by means of inference on any arbitrary deep recurrent model. We go beyond this to also infer curve degree, and fundamentally generalize it for training on point-cloud/raster data. \begin{figure}[t] \centering \includegraphics[width=\linewidth]{figs/overall.pdf} \caption{Overall diagram of the Cloud2Curve generative model.} \label{fig:overall} \end{figure} \section{Methodology} The mainstream sketch representation popularized by \emph{Quick, Draw!}{}, encodes a sketch as an ordered list of $L$ waypoints $[ (\mathbf{x}_i, \mathbf{q}_i) ]_{i=1}^L$ where $\mathbf{x}_i \in \mathbb{R}^2$ is the $i^{th}$ waypoint and $\mathbf{q}_i = ( q^{stroke}_i, q^{sketch}_i )$ is a tuple containing two binary variables denoting stroke and sketch termination. State-of-the-art sketch generation models such as SketchRNN \cite{ha2017neural} directly use this data structure for modelling the probability of a given sketch as the product of probabilities of individual waypoints given the previous waypoints \vspace*{-0.3cm} \begin{equation} \label{eq:sketchrnn} p_{sketchrnn}(\cdot) = \prod_{i=1}^L p(\mathbf{x}_i, \mathbf{q}_i \vert \mathbf{x}_{<i}, \mathbf{q}_{<i}; \theta) \end{equation} \noindent \ayandas{where the subscript $<i$ denotes the set of all indices before $i$. Our method treats sketches as a sequence of parametric curves, so we re-organize the data structure in terms of its strokes. We define a sketch $\mathcal{S} \triangleq [ \mathbf{S}_k ]_{k=1}^K$ as a sequence of its $K$ (may vary for each sketch) constituent strokes. Some recent methods substitute the original $\mathbf{S}_k$ with separately learned non-interpretable transformer-based embedding \cite{aksan2020cose} or directly interpretable learned B\'ezier curves \cite{das2020bziersketch} with fixed degree. However, our method stands out due to the specific choice of variable degree B\'ezier curves as stroke embedding which is \emph{end-to-end trainable} along with the generative model.} Furthermore, we simplify $\mathbf{S}_k$ by restructuring it into $(\mathbf{s}_k, \mathbf{v}_k)$ where $\mathbf{s}_k$ denotes a position-independent stroke and $\mathbf{v}_k$ is its position relative to an arbitrary but fixed point. This restructuring not only emphasizes the compositional relationship \cite{aksan2020cose} within the strokes but also helps the generative model learn position invariant parametric curves. \subsection{Generative Model} \label{sec:genmodel} Before defining our new variable-degree parametric stroke model in Section~\ref{sec:curverep} and the training objective in Section~\ref{sec:bezierloss}, we introduce the overall generative model. \keypoint{Decoder/Generator} Unlike SketchRNN \cite{ha2017neural}, but similar to B\'ezierSketch \cite{das2020bziersketch} and CoSE \cite{aksan2020cose}, we model a sketch $\mathcal{S}$ autoregressively as a sequence of parametric strokes $\mathbf{P}_k$, \begin{equation} \label{eq:ourmodel} p(\mathcal{S}) = \prod_{k=1}^K p(\mathbf{\mathbf{P}}_k, \mathbf{v}_k, \mathbf{q}_k \vert \mathbf{\mathbf{P}}_{<k}, \mathbf{v}_{<k}, \mathbf{q}_{<k} ; \theta) \end{equation} We use the binary random variable $\mathbf{q}_k$ to denote end-of-sketch as the usual way of terminating inference. Our model differs primarily in the fact that we model the density of the parametric stroke representation $\mathbf{P}_k$ at each step $k$. Since we do not use any pre-learned embedding as supervisory signal (unlike \cite{das2020bziersketch,aksan2020cose}), we do not have ground-truth for $\mathbf{P}_k$ and hence can not train it by directly maximizing the likelihood in Eq.~\ref{eq:ourmodel}. We instead minimize an approximate version of the negative log-likelihood: \vspace*{-0.5cm} \begin{equation} \label{eq:ourloss} \begin{split} \mathcal{L}(\mathcal{S}) \approx &- \sum_{k=1}^K \left[ \mathcal{L}_B(\widehat{\mathbf{P}}_k, \mathbf{s}_k) + \log p(\mathbf{v}_k \vert \mathbf{\widehat{\mathbf{P}}}_{<k}, \mathbf{v}_{<k}) \right. \\ &+ \left. \log p(\mathbf{q}_k \vert \mathbf{\widehat{\mathbf{P}}}_{<k}, \mathbf{v}_{<k}) \right], \\ &\text{with } \widehat{\mathbf{P}}_k \sim p(\mathbf{P}_k \vert \mathbf{\widehat{\mathbf{P}}}_{<k}, \mathbf{v}_{<k}) \end{split} \end{equation} Instead of directly computing the log-likelihood of $\mathbf{P}_k$, we sample (re-parameterized) from the density and compute a downstream loss function $\mathcal{L}_B$ to act as a proxy. We describe the exact form of $\mathbf{P}_k$ and $\mathcal{L}_B(\cdot)$ in Sections~\ref{sec:curverep}~\&~\ref{sec:bezierloss}. \keypoint{Encoder} We condition the generation with a global latent vector \cite{ha2017neural}. This is produced by a VAE-style \cite{Kingma2013AutoEncodingVB} latent distribution whose parameters are computed using an encoder $\mathcal{E}_{\theta}$. A latent vector $\mathbf{z}$ is sampled as \begin{equation} \label{eq:ourmodelwithkl} \mathbf{z}\vert\mathcal{S} \sim \mathcal{N}(\mathbf{\mu}, \mathbf{\Sigma}) \text{ with } [\mathbf{\mu}, \mathbf{\Sigma}] = \mathcal{E}_{\theta}(\mathcal{S}) \end{equation} \noindent by means of the reparameterization trick \cite{Kingma2013AutoEncodingVB}. $\mathbf{z}$ is then used to generate the mean and co-variance parameters at each step that define the distributions $p(\mathbf{P}_k\vert\cdot)$, $p(\mathbf{v}_k\vert\cdot)$ and $p(\mathbf{q}_k\vert\cdot)$ in Eq.~\ref{eq:ourloss}. A high level diagram of the full architecture is shown in Fig.~\ref{fig:overall}. \keypoint{Training} Given our encoder and decoder, training is conducted by optimising the following objective \begin{equation} \label{eq:ourlosswithkl} \sum_{\mathcal{S}\sim\mathcal{D}} \mathcal{L}(\mathcal{S}\vert\mathbf{z}) + w_{KL} \cdot \mathrm{KL}\left[ p_\theta ({\mathbf{z}\vert\mathcal{S}}) \vert\vert \mathcal{N}(\mathbf{0},\mathbf{\Sigma}) \right] \end{equation} Depending on the nature of $\mathcal{E}_{\theta}$, we can have very different kind of generative models. \ayandas{One can use the usual SketchRNN-style \cite{ha2017neural} encoder. But we use a Transformer based set encoder $\mathcal{E}_\theta(\mathcal{S})$ that can parse a given sketch as a cloud of ink-points and produce a concise latent vector representation. In order to support learning parametric curve generation on point-cloud data, the remaining required components are a parametric curve model for $\mathbf{P}$ (Section~\ref{sec:curverep}) and the loss $\mathcal{L}_B(\mathbf{P}_k,\mathbf{s}_k)$ describing how well a parametric stroke $\mathbf{P}_k$ fits the relevant point subset $\mathbf{s}_k$, described in Section~\ref{sec:bezierloss}} \subsection{Representing variable degree B\'ezier curves} \label{sec:curverep} The decoder generates the parameters of a B\'ezier curve representing a stroke at each step $k$. In this section we describe our new interpretable parametric curve representation $\mathbf{P}_k$. We formulate a flexible representation of $\mathbf{P}_k$ by defining it as a 2-tuple $(\mathcal{P}_k, r_k)$ comprised of: \textbf{1.} The parameters of a B\'ezier curve $\mathcal{P}_k \in \mathbb{R}^{(N+1)\times 2}$ where $N$ is the \emph{maximum allowable} degree, \textbf{2.} A continuous variable $r_k \in [0, 1]$ that will be used to determine the \emph{effective} degree of the B\'ezier curve. We may drop the $k$ subscript when denoting an arbitrary time-step. \keypoint{B\'ezier curves} \cite{salomon2007curves} are smooth and finite parametric curves used extensively in computer graphics. A degree $n$ B\'ezier curve is parameterized by $n+1$ \emph{control points}, and is usually modelled parametrically via an interpolation parameter $t\in[0,1]$. A B\'ezier curve with control points $\mathcal{P}$ can be instantiated using a pre-specified set of $G$ interpolation points $\displaystyle{ \left[ t_i \right]_{i=1}^G }$ as \begin{equation} \label{eq:beziereqmatrix} C_{G\times 2} = \underbrace{ \begin{bmatrix} \cdots \\ 1, t_i, t_i^2, \cdots, t_i^n \\ \cdots \end{bmatrix}}_{T_{G\times (n+1)}} \cdot M_{(n+1)\times (n+1)} \cdot \mathcal{P}_{(n+1) \times 2} \end{equation} \noindent where $G$ represents the granularity of rendering, which we treat as a hyperparameter. $T$ is the interpolation parameter matrix and $M$ is a matrix of Bernstein coefficients whose size and elements are dependent (only) on the degree $n$. For convenience, we will denote them as $M^{(n)}$. We next address how to use a continuous variable to induce an effective degree on $\mathcal{P}$. \keypoint{Soft Binning} \cite{yang18dndt} has been introduced as a \emph{differentiable} way of binning a given real number into a predefined set of buckets. A real number $r$ needs to be tested against $n$ \emph{cut points} in order to assign a one-hot $(n+1)$-way categorical (or a continually relaxed) vector whose entries correspond to each of $n+1$ buckets/bins. Please refer to \cite{yang18dndt} for the detailed formulation of \emph{Soft Binning}. We interpret each bucket as an \emph{effective degree} of a B\'ezier curve with its control points in $\mathcal{P}$. For our problem, we fix the cut points according to the maximum allowable degree $N$ as $\mathbf{U} = \displaystyle{ \bigl[ i/N \bigr]_{i=0}^N }$. This allows us to transform the continuous variable $r$ into a soft-categorical vector with $N+2$ components. For practical benefit, we constraint the quantity $r$ to fall within the unit range of $[0, 1]$ by parameterizing it with an unconstrained variable $r' \in [-\infty, +\infty]$ as $r = \mathrm{Sigmoid}(r')$. With this added constraint, $r$ can only fall into $N$ buckets (avoiding the first and last open buckets), each of which may denote a B\'ezier curve with $2, 3, \cdots, N+1$ control points. Such design choice allows us to avoid representing a B\'ezier curve with 1 control point (which is invalid by definition) for any value of $r'$. We define two quantities: \textbf{1)} A \emph{degree selector} $\mathbf{R}(r)$ whose element $\mathbf{R}_i$ is $1$ iff $r$ falls into the bin designated for degree $i$; \textbf{2)} A \emph{control points selector} $\overline{\mathbf{R}}(r)$ defined as the \emph{reversed cumulative summation} of $\mathbf{R}(r)$. Please refer to Fig.~\ref{fig:vardegree} for an illustration of a variable degree B\'ezier curve. \cut{For a concrete example, if the value of $r$ falls into $2^{nd}$ bin and $N=4$, then $\mathbf{R} = [0, 0, 1, 0, 0]^T$ and $\overline{\mathbf{R}} = [1, 1, 1, 0, 0]^T$. In the next section, we show how to use $\mathbf{R}$ and $\overline{\mathbf{R}}$.} \begin{figure} \centering \includegraphics[width=0.9\linewidth]{figs/vardegree.pdf} \caption{Visualization of the variable degree B\'ezier curve parameterized by its continuous degree parameter $r$.} \label{fig:vardegree} \end{figure} \keypoint{Variable degree} We can now augment $\mathcal{P}$ with $r$ to create variable degree B\'ezier representation. We mask interpolation parameters $T$ and control points $\mathcal{P}$ using the \emph{control point selector} as \vspace*{-0.5cm} \begin{equation*} \widehat{T}(r) = \underbrace{ \begin{bmatrix} \cdots \\ 1, t_i, t_i^2, \cdots, t_i^N \\ \cdots \end{bmatrix}}_{T_{G\times (N+1)}} \odot \begin{bmatrix} \overline{\mathbf{R}}^T(r) \\ : \\ \overline{\mathbf{R}}^T(r) \end{bmatrix}_{G\times (N+1)} \end{equation*} \begin{equation*} \widehat{\mathcal{P}}(r) = \mathcal{P} \odot \begin{bmatrix} \overline{\mathbf{R}}(r), \overline{\mathbf{R}}(r) \end{bmatrix} \end{equation*} For $M$, we need to select the correct one from the set $\{ M^{(n)} \}_{n=0}^N$ according to the value of $r$. We accomplish this by first defining a $3D$ tensor $\mathcal{M} \in \mathbb{R}^{(N+1) \times (N+1)\times (N+1)}$ where \begin{equation*} \mathcal{M}[i,\cdots] = \begin{bmatrix} M^{(i)} & \mathbf{0} \\ \mathbf{0} & \mathbf{0} \end{bmatrix}_{(N+1) \times (N+1)} \end{equation*} \noindent The $\mathbf{0}$s denote appropriately sized zero matrices used as fillers. We can then compute $\widehat{M}$ using the \emph{degree selector} as \begin{equation*} \widehat{M}(r) = \mathbf{R}^T(r) \cdot \mathcal{M} \end{equation*} With all three components augmented with masks, we can write the variable degree version of Eq.~\ref{eq:beziereqmatrix} as a function of the degree parameter $r$ as \begin{equation} \widehat{C}(r)_{G\times 2} = \widehat{T}(r) \cdot \widehat{M}(r) \cdot \widehat{\mathcal{P}}(r) \label{eq:finalvarrender} \end{equation} \subsection{Learning and Inference}\label{sec:bezierloss} Given the generative model described in Section~\ref{sec:genmodel} and our new curve representation in Section~\ref{sec:curverep}, we now describe how to train on point-cloud data, and how to use our trained model to vectorize new point cloud inputs. \keypoint{B\'ezier Loss: Cloud} \cut{Given a curve $\mathbf{P}$ and stroke cloud $\mathbf{s}$, we n} The final component required by our generative model (Eq.~\ref{eq:ourloss}) is a loss $\mathcal{L}_B(\mathbf{P}, \mathbf{s})$ to measure the similarity between a point cloud based stroke $\mathbf{s}$ and the curve $\mathbf{P}$ . We discard the sequential information in the set $\widehat{C}$ and can compute any Optimal Transport (OT) based loss like EMD (Earth mover's distance) or Wasserstein Distance \cite{arjovsky17wgan}. The specific distance we used in our experiments is the Sliced Wasserstein Distance (SWD) \cite{kolouri2018sliced}: \begin{equation} \label{eq:lossfunc_swd} \mathcal{L}_B(\mathbf{P}, \mathbf{s}) = \mathrm{SWD}(\mathbf{P}, \mathbf{s}) \end{equation} Since OT-based losses are theoretically designed to measure the difference between two distributions, it is necessary to ensure the cardinality of the sets (either $\mathbf{P}$ or $\mathbf{s}$) are sufficiently high. We use a large enough $G$ for instantiating the B\'ezier curve and also densely resample $\mathbf{s}$ to the same granularity. \keypoint{B\'ezier Loss: Sequence} If \emph{optional} sequence information for $\mathbf{s}$ is available, we can compute a point-to-point MSE loss: \begin{equation*} \mathcal{L}_B(\mathbf{P}, \mathbf{s}) = \sum_{g=1}^G \vert\vert \widehat{C}^g(r) - \mathbf{s}^g \vert\vert_2. \end{equation*} \noindent between each point $s^g$ on the curve and each interpolation point $\widehat{C}^g$ on the rendered curve $\mathbf{P}$ (Eq.~\ref{eq:finalvarrender}). \begin{figure*} \centering \includegraphics[width=\linewidth]{figs/cvprvarbez2.pdf} \caption{Visualization of fitting a variable degree B\'ezier curve (red) to individual strokes represented as point-clouds (blue). (a \& b) Two examples with corresponding training loss components on the right. The training iteration increases from left to right. (c) Different choices of loss (section \ref{sec:bezierloss}). (d) Different choices of degree regularizer $\lambda_d$. (e) Different choices of control point regularizer $\lambda_c$.} \label{fig:varbezqual} \end{figure*} \keypoint{Regularization} The purpose of introducing a variable degree B\'ezier curve formulation is to provide the model with flexibility to encode strokes with perfect fit. To avoid overfitting strokes by using a complex curve to fit a simple stroke, the learning phase should be provided with incentive to reduce the degree whenever possible. A simple regularizer on our degree variable $r$ could achieve this: \begin{equation} \label{eq:loss_with_degreereg} \widehat{\mathcal{L}}_B(\mathbf{P}, \mathbf{s}) = \mathcal{L}_B(\mathbf{P}, \mathbf{s}) + \lambda_{d} \cdot r \end{equation} Apart from this, we also added another regularizer to reduce the level of overfitting given a degree. Overfitting in learning B\'ezier curve can occur when control points can move anywhere during the optimization. Following \cite{das2020bziersketch}, we add another term to the loss function to penalize the consecutive control points moving away from each other \begin{equation} \label{eq:loss_with_both_reg} \begin{split} \widehat{\mathcal{L}}_B(\mathbf{P}, \mathbf{s}) &= \mathcal{L}_B(\mathbf{P}, \mathbf{s}) + \lambda_d \cdot r \\ &+ \lambda_{c} \cdot \left( \sum_{i=0}^{N} \vert\vert \mathcal{P}^{i+1} - \mathcal{P}^{i} \vert\vert_2 \right) \odot \overline{\mathbf{R}}(r) \end{split} \end{equation} \noindent where we have masked out control points in $\mathcal{P}$ that are not meaningful given the degree value $r$. \keypoint{Implementation Details} Our training objective (Eq~\ref{eq:ourlosswithkl}) encodes whole images but fits one parametric curve at a time to the set of points corresponding to a stroke (Eq \ref{eq:loss_with_both_reg}). In principle all the strokes could be emitted by the generator, and then compute the loss between the full parametric sketch and the full point cloud. However for stability of optimisation, and limiting the cost of OT computation between curves and cloud, we proceed stroke-wise. To do this for genuine raster data, we pre-process the input point-cloud with 2D clustering to segment into strokes, and then iterate over the strokes in random order to train the model. Note that this priveleged information is only required during training, after training we can vectorize an unsegmented raster image into parametric curves, as shown in Figure~\ref{fig:teaser}. \keypoint{Inference: Generation \& Vectorization} \ayandas{Given our trained model, we can use it for conditional generation. Given a sketch $\mathcal{S}$ as pointcloud, we simply sample a latent vector $\widehat{\mathbf{z}} \sim \mathcal{N}(\mathcal{E}_{\theta^*}(\mathcal{S}))$ following Eq.~\ref{eq:ourmodelwithkl} and use it to construct the parameters of the distributions $p(\mathbf{P}_k\vert\cdot)$, $p(\mathbf{v}_k\vert\cdot)$ and $p(\mathbf{q}_k\vert\cdot)$. We further sample} \begin{equation*} \begin{split} \widehat{\mathbf{P}}_k, \widehat{\mathbf{v}}_k, \widehat{\mathbf{q}}_k \sim p(\mathbf{P}_k\vert\cdot) \cdot p(\mathbf{v}_k\vert\cdot) \cdot p(\mathbf{q}_k\vert\cdot) \end{split} \end{equation*} \noindent \ayandas{iteratively at each time-step and stop only when $\widehat{\mathbf{q}}_k$ is in \emph{end-of-sequence} state. To visualize, we simply render all the $(\widehat{\mathbf{P}}_k, \widehat{\mathbf{v}}_k)$ pair on a canvas.} \ayandas{We can \emph{vectorize} a given sketch $\mathcal{S}$ deterministically by following a similar procedure as generation but with discarding the source of stochasticity while sampling. We can simply assign all the co-variance parameters of $p(\mathbf{P}_k\vert\cdot)$, $p(\mathbf{v}_k\vert\cdot)$ and $p(\mathbf{q}_k\vert\cdot)$ to zero.} \section{Experiments} \keypoint{Datasets} \emph{Quick, Draw!}{} \cite{ha2017neural} is the largest free-hand sketch dataset available till date. \emph{Quick, Draw!}{} is created by collecting drawings from a fixed set of categories drawn under a game played by millions all over the world. Although \emph{Quick, Draw!}{} is collected on a vast array of digital devices like smartphone, tablets etc., the data acquisition technique is kept uniform. The sketches are collected as a series of 2D waypoints along the trajectory of ink flow. To demonstrate our model, we use \emph{Quick, Draw!}{} but discard it's way-point sequence information, using the waypoints as point-cloud data. We use \emph{Quick, Draw!}{} stroke-level segmentation (given by pen-up and pen-down indicators) as priveleged information during training. To demonstrate our model's ability to train on pure raster data, for which neither point-sequence nor stroke-sequence information is available, we also validate our model on a few classes ($0,1,8,9$) of K-MNIST \cite{kmnistdataset}. We extract a point-cloud representation from K-MNIST by simple binarization and thinning. For training we segment into strokes by Spectral Clustering. \subsection{Variable-degree B\'ezier curve} We first validate the ability of our new curve representation to fit variable-degree B\'ezier curves to isolated strokes represented as point clouds. \keypoint{Setup} We collected few strokes from the sketches of \emph{Quick, Draw!}{} \cite{ha2017neural} dataset. Since each stroke may have different number of $2D$ waypoints, we densely resample them uniformly with a fixed granularity of $G_0$. Hence, given a waypoint-based stroke $\mathbf{s} \in \mathbb{R}^{G_0\times 2}$, we directly optimize the B\'ezier curve parameters by means of Eq.~\ref{eq:loss_with_both_reg} \begin{equation} \begin{split} \mathcal{P}^{*}, r'^{*} &= \argmin_{\mathcal{P}, r'} \widehat{\mathcal{L}}_B(\mathcal{P}, r, \mathbf{s}),\text{ with}\\ r &= \mathrm{Sigmoid}(r')\text{, and } (\mathcal{P}, r) \triangleq \mathbf{P} \end{split} \end{equation} The gradients of the loss w.r.t parameters, i.e. $\displaystyle{ \left(\frac{\partial \mathcal{L}_B}{\partial \mathcal{P}}, \frac{\partial \mathcal{L}_B}{\partial r'} \right) }$ are computed simply by backpropagation and updated using any SGD-based algorithm. Additionally, we experimented with point-to-point MSE loss as described in Section~\ref{sec:bezierloss} in cases where sequential information is available. Usage of privileged information helps learning the B\'ezier parameters quickly. However, the usage of \emph{only} MSE loss degrades the fitting quality. We noticed that the dense uniform resampling of strokes $\mathbf{s}$ do not have a proper point-to-point alignment with an instantiated B\'ezier curve with uniform set of $t$-values of same granularity $G$. An instantiated B\'ezier curve tends to have dense distribution of points in places of bending and sparse otherwise, while the point cloud data derived from a waypoint sequence does not. Using the Sliced Wasserstein Distance (SWD) \cite{kolouri2018sliced} with MSE loss proved most effective with the sequential information in the MSE loss helping speed of convergence, and the SWD loss helping quality of fit. \keypoint{Results} We show qualitative results of learning variable degree B\'ezier curves from point-cloud based strokes $\mathbf{s}$. Figure~\ref{fig:varbezqual}(a, b) shows two examples of learning the B\'ezier control points $\mathcal{P}$ and degree parameter $r'$. To interpret the learned value of $r$, we run binning on it using the pre-defined cut-points $\mathbf{U}$ in Section~\ref{sec:curverep} and retrieve the degree $n$. In Fig.~\ref{fig:varbezqual}(a), we see the degree reduces from $n=5$ to $n=4$ and then $n=3$, since the curve is simple. Similarly, Fig.~\ref{fig:varbezqual}(b) shows an increase in degree due to the higher complexity stroke. The last figure in each example shows each loss component over iterations. We used $\lambda_d = 10^{-3}$, $\lambda_c = 5\cdot 10^{-2}$, $G_0=128$ and maximum degree $N=6$ for this experiment. Fig.~\ref{fig:varbezqual}(c) shows the qualitative difference between learning with SWD, MSE alone and both combined. We see that SWD tends to ignore small details but preserves the overall structure. Fig.~\ref{fig:varbezqual}(d, e) also shows the effect of both regularizer strengths ($\lambda_c\text{ and }\lambda_d$). \ayandas{It is evident from the figure that $\lambda_d$ is responsible for pressuring the reduction of degree in fitting, whereas $\lambda_c$ reduces overfitting by keeping the control points close to each other.} \begin{figure} {\centering \includegraphics[width=\linewidth]{figs/qual_v6.pdf}} \caption{\ayandas{Qualitative results for conditional generation on \emph{Quick, Draw!}{} and a limited subset of KMNIST. Three vector sketches are generated by means of sampling from Cloud2Curve. For a qualitative comparison, we also provide one sample from B\'ezierSketch \cite{das2020bziersketch} for the same input sketch. Due to unavailability of purely sequential information, B\'ezierSketch cannot be trained on KMNIST.}} \label{fig:qual} \end{figure} \begin{figure} \centering \includegraphics[width=\linewidth]{figs/qual_vec2.pdf} \caption{Deterministically vectorized sketches from the model trained with $\lambda_d = 10^{-3}$.} \label{fig:qual_vec} \end{figure} \subsection{Generation and \& Vectorization Model} \keypoint{Setup} We pre-process the sketches in \emph{Quick, Draw!}{} and K-MNIST into a sequence of position-independent strokes and their starting points $\displaystyle{ \mathcal{S} = \bigl[ (\mathbf{s}_k, \mathbf{v}_k) \bigr]_{k=1}^K }$. To stabilize the training dynamics, we also center the whole sketch and scale it down numerically to fit inside a unit circle. As part of data augmentation, we performed the following: (i) We made sure the strokes do not have too sharp bends. We split a stroke into multiple strokes from a point with high curvature or when it is too long. \ayandas{Such transformation alleviates the problem of learning overly smooth representations up to a great extent.} (ii) We added standard Gaussian noise to each $2D$ point in the stroke. \keypoint{Implementation Details} Although our decoder model in Eq.~\ref{eq:ourmodel} is very generic, we chose to use a standard RNN. Alternatives such as Transformer \cite{ribeiro2020sketchformer} could also be used. The consequence of using position independent strokes is that the predicted parametric curve must also be position independent. \cut{We may leave it to the optimizer to learn that the first control point $\mathcal{P}^0$ is at origin.} A trick to guarantee that $\mathcal{P}^0 = [0, 0]^T$ is to only predict $N$ control points for $i=1\rightarrow N$ and explicitly fix $\mathcal{P}^0 := [0, 0]^T$. We set the family of distributions $p(\mathbf{P}_k\vert \cdot; \theta)$ and $p(\mathbf{v}_k\vert \cdot)$ at each time-step as isotropic Gaussian with their mean and std vector predicted by our encoder $\mathcal{E}$. The reason we chose to not use GMM here is because of its difficulty to reparameterize (as required in Eq.~\ref{eq:ourloss}). However, the loss of expressiveness is compensated by increasing model capacity. Initiation of inference requires a special input state. Since $(\mathcal{P}, r, \mathbf{v}) = (\mathbf{0}, 0, \mathbf{0})$ is a semantically invalid state, it can be used as a special token to kickstart the generation and also use in teacher-forcing while training. \cut{There are a number of choices for the encoder $\mathcal{E}_{\theta}$. A natural way of \emph{parsing} a given sketch is to encode the rasterized image using a CNN encoder. But since raster data is high dimensional and complex, a better alternative is to use Transformer encoders \cite{ribeiro2020sketchformer} on the point cloud representation of the sketch, as a better bridge between raster and vector representations.} \ayandas{ As mentioned earlier, we use a set transformer as the encoder $\mathcal{E}_{\theta}$. Specifically, we use the strategy of \cite{ribeiro2020sketchformer} to compute a compact latent distribution by simply applying a learnable self-attention layer on the encoder features. Note that, unlike the decoding side, we never use stroke level segmentation for the encoder. Thus we can perform inference without stroke-segmented sketches.} For the decoder, we used a $2$-layer LSTM with hidden vectors of size $1024D$. We fixed the value of maximum allowable degree to $N=9$, therefore the B\'ezier curves can have at max $10$ control points which is more than enough to represent fairly complex geometry. For computing the B\'ezier loss $\mathcal{L}_B$, we used a granularity of $G=128$. For the transformer-based encoder model, we used a $512D$ transformer with $8$ heads and $4$ layers. For stable training, we follow the usual KL annealing trick \cite{bowman2016generating,ha2017neural} by varying $w_{KL}$ from $0$ to $1$ over epochs. \begin{figure}[b] \centering \includegraphics[width=\linewidth]{figs/latent_walk2.pdf} \caption{Interpolating between two sketches by walking on the latent space as: $\mathbf{z} = \mathbf{z}_{butterfly} \cdot (1-t) + \mathbf{z}_{mosquito} \cdot t$} \label{fig:latent_walk} \end{figure} \keypoint{Qualitative Results of Sketch Generation and Vectorization} We trained one model for each class from both \emph{Quick, Draw!}{} and K-MNIST datasets. Since K-MNIST dataset is fairly small, we do not train a model from scratch. Instead, we finetune on a model pre-trained on \emph{Quick, Draw!}{}. \ayandas{Fig.~\ref{fig:qual} shows qualitative results in terms of conditional generation from our generative sketch model. We also show qualitative results for deterministic raster-to-curve vectorizations in Fig.~\ref{fig:qual_vec}. Both results are computed following the procedures described in \ref{sec:bezierloss}. Trained with two categories, the model can also interpolate between two given sketches \cite{ha2017neural} by interpolating on the latent space (refer to Fig.~\ref{fig:latent_walk} for an example).} \begin{figure}[t] \centering \includegraphics[width=\linewidth]{figs/lenhist2.pdf} \includegraphics[width=\linewidth]{figs/fid2.pdf} \caption{\ayandas{Comparison between Cloud2Curve and other generative models in terms of (Top left, a) stroke-histogram, (Top right, b) sketch-histogram, (Bottom left, c) Classification accuracy-vs-length and (Bottom right, d) FID-vs-length for the generated samples. Cloud2Curve generates more compact sketches and scales better to higher lengths in terms of FID and recognition accuracy.}} \label{fig:lenhist} \end{figure} \begin{figure} \centering \includegraphics[width=\linewidth]{figs/large_lambda_d2.pdf} \caption{Input sketches and conditionally generated samples from a model trained with $\lambda_d = 10^{-2}$.} \vspace{-0.2cm} \label{fig:large_lambda_d} \end{figure} \keypoint{Cloud2Curve Generates Compact Sketches} One important technical benefit of generating sketches using B\'ezier curves is that the generated sketches are shorter in terms of number of points to be stored. Moreover, short representation of sketches lead to less complex downstream models like classification and retrieval. The length histograms both at stroke-level (points per stroke) and sketch-level (points-per-sketch) of generated sketches are shown in Figure.~\ref{fig:lenhist}(a,b) demonstrate this point for Cloud2Curve vs SketchRNN and B\'ezierSketch. We notice that the number of points per stroke is heavily concentrated around $5$ (and bounded by $2 \rightarrow 10$) for all our models but SketchRNN has a much larger spread. As a direct consequence, the average number of points in an entire sketch is also smaller (by a margin of $~20$). We also show that increasing $\lambda_d$ reduces the lengths even further, thereby achieving more \emph{abstract} sketches (Refer to Fig.~\ref{fig:large_lambda_d} for qualitative examples). Using MSE loss has an effect of increasing the length because it tries to fit the data more precisely considering small artifact. \keypoint{Quantitative Analysis on Sketch Generation Quality} To confirm that our generative model samples are semantically plausible, we rendered them and classified them using a CNN classifier \cite{sketchanet2} trained on real sketches from \emph{Quick, Draw!}{}. The results in Figure~\ref{fig:lenhist}(c) show that our parametric curve sketches are indeed accurately recognizable by state-of-the-art image classifiers even when longer in length. To further assess generation quality, the FID score \cite{fidscore} is also computed. We compute a modified FID score using rasterized samples after projecting them down to the activations of penultimate layer of a pre-trained Sketch-a-Net \cite{sketchanet2} classifier. Figure.~\ref{fig:lenhist}(d) shows that our model can generate long sketches better than sequential models like SketchRNN in terms of FID (lower is better). \keypoint{Quantitative Analysis on Sketch Vectorization Quality} We finally validate our model as a raster-to-curve vectorizer. We vectorize testing sketches and calculate the test loss between vectorized sketch and the available stroke-segmented ground-truth to evaluate the quality of sketch curve fitting. Furthermore, to evaluate the vectorization quality from a semantic perspective, we calculate classification accuracy of the generated vector sketches by first rasterizing and then classifying them with a pre-trained Sketch-a-Net \cite{sketchanet2}. The results are shown in Table~\ref{tab:quant}. We notice that although the usage of sequential information (MSE loss) helps reducing the SWD error a lot, the perceptual quality (classification score) remains fairly similar. \ayandas{We also evaluated B\'ezierSketch \cite{das2020bziersketch} on \emph{Quick, Draw!}{}, with and without using stroke sequence information, which correspond to an upper bound and a baseline respectively to our contribution of cloud-based sketch-rendering. The results show that Cloud2Curve almost matches B\'ezierSketch with full sequence supervision, and is significantly better than B\'ezierSketch using raw cloud data (and random sequence assignment).} \begin{table} \centering \scriptsize \begin{tabular}{r|cc|cc} \hline & \multicolumn{2}{c|}{QuickDraw} & \multicolumn{2}{c}{KMNIST} \\ \hline & \begin{tabular}[c]{@{}c@{}}Classif.\\ acc.\end{tabular} & \begin{tabular}[c]{@{}c@{}}Test\\ Loss\end{tabular} & \begin{tabular}[c]{@{}c@{}}Classif.\\ acc.\end{tabular} & \begin{tabular}[c]{@{}c@{}}Test\\ Loss\end{tabular} \\ \hline SWD, $\lambda_d=10^{-3}$ & $0.80$ & $0.00123$ & $0.82$ & $8.4\cdot 10^{-3}$ \\ SWD, $\lambda_d=10^{-2}$ & $0.69$ & $0.02850$ & $0.73$ & $7.6\cdot 10^{-2}$ \\ SWD + MSE & $0.84$ & $0.00034$ & $0.85$ & $2.1\cdot 10^{-4}$ \\ \hline B\'ezierSketch (Seq.) \cite{das2020bziersketch} & 0.86 & 0.00012 & NA & NA \\ B\'ezierSketch (Cloud) \cite{das2020bziersketch} & 0.41 & 0.2572 & NA & NA \\ Real data & $0.92$ & NA & $0.89$ & NA \\ \hline \end{tabular} \vspace*{0.1cm} \caption{Quantitative validation of the vectorization model.} \label{tab:quant} \end{table} \section{Conclusion} In this paper, we introduced a model capable of generating scaleable vector-graphic sketches using parametric curves -- and crucially it is able to do so by training on point cloud data, thus being widely applicable to general raster image datasets such as K-MNIST. Our framework provides accurate and flexible fitting due to the ability to chose curve complexity independently for each stroke. Once trained, our architecture can also be used to vectorize raster sketches into flexible parametric curve representations. In future work we will generalize our parametric stroke model from overly smooth B\'ezier curves to more general parametric curves such as B-splines or Hermite splines. {\small \bibliographystyle{ieee_fullname}
\section{Conclusion} \label{sec:conclusion} \vspace*{-0.05in} We introduced SetVAE, a novel hierarchical VAE for sets of varying cardinality. Introducing a novel bottleneck equivariant layer that learns subset representations, SetVAE performs hierarchical subset reasoning to encode and generate sets in a coarse-to-fine manner. As a result, SetVAE generates high-quality, diverse sets with reduced parameters. We also showed that SetVAE achieves cardinality disentanglement and generalization. \section{Experiments} \label{sec:experiment} \begin{figure}[t!] \centering \includegraphics[width=0.47\textwidth]{camera-ready-figures/fig4.pdf} \caption{Examples of randomly generated point sets from SetVAE (ours) and PointFlow in ShapeNet. } \label{fig:compare_pointflow} \vspace{-0.65cm} \end{figure} \subsection{Experimental Setup} \label{sec:quantitative} \vspace*{-0.2in} \paragraph{Dataset} We examine SetVAE using ShapeNet~\cite{chang2015shapenet}, Set-MNIST~\cite{zhang2020deep}, and Set-MultiMNIST~\cite{eslami2016attend} datasets. For ShapeNet, we follow the prior work using 2048 points sampled uniformly from the mesh surface~\cite{yang2019pointflow}. For Set-MNIST, we binarized the images in MNIST and scaled the coordinates to $[0, 1]$ \cite{kosiorek2020conditional}. Similarly, we build Set-MultiMNIST using $64\times64$ images of MultiMNIST~\cite{eslami2016attend} with two digits randomly located without overlap. \vspace*{-0.2in} \paragraph{Evaluation Metrics} For evaluation in ShapeNet, we compare the standard metrics including Minimum Matching Distance (MMD), Coverage (COV), and 1-Nearest Neighbor Accuracy (1-NNA), where the similarity between point clouds are computed with Chamfer Distance (CD) (Eq.~\eqref{eqn:reconstruction_cd}), and Earth Mover's Distance (EMD) based on optimal matching. The details are in the supplementary file. \begin{figure}[!t] \centering \includegraphics[width=0.9\linewidth]{camera-ready-figures/fig5.pdf} \vspace{-0.7cm} \caption{ Samples from SetVAE for different cardinalities. At each row, the hierarchical latent variables are fixed and the initial set is re-sampled with different cardinality. } \label{fig:cardinality} \vspace{-0.5cm} \end{figure} \begin{figure}[!t] \centering \includegraphics[width=0.8\linewidth]{camera-ready-figures/fig6.pdf} \vspace{-0.15cm} \caption{ Samples from SetVAE and PointFlow in a high cardinality setting. Only the initial sets are re-sampled. } \label{fig:mega-cardinality} \vspace{-0.5cm} \end{figure} \subsection{Comparison to Other Methods} We compare SetVAE with the state-of-the-art generative models for point clouds including l-GAN~\cite{achlioptas2018learning}, PC-GAN~\cite{li2018point}, and PointFlow~\cite{yang2019pointflow}. Following these works, we train our model for each category of airplane, chair, and car. Table~\ref{table:pointeval} summarizes the evaluation result. SetVAE achieves better or competitive performance to the prior arts using a \emph{much smaller} number of parameters ($8\%$ to $45\%$ of competitors). Notably, SetVAE often outperforms PointFlow with a substantial margin in terms of minimum matching distance (MMD) and has better or comparable coverage (COV) and 1-NNA. Lower MMD indicates that SetVAE generates high-fidelity samples, and high COV and low 1-NNA indicate that SetVAE generates diverse samples covering various modes in data. Together, the results indicate that SetVAE generates realistic, high-quality point sets. Notably, we find that SetVAE trained with CD (Eq.~\eqref{eqn:reconstruction_cd}) generalizes well to EMD-based metrics than l-GAN. We also observe that SetVAE is significantly faster than PointFlow in both training (56$\times$ speedup; 0.20s vs. 11.2s) and testing (68$\times$ speedup; 0.052s vs. 3.52s)\footnote{Measured on a single GTX 1080ti with a batch size of 16.}. It is because PointFlow requires a costly ODE solver for both training and inference, and has much more parameters. Figure \ref{fig:compare_pointflow} illustrates qualitative comparisons. Compared to PointFlow, we observe that SetVAE generates sharper details, especially in small object parts such as wings and engines of an airplane or wheels of a car. We conjecture that this is because our model generates samples considering inter-element dependency while capturing shapes in various granularities via a hierarchical latent structure. \subsection{Internal Analysis} \label{sec:qualitative} \begin{figure}[!t] \centering \includegraphics[width=1.0\linewidth]{camera-ready-figures/fig7.pdf} \vspace{-0.7cm} \caption{ Attention visualization at a selected layer. Each point is color-coded by its assignment based on attention. } \label{fig:subset} \vspace{-0.6cm} \end{figure} \paragraph{Cardinality disentanglement} Ideally, a generative model for sets should be able to disentangle the cardinality of a set from the rest of the generative factors (\emph{e.g.}, structure, style). SetVAE partly achieves this by decomposing the latent variables into the initial set $\mathbf{z}^{(0)}$ and the hierarchical latent variables $\mathbf{z}^{(1:L)}$. To validate this, we generate samples by changing the initial set's cardinality while fixing the rest. Figure~\ref{fig:cardinality} illustrates the result. We observe that SetVAE generates samples having consistent global structure with a varying number of elements. Surprisingly, it even generalizes well to the cardinalities not seen during training. For instance, the model generalizes to any cardinality between 100 and 10,000, although it is trained with only 2048 points in ShapeNet and less than 250 points in Set-MNIST. It shows that SetVAE disentangles the cardinality from the factors characterizing an object. We compare SetVAE to PointFlow in extremely high cardinality setting (100k points) in Figure~\ref{fig:mega-cardinality}. Although PointFlow innately disentangles cardinality by modeling each element independently, we observe that it tends to generate noisy, blurry boundaries in large cardinality settings. In contrast, SetVAE retains the sharpness of the structure even for extreme cardinality, presumably because it considers inter-element dependency in the generation process. \begin{figure}[!t] \centering \includegraphics[width=0.83\linewidth]{camera-ready-figures/fig8.pdf} \vspace{-0.35cm} \caption{Visualization of encoder attention across multiple layers. IP notes the number of inducing points at each level. See the supplementary file for more results. } \label{fig:composition} \vspace{-0.35cm} \end{figure} \begin{figure}[!t] \centering \includegraphics[width=0.52\linewidth]{figures/lda.pdf} \vspace{-0.3cm} \caption{ Layer-wise classification results using the hierarchical latent variables in Set-MultiMNIST dataset. } \label{fig:lda} \vspace{-0.6cm} \end{figure} \vspace*{-0.2in} \paragraph{Discovering coarse-to-fine dependency} SetVAE discovers interesting subset structures via hierarchical bottlenecks in ISAB and ABL. To demonstrate this, we visualize the encoder attention (Eq.~\eqref{eqn:isab_bottleneck}) and generator attention (Eq.~\eqref{eqn:abl_bottleneck}) in Figure~\ref{fig:subset}, where each point is color-coded based on its hard assignment to one of $m$ inducing points\footnote{For illustrative purposes, we present results from a selected head.}. We observe that SetVAE attends to semantically interesting parts consistently across samples, such as wings and engines of an airplane, legs and backs of a chair, and even different instances of multiple digits. Figure~\ref{fig:composition} illustrates the point-wise attention across levels. We observe that the top-level tends to capture the coarse and symmetric structures, such as wings and wheels, which are further decomposed into much finer granularity in the subsequent levels. We conjecture that this coarse-to-fine subset dependency helps the model to generate accurate structure in various granularity from global structure to local details. Interestingly, we find that the hierarchical structure of SetVAE sometimes leads to the disentanglement of generative factors across layers. To demonstrate this, we train two classifiers in Set-MultiMNIST, one for digit class and the other for their positions. We train the classifiers using latent variables at each generator layer as an input, and measure the accuracy at each layer. In Figure~\ref{fig:lda}, the latent variables at the lower layers tend to contribute more in locating the digits, while higher layers contribute to generating shape. \vspace*{-0.2in} \paragraph{Ablation study} Table~\ref{table:ablation} summarizes the ablation study of SetVAE (see the supplementary file for qualitative results and evaluation detail). We consider two baselines: Vanilla SetVAE using a global latent variable $\mathbf{z}^{(1)}$ (Section~\ref{sec:method}), and hierarchical SetVAE with unimodal prior (Section~\ref{sec:implementation}). The Vanilla SetVAE performs much worse than our full model. We conjecture that a single latent variable is not expressive enough to encode complex variations in MultiMNIST, such as identity and position of multiple digits. We also find that multi-modal prior stabilizes the training of attention and guides the model to better local optima. \begin{table}[t!] \begin{center} \caption{Ablation study performed on Set-MultiMNIST dataset using FID scores for {$64\times 64$} rendered images.} \vspace{-0.2cm} \footnotesize \label{table:ablation} \begin{tabular}{lc} \Xhline{2\arrayrulewidth} \\[-1em] Model & FID($\downarrow$) \\ \\[-1em]\Xhline{2\arrayrulewidth} \\[-1em] SetVAE (Ours) & \textbf{1047} \\ Non-hierarchical & 1470 \\ Unimodal prior & 1252 \\ \\[-1em]\Xhline{2\arrayrulewidth} \end{tabular} \end{center} \vspace{-0.4cm} \end{table} \vspace*{-0.2in} \paragraph{Extension to categorical bounding boxes} SetVAE provides a solid exchangeability guarantee over sets, thus applicable to any set-structured data. To demonstrate this, we trained SetVAE on categorical bounding boxes in indoor scenes of the SUN-RGBD dataset~\cite{song2015sun}. As shown in Figure~\ref{fig:sunrgbd}, SetVAE generates plausible layouts, modeling a complicated distribution of discrete semantic categories and continuous spatial instantiation of objects. \begin{figure}[!t] \centering \includegraphics[width=1\linewidth]{camera-ready-figures/fig10.pdf} \vspace{-0.25in} \caption{Generation results from SetVAE trained on SUN-RGBD dataset. \textbf{Zoom-in} for a better view.} \label{fig:sunrgbd} \vspace{-0.15in} \end{figure} \section{Introduction} \label{sec:intro} There have been increasing demands in machine learning for handling \emph{set-structured} data (\emph{i.e.}, a group of unordered instances). Examples of set-structured data include object bounding boxes~\cite{li2019grains, carion2020endtoend}, point clouds~\cite{achlioptas2018learning, li2018point}, support sets in the meta-learning~\cite{finn2017modelagnostic}, \emph{etc.} While initial research mainly focused on building neural network architectures to encode sets~\cite{zaheer2017deep,lee2019set}, generative models for sets have recently grown popular~\cite{zhang2020deep,kosiorek2020conditional, stelzner2020generative,yang2019pointflow, yang2020energybased}. A generative model for set-structured data should verify the two essential requirements: (i) \textit{exchangeability}, meaning that a probability of a set instance is invariant to its elements' ordering, and (ii) handling \textit{variable cardinality}, meaning that a model should flexibly process sets with variable cardinalities. These requirements pose a unique challenge in set generative modeling, as they prevent the adaptation of standard generative models for sequences or images~\cite{goodfellow2014generative, karras2019stylebased, oord2016pixel,oord2016conditional}. For instance, typical operations in these models, such as convolution or recurrent operations, exploit implicit ordering of elements (\emph{e.g.}, adjacency), thus breaking the exchangeability. Several works circumvented this issue by imposing heuristic ordering~\cite{hong2018inferring, eslami2016attend, greff2019multi, ritchie2019fast}. However, when applied to set-structured data, any ordering assumed by a model imposes an unnecessary inductive bias that might harm the generalization ability. \begin{figure}[t] \begin{center} \includegraphics[width=0.47\textwidth]{camera-ready-figures/fig1.pdf} \end{center} \caption{Color-coded attention learned by SetVAE encoder for three data instances of ShapeNet Airplane \cite{chang2015shapenet}. Level 1 shows attention at the most coarse scale. Level 2 and 3 show attention at more fine-scales. } \label{fig:eyecatcher} \end{figure} \begin{table*}[!ht] \centering \footnotesize \caption{Summary of several set generative frameworks available to date. Our SetVAE jointly achieves desirable properties, with the advantages of the VAE framework combined with our novel contributions. } \begin{tabular}{l>{\centering}m{0.12\textwidth}>{\centering}m{0.1\textwidth}>{\centering}m{0.12\textwidth}>{\centering\arraybackslash}m{0.1\textwidth}} \Xhline{2\arrayrulewidth} \\[-1em] Model & Exchangeability & \shortstack{Variable\\cardinality} & \shortstack{Inter-element\\dependency} & \shortstack{Hierachical\\latent structure} \\ \\[-1em]\Xhline{2\arrayrulewidth} \\[-1em] l-GAN \cite{achlioptas2018learning} & $\times$ & $\times$ & $\bigcirc$ & $\times$ \\ PC-GAN \cite{li2018point} & $\bigcirc$ & $\bigcirc$ & $\times$ & $\times$ \\ PointFlow \cite{yang2019pointflow} & $\bigcirc$ & $\bigcirc$ & $\times$ & $\times$ \\ EBP \cite{yang2020energybased} & $\bigcirc$ & $\bigcirc$ & $\bigcirc$ & $\times$ \\ \\[-1em]\hline \\[-1em] SetVAE (ours) & $\bigcirc$ & $\bigcirc$ & $\bigcirc$ & $\bigcirc$ \\ \\[-1em]\Xhline{2\arrayrulewidth} \end{tabular} \label{table:framework} \end{table*} There are several existing works satisfying these requirements. Edwards et al.,~\cite{edwards2017neural} proposed a simple generative model encoding sets into latent variables, while other approaches build upon various generative models, such as generative adversarial networks~\cite{li2018point, stelzner2020generative}, flow-based models~\cite{yang2019pointflow,kim2020softflow}, and energy-based models~\cite{yang2020energybased}. All these works define valid generative models for set-structured data, but with some limitations. To achieve exchangeability, many approaches process set elements independently~\cite{li2018point, yang2019pointflow}, limiting the models in reflecting the interactions between the elements during generation. Some approaches take the inter-element dependency into account~\cite{stelzner2020generative, yang2020energybased}, but have an upper bound on the number of elements~\cite{stelzner2020generative}, or less scalable due to heavy computations~\cite{yang2020energybased}. More importantly, existing models are less effective in capturing subset structures in sets presumably because they represent a set with a single-level representation. For sets containing multiple sub-objects or parts, it would be beneficial to allow a model to have structured latent representations such as one obtained via hierarchical latent variables. In this paper, we propose SetVAE, a novel hierarchical variational autoencoder (VAE) for sets. SetVAE models interaction between set elements by adopting attention-based Set Transformers \cite{lee2019set} into the VAE framework, and extends it to a \textit{hierarchy} of latent variables \cite{sonderby2016ladder, vahdat2020nvae} to account for flexible subset structures. By organizing latent variables at each level as a \textit{latent set} of fixed cardinality, SetVAE is able to learn hierarchical multi-scale features that decompose a set data in a coarse-to-fine manner (Figure \ref{fig:eyecatcher}) while achieving \textit{exchangeability} and handling \textit{variable cardinality}. In addition, composing latent variables invariant to input's cardinality allows our model to generalize to arbitrary cardinality unseen during training. The contributions of this paper are as follows: \begin{itemize} \item We propose SetVAE, a novel hierarchical VAE for sets with \textit{exchangeability} and \textit{varying cardinality}. To the best of our knowledge, SetVAE is the first VAE successfully applied for sets with arbitrary cardinality. SetVAE has a number of desirable properties compared to previous works, as summarized in Table \ref{table:framework}. \item Equipped with novel Attentive Bottleneck Layers (ABLs), SetVAE is able to model the coarse-to-fine dependency across the arbitrary number of set elements using a hierarchy of latent variables. \item We conduct quantitative and qualitative evaluations of SetVAE on generative modeling of point cloud in various datasets, and demonstrate better or competitive performance in generation quality with less number of parameters than the previous works. \end{itemize} \section{Variational Autoencoders for Sets} \label{sec:method} The previous section suggests that there are two essential requirements for VAE for set-structured data: it should be able to model the likelihood of sets (i) in arbitrary cardinality and (ii) invariant to the permutation (\emph{i.e.,} exchangeable). This section introduces our SetVAE objective that satisfies the first requirement while achieving the second requirement is discussed in Section~\ref{sec:architecture}. The objective of VAE \cite{kingma2014autoencoding} is to learn a generative model $p_\theta(\mathbf{x}, \mathbf{z}) = p_\theta(\mathbf{z}) p_\theta(\mathbf{x}|\mathbf{z})$ for data $\mathbf{x}$ and latent variables $\mathbf{z}$. Since the true posterior is unknown, we approximate it using the inference model $q_\phi(\mathbf{z}|\mathbf{x})$ and optimize the variational lower bound (ELBO) of the marginal likelihood $p(\mathbf{x})$: \begin{equation} \mathcal{L}_{\text{VAE}} = \mathbb{E}_{q_\phi(\mathbf{z}|\mathbf{x})}{\left[\log p_\theta(\mathbf{x}|\mathbf{z})\right]} - \text{KL}\left(q_\phi(\mathbf{z}|\mathbf{x})||p_\theta(\mathbf{z})\right). \label{eqn:original_vae} \end{equation} \vspace*{-0.2in} \paragraph{Vanilla SetVAE} When our data is a set $\mathbf{x}=\{\mathbf{x}_i\}_{i=1}^n$, Eq.~\eqref{eqn:original_vae} should be modified such that it can incorporate the set of arbitrary cardinality $n$\footnote{Without loss of generality, we use $n$ to denote the cardinality of a set but assume that the training data is composed of sets in various size.}. To this end, we propose to decompose the latent variable $\mathbf{z}$ into the two independent variables as $\mathbf{z}=\{\mathbf{z}^{(0)}, \mathbf{z}^{(1)}\}$. We define $\mathbf{z}^{(0)}=\{\mathbf{z}_i^{(0)}\}_{i=1}^n$ to be a set of \textit{initial elements}, whose cardinality is always the same as a data $\mathbf{x}$. Then we model the generative process as transforming $\mathbf{z}^{(0)}$ into a set $\mathbf{x}$ conditioned on the $\mathbf{z}^{(1)}$. Given the independence assumption, the prior is factorized by $p(\mathbf{z})=p(\mathbf{z}^{(0)})p(\mathbf{z}^{(1)})$. The prior on initial set $p(\mathbf{z}^{(0)})$ is further decomposed into the cardinality and element-wise distributions as: \begin{equation} p(\mathbf{z}^{(0)}) = p(n)\prod_{i=1}^np(\mathbf{z}_{i}^{(0)}). \label{eqn:prior_initialset} \end{equation} We model $p(n)$ using the empirical distribution of the training data cardinality. We find that the choice of the prior $p(\mathbf{z}_i^{(0)})$ is critical to the performance, and discuss its implementation in Section~\ref{sec:implementation}. Similar to the prior, the approximate posterior is defined as $q(\mathbf{z}|\mathbf{x}) = q(\mathbf{z}^{(0)}|\mathbf{x})q(\mathbf{z}^{(1)}|\mathbf{x})$ and decomposed into: \begin{equation} q(\mathbf{z}^{(0)}|\mathbf{x}) = q(n|\mathbf{x})\prod_{i=1}^nq(\mathbf{z}_{i}^{(0)}|\mathbf{x}) \label{eqn:posterior_vanillaSetVAE} \end{equation} We define $q(n|\mathbf{x})=\delta(n)$ as a delta function with $n=|\mathbf{x}|$, and set $q(\mathbf{z}_{i}^{(0)}|\mathbf{x}) = p(\mathbf{z}_{i}^{(0)})$ similar to \cite{yang2019pointflow, kosiorek2020conditional, locatello2020objectcentric}. The resulting ELBO can be written as \begin{align} \mathcal{L}_{\text{SVAE}}&= \mathbb{E}_{q(\mathbf{z}|\mathbf{x})}{\left[ \log p(\mathbf{x}|\mathbf{z}) \right]} \nonumber\\ &- \textnormal{KL}(q(\mathbf{z}^{(0)}|\mathbf{x})||p(\mathbf{z}^{(0)})) \nonumber\\ &- \textnormal{KL}(q(\mathbf{z}^{(1)}|\mathbf{x})||p(\mathbf{z}^{(1)})). \label{eqn:elbo_vanillaSetVAE} \end{align} In the supplementary file, we show that the first KL divergence in Eq.~\eqref{eqn:elbo_vanillaSetVAE} is a constant and can be ignored in the optimization. During inference, we sample $\mathbf{z}^{(0)}$ by first sampling the cardinality $n\sim p(n)$ then the $n$ initial elements independently from the prior $p(\mathbf{z}_{i}^{(0)})$. \vspace*{-0.2in} \paragraph{Hierarchical SetVAE} To allow our model to learn a more expressive latent structure of the data, we can extend the vanilla SetVAE using hierarchical latent variables. Specifically, we extend the plain latent variable $\mathbf{z}^{(1)}$ into $L$ disjoint groups $\{\mathbf{z}^{(1)}, ..., \mathbf{z}^{(L)}\}$, and introduce a top-down hierarchical dependency between $\mathbf{z}^{(l)}$ and $\{\mathbf{z}^{(0)}, ..., \mathbf{z}^{(l-1)}\}$ for every $l>1$. This leads to the modification in the prior and approximate posterior to \begin{align} p(\mathbf{z}) &= p(\mathbf{z}^{(0)}) p(\mathbf{z}^{(1)}) \prod_{l>1} {p(\mathbf{z}^{(l)}|\mathbf{z}^{(<l)})}\label{eqn:prior}\\ q(\mathbf{z}|\mathbf{x}) &= q(\mathbf{z}^{(0)}|\mathbf{x}) q(\mathbf{z}^{(1)}|\mathbf{x}) \prod_{l>1} {q(\mathbf{z}^{(l)}|\mathbf{z}^{(<l)}, \mathbf{x})}. \label{eqn:posterior} \end{align} Applying Eq.~\eqref{eqn:prior} and \eqref{eqn:posterior} to Eq.~\eqref{eqn:elbo_vanillaSetVAE}, we can derive the ELBO as \begin{align} &\mathcal{L}_{\text{HSVAE}} = \mathbb{E}_{q(\mathbf{z}|\mathbf{x})}{\left[ \log p(\mathbf{x}|\mathbf{z}) \right]} \nonumber\\ &~~- \textnormal{KL}(q(\mathbf{z}^{(0)}|\mathbf{x})||p(\mathbf{z}^{(0)})) - \textnormal{KL}(q(\mathbf{z}^{(1)}|\mathbf{x})||p(\mathbf{z}^{(1)})) \nonumber\\ &~- \sum_{l=2}^L{\mathbb{E}_{q(\mathbf{z}^{(<l)}|\mathbf{x})}{\textnormal{KL}(q(\mathbf{z}^{(l)}|\mathbf{z}^{(<l)}, \mathbf{x})||p(\mathbf{z}^{(l)}|\mathbf{z}^{(<l)})}}. \label{eqn:elbo_hierarchicalSetVAE} \end{align} \vspace*{-0.2in} \paragraph{Hierarchical prior and posterior} To model the prior and approximate posterior in Eq.~\eqref{eqn:prior} and \eqref{eqn:posterior} with top-down latent dependency, we employ the bidirectional inference in \cite{sonderby2016ladder}. We outline the formulations here and elaborate on the computations in Section~\ref{sec:architecture}. Each conditional $p(\mathbf{z}^{(l)}|\mathbf{z}^{(<l)})$ in the prior is modeled by the factorized Gaussian, whose parameters are dependent on the latent variables of the upper hierarchy $\mathbf{z}^{(<l)}$: \begin{equation} p(\mathbf{z}^{(l)}|\mathbf{z}^{(<l)}) = \mathcal{N}\left(\mu_l(\mathbf{z}^{(<l)}), \sigma_l(\mathbf{z}^{(<l)})\right). \label{eqn:normal_prior} \end{equation} Similarly, each conditional in the approximate posterior $q(\mathbf{z}^{(l)}|\mathbf{z}^{(<l)}, \mathbf{x})$ is also modeled by the factorized Gaussian. We use the residual parameterization in \cite{vahdat2020nvae} which predicts the parameters of the Gaussian using the displacement and scaling factors ($\Delta\mu$,$\Delta\sigma$) conditioned on $\mathbf{z}^{(<l)}$ and $\mathbf{x}$: \begin{align} q(\mathbf{z}^{(l)}|\mathbf{z}^{(<l)}, \mathbf{x}) = \mathcal{N}(&\mu_l(\mathbf{z}^{(<l)}) + \Delta\mu_l(\mathbf{z}^{(<l)}, \mathbf{x}), \nonumber\\ &\sigma_l(\mathbf{z}^{(<l)}) \cdot \Delta\sigma_l(\mathbf{z}^{(<l)}, \mathbf{x})). \label{eqn:normal_posterior} \end{align} \vspace*{-0.2in} \paragraph{Invariance and equivariance} We assume that the decoding distribution $p(\mathbf{x}|\mathbf{z}^{(0)}, \mathbf{z}^{(1:L)})$ is equivariant to the permutation of $\mathbf{z}^{(0)}$ and invariant to the permutation of $\mathbf{z}^{(1:L)}$ since such model induces an exchangeable model: \begin{align} \lefteqn{p(\pi(\mathbf{x})) = \int p(\pi(\mathbf{x})|\pi(\mathbf{z}^{(0)}), \mathbf{z}^{(1:L)}) p(\pi(\mathbf{z}^{(0)})) p(\mathbf{z}^{(1:L)}) d\mathbf{z}}\nonumber\\ &= \int p(\mathbf{x}|\mathbf{z}^{(0)},\mathbf{z}^{(1:L)}) p(\mathbf{z}^{(0)}) p(\mathbf{z}^{(1:L)}) d\mathbf{z} = p(\mathbf{x}). \end{align} We further assume that the approximate posterior distributions $q(\mathbf{z}^{(l)}|\mathbf{z}^{(<l)}, \mathbf{x})$ are invariant to the permutation of $\mathbf{x}$. In the following section, we describe how we implement the encoder and decoder satisfying these criteria. \section{SetVAE Framework} \label{sec:architecture} We present the overall framework of the proposed SetVAE. Figure~\ref{fig:overview} illustrates an overview. SetVAE is based on the bidirectional inference~\cite{sonderby2016ladder}, which is composed of the bottom-up encoder and top-down generator sharing the same dependency structure. In this framework, the inference network forms the approximate posterior by merging bottom-up information from data with the top-down information from the generative prior. We construct the encoder using a stack of ISABs in Section~\ref{sec:settransformer}, and treat each of the projected set $\mathbf{h}$ as a deterministic encoding of data. Our generator is composed of a stack of special layers called Attentive Bottleneck Layer (ABL), which extends the ISAB in Section~\ref{sec:settransformer} with the stochastic interaction with the latent variable. Specifically, ABL processes a set at each layer of the generator as follows: \begin{align} \text{ABL}_m(\mathbf{x}) &= \text{MAB}(\mathbf{x}, \text{FF}(\mathbf{z}))\in \mathbb{R}^{n\times d}\label{eqn:abp}\\ \text{with}~~\mathbf{h} &= \text{MAB}(I, \mathbf{x})\in \mathbb{R}^{m\times d}\label{eqn:abl_bottleneck}, \end{align} where $\text{FF}$ denotes a feed-forward layer, and the latent variable $\mathbf{z}$ is derived from the projection $\mathbf{h}$. For generation (Figure~\ref{fig:setvae_generation}), we sample $\mathbf{z}$ from the prior in Eq.~\eqref{eqn:normal_prior} by, \begin{align} \mathbf{z} &\sim \mathcal{N}(\mu, \sigma)~\text{where}~\mu, \sigma = \text{FF}(\mathbf{h}). \label{eqn:abp_z_prior} \end{align} For inference (Figure~\ref{fig:setvae_inference}), we sample $\mathbf{z}$ from the posterior in Eq.~\eqref{eqn:normal_posterior} by, \begin{align} &\mathbf{z} \sim \mathcal{N}(\mu+\Delta\mu, \sigma\cdot\Delta\sigma) \nonumber\\ &\text{where}~\Delta\mu, \Delta\sigma = \text{FF}(\mathbf{h}+\mathbf{h}_{\text{enc}}), \label{eqn:abp_z_posterior} \end{align} where $\mathbf{h}_{\text{enc}}$ is obtained from the corresponding ISAB layer of the bottom-up encoder. Following \cite{sonderby2016ladder}, we share the parameters between the generative and inference networks. A detailed illustration of ABL is in the supplementary file. To generate a set, we first sample the initial elements $\mathbf{z}^{(0)}$ and the latent variable $\mathbf{z}^{(1)}$ from the prior $p(\mathbf{z}^{(0)})$ and $p(\mathbf{z}^{(1)})$, respectively. Given these inputs, the generator iteratively samples the subsequent latent variables $\mathbf{z}^{(l)}$ from the prior $p(\mathbf{z}^{(l)}|\mathbf{z}^{(<l)})$ one by one at each layer of ABL, while processing the set conditioned on the sampled latent variable via Eq.~\eqref{eqn:abp}. The data $\mathbf{x}$ is then decoded elementwise from the final output. \subsection{Analysis} \paragraph{Modeling Exchangeable Likelihood} The architecture of SetVAE satisfies the invariance and equivariance criteria in Section~\ref{sec:method}. This is, in part, achieved by producing latent variables from the projected sets of bottom-up ISAB and top-down ABL. As the projected sets are permutation invariant to input (Section~\ref{sec:preliminary}), the latent variables $\mathbf{z}^{(1:L)}$ provide an invariant representation of the data. Furthermore, due to permutation equivariance of ISAB, the top-down stack of ABLs produce an output equivariant to the initial set $\mathbf{z}^{(0)}$. This renders the decoding distribution $p(\mathbf{x}|\mathbf{z}^{(0)}, \mathbf{z}^{(1:L)})$ permutation equivariant to $\mathbf{z}^{(0)}$. Consequently, the decoder of SetVAE induces an exchangeable model. \vspace*{-0.2in} \paragraph{Learning Coarse-to-Fine Dependency} In SetVAE, both the ISAB and ABL project the input set $\mathbf{x}$ of cardinality $n$ to the projected set $\mathbf{h}$ of cardinality $m$ via multi-head attention (Eq.~\eqref{eqn:isab_bottleneck} and \eqref{eqn:abl_bottleneck}). In the case of $m<n$, this projection functions as a bottleneck to the cardinality. This allows the model to encode some features of $\mathbf{x}$ into the $\mathbf{h}$ and discover interesting \emph{subset} dependencies across the set elements. Denoting $m_l$ as the bottleneck cardinality at layer $l$ (Figure~\ref{fig:overview}), we set $m_{l}<m_{l+1}$ to induce the model to discover coarse-to-fine dependency of the set, such as object parts. Such bottleneck also effectively reduces network size, allowing our model to perform competitive or better than the prior arts with less than 50\% of their parameters. This coarse-to-fine structure is a unique feature of SetVAE. \begin{figure}[t!] \centering \begin{subfigure}[b]{0.17\textwidth} \centering \includegraphics[height=5.3cm]{figures/SetVAE_generation.pdf} \vspace{-0.1cm} \caption{Generation} \label{fig:setvae_generation} \end{subfigure} \hfill \begin{subfigure}[b]{0.3\textwidth} \centering \includegraphics[height=5.3cm]{figures/SetVAE_inference.pdf} \vspace{-0.1cm} \caption{Inference} \label{fig:setvae_inference} \end{subfigure} \vspace{-0.6cm} \caption{The hierarchical SetVAE. $\mathcal{N}_{prior}$ denotes the prior (Eq.~\eqref{eqn:abp_z_prior}) and $\mathcal{N}_{post}$ denotes the posterior (Eq.~\eqref{eqn:abp_z_posterior}). } \vspace{-0.5cm} \label{fig:overview} \end{figure} \subsection{Implementation Details} \label{sec:implementation} \vspace*{-0.07in} This section discusses the implementation of SetVAE. We leave comprehensive details on the supplementary file. \vspace*{-0.2in} \paragraph{Multi-Modal Prior.} Although a unimodal Gaussian is a typical choice for the initial element distribution $p(\mathbf{z}^{(0)}_i)$ \cite{kosiorek2020conditional, yang2019pointflow}, we find that the model converges significantly faster when we employ the multi-modal prior. We use a mixture of Gaussians (MoG) with $K$ components: \begin{equation} p(\mathbf{z}^{(0)}_i) = \sum_{k=1}^K{\pi_k\mathcal{N}(\mathbf{z}^{(0)}_i;\mu^{(0)}_k, \sigma^{(0)}_k)}. \label{eqn:prior_mog} \end{equation} \vspace*{-0.2in} \paragraph{Likelihood.} For the likelihood $p_\theta(\mathbf{x}|\mathbf{z})$, we may consider a Gaussian distribution centered at the reconstruction. In the case of point sets, we design the likelihood by \begin{align} \mathcal{L}_\text{recon}(\mathbf{x}) &= -\log p_\theta(\mathbf{x}|\mathbf{z}) \nonumber\\ &= \frac{1}{2}d(\mathbf{x}, \hat{\mathbf{x}}) + \mathrm{const}, \end{align} where $d(\mathbf{x}, \hat{\mathbf{x}})$ is the optimal matching distance defined as \begin{align} d(\mathbf{x}, \hat{\mathbf{x}}) = \min_{\pi} {\sum_i}{\| \mathbf{x}_i - \hat{\mathbf{x}}_{\pi(i)}\|_2^2}. \end{align} In other words, we measure the likelihood with the Gaussian at optimally permuted $\mathbf{x}$, and thus maximizing this likelihood is equivalent to minimizing the optimal matching distance between the data and the reconstruction. Unfortunately, directly maximizing this likelihood requires $O(n^3)$ computation due to the matching. Instead, we choose the Chamfer Distance (CD) as a proxy reconstruction loss, \begin{align} \lefteqn{\mathcal{L}_\text{recon}(\mathbf{x}) = \textnormal{CD}(\mathbf{x}, \hat{\mathbf{x}})} \nonumber\\ &= \sum_{i} \min_j \| \mathbf{x}_i - \hat{\mathbf{x}}_j\|_2^2 + \sum_j \min_i \|\mathbf{x}_i - \hat{\mathbf{x}}_j\|_2^2. \label{eqn:reconstruction_cd} \end{align} The CD may not admit a direct interpretation as a negative log-likelihood of $p_\theta(\mathbf{x}|\mathbf{z})$, but shares the optimum with the matching distance having a proper interpretation. By employing the CD for the reconstruction loss, we learn the VAE with a surrogate for the likelihood $p_\theta(\mathbf{x}|\mathbf{z})$. CD requires $O(n^2)$ computation time, so is scalable to the moderately large sets. Note also that the CD should be scaled appropriately to match the likelihood induced by optimal matching distance. We implicitly account for this by applying weights to KL divergence in our final objective function: \begin{equation} \mathcal{L}_{\textnormal{HSVAE}}(\mathbf{x}) = \mathcal{L}_{\textnormal{recon}}(\mathbf{x}) + \beta\mathcal{L}_{\textnormal{KL}}(\mathbf{x}), \label{eqn:beta_vae_loss} \end{equation} where $\mathcal{L}_{\textnormal{KL}}(\mathbf{x})$ is the KL divergence in Eq.~\eqref{eqn:elbo_hierarchicalSetVAE}. \section{Preliminaries} \label{sec:preliminary} \subsection{Permutation-Equivariant Set Generation} \label{sec:equivariant} Denote a set as $\mathbf{x} = \{\mathbf{x}_i\}_{i=1}^n \in \mathcal{X}^n$, where $n$ is the cardinality of the set and $\mathcal{X}$ represents the domain of each element $\mathbf{x}_i \in\mathbb{R}^d$. In this paper, we represent $\mathbf{x}$ as a matrix $\mathbf{x} = [\mathbf{x}_1, ..., \mathbf{x}_n]^\mathrm{T} \in\mathbb{R}^{n\times d}$. Note that any operation on a set should be invariant to the elementwise permutation and satisfy the two constraints of \textit{permutation invariance} and \textit{permutation equivariance}. \begin{defn} A function $f:\mathcal{X}^n \rightarrow \mathcal{Y}$ is permutation invariant iff for any permutation $\pi(\cdot)$, $f(\pi(\mathbf{x}))= f(\mathbf{x})$. \end{defn} \begin{defn} A function $f:\mathcal{X}^n \rightarrow \mathcal{Y}^n$ is permutation equivariant iff for any permutation $\pi(\cdot)$, $f(\pi(\mathbf{x}))=\pi( f(\mathbf{x}))$. \end{defn} In the context of generative modeling, the notion of permutation invariance translates into exchangeability, requiring a joint distribution of the elements invariant with respect to the permutation. \begin{defn} A distribution for a set of random variables $\mathbf{x} = \{\mathbf{x}_i\}_{i=1}^n$ is exchangeable if for any permutation $\pi$, $p(\mathbf{x}) = p(\pi(\mathbf{x}))$. \end{defn} An easy way to achieve exchangeability is to assume each element to be \emph{i.i.d.} and process a set of initial elements $\mathbf{z}^{(0)} = \{\mathbf{z}_i^{(0)}\}_{i=1}^n$ independently sampled from $p(\mathbf{z}_i^{(0)})$ with an elementwise function $f_{\textnormal{elem}}$ to get the $\mathbf{x}$: \begin{equation} \mathbf{x} = \{\mathbf{x}_i\}_{i=1}^n \textnormal{ where } \mathbf{x}_i = f_{\textnormal{elem}} (\mathbf{z}_i^{(0)}) \end{equation} However, assuming elementwise independence poses a limit in modeling interactions between set elements. An alternative direction is to process $\mathbf{z}^{(0)}$ with a permutation-equivariant function $f_{\textnormal{equiv}}$ to get the $\mathbf{x}$: \begin{equation} \mathbf{x} = \{\mathbf{x}_i\}_{i=1}^n = f_{\textnormal{equiv}}(\{\mathbf{z}_i^{(0)}\}_{i=1}^n). \end{equation} We refer to this approach as the \textit{permutation-equivariant generative framework}. As the likelihood of $\mathbf{x}$ does not depend on the order of its elements (because elements of $\mathbf{z}^{(0)}$ are i.i.d.), this approach achieves exchangeability. \subsection{Permutation-Equivariant Set Encoding} \label{sec:settransformer} To design permutation-equivariant operations over a set, Set Transformer~\cite{lee2019set} provides attentive modules that model pairwise interaction between set elements while preserving invariance or equivariance. This section introduces two essential modules in the Set Transformer. \begin{figure}[t!] \centering \begin{subfigure}[b]{0.23\textwidth} \centering \includegraphics[width=0.55\textwidth]{figures/fig_mab.pdf} \caption{MAB} \label{fig:mab} \end{subfigure} \hfill \begin{subfigure}[b]{0.23\textwidth} \centering \includegraphics[width=0.55\textwidth]{figures/fig_isab2.pdf} \caption{ISAB} \label{fig:isab} \end{subfigure} \vspace{-0.1in} \caption{Illustration of Multihead Attention Block (MAB) and Induced Set Attention Block (ISAB).} \label{fig:st} \vspace{-0.55cm} \end{figure} First, Multihead Attention Block (MAB) takes the query and value sets, $Q\in \mathbb{R}^{n_q\times d}$ and $V\in \mathbb{R}^{n_v\times d}$, respectively, and performs the following transformation (Figure \ref{fig:mab}): \begin{align} \textnormal{MAB}(Q, V) = \textnormal{LN}(\mathbf{a} + \textnormal{FF}(\mathbf{a})) \in \mathbb{R}^{n_q\times d},~~~~ \label{eqn:MAB}\\ \textnormal{where } \mathbf{a} = \textnormal{LN}(Q + \textnormal{Multihead}(Q, V, V)) \in \mathbb{R}^{n_q\times d},\label{eqn:MAB_att} \end{align} where FF denotes elementwise feedforward layer, Multihead denotes multi-head attention~\cite{vaswani2017attention}, and LN denotes layer normalization \cite{lee2019set}. Note that the output of Eq.~\eqref{eqn:MAB} is permutation equivariant to $Q$ and permutation invariant to $V$. Based on MAB, Induced Set Attention Block (ISAB) processes the input set $\mathbf{x}\in\mathbb{R}^{n\times d}$ using a smaller set of inducing points $I\in \mathbb{R}^{m\times d}~(m<n)$ by (Figure \ref{fig:isab}): \begin{align} \textnormal{ISAB}_m(\mathbf{x}) &= \textnormal{MAB}(\mathbf{x}, \mathbf{h}) \in \mathbb{R}^{n\times d}, \\ \textnormal{where }\mathbf{h} &= \textnormal{MAB}(I, \mathbf{x}) \in \mathbb{R}^{m\times d}\label{eqn:isab_bottleneck}. \end{align} The ISAB first transforms the input set $\mathbf{x}$ into $\mathbf{h}$ by attending from $I$. The resulting $\mathbf{h}$ is a permutation invariant projection of $\mathbf{x}$ to a lower cardinality $m$. Then, $\mathbf{x}$ again attends to $\mathbf{h}$ to produce the output of $n$ elements. As a result, ISAB is permutation equivariant to $\mathbf{x}$. \begin{property} In $\textnormal{ISAB}_m(\mathbf{x})$, $\mathbf{h}$ is permutation invariant to $\mathbf{x}$. \end{property} \begin{property} \vspace{-0.2cm} $\textnormal{ISAB}_m(\mathbf{x})$ is permutation equivariant to $\mathbf{x}$. \end{property} \section{Related Work} \label{sec:related} \input{arxiv/table} \paragraph{Set generative modeling.} SetVAE is closely related to recent works on permutation-equivariant set prediction \cite{zhang2020deep, kosiorek2020conditional, carion2020endtoend, locatello2020objectcentric, li2020exchangeable}. Closest to our approach is the autoencoding TSPN \cite{kosiorek2020conditional} that uses a stack of ISABs \cite{lee2019set} to predict a set from randomly initialized elements. However, TSPN does not allow sampling, as it uses a pooling-based deterministic set encoding (FSPool) \cite{zhang2020fspool} for reconstruction. SetVAE instead discards FSPool and access projected sets in ISAB directly, which allows an efficient variational inference and a direct extension to hierarchical multi-scale latent. Our approach differs from previous generative models treating each element \emph{i.i.d.} and processing a random initial set with an elementwise function \cite{edwards2017neural, yang2019pointflow, kim2020softflow}. Notably, PointFlow \cite{yang2019pointflow} uses a continuous normalizing flow (CNF) to process a 3D Gaussian point cloud into an object. However, assuming elementwise independence could pose a limit in modeling complex element interactions. Also, CNF requires the invertibility of the generative model, which could further limit its expressiveness. SetVAE resolves this problem by adopting permutation equivariant ISAB that models inter-element interactions via attention, and a hierarchical VAE framework with flexible latent dependency. Contrary to previous works specifically designed for a certain type of set-structured data (\emph{e.g.}, point cloud~\cite{achlioptas2018learning, li2018point, yang2019pointflow}), we emphasize that SetVAE can be trivially applied to arbitrary set-structured data. We demonstrate this by applying SetVAE to the generation of a scene layout represented by a set of object bounding boxes. \vspace*{-0.2in} \paragraph{Hierarchical VAE.} Our model is built upon the prior works on hierarchical VAEs for images \cite{johnson2018structured}, such as Ladder-VAE \cite{sonderby2016ladder}, IAF-VAE \cite{kingma2017improving}, and NVAE \cite{vahdat2020nvae}. To model long-range pixel correlations in images, these models organize latent variables at each hierarchy as images while gradually increasing their resolution via upsampling. However, the requirement for permutation equivariance has prevented applying multi-scale approaches to sets. ABLs in SetVAE solve this problem by defining latent variables in the projected scales of each hierarchy. \\ \\ \section{Implementation details} In this section, we discuss detailed derivations and descriptions of SetVAE presented in Section~\ref{sec:method} and Section~\ref{sec:architecture}. \subsection{KL Divergence of Initial Set Distribution} \label{appendix:initial_kl} This section provides proof that the KL divergence between the approximate posterior and the prior of the initial elements in Eq.~\eqref{eqn:elbo_vanillaSetVAE} and \eqref{eqn:elbo_hierarchicalSetVAE} is a constant. Following the definition in Eq.~\eqref{eqn:prior_initialset} and Eq.~\eqref{eqn:posterior_vanillaSetVAE}, we decompose the prior as $p(\mathbf{z}^{(0)}) = p(n)p(\mathbf{z}^{(0)}|n)$ and the approximate posterior as $q(\mathbf{z}^{(0)}|\mathbf{x}) = \delta(n)q(\mathbf{z}^{(0)}|n, \mathbf{x})$, where $\delta(n)$ is defined as a delta function centered at $n=|\mathbf{x}|$. Here, the conditionals are given by \begin{align} p(\mathbf{z}^{(0)}|n) &= \prod_{i=1}^n{p(\mathbf{z}_i^{(0)})}, \\ q(\mathbf{z}^{(0)}|n, \mathbf{x}) &= \prod_{i=1}^n{q(\mathbf{z}_i^{(0)}|\mathbf{x})}. \end{align} As described in the main text, we set the elementwise distributions identical, $p(\mathbf{z}_i^{(0)}) = q(\mathbf{z}_i^{(0)}|\mathbf{x})$. This renders the conditionals equal, \begin{equation} p(\mathbf{z}^{(0)}|n) = q(\mathbf{z}^{(0)}|n, \mathbf{x}).\label{eqn:initial_set_equal} \end{equation} Then, the KL divergence between the approximate posterior and the prior in Eq.~\eqref{eqn:elbo_vanillaSetVAE} is written as \begin{align} \textnormal{KL}&(q(\mathbf{z}^{(0)}|\mathbf{x})||p(\mathbf{z}^{(0)})) \nonumber\\ &= \textnormal{KL}(\delta(n)q(\mathbf{z}^{(0)}|n, \mathbf{x})||p(n)p(\mathbf{z}^{(0)}|n)) \\ &= \textnormal{KL}(\delta(n)p(\mathbf{z}^{(0)}|n)||p(n)p(\mathbf{z}^{(0)}|n)), \label{eqn:kl_initial_set} \end{align} where the second equality comes from the Eq.~\eqref{eqn:initial_set_equal}. From the definition of KL divergence, we can rewrite Eq.~\eqref{eqn:kl_initial_set} as \begin{align} \textnormal{KL}&(q(\mathbf{z}^{(0)}|\mathbf{x})||p(\mathbf{z}^{(0)})) \nonumber\\ &= \mathbb{E}_{\delta(n)p(\mathbf{z}^{(0)}|n)}{\left[\log{\frac{\delta(n)p(\mathbf{z}^{(0)}|n)}{p(n)p(\mathbf{z}^{(0)}|n)}}\right]} \\ &= \mathbb{E}_{\delta(n)p(\mathbf{z}^{(0)}|n)}{\left[\log{\frac{\delta(n)}{p(n)}}\right]}, \label{eqn:kl_initial_set_reduced} \end{align} As the logarithm in Eq.~\eqref{eqn:kl_initial_set_reduced} does not depend on $\mathbf{z}^{(0)}$, we can take it out from the expectation over $p(\mathbf{z}^{(0)}|n)$ as follows: \begin{align} \textnormal{KL}&(q(\mathbf{z}^{(0)}|\mathbf{x})||p(\mathbf{z}^{(0)})) \nonumber\\ &= \mathbb{E}_{\delta(n)}{\left[\mathbb{E}_{p(\mathbf{z}^{(0)}|n)} {\left[\log{\frac{\delta(n)}{p(n)}}\right]}\right]} \\ &= \mathbb{E}_{\delta(n)}{\left[\log{\frac{\delta(n)}{p(n)}}\right]}, \label{eqn:kl_initial_set_cardinality} \end{align} which can be rewritten as \begin{align} \mathbb{E}_{\delta(n)}{\left[\log{\delta(n)} - \log{p(n)}\right]}. \end{align} The expectation over the delta function $\delta(n)$ is simply an evaluation at $n = |\mathbf{x}|$. As $\delta$ is defined over a discrete random variable $n$, its probability mass at the center $|\mathbf{x}|$ equals 1. Therefore, $\log{\delta(n)}$ at $n = |\mathbf{x}|$ reduces to $\log1 = 0$, and we obtain \begin{align} \textnormal{KL}&(q(\mathbf{z}^{(0)}|\mathbf{x})||p(\mathbf{z}^{(0)})) = - \log p(|\mathbf{x}|). \label{eqn:kl_constant} \end{align} As discussed in the main text, we model $p(n)$ using the empirical distribution of data cardinality. Thus, $p(|\mathbf{x}|)$ only depends on data distribution, and $- \textnormal{KL}(q(\mathbf{z}^{(0)}|\mathbf{x})||p(\mathbf{z}^{(0)}))$ in Eq.~\eqref{eqn:elbo_vanillaSetVAE} can be omitted from optimization. \subsection{Implementation of SetVAE} \label{appendix:abl} \begin{figure}[!t] \centering \vspace{0.2in} \begin{subfigure}[b]{0.395\linewidth} \centering \includegraphics[width=0.95\linewidth]{supp_figures/fig_abl_prior.pdf} \caption{Generation} \label{fig:abl_prior} \end{subfigure} \begin{subfigure}[b]{0.59\linewidth} \centering \includegraphics[width=0.95\linewidth]{supp_figures/fig_abl_posterior.pdf} \caption{Inference} \label{fig:abl_posterior} \end{subfigure} \caption{The detailed structure of Attentive Bottleneck Layer during sampling (for generation) and inference (for reconstruction).} \label{fig:abl_structure} \end{figure} \paragraph{Attentive Bottleneck Layer.} In Figure~\ref{fig:abl_structure}, we provide the detailed structure of Attentive Bottleneck Layer (ABL) that composes the top-down generator of SetVAE (Section~\ref{sec:architecture}). We share the parameters in ABL for generation and inference, which is known to be effective in stabilizing the training of hierarchical VAE~\cite{kingma2017improving, vahdat2020nvae}. During generation (Figure~\ref{fig:abl_prior}), $\mathbf{z}$ is sampled from a Gaussian prior $\mathcal{N}(\mu, \sigma)$ (Eq.~\eqref{eqn:abp_z_prior}). To predict $\mu$ and $\sigma$ from $\mathbf{h}$, we use an elementwise fully-connected ($\textnormal{FC}$) layer, of which parameters are shared across elements of $\mathbf{h}$. During inference, we sample the latent variables from the approximate posterior $\mathcal{N}(\mu+\Delta\mu, \sigma\cdot\Delta\sigma)$, where the correction factors $\Delta\mu, \Delta\sigma$ are predicted from the bottom-up encoding $\mathbf{h}_\textnormal{enc}$ by an additional $\textnormal{FC}$ layer. Note that the $\textnormal{FC}$ for predicting $\mu, \sigma$ is shared for generation and inference, but the $\textnormal{FC}$ that predicts $\Delta\mu, \Delta\sigma$ is used only for inference. \\ \paragraph{Slot Attention in ISAB and ABL.} SetVAE discovers subset representation via projection attention in ISAB (Eq.~\eqref{eqn:isab_bottleneck}) and ABL (Eq.~\eqref{eqn:abl_bottleneck}). However, with a basic attention mechanism, the projection attention may ignore some parts of input by simply not attending to them. To prevent this, in both ISAB and ABL, we change the projection attention to Slot Attention \cite{locatello2020objectcentric}. Specifically, plain projection attention\footnote{For simplicity, we explain with single-head attention instead of $\textnormal{MultiHead}$.} (Eq.~\eqref{eqn:MAB_att}) treats input $\mathbf{x}\in\mathbb{R}^{n\times d}$ as key ($K$) and value ($V$), and uses a set of inducing points $\mathbf{I}\in\mathbb{R}^{m\times d}$ as query ($Q$). First, it obtains the attention score matrix as follows: \begin{equation} A = \frac{QK^\mathrm{T}}{\sqrt{d}} \in\mathbb{R}^{m\times n}. \end{equation} Each row index of $A$ denotes an inducing point, and each column index denotes an input element. Then, the value set $V$ is aggregated using $A$. With $\textnormal{Softmax}_{\textnormal{axis}=d}(\cdot)$ denoting softmax normalization along $d$-th axis, the plain attention normalizes each row of $A$, as follows: \begin{align} \textnormal{Att}(Q, K, V) &= WV\in\mathbb{R}^{m\times d}, \\ \textnormal{ where } W &= \textnormal{Softmax}_{\textnormal{axis}=2}(A)\in\mathbb{R}^{m\times n}. \end{align} As a result, an input element can get zero attention if every query suppresses it. To prevent this, Slot Attention normalizes each column of $A$ and computes weighted mean: \begin{align} \textnormal{SlotAtt}(Q, K, V) &= W'V, \\ \textnormal{ where } W'_{ij} = \frac{A'_{ij}}{\sum_{l=1}^n{A'_{il}}}& \textnormal{ for } A' = \textnormal{Softmax}_{\textnormal{axis}=1}(A). \end{align} As attention coefficients across a row sum up to 1 after softmax, slot attention guarantees that an input element is not ignored by every inducing point. With the adaptation of Slot Attention, we observe that inducing points often attend to distinct subsets of the input to produce $\mathbf{h}$, as illustrated in the Figure~\ref{fig:subset} and Figure~\ref{fig:composition} of the main text. This is similar to the observation of \cite{locatello2020objectcentric} that the competition across queries encouraged segmented representations (slots) of objects from a multi-object image. A difference is that unlike in \cite{locatello2020objectcentric} where the queries are noise vectors, we design the query set as a learnable parameter $\mathbf{I}$. Also, we do not introduce any refinement steps to the projected set $\mathbf{h}$ to avoid the complication of the model. \section{Experiment Details} This section discusses the detailed descriptions and additional results of experiments in Section~\ref{sec:experiment} in the main paper. \subsection{ShapeNet Evaluation Metrics} \label{appendix:metrics} We provide descriptions of evaluation metrics used in the ShapeNet experiment (Section~\ref{sec:experiment} in the main paper). We measure standard metrics including coverage (COV), minimum matching distance (MMD), and 1-nearest neighbor accuracy (1-NNA) \cite{achlioptas2018learning, yang2019pointflow}. Following recent literature \cite{kim2020softflow}, we omit Jensen-Shannon Divergence (JSD) \cite{achlioptas2018learning} because it does not assess the fidelity of each point cloud. To measure the similarity $D(\mathbf{x}, \mathbf{y})$ between point clouds $\mathbf{x}$ and $\mathbf{y}$, we use Chamfer Distance (CD) (Eq.~\eqref{eqn:reconstruction_cd}) and Earth Mover's Distance (EMD), where the EMD is defined as: \begin{align} \textnormal{EMD}(\mathbf{x}, \mathbf{y}) = \min_{\pi} {\sum_i}{\| \mathbf{x}_i - \mathbf{y}_{\pi(i)}\|_2}. \end{align} Let $S_g$ be the set of generated point clouds and $S_r$ be the set of reference point clouds with $|S_r| = |S_g|$. \emph{Coverage (COV)} measures the percentage of reference point clouds that is a nearest neighbor of at least one generated point cloud, computed as follows: \begin{equation} \textnormal{COV}(S_g, S_r) = \frac{|\{\textnormal{argmin}_{\mathbf{y}\in S_r}D(\mathbf{x}, \mathbf{y})|\mathbf{x}\in S_g\}|}{|S_r|}. \end{equation} \emph{Minimum Matching Distance (MMD)} measures the average distance from each reference point cloud to its nearest neighbor in the generated point clouds: \begin{equation} \textnormal{MMD}(S_g, S_r) = \frac{1}{|S_r|}\sum_{\mathbf{y}\in S_r}{\min_{\mathbf{x}\in S_g}{D(\mathbf{x}, \mathbf{y})}}. \end{equation} \emph{1-Nearest Neighbor Accuracy (1-NNA)} assesses whether two distributions are identical. Let $S_{-\mathbf{x}}=S_r\cup S_g-\{\mathbf{x}\}$ and $N_{\mathbf{x}}$ be the nearest neighbor of $\mathbf{x}$ in $S_{-\mathbf{x}}$. With $\mathbf{1}(\cdot)$ an indicator function: \begin{align} \textnormal{1-NNA}&(S_g, S_r) \nonumber\\ &= \frac{\sum_{\mathbf{x}\in S_g}\mathbf{1}(N_{\mathbf{x}}\in S_g) + \sum_{\mathbf{y}\in S_r}\mathbf{1}(N_{\mathbf{y}}\in S_r)}{|S_g| + |S_r|}. \end{align} \subsection{Hierarchical Disentanglement} This section describes an evaluation protocol used in Figure~\ref{fig:lda} in the main paper. To investigate the latent representations learned at each level, we employed Linear Discriminant Analysis (LDA) as simple layer-wise classifiers. The classifiers take the latent variable at each layer $\mathbf{z}^{l},~\forall l\in[1,L]$ as an input, and predict the identity and position of two digits (in $4\times4$ quantized grid) respectively in Set-MultiMNIST dataset. To this end, we first train the SetVAE in the training set of Set-MultiMNIST. Then we train the LDA classifiers using the validation dataset, where the input latent variables are sampled from the posterior distribution of SetVAE (Eq.~\eqref{eqn:posterior}). We report the training accuracy of the classifiers at each layer in Figure~\ref{fig:lda}. \subsection{Ablation study} In this section, we provide details of the ablation study presented in Table~\ref{table:ablation} of the main text. \paragraph{Baseline} As baselines, we use a SetVAE with unimodal Gaussian prior over the initial set elements, and a non-hierarchical, Vanilla SetVAE presented in Section~\ref{sec:method}. To implement a SetVAE with unimodal prior, we only change the initial element distribution $p(\mathbf{z}_i^{(0)})$ from MoG (Eq.~\eqref{eqn:prior_mog}) to a multivariate Gaussian with a diagonal covariance matrix $\mathcal{N}(\mu^{(0)}, \sigma^{(0)})$ with learnable $\mu^{(0)}$ and $\sigma^{(0)}$. This approach is adopted in several previous works in permutation-equivariant set generation \cite{yang2019pointflow, kosiorek2020conditional, locatello2020objectcentric}. \begin{figure}[!t] \centering \begin{subfigure}[b]{0.395\linewidth} \centering \includegraphics[width=0.9\linewidth]{supp_figures/fig-vanilla-prior.pdf} \caption{Generation} \label{fig:vanilla_prior} \end{subfigure} \begin{subfigure}[b]{0.59\linewidth} \centering \includegraphics[width=0.9\linewidth]{supp_figures/fig-vanilla-posterior.pdf} \caption{Inference} \label{fig:vanilla_posterior} \end{subfigure} \caption{Structure of Vanilla SetVAE without hierarchical priors and subset reasoning in generator.} \label{fig:vanilla_setvae} \end{figure} To implement a Vanilla SetVAE, we employ a bottom-up encoder same to our full model and make the following changes to the top-down generator. As illustrated in Figure~\ref{fig:vanilla_setvae}, we remove the subset relation in the generator by fixing the latent cardinality to 1 and employing a global prior $\mathcal{N}(\mu_1, \sigma_1)$ with $\mu_1, \sigma_1 \in \mathbb{R}^{1\times d}$ for all ABL. To compute permutation-invariant $\mathbf{h}_{\textnormal{enc}} \in \mathbb{R}^{1\times d}$, we aggregate every elements of $\mathbf{h}$ from all levels of encoder network by average pooling. During inference, $\mathbf{h}_{\textnormal{enc}}$ is provided to every ABL in the top-down generator. \paragraph{Evaluation metric} For the ablation study of SetVAE on the Set-MultiMNIST dataset, we measure the generation quality in image space by rendering each set instance to $64\times 64$ binary image based on the occurrence of a point in a pixel bin. To measure the generation performance, we compute Frechet Inception Distance (FID) score \cite{heusel2017gans} using the output of the penultimate layer of a VGG11 network trained from scratch for MultiMNIST image classification into 100 labels (00-99). Given the channel-wise mean $\mu_g$, $\mu_r$ and covariance matrix $\Sigma_g$, $\Sigma_r$ of generated and reference set of images respectively, we compute FID as follows: \begin{equation} d^2 = {\| \mu_g - \mu_r \|}^2 + \textnormal{Tr} (\Sigma_g + \Sigma_r - 2 \sqrt{\Sigma_g \Sigma_r}). \end{equation} To train the VGG11 network, we replace the first conv layer to take single-channel inputs, and use the same MultiMNIST train set as in SetVAE. We use the SGD optimizer with Nesterov momentum, with learning rate 0.01, momentum 0.9, and L2 regularization weight 5e-3 to prevent overfitting. We train the network for 10 epochs using batch size 128 so that the training top-1 accuracy exceeds 95\%. \section{More Qualitative Results} \begin{figure}[!t] \centering \includegraphics[width=0.8\linewidth]{supp_figures/ablation_training_graph.pdf} \caption{Training loss curves from SetVAE with multimodal and unimodal initial set trained on Set-MultiMNIST dataset.} \label{fig:ablation-curve} \centering \includegraphics[width=0.47\textwidth]{supp_figures/Ablation_on_MM_final.pdf} \caption{Samples from SetVAE and its ablated version trained on Set-MultiMNIST dataset.} \label{fig:ablation} \vspace{-0.2in} \end{figure} \paragraph{Ablation study} This section provides additional results of the ablation study, which corresponds to the Table~\ref{table:ablation} of the main paper. We compare the SetVAE with two baselines: SetVAE with a unimodal prior and the one using a single global latent variable (\emph{i.e.}, Vanilla SetVAE). Figure~\ref{fig:ablation-curve} shows the training loss curves of SetVAE and the unimodal prior baseline on the Set-MultiMNIST dataset. We observe that training of the unimodal baseline is unstable compared to SetVAE which uses a 4-component MoG. We conjecture that a flexible initial set distribution provides a cue for the generator to learn stable subset representations. In Figure~\ref{fig:ablation}, we visualize samples from SetVAE and the two baselines. As the training of unimodal SetVAE was unstable, we provide the results from a checkpoint before the training loss diverges (third row of Figure~\ref{fig:ablation}). The Vanilla SetVAE without hierarchy (second row of Figure~\ref{fig:ablation}) focuses on modeling the left digit only and fails to assign a balanced number of points. This failure implies that multi-level subset reasoning in the generative process is essential in faithfully modeling complex set data such as Set-MultiMNIST. \paragraph{Role of mixture initial set} \begin{figure}[!t] \centering \includegraphics[width=0.95\linewidth]{cvpr_rebuttal/rebuttal_figure/20210124-CVPR-Rebuttal-FigB.pdf} \caption{Color-coded mixture assignments on output sets.} \label{fig:mog_attention} \end{figure} Although the multi-modal prior is not a typical choice, we emphasize that it marginally adds complexity to the model since it only introduces the additional learnable mixture parameters ($\pi_k^{(0)},\mu_k^{(0)},\sigma_k^{(0)}$). Despite the simplicity, we observe that mixture prior is effective in stabilizing training, especially when there are clearly separating modes in data such as in the Set-MultiMNIST dataset (Fig.~\ref{fig:mog_attention}). Still, the choice of the initial prior is flexible and orthogonal to our contribution. \paragraph{ShapeNet results} Figure~\ref{fig:more_samples} presents the generated samples from SetVAE on ShapeNet, Set-MNIST and Set-MultiMNIST datasets, extending the results in Figure~\ref{fig:compare_pointflow} of the main text. As illustrated in the figure, SetVAE generates point sets with high diversity while capturing thin and sharp details (\eg engines of an airplane and legs of a chair, \etc). \paragraph{Cardinality disentanglement} Figure~\ref{fig:more_disentanglement} presents the additional results of Figure~\ref{fig:cardinality} in the main paper, which illustrates samples generated by increasing the cardinality of the initial set $\mathbf{z}^{(0)}$ while fixing the hierarchical latent variables $\mathbf{z}^{(1:L)}$. As illustrated in the figure, SetVAE is able to disentangle the cardinality of a set from the rest of its generative factors, and is able to generalize to unseen cardinality while preserving the disentanglement. Notably, SetVAE can retain the disentanglement and generalize even to a high cardinality (100k) as well. Figure~\ref{fig:more_mega_cardinality} presents the comparison to PointFlow with varying cardinality, which extends the results of the Figure~\ref{fig:mega-cardinality} in the main paper. Unlike PointFlow that exhibits degradation and blurring of fine details, SetVAE retains the fine structure of the generated set even for extreme cardinality. \paragraph{Coarse-to-fine dependency} In Figure~\ref{fig:more_encoder_attention} and Figure~\ref{fig:more_generator_attention}, we provide additional visualization of encoder and generator attention, extending the Figure~\ref{fig:subset} and Figure~\ref{fig:composition} in the main text. We observe that SetVAE learns to attend to a subset of points consistently across examples. Notably, these subsets often have a bilaterally symmetric structure or correspond to semantic parts. For example, in the top level of the encoder (rows marked level 1 in Figure~\ref{fig:more_encoder_attention}), the subsets include wings of an airplane, legs \& back of a chair, or wheels \& rear wing of a car (colored red). Furthermore, SetVAE extends the subset modeling to multiple levels with a top-down increase in latent cardinality. This allows SetVAE to encode or generate the structure of a set in various granularities, ranging from global structure to fine details. Each column in Figure~\ref{fig:more_encoder_attention} and Figure~\ref{fig:more_generator_attention} illustrates the relations. For example, in level 3 of Figure~\ref{fig:more_encoder_attention}, the bottom-up encoder partitions an airplane into fine-grained parts such as an engine, a tip of the tail wing, \etc. Then, going bottom-up to level 1, the encoder composes them to fuselage and symmetric pair of wings. As for the top-down generator in Figure~\ref{fig:more_generator_attention}, it starts in level 1 by composing an airplane via the coarsely defined body and wings. Going top-down to level 3, the generator descends into fine-grained subsets like an engine and tail wing. \section{Architecture and Hyperparameters} \label{appendix:training} Table~\ref{table:architecture} provides the network architecture and hyperparameters of SetVAE. In the table, $\textnormal{FC}(d, f)$ denotes a fully-connected layer with output dimension $d$ and nonlinearity $f$. $\textnormal{ISAB}_m(d, h)$ denotes an $\textnormal{ISAB}_m$ with $m$ inducing points, hidden dimension $d$, and $h$ heads (in Section~\ref{sec:settransformer}). $\textnormal{MoG}_K(d)$ denotes a mixture of Gaussian (in Eq.~\eqref{eqn:prior_mog}) with $K$ components and dimension $d$. $\textnormal{ABL}_m(d, d_z, h)$ denotes an $\textnormal{ABL}_m$ with $m$ inducing points, hidden dimension $d$, latent dimension $d_z$, and $h$ heads (in Section~\ref{sec:architecture}). All $\textnormal{MAB}$s used in $\textnormal{ISAB}$ and $\textnormal{ABL}$ uses fully-connected layer with bias as $\textnormal{FF}$ layer. In Table~\ref{table:hyperparameters}, we provide detailed training hyperparameters. For all experiments, we used Adam optimizer with first and second momentum parameters $0.9$ and $0.999$, respectively and decayed the learning rate linearly to zero after $50\%$ of the training schedule. Following \cite{vahdat2020nvae}, we linearly annealed $\beta$ from 0 to 1 during the first 2000 epochs for ShapeNet datasets, 40 epochs for Set-MNIST, and 50 epochs for Set-MultiMNIST dataset. \clearpage \begin{figure*}[!ht] \centering \includegraphics[width=1\textwidth]{camera-ready-figures/fig16.pdf} \caption{Additional examples of generated point clouds from SetVAE.} \label{fig:more_samples} \end{figure*} \begin{figure*}[!ht] \centering \includegraphics[width=1\textwidth]{camera-ready-figures/fig17.pdf} \caption{Additional examples demonstrating cardinality generalization of SetVAE.} \label{fig:more_disentanglement} \end{figure*} \begin{figure*}[!ht] \centering \includegraphics[width=1\textwidth]{camera-ready-figures/fig18.pdf} \caption{More examples in high-cardinality setting, compared with PointFlow.} \label{fig:more_mega_cardinality} \end{figure*} \begin{figure*}[!ht] \centering \includegraphics[width=1\textwidth]{camera-ready-figures/fig19.pdf} \caption{More examples of color-coded encoder attention.} \label{fig:more_encoder_attention} \end{figure*} \begin{figure*}[!ht] \centering \includegraphics[width=1\textwidth]{camera-ready-figures/fig20.pdf} \caption{More examples of color-coded generator attention.} \label{fig:more_generator_attention} \end{figure*} \begin{figure*}[!t] \begin{minipage}{\linewidth} \captionof{table}{Detailed network architectures used in our experiments.} \vspace{-0.2cm} \centering \begin{adjustbox}{width=0.95\textwidth} \label{table:architecture} \begin{tabular}{cc|cc|cc} \Xhline{2\arrayrulewidth} \\[-1em] \multicolumn{2}{c}{\textbf{ShapeNet}} & \multicolumn{2}{c}{\textbf{Set-MNIST}} & \multicolumn{2}{c}{\textbf{Set-MultiMNIST}}\\ \\[-1em]\Xhline{2\arrayrulewidth} \\[-1em] \textbf{Encoder} & \textbf{Generator} & \textbf{Encoder} & \textbf{Generator} & \textbf{Encoder} & \textbf{Generator} \\ \\[-1em]\Xhline{2\arrayrulewidth} \\[-1em] Input: $\textnormal{FC}(64, -)$ & Initial set: $\textnormal{MoG}_4(32)$ & Input: $\textnormal{FC}(64, -)$ & Initial set: $\textnormal{MoG}_4(32)$ & Input: $\textnormal{FC}(64, -)$ & Initial set: $\textnormal{MoG}_{16}(64)$ \\ $\textnormal{ISAB}_{32}(64, 4)$ & $\textnormal{ABL}_{1}(64, 16, 4)$ & $\textnormal{ISAB}_{32}(64, 4)$ & $\textnormal{ABL}_{2}(64, 16, 4)$ & $\textnormal{ISAB}_{32}(64, 4)$ & $\textnormal{ABL}_{2}(64, 16, 4)$ \\ $\textnormal{ISAB}_{16}(64, 4)$ & $\textnormal{ABL}_{1}(64, 16, 4)$ & $\textnormal{ISAB}_{16}(64, 4)$ & $\textnormal{ABL}_{4}(64, 16, 4)$ & $\textnormal{ISAB}_{16}(64, 4)$ & $\textnormal{ABL}_{4}(64, 16, 4)$ \\ $\textnormal{ISAB}_{8}(64, 4)$ & $\textnormal{ABL}_{2}(64, 16, 4)$ & $\textnormal{ISAB}_{8}(64, 4)$ & $\textnormal{ABL}_{8}(64, 16, 4)$ & $\textnormal{ISAB}_{8}(64, 4)$ & $\textnormal{ABL}_{8}(64, 16, 4)$ \\ $\textnormal{ISAB}_{4}(64, 4)$ & $\textnormal{ABL}_{4}(64, 16, 4)$ & $\textnormal{ISAB}_{4}(64, 4)$ & $\textnormal{ABL}_{16}(64, 16, 4)$ & $\textnormal{ISAB}_{4}(64, 4)$ & $\textnormal{ABL}_{16}(64, 16, 4)$ \\ $\textnormal{ISAB}_{2}(64, 4)$ & $\textnormal{ABL}_{8}(64, 16, 4)$ & $\textnormal{ISAB}_{2}(64, 4)$ & $\textnormal{ABL}_{32}(64, 16, 4)$ & $\textnormal{ISAB}_{2}(64, 4)$ & $\textnormal{ABL}_{32}(64, 16, 4)$ \\ $\textnormal{ISAB}_{1}(64, 4)$ & $\textnormal{ABL}_{16}(64, 16, 4)$ & & Output: $\textnormal{FC}(2, \textnormal{tanh})$ & & Output: $\textnormal{FC}(2, \textnormal{tanh})$ \\ $\textnormal{ISAB}_{1}(64, 4)$ & $\textnormal{ABL}_{32}(64, 16, 4)$ & & $(\textnormal{Output}+1)/2$ & & $(\textnormal{Output}+1)/2$ \\ & Output: $\textnormal{FC}(3, -)$ & & & & \\ & & & & & \\ \\[-1em]\Xhline{2\arrayrulewidth} \end{tabular} \end{adjustbox} \vspace{1cm} \captionof{table}{Detailed training hyperparameters used in our experiments.} \vspace{0.1cm} \begin{adjustbox}{width=0.95\textwidth} \label{table:hyperparameters} \footnotesize \begin{tabular}{cccc} \Xhline{2\arrayrulewidth} \\[-1em] & \textbf{ShapeNet} & \textbf{Set-MNIST} & \textbf{Set-MultiMNIST}\\ \\[-1em] \Xhline{2\arrayrulewidth} \\[-1em] Minibatch size & 128 & 64 & 64 \\ Training epochs & 8000 & 200 & 200 \\ Learning rate & \multicolumn{3}{c}{1e-3, linear decay to zero after half of training} \\ $\beta$ (Eq.~\eqref{eqn:beta_vae_loss}) & 1.0, annealed (-2000epoch) & 0.01, annealed (-50epoch) & 0.01, annealed (-40epoch) \\ \\[-1em]\Xhline{2\arrayrulewidth} \end{tabular} \end{adjustbox} \end{minipage} \end{figure*} \section{Introduction} After receiving paper reviews, authors may optionally submit a rebuttal to address the reviewers' comments, which will be limited to a {\bf one page} PDF file. Please follow the steps and style guidelines outlined below for submitting your author response. Note that the author rebuttal is optional and, following similar guidelines to previous CVPR conferences, it is meant to provide you with an opportunity to rebut factual errors or to supply additional information requested by the reviewers. It is NOT intended to add new contributions (theorems, algorithms, experiments) that were not included in the original submission. You may optionally add a figure, graph or proof to your rebuttal to better illustrate your answer to the reviewers' comments. Per a passed 2018 PAMI-TC motion, reviewers should not request additional experiments for the rebuttal, or penalize authors for lack of additional experiments. This includes any experiments that involve running code, e.g., to create tables or figures with new results. \textbf{Authors should not include new experimental results in the rebuttal}, and reviewers should discount any such results when making their final recommendation. Authors may include figures with illustrations or comparison tables of results reported in the submission/supplemental material or in other papers. The rebuttal must adhere to the same blind-submission as the original submission and must comply with this rebuttal-formatted template. \subsection{Response length} Author responses must be no longer than 1 page in length including any references and figures. Overlength responses will simply not be reviewed. This includes responses where the margins and formatting are deemed to have been significantly altered from those laid down by this style guide. Note that this \LaTeX\ guide already sets figure captions and references in a smaller font. \section{Formatting your Response} {\bf Make sure to update the paper title and paper ID in the appropriate place in the tex file.} All text must be in a two-column format. The total allowable width of the text area is $6\frac78$ inches (17.5 cm) wide by $8\frac78$ inches (22.54 cm) high. Columns are to be $3\frac14$ inches (8.25 cm) wide, with a $\frac{5}{16}$ inch (0.8 cm) space between them. The top margin should begin 1.0 inch (2.54 cm) from the top edge of the page. The bottom margin should be 1-1/8 inches (2.86 cm) from the bottom edge of the page for $8.5 \times 11$-inch paper; for A4 paper, approximately 1-5/8 inches (4.13 cm) from the bottom edge of the page. Please number all of your sections and any displayed equations. It is important for readers to be able to refer to any particular equation. Wherever Times is specified, Times Roman may also be used. Main text should be in 10-point Times, single-spaced. Section headings should be in 10 or 12 point Times. All paragraphs should be indented 1 pica (approx. 1/6 inch or 0.422 cm). Figure and table captions should be 9-point Roman type as in Figure~\ref{fig:onecol}. List and number all bibliographical references in 9-point Times, single-spaced, at the end of your response. When referenced in the text, enclose the citation number in square brackets, for example~\cite{Authors14}. Where appropriate, include the name(s) of editors of referenced books. \begin{figure}[t] \begin{center} \fbox{\rule{0pt}{1in} \rule{0.9\linewidth}{0pt}} \end{center} \caption{Example of caption. It is set in Roman so that mathematics (always set in Roman: $B \sin A = A \sin B$) may be included without an ugly clash.} \label{fig:long} \label{fig:onecol} \end{figure} \subsection{Illustrations, graphs, and photographs} All graphics should be centered. Please ensure that any point you wish to make is resolvable in a printed copy of the response. Resize fonts in figures to match the font in the body text, and choose line widths which render effectively in print. Many readers (and reviewers), even of an electronic copy, will choose to print your response in order to read it. You cannot insist that they do otherwise, and therefore must not assume that they can zoom in to see tiny details on a graphic. When placing figures in \LaTeX, it's almost always best to use \verb+\includegraphics+, and to specify the figure width as a multiple of the line width as in the example below {\small\begin{verbatim} \usepackage[dvips]{graphicx} ... \includegraphics[width=0.8\linewidth] {myfile.eps} \end{verbatim} } {\small \bibliographystyle{ieee_fullname} \section{Conclusion} \label{sec:conclusion} \vspace*{-0.05in} We introduced SetVAE, a novel hierarchical VAE for sets of varying cardinality. By adopting a novel bottleneck equivariant layer that exploits subset representations, SetVAE performs hierarchical subset reasoning to encode and generate sets in a coarse-to-fine manner. As a result, SetVAE generates high-quality, diverse sets using a less number of parameters than baselines. We also showed that SetVAE achieves cardinality disentanglement and generalization. Our future work could include extending SetVAE to datasets involving sparse object annotations. \section{Experiments} \label{sec:experiment} \iffalse \begin{figure*}[t!] \centering \includegraphics[width=\textwidth]{figures/comparison-ablation.pdf} \caption{Examples of randomly generated samples from SetVAE (ours) and PointFlow in ShapeNet. \shcmt{Consider different way to visualize the points.} \shcmt{Remove comparison to PointFlow and make it to single column.} } \end{figure*} \fi \begin{figure}[t!] \centering \includegraphics[width=0.47\textwidth]{figures/fig-4-comparison.pdf} \vspace{-0.5cm} \caption{Examples of randomly generated point sets from SetVAE (ours) and PointFlow in ShapeNet. } \label{fig:compare_pointflow} \vspace{-0.5cm} \end{figure} \subsection{Experimental Setup} \label{sec:quantitative} \paragraph{Dataset} We examine SetVAE using ShapeNet~\cite{chang2015shapenet}, Set-MNIST~\cite{zhang2020deep}, and Set-MultiMNIST~\cite{eslami2016attend} datasets. For ShapeNet, we follow the prior work using 2048 points sampled uniformly from the mesh surface~\cite{yang2019pointflow}. For Set-MNIST, we binarized the images in MNIST and scale the coordinates to $[0, 1]$ \cite{kosiorek2020conditional}. Similarly, we build Set-MultiMNIST using $64\times64$ images of MultiMNIST~\cite{eslami2016attend} with two digits randomly located without overlap. \vspace*{-0.2in} \paragraph{Evaluation Metrics} For evaluation in ShapeNet, we compared the standard metrics including Jensen-Shannon Divergence (JSD), Minimum Matching Distance (MMD), Coverage (COV), and 1-Nearest Neighbor Accuracy (1-NNA), where the similarity between point clouds required to compute those metrics are evaluted using both Chamfer Distance (CD) and Earth Mover's Distance (EMD). The details of the metrics can be found in the supplementary file. \subsection{Comparison to Other Methods} We compare SetVAE with the state-of-the-art generative models for point clouds including l-GAN~\cite{achlioptas2018learning}, PC-GAN~\cite{li2018point}, and PointFlow~\cite{yang2019pointflow}. Following these works, we train our model for each category of airplane, chair, and car. Table~\ref{table:pointeval} summarizes the evaluation result. SetVAE achieves better or competitive performance to the prior arts using a \emph{much smaller} number of parameters ($6\%$ to $33\%$ of competitors). Notably, SetVAE outperforms PointFlow with a significant margin in terms of coverage (COV) and has better or comparable minimum matching distance (MMD). High coverage indicates that SetVAE generates diverse samples covering various modes in data, and low MMD implies that it generates consistent and high-quality samples. Together, the results indicate that SetVAE generates diverse, high-quality point sets. Notably, we find that SetVAE trained with CD (Eq.~\eqref{eqn:reconstruction_cd}) generalizes well to EMD-based metrics than l-GAN. Figure \ref{fig:compare_pointflow} illustrates qualitative comparisons. Compared to PointFlow, we observe that SetVAE generates sharper details, especially in small object parts such as wings/engines of an airplane or wheels of a car. We conjecture that this is because our model generates samples considering inter-element dependency while capturing shapes in various granularities via hierarchical latent structure. \begin{figure}[!t] \centering \includegraphics[width=0.47\textwidth]{figures/fig-5-cardinality.pdf} \vspace{-0.2cm} \caption{ Samples from SetVAE for different cardinalities. At each row, the hierarchical latent variables are fixed and the initial set is re-sampled with different cardinality. } \label{fig:cardinality} \vspace{-0.5cm} \end{figure} \begin{figure}[!t] \centering \includegraphics[width=0.9\linewidth]{figures/mega-cardinality.pdf} \caption{ Samples from SetVAE and PointFlow in a high cardinality setting. Only the initial sets are re-sampled. } \label{fig:mega-cardinality} \vspace{-0.5cm} \end{figure} \subsection{Internal Analysis} \label{sec:qualitative} \paragraph{Cardinality disentanglement} Ideally, a generative model for sets should be able to disentangle the cardinality of a set from the rest of the generative factors (\emph{e.g.}, structure, style). SetVAE partly achieves this by decomposing the latent variables into the initial set $\mathbf{z}^{(0)}$ and the hierarchical latent variables $\mathbf{z}^{(1:L)}$. To validate this, we generate samples by changing the initial set's cardinality while fixing the rest. Figure~\ref{fig:cardinality} illustrates the result. We observe that SetVAE generates samples having consistent global structure with a varying number of elements. Surprisingly, it even generalizes well to the cardinalities not seen during training. For instance, the model generalizes to any cardinality between 100 and 10,000, although it is trained with only 2048 points in ShapeNet and less than 250 points in Set-MNIST. It shows that SetVAE disentangles the cardinality from the factors characterizing an object. We compare SetVAE to PointFlow in extremely high cardinality setting (100k points) in Figure~\ref{fig:mega-cardinality}. Although PointFlow innately disentangles cardinality by modeling each element independently, we observe that it tends to generate noisy, blurry boundaries in large cardinality settings. In contrast, SetVAE retains the sharpness of the structure even for extreme cardinality, presumably because it considers inter-element dependency in the generation process. \paragraph{Discovering coarse-to-fine dependency} The SetVAE discovers interesting subset structures via hierarchical bottlenecks in ISAB and ABL. To demonstrate this, we visualize the encoder attention (Eq.~\eqref{eqn:isab_bottleneck}) and generator attention (Eq.~\eqref{eqn:abl_bottleneck}) in Figure~\ref{fig:subset}, where each point is color-coded based on its hard assignment to one of $m$ inducing points \footnote{Due to the difficulties in visualizing attention with multiple heads, we present a result of single-head attention model for illustration purposes.}. We observe that SetVAE attends to semantically interesting parts consistently across samples, such as wings and engines of an airplane, legs and backs of a chair, and even different instances of multiple digits. \begin{figure}[!t] \centering \includegraphics[width=1.0\linewidth]{figures/fig-6.pdf} \caption{ Attention visualization at a selected layer. Each point is color-coded by its assignment based on attention. } \label{fig:subset} \vspace{-0.3cm} \end{figure} \begin{figure}[!t] \centering \includegraphics[width=0.95\linewidth]{figures/fig-7.pdf} \caption{Visualization of encoder attention across multiple layers. IP notes the number of inducing points at each level. See the supplementary file for more results. } \label{fig:composition} \vspace{-0.4cm} \end{figure} Figure~\ref{fig:composition} illustrates the point-wise attention across levels. We observe that the top-level tends to capture the coarse and symmetric structures, such as wings and wheels, which are further decomposed into much finer granularity in the subsequent levels. We conjecture that this coarse-to-fine subset dependency helps the model to generate accurate structure in various granularity from global structure to local details. Interestingly, we find that hierarchical structure of SetVAE sometimes leads to a disentanglement of generative factors across layers. To demonstrate this, we train two classifiers in Set-MultiMNIST, one for digit class and the other for their positions. We train the classifiers using latent variable at each layer of the generator as an input, and measure the accuracy at each layer. In Figure~\ref{fig:lda}, the latent variables at the lower layers tend to contribute more in locating the digits, while higher layers contribute in generating shape. \iffalse This subset-wise reasoning offers essential advantages. Subset reasoning allows SetVAE to effectively reduce the number of parameters by amortizing elementwise reasoning cost. We also observe that each subset representation is invariant to the input set's cardinality, {\color{red}and suppose that subset reasoning may support SetVAE's generalization to different cardinality. \color{red}Need more Explanation.} The observation is demonstrated in Figure \ref{fig:subset-cardinality}. \fi \begin{figure}[!t] \centering \includegraphics[width=0.55\linewidth]{figures/lda.pdf} \vspace{-0.3cm} \caption{ Layer-wise classification results using the hierarchical latent variables in Set-MultiMNIST dataset. } \label{fig:lda} \vspace{-0.2cm} \end{figure} \iffalse \paragraph{Multi-level} SetVAE learns coarse-to-fine subset relations via multi-scale hierarchical latent sets. By setting the top-down hierarchical latent set scales to increase gradually, we observe that the model learns a coarse-to-fine composition of data. We demonstrate this by replacing a latent set at a specific hierarchy with a latent set from \jw{other} data and observing modified visual features. The qualitative results are demonstrated in Figure \ref{fig:mix}. \jw{We further assess the learned hierarchical latent sets in Set-MultiMNIST, where coarse-to-fine composition (e.g. location to digit identities) is evident.} We validate the role of each latent set by analyzing the learned latent space group-by-group in Set-MultiMNIST. We perform LDA for each latent set. One predicts binned location of digits, and another predicts identity of the digits. In Figure \ref{fig:lda}, we show that low-res, upper latent sets encodes coarse digit positions, and a high-res, lower latent sets encode fine digit identities. \fi \vspace*{-0.2in} \paragraph{Ablation study} Table~\ref{table:ablation} summarizes the ablation study of SetVAE (see the supplementary file for qualitative results and evaluation detail). We consider two baselines for comparison: Vanilla SetVAE employing a global latent variable $\mathbf{z}^{(1)}$ (Section~\ref{sec:method}), and hierarchical SetVAE with unimodal prior (Section~\ref{sec:implementation}). The Vanilla SetVAE performs much worse than our full model. We conjecture that a single latent variable is not expressive enough to encode complex variations in MultiMNIST, such as identity and position of multiple digits. We also find that multi-modal prior stabilizes the training of attention and guides the model to better local optima. \begin{table}[t!] \begin{center} \caption{Ablation study performed on Set-MultiMNIST dataset using FID scores for {$64\times 64$} rendered images.} \vspace{-0.2cm} \footnotesize \label{table:ablation} \begin{tabular}{lc} \Xhline{2\arrayrulewidth} \\[-1em] Model & FID($\downarrow$) \\ \\[-1em]\Xhline{2\arrayrulewidth} \\[-1em] SetVAE & 1062 \\ Non-hierarchical & 1470 \\ Unimodal prior & 1252 \\ \\[-1em]\Xhline{2\arrayrulewidth} \end{tabular} \end{center} \vspace{-0.6cm} \end{table} \section{Introduction} \label{sec:intro} \ifdefined\paratitle {\color{blue} [There has been an increasing demand on ML for set data: give some examples of set data] \\ } \fi There have been increasing demands in machine learning for handling \emph{set-structured} data (\emph{i.e.}, a group of unordered instances). Examples of set-structured data include object bounding boxes~\cite{li2019grains, carion2020endtoend}, point clouds~\cite{achlioptas2018learning, li2018point}, support sets in the meta-learning~\cite{finn2017modelagnostic}, \emph{etc.} While initial research mainly focused on building neural network architectures to encode sets~\cite{zaheer2017deep,lee2019set}, generative models for sets have recently grown popular~\cite{zhang2020deep,kosiorek2020conditional, stelzner2020generative,yang2019pointflow, yang2020energybased}. \ifdefined\paratitle {\color{blue} [In this paper, we explore a generative model for set: introduce some recent works in set generation. Discuss what poses the unique challenges in set generative modeling. ] \\ } \fi A generative model for set-structured data should verify the two essential requirements: (i) \textit{exchangeability}, meaning that a probability of a set instance is invariant to its elements' ordering, and (ii) handling \textit{variable cardinality}, meaning that a model should flexibly process sets with variable cardinalities. These requirements pose a unique challenge in set generative modeling, as they prevent the adaptation of standard generative models for sequences or images~\cite{goodfellow2014generative, karras2019stylebased, oord2016pixel,oord2016conditional}. For instance, typical operations in these models, such as convolution or recurrent operations, exploit implicit ordering of elements (\emph{e.g.}, adjacency), thus breaking the exchangeability. Several works circumvented this issue by imposing heuristic ordering~\cite{hong2018inferring, eslami2016attend, greff2019multi, ritchie2019fast}. However, when applied to set-structured data, any ordering assumed by a model imposes an unnecessary inductive bias that might harm the generalization ability. \begin{figure}[t] \begin{center} \includegraphics[width=0.47\textwidth]{figures/fig-1-ann-1.pdf} \end{center} \caption{Color-coded attention learned by SetVAE encoder for three data instances of ShapeNet Airplane \cite{chang2015shapenet}. Level 1 shows attention in the most coarse scale. Level 2 and 3 show attention in more fine-scales. } \label{fig:eyecatcher} \end{figure} \begin{table*}[!ht] \centering \footnotesize \caption{Summary of several set generative frameworks available to date. Our SetVAE jointly achieves desirable properties, with the advantages of VAE framework combined with our novel contributions. } \begin{tabular}{l>{\centering}m{0.12\textwidth}>{\centering}m{0.1\textwidth}>{\centering}m{0.12\textwidth}>{\centering\arraybackslash}m{0.1\textwidth}} \Xhline{2\arrayrulewidth} \\[-1em] Model & Exchangeability & \shortstack{Variable\\cardinality} & \shortstack{Inter-element\\dependency} & \shortstack{Hierachical\\latent structure} \\ \\[-1em]\Xhline{2\arrayrulewidth} \\[-1em] l-GAN \cite{achlioptas2018learning} & $\times$ & $\times$ & $\bigcirc$ & $\times$ \\ PC-GAN \cite{li2018point} & $\bigcirc$ & $\bigcirc$ & $\times$ & $\times$ \\ PointFlow \cite{yang2019pointflow} & $\bigcirc$ & $\bigcirc$ & $\times$ & $\times$ \\ EBP \cite{yang2020energybased} & $\bigcirc$ & $\bigcirc$ & $\bigcirc$ & $\times$ \\ \\[-1em]\hline \\[-1em] SetVAE (ours) & $\bigcirc$ & $\bigcirc$ & $\bigcirc$ & $\bigcirc$ \\ \\[-1em]\Xhline{2\arrayrulewidth} \end{tabular} \label{table:framework} \end{table*} \ifdefined\paratitle {\color{blue} [However, existing models for set has several limitations: discuss their limitations, and argue that our model handles them] \\ } \fi There are several existing works satisfying these requirements. Edwards et al.,~\cite{edwards2017neural} proposed a simple generative model encoding sets into latent variables, while other approaches build upon various generative models, such as generative adversarial networks~\cite{li2018point, stelzner2020generative}, flow-based models~\cite{yang2019pointflow,kim2020softflow}, and energy-based models~\cite{yang2020energybased}. All these works define valid generative models for set-structured data, but with some limitations. To achieve exchangeability, many approaches process set elements independently~\cite{li2018point, yang2019pointflow}, limiting the models in reflecting the interactions between the elements during generation. Some approaches take the inter-element dependency into account~\cite{stelzner2020generative, yang2020energybased}, but have an upper bound on the number of elements~\cite{stelzner2020generative}, or less scalable due to heavy computations~\cite{yang2020energybased}. More importantly, existing models are less effective in capturing subset structures in sets presumably because they represent a set with a single-level representation. For sets containing multiple sub-objects or parts, it would be beneficial to allow a model to have structured latent representations such as one obtained via hierarchical latent variables. \ifdefined\paratitle {\color{blue} [We propose a hierarchical Variational Autoencoder for set: give an overview of our method. discuss how it addresses the limitations in the existing methods] \\ } \fi In this paper, we propose SetVAE, a novel hierarchical variational autoencoder (VAE) for sets. SetVAE models interaction between set elements by adopting attention-based Set Transformers \cite{lee2019set} into the VAE framework, and extends it to a \textit{hierarchy} of latent variables \cite{sonderby2016ladder, vahdat2020nvae} to account for flexible subset structures. By organizing latent variables at each level as a \textit{latent set} of fixed cardinality, SetVAE is able to learn hierarchical multi-scale features that decompose a set data in a coarse-to-fine manner (Figure \ref{fig:eyecatcher}) while achieving \textit{exchangeability} and handling \textit{variable cardinality}. In addition, composing latent variables invariant to input's cardinality allows our model to generalize to arbitrary cardinality unseen during training. \ifdefined\paratitle {\color{blue} [Discuss the contribution of our work using the bullet-items.] \\ } \fi The contributions of this paper are as follows: \begin{itemize} \item We propose SetVAE, a novel hierarchical VAE for sets with \textit{exchangeability} and \textit{varying cardinality}. To the best of our knowledge, SetVAE is the first VAE successfully applied for sets with arbitrary cardinality. SetVAE has a number of desirable properties compared to previous works, as summarized in Table \ref{table:framework}. \item Equipped with novel Attentive Bottleneck Layers (ABL), SetVAE is able to model the coarse-to-fine dependency across the arbitrary number of set elements using a hierarchy of latent variables. \item We conduct quantitative and qualitative evaluations of SetVAE on generative modeling of point cloud in various datasets, and demonstrate better or competitive performance in generation quality with less number of parameters than the previous works. \end{itemize} \section{Variational Autoencoders for Sets} \label{sec:method} The previous section suggests that there are two essential requirements for VAE for set-structured data: it should be able to model the likelihood of sets (i) in arbitrary cardinality, and (ii) invariant to the permutation (\emph{i.e.,} exchangeable). This section introduces our SetVAE objective that satisfies the first requirement, while achieving the second requirement is discussed in Section~\ref{sec:architecture}. The objective of VAE \cite{kingma2014autoencoding} is to learn a generative model $p_\theta(\mathbf{x}, \mathbf{z}) = p_\theta(\mathbf{z}) p_\theta(\mathbf{x}|\mathbf{z})$ for data $\mathbf{x}$ and latent variables $\mathbf{z}$. Since the true posterior is unknown, we approximate it using the inference model $q_\phi(\mathbf{z}|\mathbf{x})$ and optimize the variational lower bound (ELBO) of the marginal likelihood $p(\mathbf{x})$: \begin{equation} \mathcal{L}_{\text{VAE}} = \mathbb{E}_{q_\phi(\mathbf{z}|\mathbf{x})}{\left[\log p_\theta(\mathbf{x}|\mathbf{z})\right]} - \text{KL}\left(q_\phi(\mathbf{z}|\mathbf{x})||p_\theta(\mathbf{z})\right). \label{eqn:original_vae} \end{equation} \vspace*{-0.2in} \paragraph{Vanilla SetVAE} When our data is a set $\mathbf{x}=\{\mathbf{x}_i\}_{i=1}^n$, Eq.~\eqref{eqn:original_vae} should be modified such that it can incorporate the set of arbitrary cardinality $n$\footnote{Without loss of generality, we use $n$ to denote the cardinality of a set but assume that the training data is composed of sets in various size.}. To this end, we propose to decompose the latent variable $\mathbf{z}$ into the two independent variables as $\mathbf{z}=\{\mathbf{z}^{(0)}, \mathbf{z}^{(1)}\}$. We define $\mathbf{z}^{(0)}=\{\mathbf{z}_i^{(0)}\}_{i=1}^n$ to be a set of \textit{initial elements}, whose cardinality is always the same as a data $\mathbf{x}$. Then we model the generative process as transforming $\mathbf{z}^{(0)}$ into a set $\mathbf{x}$ conditioned on the $\mathbf{z}^{(1)}$. Given the independence assumption, the prior is factorized by $p(\mathbf{z})=p(\mathbf{z}^{(0)})p(\mathbf{z}^{(1)})$. The prior on initial set $p(\mathbf{z}^{(0)})$ is further decomposed into the cardinality and element-wise distributions as: \begin{equation} p(\mathbf{z}^{(0)}) = p(n)\prod_{i=1}^np(\mathbf{z}_{i}^{(0)}). \label{eqn:prior_initialset} \end{equation} We model $p(n)$ using the empirical distribution of the training data cardinality. We find that the choice of the prior $p(\mathbf{z}_i^{(0)})$ is critical to the performance, and discuss its implementation in Section~\ref{sec:implementation}. Similar to the prior, the approximate posterior is defined as $q(\mathbf{z}|\mathbf{x}) = q(\mathbf{z}^{(0)}|\mathbf{x})q(\mathbf{z}^{(1)}|\mathbf{x})$ and decomposed into: \begin{equation} q(\mathbf{z}^{(0)}|\mathbf{x}) = q(n|\mathbf{x})\prod_{i=1}^nq(\mathbf{z}_{i}^{(0)}|\mathbf{x}) \label{eqn:posterior_vanillaSetVAE} \end{equation} We define $q(n|\mathbf{x})=\delta(n)$ as a delta function with $n=|\mathbf{x}|$, and set $q(\mathbf{z}_{i}^{(0)}|\mathbf{x}) = p(\mathbf{z}_{i}^{(0)})$ similar to \cite{yang2019pointflow, kosiorek2020conditional, locatello2020objectcentric}. The resulting ELBO can be written as \begin{align} \mathcal{L}_{\text{SVAE}}&= \mathbb{E}_{q(\mathbf{z}|\mathbf{x})}{\left[ \log p(\mathbf{x}|\mathbf{z}) \right]} \nonumber\\ &- \textnormal{KL}(q(\mathbf{z}^{(0)}|\mathbf{x})||p(\mathbf{z}^{(0)})) \nonumber\\ &- \textnormal{KL}(q(\mathbf{z}^{(1)}|\mathbf{x})||p(\mathbf{z}^{(1)})). \label{eqn:elbo_vanillaSetVAE} \end{align} In the supplementary file, we show that the first KL divergence in Eq.~\eqref{eqn:elbo_vanillaSetVAE} is a constant and can be ignored in the optimization. During inference, we sample $\mathbf{z}^{(0)}$ by first sampling the cardinality $n\sim p(n)$ then the $n$ initial elements independently from the prior $p(\mathbf{z}_{i}^{(0)})$. \vspace*{-0.2in} \paragraph{Hierarchical SetVAE} To allow our model to learn a more expressive latent structure of the data, we can extend the vanilla SetVAE using hierarchical latent variables. Specifically, we extend the plain latent variable $\mathbf{z}^{(1)}$ into $L$ disjoint groups $\{\mathbf{z}^{(1)}, ..., \mathbf{z}^{(L)}\}$, and introduce a top-down hierarchical dependency between $\mathbf{z}^{(l)}$ and $\{\mathbf{z}^{(0)}, ..., \mathbf{z}^{(l-1)}\}$ for every $l>1$. This leads to the modification in the prior and approximate posterior to \begin{align} p(\mathbf{z}) &= p(\mathbf{z}^{(0)}) p(\mathbf{z}^{(1)}) \prod_{l>1} {p(\mathbf{z}^{(l)}|\mathbf{z}^{(<l)})}\label{eqn:prior}\\ q(\mathbf{z}|\mathbf{x}) &= q(\mathbf{z}^{(0)}|\mathbf{x}) q(\mathbf{z}^{(1)}|\mathbf{x}) \prod_{l>1} {q(\mathbf{z}^{(l)}|\mathbf{z}^{(<l)}, \mathbf{x})}. \label{eqn:posterior} \end{align} Applying Eq.~\eqref{eqn:prior} and \eqref{eqn:posterior} to Eq.~\eqref{eqn:elbo_vanillaSetVAE}, we can derive the ELBO as \begin{align} &\mathcal{L}_{\text{HSVAE}} = \mathbb{E}_{q(\mathbf{z}|\mathbf{x})}{\left[ \log p(\mathbf{x}|\mathbf{z}) \right]} \nonumber\\ &~~- \textnormal{KL}(q(\mathbf{z}^{(0)}|\mathbf{x})||p(\mathbf{z}^{(0)})) - \textnormal{KL}(q(\mathbf{z}^{(1)}|\mathbf{x})||p(\mathbf{z}^{(1)})) \nonumber\\ &~- \sum_{l=2}^L{\mathbb{E}_{q(\mathbf{z}^{(<l)}|\mathbf{x})}{\textnormal{KL}(q(\mathbf{z}^{(l)}|\mathbf{z}^{(<l)}, \mathbf{x})||p(\mathbf{z}^{(l)}|\mathbf{z}^{(<l)})}}. \label{eqn:elbo_hierarchicalSetVAE} \end{align} \vspace*{-0.2in} \paragraph{Hierarchical prior and posterior} To model the prior and approximate posterior in Eq.~\eqref{eqn:prior} and \eqref{eqn:posterior} with top-down latent dependency, we employ the bidirectional inference in \cite{sonderby2016ladder}. We outline the formulations here and elaborate on the computations in Section~\ref{sec:architecture}. Each conditional $p(\mathbf{z}^{(l)}|\mathbf{z}^{(<l)})$ in the prior is modeled by the factorized Gaussian, whose parameters are dependent on the latent variables of the upper hierarchy $\mathbf{z}^{(<l)}$: \begin{equation} p(\mathbf{z}^{(l)}|\mathbf{z}^{(<l)}) = \mathcal{N}\left(\mu_l(\mathbf{z}^{(<l)}), \sigma_l(\mathbf{z}^{(<l)})\right). \label{eqn:normal_prior} \end{equation} Similarly, each conditional in the approximate posterior $q(\mathbf{z}^{(l)}|\mathbf{z}^{(<l)}, \mathbf{x})$ is also modeled by the factorized Gaussian. We use the residual parameterization in \cite{vahdat2020nvae} which predicts the parameters of the Gaussian using the displacement and scaling factors ($\Delta\mu$,$\Delta\sigma$) conditioned on $\mathbf{z}^{(<l)}$ and $\mathbf{x}$: \begin{align} q(\mathbf{z}^{(l)}|\mathbf{z}^{(<l)}, \mathbf{x}) = \mathcal{N}(&\mu_l(\mathbf{z}^{(<l)}) + \Delta\mu_l(\mathbf{z}^{(<l)}, \mathbf{x}), \nonumber\\ &\sigma_l(\mathbf{z}^{(<l)}) \cdot \Delta\sigma_l(\mathbf{z}^{(<l)}, \mathbf{x})). \label{eqn:normal_posterior} \end{align} \vspace*{-0.2in} \paragraph{Invariance and equivariance} \iffalse {\color{magenta} We are encoding a set $\mathbf{x}$ into an initial set $\mathbf{z}^{(0)}$ and latent variables $\mathbf{z}^{(1:L)}:=\{\mathbf{z}^{(l)}\}_{l=1}^L$. Hence, it is natural to assume that $q(\mathbf{z}^{(0)}|\mathbf{x})$ is equivariant w.r.t. the permutation of $\mathbf{x}$ and $q(\mathbf{z}^{(1:L)}|\mathbf{x})$ is invariant to the permutation of $\mathbf{x}$ (because we want a unique representation of $\mathbf{x}$). Likewise, we assume that the decoding distribution $p(\mathbf{x}|\mathbf{z}^{(0)}, \mathbf{z}^{(1:L)})$ is equivariant to the permutation of $\mathbf{z}^{(0)}$. } \fi We assume that the decoding distribution $p(\mathbf{x}|\mathbf{z}^{(0)}, \mathbf{z}^{(1:L)})$ is equivariant to the permutation of $\mathbf{z}^{(0)}$ and invariant to the permutation of $\mathbf{z}^{(1:L)}$ since such model induces an exchangeable model: \begin{align} \lefteqn{p(\pi(\mathbf{x})) = \int p(\pi(\mathbf{x})|\pi(\mathbf{z}^{(0)}), \mathbf{z}^{(1:L)}) p(\pi(\mathbf{z}^{(0)})) p(\mathbf{z}^{(1:L)}) d\mathbf{z}}\nonumber\\ &= \int p(\mathbf{x}|\mathbf{z}^{(0)},\mathbf{z}^{(1:L)}) p(\mathbf{z}^{(0)}) p(\mathbf{z}^{(1:L)}) d\mathbf{z} = p(\mathbf{x}). \end{align} We further assume that $q(\mathbf{z}^{(0)}|\mathbf{x})$ is equivariant and $q(\mathbf{z}^{(1:L)}|\mathbf{x})$ is invariant to the permutation of $\mathbf{x}$. In the following section, we describe how we implement the encoder and decoder satisfying these criteria. \section{SetVAE Framework} \label{sec:architecture} We present the overall framework of the proposed SetVAE. Figure~\ref{fig:overview} illustrates an overview. SetVAE is based on the bidirectional inference~\cite{sonderby2016ladder}, which is composed of the bottom-up encoder and top-down generator sharing the same dependency structure. In this framework, the inference network forms the approximate posterior by merging bottom-up information from data with the top-down information from the generative prior. We construct the encoder using a stack of ISABs in Section~\ref{sec:settransformer}, and treat each of the projected set $\mathbf{h}$ as a deterministic encoding of data. \iffalse {\color{OliveGreen} Here, the inference model uses the same dependency structure to the top-down generator. During bidirectional inference, the inference network forms the approximate posterior by merging a bottom-up information from data with top-down information from the generative prior. This requires a bottom-up encoder that extracts information from data. For the purpose, we employ a stack of ISAB in Section~\ref{sec:settransformer} and treat each projected set $\mathbf{h}$ as deterministic encoding of data.} \fi Our generator is composed of a stack of special layers called Attentive Bottleneck Layer (ABL), which extends the ISAB in Section~\ref{sec:settransformer} with the stochastic interaction with the latent variable. Specifically, ABL processes a set at each layer of the generator as follows: \begin{align} \text{ABL}_m(\mathbf{x}) &= \text{MAB}(\mathbf{x}, \text{FF}(\mathbf{z}))\in \mathbb{R}^{n\times d}\label{eqn:abp}\\ \text{with}~~\mathbf{h} &= \text{MAB}(I, \mathbf{x})\in \mathbb{R}^{m\times d}\label{eqn:abl_bottleneck}, \end{align} where $\text{FF}$ denotes a feed-forward layer and the latent variable $\mathbf{z}$ is derived from the projection $\mathbf{h}$. For generation (Figure~\ref{fig:setvae_generation}), we sample $\mathbf{z}$ from the prior in Eq.~\eqref{eqn:normal_prior} by, \begin{align} \mathbf{z} &\sim \mathcal{N}(\mu, \sigma)~\text{where}~\mu, \sigma = \text{FF}(\mathbf{h}). \label{eqn:abp_z_prior} \end{align} For inference (Figure~\ref{fig:setvae_inference}), we sample $\mathbf{z}$ from the posterior in Eq.~\eqref{eqn:normal_posterior} by, \begin{align} &\mathbf{z} \sim \mathcal{N}(\mu+\Delta\mu, \sigma\cdot\Delta\sigma) \nonumber\\ &\text{where}~\Delta\mu, \Delta\sigma = \text{FF}(\mathbf{h}+\mathbf{h}_{\text{enc}}), \label{eqn:abp_z_posterior} \end{align} where $\mathbf{h}_{\text{enc}}$ is obtained from the corresponding ISAB layer of the bottom-up encoder. Following \cite{sonderby2016ladder}, we share the parameters between the generative and inference networks. A detailed illustration of ABL is in the supplementary file. To generate a set, we first sample the initial elements $\mathbf{z}^{(0)}$ and the latent variable $\mathbf{z}^{(1)}$ from the prior $p(\mathbf{z}^{(0)})$ and $p(\mathbf{z}^{(1)})$, respectively. Given these inputs, the generator iteratively samples the subsequent latent variables $\mathbf{z}^{(l)}$ from the prior $p(\mathbf{z}^{(l)}|\mathbf{z}^{(<l)})$ one by one at each layer of ABL, while processing the set conditioned on the sampled latent variable via Eq.~\eqref{eqn:abp}. The data $\mathbf{x}$ is then decoded elementwise from the final output. \iffalse {\color{OliveGreen} During generation, the latent variables are sampled in top-down order. At level $l$, an $\textnormal{ABL}$ predicts the parameters of prior conditional $p(\mathbf{z}^{(l)}|\mathbf{z}^{(<l)})$. After sampling, the latent variable is treated as a conditioning input, supporting the top-down dependency to the next level. This is analogous to combination of deterministic and stochastic features during top-down pass in \cite{kingma2017improving}. After all latent variables are sampled, a data sample can be decoded elementwise from the final output. } \fi \subsection{Analysis} \paragraph{Modeling Exchangeable Likelihood} The architecture of SetVAE satisfies the invariance and equivariance criteria in Section~\ref{sec:method}. This is, in part, achieved by producing latent variables from the projected sets of bottom-up ISAB and top-down ABL. As the projected sets are permutation invariant to input (Section~\ref{sec:preliminary}), the latent variables $\mathbf{z}^{(1:L)}$ provide an invariant representation of the data. Furthermore, due to permutation equivariance of ISAB, the top-down stack of ABLs produce an output equivariant to the initial set $\mathbf{z}^{(0)}$. This renders the decoding distribution $p(\mathbf{x}|\mathbf{z}^{(0)}, \mathbf{z}^{(1:L)})$ permutation equivariant to $\mathbf{z}^{(0)}$. Consequently, the decoder of SetVAE induces an exchangeable model. \vspace*{-0.2in} \paragraph{Learning Coarse-to-Fine Dependency} In SetVAE, both the ISAB and ABL project the input set $\mathbf{x}$ of cardinality $n$ to the projected set $\mathbf{h}$ of cardinality $m$ via multi-head attention (Eq.~\eqref{eqn:isab_bottleneck} and \eqref{eqn:abl_bottleneck}). In the case of $m<n$, this projection functions as a bottleneck to the cardinality. This allows the model to encode some features of $\mathbf{x}$ into the $\mathbf{h}$ and discover interesting \emph{subset} dependencies across the set elements. Denoting $m_l$ as the bottleneck cardinality at layer $l$ (Figure~\ref{fig:overview}), we set $m_{l}<m_{l+1}$ to induce the model to discover coarse-to-fine dependency of the set, such as object parts. Such bottleneck also effectively reduces network size, allowing our model to perform competitive or better than the prior arts with less than 30\% of their parameters. This coarse-to-fine structure is a unique feature of SetVAE. \begin{figure}[t!] \centering \begin{subfigure}[b]{0.17\textwidth} \centering \includegraphics[height=5.5cm]{figures/SetVAE_generation.pdf} \caption{Generation} \label{fig:setvae_generation} \end{subfigure} \hfill \begin{subfigure}[b]{0.3\textwidth} \centering \includegraphics[height=5.5cm]{figures/SetVAE_inference.pdf} \caption{Inference} \label{fig:setvae_inference} \end{subfigure} \caption{The hierarchical SetVAE. $\mathcal{N}_{prior}$ denotes the prior (Eq.~\eqref{eqn:abp_z_prior}) and $\mathcal{N}_{post}$ denotes the posterior (Eq.~\eqref{eqn:abp_z_posterior}). } \vspace{-0.3cm} \label{fig:overview} \end{figure} \subsection{Implementation Details} \label{sec:implementation} \vspace*{-0.07in} This section discusses the implementation of SetVAE. We leave comprehensive details on the supplementary file. \vspace*{-0.2in} \iffalse \paragraph{PreLN.} We observe that the Layer Normalization (LN) in ISAB and ABL makes the training unstable and hurts the performance. We find that moving LN before the multi-head attention and feedforward layer as suggested by \cite{xiong2020layer} greatly improves the stability and performance. \fi \vspace*{-0.2in} \paragraph{Multi-Modal Prior.} Although a unimodal Gaussian is a typical choice for the initial element distribution $p(\mathbf{z}^{(0)}_i)$ \cite{kosiorek2020conditional, yang2019pointflow}, we find that the model converges significantly faster when we employ the multi-modal prior. We use a mixture of Gaussians (MoG) with $K$ components: \begin{equation} p(\mathbf{z}^{(0)}_i) = \sum_{k=1}^K{\pi_k\mathcal{N}(\mathbf{z}^{(0)}_i|\mu^{(0)}_k, \sigma^{(0)}_k)}. \label{eqn:prior_mog} \end{equation} \vspace*{-0.2in} \paragraph{Normalizing Flows.} A simple extension for more expressive $p(\mathbf{z}^{(0)})$ is passing the sampled initial set through a number of normalizing flows \cite{rezende2016variational}. We demonstrate that applying a number of planar flows $f(\mathbf{z}^{(0)}_i) = \mathbf{z}^{(0)}_i + \mathbf{u}h(\mathbf{w}^\mathrm{T}\mathbf{z}^{(0)}_i+b)$ on top of MoG enhances model performance. Although the normalizing flow itself can model the multi-modal prior distribution without MoG in principle, we found that the model converges much faster with the multi-modal prior. \vspace*{-0.2in} \paragraph{Likelihood.} For the likelihood $p_\theta(\mathbf{x}|\mathbf{z})$, we may consider a Gaussian distribution centered at the reconstruction. In case of point sets, we design the likelihood by \begin{align} \mathcal{L}_\text{recon}(\mathbf{x}) &= -\log p_\theta(\mathbf{x}|\mathbf{z}) \nonumber\\ &= -\frac{1}{2} \textnormal{EMD}(\mathbf{x}, \hat{\mathbf{x}}) + \mathrm{const}, \end{align} where $\textnormal{EMD}(\mathbf{x}, \hat{\mathbf{x}})$ is the Earth Mover's Distance (EMD) defined as \[ \textnormal{EMD}(\mathbf{x}, \hat{\mathbf{x}}) = \min_{\pi} \| \mathbf{x}_i - \hat{\mathbf{x}}_{\pi(i)}\|_2^2. \] In other words, we measure the likelihood with the Gaussian at optimally permuted $\mathbf{x}$, and thus maximizing this likelihood is equivalent to minimizing the EMD between the data and the reconstruction. Unfortunately, directly maximizing this likelihood requires $O(n^3)$ computation due to the optimal matching. Instead, we choose the Chamfer Distance (CD) as a proxy reconstruction loss, \begin{align} \lefteqn{\mathcal{L}_\text{recon}(\mathbf{x}) = \textnormal{CD}(\mathbf{x}, \hat{\mathbf{x}})} \nonumber\\ &= \sum_{i} \min_j \| \mathbf{x}_i - \hat{\mathbf{x}}_j\|_2^2 + \sum_j \min_i \|\mathbf{x}_i - \hat{\mathbf{x}}_j\|_2^2. \label{eqn:reconstruction_cd} \end{align} The CD may not admit a direct interpretation as a negative log-likelihood of $p_\theta(\mathbf{x}|\mathbf{z})$, but shares the optimum with the EMD having a proper interpretation. By employing the CD for the reconstruction loss, we learn the VAE with a surrogate for the likelihood $p_\theta(\mathbf{x}|\mathbf{z})$. CD requires $O(n^2)$ computation time, so is scalable to the moderately large sets. Note also that the CD should be scaled appropriately to match the likelihood induced by EMD. We implicitly account for this by applying weights to KL divergence in our final objective function: \begin{equation} \mathcal{L}_{\textnormal{HSVAE}}(\mathbf{x}) = \mathcal{L}_{\textnormal{recon}}(\mathbf{x}) + \beta\mathcal{L}_{\textnormal{KL}}(\mathbf{x}), \label{eqn:beta_vae_loss} \end{equation} where $\mathcal{L}_{\textnormal{KL}}(\mathbf{x})$ is the KL divergence in Eq.~\eqref{eqn:elbo_hierarchicalSetVAE}. \section{Preliminaries} \label{sec:preliminary} \subsection{Permutation-Equivariant Set Generation} \label{sec:equivariant} Denote a set as $\mathbf{x} = \{\mathbf{x}_i\}_{i=1}^n \in \mathcal{X}^n$, where $n$ is the cardinality of the set and $\mathcal{X}$ represents the domain of each element $\mathbf{x}_i \in\mathbb{R}^d$. In this paper, we represent $\mathbf{x}$ as a matrix $\mathbf{x} = [\mathbf{x}_1, ..., \mathbf{x}_n]^\mathrm{T} \in\mathbb{R}^{n\times d}$. Note that any operation on a set should be invariant to the elementwise permutation and satisfy the two constraints of \textit{permutation invariance} and \textit{permutation equivariance}. \begin{defn} A function $f:\mathcal{X}^n \rightarrow \mathcal{Y}$ is permutation invariant iff for any permutation $\pi(\cdot)$, $f(\pi(\mathbf{x}))= f(\mathbf{x})$. \end{defn} \begin{defn} A function $f:\mathcal{X}^n \rightarrow \mathcal{Y}^n$ is permutation equivariant iff for any permutation $\pi(\cdot)$, $f(\pi(\mathbf{x}))=\pi( f(\mathbf{x}))$. \end{defn} In the context of generative modeling, the notion of permutation invariance translates into the exchangeability, requiring a joint distribution of the elements invariant with respect to the permutation. \begin{defn} A distribution for a set of random variables $\mathbf{x} = \{\mathbf{x}_i\}_{i=1}^n$ is exchangeable if for any permutation $\pi$, $p(\mathbf{x}) = p(\pi(\mathbf{x}))$. \end{defn} An easy way to achieve exchangeability is to assume each element to be \emph{i.i.d.} and process a set of initial elements $\mathbf{z}^{(0)} = \{\mathbf{z}_i^{(0)}\}_{i=1}^n$ independently sampled from $p(\mathbf{z}_i^{(0)})$ with an elementwise function $f_{\textnormal{elem}}$ to get the $\mathbf{x}$: \begin{equation} \mathbf{x} = \{\mathbf{x}_i\}_{i=1}^n \textnormal{ where } \mathbf{x}_i = f_{\textnormal{elem}} (\mathbf{z}_i^{(0)}) \end{equation} However, assuming elementwise independence poses a limit in modeling interactions between set elements. An alternative direction is to process $\mathbf{z}^{(0)}$ with a permutation-equivariant function $f_{\textnormal{equiv}}$ to get the $\mathbf{x}$: \begin{equation} \mathbf{x} = \{\mathbf{x}_i\}_{i=1}^n = f_{\textnormal{equiv}}(\{\mathbf{z}_i^{(0)}\}_{i=1}^n). \end{equation} We refer to this approach as the \textit{permutation-equivariant generative framework}. As the likelihood of $\mathbf{x}$ does not depend on the order of its elements (because elements of $\mathbf{z}^{(0)}$ are i.i.d.), this approach achieves exchangeability. \subsection{Permutation-Equivariant Set Encoding} \label{sec:settransformer} To design permutation-equivariant operations over a set, Set Transformer~\cite{lee2019set} provides attentive modules that model pairwise interaction between set elements while preserving invariance or equivariance. This section introduces two essential modules in the Set Transformer. \begin{figure}[t!] \centering \begin{subfigure}[b]{0.23\textwidth} \centering \includegraphics[width=0.6\textwidth]{figures/fig_mab.pdf} \caption{MAB} \label{fig:mab} \end{subfigure} \hfill \begin{subfigure}[b]{0.23\textwidth} \centering \includegraphics[width=0.6\textwidth]{figures/fig_isab2.pdf} \caption{ISAB} \label{fig:isab} \end{subfigure} \caption{Illustration of Multihead Attention Block (MAB) and Induced Set Attention Block (ISAB).} \label{fig:st} \vspace{-0.5cm} \end{figure} First, Multihead Attention Block (MAB) takes the query and value sets, $Q\in \mathbb{R}^{n_q\times d}$ and $V\in \mathbb{R}^{n_v\times d}$, respectively, and performs the following transformation (Figure \ref{fig:mab}): \begin{align} \textnormal{MAB}(Q, V) = \textnormal{LN}(\mathbf{a} + \textnormal{FF}(\mathbf{a})) \in \mathbb{R}^{n_q\times d},~~~~ \label{eqn:MAB}\\ \textnormal{where } \mathbf{a} = \textnormal{LN}(Q + \textnormal{Multihead}(Q, V, V)) \in \mathbb{R}^{n_q\times d},\label{eqn:MAB_att} \end{align} where FF denotes elementwise feedforward layer, Multihead denotes multi-head attention~\cite{vaswani2017attention}, and LN denotes layer normalization \cite{lee2019set}. Note that the output of Eq.~\eqref{eqn:MAB} is permutation equivariant to $Q$ and permutation invariant to $V$. Based on MAB, Induced Set Attention Block (ISAB) processes the input set $\mathbf{x}\in\mathbb{R}^{n\times d}$ using a smaller set of inducing points $I\in \mathbb{R}^{m\times d}~(m<n)$ by (Figure \ref{fig:isab}): \begin{align} \textnormal{ISAB}_m(\mathbf{x}) &= \textnormal{MAB}(\mathbf{x}, \mathbf{h}) \in \mathbb{R}^{n\times d}, \\ \textnormal{where }\mathbf{h} &= \textnormal{MAB}(I, \mathbf{x}) \in \mathbb{R}^{m\times d}\label{eqn:isab_bottleneck}. \end{align} The ISAB first transforms the input set $\mathbf{x}$ into $\mathbf{h}$ by attending from $I$. The resulting $\mathbf{h}$ is a permutation invariant projection of $\mathbf{x}$ to a lower cardinality $m$. Then, $\mathbf{x}$ again attends to $\mathbf{h}$ to produce the output of $n$ elements. As a result, ISAB is permutation equivariant to $\mathbf{x}$. \begin{property} In $\textnormal{ISAB}_m(\mathbf{x})$, $\mathbf{h}$ is permutation invariant to $\mathbf{x}$. \end{property} \begin{property} \vspace{-0.2cm} $\textnormal{ISAB}_m(\mathbf{x})$ is permutation equivariant to $\mathbf{x}$. \end{property} \section{Related Work} \label{sec:related} \input{table} \paragraph{Set generative modeling.} SetVAE is closely related to recent works on permutation-equivariant set prediction \cite{zhang2020deep, kosiorek2020conditional, carion2020endtoend, locatello2020objectcentric, li2020exchangeable}. Closest to our approach is the autoencoding TSPN \cite{kosiorek2020conditional} that uses a stack of ISABs \cite{lee2019set} to predict a set from randomly initialized elements. However, TSPN does not allow sampling, as it uses a pooling-based deterministic set encoding (FSPool) \cite{zhang2020fspool} for reconstruction. SetVAE instead discards FSPool and access projected sets in ISAB directly, which allows an efficient variational inference and a direct extension to hierarchical multi-scale latent. Our approach differs from previous generative models treating each element \emph{i.i.d.} and processing a random initial set with an elementwise function \cite{edwards2017neural, yang2019pointflow, kim2020softflow}. Notably, PointFlow \cite{yang2019pointflow} uses a continuous normalizing flow (CNF) to process a 3D Gaussian point cloud into an object. However, assuming elementwise independence could pose a limit in modeling complex element interactions. Also, CNF requires the invertibility of the generative model, which could further limit its expressiveness. SetVAE resolves this problem by adopting permutation equivariant ISAB that models inter-element interactions via attention, and a hierarchical VAE framework with flexible latent dependency. We emphasize that SetVAE could also be extended to generative modeling of sparse object bounding boxes \cite{hong2018inferring, li2019grains, purkait2020sgvae} that often relies on specific ordering or alignment heuristics, which we leave for future work. \vspace*{-0.2in} \paragraph{Hierarchical VAE.} Our model is built upon the prior works on hierarchical VAEs for images, such as Ladder-VAE \cite{sonderby2016ladder}, IAF-VAE \cite{kingma2017improving}, and NVAE \cite{vahdat2020nvae}. To model long-range pixel correlations in images, these models organize latent variables at each hierarchy as images while gradually increasing their resolution via upsampling. However, the requirement for permutation equivariance has prevented applying multi-scale approaches to sets. ABLs in SetVAE solve this problem by defining latent variables in the projected scales of each hierarchy. \section{Implementation details} In this section, we discuss detailed derivations and descriptions of SetVAE presented in Section~\ref{sec:method} and Section~\ref{sec:architecture}. \subsection{KL Divergence of Initial Set Distribution} \label{appendix:initial_kl} This section provides a proof that the KL divergence between the approximate posterior and the prior over the initial set in Eq.~\eqref{eqn:elbo_vanillaSetVAE} and \eqref{eqn:elbo_hierarchicalSetVAE} is a constant. Following the definition in Eq.~\eqref{eqn:prior_initialset} and Eq.~\eqref{eqn:posterior_vanillaSetVAE}, we decompose the prior as $p(\mathbf{z}^{(0)}) = p(n)p(\mathbf{z}^{(0)}|n)$ and the approximate posterior as $q(\mathbf{z}^{(0)}|\mathbf{x}) = \delta(n)q(\mathbf{z}^{(0)}|n, \mathbf{x})$, where $\delta(n)$ is defined as a delta function centered at $n=|\mathbf{x}|$. Here, the conditionals are given by \begin{align} p(\mathbf{z}^{(0)}|n) &= \prod_{i=1}^n{p(\mathbf{z}_i^{(0)})}, \\ q(\mathbf{z}^{(0)}|n, \mathbf{x}) &= \prod_{i=1}^n{q(\mathbf{z}_i^{(0)}|\mathbf{x})}. \end{align} As described in the main text, we set the elementwise distributions identical, $p(\mathbf{z}_i^{(0)}) = q(\mathbf{z}_i^{(0)}|\mathbf{x})$. This renders the conditionals equal, \begin{equation} p(\mathbf{z}^{(0)}|n) = q(\mathbf{z}^{(0)}|n, \mathbf{x}).\label{eqn:initial_set_equal} \end{equation} Then, the KL divergence between the approximate posterior and the prior in Eq.~\eqref{eqn:elbo_vanillaSetVAE} is written as \begin{align} \textnormal{KL}&(q(\mathbf{z}^{(0)}|\mathbf{x})||p(\mathbf{z}^{(0)})) \nonumber\\ &= \textnormal{KL}(\delta(n)q(\mathbf{z}^{(0)}|n, \mathbf{x})||p(n)p(\mathbf{z}^{(0)}|n)) \\ &= \textnormal{KL}(\delta(n)p(\mathbf{z}^{(0)}|n)||p(n)p(\mathbf{z}^{(0)}|n)), \label{eqn:kl_initial_set} \end{align} where the second equality comes from the Eq.~\eqref{eqn:initial_set_equal}. From the definition of KL divergence, we can rewrite Eq.~\eqref{eqn:kl_initial_set} as \begin{align} \textnormal{KL}&(q(\mathbf{z}^{(0)}|\mathbf{x})||p(\mathbf{z}^{(0)})) \nonumber\\ &= \mathbb{E}_{\delta(n)p(\mathbf{z}^{(0)}|n)}{\left[\log{\frac{\delta(n)p(\mathbf{z}^{(0)}|n)}{p(n)p(\mathbf{z}^{(0)}|n)}}\right]} \\ &= \mathbb{E}_{\delta(n)p(\mathbf{z}^{(0)}|n)}{\left[\log{\frac{\delta(n)}{p(n)}}\right]}, \label{eqn:kl_initial_set_reduced} \end{align} As the logarithm in Eq.~\eqref{eqn:kl_initial_set_reduced} does not depend on $\mathbf{z}^{(0)}$, we can take it out from the expectation over $p(\mathbf{z}^{(0)}|n)$ as follows: \begin{align} \textnormal{KL}&(q(\mathbf{z}^{(0)}|\mathbf{x})||p(\mathbf{z}^{(0)})) \nonumber\\ &= \mathbb{E}_{\delta(n)}{\left[\mathbb{E}_{p(\mathbf{z}^{(0)}|n)} {\left[\log{\frac{\delta(n)}{p(n)}}\right]}\right]} \\ &= \mathbb{E}_{\delta(n)}{\left[\log{\frac{\delta(n)}{p(n)}}\right]}, \label{eqn:kl_initial_set_cardinality} \end{align} which can be rewritten as \begin{align} \mathbb{E}_{\delta(n)}{\left[\log{\delta(n)} - \log{p(n)}\right]}. \end{align} The expectation over the delta function $\delta(n)$ is simply an evaluation at $n = |\mathbf{x}|$. As $\delta$ is defined over a discrete random variable $n$, its probability mass at the center $|\mathbf{x}|$ equals 1. Therefore, $\log{\delta(n)}$ at $n = |\mathbf{x}|$ reduces to $\log1 = 0$, and we obtain \begin{align} \textnormal{KL}&(q(\mathbf{z}^{(0)}|\mathbf{x})||p(\mathbf{z}^{(0)})) = - \log p(|\mathbf{x}|). \label{eqn:kl_constant} \end{align} As discussed in the main text, we model $p(n)$ using the data cardinality's empirical distribution. Thus, $p(|\mathbf{x}|)$ only depends on cardinality distribution of data, and $- \textnormal{KL}(q(\mathbf{z}^{(0)}|\mathbf{x})||p(\mathbf{z}^{(0)}))$ in Eq.~\eqref{eqn:elbo_vanillaSetVAE} can be omitted from optimization. \iffalse \begin{align} \textnormal{KL}&\left(q(\mathbf{z}^{(0)}|\mathbf{x})||p(\mathbf{z}^{(0)})\right) \nonumber\\ &= \textnormal{KL}\left(p(\mathbf{z}^{(0)}|n)q(n|\mathbf{x})||p(\mathbf{z}^{(0)}|n)p(n)\right) \\ &= \textnormal{KL}\left(p(\mathbf{z}^{(0)}|n)\textbf{1}_{|\mathbf{x}|}(n)||p(\mathbf{z}^{(0)}|n)p(n)\right) \\ &= \mathbb{E}_{p(\mathbf{z}^{(0)}|n)\textbf{1}_{|\mathbf{x}|}(n)}{\left[\log{\frac{\textbf{1}_{|\mathbf{x}|}(n)}{p(n)}}\right]} \\ &= \mathbb{E}_{\textbf{1}_{|\mathbf{x}|}(n)}{\left[ \mathbb{E}_{p(\mathbf{z}^{(0)}|n)} {\left[1\right]} \log{\frac{\textbf{1}_{|\mathbf{x}|}(n)}{p(n)}}\right]} \\ &= \mathbb{E}_{\textbf{1}_{|\mathbf{x}|}(n)}{\left[\log{\frac{\textbf{1}_{|\mathbf{x}|}(n)}{p(n)}}\right]} \\ &= - \log p(|\mathbf{x}|) \end{align} $- \log p(|\mathbf{x}|)$ only depends on cardinality distribution of data, so the $- \textnormal{KL}(q(\mathbf{z}^{(0)}|\mathbf{x})||p(\mathbf{z}^{(0)}))$ term in Eq.~\eqref{eqn:elbo_vanillaSetVAE} can be omitted from optimization. \fi \subsection{Implementation of SetVAE} \label{appendix:abl} \paragraph{Attentive Bottleneck Layer.} In Figure~\ref{fig:abl_structure}, we provide the detailed structure of Attentive Bottleneck Layer (ABL) that composes the top-down generator of SetVAE (Section~\ref{sec:architecture}). We share the common parameters in ABL for generation and inference, which is known to be effective in stabilizing the training of hierarchical VAE~\cite{kingma2017improving, vahdat2020nvae}. During generation (Figure~\ref{fig:abl_prior}), $\mathbf{z}$ is sampled from a Gaussian prior $\mathcal{N}(\mu, \sigma)$ (Eq.~\eqref{eqn:abp_z_prior}). To predict $\mu$ and $\sigma$ from $\mathbf{h}$, we employ an elementwise fully-connected ($\textnormal{FC}$) layer, where its parameters are shared across each element of $\mathbf{h}$. During inference, we sample the latent variables from the approximate posterior $\mathcal{N}(\mu+\Delta\mu, \sigma\cdot\Delta\sigma)$, where the correction factors $\Delta\mu, \Delta\sigma$ are predicted from the bottom-up encoding $\mathbf{h}_\textnormal{enc}$ by an additional $\textnormal{FC}$ layer. Note that the $\textnormal{FC}$ layer for predicting $\mu, \sigma$ is shared for both generation and inference, and the $\textnormal{FC}$ layer that predicts $\Delta\mu, \Delta\sigma$ is the only component used exclusively during inference. \paragraph{Slot Attention in ISAB and ABL.} SetVAE discovers subset representation via projection attention in ISAB (Eq.~\eqref{eqn:isab_bottleneck}) and ABL (Eq.~\eqref{eqn:abl_bottleneck}). However, with a plain attention mechanism, the projection attention may ignore some parts of input by simply not attending to them. To prevent this, in both ISAB and ABL, we change the projection attention to Slot Attention \cite{locatello2020objectcentric}. Specifically, plain projection attention\footnote{For simplicity, we explain with single-head attention instead of $\textnormal{MultiHead}$.} (Eq~\eqref{eqn:MAB_att}) treats input $\mathbf{x}\in\mathbb{R}^{n\times d}$ as key ($K$) and value ($V$), and uses a set of inducing points $\mathbf{I}\in\mathbb{R}^{m\times d}$ as query ($Q$). First, it obtains the attention score matrix as follows: \begin{equation} A = \frac{QK^\mathrm{T}}{\sqrt{d}} \in\mathbb{R}^{m\times n}. \end{equation} Here, each row index denotes an inducing point, and each column index denotes an input element. Then, the value set is aggregated using $A$. With $\textnormal{Softmax}(\cdot, d)$ denoting softmax normalization along $d$-th axis, the plain attention applies softmax to each row (key axis) of $A$, as follows: \begin{align} \textnormal{Att}(Q, K, V) &= WV\in\mathbb{R}^{m\times d}, \\ \textnormal{ where } W &= \textnormal{Softmax}(A, 2)\in\mathbb{R}^{m\times n}. \end{align} As a result, an input element can get zero attention if every query suppresses it. To prevent this, Slot Attention applies softmax across each column (query axis) of $A$: \begin{align} \textnormal{SlotAtt}(Q, K, V) &= WV, \\ \textnormal{ where } W_{ij} = \frac{A'_{ij}}{\sum_{l=1}^n{A'_{il}}}& \textnormal{ for } A' = \textnormal{Softmax}(A, 1). \end{align} As attention coefficients for an input element sum up to 1 after softmax, slot attention guarantees that an input element is not ignored by every inducing points. With adaptation of Slot Attention, we observe that inducing points often attend to distinct subsets of the input to produce $\mathbf{h}$, as illustrated in the Figure~\ref{fig:subset} and Figure~\ref{fig:composition} of the main text. This is similar to the observation of \cite{locatello2020objectcentric} that the competition across queries encouraged segmented representations (slots) of objects from a multi-object image. A difference is that unlike in \cite{locatello2020objectcentric} where the queries are \textit{i.i.d.} noise vectors, we design the query set as learnable parameter $\mathbf{I}$ without stochasticity. Also, we do not introduce any refinement steps to the projected set $\mathbf{h}$ to avoid the complication of the model. \begin{figure}[!t] \centering \begin{subfigure}[b]{0.395\linewidth} \centering \includegraphics[width=0.95\linewidth]{supp_figures/fig_abl_prior.pdf} \caption{Generation} \label{fig:abl_prior} \end{subfigure} \begin{subfigure}[b]{0.59\linewidth} \centering \includegraphics[width=0.95\linewidth]{supp_figures/fig_abl_posterior.pdf} \caption{Inference} \label{fig:abl_posterior} \end{subfigure} \caption{The detailed structure of Attentive Bottleneck Layer during sampling (for generation) and inference (for reconstruction).} \label{fig:abl_structure} \end{figure} \section{Experiment Details} This section discusses the detailed descriptions and additional results of experiments in Section~\ref{sec:experiment} in the main paper. \subsection{ShapeNet Evaluation Metrics} \label{appendix:metrics} We provide descriptions of evaluation metrics used in the ShapeNet experiment (Section~\ref{sec:experiment} in the main paper). We measure standard metrics including coverage (COV), minimum matching distance (MMD), and 1-nearest neighbor accuracy (1-NNA) \cite{achlioptas2018learning, yang2019pointflow}. Following recent literature \cite{kim2020softflow}, we omit Jensen-Shannon Divergence (JSD) \cite{achlioptas2018learning} because it does not assess the fidelity of each point cloud. Let $S_g$ be the set of generated point clouds and $S_r$ be the set of reference point clouds with $|S_r| = |S_g|$. \emph{Coverage (COV)} measures the percentage of reference point clouds that is a nearest neighbor of at least one generated point cloud, computed as follows: \begin{equation} \textnormal{COV}(P_g, P_r) = \frac{|\{\textnormal{argmin}_{\mathbf{y}\in S_r}D(\mathbf{x}, \mathbf{y})|\mathbf{x}\in S_g\}|}{|S_r|}. \end{equation} \emph{Minimum Matching Distance (MMD)} measures the average distance from each reference point cloud to its nearest neighbor in the generated point clouds: \begin{equation} \textnormal{MMD}(P_g, P_r) = \frac{1}{|S_r|}\sum_{\mathbf{y}\in S_r}{\min_{\mathbf{x}\in S_g}{D(\mathbf{x}, \mathbf{y})}}. \end{equation} \emph{1-Nearest Neighbor Accuracy (1-NNA)} assesses whether two distributions are identical. Let $S_{-\mathbf{x}}=S_r\cup S_g-\{\mathbf{x}\}$ and $N_{\mathbf{x}}$ be the nearest neighbor of $\mathbf{x}$ in $S_{-\mathbf{x}}$. With $\mathbf{1}(\cdot)$ an indicator function: \begin{align} \textnormal{1-NNA}&(S_g, S_r) \nonumber\\ &= \frac{\sum_{\mathbf{x}\in S_g}\mathbf{1}(N_{\mathbf{x}}\in S_g) + \sum_{\mathbf{y}\in S_r}\mathbf{1}(N_{\mathbf{y}}\in S_r)}{|S_g| + |S_r|}. \end{align} \subsection{Hierarchical Disentanglement} This section describes an evaluation protocol used in Figure~\ref{fig:lda} in the main paper. To investigate the latent representations learned at each level, we employed Linear Discriminant Analysis (LDA) as simple layer-wise classifiers. The classifiers take the latent variable at each layer $\mathbf{z}^{l},~\forall l\in[1,L]$ as an input, and predict the identity and position of two digits (in $4\times4$ quantized grid) respectively in Set-MultiMNIST dataset. To this end, we first train the SetVAE in the training set of Set-MultiMNIST. Then we train the LDA classifiers using the validation dataset, where the input latent variables are sampled from the posterior distribution of SetVAE (Eq.~\eqref{eqn:posterior}). We report the training accuracy of the classifiers at each layer in Figure~\ref{fig:lda}. \iffalse For each instance in Set-MultiMNIST validation dataset, we annotated each of the two digits (left and right) for their position (in $4\times4$ quantized grid) and identity. \jh{We extract latent features of each level through reconstruction. For the latent features, we constructed four classifiers for each level, each predicting position of the left digit / position of the right digit / identity of the left digit / identity of the right digit.} In Figure \ref{fig:lda}, we report averaged performances for the left and right digits. \fi \subsection{Ablation study} In this section, we provide details of the ablation study presented in Table~\ref{table:ablation} of the main text. \paragraph{Baseline} As baselines, we use a SetVAE with unimodal Gaussian prior over the initial set elements, and a non-hierarchical, Vanilla SetVAE presented in Section~\ref{sec:method}. To implement a SetVAE with unimodal prior, we only change the initial element distribution $p(\mathbf{z}_i^{(0)})$ from MoG (Eq.~\eqref{eqn:prior_mog}) to a multivariate Gaussian with a diagonal covariance matrix $\mathcal{N}(\mu^{(0)}, \sigma^{(0)})$ with learnable $\mu^{(0)}$ and $\sigma^{(0)}$. This approach is adopted in several previous works in permutation-equivariant set generation \cite{yang2019pointflow, kosiorek2020conditional, locatello2020objectcentric}. \begin{figure}[!t] \centering \begin{subfigure}[b]{0.395\linewidth} \centering \includegraphics[width=0.9\linewidth]{supp_figures/fig-vanilla-prior.pdf} \caption{Generation} \label{fig:vanilla_prior} \end{subfigure} \begin{subfigure}[b]{0.59\linewidth} \centering \includegraphics[width=0.9\linewidth]{supp_figures/fig-vanilla-posterior.pdf} \caption{Inference} \label{fig:vanilla_posterior} \end{subfigure} \caption{Structure of Vanilla SetVAE without hierarchical priors and subset reasoning in generator.} \label{fig:vanilla_setvae} \end{figure} To implement a Vanilla SetVAE, we employ a bottom-up encoder same to our full model and make the following changes to the top-down generator. As illustrated in Figure~\ref{fig:vanilla_setvae}, we remove the subset relation in the generator by fixing the latent cardinality to 1 and employing a global prior $\mathcal{N}(\mu_1, \sigma_1)$ with $\mu_1, \sigma_1 \in \mathbb{R}^{1\times d}$ for all ABL. As a permutation-invariant $\mathbf{h}_{\textnormal{enc}} \in \mathbb{R}^{1\times d}$, we aggregate every elements of $\mathbf{h}$ from all levels of encoder network by average pooling. During inference, $\mathbf{h}_{\textnormal{enc}}$ is provided to every ABL in the top-down generator. \paragraph{Evaluation metric} For the ablation study of SetVAE on the Set-MultiMNIST dataset, we measure the generation quality in image space by rendering each set instance to $64\times 64$ binary image based on the occurrence of a point in a pixel bin. To measure the generation performance, we compute Frechet Inception Distance (FID) score \cite{heusel2017gans} using the output of the penultimate layer of a VGG11 network trained from scratch for MultiMNIST image classification into 100 labels (00-99). Given the channel-wise mean $\mu_g$, $\mu_r$ and covariance matrix $\Sigma_g$, $\Sigma_r$ of generated and reference set of images respectively, we compute FID as follows: \begin{equation} d^2 = {\| \mu_g - \mu_r \|}^2 + \textnormal{Tr} (\Sigma_g + \Sigma_r - 2 \sqrt{\Sigma_g \Sigma_r}). \end{equation} To train the VGG11 network, we replace the first conv layer to take single-channel inputs, and use the same MultiMNIST train set used for SetVAE. We use SGD optimizer with Nesterov momentum, with learning rate 0.01, momentum 0.9, and L2 regularization weight 5e-3 to prevent overfitting. We train the network for 10 epochs using batch size 128 so that the training top-1 accuracy exceeds 95\%. \section{More Qualitative Results} \paragraph{Ablation study} This section provides additional results of the ablation study, which corresponds to the Table~\ref{table:ablation} of the main paper. We compare the SetVAE with two baselines: SetVAE with a unimodal prior and the one using a single global latent variable (\emph{i.e.}, Vanilla SetVAE). Figure~\ref{fig:ablation-curve} shows the training loss curves of SetVAE and the unimodal prior baseline on the Set-MultiMNIST dataset. We observe that training of the unimodal baseline is unstable compared to SetVAE that uses a 4-component MoG. We conjecture that a flexible initial set distribution provides a cue for the generator to learn stable subset representations. In Figure~\ref{fig:ablation}, we present visualized samples from SetVAE and the two baselines. As the training of unimodal SetVAE was unstable, we provide the results from a checkpoint before the training loss diverges (third row of Figure~\ref{fig:ablation}). The Vanilla SetVAE without hierarchy (second row of Figure~\ref{fig:ablation}) focuses on modeling the left digit only and fails to assign a balanced number of points. This failure implies that multi-level subset reasoning in the generative process is essential in faithfully modeling complex set data such as Set-MultiMNIST. \begin{figure}[!t] \centering \includegraphics[width=0.8\linewidth]{supp_figures/ablation_training_graph.pdf} \caption{Training loss curves from SetVAE with multimodal and unimodal initial set trained on Set-MultiMNIST dataset.} \label{fig:ablation-curve} \end{figure} \begin{figure}[!t] \centering \includegraphics[width=0.47\textwidth]{supp_figures/Ablation_on_MM_final.pdf} \caption{Samples from SetVAE and its ablated version trained on Set-MultiMNIST dataset.} \label{fig:ablation} \end{figure} \paragraph{ShapeNet results} Figure~\ref{fig:more_samples} presents the generated samples from SetVAE on ShapeNet, Set-MNIST and Set-MultiMNIST datasets, extending the results in Figure~\ref{fig:compare_pointflow} of the main text. As illustrated in the figure, SetVAE generates point sets with high diversity while capturing thin and sharp details (\eg engines of an airplane and legs of a chair, \etc). \paragraph{Cardinality disentanglement} Figure~\ref{fig:more_disentanglement} presents the additional results of Figure~\ref{fig:cardinality} in the main paper, which illustrates samples generated by increasing the cardinality of the initial set $\mathbf{z}^{(0)}$ while fixing the hierarchical latent variables $\mathbf{z}^{(1:L)}$. As illustrated in the figure, SetVAE is able to disentangle the cardinality of a set from the rest of its generative factors, and is able to generalize to unseen cardinality while preserving the disentanglement. Notably, SetVAE can retain the disentanglement and generalize even to a high cardinality (100k) as well. Figure~\ref{fig:more_mega_cardinality} presents the comparison to PointFlow with varying cardinality, which extends the results of the Figure~\ref{fig:mega-cardinality} in the main paper. Unlike PointFlow that exhibits degradation and blurring of fine details, SetVAE retains the fine structure of the generated set even for extreme cardinality. \paragraph{Coarse-to-fine dependency} In Figure~\ref{fig:more_encoder_attention} and Figure~\ref{fig:more_generator_attention}, we provide additional visualization of encoder and generator attention, extending the Figure~\ref{fig:subset} and Figure~\ref{fig:composition} in the main text. We observe that SetVAE learns to attend to a subset of points consistently across examples. Notably, these subsets often have a bilaterally symmetric structure or correspond to semantic parts. For example, in the top level of the encoder (rows marked level 1 in Figure~\ref{fig:more_encoder_attention}), the subsets include wings of an airplane (colored red), legs of a chair (colored red), or hood \& wheels of a car (colored green). Furthermore, SetVAE extends the subset modeling to multiple levels with a top-down increase in latent cardinality. This allows SetVAE to encode or generate the structure of a set in various granularity, ranging from global structure to fine details. Each column in Figure~\ref{fig:more_encoder_attention} and Figure~\ref{fig:more_generator_attention} illustrates the relations. For example, in level 3 of Figure~\ref{fig:more_encoder_attention}, the bottom-up encoder partitions an airplane into fine-grained parts such as an engine, a tip of the wing, \etc. Then, going bottom-up to level 1, the encoder composes them to symmetric pair of wings. As for the top-down generator in Figure~\ref{fig:more_generator_attention}, it starts in level 1 by composing an airplane via the coarsely defined left and right sides. Going top-down to level 3, the generator descends into fine-grained subsets like an engine and tail wing. \clearpage \begin{figure*}[!ht] \centering \includegraphics[width=0.9\textwidth]{supp_figures/DiverseSample_Gen.pdf} \caption{Additional examples of generated point clouds from SetVAE.} \label{fig:more_samples} \end{figure*} \begin{figure*}[!ht] \centering \includegraphics[width=1\textwidth]{supp_figures/Cardinality_all.pdf} \caption{Additional examples demonstrating cardinality generalization of SetVAE.} \label{fig:more_disentanglement} \end{figure*} \begin{figure*}[!ht] \centering \includegraphics[width=1\textwidth]{supp_figures/Mega_ShapeNet.pdf} \caption{More examples in high-cardinality setting, compared with PointFlow.} \label{fig:more_mega_cardinality} \end{figure*} \begin{figure*}[!ht] \centering \includegraphics[height=0.9\textheight]{supp_figures/Attn_Encoder.pdf} \caption{More examples of color-coded encoder attention.} \label{fig:more_encoder_attention} \end{figure*} \begin{figure*}[!ht] \centering \includegraphics[height=0.9\textheight]{supp_figures/Attn_Gen.pdf} \caption{More examples of color-coded generator attention.} \label{fig:more_generator_attention} \end{figure*} \section{Architecture and Hyperparameters} \label{appendix:training} Table~\ref{table:architecture} provides the network architecture and hyperparameters of SetVAE. In the table, $\textnormal{FC}(d, f)$ denotes a fully-connected layer with output dimension $d$ and nonlinearity $f$. $\textnormal{ISAB}_m(d, h)$ denotes an $\textnormal{ISAB}_m$ with $m$ inducing points, hidden dimension $d$, and $h$ heads (in Section~\ref{sec:settransformer}). $\textnormal{MoG}_K(d)$ denotes a mixture of Gaussian (in Eq.~\eqref{eqn:prior_mog}) with $K$ components and dimension $d$. $\textnormal{ABL}_m(d, d_z, h)$ denotes an $\textnormal{ABL}_m$ with $m$ inducing points, hidden dimension $d$, latent dimension $d_z$, and $h$ heads (in Section~\ref{sec:architecture}). All $\textnormal{MAB}$s used in $\textnormal{ISAB}$ and $\textnormal{ABL}$ uses 2-layer MLP with $\textnormal{ReLU}$ activation as $\textnormal{FF}$ layers. In Table~\ref{table:hyperparameters}, we provide detailed training hyperparameters. For all experiments, we used Adam optimizer with first and second momentum parameters $0.9$ and $0.999$, respectively. \begin{figure*}[!t] \begin{minipage}{\linewidth} \captionof{table}{Detailed network architectures used in our experiments.} \vspace{-0.2cm} \centering \begin{adjustbox}{width=0.95\textwidth} \label{table:architecture} \begin{tabular}{cc|cc|cc} \Xhline{2\arrayrulewidth} \\[-1em] \multicolumn{2}{c}{\textbf{ShapeNet}} & \multicolumn{2}{c}{\textbf{Set-MNIST}} & \multicolumn{2}{c}{\textbf{Set-MultiMNIST}}\\ \\[-1em]\Xhline{2\arrayrulewidth} \\[-1em] \textbf{Encoder} & \textbf{Generator} & \textbf{Encoder} & \textbf{Generator} & \textbf{Encoder} & \textbf{Generator} \\ \\[-1em]\Xhline{2\arrayrulewidth} \\[-1em] Input: $\textnormal{FC}(64, -)$ & Initial set: $\textnormal{MoG}_4(32)$ & Input: $\textnormal{FC}(64, -)$ & Initial set: $\textnormal{MoG}_4(32)$ & Input: $\textnormal{FC}(64, -)$ & Initial set: $\textnormal{MoG}_4(64)$ \\ $\textnormal{ISAB}_{32}(64, 4)$ & $\textnormal{PlanarFlow}\times16$ & $\textnormal{ISAB}_{32}(64, 4)$ & $\textnormal{PlanarFlow}\times16$ & $\textnormal{ISAB}_{32}(64, 4)$ & $\textnormal{PlanarFlow}\times16$ \\ $\textnormal{ISAB}_{16}(64, 4)$ & $\textnormal{ABL}_{2}(64, 16, 4)$ & $\textnormal{ISAB}_{16}(64, 4)$ & $\textnormal{ABL}_{2}(64, 16, 4)$ & $\textnormal{ISAB}_{16}(64, 4)$ & $\textnormal{ABL}_{2}(64, 16, 4)$ \\ $\textnormal{ISAB}_{8}(64, 4)$ & $\textnormal{ABL}_{4}(64, 16, 4)$ & $\textnormal{ISAB}_{8}(64, 4)$ & $\textnormal{ABL}_{4}(64, 16, 4)$ & $\textnormal{ISAB}_{8}(64, 4)$ & $\textnormal{ABL}_{4}(64, 16, 4)$ \\ $\textnormal{ISAB}_{4}(64, 4)$ & $\textnormal{ABL}_{8}(64, 16, 4)$ & $\textnormal{ISAB}_{4}(64, 4)$ & $\textnormal{ABL}_{8}(64, 16, 4)$ & $\textnormal{ISAB}_{4}(64, 4)$ & $\textnormal{ABL}_{8}(64, 16, 4)$ \\ $\textnormal{ISAB}_{2}(64, 4)$ & $\textnormal{ABL}_{16}(64, 16, 4)$ & $\textnormal{ISAB}_{2}(64, 4)$ & $\textnormal{ABL}_{16}(64, 16, 4)$ & $\textnormal{ISAB}_{2}(64, 4)$ & $\textnormal{ABL}_{16}(64, 16, 4)$ \\ & $\textnormal{ABL}_{32}(64, 16, 4)$ & & $\textnormal{ABL}_{32}(64, 16, 4)$ & & $\textnormal{ABL}_{32}(64, 16, 4)$ \\ & Output: $\textnormal{FC}(3, -)$ & & Output: $\textnormal{FC}(2, \textnormal{tanh})$ & & Output: $\textnormal{FC}(2, \textnormal{tanh})$ \\ & & & $(\textnormal{Output}+1)/2$ & & $(\textnormal{Output}+1)/2$ \\ \\[-1em]\Xhline{2\arrayrulewidth} \end{tabular} \end{adjustbox} \vspace{1cm} \captionof{table}{Detailed training hyperparameters used in our experiments.} \vspace{-0.2cm} \begin{adjustbox}{width=0.95\textwidth} \label{table:hyperparameters} \footnotesize \begin{tabular}{cccc} \Xhline{2\arrayrulewidth} \\[-1em] & \textbf{ShapeNet} & \textbf{Set-MNIST} & \textbf{Set-MultiMNIST}\\ \\[-1em] \Xhline{2\arrayrulewidth} \\[-1em] Training epochs & 4000 & 200 & 500 \\ Learning rate & 1e-3, linearly decayed to zero from 2000epoch & 1e-3 & 1e-3 \\ $\beta$ (Eq.~\eqref{eqn:beta_vae_loss}) & 1.0 & 0.01 & 0.01 \\ \\[-1em]\Xhline{2\arrayrulewidth} \end{tabular} \end{adjustbox} \end{minipage} \end{figure*} \iffalse \begin{table*}[!h] \centering \caption{Detailed network architectures used in our experiments.} \begin{adjustbox}{width=0.9\textwidth} \label{table:architecture} \begin{tabular}{cc|cc|cc} \Xhline{2\arrayrulewidth} \\[-1em] \multicolumn{2}{c}{\textbf{ShapeNet}} & \multicolumn{2}{c}{\textbf{Set-MNIST}} & \multicolumn{2}{c}{\textbf{Set-MultiMNIST}}\\ \\[-1em]\Xhline{2\arrayrulewidth} \\[-1em] \textbf{Encoder} & \textbf{Generator} & \textbf{Encoder} & \textbf{Generator} & \textbf{Encoder} & \textbf{Generator} \\ \\[-1em]\Xhline{2\arrayrulewidth} \\[-1em] Input: $\textnormal{FC}(64, -)$ & Initial set: $\textnormal{MoG}_4(32)$ & Input: $\textnormal{FC}(64, -)$ & Initial set: $\textnormal{MoG}_4(32)$ & Input: $\textnormal{FC}(64, -)$ & Initial set: $\textnormal{MoG}_4(64)$ \\ $\textnormal{ISAB}_{32}(64, 4)$ & $\textnormal{PlanarFlow}\times16$ & $\textnormal{ISAB}_{32}(64, 4)$ & $\textnormal{PlanarFlow}\times16$ & $\textnormal{ISAB}_{32}(64, 4)$ & $\textnormal{PlanarFlow}\times16$ \\ $\textnormal{ISAB}_{16}(64, 4)$ & $\textnormal{ABL}_{2}(64, 16, 4)$ & $\textnormal{ISAB}_{16}(64, 4)$ & $\textnormal{ABL}_{2}(64, 16, 4)$ & $\textnormal{ISAB}_{16}(64, 4)$ & $\textnormal{ABL}_{2}(64, 16, 4)$ \\ $\textnormal{ISAB}_{8}(64, 4)$ & $\textnormal{ABL}_{4}(64, 16, 4)$ & $\textnormal{ISAB}_{8}(64, 4)$ & $\textnormal{ABL}_{4}(64, 16, 4)$ & $\textnormal{ISAB}_{8}(64, 4)$ & $\textnormal{ABL}_{4}(64, 16, 4)$ \\ $\textnormal{ISAB}_{4}(64, 4)$ & $\textnormal{ABL}_{8}(64, 16, 4)$ & $\textnormal{ISAB}_{4}(64, 4)$ & $\textnormal{ABL}_{8}(64, 16, 4)$ & $\textnormal{ISAB}_{4}(64, 4)$ & $\textnormal{ABL}_{8}(64, 16, 4)$ \\ $\textnormal{ISAB}_{2}(64, 4)$ & $\textnormal{ABL}_{16}(64, 16, 4)$ & $\textnormal{ISAB}_{2}(64, 4)$ & $\textnormal{ABL}_{16}(64, 16, 4)$ & $\textnormal{ISAB}_{2}(64, 4)$ & $\textnormal{ABL}_{16}(64, 16, 4)$ \\ & $\textnormal{ABL}_{32}(64, 16, 4)$ & & $\textnormal{ABL}_{32}(64, 16, 4)$ & & $\textnormal{ABL}_{32}(64, 16, 4)$ \\ & Output: $\textnormal{FC}(3, -)$ & & Output: $\textnormal{FC}(2, \textnormal{tanh})$ & & Output: $\textnormal{FC}(2, \textnormal{tanh})$ \\ & & & $(\textnormal{Output}+1)/2$ & & $(\textnormal{Output}+1)/2$ \\ \\[-1em]\Xhline{2\arrayrulewidth} \end{tabular} \end{adjustbox} \end{table*} \begin{table*}[!h] \centering \caption{Detailed training hyperparameters used in our experiments.} \begin{adjustbox}{width=0.85\textwidth} \label{table:hyperparameters} \footnotesize \begin{tabular}{cccc} \Xhline{2\arrayrulewidth} \\[-1em] & \textbf{ShapeNet} & \textbf{Set-MNIST} & \textbf{Set-MultiMNIST}\\ \\[-1em] \Xhline{2\arrayrulewidth} \\[-1em] Training epochs & 4000 & 200 & 500 \\ Learning rate & 1e-3, linearly decayed to zero from 2000epoch & 1e-3 & 1e-3 \\ $\beta$ (Eq.~\eqref{eqn:beta_vae_loss}) & 1.0 & 0.01 & 0.01 \\ \\[-1em]\Xhline{2\arrayrulewidth} \end{tabular} \end{adjustbox} \end{table*} \fi \clearpage {\small \bibliographystyle{cvpr_draft/ieee_fullname.bst}
\section{Introduction} \label{se1} One of the methods to study the irreducibility of polynomials is to use information on the values that they take at some specified integer arguments. A famous result of P\'{o}lya \cite{Polya} considers only the magnitude of the absolute values that a polynomial takes, with disregard to their canonical decomposition: \medskip {\bf Theorem 1.}\ {\em If for $n$ integral values of $x$, the integral polynomial $f(x)$ of degree $n$ has values which are different from zero, and in absolute value less than \[ \frac{\lceil n/2\rceil! }{2^{\lceil n/2\rceil }}, \] then $f(x)$ is irreducible over $\mathbb{Q}$. } \medskip Since 1919 this result was generalized in many different ways, of which we only mention here two recent ones, corresponding to the setting where the coefficients belong to the ring of integers of an arbitrary imaginary quadratic number field \cite{GHT}, and to the multivariate case over an arbitrary field \cite{BBCM1}. Other irreducibility criteria in the literature rely heavily on the canonical decomposition of the value that a given polynomial takes at a single, specified integral argument. The most interesting results of this kind take benefit of the existence in this canonical decomposition of a suitable prime divisor, or prime power divisor. For instance, in \cite{PolyaSzego} P\'{o}lya and Szeg\"{o} give the following nice irreducibility criterion of A. Cohn:\medskip {\bf Theorem 2.} \ \emph{If a prime $p$ is expressed in the decimal system as \[ p=\sum\limits_{i=0}^{n}a_{i}10^{i},\quad0\leq a_{i}\leq9, \] then the polynomial $\sum_{i=0}^{n}a_{i}X^{i}$ is irreducible in $\mathbb{Z} [X]$.}\medskip Brillhart, Filaseta and Odlyzko \cite{Brillhart} extended this result to an arbitrary base $b$: \medskip {\bf Theorem 3.} \ \emph{If a prime $p$ is expressed in the number system with base $b\geq2$ as \[ p=\sum\limits_{i=0}^{n}a_{i}b^{i},\quad0\leq a_{i}\leq b-1, \] then the polynomial $\sum_{i=0}^{n}a_{i}X^{i}$ is irreducible in $\mathbb{Z} [X]$.}\medskip Filaseta \cite{Filaseta1} obtained another generalization of Cohn's theorem by replacing the prime $p$ by a composite number $pq$ with $q<b$ :\medskip {\bf Theorem 4.} \ \emph{Let $p$ be a prime number, $q$ and $b$ positive integers, $b\geq2$, $q<b$, and suppose that $pq$ is expressed in the number system with base $b$ as \[ pq=\sum\limits_{i=0}^{n}a_{i}b^{i},\quad0\leq a_{i}\leq b-1. \] Then the polynomial $\sum_{i=0}^{n}a_{i}X^{i}$ is irreducible over the rationals.}\medskip Cohn's irreducibility criterion was also generalized in \cite{Brillhart} and \cite{Filaseta2} by permitting the coefficients of $f$ to be different from digits. For instance, the following irreducibility criterion for polynomials with non-negative coefficients was proved in \cite{Filaseta2}.\medskip {\bf Theorem 5.} \ \emph{Let $f(X)=\sum_{i=0}^{n}a_{i}X^{i}$ be such that $f(10)$ is a prime. If the $a_{i}$'s satisfy $0\leq a_{i}\leq a_{n}10^{30}$ for each $i=0,1,\dots,n-1$, then $f(X)$ is irreducible.} \medskip Cole, Dunn, and Filaseta produced in~\cite{CDF} sharp bounds $M(b)$ depending on an integer $b\in [3,20]$ such that if each coefficient of a polynomial $f$ with non-negative integer coefficients is at most $M(b)$ and $f(b)$ is prime, then $f$ is irreducible. Some classical related results relying on the canonical decomposition of the value that a polynomial takes at some integral argument may be also found in the works of St\"ackel \cite{Stackel}, Ore \cite{Ore}, Weisner \cite{Weisner} and Dorwart \cite{Dorwart}. For an unifying approach that uses the concept of admissible triples to study irreducibility of polynomials, we refer the reader to \cite{Guersenzvaig}. Along with a simultaneous generalization of some classical irreducibility criteria, one may also find in \cite{Guersenzvaig} upper bounds for the total number of irreducible factors (counting multiplicities) for some classes of integer polynomials (see also \cite{GS} for problems related to the study of roots multiplicities and square free factorization). For further related results and some elegant connections between prime numbers and irreducible polynomials, the reader is referred to \cite{RamMurty}, \cite{Girstmair} and \cite{BDN3}, for instance. Another method to obtain irreducible polynomials is to write prime numbers or prime powers as a sum of integers of arbitrary sign, of which one has sufficiently large modulus, and to use these integers as coefficients of our polynomials. In this respect we refer the reader to \cite{Bonciocat1} and \cite{Bonciocat2}, where several irreducibility criteria for polynomials that take a prime value or a prime power value and have a coefficient of sufficiently large modulus have been obtained. Two such irreducibility criteria are given by the following results: \medskip {\bf Theorem 6.} \ \emph{If we write a prime number as a sum of integers $ a_{0},\dots,a_{n}$, with $a_{0}a_{n}\neq 0$ and $|a_{0}|> \sum_{i=1}^{n}|a_{i}|2^{i}$, then the polynomial $\sum_{i=0}^{n}a_{i}X^{i}$ is irreducible over $\mathbb{Q}$.} \medskip {\bf Theorem 7.} \ \emph{If we write a prime power $p^s$, $s\geq 2$, as a sum of integers $a_{0},\dots,a_{n}$ with $a_{0}a_{n}\neq 0$, $|a_{0}|>\sum_{i=1}^{n}|a_{i}|2^{i}$, and $a_1+2a_2+\cdots +na_n$ not divisible by $p$, then the polynomial $\sum_{i=0}^{n}a_{i}X^{i}$ is irreducible over $\mathbb{Q}$.} \medskip Other recent results where prime numbers play a central role in testing irreducibility refer to linear combinations of relatively prime polynomials \cite{CAV}, \cite{CVZ}, \cite{BBCM2}, and to compositions of polynomials \cite{Guersenzvaig2} and \cite{BBCM4}. Counterparts of such results for the multivariate case may be found in \cite{CVZ2}, \cite{BBCM3}, \cite{BZ1}, and \cite{BZ2}. For some recent fundamental results on reduction, specialization and composition of polynomials in connection with Hilbert Irreducibility Theorem, Bertini-Noether Theorem and Schinzel Hypothesis, we refer the reader to \cite{Debes5}, \cite{BSE}, \cite{BDN1}, \cite{BDN2} and \cite{LBS}. The aim of this paper is to provide irreducibility criteria that depend on the information on the canonical decomposition of the values that a polynomial $f$ takes at two integer arguments, by also using information on the location of their roots, and then to obtain similar results in the multivariate case over an arbitrary field. As we shall see, to obtain sharper irreducibility conditions we will also make use of information on the derivative of $f$, or on the partial derivatives of $f$ in the multivariate case. First of all, let us note that if a polynomial $f(X)\in \mathbb{Z}[X]$ factors as $f(X)=g(X)h(X)$ with $g(X),h(X)\in \mathbb{Z}[X]$ and $\deg g\geq 1$, $\deg h\geq 1$, then if we fix an arbitrarily chosen integer $a$ with $f(a)\neq 0$, the integers $g(a)$ and $h(a)$ are not some arbitrary divisors of $f(a)$, as they must also satisfy the equality $f'(a)=g'(a)h(a)+g(a)h'(a)$. It implies that the greatest common divisor of $g(a)$ and $h(a)$ divides $f(a)$ and $f'(a)$. This suggests the use of the following definition. \begin{definition}\label{admissible} Let $f$ be a non-constant polynomial with integer coefficients, and let $a$ be an integer with $f(a)\neq 0$. We say that an integer $d$ is an {\it admissible divisor} of $f(a)$ if $d\mid f(a)$ and \begin{equation}\label{adm2} \gcd \left( d,\frac{f(a)}{d}\right) \mid \gcd (f(a),f'(a)), \end{equation} and we shall denote by $\mathcal{D}_{ad}(f(a))$ the set of all admissible divisors of $f(a)$. We say that an integer $d$ is a {\it unitary divisor} of $f(a)$ if $d$ is coprime with $f(a)/d$. We denote by $\mathcal{D}_{u}(f(a))$ the set of unitary divisors of $f(a)$. \end{definition} We note that condition (\ref{adm2}) is symmetric in $d$ and its complementary divisor $f(a)/d$, and that if $\gcd (f(a),f'(a))=1$, then $\mathcal{D}_{ad}(f(a))$ reduces to the set $\mathcal{D}_{u}(f(a))$. The first result that we will prove relies on information on the admissible divisors of $f(a)$ and $f(b)$ for two integers $a,b$. Rather surprisingly, the study of the irreducibility of $f$ can be connected with the location of the roots of $f$ inside an Apollonius circle associated to the points on the real axis with integer abscisae $a$ and $b$, and ratio of the distances to these two points expressed only in terms of the admissible divisors of $f(a)$ and $f(b)$. We recall the famous result of Apollonius, stating that the set of points $P$ in the plane such that the ratio of distances from $P$ to two fixed points $A$ and $B$ equals some specified $k$ is a circle (see Figure 1), which may degenerate to a point (for $k\to 0$ or $k\to \infty$) or to a line (for $k\to 1$). \begin{center} \hspace{2.6cm} \setlength{\unitlength}{8mm} \begin{picture}(12,5.5) \linethickness{0.15mm} \put(-1,2){\vector(1,0){9}} \put(0,0.25){\vector(0,1){4.75}} \thicklines \linethickness{0.1mm} \put(4,1.3){\line(0,1){0.15}} \put(4,1.5){\line(0,1){0.15}} \put(4,1.7){\line(0,1){0.15}} \put(4,1.9){\line(0,1){0.15}} \put(4,2.1){\line(0,1){0.15}} \put(4,2.3){\line(0,1){0.15}} \put(4,2.5){\line(0,1){0.15}} \put(4,2.7){\line(0,1){0.15}} \put(4,2.9){\line(0,1){0.15}} \put(4,3.1){\line(0,1){0.15}} \put(4,3.3){\line(0,1){0.15}} \put(4,3.5){\line(0,1){0.15}} \put(4,3.7){\line(0,1){0.15}} {\tiny \put(3.25,2.75){$P$} \put(1.65,3.15){$k>1$} \put(5.55,3.15){$k<1$} \put(3.55,4.15){$k=1$} \put(7.55,3.75){$d(P,B)=k\cdot d(P,A)$} \put(2.35,1.55){$(a,0)$} \put(4.75,1.55){$(b,0)$} \put(2.7,2.2){$A$} \put(4.97,2.2){$B$} \put(3.35,0.8){$x=\frac{a+b}{2}$} } \put(4,2){\circle{0.08}} \put(3,2){\circle{0.08}} \put(3,2){\circle{0.12}} \put(4.95,2){\circle{0.08}} \put(4.95,2){\circle{0.12}} \put(2.666,2){\circle{1.82}} \put(5.333,2){\circle{1.82}} \put(3.36,2.53){\circle{0.08}} \put(3.36,2.53){\circle{0.12}} \put(3,2){\line(2,3){0.35}} \put(3.36,2.53){\line(3,-1){1.6}} {\small \put(-5.6,-0.65){{\bf Figure 1.}\ The Apollonius circles with respect to a pair of points in the plane} } \end{picture} \end{center} \bigskip More precisely, given two points $A=(a,0)$ and $B=(b,0)$ and $k>0$, the set of points $P=(x,y)$ with $d(P,B)=k\cdot d(P,A)$ is the Apollonius circle ${\rm Ap}(a,b,k)$ given by the equation \begin{equation}\label{Apollonius1} \left( x-a+\frac{b-a}{k^2-1}\right)^2+y^2=k^2\left( \frac{b-a}{k^2-1}\right) ^2. \end{equation} Our first result that establishes a connection between Apollonius circles and irreducibility testing is the following. \begin{theorem}\label{thm0} Let $f(X)=a_{0}+a_{1}X+\cdots +a_{n}X^{n}$ be a polynomial with integer coefficients, and assume that for two integers $a,b$ we have $0<|f(a)|<|f(b)|$. Let \begin{equation}\label{primulq} q=\max \left\{ \frac{d_2}{d_1}\leq \sqrt{\frac{|f(b)|}{|f(a)|}}: d_1\in \mathcal{D}_{ad}(f(a)), \ d_2\in \mathcal{D}_{ad}(f(b)) \right\} . \end{equation} \emph{i)} If $q>1$ and all the roots of $f$ lie inside the Apollonius circle ${\rm Ap}(a,b,q)$, then $f$ is irreducible over $\mathbb{Q}$. \emph{ii)} If $q>1$, all the roots of $f$ lie inside the Apollonius circle ${\rm Ap}(a,b,\sqrt{q})$ and $f$ has no rational roots, then $f$ is irreducible over $\mathbb{Q}$. \emph{iii)} Assume that $q=1$. If $b>a$ and all the roots of $f$ lie in the half-plane $x<\frac{a+b}{2}$, or if $a>b$ and all the roots of $f$ lie in the half-plane $x>\frac{a+b}{2}$, then $f$ is irreducible over $\mathbb{Q}$. \end{theorem} As we shall see in the sequel, in general it is desirable to work with values of $q$ in the statement of Theorem \ref{thm0} as small as possible, in order to relax the constraints on the two integers $a$ and $b$ that we use. For instance, if $b>a$ and we can prove that $q=1$ (which is the minimum possible value of $q$), by imposing the condition that $f(X+\frac{a+b}{2})$ is a Hurwitz stable polynomial, so that all the roots of $f$ lie in the half-plane $x<\frac{a+b}{2}$, then by Theorem \ref{thm0} iii) we may conclude that $f$ is irreducible over $\mathbb{Q}$. As known, a necessary and sufficient condition for a polynomial to be Hurwitz stable is that it passes the Routh--Hurwitz test. In some applications, instead of testing the conditions in Theorem \ref{thm0}, it might be more convenient to consider the maximum of the absolute values of the roots of $f$, as follows. \begin{theorem}\label{thm1} Let $f(X)=a_{0}+a_{1}X+\cdots +a_{n}X^{n}$ be a polynomial with integer coefficients, $M$ the maximum of the absolute values of its roots, and assume that for two integers $a,b$ we have $0<|f(a)|<|f(b)|$. Let $q$ be given by {\em (\ref{primulq})}. \emph{i)} \ \thinspace \thinspace If $|b|>q|a|+(1+q)M$, then $f$ is irreducible over $\mathbb{Q}$. \emph{ii)} \thinspace \thinspace If $|b|>\sqrt{q}|a|+(1+\sqrt{q})M$ and $f$ has no rational roots, then $f$ is irreducible over $\mathbb{Q}$. \emph{iii)} If $q=1$, $a^2<b^2$ and $M<\frac{|a+b|}{2}$, then $f$ is irreducible over $\mathbb{Q}$. \end{theorem} We note that one can obtain slightly weaker results by allowing $d_1$ and $d_2$ in the definition of $q$ in the statement of Theorem \ref{thm0} to be arbitrary divisors of $f(a)$ and $f(b)$, respectively. Doing so will potentially increase $q$, which will consequently lead to stronger restrictions on $|b|$. Even in some particular cases when $f(a)$ and $f(b)$ have few prime factors, to derive an effective, explicit formula for $q$ in the statement of Theorem \ref{thm0} is a difficult problem involving inequalities between products of prime powers. However, one may obtain many corollaries of this result on the one hand by using some classical estimates for polynomial roots that provide explicit upper bounds for the absolute values of the roots of $f$, and on the other hand by considering some special cases for the canonical decomposition of the two integers $f(a)$ and $f(b)$. The problem of finding a sharp estimate for the maximum of the absolute values of the roots of a given polynomial has a long history that goes back centuries ago. Among the earliest such attempts we mention here the bounds due to Cauchy and Lagrange. A generalization for Cauchy's bound on the largest root of a polynomial was obtained by Mignotte in \cite{MM3}: \smallskip {\em If a monic polynomial of height $H$ has $k$ roots of maximal modulus $\rho$ then $\rho < 1+H^{1/k}$.} \smallskip For a recent improvement of the bound of Lagrange for the maximum modulus of the roots we refer the reader to Batra, Mignotte, and \c Stef\u anescu \cite{BMS}. Further classical refinements rely on the use of some families of parameters, that brings considerably more flexibility, and here we only mention the classical methods of Fujiwara \cite{Fujiwara}, Ballieu \cite{Ballieu}, \cite{Marden}, Cowling and Thron \cite{Cowling1}, \cite{Cowling2}, Kojima \cite{Kojima}, or methods using estimates for the characteristic roots for complex matrices \cite{Perron}. We will only present in this paper some simple corollaries of Theorem \ref{thm1}, for some cases when the canonical decompositions of $f(a)$ and $f(b)$ allow one to conclude that $q=1$. \begin{corollary}\label{coro1main} Let $f(X)=a_{0}+a_{1}X+\cdots +a_{n}X^{n}$ be a polynomial with integer coefficients, and $a$, $b$ two integers such that $a^2<b^2$ and $|a_{n}|>\sum_{i=0}^{n-1}|a_{i}| \bigl(\frac{|a+b|}{2}\bigr) ^{i-n}$. Then $f$ is irreducible over $\mathbb{Q}$ in each of the following cases: \emph{i)}\ \ $|f(a)|=p^{k}r$, $|f(b)|=p^{k+1}$ with $p$ prime and integers $k,r$ with $k\geq 0$ and $0<r<p$; \emph{ii)} $|f(a)|=p^{k}$, $|f(b)|=p^{k}r$ for some primes $p,r$ with $r<p$ and some integer $k\geq 1$. \end{corollary} Note that the irreducibility of $f$ will be guaranteed solely by the condition that $|f(b)|$ is a prime number $p$ for some integer $b$ with sufficiently large absolute value, without using any information on $a$ or on the magnitude of $p$. Indeed, to conclude that $f$ is irreducible it suffices to ask $|f(b)|$ to be prime for some integer $b$ with $|b|>M+1$, where $M$ is the maximum of the absolute values of the roots of $f$. For a proof of this elementary fact and for some of its generalisations we refer the reader to \cite{RamMurty} or \cite{Girstmair}, for instance. Thus, if we ask $|a_{n}|>2|a_{n-1}|+2^{2}|a_{n-2}|+\cdots +2^{n}|a_{0}|$, for instance, then $M<\frac{1}{2}$, so if $|f(b)|$ is prime for an integer $b$ with $|b|\geq 2$, then $f$ must be irreducible. However, we may improve this result by applying Theorem \ref{thm1} with $a=0$ or Corollary \ref{coro1main} i) with $a=k=0$, to also include the cases $b=\pm 1$. This will seemingly come at the cost of asking $|f(b)|$ to exceed $|a_0|$, but as we shall see in the proof of the following corollary, this apparently additional condition will actually be an immediate consequence of our assumption on the magnitude of $|a_n|$. \begin{corollary} \label{coro2} Let $f(X)=a_{0}+a_{1}X+\cdots +a_{n}X^{n}$ be a polynomial with integer coefficients, with $|a_{n}|>2|a_{n-1}|+2^{2}|a_{n-2}|+\cdots +2^{n}|a_{0}|$ and $a_{0}\neq 0$. If $f(\mathbb{Z}\setminus \{0\})$ or $-f(\mathbb{Z}\setminus \{0\})$ contains a prime number, then $f$ must be irreducible over $\mathbb{Q}$. \end{corollary} We mention that Theorem 6 is a special case of Corollary \ref{coro2}, obtained by asking $\tilde{f}(1)$ to be prime, with $\tilde{f}$ the reciprocal of $f$, and asking $|a_0|>2|a_1|+2^2|a_2|+\cdots +2^n|a_n|$ instead of $|a_{n}|>2|a_{n-1}|+2^{2}|a_{n-2}|+\cdots +2^{n}|a_{0}|$. Using the well-known Enestr\"om--Kakeya Theorem \cite{Kakeya}, saying that all the roots of a polynomial $f(X)=a_{0}+a_{1}X+\cdots +a_{n}X^{n}$ with real coefficients satisfying $0\leq a_{0}\leq a_{1}\leq \dots \leq a_{n}$ must have absolute values at most $1$, one can also prove the following two results. \begin{corollary}\label{EK} Let $f(X)=a_{0}+a_{1}X+\cdots +a_{n}X^{n}$ be an Enestr\"om--Kakeya polynomial of degree $n$ with integer coefficients, $a_0\neq 0$, and $a$, $b$ two integers with $a^2<b^2$ and $|a+b|>2$. Then $f$ is irreducible over $\mathbb{Q}$ in each of the following cases: \emph{i)}\ \ $|f(a)|=p^{k}r$, $|f(b)|=p^{k+1}$ with $p$ prime and integers $k,r$ with $k\geq 0$ and $0<r<p$; \emph{ii)} $|f(a)|=p^{k}$, $|f(b)|=p^{k}r$ for some primes $p$, $r$ with $r<p$ and some integer $k\geq 1$. \end{corollary} \begin{corollary}\label{EK2} Let $f(X)=a_{0}+a_{1}X+\cdots +a_{n}X^{n}$ be an Enestr\"om--Kakeya polynomial of degree $n$ with integer coefficients, $a_0\neq 0$. If $f(-1)\neq 0$ and $|f(b)|$ is a prime number for some integer $b$ with $|b|\geq 2$, then $f$ is irreducible over $\mathbb{Q}$. \end{corollary} We note here that condition $f(-1)\neq 0$ cannot be removed, since the reducible Enestr\"om--Kakeya polynomial $f(X)=X^3+X^2+X+1$ satisfies $|f(-2)|=5$ while $f(-1)=0$. The proofs of the results stated so far will be given in Section 2. When we study the admissible divisors of $f(a)$ and $f(b)$, we distinguish the particular cases where $f(n)$ and $f'(n)$ are coprime for at least one integer $n\in \{ a,b\}$. Consequently, the set of admissible divisors of $f(n)$ reduces in these cases to the set $\mathcal{D}_u(f(n))$ of unitary divisors of $f(n)$. In Section 3 we will state and prove the results corresponding to the case that both relations $\gcd(f(a),f'(a))=1$ and $\gcd(f(b),f'(b))=1$ hold, where $q$ will be denoted by $q_u$, to emphasize the role of unitary divisors of $f(a)$ and $f(b)$. One can easily state the results corresponding to the remaining two cases when only one of these relations holds. Thus we will present two results analogous to Theorem \ref{thm0} and Theorem \ref{thm1}, namely Theorem \ref{thm0unitary} and Theorem \ref{thm3}, where the radius of the related Apollonius circles ${\rm Ap}(a,b,q_u)$ potentially increases. Another benefit of using unitary divisors will consist in finding more cases when the canonical decompositions of $f(a)$ and $f(b)$ forces $q_u$ to be equal to $1$, as we shall see in Corollary \ref{coro3main}. We will also prove in Section \ref{se4} similar results for multivariate polynomials $f(X_{1},\dots ,X_{r})$ over an arbitrary field $K$. The results for polynomials in $r\geq 3$ variables will be deduced from the results in the bivariate case, by writing $Y$ for $X_{r}$, $X$ for $X_{r-1}$, and $K$ for $K(X_{1},\dots ,X_{r-2})$. First, we will need the following definition, analogous to Definition \ref{admissible} for the bivariate case. \begin{definition}\label{admissible2} Let $K$ be a field, $f(X,Y)\in K[X,Y]$ and $a(X)\in K[X]$ such that $f(X,a(X))\neq 0$. We say that a polynomial $d(X)\in K[X]$ is an {\it admissible divisor} of $f(X,a(X))$ if $d(X)\mid f(X,a(X))$ and \begin{equation}\label{adm2var} \gcd \left( d(X),\frac{f(X,a(X))}{d(X)}\right) \mid \gcd \left( f(X,a(X)),\frac{\partial f}{\partial Y}(X,a(X))\right) . \end{equation} We will denote by $D_{ad}(f(X,a(X))$ the set of admissible divisors of $f(X,a(X))$. Also, for $f(X,Y)$ and $a(X)$ as above we will denote \[ D_{u}(f(X,a(X)))=\{ d\in K[X]:d(X)|f(X,a(X)),\ \gcd\left( d(X),\frac{f(X,a(X))}{d(X)}\right) =1\} , \] and call it the set of {\it unitary divisors} of $f(X,a(X))$. We note that in the particular case that $\gcd (f(X,a(X)),\frac{\partial f}{\partial Y}(X,a(X)))=1$, $D_{ad}(f(X,a(X))$ reduces to $\mathcal{D}_u(f(X,a(X)))$. \end{definition} With this definition, we have the following results. \begin{theorem}\label{thm5} Let $K$ be a field, $f(X,Y)=a_{0}(X)+a_{1}(X)Y+\cdots +a_{n}(X)Y^{n}\in K[X,Y]$, with $a_{0},\dots ,a_{n}\in K[X]$, $a_{0}a_{n}\neq 0$. Assume that for two polynomials $a(X),b(X)\in K[X]$ we have $f(X,a(X))f(X,b(X))\neq 0$ and $\Delta:=\frac{1}{2}\cdot (\deg f(X,b(X))-\deg f(X,a(X)))\geq 0$, and let \[ q=\max \{ \deg d_{2}-\deg d_{1}\leq \Delta :d_{1}\in D_{ad}(f(X,a(X))),d_{2}\in D_{ad}(f(X,b(X))) \}. \] If $\deg b(X)>\max \{ \deg a(X),\max \limits_{0\leq i\leq n-1 } \frac{\deg a_{i}-\deg a_{n}}{n-i} \}+q$, then $f(X,Y)$ is irreducible over $K(X)$. \end{theorem} In particular, for $a(X)=0$ and $b(X)$ denoted by $g(X)$, we obtain: \begin{corollary}\label{coro6} Let $K$ be a field, $f(X,Y)=a_{0}(X)+a_{1}(X)Y+\cdots +a_{n}(X)Y^{n}\in K[X,Y]$, with $a_{0},a_{1},\dots ,a_{n}\in K[X]$, $a_0a_n\neq 0$ and \[ \deg a_{n} \geq\max \{ \deg a_{0},\deg a_{1},\dots ,\deg a_{n-1}\} . \] If for a non-constant polynomial $g(X)\in K[X]$, the polynomial $f(X,g(X))$ is irreducible over $K$, then $f(X,Y)$ is irreducible over $K(X)$. \end{corollary} Two additional irreducibility criteria that rely on the unitary divisors of $f(X,a(X))$ and $f(X,b(X))$ will be also proved in Section \ref{se4}. Our results are quite flexible, and provide irreducibility conditions for many cases where other irreducibility criteria fail. We will give in the last section of the paper a series of examples of infinite families of polynomials that are proved to be irreducible by using irreducibility criteria proved in previous sections. \section{The case of admissible divisors} \label{se2} {\it Proof of Theorem \ref{thm0}} \ Assume that $f$ factors as $f(X)=a_{n}(X-\theta _{1})\cdots (X-\theta _{n})$ for some complex numbers $\theta _{1},\dots ,\theta _{n}$. Now let us assume to the contrary that $f$ is reducible, so there exist two polynomials $g,h\in \mathbb{Z}[X]$ with $\deg g=m\geq 1$, $\deg h=n-m\geq 1$ such that $f=g\cdot h$. Without loss of generality we may further assume that \[ g(X)=b_{m}(X-\theta _{1})\cdots (X-\theta _{m})\ \ \mbox{{\rm and}}\ \ h(X)=\frac{a_{n}}{b_{m}}(X-\theta _{m+1})\cdots (X-\theta _{n}), \] for some divisor $b_{m}$ of $a_{n}$. Now, since $f(a)=g(a)h(a)\neq 0$ and $f'(a)=g'(a)h(a)+g(a)h'(a)$, and similarly $f(b)=g(b)h(b)$ and $f'(b)=g'(b)h(b)+g(b)h'(b)$, we see that $g(a)$ is a divisor $d_{1}$ of $f(a)$, and $g(b)$ is a divisor $d_2$ of $f(b)$ that must also satisfy the following divisibility conditions \[ \gcd \left( d_1,\frac{f(a)}{d_1}\right) \mid \gcd (f(a),f'(a))\ \mbox{\rm \ and\ }\ \gcd \left( d_2,\frac{f(b)}{d_2}\right) \mid \gcd (f(b),f'(b)). \] Therefore $d_1$ and $d_2$ are admissible divisors of $f(a)$ and $f(b)$, respectively. Similarly, if we denote $h(a)$ by $d_1'$ and $h(b)$ by $d_2'$, we see that $d_1'$ and $d_2'$ are also admissible divisors of $f(a)$ and $f(b)$, respectively. Next, since \[ \frac{d_2}{d_1}\cdot \frac{d'_2}{d'_1}=\frac{f(b)}{f(a)}, \] one of the quotients $\frac{|d_2|}{|d_1|}$ and $\frac{|d'_2|}{|d'_1|}$, say $\frac{|d_2|}{|d_1|}$, must be less than or equal to $\sqrt{\frac{|f(b)|}{|f(a)|}}$. In particular, we have \begin{equation}\label{q} \frac{|g(b)|}{|g(a)|}\leq q. \end{equation} We notice here that since $|f(b)|>|f(a)|$ and $1$ is obviously a divisor of $f(a)$ and $f(b)$, a possible candidate for $q$ is $1$, so $q\geq 1$. Next, we observe that we may write \[ \frac{g(b)}{g(a)}=\frac{b-\theta_1}{a-\theta_1}\cdots \frac{b-\theta_m}{a-\theta_m}, \] so in view of (\ref{q}) for at least one index $i\in \{ 1,\dots ,m\} $ we must have \begin{equation}\label{radical} \frac{|b-\theta_i|}{|a-\theta_i|}\leq q^{\frac{1}{m}}. \end{equation} Now, let us first assume that $q>1$ and all the roots of $f$ lie inside the Apollonius circle ${\rm Ap}(a,b,q)$. In particular, since $\theta _i$ lies inside the Apollonius circle ${\rm Ap}(a,b,q)$, it must satisfy the inequality $|b-\theta_i|>q|a-\theta_i|$. Since $q>1$ and $m\geq 1$, we have $q\geq q^{\frac{1}{m}}$, so we deduce that we actually have \[ \frac{|b-\theta_i|}{|a-\theta_i|}>q^{\frac{1}{m}}, \] which contradicts (\ref{radical}). Therefore $f$ must be irreducible. Next, assume that $q>1$ and that all the roots of $f$ lie inside the Apollonius circle ${\rm Ap}(a,b,\sqrt{q})$. In particular, we have $|b-\theta_i|>\sqrt{q}|a-\theta_i|$. Since $f$ has no rational roots, we must have $m\geq 2$, so $\sqrt{q}\geq q^{\frac{1}{m}}$, which also leads us to the desired contradiction \[ \frac{|b-\theta_i|}{|a-\theta_i|}>q^{\frac{1}{m}}, \] thus proving the irreducibility of $f$. Finally, let us assume that $q=1$, so in this case (\ref{radical}) reads \[ \frac{|b-\theta_i|}{|a-\theta_i|}\leq 1, \] which is equivalent to \begin{equation}\label{inegab} (b-Re(\theta _i))^2\leq (a-Re(\theta _i))^2. \end{equation} It is easy to see that in order to contradict (\ref{inegab}), it is sufficient to ask all the roots of $f$ to lie in the half-plane $x<\frac{a+b}{2}$ if $a<b$, or in the half-plane $x>\frac{a+b}{2}$ if $a>b$. This completes the proof of the theorem. \hfill $\square $ \medskip {\it Proof of Theorem \ref{thm1}} \ The proof goes as in the case of Theorem \ref{thm0}, and we deduce again that for at least one index $i\in \{ 1,\dots ,m\} $ we must have \begin{equation}\label{radical2} \frac{|b-\theta_i|}{|a-\theta_i|}\leq q^{\frac{1}{m}}. \end{equation} On the other hand, if $|b|>q|a|+(1+q)M$ we observe that \[ \frac{|b-\theta_i|}{|a-\theta_i|}\geq \frac{|b|-|\theta_i|}{|a|+|\theta_i|} \geq \frac{|b|-M}{|a|+M}>q\geq q^{\frac{1}{m}}, \] since $q\geq 1$. This contradicts (\ref{radical2}), so $f$ must be irreducible over $\mathbb{Q}$. In our second case, if we assume that $|b|>\sqrt{q}|a|+(1+\sqrt{q})M$ and $f$ has no rational roots, then $m\geq 2$, and consequently \[ \frac{|b-\theta_i|}{|a-\theta_i|}\geq \frac{|b|-M}{|a|+M}>\sqrt{q}\geq q^{\frac{1}{m}}, \] again a contradiction. Finally, let us assume that $q=1$, $a^2<b^2$ and $M<\frac{|a+b|}{2}$. If $b>a$, then $a+b>0$ and the conclusion follows by Theorem \ref{thm0} iii) since the disk $|z|\leq M$ containing all the roots of $f$ lies in the left half-plane $x<\frac{a+b}{2}$. Finally, if $a>b$, then $a+b<0$ and the disk $|z|\leq M$ lies in the right half-plane $x>\frac{a+b}{2}$, since $-M>\frac{a+b}{2}$. \hfill $\square $ \medskip {\it Proof of Corollary \ref{coro1main}} \ An immediate consequence of Rouch\'e's Theorem is that the condition $|a_{n}|>\sum_{i=0}^{n-1}|a_{i}|\bigl(\frac{|a+b|}{2}\bigr) ^{i-n}$ forces all the roots of $f$ to have absolute values less than $\frac{|a+b|}{2}$. Therefore $M<\frac{|a+b|}{2}$. In the first case we observe that if $|f(a)|=p^{k}r$ and $|f(b)|=p^{k+1}$, with $p$ prime and $0<r<p$, then any positive quotient $\frac{d_{2}}{d_{1}}$ with $d_{1}\mid f(a)$ and $d_{2}\mid f(b)$ has the form $\frac{p^{i}}{s}$ with $i$ an integer satisfying $-k\leq i\leq k+1$, and $s$ a divisor of $r$. For $i\leq 0$ these quotients will be at most $1$, while for $i>0$ all the corresponding quotients will exceed $\sqrt{\frac{p}{r}}$, as $\frac{p}{s}>\sqrt{\frac{p}{r}}$. Thus $q=1$ in this first case. Next, if $|f(a)|=p^{k}$ and $|f(b)|=p^{k}r$, any positive quotient $\frac{d_{2}}{d_{1}}$ with $d_{1}\mid f(a)$ and $d_{2}\mid f(b)$ has the form $p^{i}r^{\varepsilon }$ with $i$ an integer satisfying $-k\leq i\leq k$ and $\varepsilon \in \{ 0,1\} $. For $\varepsilon =0$, no such quotient other than 1 belongs to the interval [$1,\sqrt{r}$], since $p>\sqrt{r}$. Finally, we observe that for $\varepsilon =1$ no integer $i$ can satisfy the condition $1< p^{i}r< \sqrt{r}$ since $p>r$. So in both cases $q$ must be equal to $1$. The conclusion now follows from Theorem \ref{thm1}. \hfill $\square $ \medskip {\it Proof of Corollary \ref{coro2}} \ Our assumption on the magnitude of $|a_n|$ forces all the roots of $f$ to have absolute values less than $\frac{1}{2}$, so $M<\frac{1}{2}$. We may now apply Theorem \ref{thm1} with $a=0$ or Corollary \ref{coro1main} i) with $a=k=0$ to deduce that $f$ is irreducible over $\mathbb{Q}$ if $b\neq 0$. All that remains now is to prove that our condition $|a_{n}|>2|a_{n-1}|+2^{2}|a_{n-2}|+\cdots +2^{n}|a_{0}|$ together with the fact that $|b|\geq 1$ also force the prime number $|f(b)|$ to exceed $|a_0|$. Indeed, we successively deduce that \begin{eqnarray*} |f(b)| & = & |a_0+a_1b+\cdots +a_nb^n|\geq |b|^n|a_n|-|b|^{n-1}|a_{n-1}|-\cdots -|b|\cdot |a_1|-|a_0|\\ & > & |b|^{n}(2|a_{n-1}|+2^2|a_{n-2}|+\cdots +2^n |a_0|)-|b|^{n-1}|a_{n-1}|-\cdots -|b|\cdot |a_1|-|a_0|\\ & = & |b|^{n-1}(2|b|-1)|a_{n-1}|+|b|^{n-2}(2^2|b|^2-1)|a_{n-2}|+\cdots +(2^n|b|^n-1)|a_0|\\ & \geq & (2^n|b|^n-1)|a_0|\geq (2^n-1)|a_0|\geq |a_0|, \end{eqnarray*} and this completes the proof. \hfill $\square $ \medskip {\it Proof of Corollary \ref{EK}} \ Here, by the Enestr\"om--Kakeya Theorem all the roots of $f$ must have modulus at most $1$, so $M\leq 1$. Arguing as in the proof of Corollary \ref{coro1main} one may prove that $q=1$ in both cases, and the proof finishes by applying Theorem \ref{thm1}. \hfill $\square $ \medskip {\it Proof of Corollary \ref{EK2}} \ We note here that since an Enestr\"om--Kakeya polynomial $f$ has all the roots of modulus at most $1$, it will be irreducible over $\mathbb{Q}$ if $|f(b)|$ is a prime for some integer $b$ with $|b|\geq 3$. If we consider now an additional integer argument $a$ and ask $f(a)\neq 0$ and $|f(b)|=p$ for some prime number $p>|f(a)|$, this will force $q$ to be equal to $1$, and will guarantee the irreducibility of $f$ via Theorem \ref{thm1} if $a^2<b^2$ and $|a+b|>2$. This will also allow us to use the pairs $(a,b)=(1,2)$ and $(a,b)=(-1,-2)$. In the first case, if $f(2)$ is a prime number, then it will obviously exceed $f(1)$, since $f$ has positive coefficients. Let us consider the remaining case $(a,b)=(-1,-2)$. If $n$ is even, one can easily check that $f(-2)>f(-1)\geq 0$, so if we ask $f(-1)\neq 0$, then condition $|f(-2)|>|f(-1)|>0$ will be obviously satisfied. On the other hand, if $n$ is odd, one can check that $f(-2)<f(-1)\leq 0$, so if $f(-1)\neq 0$, the condition $|f(-2)|>|f(-1)|>0$ will be again satisfied. By Theorem \ref{thm1}, $f$ will be irreducible in both cases. \hfill $\square $ \medskip \section{The case of unitary divisors} \label{se3} The aim of this section is to find irreducibility conditions by studying the unitary divisors of $f(a)$ and $f(b)$. Here instead of $q$ given by (\ref{primulq}), we will use a potentially smaller rational number, defined by \begin{equation}\label{aldoileaq} q_{u}=\max \left\{ \frac{d_2}{d_1}\leq \sqrt{\frac{|f(b)|}{|f(a)|}}: d_1\in \mathcal{D}_u(f(a)), \ d_2\in \mathcal{D}_u(f(b))\right\} . \end{equation} With this notation we have the following irreducibility criterion. \begin{theorem}\label{thm0unitary} Let $f(X)=a_{0}+a_{1}X+\cdots +a_{n}X^{n}\in \mathbb{Z}[X]$, and assume that for two integers $a,b$ we have $0<|f(a)|<|f(b)|$ and $\gcd(f(a),f'(a))=\gcd(f(b),f'(b))=1$. Let also $q_u$ be given by {\em (\ref{aldoileaq})}. \emph{i)} If $q_{u}>1$ and all the roots of $f$ lie inside the Apollonius circle ${\rm Ap}(a,b,q_u)$, then $f$ is irreducible over $\mathbb{Q}$. \emph{ii)} If $q_{u}>1$, all the roots of $f$ lie inside the Apollonius circle ${\rm Ap}(a,b,\sqrt{q_u})$ and $f$ has no rational roots, then $f$ is irreducible over $\mathbb{Q}$. \emph{iii)} Assume that $q_{u}=1$. If $b>a$ and all the roots of $f$ lie in the half-plane $x<\frac{a+b}{2}$, or if $a>b$ and all the roots of $f$ lie in the half-plane $x>\frac{a+b}{2}$, then $f$ is irreducible over $\mathbb{Q}$. \end{theorem} \begin{proof}\ Using the same notations as in the proof of Theorem \ref{thm0}, we see that conditions $\gcd(f(a),f'(a))=\gcd(f(b),f'(b))=1$ together with the divisibility conditions \[ \gcd \left( d_1,\frac{f(a)}{d_1}\right) \mid \gcd (f(a),f'(a))\ \mbox{\rm and}\ \gcd \left( d_2,\frac{f(b)}{d_2}\right) \mid \gcd (f(b),f'(b)) \] will force $d_1$ to be a unitary divisor of $f(a)$, and $d_2$ to be a unitary divisor of $f(b)$. Similarly, $h(a)$ must be a unitary divisor $d_1'$ of $f(a)$ and $h(b)$ must be a unitary divisor $d_2'$ of $f(b)$. Since \[ \frac{d_2}{d_1}\cdot \frac{d'_2}{d'_1}=\frac{f(b)}{f(a)}, \] one of the quotients $\frac{|d_2|}{|d_1|}$ and $\frac{|d'_2|}{|d'_1|}$, say $\frac{|d_2|}{|d_1|}$, must be less than or equal to $\sqrt{\frac{|f(b)|}{|f(a)|}}$. In particular, instead of (\ref{q}), we obtain $\frac{|g(b)|}{|g(a)|}\leq q_u$. We note that we will still have $q_{u}\geq 1$, since $1$ belongs to both $\mathcal{D}_u(f(a))$ and $\mathcal{D}_u(f(b))$. The proof continues as in the case of Theorem \ref{thm0}, with $q_u$ instead of $q$. \end{proof} \begin{theorem}\label{thm3} Let $f(X)=a_{0}+a_{1}X+\cdots +a_{n}X^{n}$ be a polynomial with integer coefficients, $M$ the maximum of the absolute values of its roots, and assume that for two integers $a,b$ we have $0<|f(a)|<|f(b)|$ and $\gcd(f(a),f'(a))=\gcd(f(b),f'(b))=1$. Let also $q_u$ be given by relation {\em (\ref{aldoileaq})}. \emph{i)} \ \thinspace \thinspace If $|b|>q_{u}|a|+(1+q_{u})M$, then $f$ is irreducible over $\mathbb{Q}$. \emph{ii)} \ If $|b|>\sqrt{q_{u}}|a|+(1+\sqrt{q_{u}})M$ and $f$ has no rational roots, then $f$ is irreducible over $\mathbb{Q}$. \emph{iii)} If $q_u=1$, $a^2<b^2$ and $M<\frac{|a+b|}{2}$, then $f$ is irreducible over $\mathbb{Q}$. \end{theorem} \begin{proof} \ The proof is similar to that of Theorem \ref{thm1}, with $q_u$ instead of $q$. \end{proof} In particular, we obtain the following irreducibility criterion that complements Corollary \ref{coro1main}, by allowing one to consider only the unitary divisors of $f(a)$ and $f(b)$. \begin{corollary} \label{coro3main} Let $f(X)=a_{0}+a_{1}X+\cdots +a_{n}X^{n}$ be a polynomial with integer coefficients, and $a$, $b$ two integers such that $a^2<b^2$ and $|a_{n}|>\sum_{i=0}^{n-1}|a_{i}|(\frac{|a+b|}{2}) ^{i-n}$. Then $f$ is irreducible over $\mathbb{Q}$ in each of the following four cases: \emph{i)} $|f(a)|=p^{k_{1}}r$, $|f(b)|=p^{k_{2}}$ for some prime number $p$ and some integers $k_{1},k_{2},r$ with $0\leq k_{1}<k_{2}$, $0<r<p$, $p\nmid f'(a)f'(b)$ and $r\nmid f'(a)$; \emph{ii)} $|f(a)|=p^{k}$, $|f(b)|=p^{k}r^{j}$ for two distinct prime numbers $p$, $r$ and some positive integers $k,j$ with $p^{k}>r^{j}$, $p\nmid f'(a)f'(b)$ and $r\nmid f'(b)$. \emph{iii)} $|f(a)|=p^{u}$, $|f(b)|=q^{v}r^{t}$ for three distinct prime numbers $p,q,r$ and some positive integers $u,v,t$ with $p^{u}>q^{v}$, $p^{u}>r^{t}$, $p^{u}<q^{v}r^{t}$, $p\nmid f'(a)$, $q\nmid f'(b)$ and $r\nmid f'(b)$. \emph{iv)} $|f(a)|=p^{u}q^{v}$, $|f(b)|=r^{k}s^{l}$ for four distinct prime numbers $p,q,r,s$ and some positive integers $u,v,k,l$ with $p^{u}>r^{k}>s^{l}>q^{v}$, $p^{u}q^{v}<r^{k}s^{l}$, $p\nmid f'(a)$, $q\nmid f'(a)$, $r\nmid f'(b)$ and $s\nmid f'(b)$. \end{corollary} \begin{proof} \ Here, as in the proof of Corollary \ref{coro1main} we have $M<\frac{|a+b|}{2} $. Assuming now that $|f(a)|=p^{k_{1}}r$ and $|f(b)|=p^{k_{2}}$ with $0<r<p$ and $k_{1}<k_{2}$, then any $d_1\in\mathcal{D}_u(f(a))$ is of the form $s,p^{k_{1}}$ or $p^{k_1}s$, with $s\in\mathcal{D}_u(r)$, while a unitary divisor $d_2$ of $f(b)$ is either $1$ or $p^{k_{2}}$. Therefore $\frac{d_2}{d_1}$ is either $\frac{1}{d_1}$, which is at most $1$, or is of the form $\frac{p^{k_2}}{s}$, $p^{k_2-k_1}$, $\frac{p^{k_2-k_1}}{s}$ with $s\in\mathcal{D}_u(r)$. It suffices to observe that for each $s\in\mathcal{D}_u(r)$ we have $\frac{p^{k_2-k_1}}{s}>\sqrt{\frac{p^{k_2}}{p^{k_1}r}}$, as $p^{k_2-k_1}>\frac {s^2}{r}$. Thus $q_{u}=1$ in this first case. For our second case let us assume that $|f(a)|=p^{k}$ and $|f(b)|=p^{k}r^{j}$ for two distinct primes $p$, $r$ and some positive integers $k,j$ with $p^{k}>r^{j}$. Then $\mathcal{D}_u(f(a))=\{ 1,p^{k}\} $ and $\mathcal{D}_u(f(b))=\{ 1,p^{k},r^{j},p^{k}r^{j}\} $. Therefore any quotient $\frac{d_{2}}{d_{1}}$ with $d_{1}\in \mathcal{D}_u(f(a))$ and $d_{2}\in \mathcal{D}_u(f(b))$ belongs to the set $\{ 1,p^{k},r^{j},p^{k}r^{j},\frac{1}{p^{k}},\frac{r^{j}}{p^{k}}\}$, so here again it holds $q_{u}=1$, since according to our assumption that $p^{k}>r^{j}$, the only such quotient in the interval [$1,r^{\frac{j}{2}}$] is $1$. In our third case we have $\mathcal{D}_u(f(a))=\{ 1,p^{u}\} $ and $\mathcal{D}_u(f(b))=\{ 1,q^{v},r^{t},q^{v}r^{t}\} $, so any quotient $\frac{d_{2}}{d_{1}}$ with $d_{1}\in \mathcal{D}_u(f(a))$ and $d_{2}=1$ will be at most $1$, while any quotient $\frac{d_{2}}{d_{1}}$ with $d_{1}\in \mathcal{D}_u(f(a))$ and $d_{2}=q^{v}r^{t}$ will exceed $\sqrt{\frac{q^{v}r^{t}}{p^{u}}}$. We are thus left with the case that \[ \frac{d_2}{d_1}\in \left\{ q^v,\frac{q^v}{p^u},r^{t},\frac{r^t}{p^u}\right\} . \] It is now plain to see that while $\frac{q^v}{p^u}$ and $\frac{r^t}{p^u}$ are less than $1$, both $q^{v}$ and $r^{t}$ exceed $\sqrt{\frac{q^{v}r^{t}}{p^{u}}}$, so here we have $q_{u}=1$ too. In our last case we have $\mathcal{D}_u(f(a))=\{ 1,p^{u},q^{v}, p^{u}q^{v}\} $ and $\mathcal{D}_u(f(b))=\{ 1,r^{k},s^{l},r^{k}s^{l}\} $. Here we first note that any quotient $\frac{d_{2}}{d_{1}}$ with $d_{1}\in \mathcal{D}_u(f(a))$ and $d_{2}=1$ will be at most $1$, and any quotient $\frac{d_{2}}{d_{1}}$ with $d_{1}\in \mathcal{D}_u(f(a))$ and $d_{2}=r^{k}s^{l}$ will exceed $\sqrt{\frac{r^{k}s^{l}}{p^{u}q^{v}}}$. We are therefore left with the case that \[ \frac{d_2}{d_1}\in \left\{ r^k,\frac{r^k}{p^u},\frac{r^k}{q^v}, \frac{r^k}{p^uq^v},s^l,\frac{s^l}{p^u},\frac{s^l}{q^v},\frac{s^l}{p^uq^v}\right\} . \] Using now our hypothesys that $p^u>r^k>s^l>q^v$ it is easy to check that each of the quotients $\frac{r^k}{p^u},\frac{r^k}{p^uq^v},\frac{s^l}{p^u},\frac{s^l}{p^uq^v}$ is less than $1$, while each of the remaining ones $r^k,\frac{r^k}{q^v},s^l,\frac{s^l}{q^v}$ exceeds $\sqrt{\frac{r^{k}s^{l}}{p^{u}q^{v}}}$, so here $q_u=1$ as well. The irreducibility of $f$ now follows from Theorem \ref{thm3}. \end{proof} The reader may naturally wonder if there exists a result analogous to Corollary \ref{coro2}, that uses information on the prime power values of a polynomial, instead of its prime values. The answer is affirmative, and one can prove the following result, which illustrates a situation when there is no need to impose both conditions $\gcd(f(a),f'(a))=1$ and $\gcd(f(b),f'(b))=1$. \begin{corollary} \label{corovechi} Let $f(X)=a_{0}+a_{1}X+\cdots +a_{n}X^{n}\in \mathbb{Z}[X]$ with $a_0a_n\neq 0$ and $|a_{n}|>2|a_{n-1}|+2^{2}|a_{n-2}|+\cdots +2^{n}|a_{0}|$. If for a non-zero integer $m$, a prime number $p$ and an integer $k\geq 2$ we have $|f(m)|=p^{k}$ and $p\nmid f'(m)$, then $f$ is irreducible over $\mathbb{Q}$. \end{corollary} \begin{proof} \ Assume first that for a polynomial $f$ with integer coefficients and two integers $a$, $b$ we have $0<|f(a)|<|f(b)|=p^{k}$ for some prime number $p$ and some positive integer $k$. Let us also assume that $p\nmid f'(b)$. Then $\mathcal{D}_{ad}(f(b))=\mathcal{D}_{u}(f(b))$ and any positive quotient $\frac{d_{2}}{d_{1}}$ in the definition of $q$ in Theorem \ref{thm1} either has the form $\frac{1}{d_{1}}$ with $d_{1}$ an admissible divisor of $f(a)$, and hence is at most $1$, or is equal to $\frac{p^{k}}{d_{1}}$, which obviously exceeds $\sqrt{\frac{p^{k}}{|f(a)|}}$. Therefore in this case $q$ must be equal to $1$. In particular, if we take $a=0$ and $b=m$, and assume that $0<|a_0|<|f(m)|=p^{k}$ for some prime number $p$ and some integer $k\geq 2$, and also assume that $p\nmid f'(m)$, then the corresponding $q$ must be equal to $1$. Since all the roots of $f$ have absolute values less than $\frac{1}{2}$, we have $M<\frac{1}{2}$. By Theorem \ref{thm1} we conclude that $f$ is irreducible over $\mathbb{Q}$ if $|m|>2M$, or equivalently, if $|m|\geq 1$, since $M<\frac{1}{2}$. All that remains is to prove that the inequalities $|m|\geq 1$ and $|a_{n}|>2|a_{n-1}|+2^{2}|a_{n-2}|+\cdots +2^{n}|a_{0}|$ actually force $|f(m)|$ to exceed $|a_0|$. As in the case of Corollary \ref{coro2}, we deduce successively that \begin{eqnarray*} |f(m)| & = & |a_0+a_1m+\cdots +a_nm^n|\geq |m|^n |a_n|-|m|^{n-1}|a_{n-1}|- \cdots -|m|\cdot |a_1|-|a_0|\\ & > & |m|^{n}(2|a_{n-1}|+2^2|a_{n-2}|+ \cdots +2^n|a_0|)-|m|^{n-1}|a_{n-1}|-\cdots -|m|\cdot |a_1|-|a_0|\\ & = & |m|^{n-1}(2|m|-1)|a_{n-1}|+|m|^{n-2}(2^2|m|^2-1)|a_{n-2}|+\cdots +(2^n|m|^n-1)|a_0|\\ & \geq & (2^n|m|^n-1)|a_0|\geq (2^n-1)|a_0|\geq |a_0|, \end{eqnarray*} completing the proof. We note that using Theorem \ref{thm3} instead of Theorem \ref{thm1} would impose here the unnecessary aditional condition $\gcd(f(0),f'(0))=1$, that is $\gcd(a_0,a_1)=1$. \end{proof} We mention here that Theorem 7 is a special case of Corollary \ref{corovechi}, obtained by considering the reciprocal of $f$ instead of $f$. \section{The case of multivariate polynomials} \label{se4} {\it Proof of Theorem \ref{thm5}} \ We will first introduce a nonarchimedean absolute value $|\cdot|$ on $K(X)$, as follows. We first fix an arbitrary real number $\rho>1$, and for any polynomial $F(X)\in K[X]$ we define $|F(X)|$ by the equality \[ |F(X)|=\rho^{\deg F(X)}. \] We then extend this absolute value $|\cdot|$ to $K(X)$ by multiplicativity, that is, for any polynomials $F(X),G(X)\in K[X]$, $G(X)\neq 0$, we let $\left| \frac{F(X)}{G(X)} \right|=\frac{|F(X)|}{|G(X)|}$. Here we must note that for any non-zero element $F$ of $K[X]$ one has $|F|\geq 1$. Let now $\overline{K(X)}$ be a fixed algebraic closure of $K(X)$, and let us fix an extension of our absolute value $|\cdot|$ to $\overline{K(X)}$, which we will also denote by $|\cdot|$. Suppose $f$ as a polynomial in $Y$ with coefficients in $K[X]$ factorizes as \[ f(X,Y)=a_{n}(X)(Y-\theta _{1})\cdots (Y-\theta _{n}) \] for some $\theta _{1},\dots ,\theta _{n}\in \overline{K(X)}$. Next, we will prove that \begin{equation}\label{grade} \max \{ |\theta _{1}|,\dots ,|\theta _{n}| \} \leq \rho ^ {\ \max \limits_{0\leq i\leq n-1 }\frac{\deg a_{i}-\deg a_{n}}{n-i}}. \end{equation} To prove this claim, let $\lambda :=\max \limits_{0\leq i\leq n-1 } \frac{\deg a_{i}-\deg a_{n}}{n-i}$, and let us assume to the contrary that $f$ has a root $\theta $ with $|\theta |> \rho ^{\lambda }$. Since $\theta \ne 0$ and our absolute value also satisfies the triangle inequality, we successively deduce that \begin{eqnarray*} 0=\left| \sum\limits _{i=0}^{n}a_{i}\theta ^{i-n}\right| & \geq & |a_{n}|- \left| \sum\limits _{i=0}^{n-1}a_{i}\theta ^{i-n}\right| \geq |a_{n}|- \max\limits _{0\leq i\leq n-1}|a_{i}|\cdot |\theta |^{i-n}\\ & > & |a_{n}|- \max\limits _{0\leq i\leq n-1}|a_{i}|\cdot \rho^{(i-n)\lambda }, \end{eqnarray*} yielding $|a_{n}|< \max\limits _{0\leq i\leq n-1}|a_{i}|\cdot \rho^{(i-n)\lambda }$, or equivalently \begin{equation}\label{gradenou} \deg a_{n}< \max\limits _{0\leq i\leq n-1}\{ \deg a_{i}+(i-n)\lambda \} . \end{equation} Let us select now an index $k\in \{ 0,\dots , n-1\} $ for which the maximum in the right side of (\ref{gradenou}) is attained. Then we deduce that \[ \deg a_{n}< \deg a_{k}+(k-n)\lambda , \] which leads us to \[ \frac{\deg a_{k}-\deg a_{n}}{n-k}>\max \limits_{0\leq i\leq n-1 }\frac{\deg a_{i}-\deg a_{n}}{n-i}, \] a contradiction. Therefore (\ref{grade}) holds, so $|\theta _{i}|\leq\rho ^{\lambda }$ for $i=1,\dots ,n$. Now let us assume to the contrary that $f$ is reducible, so by the celebrated Gauss' Lemma there exist two polynomials $g,h\in K[X,Y]$ with $\deg _{Y} g=m\geq 1$, $\deg _{Y} h=n-m\geq 1$ such that $f=g\cdot h$. Without loss of generality we may further assume that \[ g(X,Y)=b_{m}(X)(Y-\theta _{1})\cdots (Y-\theta _{m})\ \ \mbox{{\rm and}}\ \ h(X,Y)=\frac{a_{n}(X)}{b_{m}(X)}(Y-\theta _{m+1})\cdots (Y-\theta _{n}), \] for some divisor $b_{m}(X)$ of $a_{n}(X)$. Since we have $f(X,a(X))=g(X,a(X))h(X,a(X))$ and $f(X,b(X))=g(X,b(X))h(X,b(X))$, and also \begin{eqnarray*} \frac{\partial{f}}{\partial{Y}}(X,a(X)) & = & \frac{\partial{g}}{\partial{Y}}(X,a(X))h(X,a(X))+g(X,a(X))\frac{\partial{h}}{\partial{Y}}(X,a(X)),\\ \frac{\partial{f}}{\partial{Y}}(X,b(X)) & = & \frac{\partial{g}}{\partial{Y}}(X,b(X))h(X,b(X))+g(X,b(X))\frac{\partial{h}}{\partial{Y}}(X,b(X)), \end{eqnarray*} we see that $g(X,a(X))$ is a divisor $d_{1}$ of $f(X,a(X))$, and $g(X,b(X))$ is a divisor $d_2$ of $f(X,b(X))$ that must also satisfy the following divisibility conditions \begin{eqnarray*} \gcd \left( d_1,\frac{f(X,a(X))}{d_1}\right) & \mid & \gcd \left( f(X,a(X)),\frac{\partial f}{\partial Y}(X,a(X))\right) \ \mbox{\rm and}\\ \gcd \left( d_2,\frac{f(X,b(X))}{d_2}\right) & \mid & \gcd \left( f(X,b(X)),\frac{\partial f}{\partial Y}(X,b(X))\right) . \end{eqnarray*} Recalling condition (\ref{adm2var}), we see that $g(X,a(X))$ is actually an admissible divisor $d_{1}$ of $f(X,a(X))$, and $g(X,b(X))$ is an admissible divisor $d_2$ of $f(X,b(X))$. Similarly, $h(X,a(X))$ is an admissible divisor $d_{1}'$ of $f(X,a(X))$, and $h(X,b(X))$ is an admissible divisor $d_2'$ of $f(X,b(X))$. Therefore we have \[ \frac{g(X,b(X))}{g(X,a(X))}=\frac{d_2(X)}{d_1(X)}\ \mbox{\rm and}\ \frac{h(X,b(X))}{h(X,a(X))}=\frac{d'_2(X)}{d'_1(X)} \] with $d_1,d'_{1}\in D_{ad}(f(X,a(X)))$ and $d_2,d'_2\in D_{ad}(f(X,b(X)))$. Now, since \[ \frac{d_2(X)}{d_1(X)}\cdot \frac{d'_2(X)}{d'_1(X)}=\frac{f(X,b(X))}{f(X,a(X))}, \] by applying $|\cdot |$, we see that one of the quotients $\frac{|d_2(X)|}{|d_1(X)|}$ and $\frac{|d'_2(X)|}{|d'_1(X)|}$, say $\frac{|d_2(X)|}{|d_1(X)|}$, must be less than or equal to $\sqrt{\frac{|f(X,b(X))|}{|f(X,a(X))|}}$. In particular, we have \begin{equation}\label{qmultiv} \frac{|g(X,b(X))|}{|g(X,a(X))|}\leq \rho ^{q}. \end{equation} We notice now that $q\geq 0$ because $\Delta \geq 0$ and $d_{1}=1$, $d_{2}=1$ is obviously a pair of divisors of $f(X,a(X))$ and $f(X,b(X))$, respectively, so that $0=\deg 1-\deg 1$ is a possible candidate for $q$. Next, we observe that we may write \[ \frac{g(X,b(X))}{g(X,a(X))}=\frac{b(X)-\theta_1}{a(X)-\theta_1}\cdots \frac{b(X)-\theta_m}{a(X)-\theta_m}, \] so in view of (\ref{qmultiv}) for at least one index $i\in \{ 1,\dots ,m\} $ we must have \begin{equation}\label{radicalmultiv} \frac{|b(X)-\theta_i|}{|a(X)-\theta_i|}\leq \rho ^{\frac{q}{m}}. \end{equation} On the other hand, since our absolute value also satisfies the triangle inequality, we see that \[ \frac{|b(X)-\theta_i|}{|a(X)-\theta_i|}\geq \frac{|b(X)|-|\theta_i|}{|a(X)|+|\theta_i|} \geq \frac{|b(X)|-\rho ^{\lambda }}{|a(X)|+\rho ^{\lambda }} =\frac{\rho ^{\deg b(X)}-\rho ^{\lambda }}{\rho ^{\deg a(X)}+\rho ^{\lambda }}. \] We will now prove that for a sufficiently large $\rho $ one has \[ \frac{\rho ^{\deg b(X)}-\rho ^{\lambda }}{\rho ^{\deg a(X)}+\rho ^{\lambda }}> \rho ^{q}\geq \rho ^{\frac{q}{m}}, \] and this will contradict (\ref{radicalmultiv}). The inequality $\rho ^{q}\geq \rho ^{\frac{q}{m}}$ obviously holds for an arbitrary $\rho >1$ since $q\geq 0$ and $m=\deg _{Y}g\geq 1$. Finally, all that remains to see is that the first inequality is equivalent to \[ \rho ^{\deg b(X)}>\rho ^{q+\deg a(X)}+\rho ^{q+\lambda }+\rho ^{\lambda }, \] which will obviously hold for a sufficiently large $\rho $, since according to our assumption on the magnitude of $\deg b(X)$ we have $\deg b(X)>\max \{ q+\deg a(X), q+\lambda ,\lambda \} $. Therefore $f$ must be irreducible over $K(X)$, and this completes the proof. \hfill $\square $ \medskip {\it Proof of Corollary \ref{coro6}} \ We may apply Theorem \ref{thm5} with $a(X)=0$ and $b(X)$ any non-constant polynomial (denoted here by $g(X)$) such that $f(X,b(X))$ is irreducible over $K$. To see this, we first observe that $f(X,a(X))=f(X,0)=a_0\neq 0$ and since $f(X,b(X))$ is irreducible, we also have $f(X,b(X))\neq 0$. Next, the inequality $\deg a_n\geq \max \{ \deg a_0,\dots ,\deg a_{n-1} \} $ shows that \begin{equation}\label{diferenta} \deg f(X,b(X))=n\deg b+\deg a_n>\deg a_0=\deg f(X,a(X)), \end{equation} so the condition $\Delta \geq 0$ is also satisfied. It remains to prove that in this case we have $q=0$. To prove this equality, we note that any divisor $d_{2}$ of the irreducible polynomial $f(X,b(X))$ either has degree $0$ or has degree $n\deg b+\deg a_n$, so $\deg d_2-\deg d_1$ in the definition of $q$ is equal either to $-\deg d_1$, which is at most $0$, or to $n\deg b+\deg a_n-\deg d_1$, which exceeds $\Delta $, in view of inequality (\ref{diferenta}). Therefore our condition $\deg b(X)>\max \{ \deg a(X),\max \limits_{0\leq i\leq n-1 } \frac{\deg a_{i}-\deg a_{n}}{n-i} \}+q$ reduces in this case to $\deg b(X)>0$. \hfill $\square $ \medskip We mention that in analogy to the univariate case, when testing the irreducibility of $f(X,Y)$ in terms of two of its values $f(X,a(X))$ and $f(X,b(X))$, we don't necessarily need to impose conditions on both partial derivatives $\frac{\partial f}{\partial Y}(X,a(X))$ and $\frac{\partial f}{\partial Y}(X,b(X))$. However, we will only state here a result for the case that $f(X,a(X))$ and $\frac{\partial f}{\partial Y}(X,a(X))$ are relatively prime, and $f(X,b(X))$ and $\frac{\partial f}{\partial Y}(X,b(X))$ are also relatively prime. \begin{theorem}\label{thm7} Let $K$ be a field, $f(X,Y)=a_{0}(X)+a_{1}(X)Y+\cdots +a_{n}(X)Y^{n}\in K[X,Y]$, with $a_{0},\dots ,a_{n}\in K[X]$, $a_{0}a_{n}\neq 0$. Assume that for two polynomials $a(X),b(X)\in K[X]$ we have $f(X,a(X))f(X,b(X))\neq 0$ and $\Delta:=\frac{1}{2}\cdot (\deg f(X,b(X))-\deg f(X,a(X)))\geq 0$, and let \[ q_{u}=\max \{ \deg d_{2}-\deg d_{1}\leq \Delta :d_{1}\in \mathcal{D}_u(f(X,a(X))),d_{2}\in \mathcal{D}_u(f(X,b(X))) \}. \] If $\gcd(f(X,a(X)), \frac{\partial f}{\partial Y}(X,a(X)))=1$, $\gcd(f(X,b(X)), \frac{\partial f}{\partial Y}(X,b(X)))=1$ and \[ \deg b(X)>\max \left\{ \deg a(X),\max \limits_{0\leq i\leq n-1 }\frac{\deg a_{i}-\deg a_{n}}{n-i} \right\} +q_{u}, \] then $f(X,Y)$ is irreducible over $K(X)$. \end{theorem} \begin{proof} \ Here, with the same notations as in the proof of Theorem \ref{thm5}, we see that $d_{1}$ and $d_1'$ must belong to $\mathcal{D}_u(f(X,a(X)))$, while $d_{2}$ and $d_2'$ must belong to $\mathcal{D}_u(f(X,b(X)))$. We notice here that even if the defining set for $q_{u}$ is in this case smaller than the one for $q$ in Theorem \ref{thm5}, we will still have $q_{u}\geq 0$, since $1$ belongs to both $\mathcal{D}_u(f(X,a(X)))$ and $\mathcal{D}_u(f(X,b(X)))$. The rest of the proof is identical to that of Theorem \ref{thm5}, and will be omitted. \end{proof} In particular, we obtain as a special case the following irreducibility criterion that complements Corollary \ref{coro6}, by allowing $f(X,g(X))$ to be a power of an irreducible polynomial, instead of an irreducible polynomial. \begin{corollary}\label{coro8} Let $K$ be a field, $f(X,Y)=a_{0}(X)+a_{1}(X)Y+\cdots +a_{n}(X)Y^{n}\in K[X,Y]$, with $a_{0},a_{1},\dots ,a_{n}\in K[X]$, $a_0a_n\neq 0$ and \[ \deg a_{n} \geq\max \{ \deg a_{0},\deg a_{1},\dots ,\deg a_{n-1}\} . \] If for a non-constant polynomial $g(X)\in K[X]$, the polynomial $f(X,g(X))$ is a power of an irreducible polynomial over $K$, and $f(X,g(X))$ and $\frac{\partial f}{\partial Y}(X,g(X))$ are relatively prime, then $f(X,Y)$ is irreducible over $K(X)$. \end{corollary} \begin{proof} \ Here we may apply Theorem \ref{thm7} with $a(X)=0$, and $b(X)$ any non-constant polynomial (denoted here by $g(X)$) such that $f(X,b(X))=h(X)^{k}$ with $k\geq 1$ and $h\in K[X]$, $h$ irreducible over $K$. Indeed, in this case $f(X,a(X))f(X,b(X))\neq 0$, and the fact that $\Delta \geq 0$ follows again by (\ref{diferenta}). It remains to prove that we must have $q_{u}=0$. Any unitary divisor $d_{1}$ of $f(X,a(X))=a_{0}$ is of degree at most $\deg a_0$, and any divisor $d_{2}$ of $h(X)^{k}$ which is relatively prime to $\frac{h(X)^{k}}{d_{2}}$ either has degree $0$ or has degree $k\deg h=n\deg b+\deg a_n$, so $\deg d_2-\deg d_1$ in the definition of $q_u$ is equal either to $-\deg d_1$, which is at most $0$, or to $n\deg b+\deg a_n-\deg d_1$, which exceeds $\Delta $, according to (\ref{diferenta}). Therefore our condition $\deg b(X)>\max \{ \deg a(X),\max \limits_{0\leq i\leq n-1 } \frac{\deg a_{i}-\deg a_{n}}{n-i} \} $+$q_{u}$ reduces here to $\deg b(X)>0$ too. \end{proof} \section{Examples} \label{se5} {\bf 1)\ } For any fixed, arbitrarily chosen integers $a_{1},\dots ,a_{n-1}$ and $k\geq 0$, the polynomial \[ f(X)=p^{k}+a_{1}X+\cdots +a_{n-1}X^{n-1}+(p^{k+1}-p^{k}-a_{1}-\dots -a_{n-1})X^{n} \] is irreducible over $\mathbb{Q}$ for all but finitely many prime numbers $p$. To prove this, we note that $f(0)=p^{k}$ and $f(1)=p^{k+1}$, so we may apply Corollary \ref{coro1main} i) with $a=0, \ b=1$, provided that \[ |p^{k+1}-p^{k}-a_{1}-\dots -a_{n-1}|>2^{n}p^{k}+\sum\limits_{i=1}^{n-1}2^{n-i}|a_{i}|, \] and this will obviously hold for sufficiently large prime numbers $p$. To see an explicit example where a lower bound for $p$ can be easily derived, one can take $a_{1}=\dots =a_{n-1}=1$ and $k\geq 1$ to conclude that the polynomial \[ f(X)=(p^{k+1}-p^{k}-n+1)X^{n}+X^{n-1}+\cdots +X+p^{k} \] is irreducible over $\mathbb{Q}$ for all primes $p\geq 2^{n}+3$. Indeed, the condition \[ |a_n|=p^{k+1}-p^{k}-n+1>2^{n}-2+2^{n}p^{k}=\sum\limits_{i=0}^{n-1}2^{n-i}|a_i| \] will obviously hold for $p\geq 2^{n}+3$. \smallskip {\bf 2)\ } For any integers $k\geq 1$, $n\geq 1$, and any prime numbers $p$, $r$ with $p>r\geq 2^{n}+1$, the polynomial $f(X)=\bigl(p^{k}(r+1)+n-1\bigr)X^{n}-X^{n-1}-\cdots -X-p^{k}$ is irreducible over $\mathbb{Q}$. Here we observe that $|f(0)|=p^{k}$, $f(1)=p^{k}r$, and \[ |a_n|=p^{k}(r+1)+n-1>2^{n}-2+2^{n}p^{k}=\sum\limits_{i=0}^{n-1}2^{n-i}|a_i| \] for $p>r\geq 2^{n}+1$. The conclusion follows by Corollary \ref{coro1main} ii) with $a=0$ and $b=1$. \smallskip {\bf 3)\ } For any integers $n\geq 1$ and $m>2^{n+1}-2$ such that $(m+1)\cdot 2^{n}-1$ is a prime number, the polynomial $f(X)=1+X+\cdots +X^{n-1}+mX^{n}$ is irreducible over $\mathbb{Q}$. To see this, we note that $f(2)=(m+1)\cdot 2^{n}-1$, which is a prime number, and since the inequality $m>2^{n+1}-2$ is precisely the condition $|a_n|>2|a_{n-1}|+2^2|a_{n-2}|+\cdots +2^n|a_0|$ applied to the coefficients of $f$, the conclusion follows by Corollary \ref{coro2}. \smallskip {\bf 4)\ } Let $f(X)=254X^6-4X^5+X^4-X^3-X^2-3$. We observe that $f(2)=127^{2}$, which is a prime power, and $f'(2)=48464$, which is not divisible by $127$. Then, since $a_6$ satisfies $|a_6|=254>228=\sum\limits_{i=0}^{5}2^{6-i}|a_i|$, we see from Corollary \ref{corovechi} that $f$ too is irreducible over $\mathbb{Q}$. \smallskip {\bf 5)\ } Let $p$ be a prime number and let \[ f(X,Y)=p+(p-1)XY+(p^{2}X+p+1)Y^{2}+pXY^{3}+X^{2}Y^{4}. \] We observe that if we write $f$ as a polynomial in $Y$ with coefficients in $\mathbb{Z}[X]$ as $f=\sum\limits_{i=0}^{4}a_{i}(X)Y^{i}$ with $a_{i}(X)\in \mathbb{Z}[X]$, we have $\deg a_{4}>\max_{0\leq i\leq 3} \{ \deg a_{i} \} $. On the other hand, we note that \[ f(X,X)=p+2pX^{2}+p^{2}X^{3}+pX^{4}+X^{6}, \] which is Eisensteinian with respect to the prime $p$, and hence irreducible over $\mathbb{Q}$, so one may apply Corollary \ref{coro6} with $g(X)=X$ to conclude that $f$ is irreducible over $\mathbb{Q}$. \smallskip {\bf 6)\ } Let $p$ be a prime number and let \[ f(X,Y)=p^{2}+(2p^{3}+p^{4}X)Y+(2pX+2p^{2}X^{2})Y^{2}+X^{2}Y^{4}. \] If we write $f$ as $f=\sum\limits_{i=0}^{4}a_{i}(X)Y^{i}$ with $a_{i}(X)\in \mathbb{Z}[X]$, we have $\deg a_{4}\geq\max_{0\leq i\leq 3} \{ \deg a_{i} \} $. We observe next that $f(X,X)=(p+p^{2}X+X^{3})^{2}$, with $p+p^{2}X+X^{3}$ irreducible over $\mathbb{Q}$, being Eisensteinian with respect to $p$. Since \[ \frac{\partial f}{\partial Y}(X,X)=2p^{3}+p^{4}X+4pX^{2}+4p^{2}X^{3}+4X^{5}, \] we have \[ \frac{\partial f}{\partial Y}(X,X)=4X^{2}(p+p^{2}X+X^{3})+2p^{3}+p^{4}X, \] so $\frac{\partial f}{\partial Y}(X,X)$ is not divisible by $p+p^{2}X+X^{3}$, which shows that $f(X,X)$ and $\frac{\partial f}{\partial Y}(X,X)$ are relatively prime. We may therefore apply Corollary \ref{coro8} with $g(X)=X$ to conclude that $f$ is irreducible over $\mathbb{Q}$. \medskip {\bf Acknowledgements} \ This work was partially done in the frame of the GDRI ECO-Math. The authors are grateful to C.M. Bonciocat for useful discussions and suggestions that improved the presentation of the paper.
\section{Influence of Expert Number} We investigate the impact of expert number on GraphDIVE. To be more specific, we experiment with two to eight experts. The results on single-task datasets are shown in Figure \ref{fig:sensi}. From the figure, it can be found that GraphDIVE outperforms baseline methods at most of the time, meaning that the expert numbers can be selected in a wide range. Besides, the performance improves with the increased number of experts at first, which demonstrates that more experts increase the model capacity. With the number of experts increasing, the experts which dominate the classification of minority class are more likely to generate unbiased predictions. For example, when the number of experts are less than eight, the performance of GraphDIVE-GCN increases monotonously with the number of experts increasing on BBBP dataset. Nevertheless, too many experts will inevitably introduce redundant parameters to the model, leading to over-fitting as well. \section{Complexity Comparison} In Table \ref{tbl:test_time}, we report the clock time of different methods on test set. For GraphDIVE, we employ GCN as a feature extractor and assign three experts on all datasets. It can be seen that GraphDIVE only introduces marginal computation complexity compared with GCN. \begin{table}[h] \centering \caption{Complexity comparison between GraphDIVE and other GNNs. Test time (millisecond) are reported.} \begin{tabular}{lcccc} \toprule & BACE & BBBP & HIV & SIDER-3 \\ \midrule GCN & 55.16 & 89.96 & 1248.01 & 54.98 \\ GIN & 41.81 & 59.01 & 1019.72 & 40.95 \\ GCN+FLAG & 86.76 & 90.22 & 1427.95 & 65.67 \\ GIN+FLAG & 60.56 & 83.07 & 1224.01 & 60.63 \\ GSN & 621.62 & 824.41 & 16100.56 & 640.24 \\ \midrule GraphDIVE & 61.12 & 93.92 & 1267.65 & 64.78 \\ \bottomrule \end{tabular} \label{tbl:test_time} \end{table} \section{Experiments on multi-class Text Classification} In order to further verify that GraphDIVE is general for other imbalanced graph classification applications, we conduct experiments on text classification, which is an imbalanced multi-class graph classification task. Figure \ref{fig:text-dist} shows the class distribution of the widely used text classification datasets. It can be seen that these datasets have a long-tailed label distribution. \citet{yao2019graph} create a corpus-level graph which treats both documents and words as nodes in a graph. They calculate point-wise mutual information as word-word edge weights and use normalized TF-IDF scores as word-document edge weights. TextLevelGCN \cite{huang2019text} produces a text level graph for each input text, and transforms text classification into graph classification task. TextLevelGCN fulfils the inductive learning of new words and achieves state-of-the-art results. \begin{figure} \centering \begin{subfigure}[t]{0.48\linewidth} \centering \includegraphics[width=\linewidth]{figs/bace_experts.pdf} % \caption{\small \textbf{BACE}} \label{fig:bace} \end{subfigure} \hfill \begin{subfigure}[t]{0.48\linewidth} \centering \includegraphics[width=\linewidth]{figs/bbbp_experts.pdf} % \caption{\small \textbf{BBBP}} \label{fig:bbbp} \end{subfigure} \vskip\baselineskip \begin{subfigure}[t]{0.48\linewidth} \centering \includegraphics[width=\linewidth]{figs/hiv_experts.pdf} % \caption{\small \textbf{HIV}} \label{fig:hiv} \end{subfigure} \hfill \begin{subfigure}[t]{0.48\linewidth} \centering \includegraphics[width=\linewidth]{figs/sider_experts.pdf} % \caption{\small \textbf{SIDER-3}} \label{fig:sider3} \end{subfigure} \caption{Mean ROC-AUC vs number of experts on four datasets: (a)BACE, (b)BBBP, (c)HIV, (d)SIDER-3} \label{fig:sensi} \end{figure} \begin{table}[h] \centering \footnotesize \caption{\label{acc-table} Accuracy on text classification datasets. We run all models 10 times and report mean results. } \scalebox{1}{ \begin{tabular}{cccc} \toprule \textbf{Model} & \textbf{R8} & \textbf{R52} & \textbf{Ohsumed} \\ \midrule CNN & 95.7 $\pm$ {0.5} & 87.6 $\pm$ {0.5} & 58.4 $\pm$ {1.0} \\ LSTM & 96.1 $\pm$ {0.2} & 90.5 $\pm$ {0.8} & 51.1 $\pm$ {1.5} \\ Bi-LSTM & 96.3 $\pm$ {0.3} & 90.5 $\pm$ {0.9} & 49.3 $\pm$ {1.0} \\ fastText & 96.1 $\pm$ {0.2} & 92.8 $\pm$ {0.1} & 57.7 $\pm$ {0.5} \\ Text-GCN & 97.0 $\pm$ {0.1} & 93.7 $\pm$ {0.1} & 67.7 $\pm$ {0.3} \\ TextLevelGCN & {97.67} $\pm$ {0.2} & {94.05} $\pm$ {0.4} & {68.59} $\pm$ {0.7} \\ GraphDIVE & \textbf{97.91} $\pm$ \textbf{0.2} & \textbf{94.31} $\pm$ \textbf{0.3} & \textbf{69.27} $\pm$ \textbf{0.6} \\ \bottomrule \end{tabular} } \label{tbl:text} \end{table} \begin{figure*} \centering \begin{subfigure}[t]{.32\linewidth} \centering \includegraphics[width=\linewidth]{figs/r8.pdf} % \caption{\small \textbf{R8}} \label{fig:r8} \end{subfigure} \hfill \begin{subfigure}[t]{.32\linewidth} \centering \includegraphics[width=\linewidth]{figs/r52.pdf} % \caption{\small \textbf{R52}} \label{fig:r52} \end{subfigure} \hfill \begin{subfigure}[t]{.32\linewidth} \centering \includegraphics[width=\linewidth]{figs/oh.pdf} % \caption{\small \textbf{Oh}} \label{fig:oh} \end{subfigure} \hfill \caption{An illustration of histograms on training class distributions for the datasets used in text-level graph classification experiment.} \label{fig:text-dist} \end{figure*} Hence, we use TextLevelGCN\footnote{\url{https://github.com/mojave-pku/TextLevelGCN}} \cite{huang2019text} as a feature extractor and closely follow the experimental settings as \citet{huang2019text}. From Table \ref{tbl:text}, we can see that GraphDIVE achieves better results across different datasets. This result indicates that GraphDIVE is not only applicable to molecular graphs, but also is beneficial to the imbalanced multi-class graph classification in text domain. \section{Introduction} \label{Introduction} Graph classification aims to identify class labels of graphs in a dataset, which is a critical and challenging problem for a broad range of real-world applications \cite{huang2016learning,fey2018splinecnn,zhang2019inductive,jia2020graphsleepnet}. For instance, in chemistry, a molecule could be represented as a graph, where nodes denote atoms, and edges represent chemical bonds. Correspondingly, the classification of molecular graphs can help predict target molecular properties \cite{ogb_2020_nips}. As a powerful approach to graph representation learning, Graph Neural Network (GNN) models have achieved outstanding performance in graph classification \cite{ying2018hierarchical,xu2018gin,pmlr-v119-wang20m,corso2020principal}. Most of existing GNN models first transform nodes into low-dimensional dense embeddings to learn discriminative graph attributive and structural features, and then summarize all node embeddings to obtain a global representation of the graph. Finally, Multi-Layer Perceptrons (MLPs) are used to facilitate end-to-end training. Nevertheless, current GNN models largely overlook the important setting of imbalanced class distribution, which is ubiquitous in practical graph classification scenarios. For example, in OGBG-MOLHIV dataset \cite{ogb_2020_nips}, only about 3.5\% of molecules can inhibit HIV virus replication. Figure \ref{fig:accloss} presents graph classification results of GCN \cite{gcn} and GIN \cite{xu2018gin} on this dataset. Considering either test accuracy or cross-entropy loss, the classification performance of minority class falls far behind that of majority class, which indicates the necessity of boosting GNN from the perspective of imbalanced learning. \begin{figure} \centering \begin{subfigure}[t]{.45\linewidth} \centering \includegraphics[height=2.5cm]{figs/hiv_acc.pdf} % \caption{\small \textbf{ Accuracy}} \label{fig:single} \end{subfigure} \hfill \begin{subfigure}[t]{.45\linewidth} \centering \includegraphics[height=2.5cm]{figs/hiv_loss.pdf} % \caption{\small \textbf{ Cross-entropy loss}} \label{fig:single} \end{subfigure} \hfill \caption{Test accuracy and cross-entropy loss on OGBG-HIV dataset.} \label{fig:accloss} \end{figure} However, apart from suffering the well-known learning bias towards majority classes \cite{sun2009classification,he2009learning,kang2019decoupling}, the class-imbalanced learning problem is exacerbated on graph classification due to the following reasons: (\textit I) \emph{structure diversity}; (\textit {II}) \emph{poor applicability in multi-task classification setting}. First, structure diversity and the related out-of-distribution problem is very ubiquitous in real-world graph datasets \cite{hu2019strategies}. For example, when scientists want to forecast COVID-19 property, it will be difficult because COVID-19 is different from all known virus. This means typical imbalanced learning methods, such as re-sampling \cite{chawla2002smote} and re-weighting \cite{huang2016learning}, may no longer work on graph datasets. Because of the potential over-fitting to minority classes, these imbalanced strategies are sensitive to fluctuations of minor classes, resulting in unstable performance. Second, in more common cases, such as drug discovery \cite{ogb_2020_nips,becigneul2020optimal,pan2015joint} and functional brain analysis \cite{pan2016task}, graph datasets contain multiple classification tasks due to need for predicting various properties of a graph simultaneously. For example, Tox21 Challenge\footnote{\url{https://tripod.nih.gov/tox21/challenge/}} aims to predict whether certain chemical compounds are active for twelve pathway assays, which can be viewed as twelve-task binary classification setting. Existing imbalanced learning methods are originally designed for single-task classification. Therefore, it is difficult to apply existing imbalanced learning strategies \cite{chawla2002smote,kang2019decoupling,kim2020m2m} to multi-task setting. To this end, we propose a novel imbalanced \underline{Graph} classification framework with \underline{DIV}erse \underline{E}xperts, referred to as GraphDIVE for brevity. At first, we leverage a gating network to capture the semantic structure of the dataset. As illustrated in Figure \ref{fig:divide}, the semantically similar graphs are grouped into the same subset. Then, multiple classifiers, which are referred to as experts, are trained based on their corresponding subsets. Due to the difference in semantic structure, samples of majority class and minority class tend to be concentrated in different subsets. Obviously, for the subset containing most of the minority class (please refer to Subset 2 in Figure \ref{fig:divide}), the imbalance phenomenon is alleviated. As a result, the performance of minority class get promoted. We systematically study the effect of GraphDIVE on public benchmarks and obtain the following key observations: (\textit I) existing imbalanced learning strategies are difficult to offer satisfactory improvement on graph datasets because of the graph diversity problem, (\textit {II}) the performance of existing GNNs on graph classification can be further improved by appropriately modeling the imbalanced distribution, (\textit {III}) capturing semantic structure of datasets can address the structure diversity problem and alleviate the bias towards majority classes, (\textit {IV}) different gates are generally necessary for multi-task setting. Apart from these observations, GraphDIVE achieves state-of-the-art results in both single-task and multi-task settings. As an instance, on HIV and BACE benchmarks, GraphDIVE achieves improvements over GCN by 2.09\% and 4.24\%, respectively. \section{Related Work} \label{related_work} \subsection{Graph Neural Networks} Over the past few years, we have witnessed the fast development of graph neural networks. They process permutation-invariant graphs with variable sizes and learn to extract discriminative features through a recursive process of transforming and aggregating representations from neighbors. At first, GNNs were introduced by \cite{gori2005new} as a form of recurrent neural networks. Then, \citet{spec-not-general} define the convolutional operations using Fourier transformation and Laplacian matrix. GCN \cite{gcn} approximate the Fourier transformation process by truncating the Chebyshev polynomial to the first-order neighborhood. GraphSAGE \cite{sage} samples a fixed number of neighbors and employs several aggregation functions. GAT \cite{gat} aggregates information from neighbors by using attention mechanism. DR-GCN \cite{ijcai2020-398} applies class-conditioned adversarial network to alleviate bias in imbalanced node classification task. Recently, \citet{GCNII2020} try to tackle the over-smoothing problem by using initial residual and identity mapping. Apart from innovation on convolution filters, there are also two main branches in the research of graph classification. For one thing, Graph pooling methods, such as DiffPool \cite{ying2018hierarchical}, Graph U-nets \cite{gunet}, and self-attention pooling \cite{lee2019selfatt}, are developed to extract more global information. \citet{mesquita2020rethinking} take a step further in understanding the effect of local pooling methods. For another, there is recently a growing class of graph isomorphic methods \cite{xu2018gin,morris2019weisfeiler,corso2020principal} which aim to quantity representation power of GNNs. \begin{figure} \centering \centerline{\includegraphics[width=\linewidth]{figs/model.pdf}} \caption{Visual illustration of GraphDIVE, consisting of the gating network and expert network.} \label{fig:divide} \end{figure} \subsection{Class-imbalanced Learning} \textbf{Re-sampling.} Re-sampling methods aim to balance the class distribution by controlling each class's sample frequencies. It can be achieved by over-sampling or under-sampling \cite{chawla2002smote,han2005borderline,he2008adasyn}. Nevertheless, traditional random sampling methods usually cause over-fitting in minority classes or under-fitting in majority classes. Recently, \citet{kang2019decoupling} propose to use re-sampling strategy in a two-stage training scheme. Besides, \citet{liu2020deep}, \citet{kim2020m2m}, and \citet{chou2020remix} generate augmented samples to supplement minority classes, which can also be viewed as re-sampling methods. However, it is a non-trivial task to apply augmentation on graphs with variable sizes. These re-sampling methods are also unable to produce multiple predictions simultaneously in multi-task setting because different tasks are usually with different class distributions. \textbf{Re-weighting.} Re-weighting methods generally assign different weights to different samples. Traditional scheme re-weights classes proportionally to the inverse of the class frequency, which tends to make optimization difficult under extremely imbalanced settings \cite{huang2016learning,huang2019deep}. Another line of work assigns weights according to the properties of each training instance. FocalLoss \cite{focalloss} lowers the weights of the well-classified samples. GHM \cite{li2019gradient} improves FocalLoss by further lowering the weights of very large gradients considering outliers. However, these two kinds of methods need prerequisite of domain experts to hand-craft the loss function in specific task, which may restrict their applicability. Recently, \citet{cui2019class} introduce the effective number of samples to put larger weights on minority classes. \citet{tan2020equalization} propose an equalization loss function that randomly ignores gradients from majority classes. LDAM \cite{ldam} introduces a label-distribution-aware loss function that encourages larger margins for minority classes. Despite the simplicity in implementation, re-weighting methods do not consider the semantic structure of datasets. So, they may not handle the graph structure diversity problem, causing unstable predictions. \subsection{Mixture of Experts} Mixture of Experts (MoE) is mainly based on divide-and-conquer principle, in which the problem space is first divided and then is addressed by specialized experts \cite{expert91}. MoE has been explored by several researchers and has witnessed success in a wide range of applications \cite{tresp2001mixtures,collobert2002parallel,masoudnia2014mixture,eigen2013learning}. In recent years, there is a surge of interest of in incorporating MoE models to address challenging tasks in natural language processing and computer vision. \citet{shazeer2016outrageously} introduce a sparsely-gated MoE network, which improves the performance of machine translation and language modeling. \citet{shen2019mixture} evaluate the translation quality and diversity of MoE models. \citet{fedus2021switch} simplify the computational costs of MoE and make it possible to train models with trillion parameters. In computer vision, there are some frameworks \cite{ge2015subset,ge2016fine} which have demonstrated the effectiveness of MoE in fine-grained classification. Contrary to existing MoE methods which focus on increasing model capacity, we find MoE are surprisingly overlooked in graph machine learning and that MoE are especially appropriate for imbalanced graph classification task. We also propose two variants considering posterior and prior distributions for the gating function. There are also concurrent MoE works \cite{ma2018modeling,qin2020multitask,tang2020progressive} that involve multi-task learning. However, they do not consider the important and ubiquitous class-imbalance problem. \section{Proposed Method: GaphDIVE} The technical core of GraphDIVE is the notion to leverage the semantic structure of the graph dataset based on the node embedding distributions. This notion encourages the GNN to group the structurally different but property-similar graphs into the same subset. Then the minority classes are more likely to be classified correctly by certain experts. Our method is similar to traditional MoE \cite{expert91}, but with a distinct motivation for imbalanced graph classification. In the following, we first present preliminaries and then describe the algorithmic details of GraphDIVE. Finally, we present two model variants for multi-task setting. \subsection{Preliminaries} Let $D=\{(G_1, {Y}_1),\dots, (G_n, {Y}_n)\}$ denote training data, where $G_i=(A_i, X_i, E_i)$ denotes a graph containing adjacency matrix, node attribute matrix and edge attribute matrix respectively. $Y_i=(y_1, \dots, y_T)$ represents the labels of $G_i$ across $T$ tasks. The task of graph classification is to learn a mapping $f:\ G_i \rightarrow {Y_i}$. In this paper, we only consider the binary classification situation that exists widely in practical applications \cite{yanardag2015deep,ogb_2020_nips}. For the class-imbalanced problem, the number of instances of majority class is far more than that of minority class. \begin{figure*} \centering \begin{subfigure}[t]{.3\linewidth} \centering \includegraphics[height=5cm]{figs/1.pdf} % \caption{\small \textbf{ GraphDIVE for single task}} \label{fig:single} \end{subfigure} \hfill \begin{subfigure}[t]{.3\linewidth} \centering \includegraphics[height=5cm]{figs/2.pdf} % \caption{\small \textbf{ GraphDIVE with shared gates}} \label{fig:shared} \end{subfigure} \hfill \begin{subfigure}[t]{.35\linewidth} \centering \includegraphics[height=5cm]{figs/3.pdf} % \caption{\small \textbf{GraphDIVE with individual gates}} \label{fig:individual} \end{subfigure} \caption{\label{fig:model}\small Model variants in different settings. The latter two variants are designed for multi-task setting. The crossing of the dotted and solid lines of the same color indicates multiplication operation.} \vspace*{-4mm} \end{figure*} \subsection{Architecture} \label{method:arch} The ubiquitous class-imbalanced problem of graph datasets brings a huge challenge to existing GNNs because the classifier will inevitably produce a biased prediction towards majority classes \cite{sun2009classification,he2009learning,tde_2020_nips}. We conjecture that it might be too difficult for one classifier to discriminate all graphs. Inspired by Mixture of Experts (MoE) \cite{expert91}, we propose to assign different experts to different subsets. As illustrated in Figure \ref{fig:single}, GraphDIVE consists of the following components. \textbf{Feature extractor.} Similar to the practice in \citet{ogb_2020_nips}, we design a five-layer graph convolution network to extract graph features. Formally, at the $k$-th layer, the representation of the node $v$ is: \begin{eqnarray} & h_{v}^{(k)}= \operatorname{COMBINE}^{(k)}\left(h_{v}^{(k-1)}, m_{v}^{(k)}\right), \nonumber \\ & m_{v}^{(k)}= \text { AGGREGATE }^{(k)}\left(h_{v}^{(k-1)}, h_{u}^{(k-1)}, e_{u v}\right), \end{eqnarray} where $u \in \mathcal{N}(v)$ denotes the neighbors of node $v$, $h_{v}^{(k)}$ is the representation of $v$ at the $k$-th layer, $e_{uv}$ is the feature vector of the edge between $u$ and $v$, and $m_{v}^{(k)}$ is the message aggregated to node $v$. On top of the graph feature extractor, we summarize the global representation of a graph $G$ by using a graph average pooling layer (i.e., readout function): \begin{equation} \boldsymbol {x} = Pooling \left[GNN(G) \right], \end{equation} where $\boldsymbol {x}\in\mathbb{R}^{d}$, and $d$ denotes the hidden dimension of graph embedding. Notably, GraphDIVE is generic to the choice of underlying GNN. Without loss of generality, in this paper, we choose two commonly used methods GCN \cite{gcn} and GIN \cite{xu2018gin} as feature extractor. \textbf{Mixture of diverse experts.} Under the assumption that one classifier is difficult to learn the desired mapping in skewed distribution, we adopt a gating network to decompose the imbalanced graph dataset into several subsets. Then a diverse set of individual networks, referred to as experts, are trained for discriminating graphs in their corresponding subsets. This divide-and-conquer strategy makes the learning process easier for each expert, and thus alleviates the bias towards majority class. Formally, given a graph with global representation $\boldsymbol x$ and label $y$. We introduce a latent variable $z\in\{1, 2, \dots, M\}$, where $M$ represents the number of experts. In GraphDIVE, we decompose the likelihood $p(y|\boldsymbol x;\boldsymbol \Theta)$ as \begin{equation}\label{eq:margin} p(y|\boldsymbol x;\boldsymbol \Theta) = \sum_{z=1}^M p(y, z|\boldsymbol x;\boldsymbol \Theta) = \sum_{z=1}^M p(z|\boldsymbol x;\boldsymbol \Theta)p(y|z, \boldsymbol x;\boldsymbol \Theta), \end{equation} where $\boldsymbol \Theta=\{\boldsymbol {W}_g \in \mathbb{R}^{d\times M}, \boldsymbol {W}_e \in \mathbb{R}^{d\times 2}\}$ denotes learnable parameters of gating network and expert networks. $\sum_{z=1}^M p(z|\boldsymbol x;\boldsymbol \Theta) =1$, and $p(z|\boldsymbol x;\boldsymbol \Theta)$ is the output of the gating network, indicating the \emph{prior probability} to assign $\boldsymbol x$ to the $z$-th expert. $p(y|z,\boldsymbol x;\boldsymbol \Theta)$ represents output distribution of the $z$-th expert. For simplicity, we implement each expert with one linear projection layer followed by a sigmoid function: \begin{equation}\label{eq:expert} p(y|z, \boldsymbol x;\boldsymbol {\Theta}) = \sigma (\boldsymbol x \ \boldsymbol {W}_e). \end{equation} More specifically, the gating network generates an input-dependent soft partition of the dataset based on cosine similarity between graphs and gating prototypes: \begin{equation} p(z|\boldsymbol x;\boldsymbol \Theta) = softmax \Big( \frac{\boldsymbol x \ {\boldsymbol {W}_g^z}}{\tau} \Big), \end{equation} where $\tau$ is the temperature hyper-parameter tuning the distribution of $z$, and ${\boldsymbol {W}_g^z}$ is the $z$-th gating prototype. Since samples of minority class and majority class are usually different in semantics, they are likely to be grouped into different subsets. For the subset containing most of the minority class, the imbalanced problem phenomenon is much alleviated. Besides, unlike existing imbalanced learning strategies which suffer fluctuations in graph structure, GraphDIVE can also group structurally-different but semantically-similar graphs into same subsets. In other words, the semantic structure of the dataset is captured by gating network. Hence, the proposed method can alleviate the above-mentioned \emph{structure diversity} problem of graph datasets. \textbf{Prior or posterior distribution.} Apart from using prior probability in Eq. (\ref{eq:margin}), we also consider a model variant using posterior probability as expert weights. According to Bayes' theorem, posterior probability can be calculated as: \begin{equation}\label{eq:posterior} p(z|\boldsymbol x, y;\boldsymbol \Theta) = \frac{p(z|\boldsymbol x;\boldsymbol \Theta)p(y|z,\boldsymbol x;\boldsymbol \Theta)}{\sum_{z'}p(z'|\boldsymbol x;\boldsymbol \Theta)p(y|z',\boldsymbol x;\boldsymbol \Theta)}. \end{equation} As opposed to prior distribution which considers only graph features, this Bayesian extension considers the information from both graph labels and experts. For the convenience of expression, We refer to these two model variants as GraphDIVE-pri and GraphDIVE-post. \subsection{Optimization} \label{subsec:optimization} We first present the optimization regime of Bayesian variant. Since the training objective is to maximize the log-likelihood, the loss function can be formulated as following: \begin{align}\label{eq:exp} \mathcal{L}_{post}= -\sum_{z=1}^M & p(z|\boldsymbol x, y;\boldsymbol \Theta) \log p(y|\boldsymbol x,z;\boldsymbol \Theta) \end{align} Noticing the interdependence between posterior distribution and prediction distribution from experts, we propose to use EM algorithm \cite{em1977} to optimize Eq. (\ref{eq:posterior}) and Eq. (\ref{eq:exp}) iteratively: \textbf{E-step:} estimate the weight $p(z|\boldsymbol x, y)$ for each expert according Eq. (\ref{eq:posterior}) under current value of parameters $\boldsymbol \Theta$. \textbf{M-step:} update parameters $\boldsymbol \Theta$ using stochastic gradient descent algorithm, and the gradient $\nabla \log p(y, z|\boldsymbol x)$ is weighted by the estimated $p(z|\boldsymbol x, y)$. The gradients are blocked in the computation of posterior distribution. What is more, similar to the practice in \citet{hasanzadeh2020bayesian}, we introduce a Kullback--Leibler (KL) divergence regularization term $\mathrm{KL}(p(z|\boldsymbol x, y)||p(z|\boldsymbol x;\boldsymbol \Theta))$ into the final loss function: \begin{align}\label{eq:loss} \begin{split} \mathcal{L}_{post}= -\sum_{z=1}^M & p(z|\boldsymbol x, y;\boldsymbol \Theta) \log p(y|\boldsymbol x,z; \boldsymbol \Theta) \\ &+ \lambda * \mathrm{KL}(p(z|\boldsymbol x, y;\boldsymbol \Theta)||p(z|\boldsymbol x;\boldsymbol \Theta)), \end{split} \end{align} where $\lambda$ is a hyper-parameter which controls the extent of regularization. The above KL term ensures the posterior distribution does not deviate too far from the prior distribution. So we choose to compute gradients in M-step based on Eq. (\ref{eq:loss}). For the optimization of GraphDIVE-pri, the posterior distribution $p(z|x_i, y_i;\boldsymbol \Theta)$ in Eq. (\ref{eq:loss}) is replaced with prior distribution $p(z|x_i;\boldsymbol \Theta)$. And regularization item becomes zero. In this case, the gating network and the expert network can be jointly optimized according to the following objective: \begin{equation} \mathcal{L}_{pri}= -\sum_{z=1}^M p(z|\boldsymbol x;\boldsymbol \Theta) \log p(y|\boldsymbol x, z; \boldsymbol \Theta). \end{equation} In experiment, we find both variants fit graph data well and demonstrate superior generalization ability. And detailed comparison can be found in Section \ref{exp:comp}. \subsection{Adaptation to multi-task scenario} \label{method:multi} In real-life applications, researchers are likely to be confronted with imbalanced graph classification in multi-task setting. Multi-task setting increases the difficulty of imbalanced learning as one graph might be of the majority class for some tasks while being of minority class for the other tasks. Existing imbalanced learning methods are originally designed for single-task classification, so it is a non-trivial task to adapt them for multi-task setting. In this paper, we consider two options for multi-task scenario, which are illustrated in Figure \ref{fig:shared} and Figure \ref{fig:individual}. \textit{Option I: Shared gates.} This is the simplest adaptation variant, which uses shared gating weights for different tasks (see Figure \ref{fig:shared}). Compared with the model in Figure \ref{fig:single}, the only difference is that each expert generates predictions for different tasks. This variant has the advantage that it reduces model parameters, especially in settings with many experts. However, empirically this variant does not work well in our setting. Our reasoning is that it implicitly assumes training instances obey the same label distributions across all tasks. \textit{Option II: Individual gates.} Another natural option is to assign different groups of gating weights for different tasks, as illustrated in \ref{fig:individual}. Compared to the \emph{shared gates} solution, this variant has several additional gating networks. Notably, it models task relationships in a sophisticated way. For two less related tasks, the sharing expert weights will be penalized, resulting in different expert weights instead. \section{Theoretical Analysis} In this section, theoretical analysis is provided from variational inference perspective to help understand why GraphDive works. Assuming that an observed graph $\boldsymbol x$ is related to a latent variable $z=\{1, 2, \dots, M\}$, and $p(z|\boldsymbol x)$ denotes the probability of $\boldsymbol x$ locating in the $z$-th sub-region of feature space. Let $q(z|\boldsymbol x, y)$ denote a variational distribution to infer latent variable given observed data, and $p(y|\boldsymbol x, z;\boldsymbol \Theta)$ denotes the distribution of the prediction of each expert. As for the KL regularization term, we consider the simple case of $\lambda=1$. Then we prove the following theorem. {\theorem \label{main_theorem} In GraphDIVE, optimizing the final loss is equivalent to the optimization of the lower bound of $\log p(y|\boldsymbol x)$: \begin{align}\label{main_eq} \begin{split} \log p(y|\boldsymbol x;\boldsymbol\Theta)& \ge \mathbb{E}_{q(z|\boldsymbol x, y)}\log p(y|\boldsymbol x, z;\boldsymbol\Theta) \\ &- \mathrm {KL}(q(z|\boldsymbol x, y)||p(z|\boldsymbol x;\boldsymbol\Theta)) \end{split} \end{align}} {\proof \begin{align*} \begin{split} &\quad\ \mathrm {KL}(q(z|\boldsymbol x, y)||p(z|\boldsymbol x, y;\boldsymbol\Theta))\\ &=\mathbb{E}_{q(z|\boldsymbol x, y)}\log \frac{q(z|\boldsymbol x, y)}{p(z|\boldsymbol x, y;\boldsymbol\Theta)}\\ &=\mathbb{E}_{q(z|\boldsymbol x, y)}\log \frac{q(z|\boldsymbol x, y)p(y|\boldsymbol x;\boldsymbol\Theta)}{p(z, y|\boldsymbol x;\boldsymbol \Theta)}\\ &=\log p(y|\boldsymbol x;\boldsymbol\Theta) + \mathbb{E}_{q(z|\boldsymbol x, y)}\log \frac{q(z|\boldsymbol x, y)}{p(y|\boldsymbol x, z;\boldsymbol\Theta)p(z|\boldsymbol x;\boldsymbol\Theta)}\\ &=\log p(y|\boldsymbol x) - \mathbb{E}_{q(z|\boldsymbol x, y)}\log p(y|\boldsymbol x, z;\boldsymbol\Theta) \\ &\quad+ \mathrm {KL}(q(z|\boldsymbol x, y)||p(z|\boldsymbol x;\boldsymbol\Theta) \end{split} \end{align*} Notice that $\mathrm {KL}(q(z|\boldsymbol x, y)||p(z|\boldsymbol x, y;\boldsymbol\Theta)) \ge 0$, which concludes the proof. } Eq. (\ref{main_eq}) provides a lower bound of $\log p(y|\boldsymbol x)$. GraphDIVE optimizes the evidence lower bound (ELBO) from the perspective of variational inference. The more closer is $p(z|x, y;\Theta)$ to $q(z|x, y)$, the tighter the lower bound is. The first item on the right hand encourages $q(z|x, y)$ to be high for experts which make good predictions. And the second item is the Kullback-Leibler divergence between the variational distribution and the prior distribution output by the gating network. With this term, the gating network considers both graph labels and experts' capacity when partitioning graph datasets. \section{Experiments} In this section, we provide extensive experimental results of GraphDIVE on imbalanced graph classification datasets under both single-task and multi-task settings. The experimental results demonstrate superior performance of GraphDIVE over state-of-the-art models. Besides, we present a case study to demonstrate how the gating mechanism improve classification performance of minority class. \subsection{Datasets} We conduct experiments on the recently released large-scale datasets of \textit{Open Graph Benchmark\footnote{\url{https://ogb.stanford.edu/}}}(OGB) \cite{ogb_2020_nips}, which are more realistic and challenging than traditional graph datasets. More specifically, we choose six molecular graph datasets from OGB: BACE, BBBP, HIV, SIDER, CLIONTOX, and TOX21. These datasets cover different complex chemical properties, such as inhibition of human $\beta$-secretase, and blood-brain barrier penetration. All these datasets contains two classes for each task. Here we give a brief statistics of these datasets in Table \ref{tbl:dataset}, and a more detailed description can be found in \citet{ogb_2020_nips}. For the multi-class classification task, please refer to supplementary materials for details. \begin{table}[] \centering \caption{Statistics of OGB Datasets} \label{tbl:dataset} \small \resizebox{\linewidth}{!}{ \begin{tabular}{lc|c|c|c|c}\toprule &Dataset & Size & \# tasks & Avg. Size & Positive Ratio\\ \hline &BACE & 1513 & 1 & 34.1 & 45.6\% \\ &BBBP & 2039 & 1 & 24.1 & 23.5\% \\ &HIV &41127 & 1 & 25.5 & 3.5\% \\ &SIDER-task-3 &1427 & 1 & 33.6 & 1.5\% \\ &CLINTOX & 1477 & 2 & 26.2 & 6.97\% \\ &SIDER & 1427 & 27 & 33.6 & 25.14\% \\ &Tox21 & 7831 & 12 & 18.6 & 7.52\% \\ \bottomrule \end{tabular} } \end{table} \begin{table}[] \centering \caption{Summary of classification ROC-AUC (\%) results under single task setting.} \resizebox{\linewidth}{!}{ \begin{tabular}{lc|cccc} \toprule & & BACE & BBBP & HIV & SIDER-3 \\ \midrule &GCN & 79.15$\pm$1.44 & 68.87$\pm$1.51 & 76.06$\pm$0.97 & 36.11$\pm$11.40 \\ &GIN & 72.97$\pm$4.00 & 68.17$\pm$1.48 & 75.58$\pm$1.4 & 30.90$\pm$7.68 \\ &GCN+FLAG & 80.53$\pm$1.43 & 70.04$\pm$0.82 & 76.83$\pm$1.02 & 46.90$\pm$7.22 \\ &GIN+FLAG & 80.02$\pm$1.68 & 68.60$\pm$1.27 & 76.54$\pm$1.14 & 42.09$\pm$9.76 \\ &GSN & 76.53$\pm$4.54 & 67.90$\pm $1.86 & 77.99$\pm$1.00 & 37.26$\pm$5.14 \\ &WEGL & 78.06 $\pm$ 0.91 & 68.27 $\pm$ 0.99 & 77.57$\pm$1.11 & 48.88 $\pm$ 12.69\\ \midrule &GraphDIVE-post & 81.10$\pm$1.86 & 69.65$\pm$0.94&76.51$\pm$1.01 &48.29$\pm$5.99 \\ &GraphDIVE-pri & \textbf{83.39$\pm$0.8} & \textbf{70.33$\pm$1.24} & \textbf{78.15$\pm$1.28} & \textbf{48.93$\pm$3.79} \\ \bottomrule \end{tabular} } \label{tbl:gnn} \end{table} \begin{table*}[] \caption{Comparison between GraphDIVE and other imbalanced-learning methods. The ROC-AUC (\%) values are reported.} \label{tbl:main_results} \centering \resizebox{\linewidth}{!}{ \begin{tabular}{lccccc|cccc} \toprule &~ & \multicolumn{4}{c|}{GCN} & \multicolumn{4}{c}{GIN} \\ \cline{3-10} & & \textbf{BACE} & \textbf{BBBP} & \textbf{HIV} & \textbf{SIDER-3} & \textbf{BACE} & \textbf{BBBP} & \textbf{HIV} & \textbf{SIDER-3} \\ \cline{3-10} & & 79.15$\pm$1.44 & 68.87$\pm$1.51 & 76.06$\pm$0.97 & 36.11$\pm$11.40 & 72.97$\pm$4.00 & 68.17$\pm$1.48 &75.58$\pm$1.40 & 30.90$\pm$7.68 \\ \midrule &Focal Loss & 81.08$\pm$2.02 & 67.90$\pm$1.16 & 76.56$\pm$1.15 & 29.36$\pm$10.30 & 72.36$\pm$4.59 & 66.10$\pm$1.65 & 77.00$\pm$1.10 & 26.90$\pm$9.03 \\ &GHM & 80.51$\pm$1.54 & 67.04$\pm$1.26 & 75.33$\pm$1.44 & 19.90$\pm$6.99 & 70.93$\pm$4.74 & 67.71$\pm$2.26 & 74.21$\pm$1.07 & 38.57$\pm$9.60 \\ &LDAM & 78.91$\pm$2.10 & 67.08$\pm$0.94 & 76.58$\pm$1.69 & 38.50$\pm$9.99 & 75.35$\pm$2.94 & 65.89$\pm$2.05 & 74.57$\pm$3.46 & 37.76$\pm$8.46 \\ &Decoupling & 80.01$\pm$1.01 &68.42$\pm$1.46 & 76.43$\pm$1.39 & 34.24$\pm$17.02 & 73.72$\pm$4.55 &67.40$\pm$1.85 & 75.69$\pm$1.43 & 35.07$\pm$12.19 \\ \midrule &GraphDIVE & \textbf{83.39$\pm$0.80} & \textbf{70.33$\pm$1.24} & \textbf{78.15$\pm$1.28} & \textbf{48.93$\pm3.79$} & \textbf{78.41$\pm$1.75} & \textbf{68.77}$\pm$1.24 & \textbf{77.64$\pm$1.01} & \textbf{42.60$\pm$5.02} \\ \bottomrule \end{tabular}} \end{table*} Each graph in molecular graph dataset represents a molecule, where nodes are atoms, and edges are chemical bonds. Each node contains a 9-dimensional attribute vector, including atomic number and chirality, as well as other additional atom features such as formal charge and whether the atom is in the ring. Moreover, each edge contains a 3-dimensional attribute vector, including bond type, bond stereochemistry, and an additional bond feature indicating whether the bond is conjugated. \subsection{Experimental Setup} For a fair comparison, we implement our method and all baselines in the same experimental settings as \citet{ogb_2020_nips}. For both single-task and multi-task datasets, we follow the original scaffold train-validation-test split with the ratio of 80/10/10. The scaffold splitting separates structurally different molecules into different subsets, which provides a more realistic estimate of the model performance in experimental settings \cite{wu2018moleculenet}. We run ten times for each experiment with random seed ranging from 0 to 9, and report the mean and standard deviation of test ROC-AUC for all methods. For hyper-parameter setting, we set the embedding dimension to 300, number of layers to 5, and employ the same GNN backbone network structure. We train the model using Adam optimizer \cite{adam14} with initial learning rate of 0.001. For HIV and TOX21 datasets, we train the network for 120 epochs in light of the scale of the dataset. Moreover, for all the other datasets, we train the model for 100 epochs. According to the average performance on the validation dataset, we use grid-search to find the optimal value for $M$ (i.e., the number of experts) and $\lambda$. We set the hyper-parameter space of $M$ as [2, 3, 4, 5, 6, 7, 8] and the hyper-parameter space of $\lambda$ as [0.001, 0.01, 0.1, 1., 10], respectively. We implement all our models based on PyTorch Geometric \cite{pyg2019} and run all our experiments on a single NVIDIA GeForce RTX 2080 Ti 12GB. \subsection{Single-task Graph Classification } \label{exp:comp} \textbf{Setting and baselines.} For single task, we choose BACE, BBBP and HIV datasets, which are initially single-task binary classification. Besides, at random, we pick the third task of SIDER dataset. We consider two representative and competitive graph neural networks as feature extractors: GCN \cite{gcn} and GIN \cite{xu2018gin}. To verify the effectiveness of our method, we also compare the following strong and competitive methods: FLAG \cite{kong2020flag}, GSN \cite{gsn2020}, WEGL \cite{wegl2021}. For all these methods, we use official implementation and follow the original setting. In addition, we compare our method with state-of-the-art methods that are designed for imbalanced or long-tailed problems, including FocalLoss \cite{focalloss}, LDAM \cite{ldam}, GHM \cite{li2019gradient}, and Decoupling \cite{kang2019decoupling}. For FocalLoss, we follow the original parameter setting. For LDAM and Decoupling, official implementation is adopted, and we carefully tune the hyper-parameters since there is considerable difference between the graph classification datasets and image classification datasets that these methods originally designed for. What is more, for GHM method, we set the number of bins to 30, and momentum $\eta$ as $0.9$. \textbf{Comparison with SOTA GNNs.} We report the ROC-AUC score of state-of-the-art GNN models in Table \ref{tbl:gnn}. Overall, we can see that the proposed GraphDIVE shows strong performance across all four datasets. GraphDIVE consistently outperforms other GNN models. Particularly, GraphDIVE achieves up to $12.82 \%$ absolute improvement over GCN on SIDER-3 dataset. The strong performance verifies the effectiveness of the proposed mixture of experts framework. Besides, comparing GraphDIVE-post and GraphDIVE-pri, we observe that GraphDIVE-pri performs better. We suppose the reason is that the calculation of posterior distribution introduces bias. As formulated in Eq. (\ref{eq:posterior}), posterior distribution considers the capacity of each expert and graph labels. However, the imbalanced distribution of graph labels makes each expert focus more on majority class, hindering the performance of GraphDIVE. On the contrary, Graph-pri reliefs the confounder bias from labels and achieves relatively better results. In the following text, without specification, we refer to GraphDIVE-pri as GraphDIVE for simplicity. \textbf{Comparison with SOTA imbalanced learning methods.} We also compare GraphDIVE and other state-of-the-art class-imbalanced learning methods. The results are shown in Table \ref{tbl:main_results}. Firstly, we find that GraphDIVE outperforms baseline models (i.e., GCN and GIN) consistently by considerable margins, which implies that the performance of existing GNNs on graph classification can be further improved by appropriately modeling the imbalanced distribution. It is also worth noting that the state-of-the-art imbalanced learning methods, such as LDAM and Decoupling, do not seem to offer significant or stable improvements over baseline models. For example, Focal loss performs better than GCN on BACE and HIV dataset, but it is inferior to baseline on BBBP and SIDER-3 dataset. We suppose the reason is that either re-sampling or re-weighting methods make the model focus more on minority class, resulting in potential over-fitting to minority class. When there are distinct differences in test graphs and train graphs, existing imbalanced learning methods may fail to generate accurate predictions. Compared with existing imbalanced learning methods, GraphDIVE usually achieves a higher ROC-AUC score and lower standard deviation. In other words, GraphDIVE maintains remarkable and stable improvements across different datasets. We attribute this property to the gating and expert networks, which capture semantic structure of the dataset and possess the model superior generalization ability. We also present a case study in Section \ref{exp:experts} to illustrate the effectiveness of GraphDIVE. \begin{table}[] \caption{ Summary of classification ROC-AUC (\%) results under multi-task setting. } \label{tbl:multask_results} \resizebox{\linewidth}{!}{ \begin{tabular}{lc|lll} \toprule & & CLINTOX & SIDER & TOX21 \\ \midrule &GCN & 91.73$\pm$1.73 & 59.60$\pm$1.77 & 75.29$\pm$0.69 \\ &GCN-DIVE-SG & 90.47$\pm$1.38 & 59.48$\pm$0.96 & 74.17$\pm$0.40 \\ &GCN-DIVE-IG & \textbf{91.98$\pm$1.32} & \textbf{59.62$\pm$0.90} & \textbf{75.81$\pm$0.65} \\ \midrule &GIN & 88.14$\pm$2.51 & 57.60$\pm$1.40 & 74.91$\pm$0.51 \\ &GIN-DIVE-SG & 82.02$\pm$6.75 & 57.57$\pm$1.25 & 72.78$\pm$0.60 \\ &GIN-DIVE-IG & \textbf{89.52$\pm$1.08} &\textbf{58.78$\pm$1.28} & \textbf{74.96$\pm$0.60}\\ \bottomrule \end{tabular}} \end{table} \subsection{Multi-task Graph Classification} For multi-task, we choose three datasets, including TOX21, CLINTOX and SIDER. Since there is no prior imbalanced learning research on multi-task graph classification and existing imbalanced learning strategies are difficult to be adapted to multi-task setting, we only compare GraphDIVE and baseline models. The results in Table \ref{tbl:multask_results} show GraphDIVE still advance the performance over GCN and GIN. Notably, the improvements under multi-task setting are not as remarkable as those under single-task setting. This observation is expected because different tasks may require the shared graph representation to optimize towards different directions. So the multi-task imbalanced graph classification is a challenging research direction. We also note that the individual-gate variant (i.e., DIVE-IG) generally performs better than shared-gate variant (i.e., DIVE-SG). Considering that one graph might be of the majority class for some tasks while being of minority class for the other tasks, this result indicates that different gates are necessary for multi-task setting. \subsection{Effectiveness Analysis for Diverse Experts} \label{exp:experts} To evaluate the effectiveness of the diverse experts in GraphDIVE, we study whether and why diverse experts can alleviate prediction bias towards majority class. More specifically, we report the classification accuracy of minority class in Figure \ref{fig:minority}. Besides, we visualize different experts' predictions on BACE dataset under the setting with three and four experts, respectively. According to the number of samples assigned to each expert, we present a pie chart in Figure \ref{fig:pie_chart}. We have the following observations. First of all, existing state-of-the-art re-weighting and re-sampling methods, such as LDAM and Decoupling, have marginal improvements in minority class. This is as expected since they are prone to over-fitting to minority class and cannot perfectly solve the structure diversity problem. Secondly, we observe that the proposed GraphDIVE outperforms baseline and existing imbalanced learning methods by a remarkable margin. These improvements suggest that GraphDIVE can successfully alleviate the prediction bias towards majority class and boost performance for minority class. \begin{figure} \centering \centerline{\includegraphics[width=\linewidth]{figs/acc_bar.pdf}} \caption{Classification accuracy of minor class on BACE and BBBP dataset.} \label{fig:minority} \end{figure} Moreover, we take a further step to analyze why GraphDIVE can alleviate the bias. As shown in Figure \ref{fig:pie_chart}, Class 0 and Class 1 denote the majority class and minority class, respectively. It can be observed that the classification of different classes relies on different experts. For example, for the setting with three experts, Expert 1 dominates the classification for the minority class while Expert 2 dominates the classification for the majority class. This phenomenon demonstrates that the proposed GraphDIVE successfully captured the semantic structure, i.e., each expert is responsible for a subset of graphs. For the expert which dominates the classification of minority class, its corresponding subset contains more minority class. So training procedure of this expert is less likely to be biased towards majority class. We also investigate the impact of expert numbers. Please refer to supplementary materials for more detailed information. \begin{figure} \centering \centerline{\includegraphics[width=\linewidth]{figs/pie_chart.pdf}} \caption{The weights of experts output by gating network on BACE dataset. The classification of different classes relies on different experts.} \label{fig:pie_chart} \end{figure} \subsection{Effect of gating mechanism} \begin{table}[] \caption{Ablation study on gating network.} \label{tbl:gate_ablation} \resizebox{\linewidth}{!}{ \begin{tabular}{lc|ccc} \toprule && BACE & BBBP & SIDER-3 \\ \midrule &GCN& 79.15$\pm$1.44 & 68.87$\pm$1.51 & 36.11$\pm$11.40 \\ \midrule &DIVE-no-gate & 80.99$\pm$0.92 & 68.12$\pm$0.59 & 41.71$\pm$7.50 \\ &GraphDIVE & \textbf{82.41$\pm$1.37} & \textbf{69.39$\pm$1.21} & \textbf{49.62$\pm$4.44}\\ \bottomrule \end{tabular} } \end{table} To verify the effectiveness of our proposed gating mechanism, we conduct an ablation experiment on three single-task datasets. We select GCN as a feature extractor and assign four experts. We replace the gating network with simple arithmetic mean operation on predictions of multiple experts. The model is called Dive-mean accordingly. As Table \ref{tbl:gate_ablation} shows, compared with GraphDIVE, Dive-mean (i.e., DIVE-no-gate) reduces test ROC-AUC by relative 61.33\% on average. Dive-mean may even degrade the performance on BBBP dataset. These results verify the effectiveness of the gating network. Notably, DIVE-mean almost shares the same number of parameters as GraphDIVE. Comparing GCN and DIVE-mean, it can also be seen that simply adding network parameters by introducing more experts cannot bring enough improvement. To sum up, the above results suggest that both the expert network (refer to Section \ref{exp:experts}) and the gating network are needed to boost the performance of imbalanced graph classification. \section{Conclusion} In this paper, we have introduced GraphDIVE, a mixture of diverse experts framework for imbalanced graph classification. GraphDIVE employs a gating network to learn a soft partition of the dataset, in which process the semantically different graphs are grouped into different subsets. Then diverse experts are trained based on their corresponding subsets. Considering whether to use prior distribution or posterior distribution, we design two model variants and investigate their effectiveness. Besides, we also extend another two variants specially for multi-task setting. The theoretical analysis shows that GraphDIVE can optimize the exact evidence lower bound with the above divide-and-conquer principle. We have conducted comprehensive experiments using various real-world datasets and practical settings. GraphDIVE consistently advances the performance over various baselines and imbalanced learning methods. Further studies exhibited the rationality and effectiveness of GraphDIVE. \nocite{langley00} \section{Influence of Expert Number} We investigate the impact of expert number on GraphDIVE. To be more specific, we experiment with two to eight experts. The results on single-task datasets are shown in Figure \ref{fig:sensi}. From the figure, it can be found that GraphDIVE outperforms baseline methods at most of the time, meaning that the expert numbers can be selected in a wide range. Besides, the performance improves with the increased number of experts at first, which demonstrates that more experts increase the model capacity. With the number of experts increasing, the experts which dominate the classification of minority class are more likely to generate unbiased predictions. For example, when the number of experts are less than eight, the performance of GraphDIVE-GCN increases monotonously with the number of experts increasing on BBBP dataset. Nevertheless, too many experts will inevitably introduce redundant parameters to the model, leading to over-fitting as well. \section{Complexity Comparison} In Table \ref{tbl:test_time}, we report the clock time of different methods on test set. For GraphDIVE, we employ GCN as a feature extractor and assign three experts on all datasets. It can be seen that GraphDIVE only introduces marginal computation complexity compared with GCN. \begin{table}[h] \centering \caption{Complexity comparison between GraphDIVE and other GNNs. Test time (millisecond) are reported.} \begin{tabular}{lcccc} \toprule & BACE & BBBP & HIV & SIDER-3 \\ \midrule GCN & 55.16 & 89.96 & 1248.01 & 54.98 \\ GIN & 41.81 & 59.01 & 1019.72 & 40.95 \\ GCN+FLAG & 86.76 & 90.22 & 1427.95 & 65.67 \\ GIN+FLAG & 60.56 & 83.07 & 1224.01 & 60.63 \\ GSN & 621.62 & 824.41 & 16100.56 & 640.24 \\ \midrule GraphDIVE & 61.12 & 93.92 & 1267.65 & 64.78 \\ \bottomrule \end{tabular} \label{tbl:test_time} \end{table} \section{Experiments on multi-class Text Classification} In order to further verify that GraphDIVE is general for other imbalanced graph classification applications, we conduct experiments on text classification, which is an imbalanced multi-class graph classification task. Figure \ref{fig:text-dist} shows the class distribution of the widely used text classification datasets. It can be seen that these datasets have a long-tailed label distribution. \citet{yao2019graph} create a corpus-level graph which treats both documents and words as nodes in a graph. They calculate point-wise mutual information as word-word edge weights and use normalized TF-IDF scores as word-document edge weights. TextLevelGCN \cite{huang2019text} produces a text level graph for each input text, and transforms text classification into graph classification task. TextLevelGCN fulfils the inductive learning of new words and achieves state-of-the-art results. \begin{figure} \centering \begin{subfigure}[t]{0.48\linewidth} \centering \includegraphics[width=\linewidth]{figs/bace_experts.pdf} % \caption{\small \textbf{BACE}} \label{fig:bace} \end{subfigure} \hfill \begin{subfigure}[t]{0.48\linewidth} \centering \includegraphics[width=\linewidth]{figs/bbbp_experts.pdf} % \caption{\small \textbf{BBBP}} \label{fig:bbbp} \end{subfigure} \vskip\baselineskip \begin{subfigure}[t]{0.48\linewidth} \centering \includegraphics[width=\linewidth]{figs/hiv_experts.pdf} % \caption{\small \textbf{HIV}} \label{fig:hiv} \end{subfigure} \hfill \begin{subfigure}[t]{0.48\linewidth} \centering \includegraphics[width=\linewidth]{figs/sider_experts.pdf} % \caption{\small \textbf{SIDER-3}} \label{fig:sider3} \end{subfigure} \caption{Mean ROC-AUC vs number of experts on four datasets: (a)BACE, (b)BBBP, (c)HIV, (d)SIDER-3} \label{fig:sensi} \end{figure} \begin{table}[h] \centering \footnotesize \caption{\label{acc-table} Accuracy on text classification datasets. We run all models 10 times and report mean results. } \scalebox{1}{ \begin{tabular}{cccc} \toprule \textbf{Model} & \textbf{R8} & \textbf{R52} & \textbf{Ohsumed} \\ \midrule CNN & 95.7 $\pm$ {0.5} & 87.6 $\pm$ {0.5} & 58.4 $\pm$ {1.0} \\ LSTM & 96.1 $\pm$ {0.2} & 90.5 $\pm$ {0.8} & 51.1 $\pm$ {1.5} \\ Bi-LSTM & 96.3 $\pm$ {0.3} & 90.5 $\pm$ {0.9} & 49.3 $\pm$ {1.0} \\ fastText & 96.1 $\pm$ {0.2} & 92.8 $\pm$ {0.1} & 57.7 $\pm$ {0.5} \\ Text-GCN & 97.0 $\pm$ {0.1} & 93.7 $\pm$ {0.1} & 67.7 $\pm$ {0.3} \\ TextLevelGCN & {97.67} $\pm$ {0.2} & {94.05} $\pm$ {0.4} & {68.59} $\pm$ {0.7} \\ GraphDIVE & \textbf{97.91} $\pm$ \textbf{0.2} & \textbf{94.31} $\pm$ \textbf{0.3} & \textbf{69.27} $\pm$ \textbf{0.6} \\ \bottomrule \end{tabular} } \label{tbl:text} \end{table} \begin{figure*} \centering \begin{subfigure}[t]{.32\linewidth} \centering \includegraphics[width=\linewidth]{figs/r8.pdf} % \caption{\small \textbf{R8}} \label{fig:r8} \end{subfigure} \hfill \begin{subfigure}[t]{.32\linewidth} \centering \includegraphics[width=\linewidth]{figs/r52.pdf} % \caption{\small \textbf{R52}} \label{fig:r52} \end{subfigure} \hfill \begin{subfigure}[t]{.32\linewidth} \centering \includegraphics[width=\linewidth]{figs/oh.pdf} % \caption{\small \textbf{Oh}} \label{fig:oh} \end{subfigure} \hfill \caption{An illustration of histograms on training class distributions for the datasets used in text-level graph classification experiment.} \label{fig:text-dist} \end{figure*} Hence, we use TextLevelGCN\footnote{\url{https://github.com/mojave-pku/TextLevelGCN}} \cite{huang2019text} as a feature extractor and closely follow the experimental settings as \citet{huang2019text}. From Table \ref{tbl:text}, we can see that GraphDIVE achieves better results across different datasets. This result indicates that GraphDIVE is not only applicable to molecular graphs, but also is beneficial to the imbalanced multi-class graph classification in text domain. \section{Introduction} \label{Introduction} Graph classification aims to identify class labels of graphs in a dataset, which is a critical and challenging problem for a broad range of real-world applications \cite{huang2016learning,fey2018splinecnn,zhang2019inductive,jia2020graphsleepnet}. For instance, in chemistry, a molecule could be represented as a graph, where nodes denote atoms, and edges represent chemical bonds. Correspondingly, the classification of molecular graphs can help predict target molecular properties \cite{ogb_2020_nips}. As a powerful approach to graph representation learning, Graph Neural Network (GNN) models have achieved outstanding performance in graph classification \cite{ying2018hierarchical,xu2018gin,pmlr-v119-wang20m,corso2020principal}. Most of existing GNN models first transform nodes into low-dimensional dense embeddings to learn discriminative graph attributive and structural features, and then summarize all node embeddings to obtain a global representation of the graph. Finally, Multi-Layer Perceptrons (MLPs) are used to facilitate end-to-end training. Nevertheless, current GNN models largely overlook the important setting of imbalanced class distribution, which is ubiquitous in practical graph classification scenarios. For example, in OGBG-MOLHIV dataset \cite{ogb_2020_nips}, only about 3.5\% of molecules can inhibit HIV virus replication. Figure \ref{fig:accloss} presents graph classification results of GCN \cite{gcn} and GIN \cite{xu2018gin} on this dataset. Considering either test accuracy or cross-entropy loss, the classification performance of minority class falls far behind that of majority class, which indicates the necessity of boosting GNN from the perspective of imbalanced learning. \begin{figure} \centering \begin{subfigure}[t]{.45\linewidth} \centering \includegraphics[height=2.5cm]{figs/hiv_acc.pdf} % \caption{\small \textbf{ Accuracy}} \label{fig:single} \end{subfigure} \hfill \begin{subfigure}[t]{.45\linewidth} \centering \includegraphics[height=2.5cm]{figs/hiv_loss.pdf} % \caption{\small \textbf{ Cross-entropy loss}} \label{fig:single} \end{subfigure} \hfill \caption{Test accuracy and cross-entropy loss on OGBG-HIV dataset.} \label{fig:accloss} \end{figure} However, apart from suffering the well-known learning bias towards majority classes \cite{sun2009classification,he2009learning,kang2019decoupling}, the class-imbalanced learning problem is exacerbated on graph classification due to the following reasons: (\textit I) \emph{structure diversity}; (\textit {II}) \emph{poor applicability in multi-task classification setting}. First, structure diversity and the related out-of-distribution problem is very ubiquitous in real-world graph datasets \cite{hu2019strategies}. For example, when scientists want to forecast COVID-19 property, it will be difficult because COVID-19 is different from all known virus. This means typical imbalanced learning methods, such as re-sampling \cite{chawla2002smote} and re-weighting \cite{huang2016learning}, may no longer work on graph datasets. Because of the potential over-fitting to minority classes, these imbalanced strategies are sensitive to fluctuations of minor classes, resulting in unstable performance. Second, in more common cases, such as drug discovery \cite{ogb_2020_nips,becigneul2020optimal,pan2015joint} and functional brain analysis \cite{pan2016task}, graph datasets contain multiple classification tasks due to need for predicting various properties of a graph simultaneously. For example, Tox21 Challenge\footnote{\url{https://tripod.nih.gov/tox21/challenge/}} aims to predict whether certain chemical compounds are active for twelve pathway assays, which can be viewed as twelve-task binary classification setting. Existing imbalanced learning methods are originally designed for single-task classification. Therefore, it is difficult to apply existing imbalanced learning strategies \cite{chawla2002smote,kang2019decoupling,kim2020m2m} to multi-task setting. To this end, we propose a novel imbalanced \underline{Graph} classification framework with \underline{DIV}erse \underline{E}xperts, referred to as GraphDIVE for brevity. At first, we leverage a gating network to capture the semantic structure of the dataset. As illustrated in Figure \ref{fig:divide}, the semantically similar graphs are grouped into the same subset. Then, multiple classifiers, which are referred to as experts, are trained based on their corresponding subsets. Due to the difference in semantic structure, samples of majority class and minority class tend to be concentrated in different subsets. Obviously, for the subset containing most of the minority class (please refer to Subset 2 in Figure \ref{fig:divide}), the imbalance phenomenon is alleviated. As a result, the performance of minority class get promoted. We systematically study the effect of GraphDIVE on public benchmarks and obtain the following key observations: (\textit I) existing imbalanced learning strategies are difficult to offer satisfactory improvement on graph datasets because of the graph diversity problem, (\textit {II}) the performance of existing GNNs on graph classification can be further improved by appropriately modeling the imbalanced distribution, (\textit {III}) capturing semantic structure of datasets can address the structure diversity problem and alleviate the bias towards majority classes, (\textit {IV}) different gates are generally necessary for multi-task setting. Apart from these observations, GraphDIVE achieves state-of-the-art results in both single-task and multi-task settings. As an instance, on HIV and BACE benchmarks, GraphDIVE achieves improvements over GCN by 2.09\% and 4.24\%, respectively. \section{Related Work} \label{related_work} \subsection{Graph Neural Networks} Over the past few years, we have witnessed the fast development of graph neural networks. They process permutation-invariant graphs with variable sizes and learn to extract discriminative features through a recursive process of transforming and aggregating representations from neighbors. At first, GNNs were introduced by \cite{gori2005new} as a form of recurrent neural networks. Then, \citet{spec-not-general} define the convolutional operations using Fourier transformation and Laplacian matrix. GCN \cite{gcn} approximate the Fourier transformation process by truncating the Chebyshev polynomial to the first-order neighborhood. GraphSAGE \cite{sage} samples a fixed number of neighbors and employs several aggregation functions. GAT \cite{gat} aggregates information from neighbors by using attention mechanism. DR-GCN \cite{ijcai2020-398} applies class-conditioned adversarial network to alleviate bias in imbalanced node classification task. Recently, \citet{GCNII2020} try to tackle the over-smoothing problem by using initial residual and identity mapping. Apart from innovation on convolution filters, there are also two main branches in the research of graph classification. For one thing, Graph pooling methods, such as DiffPool \cite{ying2018hierarchical}, Graph U-nets \cite{gunet}, and self-attention pooling \cite{lee2019selfatt}, are developed to extract more global information. \citet{mesquita2020rethinking} take a step further in understanding the effect of local pooling methods. For another, there is recently a growing class of graph isomorphic methods \cite{xu2018gin,morris2019weisfeiler,corso2020principal} which aim to quantity representation power of GNNs. \begin{figure} \centering \centerline{\includegraphics[width=\linewidth]{figs/model.pdf}} \caption{Visual illustration of GraphDIVE, consisting of the gating network and expert network.} \label{fig:divide} \end{figure} \subsection{Class-imbalanced Learning} \textbf{Re-sampling.} Re-sampling methods aim to balance the class distribution by controlling each class's sample frequencies. It can be achieved by over-sampling or under-sampling \cite{chawla2002smote,han2005borderline,he2008adasyn}. Nevertheless, traditional random sampling methods usually cause over-fitting in minority classes or under-fitting in majority classes. Recently, \citet{kang2019decoupling} propose to use re-sampling strategy in a two-stage training scheme. Besides, \citet{liu2020deep}, \citet{kim2020m2m}, and \citet{chou2020remix} generate augmented samples to supplement minority classes, which can also be viewed as re-sampling methods. However, it is a non-trivial task to apply augmentation on graphs with variable sizes. These re-sampling methods are also unable to produce multiple predictions simultaneously in multi-task setting because different tasks are usually with different class distributions. \textbf{Re-weighting.} Re-weighting methods generally assign different weights to different samples. Traditional scheme re-weights classes proportionally to the inverse of the class frequency, which tends to make optimization difficult under extremely imbalanced settings \cite{huang2016learning,huang2019deep}. Another line of work assigns weights according to the properties of each training instance. FocalLoss \cite{focalloss} lowers the weights of the well-classified samples. GHM \cite{li2019gradient} improves FocalLoss by further lowering the weights of very large gradients considering outliers. However, these two kinds of methods need prerequisite of domain experts to hand-craft the loss function in specific task, which may restrict their applicability. Recently, \citet{cui2019class} introduce the effective number of samples to put larger weights on minority classes. \citet{tan2020equalization} propose an equalization loss function that randomly ignores gradients from majority classes. LDAM \cite{ldam} introduces a label-distribution-aware loss function that encourages larger margins for minority classes. Despite the simplicity in implementation, re-weighting methods do not consider the semantic structure of datasets. So, they may not handle the graph structure diversity problem, causing unstable predictions. \subsection{Mixture of Experts} Mixture of Experts (MoE) is mainly based on divide-and-conquer principle, in which the problem space is first divided and then is addressed by specialized experts \cite{expert91}. MoE has been explored by several researchers and has witnessed success in a wide range of applications \cite{tresp2001mixtures,collobert2002parallel,masoudnia2014mixture,eigen2013learning}. In recent years, there is a surge of interest of in incorporating MoE models to address challenging tasks in natural language processing and computer vision. \citet{shazeer2016outrageously} introduce a sparsely-gated MoE network, which improves the performance of machine translation and language modeling. \citet{shen2019mixture} evaluate the translation quality and diversity of MoE models. \citet{fedus2021switch} simplify the computational costs of MoE and make it possible to train models with trillion parameters. In computer vision, there are some frameworks \cite{ge2015subset,ge2016fine} which have demonstrated the effectiveness of MoE in fine-grained classification. Contrary to existing MoE methods which focus on increasing model capacity, we find MoE are surprisingly overlooked in graph machine learning and that MoE are especially appropriate for imbalanced graph classification task. We also propose two variants considering posterior and prior distributions for the gating function. There are also concurrent MoE works \cite{ma2018modeling,qin2020multitask,tang2020progressive} that involve multi-task learning. However, they do not consider the important and ubiquitous class-imbalance problem. \section{Proposed Method: GaphDIVE} The technical core of GraphDIVE is the notion to leverage the semantic structure of the graph dataset based on the node embedding distributions. This notion encourages the GNN to group the structurally different but property-similar graphs into the same subset. Then the minority classes are more likely to be classified correctly by certain experts. Our method is similar to traditional MoE \cite{expert91}, but with a distinct motivation for imbalanced graph classification. In the following, we first present preliminaries and then describe the algorithmic details of GraphDIVE. Finally, we present two model variants for multi-task setting. \subsection{Preliminaries} Let $D=\{(G_1, {Y}_1),\dots, (G_n, {Y}_n)\}$ denote training data, where $G_i=(A_i, X_i, E_i)$ denotes a graph containing adjacency matrix, node attribute matrix and edge attribute matrix respectively. $Y_i=(y_1, \dots, y_T)$ represents the labels of $G_i$ across $T$ tasks. The task of graph classification is to learn a mapping $f:\ G_i \rightarrow {Y_i}$. In this paper, we only consider the binary classification situation that exists widely in practical applications \cite{yanardag2015deep,ogb_2020_nips}. For the class-imbalanced problem, the number of instances of majority class is far more than that of minority class. \begin{figure*} \centering \begin{subfigure}[t]{.3\linewidth} \centering \includegraphics[height=5cm]{figs/1.pdf} % \caption{\small \textbf{ GraphDIVE for single task}} \label{fig:single} \end{subfigure} \hfill \begin{subfigure}[t]{.3\linewidth} \centering \includegraphics[height=5cm]{figs/2.pdf} % \caption{\small \textbf{ GraphDIVE with shared gates}} \label{fig:shared} \end{subfigure} \hfill \begin{subfigure}[t]{.35\linewidth} \centering \includegraphics[height=5cm]{figs/3.pdf} % \caption{\small \textbf{GraphDIVE with individual gates}} \label{fig:individual} \end{subfigure} \caption{\label{fig:model}\small Model variants in different settings. The latter two variants are designed for multi-task setting. The crossing of the dotted and solid lines of the same color indicates multiplication operation.} \vspace*{-4mm} \end{figure*} \subsection{Architecture} \label{method:arch} The ubiquitous class-imbalanced problem of graph datasets brings a huge challenge to existing GNNs because the classifier will inevitably produce a biased prediction towards majority classes \cite{sun2009classification,he2009learning,tde_2020_nips}. We conjecture that it might be too difficult for one classifier to discriminate all graphs. Inspired by Mixture of Experts (MoE) \cite{expert91}, we propose to assign different experts to different subsets. As illustrated in Figure \ref{fig:single}, GraphDIVE consists of the following components. \textbf{Feature extractor.} Similar to the practice in \citet{ogb_2020_nips}, we design a five-layer graph convolution network to extract graph features. Formally, at the $k$-th layer, the representation of the node $v$ is: \begin{eqnarray} & h_{v}^{(k)}= \operatorname{COMBINE}^{(k)}\left(h_{v}^{(k-1)}, m_{v}^{(k)}\right), \nonumber \\ & m_{v}^{(k)}= \text { AGGREGATE }^{(k)}\left(h_{v}^{(k-1)}, h_{u}^{(k-1)}, e_{u v}\right), \end{eqnarray} where $u \in \mathcal{N}(v)$ denotes the neighbors of node $v$, $h_{v}^{(k)}$ is the representation of $v$ at the $k$-th layer, $e_{uv}$ is the feature vector of the edge between $u$ and $v$, and $m_{v}^{(k)}$ is the message aggregated to node $v$. On top of the graph feature extractor, we summarize the global representation of a graph $G$ by using a graph average pooling layer (i.e., readout function): \begin{equation} \boldsymbol {x} = Pooling \left[GNN(G) \right], \end{equation} where $\boldsymbol {x}\in\mathbb{R}^{d}$, and $d$ denotes the hidden dimension of graph embedding. Notably, GraphDIVE is generic to the choice of underlying GNN. Without loss of generality, in this paper, we choose two commonly used methods GCN \cite{gcn} and GIN \cite{xu2018gin} as feature extractor. \textbf{Mixture of diverse experts.} Under the assumption that one classifier is difficult to learn the desired mapping in skewed distribution, we adopt a gating network to decompose the imbalanced graph dataset into several subsets. Then a diverse set of individual networks, referred to as experts, are trained for discriminating graphs in their corresponding subsets. This divide-and-conquer strategy makes the learning process easier for each expert, and thus alleviates the bias towards majority class. Formally, given a graph with global representation $\boldsymbol x$ and label $y$. We introduce a latent variable $z\in\{1, 2, \dots, M\}$, where $M$ represents the number of experts. In GraphDIVE, we decompose the likelihood $p(y|\boldsymbol x;\boldsymbol \Theta)$ as \begin{equation}\label{eq:margin} p(y|\boldsymbol x;\boldsymbol \Theta) = \sum_{z=1}^M p(y, z|\boldsymbol x;\boldsymbol \Theta) = \sum_{z=1}^M p(z|\boldsymbol x;\boldsymbol \Theta)p(y|z, \boldsymbol x;\boldsymbol \Theta), \end{equation} where $\boldsymbol \Theta=\{\boldsymbol {W}_g \in \mathbb{R}^{d\times M}, \boldsymbol {W}_e \in \mathbb{R}^{d\times 2}\}$ denotes learnable parameters of gating network and expert networks. $\sum_{z=1}^M p(z|\boldsymbol x;\boldsymbol \Theta) =1$, and $p(z|\boldsymbol x;\boldsymbol \Theta)$ is the output of the gating network, indicating the \emph{prior probability} to assign $\boldsymbol x$ to the $z$-th expert. $p(y|z,\boldsymbol x;\boldsymbol \Theta)$ represents output distribution of the $z$-th expert. For simplicity, we implement each expert with one linear projection layer followed by a sigmoid function: \begin{equation}\label{eq:expert} p(y|z, \boldsymbol x;\boldsymbol {\Theta}) = \sigma (\boldsymbol x \ \boldsymbol {W}_e). \end{equation} More specifically, the gating network generates an input-dependent soft partition of the dataset based on cosine similarity between graphs and gating prototypes: \begin{equation} p(z|\boldsymbol x;\boldsymbol \Theta) = softmax \Big( \frac{\boldsymbol x \ {\boldsymbol {W}_g^z}}{\tau} \Big), \end{equation} where $\tau$ is the temperature hyper-parameter tuning the distribution of $z$, and ${\boldsymbol {W}_g^z}$ is the $z$-th gating prototype. Since samples of minority class and majority class are usually different in semantics, they are likely to be grouped into different subsets. For the subset containing most of the minority class, the imbalanced problem phenomenon is much alleviated. Besides, unlike existing imbalanced learning strategies which suffer fluctuations in graph structure, GraphDIVE can also group structurally-different but semantically-similar graphs into same subsets. In other words, the semantic structure of the dataset is captured by gating network. Hence, the proposed method can alleviate the above-mentioned \emph{structure diversity} problem of graph datasets. \textbf{Prior or posterior distribution.} Apart from using prior probability in Eq. (\ref{eq:margin}), we also consider a model variant using posterior probability as expert weights. According to Bayes' theorem, posterior probability can be calculated as: \begin{equation}\label{eq:posterior} p(z|\boldsymbol x, y;\boldsymbol \Theta) = \frac{p(z|\boldsymbol x;\boldsymbol \Theta)p(y|z,\boldsymbol x;\boldsymbol \Theta)}{\sum_{z'}p(z'|\boldsymbol x;\boldsymbol \Theta)p(y|z',\boldsymbol x;\boldsymbol \Theta)}. \end{equation} As opposed to prior distribution which considers only graph features, this Bayesian extension considers the information from both graph labels and experts. For the convenience of expression, We refer to these two model variants as GraphDIVE-pri and GraphDIVE-post. \subsection{Optimization} \label{subsec:optimization} We first present the optimization regime of Bayesian variant. Since the training objective is to maximize the log-likelihood, the loss function can be formulated as following: \begin{align}\label{eq:exp} \mathcal{L}_{post}= -\sum_{z=1}^M & p(z|\boldsymbol x, y;\boldsymbol \Theta) \log p(y|\boldsymbol x,z;\boldsymbol \Theta) \end{align} Noticing the interdependence between posterior distribution and prediction distribution from experts, we propose to use EM algorithm \cite{em1977} to optimize Eq. (\ref{eq:posterior}) and Eq. (\ref{eq:exp}) iteratively: \textbf{E-step:} estimate the weight $p(z|\boldsymbol x, y)$ for each expert according Eq. (\ref{eq:posterior}) under current value of parameters $\boldsymbol \Theta$. \textbf{M-step:} update parameters $\boldsymbol \Theta$ using stochastic gradient descent algorithm, and the gradient $\nabla \log p(y, z|\boldsymbol x)$ is weighted by the estimated $p(z|\boldsymbol x, y)$. The gradients are blocked in the computation of posterior distribution. What is more, similar to the practice in \citet{hasanzadeh2020bayesian}, we introduce a Kullback--Leibler (KL) divergence regularization term $\mathrm{KL}(p(z|\boldsymbol x, y)||p(z|\boldsymbol x;\boldsymbol \Theta))$ into the final loss function: \begin{align}\label{eq:loss} \begin{split} \mathcal{L}_{post}= -\sum_{z=1}^M & p(z|\boldsymbol x, y;\boldsymbol \Theta) \log p(y|\boldsymbol x,z; \boldsymbol \Theta) \\ &+ \lambda * \mathrm{KL}(p(z|\boldsymbol x, y;\boldsymbol \Theta)||p(z|\boldsymbol x;\boldsymbol \Theta)), \end{split} \end{align} where $\lambda$ is a hyper-parameter which controls the extent of regularization. The above KL term ensures the posterior distribution does not deviate too far from the prior distribution. So we choose to compute gradients in M-step based on Eq. (\ref{eq:loss}). For the optimization of GraphDIVE-pri, the posterior distribution $p(z|x_i, y_i;\boldsymbol \Theta)$ in Eq. (\ref{eq:loss}) is replaced with prior distribution $p(z|x_i;\boldsymbol \Theta)$. And regularization item becomes zero. In this case, the gating network and the expert network can be jointly optimized according to the following objective: \begin{equation} \mathcal{L}_{pri}= -\sum_{z=1}^M p(z|\boldsymbol x;\boldsymbol \Theta) \log p(y|\boldsymbol x, z; \boldsymbol \Theta). \end{equation} In experiment, we find both variants fit graph data well and demonstrate superior generalization ability. And detailed comparison can be found in Section \ref{exp:comp}. \subsection{Adaptation to multi-task scenario} \label{method:multi} In real-life applications, researchers are likely to be confronted with imbalanced graph classification in multi-task setting. Multi-task setting increases the difficulty of imbalanced learning as one graph might be of the majority class for some tasks while being of minority class for the other tasks. Existing imbalanced learning methods are originally designed for single-task classification, so it is a non-trivial task to adapt them for multi-task setting. In this paper, we consider two options for multi-task scenario, which are illustrated in Figure \ref{fig:shared} and Figure \ref{fig:individual}. \textit{Option I: Shared gates.} This is the simplest adaptation variant, which uses shared gating weights for different tasks (see Figure \ref{fig:shared}). Compared with the model in Figure \ref{fig:single}, the only difference is that each expert generates predictions for different tasks. This variant has the advantage that it reduces model parameters, especially in settings with many experts. However, empirically this variant does not work well in our setting. Our reasoning is that it implicitly assumes training instances obey the same label distributions across all tasks. \textit{Option II: Individual gates.} Another natural option is to assign different groups of gating weights for different tasks, as illustrated in \ref{fig:individual}. Compared to the \emph{shared gates} solution, this variant has several additional gating networks. Notably, it models task relationships in a sophisticated way. For two less related tasks, the sharing expert weights will be penalized, resulting in different expert weights instead. \section{Theoretical Analysis} In this section, theoretical analysis is provided from variational inference perspective to help understand why GraphDive works. Assuming that an observed graph $\boldsymbol x$ is related to a latent variable $z=\{1, 2, \dots, M\}$, and $p(z|\boldsymbol x)$ denotes the probability of $\boldsymbol x$ locating in the $z$-th sub-region of feature space. Let $q(z|\boldsymbol x, y)$ denote a variational distribution to infer latent variable given observed data, and $p(y|\boldsymbol x, z;\boldsymbol \Theta)$ denotes the distribution of the prediction of each expert. As for the KL regularization term, we consider the simple case of $\lambda=1$. Then we prove the following theorem. {\theorem \label{main_theorem} In GraphDIVE, optimizing the final loss is equivalent to the optimization of the lower bound of $\log p(y|\boldsymbol x)$: \begin{align}\label{main_eq} \begin{split} \log p(y|\boldsymbol x;\boldsymbol\Theta)& \ge \mathbb{E}_{q(z|\boldsymbol x, y)}\log p(y|\boldsymbol x, z;\boldsymbol\Theta) \\ &- \mathrm {KL}(q(z|\boldsymbol x, y)||p(z|\boldsymbol x;\boldsymbol\Theta)) \end{split} \end{align}} {\proof \begin{align*} \begin{split} &\quad\ \mathrm {KL}(q(z|\boldsymbol x, y)||p(z|\boldsymbol x, y;\boldsymbol\Theta))\\ &=\mathbb{E}_{q(z|\boldsymbol x, y)}\log \frac{q(z|\boldsymbol x, y)}{p(z|\boldsymbol x, y;\boldsymbol\Theta)}\\ &=\mathbb{E}_{q(z|\boldsymbol x, y)}\log \frac{q(z|\boldsymbol x, y)p(y|\boldsymbol x;\boldsymbol\Theta)}{p(z, y|\boldsymbol x;\boldsymbol \Theta)}\\ &=\log p(y|\boldsymbol x;\boldsymbol\Theta) + \mathbb{E}_{q(z|\boldsymbol x, y)}\log \frac{q(z|\boldsymbol x, y)}{p(y|\boldsymbol x, z;\boldsymbol\Theta)p(z|\boldsymbol x;\boldsymbol\Theta)}\\ &=\log p(y|\boldsymbol x) - \mathbb{E}_{q(z|\boldsymbol x, y)}\log p(y|\boldsymbol x, z;\boldsymbol\Theta) \\ &\quad+ \mathrm {KL}(q(z|\boldsymbol x, y)||p(z|\boldsymbol x;\boldsymbol\Theta) \end{split} \end{align*} Notice that $\mathrm {KL}(q(z|\boldsymbol x, y)||p(z|\boldsymbol x, y;\boldsymbol\Theta)) \ge 0$, which concludes the proof. } Eq. (\ref{main_eq}) provides a lower bound of $\log p(y|\boldsymbol x)$. GraphDIVE optimizes the evidence lower bound (ELBO) from the perspective of variational inference. The more closer is $p(z|x, y;\Theta)$ to $q(z|x, y)$, the tighter the lower bound is. The first item on the right hand encourages $q(z|x, y)$ to be high for experts which make good predictions. And the second item is the Kullback-Leibler divergence between the variational distribution and the prior distribution output by the gating network. With this term, the gating network considers both graph labels and experts' capacity when partitioning graph datasets. \section{Experiments} In this section, we provide extensive experimental results of GraphDIVE on imbalanced graph classification datasets under both single-task and multi-task settings. The experimental results demonstrate superior performance of GraphDIVE over state-of-the-art models. Besides, we present a case study to demonstrate how the gating mechanism improve classification performance of minority class. \subsection{Datasets} We conduct experiments on the recently released large-scale datasets of \textit{Open Graph Benchmark\footnote{\url{https://ogb.stanford.edu/}}}(OGB) \cite{ogb_2020_nips}, which are more realistic and challenging than traditional graph datasets. More specifically, we choose six molecular graph datasets from OGB: BACE, BBBP, HIV, SIDER, CLIONTOX, and TOX21. These datasets cover different complex chemical properties, such as inhibition of human $\beta$-secretase, and blood-brain barrier penetration. All these datasets contains two classes for each task. Here we give a brief statistics of these datasets in Table \ref{tbl:dataset}, and a more detailed description can be found in \citet{ogb_2020_nips}. For the multi-class classification task, please refer to supplementary materials for details. \begin{table}[] \centering \caption{Statistics of OGB Datasets} \label{tbl:dataset} \small \resizebox{\linewidth}{!}{ \begin{tabular}{lc|c|c|c|c}\toprule &Dataset & Size & \# tasks & Avg. Size & Positive Ratio\\ \hline &BACE & 1513 & 1 & 34.1 & 45.6\% \\ &BBBP & 2039 & 1 & 24.1 & 23.5\% \\ &HIV &41127 & 1 & 25.5 & 3.5\% \\ &SIDER-task-3 &1427 & 1 & 33.6 & 1.5\% \\ &CLINTOX & 1477 & 2 & 26.2 & 6.97\% \\ &SIDER & 1427 & 27 & 33.6 & 25.14\% \\ &Tox21 & 7831 & 12 & 18.6 & 7.52\% \\ \bottomrule \end{tabular} } \end{table} \begin{table}[] \centering \caption{Summary of classification ROC-AUC (\%) results under single task setting.} \resizebox{\linewidth}{!}{ \begin{tabular}{lc|cccc} \toprule & & BACE & BBBP & HIV & SIDER-3 \\ \midrule &GCN & 79.15$\pm$1.44 & 68.87$\pm$1.51 & 76.06$\pm$0.97 & 36.11$\pm$11.40 \\ &GIN & 72.97$\pm$4.00 & 68.17$\pm$1.48 & 75.58$\pm$1.4 & 30.90$\pm$7.68 \\ &GCN+FLAG & 80.53$\pm$1.43 & 70.04$\pm$0.82 & 76.83$\pm$1.02 & 46.90$\pm$7.22 \\ &GIN+FLAG & 80.02$\pm$1.68 & 68.60$\pm$1.27 & 76.54$\pm$1.14 & 42.09$\pm$9.76 \\ &GSN & 76.53$\pm$4.54 & 67.90$\pm $1.86 & 77.99$\pm$1.00 & 37.26$\pm$5.14 \\ &WEGL & 78.06 $\pm$ 0.91 & 68.27 $\pm$ 0.99 & 77.57$\pm$1.11 & 48.88 $\pm$ 12.69\\ \midrule &GraphDIVE-post & 81.10$\pm$1.86 & 69.65$\pm$0.94&76.51$\pm$1.01 &48.29$\pm$5.99 \\ &GraphDIVE-pri & \textbf{83.39$\pm$0.8} & \textbf{70.33$\pm$1.24} & \textbf{78.15$\pm$1.28} & \textbf{48.93$\pm$3.79} \\ \bottomrule \end{tabular} } \label{tbl:gnn} \end{table} \begin{table*}[] \caption{Comparison between GraphDIVE and other imbalanced-learning methods. The ROC-AUC (\%) values are reported.} \label{tbl:main_results} \centering \resizebox{\linewidth}{!}{ \begin{tabular}{lccccc|cccc} \toprule &~ & \multicolumn{4}{c|}{GCN} & \multicolumn{4}{c}{GIN} \\ \cline{3-10} & & \textbf{BACE} & \textbf{BBBP} & \textbf{HIV} & \textbf{SIDER-3} & \textbf{BACE} & \textbf{BBBP} & \textbf{HIV} & \textbf{SIDER-3} \\ \cline{3-10} & & 79.15$\pm$1.44 & 68.87$\pm$1.51 & 76.06$\pm$0.97 & 36.11$\pm$11.40 & 72.97$\pm$4.00 & 68.17$\pm$1.48 &75.58$\pm$1.40 & 30.90$\pm$7.68 \\ \midrule &Focal Loss & 81.08$\pm$2.02 & 67.90$\pm$1.16 & 76.56$\pm$1.15 & 29.36$\pm$10.30 & 72.36$\pm$4.59 & 66.10$\pm$1.65 & 77.00$\pm$1.10 & 26.90$\pm$9.03 \\ &GHM & 80.51$\pm$1.54 & 67.04$\pm$1.26 & 75.33$\pm$1.44 & 19.90$\pm$6.99 & 70.93$\pm$4.74 & 67.71$\pm$2.26 & 74.21$\pm$1.07 & 38.57$\pm$9.60 \\ &LDAM & 78.91$\pm$2.10 & 67.08$\pm$0.94 & 76.58$\pm$1.69 & 38.50$\pm$9.99 & 75.35$\pm$2.94 & 65.89$\pm$2.05 & 74.57$\pm$3.46 & 37.76$\pm$8.46 \\ &Decoupling & 80.01$\pm$1.01 &68.42$\pm$1.46 & 76.43$\pm$1.39 & 34.24$\pm$17.02 & 73.72$\pm$4.55 &67.40$\pm$1.85 & 75.69$\pm$1.43 & 35.07$\pm$12.19 \\ \midrule &GraphDIVE & \textbf{83.39$\pm$0.80} & \textbf{70.33$\pm$1.24} & \textbf{78.15$\pm$1.28} & \textbf{48.93$\pm3.79$} & \textbf{78.41$\pm$1.75} & \textbf{68.77}$\pm$1.24 & \textbf{77.64$\pm$1.01} & \textbf{42.60$\pm$5.02} \\ \bottomrule \end{tabular}} \end{table*} Each graph in molecular graph dataset represents a molecule, where nodes are atoms, and edges are chemical bonds. Each node contains a 9-dimensional attribute vector, including atomic number and chirality, as well as other additional atom features such as formal charge and whether the atom is in the ring. Moreover, each edge contains a 3-dimensional attribute vector, including bond type, bond stereochemistry, and an additional bond feature indicating whether the bond is conjugated. \subsection{Experimental Setup} For a fair comparison, we implement our method and all baselines in the same experimental settings as \citet{ogb_2020_nips}. For both single-task and multi-task datasets, we follow the original scaffold train-validation-test split with the ratio of 80/10/10. The scaffold splitting separates structurally different molecules into different subsets, which provides a more realistic estimate of the model performance in experimental settings \cite{wu2018moleculenet}. We run ten times for each experiment with random seed ranging from 0 to 9, and report the mean and standard deviation of test ROC-AUC for all methods. For hyper-parameter setting, we set the embedding dimension to 300, number of layers to 5, and employ the same GNN backbone network structure. We train the model using Adam optimizer \cite{adam14} with initial learning rate of 0.001. For HIV and TOX21 datasets, we train the network for 120 epochs in light of the scale of the dataset. Moreover, for all the other datasets, we train the model for 100 epochs. According to the average performance on the validation dataset, we use grid-search to find the optimal value for $M$ (i.e., the number of experts) and $\lambda$. We set the hyper-parameter space of $M$ as [2, 3, 4, 5, 6, 7, 8] and the hyper-parameter space of $\lambda$ as [0.001, 0.01, 0.1, 1., 10], respectively. We implement all our models based on PyTorch Geometric \cite{pyg2019} and run all our experiments on a single NVIDIA GeForce RTX 2080 Ti 12GB. \subsection{Single-task Graph Classification } \label{exp:comp} \textbf{Setting and baselines.} For single task, we choose BACE, BBBP and HIV datasets, which are initially single-task binary classification. Besides, at random, we pick the third task of SIDER dataset. We consider two representative and competitive graph neural networks as feature extractors: GCN \cite{gcn} and GIN \cite{xu2018gin}. To verify the effectiveness of our method, we also compare the following strong and competitive methods: FLAG \cite{kong2020flag}, GSN \cite{gsn2020}, WEGL \cite{wegl2021}. For all these methods, we use official implementation and follow the original setting. In addition, we compare our method with state-of-the-art methods that are designed for imbalanced or long-tailed problems, including FocalLoss \cite{focalloss}, LDAM \cite{ldam}, GHM \cite{li2019gradient}, and Decoupling \cite{kang2019decoupling}. For FocalLoss, we follow the original parameter setting. For LDAM and Decoupling, official implementation is adopted, and we carefully tune the hyper-parameters since there is considerable difference between the graph classification datasets and image classification datasets that these methods originally designed for. What is more, for GHM method, we set the number of bins to 30, and momentum $\eta$ as $0.9$. \textbf{Comparison with SOTA GNNs.} We report the ROC-AUC score of state-of-the-art GNN models in Table \ref{tbl:gnn}. Overall, we can see that the proposed GraphDIVE shows strong performance across all four datasets. GraphDIVE consistently outperforms other GNN models. Particularly, GraphDIVE achieves up to $12.82 \%$ absolute improvement over GCN on SIDER-3 dataset. The strong performance verifies the effectiveness of the proposed mixture of experts framework. Besides, comparing GraphDIVE-post and GraphDIVE-pri, we observe that GraphDIVE-pri performs better. We suppose the reason is that the calculation of posterior distribution introduces bias. As formulated in Eq. (\ref{eq:posterior}), posterior distribution considers the capacity of each expert and graph labels. However, the imbalanced distribution of graph labels makes each expert focus more on majority class, hindering the performance of GraphDIVE. On the contrary, Graph-pri reliefs the confounder bias from labels and achieves relatively better results. In the following text, without specification, we refer to GraphDIVE-pri as GraphDIVE for simplicity. \textbf{Comparison with SOTA imbalanced learning methods.} We also compare GraphDIVE and other state-of-the-art class-imbalanced learning methods. The results are shown in Table \ref{tbl:main_results}. Firstly, we find that GraphDIVE outperforms baseline models (i.e., GCN and GIN) consistently by considerable margins, which implies that the performance of existing GNNs on graph classification can be further improved by appropriately modeling the imbalanced distribution. It is also worth noting that the state-of-the-art imbalanced learning methods, such as LDAM and Decoupling, do not seem to offer significant or stable improvements over baseline models. For example, Focal loss performs better than GCN on BACE and HIV dataset, but it is inferior to baseline on BBBP and SIDER-3 dataset. We suppose the reason is that either re-sampling or re-weighting methods make the model focus more on minority class, resulting in potential over-fitting to minority class. When there are distinct differences in test graphs and train graphs, existing imbalanced learning methods may fail to generate accurate predictions. Compared with existing imbalanced learning methods, GraphDIVE usually achieves a higher ROC-AUC score and lower standard deviation. In other words, GraphDIVE maintains remarkable and stable improvements across different datasets. We attribute this property to the gating and expert networks, which capture semantic structure of the dataset and possess the model superior generalization ability. We also present a case study in Section \ref{exp:experts} to illustrate the effectiveness of GraphDIVE. \begin{table}[] \caption{ Summary of classification ROC-AUC (\%) results under multi-task setting. } \label{tbl:multask_results} \resizebox{\linewidth}{!}{ \begin{tabular}{lc|lll} \toprule & & CLINTOX & SIDER & TOX21 \\ \midrule &GCN & 91.73$\pm$1.73 & 59.60$\pm$1.77 & 75.29$\pm$0.69 \\ &GCN-DIVE-SG & 90.47$\pm$1.38 & 59.48$\pm$0.96 & 74.17$\pm$0.40 \\ &GCN-DIVE-IG & \textbf{91.98$\pm$1.32} & \textbf{59.62$\pm$0.90} & \textbf{75.81$\pm$0.65} \\ \midrule &GIN & 88.14$\pm$2.51 & 57.60$\pm$1.40 & 74.91$\pm$0.51 \\ &GIN-DIVE-SG & 82.02$\pm$6.75 & 57.57$\pm$1.25 & 72.78$\pm$0.60 \\ &GIN-DIVE-IG & \textbf{89.52$\pm$1.08} &\textbf{58.78$\pm$1.28} & \textbf{74.96$\pm$0.60}\\ \bottomrule \end{tabular}} \end{table} \subsection{Multi-task Graph Classification} For multi-task, we choose three datasets, including TOX21, CLINTOX and SIDER. Since there is no prior imbalanced learning research on multi-task graph classification and existing imbalanced learning strategies are difficult to be adapted to multi-task setting, we only compare GraphDIVE and baseline models. The results in Table \ref{tbl:multask_results} show GraphDIVE still advance the performance over GCN and GIN. Notably, the improvements under multi-task setting are not as remarkable as those under single-task setting. This observation is expected because different tasks may require the shared graph representation to optimize towards different directions. So the multi-task imbalanced graph classification is a challenging research direction. We also note that the individual-gate variant (i.e., DIVE-IG) generally performs better than shared-gate variant (i.e., DIVE-SG). Considering that one graph might be of the majority class for some tasks while being of minority class for the other tasks, this result indicates that different gates are necessary for multi-task setting. \subsection{Effectiveness Analysis for Diverse Experts} \label{exp:experts} To evaluate the effectiveness of the diverse experts in GraphDIVE, we study whether and why diverse experts can alleviate prediction bias towards majority class. More specifically, we report the classification accuracy of minority class in Figure \ref{fig:minority}. Besides, we visualize different experts' predictions on BACE dataset under the setting with three and four experts, respectively. According to the number of samples assigned to each expert, we present a pie chart in Figure \ref{fig:pie_chart}. We have the following observations. First of all, existing state-of-the-art re-weighting and re-sampling methods, such as LDAM and Decoupling, have marginal improvements in minority class. This is as expected since they are prone to over-fitting to minority class and cannot perfectly solve the structure diversity problem. Secondly, we observe that the proposed GraphDIVE outperforms baseline and existing imbalanced learning methods by a remarkable margin. These improvements suggest that GraphDIVE can successfully alleviate the prediction bias towards majority class and boost performance for minority class. \begin{figure} \centering \centerline{\includegraphics[width=\linewidth]{figs/acc_bar.pdf}} \caption{Classification accuracy of minor class on BACE and BBBP dataset.} \label{fig:minority} \end{figure} Moreover, we take a further step to analyze why GraphDIVE can alleviate the bias. As shown in Figure \ref{fig:pie_chart}, Class 0 and Class 1 denote the majority class and minority class, respectively. It can be observed that the classification of different classes relies on different experts. For example, for the setting with three experts, Expert 1 dominates the classification for the minority class while Expert 2 dominates the classification for the majority class. This phenomenon demonstrates that the proposed GraphDIVE successfully captured the semantic structure, i.e., each expert is responsible for a subset of graphs. For the expert which dominates the classification of minority class, its corresponding subset contains more minority class. So training procedure of this expert is less likely to be biased towards majority class. We also investigate the impact of expert numbers. Please refer to supplementary materials for more detailed information. \begin{figure} \centering \centerline{\includegraphics[width=\linewidth]{figs/pie_chart.pdf}} \caption{The weights of experts output by gating network on BACE dataset. The classification of different classes relies on different experts.} \label{fig:pie_chart} \end{figure} \subsection{Effect of gating mechanism} \begin{table}[] \caption{Ablation study on gating network.} \label{tbl:gate_ablation} \resizebox{\linewidth}{!}{ \begin{tabular}{lc|ccc} \toprule && BACE & BBBP & SIDER-3 \\ \midrule &GCN& 79.15$\pm$1.44 & 68.87$\pm$1.51 & 36.11$\pm$11.40 \\ \midrule &DIVE-no-gate & 80.99$\pm$0.92 & 68.12$\pm$0.59 & 41.71$\pm$7.50 \\ &GraphDIVE & \textbf{82.41$\pm$1.37} & \textbf{69.39$\pm$1.21} & \textbf{49.62$\pm$4.44}\\ \bottomrule \end{tabular} } \end{table} To verify the effectiveness of our proposed gating mechanism, we conduct an ablation experiment on three single-task datasets. We select GCN as a feature extractor and assign four experts. We replace the gating network with simple arithmetic mean operation on predictions of multiple experts. The model is called Dive-mean accordingly. As Table \ref{tbl:gate_ablation} shows, compared with GraphDIVE, Dive-mean (i.e., DIVE-no-gate) reduces test ROC-AUC by relative 61.33\% on average. Dive-mean may even degrade the performance on BBBP dataset. These results verify the effectiveness of the gating network. Notably, DIVE-mean almost shares the same number of parameters as GraphDIVE. Comparing GCN and DIVE-mean, it can also be seen that simply adding network parameters by introducing more experts cannot bring enough improvement. To sum up, the above results suggest that both the expert network (refer to Section \ref{exp:experts}) and the gating network are needed to boost the performance of imbalanced graph classification. \section{Conclusion} In this paper, we have introduced GraphDIVE, a mixture of diverse experts framework for imbalanced graph classification. GraphDIVE employs a gating network to learn a soft partition of the dataset, in which process the semantically different graphs are grouped into different subsets. Then diverse experts are trained based on their corresponding subsets. Considering whether to use prior distribution or posterior distribution, we design two model variants and investigate their effectiveness. Besides, we also extend another two variants specially for multi-task setting. The theoretical analysis shows that GraphDIVE can optimize the exact evidence lower bound with the above divide-and-conquer principle. We have conducted comprehensive experiments using various real-world datasets and practical settings. GraphDIVE consistently advances the performance over various baselines and imbalanced learning methods. Further studies exhibited the rationality and effectiveness of GraphDIVE. \nocite{langley00}
\section{Introduction} Among the oldest objects in the Universe ($t>10$ Gyr) RR Lyrae stars (RRLs) are pulsating variables with low masses (M$\leq$0.85 M$_{\odot}$) and helium-burning cores, which place them on the horizontal branch (HB) evolutionary sequence. RRLs are one of the most numerous type of pulsating stars, commonly found in globular clusters (GCs) and in galaxies hosting an old stellar component. The visual absolute magnitude of RRLs does not vary significantly with period, because these variables are found on the HB, but has been found and predicted to depend on metallicity according to a luminosity--metallicity relation (M$_V$--[Fe/H]) which is fundamental for the use of RRLs as primary distance indicators (\citealt{vanAlbada&Baker1971}; \citealt{San81a,San81b}). On the other hand, the dependence of the $V$--$K$ colour on effective temperature leads to the occurrence of a near-infrared (NIR) Period--Luminosity--Metallicity ($PLZ$) relation for RRLs, first empirically observed by \cite{Lon86}. As comprehensively discussed by \cite{Nem94}, the effect of reddening is significantly reduced in the NIR compared with optical wavelengths \citep[A$_{Ks}$/A$_{V} \sim 1/9$, ][]{cardelli1989} and the amplitude of pulsation is smaller than in the optical \citep[Amp$_{Ks}$/Amp$_{V} \sim 1/4$, e. g. ][]{Braga2018}, allowing the derivation of precise mean magnitudes even based on a limited number of observations. This makes the RRL $PLZ$ NIR relations an even more powerful tool to measure distances than its optical counterparts. Moreover, tighter relations are derived by introducing a colour term to the $PL$ relation. In particular the Wesenheit function \citep{vanden75, madore1982} includes a color term whose coefficient is equal to the ratio of the total-to-selective extinction in a filter pair [$ W(X, Y)= X - R_X \times (X - Y )$]. As such the period-Wesenheit (PW) relation is reddening-free by definition. The Large Magellanic Cloud (LMC) is a dwarf irregular galaxy hosting several different stellar populations from old, to intermediate, to young, as well as a number of star forming regions. It is one of the closest companions of the Milky Way and the first rung of the astronomical distance ladder. Along with the Small Magellanic Cloud (SMC), the LMC is part of the Magellanic System which also comprises the Bridge connecting the two Clouds and the Magellanic Stream. The RRLs trace the oldest stellar component and probe the structure of the LMC and SMC haloes, as opposed to Classical Cepheids (CCs), which trace regions of recent star formation like the LMC bar and spiral arms \citep{Mor14}. The Magellanic RRLs have been observed in optical passbands and catalogued systematically by a number of different microlensing surveys: the Massive Compact Halo Objects survey (MACHO; \citealt{Alc97}), the Optical Gravitational Lensing Experiment (OGLE; \citealt{Uda97,Soszynski2016,Soszynski2019}), the Experi\'{e}nce pour la Recherche d'Objets Sombres 2 survey (EROS-2; \citealt{Tis07}) and, most recently, by the $Gaia$ mission (\citealt{prusti2016,brown2016,brown2018} and references therein). $Gaia$ is repeatedly monitoring the whole sky down to a limiting magnitude $G\sim$ 20.7--21 mag. By fully mapping the Magellanic System $Gaia$ is increasing the census of RRLs, revealing the whole extension of the LMC and SMC haloes as well of the Bridge region (see, e.g. figs. 42 and 43 of \citealt{Cle19}). About 2000 new RRLs published in the {\it Gaia} Data Release 2 (DR2; \citealt{Cle19}) were discovered in the Magellanic System; about 850 are outside and the remaining 1150 are inside the OGLE footprint as described by \citet{Soszynski2019}. Nevertheless, the RRL catalogues published by OGLE \citep[e.g.][]{Sos09, Sos12, Soszynski2016, Soszynski2019} still represent fundamental references for the Magellanic System RRLs, since they provide light curves in the standard Johnson--Cousins $V_J, I_C$ passbands for about 48,000 of these variables, along with their pulsation period ({\it P}), mean magnitude and amplitude in the $I$ band, and the main Fourier parameters of their light curves. At NIR wavelengths, an unprecedented step forward in our knowledge of the properties of the RRLs in the Magellanic System is being provided by the VISTA $Y, J, K_\mathrm{s}$ survey of the Magellanic Clouds system (VMC\footnote{\url{http://star.herts.ac.uk/~mcioni/vmc}}, \citealt{Cio11}). The survey aims at studying the star formation history (SFH) and the three-dimensional (3-D) structure of the LMC, the SMC, the Bridge and of a small section of the Magellanic Stream. The approach used to derive the SFH is based on a combination of model single-burst populations that best describes the observed colour--magnitude diagrams (CMDs; see e.g., \citealt{Rub12,Rub15,Rub18}). The 3-D geometry, instead, is inferred from different distance indicators such as the luminosity of red clump stars \citep[RCs; see e.g.][]{subramanian2017} and the NIR $PL$ relations of pulsating variable stars. Results for Magellanic System pulsating stars, based on the VMC $K_\mathrm{s}$-band light curves, were presented by \cite{Rip12a} and \cite{Mur15, Mur18b} for RRLs; by \cite{Rip12b,Rip16,Rip17} and \cite{Mor16} for CCs; by \cite{Rip14,Rip15} for anomalous and Type II Cepheids; whereas results for contact eclipsing binaries observed by the VMC were presented by \cite{Mur14}. A first comparative analysis of the 3-D structure of the LMC and SMC, as traced by RRLs, CCs and binaries separately, was presented by \cite{Mor14}. In the optical a complete reconstruction of the 3-D LMC was performed by \citet{debandsingh2014} using RRLs and OGLE data. NIR PL relations for RRLs in small regions of the LMC were obtained by a few authors before the present paper. \citet{sze2008} obtained deep NIR $J$ and $K$ band observations of six fields near the centre of the LMC. \citet{Bor09} investigated the metallicity dependence of the NIR PL in the $K$ band for 50 LMC RRLs. They found a very mild dependence of the PL relation on metallicity. \citet{Mur15} presented results from the analysis of 70 RRLs located in the bar of the LMC. Combining spectroscopic metallicities and VMC $K_\mathrm{s}$ photometry, they derived a new NIR PLZ relation. In this paper we present results from an analysis of VMC $Y$-, $J$-, $K_\mathrm{s}$- and OGLE $V$-, $I$-band light curves of $\sim$ 29,000 LMC RRLs. Optical and NIR data used in this study are presented in Section 2. Section 3 describes in detail all relevant steps in our analysis to derive the {\it PL(Z)} and {\it PW(Z)} relations for the LMC RRLs. Section 4 presents the 3-D structure of the LMC as traced by the RRLs. Finally, Section 5 summarises the results and our main conclusions. \section{data}\label{sec:data} The observations of the VMC survey are 100 per cent complete with a total number of 110 fully completed 1.77 deg$^2$ VMC tiles, except for a few small gaps, of which 68 cover the LMC, 13 are located in the Bridge, 27 cover the SMC, and two are in the Stream \citep[ see Figure 1 in][]{Cio17}. The VMC survey was carried out with the VISTA telescope which is located at Paranal Observatory in Chile. VISTA has a primary mirror of 4.1 m diameter at whose focus is placed the VISTA InfraRed CAMera (VIRCAM) a wide-field infrared imager. For the VMC survey the $Y$, $J$ and $K_s$ filters were used. To specifically enable the study of variable stars the survey obtained $K_\mathrm{s}$ photometry in time-series mode with a minimum number of eleven deep epochs (each with 750 s exposure time per tile) and two shallow epochs (each with 375 s exposure time per tile), which allow an optimal sampling of the light curves for RRLs and for CCs with periods of up to around 20--30 days, thus providing the first comprehensive multi-epoch NIR catalogue of Magellanic System variables. Further details about the properties of the VMC data obtained for variable stars can be found in \cite{Mor14}. The VMC images were processed by the Cambridge Astronomical Survey Unit (CASU) through the VISTA Data Flow System (VDFS) pipeline. The reduced data were then sent to the Wide Field Astronomy Unit (WFAU) in Edinburgh where the single epochs were stacked and catalogued by the Vista Science Archive (VSA; Lewis, Irwin \& Bunclark 2010; Cross et al. 2012). The VMC $K_\mathrm{s}$-band time-series reach a signal-to-noise ratio (S/N) of $~$5 at $K_\mathrm{s} \sim $19.3 mag. For comparison, the IRSF Near-Infrared Magellanic Clouds Survey \citep{Kat07} reaches $K_\mathrm{s} \sim$ 17.0 mag for the same S/N level. The sensitivity and limiting magnitude achieved by the VMC survey allow us to obtain $K_{\mathrm{s}}$ light curves for RRLs in both Magellanic Clouds (MCs). Furthermore, the large area coverage of the VMC enables, for the first time, to systematically study the NIR $PL$ relation of RRLs across the whole Magellanic System. \begin{figure} \begin{centering} \includegraphics[width=8.6cm, height=8.6cm, clip]{prova1.jpg} \caption{VMC coverage of the LMC. Black dots mark the $\sim 22,000$ RRLs analysed in this paper. Red dots are RRLs present in the $Gaia$ catalogue only. The centre of the map is $\alpha_0$=81.0 deg and $\delta_0$=$-$69.0 deg. The blue circle, magenta square and green triangle indicate the GCs NGC~2210, NGC~1835 and NGC~1786, respectively (see Section 4.3).}\label{fig:RR_LMCmap} \end{centering} \end{figure} We cross-matched the VMC catalogue with the OGLE catalogue of RRLs in the LMC \citep{Soszynski2016,Soszynski2019} and with the catalogue of confirmed LMC RRLs published as part of $Gaia$ DR2 \citep{Cle19}. We used $Gaia$ DR2 as the more recent eDR3 \citep{brown2020} does not contain an updated list of variable sources. This will become available with DR3 in 2022. The total number of OGLE RRLs in the VMC footprint is $\sim 35,000$, but in our analysis we considered only the OGLE fundamental-mode (RRab) and first-overtone pulsators (RRc): (i) for which both $V$ and $I$ light curves are available, (ii) without flags in the OGLE catalogue such as: uncertain, secondary period, possible Anomalous Cepheid, possible $\delta$ Scuti star, etc., and (iii) with a VMC counterpart found within 1 arcsec. Our total sample thus selected included 28,132 RRLs (21,152 RRab and 6,980 RRc). Furthermore, we cross-matched the {\it Gaia} catalogue of confirmed RRLs with the general catalogue of VMC sources in the LMC field of view. This allowed us to recover an additional 524 RRLs (357 RRab, and 167 RRc) which were missing in the OGLE catalogue of LMC RRLs. $Gaia$ has a smoother spatial sampling than OGLE thus allowing to recover additional RRLs in regions near to CCD edges and/or across inter-CCD gaps of the OGLE camera. Figure~\ref{fig:RR_LMCmap} shows the spatial distribution of the full sample of RRLs analysed in this work. The {\it X} and {\it Y} coordinates are defined as in \cite{VC01} with $\alpha_0$=81.0 deg and $\delta_0$=$-$69.0 deg. Table~\ref{tab:matching} provides centre coordinates for the 68 VMC tiles covering the LMC and the number of RRLs contained in each tile. \linespread{1} \begin{table*} \caption{VMC tiles in the LMC analysed in the present study: (1) field and tile number; (2), (3) coordinates of the tile centre, J2000 epoch; (4) total number of RRLs in the tile, (5) extinction $E(V-I)$ and (6) absorption in the $K_{\mathrm{s}}$ band (see Section~3.3); (7) average period of the RRab stars in the tile and (8) dispersion of the average period of the RRab stars (see Section 2); (9), (10), (11), (12) and (13) coefficients of the $PL$ relations (in the form: $K_{\mathrm{s}_0}$=$a$ + $b$ $\times\log P$) for RRab and fundamentalised (by adding 0.127 to the logarithm of the first overtone period) RRc stars and their uncertainties (see Section 3.4).} \label{tab:matching} \tiny \begin{tabular}{l|c|c|c|c|c|c|l|c|c|c|l|l} \hline Tile & R.A. & Dec & N~~~ & $\langle E(V-I)\rangle$ & $\langle AK_{\mathrm{s}}\rangle$ & $\langle Pab \rangle$ & $\sigma_{\rm Pab}$ & $a$ & $b$ & $\sigma_{ a}$ & $\sigma_{ b}$ & rms \\ &($^h$:$^m$:$^s$) &($^{\circ}$:$^{\prime}$:$^{\prime\prime}$) & & (mag) & (mag) & (d) & (d) & (mag) & (mag) & (mag) & (mag) & \\ \hline LMC 2\_3 & 04:48:04 & $-$74:54:11 & 84 & 0.121 & 0.035 & 0.577 & 0.067 & 17.45 & $-$2.56 & 0.05 & 0.17 & 0.11 \\ LMC 2\_4 & 05:04:43 & $-$75:04:45 & 111 & 0.134 & 0.039 & 0.586 & 0.061 & 17.50 & $-$2.34 & 0.04 & 0.15 & 0.11 \\ LMC 2\_5 & 05:21:39 & $-$75:10:50 & 125 & 0.158 & 0.046 & 0.575 & 0.066 & 17.44 & $-$2.41 & 0.04 & 0.17 & 0.12 \\ LMC 2\_6 & 05:38:43 & $-$75:12:21 & 107 & 0.128 & 0.037 & 0.596 & 0.082 & 17.38 & $-$2.68 & 0.04 & 0.17 & 0.13 \\ LMC 2\_7 & 05:55:46 & $-$75:09:17 & 82 & 0.145 & 0.042 & 0.577 & 0.066 & 17.43 & $-$2.35 & 0.06 & 0.21 & 0.12 \\ LMC 3\_2 & 04:37:05 & $-$73:14:30 & 114 & 0.105 & 0.031 & 0.594 & 0.064 & 17.46 & $-$2.53 & 0.04 & 0.14 & 0.10 \\ LMC 3\_3 & 04:52:00 & $-$73:28:09 & 170 & 0.111 & 0.032 & 0.587 & 0.069 & 17.43 & $-$2.65 & 0.03 & 0.11 & 0.11 \\ LMC 3\_4 & 05:07:14 & $-$73:37:50 & 216 & 0.127 & 0.037 & 0.580 & 0.063 & 17.45 & $-$2.55 & 0.03 & 0.11 & 0.11 \\ LMC 3\_5 & 05:22:43 & $-$73:43:25 & 250 & 0.121 & 0.035 & 0.589 & 0.072 & 17.42 & $-$2.59 & 0.03 & 0.10 & 0.12 \\ LMC 3\_6 & 05:38:18 & $-$73:44:51 & 218 & 0.133 & 0.038 & 0.578 & 0.064 & 17.42 & $-$2.54 & 0.03 & 0.12 & 0.12 \\ LMC 3\_7 & 05:53:52 & $-$73:42:06 & 160 & 0.115 & 0.033 & 0.579 & 0.082 & 17.45 & $-$2.39 & 0.03 & 0.12 & 0.12 \\ LMC 3\_8 & 06:09:17 & $-$73:35:12 & 138 & 0.118 & 0.034 & 0.573 & 0.059 & 17.38 & $-$2.51 & 0.04 & 0.16 & 0.12 \\ LMC 4\_2 & 04:41:31 & $-$71:49:16 & 232 & 0.139 & 0.040 & 0.581 & 0.062 & 17.46 & $-$2.52 & 0.03 & 0.11 & 0.11 \\ LMC 4\_3 & 04:55:19 & $-$72:01:53 & 311 & 0.110 & 0.032 & 0.584 & 0.068 & 17.45 & $-$2.62 & 0.02 & 0.09 & 0.10 \\ LMC 4\_4 & 05:09:24 & $-$72:10:50 & 485 & 0.080 & 0.023 & 0.578 & 0.067 & 17.47 & $-$2.46 & 0.02 & 0.08 & 0.12 \\ LMC 4\_5 & 05:23:40 & $-$-72:16:00 & 522 & 0.082 & 0.024 & 0.582 & 0.077 & 17.42 & $-$2.60 & 0.02 & 0.07 & 0.12 \\ LMC 4\_6 & 05:38:00 & $-$72:17:20 & 431 & 0.097 & 0.028 & 0.576 & 0.066 & 17.44 & $-$2.46 & 0.02 & 0.09 & 0.13 \\ LMC 4\_7 & 05:52:20 & $-$72:14:50 & 262 & 0.105 & 0.031 & 0.578 & 0.066 & 17.43 & $-$2.43 & 0.03 & 0.11 & 0.12 \\ LMC 4\_8 & 06:06:33 & $-$72:08:31 & 143 & 0.102 & 0.030 & 0.581 & 0.070 & 17.37 & $-$2.67 & 0.04 & 0.14 & 0.11 \\ LMC 4\_9 & 06:20:33 & $-$71:58:27 & 122 & 0.078 & 0.023 & 0.589 & 0.076 & 17.27 & $-$2.90 & 0.04 & 0.15 & 0.12 \\ LMC 5\_1 & 04:32:44 & $-$70:08:40 & 154 & 0.109 & 0.032 & 0.593 & 0.068 & 17.42 & $-$2.71 & 0.03 & 0.10 & 0.10 \\ LMC 5\_2 & 04:45:19 & $-$70:23:44 & 288 & 0.149 & 0.043 & 0.584 & 0.071 & 17.50 & $-$2.35 & 0.03 & 0.10 & 0.12 \\ LMC 5\_3 & 04:58:12 & $-$70:35:28 & 618 & 0.086 & 0.025 & 0.583 & 0.067 & 17.46 & $-$2.57 & 0.02 & 0.07 & 0.13 \\ LMC 5\_4 & 05:11:17 & $-$70:43:46 & 1138 & 0.082 & 0.02 & 0.582 & 0.069 & 17.44 & $-$2.60 & 0.02 & 0.06 & 0.15 \\ LMC 5\_5 & 05:24:30 & $-$70:48:34 & 1349 & 0.085 & 0.024 & 0.578 & 0.070 & 17.47 & $-$2.42 & 0.02 & 0.06 & 0.16 \\ LMC 5\_6 & 05:37:48 & $-$70:49:49 & 946 & 0.136 & 0.039 & 0.575 & 0.072 & 17.43 & $-$2.52 & 0.02 & 0.08 & 0.17 \\ LMC 5\_7 & 05:51:05 & $-$70:47:31 & 512 & 0.133 & 0.039 & 0.574 & 0.067 & 17.41 & $-$2.53 & 0.02 & 0.09 & 0.14 \\ LMC 5\_8 & 06:04:16 & $-$70:41:40 & 190 & 0.084 & 0.024 & 0.580 & 0.065 & 17.41 & $-$2.48 & 0.03 & 0.10 & 0.11 \\ LMC 5\_9 & 06:17:18 & $-$70:32:21 & 151 & 0.088 & 0.025 & 0.585 & 0.066 & 17.42 & $-$2.43 & 0.03 & 0.12 & 0.10 \\ LMC 6\_1 & 04:36:49 & $-$68:43:51 & 213 & 0.084 & 0.024 & 0.576 & 0.069 & 17.43 & $-$2.59 & 0.03 & 0.11 & 0.13 \\ LMC 6\_2 & 04:48:39 & $-$68:57:56 & 352 & 0.137 & 0.040 & 0.577 & 0.070 & 17.45 & $-$2.54 & 0.03 & 0.09 & 0.13 \\ LMC 6\_3 & 05:00:42 & $-$69:08:54 & 776 & 0.090 & 0.026 & 0.578 & 0.072 & 17.47 & $-$2.53 & 0.02 & 0.08 & 0.17 \\ LMC 6\_4 & 05:12:56 & $-$69:16:39 & 1305 & 0.094 & 0.027 & 0.581 & 0.074 & 17.47 & $-$2.47 & 0.02 & 0.07 & 0.19 \\ LMC 6\_5 & 05:25:16 & $-$69:21:08 & 1294 & 0.100 & 0.029 & 0.580 & 0.071 & 17.52 & $-$2.35 & 0.02 & 0.07 & 0.20 \\ LMC 6\_6 & 05:37:40 & $-$69:22:18 & 978 & 0.197 & 0.057 & 0.575 & 0.071 & 17.41 & $-$2.68 & 0.02 & 0.08 & 0.18 \\ LMC 6\_7 & 05:50:03 & $-$69:20:09 & 436 & 0.194 & 0.056 & 0.581 & 0.075 & 17.36 & $-$2.64 & 0.02 & 0.09 & 0.14 \\ LMC 6\_8 & 06:02:21 & $-$69:14:42 & 190 & 0.059 & 0.017 & 0.585 & 0.064 & 17.37 & $-$2.55 & 0.03 & 0.11 & 0.11 \\ LMC 6\_9 & 06:14:33 & $-$69:06:00 & 129 & 0.057 & 0.017 & 0.580 & 0.067 & 17.33 & $-$2.54 & 0.03 & 0.12 & 0.10 \\ LMC 6\_10 & 06:26:32 & $-$68:54:06 & 103 & 0.073 & 0.021 & 0.585 & 0.066 & 17.30 & $-$2.68 & 0.04 & 0.14 & 0.10 \\ LMC 7\_1 & 04:40:09 & $-$67:18:20 & 125 & 0.070 & 0.020 & 0.585 & 0.077 & 17.45 & $-$2.52 & 0.04 & 0.15 & 0.12 \\ LMC 7\_2 & 04:51:35 & $-$67:31:57 & 291 & 0.097 & 0.028 & 0.584 & 0.072 & 17.44 & $-$2.57 & 0.03 & 0.10 & 0.13 \\ LMC 7\_3 & 05:02:55 & $-$67:42:15 & 477 & 0.089 & 0.026 & 0.572 & 0.072 & 17.43 & $-$2.62 & 0.02 & 0.08 & 0.14 \\ LMC 7\_4 & 05:14:24 & $-$67:49:31 & 749 & 0.102 & 0.030 & 0.577 & 0.072 & 17.47 & $-$2.43 & 0.02 & 0.07 & 0.14 \\ LMC 7\_5 & 05:25:58 & $-$67:53:42 & 709 & 0.137 & 0.040 & 0.579 & 0.073 & 17.44 & $-$2.50 & 0.02 & 0.07 & 0.13 \\ LMC 7\_6 & 05:37:35 & $-$67:54:47 & 440 & 0.116 & 0.034 & 0.582 & 0.069 & 17.42 & $-$2.46 & 0.02 & 0.08 & 0.13 \\ LMC 7\_7 & 05:49:12 & $-$67:52:45 & 265 & 0.113 & 0.033 & 0.581 & 0.064 & 17.35 & $-$2.57 & 0.03 & 0.10 & 0.12 \\ LMC 7\_8 & 06:00:45 & $-$67:47:38 & 162 & 0.056 & 0.016 & 0.598 & 0.074 & 17.38 & $-$2.38 & 0.03 & 0.11 & 0.11 \\ LMC 7\_9 & 06:12:12 & $-$67:39:26 & 100 & 0.051 & 0.015 & 0.579 & 0.075 & 17.32 & $-$2.65 & 0.03 & 0.12 & 0.10 \\ LMC 7\_10 & 06:23:29 & $-$67:28:15 & 48 & 0.061 & 0.018 & 0.599 & 0.078 & 17.40 & $-$2.23 & 0.06 & 0.22 & 0.11 \\ LMC 8\_2 & 04:54:12 & $-$66:05:48 & 186 & 0.104 & 0.030 & 0.593 & 0.071 & 17.43 & $-$2.58 & 0.03 & 0.12 & 0.12 \\ LMC 8\_3 & 05:04:54 & $-$66:15:30 & 238 & 0.071 & 0.020 & 0.580 & 0.071 & 17.38 & $-$2.62 & 0.03 & 0.12 & 0.13 \\ LMC 8\_4 & 05:15:43 & $-$66:22:20 & 301 & 0.095 & 0.028 & 0.582 & 0.071 & 17.42 & $-$2.45 & 0.03 & 0.10 & 0.13 \\ LMC 8\_5 & 05:26:38 & $-$66:26:16 & 287 & 0.086 & 0.025 & 0.585 & 0.075 & 17.38 & $-$2.56 & 0.03 & 0.10 & 0.12 \\ LMC 8\_6 & 05:37:34 & $-$66:27:16 & 255 & 0.082 & 0.024 & 0.586 & 0.067 & 17.37 & $-$2.50 & 0.03 & 0.11 & 0.13 \\ LMC 8\_7 & 05:48:30 & $-$66:25:20 & 172 & 0.073 & 0.021 & 0.575 & 0.066 & 17.34 & $-$2.54 & 0.04 & 0.14 & 0.13 \\ LMC 8\_8 & 05:59:23 & $-$66:20:29 & 145 & 0.040 & 0.012 & 0.596 & 0.077 & 17.36 & $-$2.52 & 0.03 & 0.11 & 0.10 \\ LMC 8\_9 & 06:10:11 & $-$66:12:44 & 101 & 0.062 & 0.018 & 0.582 & 0.071 & 17.30 & $-$2.54 & 0.04 & 0.16 & 0.11 \\ LMC 9\_3 & 05:06:41 & $-$64:48:40 & 111 & 0.052 & 0.015 & 0.594 & 0.067 & 17.45 & $-$2.30 & 0.04 & 0.15 & 0.12 \\ LMC 9\_4 & 05:16:55 & $-$64:55:08 & 178 & 0.061 & 0.018 & 0.581 & 0.067 & 17.38 & $-$2.46 & 0.03 & 0.11 & 0.11 \\ LMC 9\_5 & 05:27:14 & $-$64:58:49 & 209 & 0.072 & 0.021 & 0.582 & 0.063 & 17.38 & $-$2.40 & 0.03 & 0.10 & 0.11 \\ LMC 9\_6 & 05:37:35 & $-$64:59:44 & 163 & 0.059 & 0.017 & 0.582 & 0.063 & 17.28 & $-$2.67 & 0.03 & 0.12 & 0.11 \\ LMC 9\_7 & 05:47:55 & $-$64:57:53 & 117 & 0.068 & 0.020 & 0.589 & 0.065 & 17.35 & $-$2.37 & 0.04 & 0.14 & 0.11 \\ LMC 9\_8 & 05:58:13 & $-$64:53:15 & 114 & 0.047 & 0.014 & 0.588 & 0.071 & 17.31 & $-$2.49 & 0.04 & 0.14 & 0.10 \\ LMC 9\_9 & 06:08:26 & $-$64:45:53 & 61 & 0.083 & 0.024 & 0.568 & 0.062 & 17.23 & $-$2.81 & 0.06 & 0.20 & 0.12 \\ LMC 10\_4 & 05:18:01 & $-$63:27:54 & 107 & 0.045 & 0.013 & 0.583 & 0.070 & 17.37 & $-$2.49 & 0.03 & 0.12 & 0.09 \\ LMC 10\_5 & 05:27:49 & $-$63:31:23 & 116 & 0.061 & 0.018 & 0.587 & 0.065 & 17.33 & $-$2.59 & 0.04 & 0.14 & 0.11 \\ LMC 10\_6 & 05:37:38 & $-$63:32:13 & 105 & 0.077 & 0.022 & 0.585 & 0.066 & 17.36 & $-$2.38 & 0.04 & 0.14 & 0.11 \\ LMC 10\_7 & 05:47:26 & $-$63:30:25 & 91 & 0.050 & 0.015 & 0.581 & 0.070 & 17.32 & $-$2.53 & 0.05 & 0.19 & 0.12 \\ \hline \end{tabular} \medskip \end{table*} \linespread{1.3} Time-series $Y$, $J$ and $K_\mathrm{s}$ photometry for the RRLs observed by the VMC survey is provided in Table~\ref{tab:lc}. The table contains the Heliocentric Julian Date (HJD) of the observations inferred from the VSA (column 1), the $Y$, $J$ and $K_\mathrm{s}$ magnitudes obtained using an aperture photometry diameter of 2.0 arcsec (column 2), and the error on the magnitudes (column 3). The light curves contain only epoch data observed within pre-defined constraints, that is with conditions of seeing $< 1^{\prime\prime}$ for $K_\mathrm{s}$, $< 1.2^{\prime\prime}$ for $Y$ and, $< 1.1^{\prime\prime}$ for $J$, airmass $<$1.7 and moon distance $> 70^o$ \citep{Cio11}. The full catalogue of light curves is available in the electronic version of the paper. \linespread{1} \begin{table} \caption{$Y$, $J$ and $K_\mathrm{s}$ time-series photometry for the RRLs analysed in this paper. The table is published in its entirety as Supporting Information with the electronic version of the article. A portion is shown here for guidance regarding its format and content. } \label{tab:lc} \begin{center} \begin{tabular}{c|c|c} \hline \hline \multicolumn{3}{c}{{ VMC-558396536162}}\\ \hline HJD$-$2400000 & $Y$ & err$_Y$ \\ \hline 55583.680443 & 18.24 & 0.02\\ 55597.606813 & 18.42 & 0.03\\ 55878.818319 & 18.39 & 0.03\\ 55983.600130 & 18.30 & 0.02\\ 56004.513472 & 18.51 & 0.03\\ \hline HJD$-$2400000 & $J$ & err$_J$ \\ \hline 55589.666983 & 18.07 & 0.02\\ 55615.569205 & 18.13 & 0.03\\ 55980.563227 & 18.10 & 0.03\\ 56004.533138 & 18.22 & 0.04\\ \hline HJD$-$2400000 & $K_\mathrm{s}$ & err$_{K\mathrm{s}}$ \\ \hline 55979.576519 & 17.73 & 0.05\\ 55980.586298 & 17.78 & 0.08\\ 55981.562849 & 17.71 & 0.05\\ 55983.620398 & 17.78 & 0.07\\ 55986.562678 & 17.83 & 0.06\\ 55992.575373 & 17.80 & 0.07\\ 56009.519064 & 17.76 & 0.07\\ 56178.854539 & 17.78 & 0.05\\ 56197.794262 & 17.86 & 0.06\\ 56214.835096 & 17.89 & 0.06\\ 56232.750233 & 17.77 & 0.05\\ 56232.792530 & 17.76 & 0.05\\ 56255.668172 & 17.89 & 0.06\\ 57044.537788 & 18.05 & 0.13\\ \hline \end{tabular} \end{center} \medskip \end{table} \linespread{1.3} The $K_{\mathrm{s}}$ photometry of the VISTA system is tied to the Two Micron All Sky Survey (2MASS; \citealt{Skr06}) photometry. The complete set of transformation relations from one system to the other is available on the CASU web site\footnote{\url{http://casu.ast.cam.ac.uk/surveys-projects/vista/technical/photometric-properties}} or in the work by \citet{gonz2018}. We used the photometry in the VISTA system v1.5. The periods provided by the OGLE catalogue were used to fold the $Y, J$ and $K_\mathrm{s}$ light curves of the RRLs observed by OGLE, whereas we used the periods provided in the {\it Gaia} DR2 RRL {\it vari}\_table for the sources observed only by {\it Gaia} as the eDR3 release does not contain update information for variable stars like period, epoch of maximum light and photometry. Examples of the $Y$, $J$ and $K_\mathrm{s}$ light curves for an RRab and an RRc star are shown in Figure~\ref{fig:lc_abk}. A complete atlas of light curves is provided in electronic form. The $K_\mathrm{s}$ light curves are very well sampled, with on average, 13--14 sampling points, confirming the soundness of the VMC observing strategy for RRLs. Typical errors for the individual $K_\mathrm{s}$ data points are in the range of 0.06 -- 0.1 mag. The light curves in the $Y$ and $J$ bands have on average four phase points. Average errors for the individual $Y$ and $J$ observations are 0.03 and 0.04 mag, respectively. \begin{figure} \begin{centering} \includegraphics[width=9cm, height=6cm]{lc_multi_zoom.jpg} \caption{$Y$ (green squares), $J$ (red triangles) and $K_\mathrm{s}$ (black dots) light curves for an RRab (top panel) and an RRc (bottom panel) star in the LMC field. The VMC ID and the period are provided in the top left-hand corner. Typical errors for individual $K_\mathrm{s}$ epochs are about 0.06 mag and 0.1 mag for RRab and RRc stars, respectively. For $Y$- and $J$-bands typical errors are 0.03 and 0.07 mag for RRab and RRc stars, respectively.}\label{fig:lc_abk} \end{centering} \end{figure} \linespread{1} \begin{table*} \tiny \caption{List of LMC RRLs analysed in the paper: OGLE~IV ID (5 digit number $-$OGLE-LMC-RRLYR-) or {\it Gaia} DR2 ID ($>$9 digit number) column (1), VMC ID is column (2), J2000 coordinates R.A. and Dec. from the VMC catalog are columns (3) and (4), pulsation mode (column 5), period (column 6) and epoch of maximum light ($-$2456000 for OGLE sources, $-$ 2455197.5 for {\it Gaia} DR2 sources) column (7), metallicity is column (8), absorption in the $K_\mathrm{s}$-band (column 9), number of epochs in the $K_\mathrm{s}$-band (column 10), Y (column 11) and J band (column 12), columns (13), (14), and (15) are average VMC magnitudes: $\langle Y \rangle$, $\langle J \rangle$ and $\langle K_{\mathrm{s}} \rangle$. The table is published in its entirety as Supporting Information with the electronic version of the article. A portion is shown here for guidance regarding its form and content.}\label{tab:RR88} \begin{center} \begin{tabular}{|l|l|c|c|c|c|c|c|c|c|c|c|c|c|c|} \hline \hline ID & ID(VMC) & R.A. & Dec. & Type & $P$ & $T_0$ & [Fe/H] & $A_{K_\mathrm{s}}$ & $N_{K_{\mathrm{s}}}$ & $N_{Y}$ & $N_{J}$ & $\langle K_\mathrm{s} \rangle$ & $\langle Y \rangle$ &$\langle J \rangle$ \\ & & deg & deg & & (d) & (d) & dex & (mag) & & & & (mag) & (mag) & (mag) \\ \hline 34314 & 558346514686 & 84.202208 & --74.490389 & ab & 0.7040914 & 0.46883 & &0.028 & 26 & 8 & 8 &18.12 &18.64 & 18.50 \\ 33596 & 558346517950 & 82.979042 & --74.501333 & ab & 0.6610381 & 0.29199 & $-$1.424 &0.035 & 13 & 4 & 4 &17.94 &18.39 & 18.21 \\ 35139 & 558346518034 & 85.807625 & --74.498722 & ab & 0.4889976 & 0.25714 & $-$1.592 &0.036 & 13 & 4 & 4 &18.20 &18.88 & 18.66 \\ 34860 & 558346519807 & 85.190208 & --74.510083 & c & 0.3114614 & 0.24308 & $-$1.507 &0.082 & 13 & 4 & 4 &18.45 &18.88 & 18.77 \\ 34267 & 558346526561 & 84.127458 & --74.540444 & ab & 0.53476 & 0.08816 & &0.037 & 13 & 4 & 4 &18.10 &18.53 & 18.32 \\ 34756 & 558346526744 & 85.008125 & --74.538944 & ab & 0.55045 & 0.16538 & &0.082 & 12 & 3 & 4 &17.95 &18.37 & 18.25 \\ 34635 & 558346527385 & 84.747875 & --74.543194 & c & 0.34962 & 0.01419 & $-$1.527 &0.043 & 13 & 4 & 4 &18.41 &18.82 & 18.60 \\ \hline \end{tabular} \end{center} \end{table*} \linespread{1.3} \section{Period--Luminosity and Period--Wesenheit relations}\label{sec:PLk} \subsection{Average NIR magnitudes } Mean $Y, J$ and $K_\mathrm{s}$ magnitudes for the LMC RRLs were derived as a simple mean of magnitudes expressed in flux units, without modelling the light curves. For RRLs observed in the optical, integrating the modelled light curve over the whole pulsation cycle is the correct procedure to derive the mean magnitude. However, in the NIR, amplitudes are so small that the difference between intensity-averaged mean magnitudes of the modelled light curves and the simple mean of the magnitudes in flux units is negligible. A comparison of the two mean values, where the former were computed by modelling the light curves with a Fourier series using the Graphical Analyzer of Time Series package (GRaTIS; custom software developed at the Bologna Observatory by P. Montegriffo, see e.g. \citealt{Cle00}), for a sample of 170 LMC RRLs showed that the differences between the two procedures are less than 0.02 mag, that is, smaller than the average errors of the two methods. Table~\ref{tab:RR88} lists the $Y$, $J$ and $K_\mathrm{s}$ mean magnitudes obtained as simple means of the magnitudes (in flux units) along with the main properties of the stars, namely, OGLE~IV or {\it Gaia} DR2 ID, period, pulsation mode, epoch of maximum light, VMC ID and number of observations in the $K_\mathrm{s}$, $Y$ and $J$ bands. The average magnitudes were used to place the RRLs in the $ J - K_\mathrm{s}$ vs $K_\mathrm{s}$ CMD, shown in Figure~\ref{fig:cmd}. The RRLs are marked with small green dots. \begin{figure} \begin{centering} \includegraphics[width=8cm, height=8cm]{CMDRRLY.pdf} \caption{CMD of all VMC sources matching the {\it Gaia} eDR3 catalogue using the criteria defined in the text. A total of ~6.9 million sources are shown in this diagram. The RRLs analysed in this paper are marked by small green dots.}\label{fig:cmd} \end{centering} \end{figure} To construct the CMD we selected from the {\it Gaia} eDR3 catalogue \citep{brown2020} an area of 8.8 degrees in radius around the centre of the LMC ($\alpha_0$=80.8 deg, $\delta_0$=$-$69.7 deg) which contained more than 25 million objects. We chose this area in order to fully cover the LMC regions tiled by the VMC observations as well as the whole footprint of the OGLE-IV survey. We assumed as bona fide LMC members only sources in the selected area with parallaxes ($\varpi$) and proper motions ($\mu_{\alpha}^{*}, \mu_{\delta}$) satisfying the following criterion: \begin{equation} \begin{split} \sqrt((\varpi-\varpi_{\rm LMC})^{2}+ (\mu_{\alpha}^{*}- {\mu_{\alpha}^{*}}_{\rm LMC})^{2}+\\ (\mu_{\delta}- {\mu_{\delta}}_{\rm LMC})^{2})<1, \end{split} \end{equation} where $\varpi_{\rm LMC}=-0.0040 \pm 0.3346$ mas , ${\mu_{\alpha}^{*}}_{\rm LMC}=1.7608 \pm 0.4472$ mas yr$^{-1}$ and ${\mu_{\delta}}_{\rm LMC}= 0.3038 \pm 0.6375$ mas yr$^{-1}$ are the mean LMC parallax and proper motions from \citet{luri2020}. We then cross-matched the sources satisfying the above condition with the VMC general catalogue, thus obtaining a final sample of $\sim 6.9\times10^6$ sources shown in Figure~\ref{fig:cmd}. The proper motions and parallaxes of the CMD stars are from $Gaia$ eDR3 which contains the most recent and accurate astrometry and photometry available from $Gaia$. \linespread{1} \begin{figure} \begin{center} \includegraphics[width=8.6cm, height=8.6cm]{map_reddening_new.pdf} \end{center} \caption{{\it K$_\mathrm{s}$} band absorption map derived from the RRab stars. The position of each RRL was re-binned to a circle of 30 arcsec in diameter.} \label{fig:redmap} \end{figure} \begin{figure} \begin{center} \includegraphics[width=8.9cm, height=14cm]{tripA.jpg} \end{center} \caption{{\it Bottom:} Spatial distribution of the whole sample of RRLs ($\sim 29,000$) considered in the paper; {\it Middle:} distribution of the RRLs which were actually used to fit the $PL_{K_\mathrm{s}}$ relation ($\sim 22,000$); {\it Top:} distribution of the RRLs which appear to be overluminous in the $PL_{K_\mathrm{s}}$ relation ($\sim 7,000$), hence were discarded. They are mainly located along the LMC bar, thus explaining the gap seen in that region in the middle panel.} \label{fig:trip} \end{figure} \subsection{Reddening from the RR Lyrae stars } For each RRL pulsating in the fundamental mode a reddening estimate was obtained using the relation derived by \cite{Pie02} which provides the intrinsic $V-I$ colour of fundamental-mode RRLs as a function of the star's period and amplitude in the $V$ band: \begin{eqnarray}\label{eq:Piersimoni02} \nonumber{(V-I)_0 = 0.65(\pm0.02) - 0.07(\pm0.01){\rm AmpV}+} \\ {+ 0.36(\pm0.06)\log P ~~~~~~\sigma=0.02}. \end{eqnarray} where periods and amplitudes (in the $I$-band) for the RRLs were taken from the OGLE~IV catalogue \citep{Soszynski2016}, and the $I$-band amplitudes were transformed to $V$-band amplitudes by adopting a fixed amplitude scaling factor of AmpV$/$AmpI=1.58. This value was derived from a statistically significant (75) data set of RRLs in Galactic GCs (see \citealt{DiC11}). The intrinsic $V-I$ colours were then used to derive individual $E(V-I)$ reddening values for each RRL. These $E(V-I)$ values were then converted to extinction in the $Y$, $J$ and $K_\mathrm{s}$ passbands using the coefficients : $A_Y$ = 0.385A$_V$, $A_J$ = 0.283$A_V$, and $A_ K$ = 0.114A$_V$ with $A_V$= 2.4$E(V-I)$ from \citet{kerber2009}, which were derived from the \citet{cardelli1989} extinction curve. The RRL absorption map in the {\it {K$_\mathrm{s}$}} band derived from the RRab stars is shown in Figure~\ref{fig:redmap}. This map was used to estimate by interpolation the absorption for the RRLs in the $Gaia$ sample which lack $V$ and $I$ magnitudes and for the RRc stars for which Equation \ref{eq:Piersimoni02} is not applicable. The complete set of $A_{K_\mathrm{s}}$ values is given in the ninth column of table~\ref{tab:RR88}. It is interesting to note how the most active star forming regions in the LMC like 30 Doradus pop up in the map. All over the LMC the average extinction is small and its value in the $K_\mathrm{s}$ band is: $A_{K_\mathrm{s}}$=0.03 mag with $\sigma=0.02$ mag. A comparison of the reddening values derived from RC stars \citep{Tat13} and the values estimated from RRLs using the \cite{Pie02} formula shows that there is a qualitative agreement between the two methods. However, this agreement should be taken with some caution as \citet{Tat13}'s work is based on stars in a limited area of the LMC, surrounding the 30 Doradus region. Indeed, substantial differences between the reddening maps derived from RCs, background galaxies and RRLs were found for example in the SMC by \citet{bell2020}. These differences most likely arise from RCs, RRLs and background galaxies sampling regions at different depths. In fact, RCs are expected to be embedded in the dust layers, RRLs probably are half in front and half in the background, and galaxies are definitely in the far field. One can thus expect some spatial correlations in the mean extinction values, but not identical values from these different indicators. \subsection{Blended sources}\label{sec:blends} Our first attempt to derive the $PL_{K_\mathrm{s}}$ relation has revealed a number of RRLs brighter than the main relation. We investigated their spatial distribution and found that they are mainly located in the central part of the LMC. This is shown in Figure~\ref{fig:trip} which presents in the bottom panel the spatial distribution of the whole sample of RRLs considered in this paper ($\sim 29,000$), in the top panel the distribution of the RRLs which appear to be overluminous in the $PL_{K_\mathrm{s}}$ relation and, in the middle panel, the distribution of the RRLs which were actually used to fit our final $PL_{K_\mathrm{s}}$ relation. Further investigations, performed using the Fourier parameters ($\phi_{31}, \phi_{21}, R_{21}$ and $R_{31}$) of the light curves available in the OGLE~IV catalogue did not show any particular properties of the overluminous RRLs. On the other hand, in the period--amplitude diagram based on the $I$ amplitudes available in the OGLE~IV catalogue, the bright RRLs all show small, in some cases near-zero amplitudes, compared with regular RRLs of the same period. The decrease in amplitude at a given period can be owing to these RRLs being blended with non-variable stars. We expect the centroid of a blended source to be determined with poor accuracy \citep[see e.g.][]{Rip14,Rip15}. For this reason as a further test we plotted the distribution of distances in arcsec of the VMC sources cross-matched with the OGLE~IV RRLs. A clear separation is now seen in the two samples, for 94\% of the RRLs lying on the $PL/PW$ relations the cross-match radius is less than 0.2 arcsec, whereas for 68\% of the overluminous RRLs the cross-match radius is larger than 0.2 arcsec. The average accuracy of the VMC astrometry is on the order of 0.080 arcsec both in R.A. and in Dec. \citep{Cio11}. We therefore discarded the RRLs with a cross-match radius larger than 0.2 arcsec. A total of 3252 objects were discarded. This procedure allowed us to significantly reduce the scatter on the $PL/PW$ relations. We visually inspected the VMC images of some of the discarded RRLs, confirming that they all are clearly blended with stars and/or background galaxies. Similar investigations were performed in the past and the same effects were noted, e.g. by \citet{Rip15} for Type II Cepheids. The final sample of LMC RRLs after this cleaning procedure contains 25,795 objects. This is the sample that was used as a starting point to investigate the $PL$ and $PW$ relations presented in the following sections. Additional RRLs were later discarded from the final fit based on a 3-$\sigma$ clipping procedure leading to $PL_{K_\mathrm{s}}$ relations using a clean sample of $\sim 22,000$ RRLs. \subsection{Metallicity of the RR Lyrae stars}\label{subsec:RRmet Knowledge of the metallicity ($Z$) is needed to construct $PLZ$ and $PWZ$ relations for RRLs. However, spectroscopic metallicities are available only for a very limited number of LMC RRLs (e.g. \citealt{Gra04,Bor04,Bor06} and references therein). \cite{JK96} and \cite{Mor07} showed that it is possible to derive a ``photometric" estimate of the metal abundance ([Fe/H]) of an RRL of known pulsation period from the $\phi_{31}$ Fourier parameter of the $V$-band light curve decomposition. A new calibration of the $\phi_{31}$--[Fe/H] relation for fundamental-mode and first-overtone RRLs was published by \cite{Nem13}, based on excellent accuracy RRL light curves obtained with the {\it Kepler} space telescope, and metallicities derived from high resolution spectroscopy. This new calibration provides metal abundances directly tied to the metallicity scale of \cite{Car09} which is based on high dispersion spectroscopy and holds for the metallicity range from [Fe/H]$\sim$ 0.0 to $\sim -$2.6 dex. \citet{Skowron2016} applied the calibration of \cite{Nem13} to the OGLE-IV fundamental mode RRLs, obtaining a median metallicity value of [Fe/H]=$ - 1.59 \pm 0.31$ dex for the LMC on the \citet{zinwe1984} scale. Metallicities from \citet{Skowron2016} are available for 16,570 LMC RRab stars in our sample. This sample was used to compute a metallicity map of the LMC. Through the interpolation of this map it was possible to give a metallicity estimate also to the RRc stars. The single [Fe/H] values in \citet{Skowron2016} and the ones derived from the metallicity map, were used to compute the metallicity-dependent relations listed in Tables~\ref{tab:pl} and \ref{tab:pw}. A non-linear least-squares Marquardt--Levenberg algorithm (e.g. \citealt{Mighell1999}) was used to fit the $PLZ$ and $PWZ$ relations along with a 3 $\sigma$ clipping procedure to clean from outliers. Our final $PLZ$ and $PWZ$ relations are based on a sample $\sim 13,000$ RRab and $\sim 5,000$ RRc stars (see Tables~\ref{tab:pl} and \ref{tab:pw}). \subsection{Derivation of the $PL(Z)$ and $PW(Z)$ relations} $PL_{K_{\mathrm{s}}}$(Z) relations were computed using the periods, $\langle K_\mathrm{s} \rangle$ mean magnitudes, absorption values and metallicity for the RRLs listed in Table~\ref{tab:RR88}. We fitted a linear least-squares relation of the form: $m_{X0} = a + b\times\log P + c\times$[Fe/H]. For the global relation (Glob), which includes RRab plus RRc stars, the periods of the RRc stars were fundamentalised using the classical relation $\log P_{FU}{\rm (RRc)}$ = $\log P_{\rm RRc}$ + 0.127 \citep{Iben74}. Only stars with $E(V-I)>0$ mag were considered and an unweighted least-squares fit with 3 $\sigma$ clipping was applied, hence reducing the sample of RRLs actually used to construct the $PL$ relations to around 22,100 sources ($\sim$16,900 RRab and $\sim$5,200 RRc). The same procedure was used to obtain $PL$ relations in the $Y$ and $J$ bands. There are on average only 3--4 phase points for each RRL in the VMC data available in the $Y$ and $J$ bands (see Table~\ref{tab:lc}). Hence, the resulting average magnitudes have larger errors and the $PL$ relations in $Y$ and $J$ have larger rms values than for the $K_\mathrm{s}$ \ band. In the optical we obtained a $PL$ relation in the $I$ band using the OGLE~IV data. The $PL$ and $PLZ$ relations derived using this procedure are summarised in Table~\ref{tab:pl}. In the case of the $PL_{K_\mathrm{s}}$ we also derived individual relations for each VMC tile and their parameters are given in Table~\ref{tab:matching}. Figure~\ref{fig:PLk_all} shows the $PL$ relations in the $I$, $Y$, $J$ and ${K_\mathrm{s}}$ bands obtained for RRab (FU), RRc (FO) on the left and for RRab plus fundamentalised RRc stars (Glob) on the right. \begin{figure} \includegraphics[width=8.9cm, height=9.9cm]{multipl_mod.jpg} \caption{ De-reddened mean magnitudes versus $\log P$, for RRLs in the LMC. Black points are stars retained for the final $PL$ computation. The left-hand panels show RRc (first overtone, FO) and RRab stars (fundamental mode, FU) separately. The right-hand panels show all RRLs after the $\log P$ of the RRc stars was fundamentalised. The magenta lines show the $PL$ relations derived using these data (see Table~\ref{tab:pl}).} \label{fig:PLk_all} \end{figure} Reddening-independent $PW$ relations can be obtained by combining magnitudes and colours in different bands. These reddening free magnitudes were introduced by \cite{vandenB1975} and \cite{madore1982}. They are defined as: $W(X,Y)=m_X$ -- $R(m_Y$--$m_X$) where $X$ and $Y$ are two different passbands and $R$ is the ratio between selective absorption in the $X$ band and colour excess in the adopted colour. These coefficients are fixed according to the \cite{cardelli1989} law. A set of $PW$ and $PWZ$ relations was obtained fitting the VMC $Y$, $J$ and $K_\mathrm{s}$ and OGLE~IV $V$, $I$ photometry to the equation $m_X - R\times(m_Y - m_X)= a+ b\times\log P + c\times$[Fe/H]. The parameters obtained are summarised in Table~\ref{tab:pw}. The PW relations in different bands are presented in Figure~\ref{fig:pws}. \begin{figure} \includegraphics[width=8.9cm, height=10.1cm]{multipwA.jpg} \caption{ As in Figure \ref{fig:PLk_all} but for Wesenheit magnitudes. The magenta lines show the $PW$ relations presented in Table~\ref{tab:pw}.} \label{fig:pws} \end{figure} \subsection{{\it Gaia} Proper Motions for the LMC RR Lyrae stars}\label{gaia} The recently released {\it Gaia} eDR3 catalogue \citep{brown2020} includes proper motions for 21,801 RRLs in our catalogue, with average errors of $\sigma_{\mu_{\alpha}^{*}} \sim 0.30$ and $\sigma_{\mu_{\delta}} \sim 0.32$ mas yr$^{-1}$, respectively. We selected RRL stars in the LMC retaining only sources with proper motions within 1$\sigma$ from the average proper motions in R.A. and Dec. of the whole sample of 21,801 RRLs, that are $\langle{\mu_{\alpha}^{*}}\rangle=1.85$ and $\langle{\mu_{\delta}}\rangle=0.36$ mas yr$^{-1}$, respectively. This resulted in a subsample of 4690 RRLs. A fit of the PL$_{K\mathrm{s}}$ relation using only this {\it Gaia} proper motion-selected sample of RRLs provides: $a$= 17.44 mag, $b=-$2.55 mag, $\sigma_a = 0.01$ mag, $\sigma_b = 0.03$ mag, rms= 0.14. This is consistent with the global relation (Glob) presented in Table~\ref{tab:pl}. A similar analysis was performed for the other PL(Z) and PW(Z) relations presented in table~\ref{tab:pl} and \ref{tab:pw} obtaining always consistent results. This gives us confidence that the $PL$ and $PW$ relations derived in this paper are based on samples of RRLs which are bona fide LMC members. \subsection{Comparison with theory and other papers} As a final step of our analysis of the RRL $PL$ relations we have compared the $PLZ$ and $PWZ$ relations obtained here with the theoretical results of \citet{marconi2015}. Three of our $PLZ$ and six of our $PWZ$ relations have a counterpart in \citet{marconi2015}. A comparison of the matching relations shows that the slopes in period and metallicity are different, with an average difference of 0.53($\pm0.05$) dex units in the $\log P$ term and 0.07($\pm0.01$) dex units in the metallicity term. This is clearly seen in Figure~\ref{fig:confr} where the parameters of some PWZ relations derived in this work are compared with those in the corresponding relations by \citet{marconi2015}. These differences most likely arise from the larger dependence on metallicity of the theoretical relations, which predict metallicity terms on the order of 0.2 mag dex$^{-1}$. Further comparisons with the theoretical pulsation scenario will be discussed in a future paper (M.~I.~Moretti et al., in preparation). Such a large metallicity dependence is not observed for several empirical RRL $PLZ$ relations in the literature \citep[e.g.][]{Del06, Sol08, Bor09}. However, using literature data for Milky Way (MW) field RRLs, \citet{Mur18a} derived an empirical absolute $PLZ(K)$ relation calibrated using {\it Gaia} DR2 parallaxes, which shows a non-negligible dependence on metallicity, in the same direction as that found by the theoretical $PLZ$ relations. Similarly, \citet{sesar2017} and then \citet{neeley2019} using {\it Gaia} DR2 parallaxes found for the metallicity slopes of the PLZ relations values between 0.17 and 0.20 mag dex$^{-1}$. A possible explanation for the differences in the metallicity term (and, in turn, also for the $\log P$ term) is that the RRLs considered by the \citet{marconi2015}, \citet{Mur18a}, \citet{neeley2019} and \citet{sesar2017} span a range in metallicity from $Z$ = 0.0001 to $Z$ = 0.02, while the metallicity of the LMC RRLs covers a much smaller range from $Z$=0.0001 to $Z$=0.001 \citep{carrera2008}, hence lacking the more metal-rich component observed in the MW. A comparison between the coefficients of the PLZ relations for RRab + fundamentalised RRc stars derived in this paper and in those cited above is shown in Figure~\ref{fig:confrpl}. The fit parameters differences range from an almost consistency in 1 $\sigma$ in the $J$ band b parameters to a 6 $\sigma$ difference for c parameters in the same band. Consistently larger differences arise in the $Y$,$J$ and $K_{\mathrm{s}}$ bands for the c parameters. While for the b parameters the largest difference are seen especially for the $K_{\mathrm{s}}$ band. \begin{figure*} \begin{center} \includegraphics[width=8.7cm, height=4.3cm]{provaPWZ_b.jpg}\includegraphics[width=8.7cm, height=4.3cm]{provaPWZ_c.jpg} \end{center} \caption{ Comparison of the coefficients of the PWZ relations for RRab stars derived in this paper with those of the corresponding relations of \citet{marconi2015}. In the left-hand panel are shown the period slopes, while the right-hand panel shows the metallicty slopes. The $W$ indices are labelled as follows: $13=PW(K_{\mathrm{s}}, J), 14=PW(K_{\mathrm{s}}, Y), 15=PW(K_{\mathrm{s}}, I), 16=PW(K_{\mathrm{s}},V), 17=PW(J, I), 18=PW(J, V)$ and $19=PW(I, V)$. } \label{fig:confr} \end{figure*} \begin{figure*} \begin{center} \includegraphics[width=8.7cm, height=4.6cm]{confroPLK.pdf}\includegraphics[width=8.7cm, height=4.6cm]{confroPLK_C.pdf} \end{center} \caption{Comparison of the coefficients of the PLZ relations for RRab + fundamentalised RRc stars derived in this paper with those indicated in the legend. The period slopes are shown in the left-hand panel and the metallicity slopes in the right-hand panel. The errors of Neeley et al. (2019) and Muraveva et al. (2018a) are not reported to avoid confusion. } \label{fig:confrpl} \end{figure*} \section{Structure of the LMC} \subsection{Individual distances to RR Lyrae stars} The $PL$ and $PW$ relations derived in the previous sections can be used to infer the distance to each RRL in our LMC sample once a zero point is adopted. For this analysis we do not rely on the PLZ relations as they are based on a smaller sample than the PL relationships. We assumed as distance to the LMC centre the estimate of \citet{pietrink2013} which corresponds to $d_0= 49.97 \pm 1.12$ kpc or to a distance modulus of $(m-M)_0$ =18.49 mag. However, this choice does not affect our study of the LMC's structure, for which we rely on differential distances. We measured the distance to each RRL using the $PL_{K_{\mathrm{s}}}$ relation and two different versions of the $PWZ$s. Results obtained from the three different relations were then compared. Since the $PWZ$s include a metallicity term, their application is limited to the RRab and RRc sample for which we have metallicities. We chose to adopt the $K_\mathrm{s}$, $J-K_\mathrm{s}$ and the $K_\mathrm{s}$, $V-K_\mathrm{s}$ $PWZ$ relations. We adopted the former because the $K_\mathrm{s}$ and $J$ bands are less sensitive to possible deviations from the colour correction, and the latter because it is weakly dependent on the colour term ($R$=0.13). We opted for the $PL_{K_{\mathrm{s}}}$ relation because it is less affected by reddening, and used the global version, which allowed us to determine the distances to 22,122 RRLs of both RRab and RRc types. The average error in the distance estimate for each RRL is of the order of $\sim 3.5 $ kpc ( $\sim 0.15$ mag). The mean difference between the distances measured using the two $PWZ$ relations is 0.45 pc, whereas the mean difference between distances from the $PW(K_\mathrm{s}$, $V-K_\mathrm{s}$) and the $PL_{K_{\mathrm{s}}}$ relations is 23 pc ($\sim 0.001$ mag), which is very small compared with the average individual error of each RRL. In the following analysis we rely on the distances derived using the $PL_{K_{\mathrm{s}}}$ since it is based on a larger sample of RRLs, it has the smaller rms between the PL relations derived here and the ${K_{\mathrm{s}}}$ band is the one that is less effect by reddening. \subsection{3-D geometry of the LMC} Once the distance to each RRL is determined, it is possible to derive the Cartesian distribution of the RRLs from the R.A., Dec coordinates and the individual distances using the method described by \citet{VC01} and \citet{wei2001}: \begin{align} x &= -d~{\rm sin}(\alpha - \alpha_0){\rm cos} \delta \nonumber \\ y &= d~{\rm sin} \delta {\rm cos} \delta_0 - d~{\rm sin} \delta_0 {\rm cos} (\alpha - \alpha_0 ) {\rm cos} \delta \\ z &= d_0 - d~{\rm sin}\delta {\rm sin} \delta_0 - d~{\rm cos} \delta_0 {\rm cos} (\alpha - \alpha_0) {\rm cos} \delta \nonumber , \end{align} where $d$ is the individual distance to each RRL, $d_0$ is the distance to the LMC centre and ($\alpha_0$, $\delta_0$) are the R.A. and Dec. coordinates of the LMC centre. We assume as reference system ($x,y,z$) one that has the origin in the LMC centre at ($\alpha_0, \delta_0$ and $d_0$), the $x$-axis anti-parallel to the R.A.-axis, the $y$-axis parallel to the Dec. axis and the $z$-axis pointing towards the observer. The $\alpha_0$, $\delta_0$ coordinates of the LMC centre were derived from the average position of the RRLs ($\alpha_0 = 80^\circ.6147 ,\delta_0=-69^\circ.5799$). Our centre is offset by $\sim 0.8^\circ $ from the LMC centre of \citet[][$\alpha_0 = 81^\circ.24 ,\delta_0=-69^\circ.73$]{Youssoufi2019}, which was obtained using stellar density maps of all the stellar populations in the LMC. As a first approach we divided the LMC into ($x,y$) planes by considering different intervals in distance. Figure~\ref{fig:slice} shows the distribution of the LMC RRLs in Cartesian coordinates divided into bins of distance. The bins were of the same order as the average distance standard deviation, $\sim 3.5$ kpc. Going clockwise from the top right-hand panel the RRLs are mapped for increasing distance values. A quick look shows that there are two extreme cases, with the RRLs closest (top right-hand panel) and most distant to us (top left-hand panel) showing different spatial distributions. A fraction of the RRLs in the top right-hand panel of Figure~\ref{fig:slice} appear to be spread all over the field and are likely RRLs belonging to the MW halo. This view is corroborated by the proper motions of the RRLs in this sample of which 43\% are outside of 1 $\sigma$ the average $\mu_{\alpha}^{*}$ and $\mu_{\delta}$ values. These stars are placed mainly in the central region of this plot. On the other hand, it is also possible that this sample of RRLs belong to the outer most region of the elongated LMC halo, which is distorted by tidal forces owing to the interaction with the MW. This would explain why the proper motions are different from the average values in the main body of the LMC. In the same direction El Youssoufi et al. (submitted, see sect. 2.3) finds that the centre of the stellar proper motions for stars in the outer regions of the SMC is shifted from that of the inner regions, suggesting that these stars are probably associated to the LMC. In the same sample a concentration of RRLs likely belonging to the LMC shows up right and south of the centre. That is the part of the LMC which points towards the MW. The average coordinates of the RRLs in this panel are $\langle (x,y) \rangle =(-309, 241)$ pc and they represent 5.1\% of the whole sample. In the middle right-hand panel are shown RRLs with distances between 44 and 47 kpc and it is still possible to notice a protrusion of stars in the same region as in the previous panel. The centre coordinates in this case are $\langle (x,y) \rangle =(-667, 491)$ pc, for 12.5\% of RRLs. Between 47 and 53 kpc (bottom two panels) there are RRLs that belong with good confidence to the LMC and its halo. In the bottom right-hand panel (47 $< d <$ 50 kpc) the RRLs are distributed in what is reminiscent of a regular, spherical shape and no particular structures are seen. The centre of the distribution is at $\langle (x,y)\rangle =(-374, 51)$ pc for 31.2\% of the RRLs. In the bottom left-hand panel ($50< d <53$ kpc) a lack of RRLs along the central part of the LMC bar is visible (see also the middle panel of Figure~\ref{fig:trip}). This is the region of the highest crowding where many RRLs although recovered in the VMC catalogue, are found to be located above the $PL$ relations owing to contamination by close sources, and which hence were discarded (see Sect.~\ref{sec:blends}). A similar feature was detected using the OGLE IV catalogue by \citet{Jacyszyn2017}, who likewise concluded that it is probably caused by source crowding and blending. The distribution peaks at $\langle (x,y)\rangle = (241, -401)$ pc for 34.1\% of the total sample. In the middle left-hand panel there are stars with distances between $53< d <56$ kpc, they represent 12.5\% of the total with centre coordinates at $\langle (x,y)\rangle = (435, -343)$ pc. The top left-hand panel shows the most distant RRLs, corresponding to 4.6\% of the total sample. Their distribution peaks at $\langle (x,y)\rangle = (338, -234)$ pc. We thus conclude that the LMC has a regular shape similar to an ellipsoid with the north-eastern stars closer to us than the south-western component. No particular structures other than that of an ellipsoid are seen. To derive the parameters of the ellipsoid we used a similar approach as that used by \citet{debandsingh2014} and which is described in section 5.2 of their paper. The three axes of the ellipsoid that we derived are $S_1$=6.5 kpc, $S_2$=4.6 kpc and $S_3$=3.7 kpc. We found an inclination relative to the plane of the sky and a position angle of the line of nodes (measured from north to east) of $i=22\pm4^{\circ}$ and $\theta=167\pm7^{\circ}$, respectively. These results are in agreement with \citet{debandsingh2014} who found $i=24.02 ^{\circ}$ and $\theta=176.01 ^{\circ}$. Our result for the inclination also compares well with other papers in the literature: for example, \citet{nikoalev2003} found $i=30.7\pm1.1^{\circ}$ using CCs. The small difference in the values can be attributed to the different stellar populations used as RRLs trace old stars which should be more smoothly distributed, while young stars such Cepheids are found in star forming regions located mainly in the disc of the galaxy. Combining the results described above we can now visualize the 3-D shape of the LMC as traced by its RRLs. This is shown in Figure~\ref{fig:3dshape} for different viewing angles. The overall LMC structure is that of an elongated ellipsoid with a protrusion of stars more distant and closer to us extending from the centre of the LMC. This singular feature, also found by other studies based on OGLE~IV RRLs \citep[see e.g.][]{Jacyszyn2017}, is not a real physical structure and is mainly due to blended sources in the centre of the LMC. However we can not completely exclude that the innermost regions, which are at present significantly influenced by crowding, may harbour additional substructures. The regions of the ellipsoid extending to the north-eastern direction are closer to us than those in the opposite south-western direction. The difference in heliocentric distance between these two regions is on the order of ~2 kpc. The analysis was repeated by slicing the LMC into bins of metallicity. Results are shown in Figure~\ref{fig:met}. We used the metallicities derived by \citet{Skowron2016} for 13,016 RRab stars with a VMC counterpart and for 4742 RRc stars we used the metallicities derived by our LMC metallicity map. No particular structures are seen in Figure~\ref{fig:met}, except for the extreme cases of metal-rich ([Fe/H]$> -0.5$ dex) and metal-poor ([Fe/H] $< -2.1$ dex) RRLs which appear to be uniformly distributed across the field of view, and which may belong to the MW. Like \citet{debandsingh2014} we do not find any metallicity gradient or particular substructures related to large differences in metallicity. The same procedure was applied to construct a scan map using the proper motions of the LMC RRLs available in {\it Gaia} eDR3. As described in Sect.~\ref{gaia}, the {\it Gaia} eDR3 catalogue includes proper motions for 21,801 RRLs in our VMC catalogue, with average uncertainties of $\sigma_{\mu_{\alpha}^{*}} \sim 0.30$ mas yr$^{-1}$ and $\sigma_{\mu_{\delta}} \sim 0.32$ mas yr$^{-1}$. Mean proper motion values for the LMC RRLs are $\mu_{\alpha}^{*}$ = $1.87\pm0.54$ mas yr$^{-1}$ and $\mu_{\delta}$ = $0.36\pm0.80$ mas yr$^{-1}$, in R.A. and Dec, respectively. The RRLs scan map we constructed around these values is shown in Figure~\ref{fig:pmdec}. Going clockwise from the top right-hand panel the RRLs are mapped by increasing the values in proper motion in the declination coordinate. A gradient of $\mu_{\delta}$ with position is clearly seen. The two top panels of Figure~\ref{fig:pmdec} show the extreme cases: the spatial distribution of the RRLs is very different with average positions of $\langle (x,y)\rangle = (-762, -152)$ pc and $\langle (x,y)\rangle = (677, -64)$ pc for $\mu_{\delta}$ $ > $ 1.4 mas yr$^{-1}$ and $\mu_{\delta}$ $ < $ --0.7 mas yr$^{-1}$. This is probably owing to the rotation of the LMC as also found by \citet{helmi2018}. We performed a similar analysis using $\mu_{\alpha}^{*}$ obtaining a less evident gradient, but with a detectable difference between the south-western part and the north-eastern component of $\sim 0.25$ mas yr$^{-1}$. \begin{figure} \begin{center} \includegraphics[width=8.9cm, height=12cm]{subp_cent.jpg} \end{center} \caption{LMC RRLs divided into bins of heliocentric distance, as indicated by the labels. The average centre of the distribution in each panel is marked with a red cross.} \label{fig:slice} \end{figure} \begin{figure*} \begin{center} \includegraphics[width=5.9cm, height=5.9cm]{3DNEWA.pdf}\includegraphics[width=5.9cm, height=5.9cm]{3DNEWB.pdf} \includegraphics[width=5.9cm, height=5.9cm]{3DNEWC.pdf}\includegraphics[width=5.9cm, height=5.9cm]{3DNEWD.pdf} \includegraphics[width=5.9cm, height=5.9cm]{3DNEWE.pdf}\includegraphics[width=5.9cm, height=5.9cm]{3DNEWF.pdf} \end{center} \caption{3-D shape of the LMC inferred from the RRLs, as seen from different viewing angles. The protrusion of sources extending from the LMC centre could be due to crowding effects. Units along the axes are parsecs. } \label{fig:3dshape} \end{figure*} \begin{figure} \begin{center} \includegraphics[width=8.9cm, height=12cm]{subp_metA.jpg} \end{center} \caption{LMC RRLs divided into bins of metallicity, as indicated by the labels. } \label{fig:met} \end{figure} \begin{figure} \begin{center} \includegraphics[width=8.9cm, height=12cm]{panel_pmdec.jpg} \end{center} \caption{LMC RRLs divided into bins of proper motion in declination, as indicated in the labels. } \label{fig:pmdec} \end{figure} \subsection{Globular Cluster distances} Although neither OGLE IV nor VMC were designed to resolve stars in clusters given their limited spatial resolution, they detected a number of variable stars also in the LMC star clusters. In order to test the 3-D structure of the LMC found in our study, we therefore analysed the RRLs in 3 LMC GCs, namely, NGC~1835, NGC~2210 and NGC~1786, whose RRLs have been observed by OGLE IV (\citealt{Soszynski2016}). Those stars are mostly found in the periphery of the GCs in less crowded regions. These three GCs were selected because they are located in different regions of the LMC and observed by the VMC survey (see Figure~\ref{fig:RR_LMCmap}). For NGC 1835 (the magenta square in Figure~\ref{fig:RR_LMCmap}), which is located at the western edge of the LMC, there are 9 RRLs (4 RRab and 5 RRc pulsators) in common between the OGLE IV catalogue and our VMC RRL sample. We computed a very tight $PW(K_\mathrm{s}$, $J-K_\mathrm{s}$) relation from these RRLs, with a scatter of only 0.10 mag. This confirms that the stars are all at the same distance with similar reddening and metallicity, as expected for a GC. The distance to NGC~1835 we found using the RRL $PW(K_\mathrm{s}$, $J-K_\mathrm{s}$) relation is $d_{\rm NGC1835}$=$52.4\pm2.3$ kpc. Three of the four RRab stars also have an estimate of the metallicity from \citet{Skowron2016}. Their average value is [Fe/H]$\sim -$1.84 dex, in agreement with literature values \citep[see e.g.][]{walker1993, olsen1998}. We applied the same procedure to NGC~2210 (the blue circle in Figure~\ref{fig:RR_LMCmap}) which is located at the eastern edge of the VMC footprint. The $PW(K_\mathrm{s}$, $J-K_\mathrm{s}$) relation, based on 8 RRLs in the cluster, is also very tight with a scatter of 0.09 mag which leads to a distance to NGC~2210 of $d_{\rm NGC2210}$= $47.6\pm2.3$ kpc. Located $\sim$ 1.5 degrees to the north of NGC~1835 the GC NGC~1786 (the green triangle in Figure~\ref{fig:RR_LMCmap}) has 5 RRLs in common between the VMC and OGLE catalogues which leads to a $PW$ relation with a scatter of only 0.08 mag. The average distance to these stars is $d_{\rm NGC1786}$=$49.9\pm2.4$ kpc. Although the distances of the three clusters are consistent within one sigma there is a hint that, as found in the previous section, the eastern part of the LMC is closer to us than the western part. \section{Discussion and Conclusions} We have obtained new NIR ($K_\mathrm{s}$-, $J$- and $Y$-band) and optical ($I$-band) $PL$, $PW$, $PLZ$ and $PWZ$ relations from a sample of $\sim 22,000$ RRLs in the LMC using the VMC, OGLE~IV and {\it Gaia} data sets. Our starting sample comprised more than $\sim 29,000$ RRLs with a counterpart in the VMC catalogue. However, about $\sim 7,000$ RRLs located in the central, very crowded regions of the LMC were discarded using a 3-$\sigma$ clipping procedure and the matching radius criterion, since they were overluminous with respect to the $PL/PW$ relations. A similar effect was found in the OGLE IV data by \citet{Jacyszyn2017}, who started with an original sample of 27,500 RRab stars and ended up with their final fit being based on a subset of about $\sim 19,500$ of them. Our sample of $\sim 22,000$ RRLs is the largest sample of RRLs used to date to obtain NIR $PL$s. Previous NIR-PL relations available in the literature were based on limited samples \citep[see e.g.][ based on $\sim$40 RRLs]{Bor09} and small fields of view \citep[e.g.][]{sollima2006}. Moreover, this is the first set of $PLZ$ and $PWZ$ relations in the $Y$-band for RRLs in the LMC. Future facilities like James Webb Space Telescope (JWST) and The Extremely Large Telescope (ELT) will allow the detection of RRLs in galaxies in the Virgo cluster $\sim 20$ Mpc away from us. The rms of the relations we have obtained is good enough that RRLs with just one phase point on their NIR light curves will be sufficient to get an estimate of distance moduli accurate up to $\sim 0.15$ mag. Along with future observations of RRLs in galaxies outside the Local Group, our relations can thus be used to improve the calibration of the cosmic distance ladder. The comparison of our $PLZ$ relations with the theoretical relations of \citet{marconi2015} and with observed $PLZ$ in the literature \citep{Mur18a, neeley2019, Braga2018} indicates that the dependence on metallicity is more significant for high metallicities. However, the LMC lacks such metal-rich RRLs, hence biasing the comparison between theoretical and empirical relations. Applying the relation of \citet{Pie02} we derived individual reddening estimates for the RRab stars and obtained a reddening map for the whole LMC. This map was used to provide a reddening estimate for all RRLs in our sample. R.A. and Dec. coordinates of the LMC centre were derived from the average position of the RRLs and found to be at $\alpha_0 = 80^\circ.6147 ,\delta_0=-69^\circ.5799$. This agrees within 2$^\circ$ of almost all centre estimates available in the literature \citep[e.g.][based on CCs; van der Marel \& Kallivayalil 2014, for other tracers]{nikoalev2003}. The same authors also showed that the choice of the centre influences the 3D-shape reconstruction of the LMC, but that differences are rather small and change the determination of the inclination and position angle by only a few degrees. We used our $PL_{K_{\mathrm{s}}}$ relation to estimate individual distances to $\sim22,000$ RRLs and from them we reconstructed the 3-D structure of the LMC, as traced by these Population II stars. The LMC resembles a regular ellipsoid with an axes ratio of 1:1.2:1.8, where the north-eastern part of the ellipsoid is closer to us. The position angle and orientation of the bar identified by \citet{Youssoufi2019} (see Figure~5 in their paper), resembles the band devoid of RRLs seen in our Figure~\ref{fig:slice} ($50<d<53$ kpc panel). A lack of RRLs in this region is likely caused by the significant crowding conditions in the bar, which prevents the determination of good centroids for the RRLs as well as a proper estimate of their magnitudes. Therefore, we did not directly detect the LMC bar using the RRLs, in agreement with a previous study based on OGLE~IV data and optical $PW$ relations \citep{Jacyszyn2017}. A protrusion of stars extending on both sides from the centre of the LMC might be the result of blended sources which are still present in our sample notwithstanding the selection steps we performed. These blended sources are very difficult to eliminate since they mix together in every parameter space. However, it is very unlikely that this structure represents a real streaming of RRLs caused by the SMC/LMC interaction. \citet{Besla2012} presented two models of possible past interactions between the SMC and LMC, of which one is a direct collision. These models allow a good reproduction of different peculiar features of both galaxies, but in neither simulations there is a hint of a stellar component projected from the centre of the LMC along the $|z|$ direction. Using metallicities from \citet{Skowron2016} for a subsample of $\sim$ 13,000 LMC RRab stars and for $\sim$ 5,000 RRc stars using metal abundances derived from our metallicity map we determined $PLZ$ and $PWZ$ relations in the VMC ($Y$, $J$ and $K_\mathrm{s}$) and optical ($I$) OGLE~IV passbands. We also studied the 3-D spatial distribution of the RRLs based on their metallicities and we did not detect any metallicity gradient or substructure, confirming previous findings \citep[e.g.][]{debandsingh2014}. {\it Gaia} eDR3 proper motions are available for a sample of $\sim 21,000$ RRLs in the VMC catalogue. We used the proper motions to select RRLs which are bona fide members of the LMC and derived a $PL_{K_{\mathrm{s}}}$ which is fully consistent with the relation derived from the full RRL sample. Using the {\it Gaia} eDR3 proper motions we also detected the rotation of the LMC as traced by its $>$ 10 Gyr old stars, in full agreement with \citet{helmi2018} and \citet{luri2020} which used a larger sample ($\sim 8$ million) of LMC stars. Some of the RRLs that possess large proper motions, compared with the average value, and are located on the side closer to us, can also be attributed to tidal stream components pointing towards the MW. \begin{table*} \centering \caption{Parameters of the $PL$ and $PLZ$ relations in different passbands. The coefficients are for the fits in the form: $m_{X0} = a + b\times\log P + c\times$[Fe/H]} \label{tab:pl} \begin{tabular}{l c c c c c c c c r } \hline \hline Mode & Band & $a$ & $\sigma_a$ & $b$ & $\sigma_b$ & $c$ & $\sigma_c$ & rms & $N_{\rm star}$ \\ \hline FU & $K_{\mathrm{s0}}$ & 17.360 & 0.005 & $-$2.84 & 0.02 & & & 0.14 & 16897 \\ FO & $K_{\mathrm{s}0}$ & 16.860 & 0.023 & $-$2.98 & 0.05 & & & 0.17 & 5236 \\ Glob & $K_{\mathrm{s}0}$ & 17.430 & 0.004 & $-$2.53 & 0.01 & & & 0.15 & 22122 \\ \hline FU & $K_{\mathrm{s}0}$ & 17.547 & 0.008 & $-$2.80 & 0.02 & 0.114 & 0.004 & 0.13 & 13081 \\ FO & $K_{\mathrm{s}0}$ & 16.850 & 0.026 & $-$2.99 & 0.05 & 0.011 & 0.012 & 0.17 & 5132 \\ Glob & $K_{\mathrm{s}0}$ & 17.603 & 0.007 & $-$2.41 & 0.01 & 0.096 & 0.004 & 0.15 & 17698 \\ \hline FU & $J_0$ & 17.699 & 0.005 & $-$2.50 & 0.02 & & & 0.15 & 16868 \\ FO & $J_0$ & 17.241 & 0.022 & $-$2.53 & 0.04 & & & 0.17 & 5225 \\ Glob & $J_0$ & 17.800 & 0.004 & $-$2.00 & 0.01 & & & 0.16 & 22087 \\ \hline FU & $J_0$ & 17.888 & 0.008 & $-$2.45 & 0.02 & 0.121 & 0.004 & 0.14 & 13081 \\ FO & $J_0$ & 17.225 & 0.030 & $-$2.53 & 0.05 & -0.010 & 0.012 & 0.17 & 4946 \\ Glob & $J_0$ & 17.962 & 0.007 & $-$1.91 & 0.01 & 0.095 & 0.004 & 0.15 & 17757 \\ \hline FU & $Y_0$ & 17.990 & 0.006 & $-$2.25 & 0.02 & & & 0.17 & 16866 \\ FO & $Y_0$ & 17.550 & 0.025 & $-$2.26 & 0.05 & & & 0.20 & 5211 \\ Glob & $Y_0$ & 18.110 & 0.046 & $-$1.66 & 0.02 & & & 0.18 & 22071 \\ \hline FU & $Y_0$ & 18.207 & 0.009 & $-$2.18 & 0.03 & 0.135 & 0.005 & 0.16 & 13081 \\ FO & $Y_0$ & 17.553 & 0.033 & $-$2.27 & 0.05 & 0.003 & 0.014 & 0.19 & 4946 \\ Glob & $Y_0$ & 18.297 & 0.008 & $-$1.55 & 0.02 & 0.108 & 0.004 & 0.17 & 17783 \\ \hline FU & $I_0$ & 18.220 & 0.005 & $-$2.06 & 0.02 & & & 0.13 & 16696 \\ FO & $I_0$ & 17.830 & 0.023 & $-$1.99 & 0.05 & & & 0.18 & 5142 \\ Glob & $I_0$ & 18.350 & 0.004 & $-$1.42 & 0.01 & & & 0.15 & 21838 \\ \hline FU & $I_0$ & 18.439 & 0.006 & $-$1.98 & 0.02 & 0.136 & 0.003 & 0.11 & 13081 \\ FO & $I_0$ & 18.439 & 0.006 & $-$1.98 & 0.02 & 0.136 & 0.003 & 0.11 & 13081 \\ Glob & $I_0$ & 18.521 & 0.006 & $-$1.36 & 0.01 & 0.106 & 0.003 & 0.13 & 17757 \\ \hline \end{tabular} \end{table*} \begin{table*} \centering \caption{Parameters of the $PW$ and $PWZ$ relations in different passbands. The parameters are for the fits given in the form: $m_X - R\times(m_Y - m_X)= a+ b\times\log P + c\times$[Fe/H] } \label{tab:pw} \begin{tabular}{l c c c c c c c c c r c} \hline \hline Mode & Band & $R$ & $a$ & $\sigma_a$ & $b$ & $\sigma_b$ & $c$ & $\sigma_c$ & rms & $N_{\rm star}$ \\ \hline FU & $K_\mathrm{s}$, $J-K_\mathrm{s}$ & 0.69 & 17.150 & 0.006 & $-$3.075 & 0.025& & & 0.17 & 16911 \\ FO & $K_\mathrm{s}$, $J-K_\mathrm{s}$ & 0.69 & 16.600 & 0.055 & $-$3.289 & 0.027 & & & 0.21 & 5274 \\ Glob & $K_\mathrm{s}$, $J-K_\mathrm{s}$ & 0.69 & 17.190 & 0.004 & $-$2.888 & 0.016 & & & 0.18 & 22185 \\ \hline FU & $K_\mathrm{s}$, J-$K_\mathrm{s}$ & 0.69 &17.330 & 0.009 & $-$3.033 & 0.027 & 0.111 & 0.004 & 0.16 & 13081 \\ FO & $K_\mathrm{s}$, J-$K_\mathrm{s}$ & 0.69 & 16.619 & 0.033 & $-$3.280 & 0.052 & 0.008 & 0.013 & 0.19 & 4945 \\ Glob& $K_\mathrm{s}$, J-$K_\mathrm{s}$ & 0.69 & 17.348 & 0.008 & $-$2.810 & 0.016 & 0.094 & 0.004 & 0.17 & 17670 \\ \hline FU & $K_\mathrm{s}$, $Y-K_\mathrm{s}$ & 0.42 & 17.110 & 0.006 & $-$3.086 & 0.024 & & & 0.16 & 16911 \\ FO & $K_\mathrm{s}$, $Y-K_\mathrm{s}$ & 0.42 & 16.580 & 0.026 & $-$3.276 & 0.053 & & & 0.20 & 5274 \\ Glob & $K_\mathrm{s}$, $Y-K_\mathrm{s}$ & 0.42 & 17.150 & 0.004 & $-$2.888 & 0.015 & & & 0.17 & 22185 \\ \hline FU & $K_\mathrm{s}$, $Y-K_\mathrm{s}$ & 0.42 & 17.298 & 0.009 & $-$3.049 & 0.026 & 0.107 & 0.004 & 0.15 & 13081 \\ FO & $K_\mathrm{s}$, $Y-K_\mathrm{s}$ & 0.42 & 16.591 & 0.031 & $-$3.270 & 0.050 & 0.008 & 0.013 & 0.18 & 4946 \\ Glob & $K_\mathrm{s}$, $Y-K_\mathrm{s}$ & 0.42 & 17.306 & 0.007 & $-$2.813 & 0.016 & 0.088 & 0.004 & 0.16 & 17757 \\ \hline FU & $K_\mathrm{s}$, I-$K_\mathrm{s}$ & 0.25 & 17.160 & 0.006 & $-$3.036 & 0.023 & & & 0.16 & 16686 \\ FO & $K_\mathrm{s}$, I-$K_\mathrm{s}$ & 0.25 & 16.610 & 0.026 & $-$3.243 & 0.052 & & & 0.20 & 5142 \\ Glob & $K_\mathrm{s}$, I-$K_\mathrm{s}$ & 0.25 & 17.210 & 0.004 & $-$2.800 & 0.015 & & & 0.17 & 21543 \\ \hline FU & $K_\mathrm{s}$, I-$K_\mathrm{s}$ & 0.25 & 17.337 & 0.009 & $-$2.999 & 0.027& 0.110 & 0.004 & 0.15 & 13081 \\ FO & $K_\mathrm{s}$, I-$K_\mathrm{s}$ & 0.25 & 16.629 & 0.033 & $-$3.217 & 0.052 & 0.004 & 0.013 & 0.19 & 4937 \\ Glob & $K_\mathrm{s}$, I-$K_\mathrm{s}$ & 0.25 & 17.368 & 0.008 & $-$2.711 & 0.016 & 0.091 & 0.004 & 0.16 & 17567 \\ \hline FU & $K_\mathrm{s}$, $V-K_\mathrm{s}$ & 0.13 & 17.170 & 0.005 & $-$3.021 & 0.022 & & & 0.15 & 16686 \\ FO & $K_\mathrm{s}$, $V-K_\mathrm{s}$ & 0.13 & 16.630 & 0.024 & $-$3.216 & 0.048 & & & 0.18 & 5142 \\ Glob & $K_\mathrm{s}$, $V-K_\mathrm{s}$ & 0.13 & 17.220 & 0.004 & $-$2.787 & 0.014 & & & 0.16 & 21828 \\ \hline FU & $K_\mathrm{s}$, $V-K_\mathrm{s}$ & 0.13 & 17.349 & 0.008 & $-$2.985 & 0.025 & 0.109 & 0.004 & 0.14 & 13081 \\ FO & $K_\mathrm{s}$, $V-K_\mathrm{s}$ & 0.13 & 16.650 & 0.031 & $-$3.193 & 0.049 & 0.004 & 0.013 & 0.18 & 4957 \\ Glob & $K_\mathrm{s}$, $V-K_\mathrm{s}$ & 0.13 & 17.380 & 0.007 & $-$2.701 & 0.015 & 0.090 & 0.004 & 0.15 & 17230 \\ \hline FU & $J$, $I-J$ & 0.96 & 17.190 & 0.008 & $-$2.921 & 0.035 & & & 0.23 & 16686 \\ FO & $J$, $I-J$ & 0.96 & 16.660 & 0.033 & $-$3.056 & 0.066 & & & 0.25 & 5142 \\ Glob & $J$, $I-J$ & 0.96 & 17.270 & 0.006 & $-$2.549 & 0.022 & & & 0.24 & 21828 \\ \hline FU & $J$, $I-J$ & 0.96 & 17.358 & 0.014 & $-$2.903 & 0.041 & 0.106 & 0.007 & 0.23 & 13081 \\ FO & $J$, $I-J$ & 0.96 & 16.658 & 0.043 & $-$3.040 & 0.068 & -0.007 & 0.017 & 0.25 & 13081 \\ Glob & $J$, $I-J$ & 0.96 & 17.425 & 0.011 & $-$2.431 & 0.023 & 0.085 & 0.006 & 0.23 & 17757 \\ \hline FU & $J$, $V-J$ & 0.40 & 17.220 & 0.006 & $-$2.920 & 0.027& & & 0.18 & 16686 & \\ FO & $J$, $V-J$ & 0.40 & 16.700 & 0.025 & $-$3.038 & 0.051 & & & 0.20 & 5142 & \\ Glob & $J$, $V-J$ & 0.40 & 17.280 & 0.005 & $-$2.593 & 0.017 & & & 0.18 & 21828 & \\ \hline FU & $J$, $V-J$ & 0.40 & 17.377 & 0.010 & $-$2.897 & 0.031 & 0.103 & 0.005 & 0.17 & 13081 \\ FO & $J$, $V-J$ & 0.40 & 16.697 & 0.033 & $-$3.027 & 0.052 & $-$0.007 & 0.013 & 0.20 & 4946 \\ FU & $J$, $V-J$ & 0.40 & 17.433 & 0.009 & $-$2.493 & 0.017 & 0.084 & 0.005 & 0.18 & 17546 \\ \hline FU & $I$, $V-I$ & 1.55 & 17.160 & 0.004 & $-$3.016 & 0.018 & & & 0.12 & 16686 \\ FO & $I$, $V-I$ & 1.55 & 16.690 & 0.018 & $-$3.101 & 0.037 & & & 0.14 & 5142 \\ Glob & $I$, $V-I$ & 1.55 & 17.190 & 0.003 & $-$2.843 & 0.011 & & &0.13 & 21828\\ \hline FU & $I$, $V-I$ & 1.55 & 17.299 & 0.006 & $-$2.994 & 0.019 & 0.090 & 0.003 & 0.11 & 13081 \\ FO & $I$, $V-I$ & 1.55 & 16.712 & 0.024 & $-$3.105 & 0.037 & 0.018 & 0.010 & 0.11& 4954 \\ Glob & $I$, $V-I$ & 1.55 & 17.323 & 0.006 & $-$2.790 & 0.012 & 0.076 & 0.003 & 0.12 & 17456 \\ \hline \hline \end{tabular} \end{table*} \section*{Acknowledgments} We thank the Cambridge Astronomy Survey Unit (CASU) and the Wide Field Astronomy Unit (WFAU) in Edinburgh for providing calibrated data products under support of the Science and Technology Facility Council (STFC) in the UK. M-RC acknowledges support from the European Research Council (ERC) under European Union’s Horizon 202 research and innovation programme (grant agreement no. 682115). This work makes use of data from the ESA mission {\it Gaia} (https://www.cosmos.esa.int/gaia), processed by the {\it Gaia} Data Processing and Analysis Consortium (DPAC, https://www.cosmos.esa.int/web/gaia/dpac/consortium). Funding for the DPAC has been provided by national institutions, in particular the institutions participating in the {\it Gaia} Multilateral Agreement. \section*{Data availability} The data underlying this article are available in the article and in its online supplementary material or will be shared on reasonable request to the corresponding author.
\section{Introduction}\label{sec:intro}} \IEEEPARstart{F}{acial} affects relate to $55\%$ of messages when people perceive others' feelings and attitudes \cite{mehrabian1971silent,mehrabian1974approach} because it conveys critical information that reflects emotional states and reactions in human communications \cite{darwin1998expression,gazzaniga2014cognitive,picard2001toward}. Many facial affect analysis (FAA) methods have been explored during the past decade, benefiting from interdisciplinary studies of affective computing, computer vision, and psychology \cite{jack2012facial,sariyanidi2014automatic,calvo2018makes}. Some have been extended to many applications, including medical diagnosis \cite{tavakolian2019spatiotemporal}, social media \cite{zhang2018facial2}, and video generation \cite{zhao2020towards}. Meanwhile, competitions such as FERA \cite{valstar2017fera}, EmotiW \cite{dhall2020emotiw}, Aff-Wild \cite{zafeiriou2017aff}, ABAW \cite{kollias2021analysing}, EmotioNet \cite{benitez2017emotionet}, AVEC \cite{ringeval2019avec}, and MuSe \cite{stappen2020muse} are regularly held to evaluate the latest progress and propose frontier research trends. Historically, FAA methods have undergone a series of evolutions. Initial studies usually rely on hand-crafted design or classic machine learning to obtain useful affective features without structural information \cite{zhao2007dynamic,sariyanidi2014automatic}. Psychological findings indicate that the human cognition of facial information is realized through a dual system composed of analytic processing and holistic processing \cite{gazzaniga2014cognitive}. The former acquires multi-dimensional cluster features by analyzing local areas, while the latter aims to generate a holistic representation to perceive the overall structure \cite{gazzaniga2014cognitive,friesen1978facial}. Such an analytic-holistic working system is similar to a topology-like structure, so it is reasonable for machine vision researchers to model it into a graph. Accordingly, many state-of-the-art studies have been dedicated to generating a facial graph with local-to-global affective features \cite{zhong2019graph,li2019semantic,zhang2020region,song2021dynamic}. If the above evidence reveals the feasibility of using graph-based methods for FAA, research on how facial muscles participate in affective expression further demonstrates its possibility as a necessary condition \cite{ekman1994strong,cohn2015automated,zarins2015anatomy}. There are latent relationships among different facial areas and contexts, which are vital clues \cite{bimler2006facial,ekman2002facial}. A few non-graph-based deep models have partly captured these relationships and improved performance \cite{zhang2017facial,li2020facial,jacob2021facial}. The underlying assumption is that explicit mappings that reflect this relationship can be directly learned \cite{martinez2017automatic}. However, these mappings are not solid enough in the real world because they differ from subject to subject and even from one condition to another \cite{barrett2017emotions,liu2019facial}. Recently, graph-based methods have shown that they represent facial anatomy and simultaneously fit latent relationships in facial affects \cite{cui2020knowledge,fan2020facial,xie2020assisted}. Some pilot studies have also suggested that the graph-based method can even move beyond to deal with challenging tasks such as analyzing occluded faces \cite{dapogny2018confidence,zhou2020learning} and ambiguous facial affects \cite{cui2020label,chen2020label}. By searching on Google Scholar using keywords of \textbf{'graph'} and \textbf{Index Terms} in this survey, we have counted the number of relevant published papers from 2010 to the present. As presented in Fig. \ref{fig:num}, the graph-based FAA has gained increasing attention, especially in the past five years (publications in 2021 increased by 600 year-on-year). \begin{figure}[tb] \centering \includegraphics[width=0.9\columnwidth]{fig/num.pdf} \caption{The growth trend of papers related to graph-based FAA.} \label{fig:num}\vspace{-10pt} \end{figure} Based on theoretical support, outstanding performance and quantity of existing work, and potential for future development, it is necessary to review the state of graph-based FAA methods. Although many reviews have discussed FFA's historical evolutions \cite{sariyanidi2014automatic, corneanu2016survey, martinez2017automatic} and recent advances \cite{kollias2019deep, li2020deep, goh2020micro}, including some on specific problems like occluded expression \cite{zhang2018facial}, multi-modal affect \cite{rouast2019deep} and micro-expression \cite{ben2021video}, \textbf{this is the FIRST systematic and in-depth survey for the graph-based FAA field} as far as we know. We emphasize representative research proposed after 2010. The goal is to present a novel perspective on FAA and its latest trends. This review is organized as follows: Section \ref{sec:bk} provides a brief background on FAA and discusses the unique role of graph-based methods in FAA research. Section \ref{sec:gbar} presents a taxonomy of mainstream graph-based methods for affective representation. Section \ref{sec:agrr} reviews classical and advanced approaches for graph relational reasoning and discusses their pros and cons in FAA tasks. Section \ref{sec:appe} summarizes public databases, main FAA applications, and current challenges based on a detailed comparison of related literature. Finally, Section \ref{sec:od} concludes with a general discussion and identifies potential directions. \section{Facial Affect Analysis}\label{sec:bk} \subsection{Affective Desription Model} As early as the 1970s, \citet{ekman1971constants} proposed the definition of six basic affects, i.e., \emph{happiness}, \emph{sadness}, \emph{fear}, \emph{anger}, \emph{disgust}, and \emph{surprise}, based on an assumption of the universality of human affective display \cite{ekman1994strong}. In addition, compound affects \cite{du2014compound} defined by different combinations of basic affects (e.g., \emph{sadly surprise} and \emph{happily surprise}) are proposed to depict more complex affective situations \cite{sethu2019ambiguous}. Another kind of famous description, called Facial Action Coding System (FACS), is designed for a broader range of affects, which consists of a set of atomic Action Units (AUs) \cite{friesen1978facial, ekman2002facial}. Fig. \ref{fig:fa} shows an example of six basic affects plus \emph{neutral} and activated AUs in each facial affect. Besides categorical models, a continuous affective model named VAD Emotional State Model \cite{mehrabian1995framework} is also suggested \cite{plutchik1980general, greenwald1989affective, russell1978evidence}. The VAD model has three dimensions, i.e., valence (how positive or negative an affect is), arousal (the activation intensity of an affect), and dominance (how submissive or in-control a person is in an affective display). Recent studies consider that the continuous model is more appropriate for describing dynamic changes of human affects in the real-world \cite{soleymani2015analysis, kollias2019deep}. Please refer to \cite{sariyanidi2014automatic,corneanu2016survey} for a more detailed discussion about this topic. \begin{figure}[tb] \centering \includegraphics[width=0.95\columnwidth]{fig/fa.pdf} \caption{An example of basic facial affects and related AU marks. AU0 denotes no activated AU. All annotations are made by FACS certificated experts. Images are from BU-4DFE \cite{yin2008high} database.} \label{fig:fa} \vspace{-10pt} \end{figure} \subsection{General Pipeline} A standard FAA method can be broken down into fundamental components: face preprocessing, affective representation, and task analysis. As a new branch of FAA, the graph-based method also follows this generic pipeline (see Fig. \ref{fig:pipe}). Face detection and registration are two necessary pre-steps that first locate faces and normalize facial variations, sometimes also providing facial landmarks \cite{baltruvsaitis2016openface, baltrusaitis2018openface}. Fig. \ref{fig:prep} presents an illustration of the preprocessing steps. Early methods like \emph{Viola and Jones} \cite{viola2001rapid}, \emph{Mixtures of Trees} \cite{zhu2012face}, and \emph{Active Appearance Model (AAM)} \cite{cootes2001active} have been widely used for this purpose. Recently, cascaded deep approaches with real-time performance are popular, such as \emph{Multi-Task Cascaded Convolutional Network} \cite{zhang2016joint}, \emph{Hyperface} \cite{ranjan2017hyperface}, and \emph{Supervision by Registration and Triangulation} \cite{dong2020supervision}. Please refer to \cite{bulat2017far,masi2018deep,wang2018facial} for more specific information. \begin{figure*}[!tb] \centering \includegraphics[width=1.8\columnwidth]{fig/pipe.pdf} \caption{The pipeline of graph-based facial affect analysis methods.} \label{fig:pipe}\vspace{-10pt} \end{figure*} \begin{figure}[!h] \centering \includegraphics[width=0.85\columnwidth]{fig/prep.pdf} \caption{An illustration of face detection and face registration. The \emph{happy} image is from CK+ database \cite{lucey2010extended}.} \label{fig:prep}\vspace{-10pt} \end{figure} Compared to other existing methods, the graph-based FAA pays more attention to representing facial affects with graphs and obtaining affective features from such representation by graph reasoning. In mathematical terms, a graph can be denoted as $G=(V,E)$. The node set $V$ contains all the representations of the entities in the graph, and the edge set $E$ contains all the structure information between two entities. Thus, when $E$ is empty, $G$ becomes an unstructured collection of entities (e.g., independent local facial areas \cite{zhang2017facial}). Meanwhile, we could also define some initial graph structure ahead of the relational model, which is a general practice in many affective graph representations \cite{kumar2021micro,dapogny2018confidence,song2021dynamic}. Given this unstructured collection, performing relational reasoning requires the model to infer the structure of these entities before predicting the property or category of an object. Naturally, generic approaches need to be adjusted depending on affective graph representations or propose new graph-based approaches to infer the latent relationship and extract the final affective feature. The two components can perform separately or arranged as an end-to-end framework. They are expected to exhibit better performance and generalization capability by manually or automatically providing richer information through prior knowledge. Hence, the advantages and limitations of different graph generation methods and their relational reasoning approaches are two main topics of this survey. \section{Graph-based Affective Representations}\label{sec:gbar} Affective representation is a crucial procedure for most graph-based FAA methods. Depending on the domain that an affective graph models, we categorize the strategy as Spatial graphs, Spatio-temporal graphs, AU-level graphs, and Sample-level graphs. Fig. \ref{fig:tree} illustrates a detailed summary of the literature using different graph representations. Note that many graph-based representations contain pre-extracted geometric or/and appearance features. Whether hand-crafted or learned, these feature descriptors are not essentially different from those used in non-graph-based affective representations. Interested readers can refer to \cite{sariyanidi2014automatic,corneanu2016survey,li2020deep} for a systematic understanding of this topic. \begin{figure*}[htb] \scriptsize \caption{Taxonomy for Graph-based Facial Representation.} \label{fig:tree} \begin{tikzpicture}[grow'=right] \tikzset{execute at begin node=\strut} \tikzset{level 1/.style={level distance=60pt}} \tikzset{level 2/.style={level distance=65pt}} \tikzset{level 3/.style={level distance=70pt}} \tikzset{level 4/.style={level distance=70pt}} \tikzset{level 5/.style={level distance=60pt}} \tikzset{every tree node/.style={align=left, anchor=west}} \tikzset{edge from parent/.style={draw,edge from parent path={(\tikzparentnode.east) -- +(5pt,0) |- (\tikzchildnode)}}} \Tree [.{Graph-based\\Affective\\Representation} [.{Spatial Graph} [.{Landmark-level\\Graph} [.{Node attribute} {All use: \emph{Coordinate (\citet{kaltwang2015latent,zhao2021geometry}); +HOG (\citet{liu2019facial})} } {Selection: \emph{Coordinate (\citet{mohseni2014facial}); +Gabor (\citet{zhong2019graph});}\\ \emph{+Optical flow (\citet{liu2015main,kumar2021micro}); }\\ \emph{+HOG (\citet{dapogny2018confidence}); TCN (\citet{lei2020novel})}} ] [.{Edge initialization} {Fully connection: \emph{\citet{zhong2019graph,lei2020novel}} } {Manual linking: \emph{Topology (\citet{mohseni2014facial,kumar2021micro}}\\ \emph{\citet{zhao2021geometry}} } {Automatic: \emph{Triangulation (\citet{dapogny2018confidence}); Delaunay (\citet{liu2019facial});}\\ \emph{3D mesh (\citet{pei20093d,kotsia2006facial})}} ] ] [.{Region-level\\Graph} [.{ROI Graph} [.{Node attribute} {Landmark: \emph{HRN (\citet{zhang2020region}); AE (\citet{liu2020relation}); }\\ \emph{LBP (\citet{jin2021learning}); ResNet (\citet{fan2020facial}); }\\ \emph{Optical flow (\citet{liu2018sparse})}} {Without landmark: \emph{LBP (\citet{yao2015capturing})}} ] {Edge initialization: \emph{Feature correlation (\citet{zhang2020region,yao2015capturing}); }\\ \emph{KNN (\citet{liu2018sparse}); KNN+Landmark distance (\citet{fan2020facial}); }\\ \emph{FACS (\citet{liu2020relation})}} ] [.{NPI Graph} {Node attribute: \emph{Gabor (\citet{zafeiriou2008discriminant}); VGG (\citet{zhang2019context}); }\\ \emph{ResNet (\citet{xie2020adversarial})}} {Edge initialization: \emph{Feature correlation (\citet{zhang2019context}); }\\ \emph{K-means (\citet{xie2020adversarial}); EGM (\citet{zafeiriou2008discriminant})}} ] ] ] [.{Spatio-temporal\\Graph} [.{Node attribute} {Landmark-level: \emph{Coordinate+HOG (\citet{zhou2020facial,zhou2020learning}); +ResNet (\citet{chen2019efficient}); }\\ \emph{+DCT+CNN (\citet{chen2021cafgraph})} } {Region-level: \emph{3D grid (\citet{rivera2015spatiotemporal})}} {Frame-level: \emph{VGG (\citet{liu2021video}); Coordinate (\citet{shirian2021dynamic})}} ] [.{Edge initialization} {Topology: \emph{Landmark distance (\citet{zhou2020facial,zhou2020learning,chen2019efficient}, \citet{chen2021cafgraph})}} {Time series: \emph{DNG (\citet{rivera2015spatiotemporal}); Fully connection(\citet{liu2021video,shirian2021dynamic})}} ] ] [.{AU-level Graph} [.{AU-label Graph} {Node: \emph{AU (\citet{tong2007facial,zhu2014multiple,lei2021micro}); AU+Affect (\citet{cui2020label})}} {Edge initialization: \emph{Label distribution+DAG (\citet{zhu2014multiple,cui2020label,tong2007facial}); }\\ \emph{Label distribution (\citet{lei2021micro})}} ] [.{AU-map Graph} {Node attribute: \emph{VGG (\citet{li2019semantic,corneanu2018deep}); ResNet (\citet{niu2019multi,xie2020assisted}}\\ \emph{\citet{chen2020label,song2021uncertain,song2021dynamic,song2021hybrid}); CNN (\citet{walecki2017deep})} } {Edge initialization: \emph{CRF (\citet{walecki2017deep}); Random (\citet{song2021uncertain}); MCMC (\citet{song2021dynamic,song2021hybrid}); }\\ \emph{FACS (\citet{li2019semantic,xie2020assisted}); Label distribution (\citet{niu2019multi}); +KNN (\citet{chen2020label})}} ] ] [.{Sample-level Graph: \emph{Multi-modality (\citet{chien2020cross}); Multi-source (\citet{chen2021learning}); Affective distribution (\citet{he2019image})}} ] ] \end{tikzpicture}\vspace{-10pt} \end{figure*} \subsection{Spatial Graph Representations} Non-graph-based spatial methods usually treat a facial affect as a whole representation or pay attention to variations among main face components or crucial facial parts \cite{zhao2016deep,zhang2017facial, oh2018survey}. For spatial affective graphs, facial changes are considered while their co-occurring relationships and affective semantics are represented as essential cues \cite{yao2015capturing,zhong2019graph, lei2020novel}. These approaches can be divided into landmark-level graphs and region-level graphs. Fig. \ref{fig:spa} illustrates frameworks of different spatial graph representations. \begin{figure}[tb] \centering \includegraphics[width=0.85\columnwidth]{fig/spa.pdf} \caption{Spatial graphs. (a) Landmark-level graph with FACS-based edges \cite{mohseni2014facial}; (b) Landmark-level graph with automatic triangle edges \cite{dapogny2018confidence}; (c) ROI graph based on correlation without landmarks \cite{yao2015capturing}; (d) NPI graph with individual nodes \cite{zafeiriou2008discriminant}. Zoom in for better view.} \label{fig:spa}\vspace{-10pt} \end{figure} \subsubsection{Landmark-level graphs} Facial landmarks are one of the most critical geometry that reflects the shape of face components and the structure of facial anatomy \cite{zhang2014facial}. Thus, it is natural to use facial landmarks as base nodes to generate a graph representation. Limited by the detection performance, only a few landmarks that locate basic face components were applied in early graph representations \cite{kakumanu2006local}. Recently, graphs using more facial landmarks (e.g., 68 landmarks \cite{kazemi2014one}) are proposed to depict fine-grained facial shapes. For example, in \cite{liu2019facial} and \cite{zhao2021geometry}, the authors associated 68 landmarks with the AUs in FACS and made graph-based representations. The difference is that the former additionally employed local appearance features extracted by \emph{Histograms of Oriented Gradients (HOG)} \cite{dalal2005histograms} as node attributes; the latter proposed three landmark knowledge encoding strategies for enhanced geometric representations. Alternatively, \cite{kaltwang2015latent} formulated a \emph{Latent Tree (LT)} where 66 landmarks were set as parts of leaf nodes accompanied by several other leaf nodes of AU targets and hidden variables, which reflected the joint distribution of targets and features. Furthermore, some current methods select landmarks with significant contributions to avoid redundant information \cite{lei2020novel,rao2021facial}. Landmarks locating external contour and nose are frequently discarded \cite{mohseni2014facial, dapogny2018confidence} (see Figs. \ref{fig:spa}a, b) because they are considered irrelevant to facial affects. \cite{zhong2019graph} chose to remove the landmarks of the facial outline and applied a small window around each remaining landmark as one graph node, while the local features were extracted by \emph{Gabor} filter \cite{liu2003independent}. Since these local areas were segmented to introduce facial appearance into the graph representation rather than as independent nodes, similar to \cite{liu2019facial}, these methods are still classified in landmark-level graphs. On the other hand, adding extra reasonable landmarks was designed to generate comprehensive graph representations \cite{kumar2021micro,liu2021sg}, which could keep an appropriate dimension and represent sufficient affective information. A fully connected graph is the most intuitive way to form edges \cite{zhong2019graph,lei2020novel}. However, the number of edges is $n(n-1)/2$ for a complete graph with $n$ nodes, which means the complexity of the spatial relationship will increase as the number of nodes increases. This positive correlation is not helpful because landmarks in a facial component mostly move in concert rather than arbitrarily when conveying facial affects \cite{afzal2009perception}. Studies of point-light displays in emotion perception also show that more complex representations seem to be redundant \cite{baltruvsaitis2010synthesizing}. To this end, work like \cite{mohseni2014facial,kumar2021micro,liu2021sg,zhao2021geometry} manually reduced edges based on muscle anatomy and FACS. Another type of approach is exploiting triangulation algorithms \cite{dapogny2018confidence}, such as \emph{Delaunay} triangulation \cite{liu2019facial}, to generate graph edges consistent with true facial muscle distribution and uniform for different subjects. Similarly, the landmark-level graph with triangulation is also utilized in generating a sparse or dense facial mesh for 3D FAA \cite{pei20093d, kotsia2006facial}. The Euclidean distance is the simplest and most dominant metric for edge attributes of the above facial graphs, even with multiple normalization methods like inner-eyes distance \cite{liu2019facial,zhao2021geometry}. The \emph{Hop} distance has also been explored as edge attributes to model spatial relationships \cite{zhou2020facial,zhou2020learning}. Besides, several learning-based edge generation methods (e.g., \emph{LT} \cite{kaltwang2015latent}, \emph{Conditional Random Field (CRF)} \cite{walecki2017deep}) have been proposed to extract semantic information from facial graphs automatically. This part is discussed in detail in Sec. \ref{sec:rr-dbn} and \ref{sec:rr-td}. \subsubsection{Region-level graphs} Like geometric information, appearance information, especially in local facial regions, can also contribute to FAA \cite{lee2019context, wang2020region}. Using graph structures is an excellent choice to encode spatial relationships while representing texture changes in facial components \cite{yao2015capturing, zafeiriou2008discriminant}. There are two categories of region-level affective graphs: region of interest (ROI) graphs and non-prior information (NPI) graphs. ROI graphs partition a set of facial areas as graph nodes related to affective display. Coordinates of facial landmarks are commonly applied to locate and segment ROIs. Unlike a few landmark-level graphs that only use texture near all landmarks as supplementary information, ROI graphs explicitly select meaningful areas as graph nodes, and edges do not entirely depend on established landmark relationships. \cite{zhang2020region} employed a \emph{High-Resolution Network (HRN)} \cite{wang2020deep} to regress ROI maps spotted by representative landmarks. Each spatial location in the extracted feature map was considered one graph node, while edges were induced among node pairs according to mappings between ROIs and AUs. Another example in \cite{fan2020facial} utilized feature maps of landmark-based ROIs outputted by the \emph{ResNet50} \cite{he2016deep} as nodes to construct a \emph{K-Nearest-Neighbor (KNN)} graph. For each node, its pair-wise semantic similarities were calculated, and the nodes with the closest \emph{Euclidean} distance were connected as initial edges. Similarly, \cite{liu2018sparse} also employed landmark-based ROIs, but the \emph{KNN} graph was generated in \emph{optical-flow} space to encode the local manifold structure for a sparse representation \cite{liu2015main}. Due to chained reactions among multiple AUs and the symmetrical structure of the human face, \cite{jin2021learning} proposed a parts-based graph that had manually linked edges by taking FACS and landmarks as references. The nodes were ROIs with \emph{Local Binary Pattern (LBP)} \cite{zhao2007dynamic} or deep features as attributes. In addition, the method of obtaining ROIs without relying on facial landmarks has also been studied \cite{yao2015capturing} (see Fig. \ref{fig:spa}c). Different from ROI graph representations, nodes in NPI graphs are evenly distributed in raw images or generated in a fully automatic manner without external knowledge. \cite{zafeiriou2008discriminant} created a reference bunch graph by evenly overlaying a rectangular graph on object images (see Fig. \ref{fig:spa}d). \emph{Gabor} filters were utilized for each graph node to compute a set of feature vectors for different facial instances. Recently, several methods have tried to introduce regions beyond facial parts or single face images as context nodes. \cite{zhang2019context} exploited the \emph{Region Proposal Network (RPN)} \cite{ren2016faster} with \emph{VGG16} \cite{simonyan2014very} to extract regions-level nodes, including the target face and its contexts, while edges were affective relationships calculated based on feature vectors. \cite{xie2020adversarial} built two NPI graphs for cross-domain FAA. First, holistic and local features were extracted as nodes for source and target domains. Then, global-to-global connection, global-to-local connection, and local-to-local connection were computed according to statistical feature distribution acquired by \emph{K-means} algorithm. \subsection{Spatio-Temporal Graph Representations} Spatio-temporal representations deal with a sequence of frames within a temporal window and describe the dynamic evolution of facial variations \cite{liu2020phase}. In particular, introducing temporal information allows nodes to interact with each other at different times and generates a more complex affective graph. Fig. \ref{fig:st} presents frameworks of various spatio-temporal graph representations. \begin{figure}[tb] \centering \includegraphics[width=0.9\columnwidth]{fig/st.pdf} \caption{Spatio-temporal graphs. (a) Landmark-level graph with adaptive edges \cite{zhou2020learning}; (b) Region-level graph with edges based on transitional masks \cite{rivera2015spatiotemporal}; (c) Frame-level graph \cite{liu2021video}. Zoom in for better view.} \label{fig:st}\vspace{-10pt} \end{figure} Extend spatial graphs to the spatio-temporal domain is currently the main route. \cite{rivera2015spatiotemporal} exploited weighted compass masks to obtain 2D directional number responses and 3D space-time directional edge responses corresponding to each of the symmetry planes of a cube. The two masks of given local neighborhoods were nodes in a spatio-temporal \emph{Directional Number Transitional Graph (DNG)}, which could represent salient facial changes and statistic frequency of affective behaviors over time (see Fig. \ref{fig:st}a). Several representations have been proposed to define temporal connections between landmarks, which can be seen as landmark-level spatio-temporal graphs. \cite{chen2021cafgraph} developed a context-aware facial multi-graph where intra-face edges were initialized based on morphological and muscular relationships, and inter-frame edges were created by linking the same node between consecutive frames. Similar landmark-based edge initialization in the temporal domain was also utilized in \cite{chen2019efficient, zhou2020facial}. In \cite{zhou2020learning}, authors introduced a connectivity inference block that could automatically generate dynamic edges for a spatio-temporal situational graph of part-occluded affective faces (see Fig. \ref{fig:st}b). Unlike landmark-level graphs, \cite{liu2021video} first extracted a holistic feature of each frame and set them as individual nodes to establish a fully connected graph (see Fig. \ref{fig:st}c), which could be seen as a frame-level spatio-temporal graph. Similar work includes \cite{shirian2021dynamic} that took \emph{Discrete Cosine Transform (DCT)} features as node attributes. Edge connections of these methods would be established by learning the long-term dependency of nodes in time series (discussed in Sec. \ref{sec:agrr}). \subsection{AU-level Graph Representations} Apart from using knowledge of AUs and FACS in the above two types of affective graphs, many graph-based representations have been proposed to model affective information from the perspective of AUs themselves. We divide these approaches into two categories: AU-label graph and AU-map graph. Fig. \ref{fig:au} shows frameworks of different AU-level graph representations. \begin{figure}[tb] \centering \includegraphics[width=0.9\columnwidth]{fig/au.pdf} \caption{AU-level and Sample-level graph representations. (a) AU-label graph with edges generated from training data \cite{tong2007facial}; (b) AU-map graph with FACS based edges \cite{li2019semantic}; (c) Auxiliary graphs of AUs and landmarks \cite{chen2020label}; (d) Sample-level multi-modal graph of visual and physiological signals \cite{chien2020cross}. Zoom in for better view.} \label{fig:au}\vspace{-10pt} \end{figure} \subsubsection{AU-label graphs} Unlike spatial and spatio-temporal graphs, AU-label graphs were built from the label distribution of training data \cite{zhu2014multiple,cui2020knowledge}. \cite{tong2007facial} computed the co-occurrence and co-absence dependency between every AU pair from the existing database (see Fig. \ref{fig:au}a). Since the dependency is not always symmetric, these AU label relationships were used as edges to construct a \emph{Directed Acyclic Graph (DAG)}. In \cite{lei2021micro}, an AU-label graph was built with a data-driven asymmetrical adjacency matrix that denoted the conditional probability of co-occurring AU pairs. AU labels were transformed into high-dimensional node vectors as node attributes \cite{mikolov2013distributed}. On the other hand, \cite{cui2020label} established a \emph{DAG} where object-level labels (affect categories) and property-level labels (AUs) were regarded as parent nodes and child nodes, respectively. The conditional probability distribution of each node to its parents was measured to obtain graph edges for correcting existing labels and generating unknown labels. A similar idea was achieved in \cite{chen2020label} to boost affective feature learning in large-scale FAA databases (see Fig. \ref{fig:au}b). \subsubsection{AU-map graphs} AU-map graphs are intuitively close to region-level spatial graphs, especially ROI graphs, because they both employ local feature maps as graph nodes. \cite{li2019semantic} is an example in between. Twelve AUs features were learned through landmark-based ROI features cropped from a multi-scale global appearance feature \cite{simonyan2014very}. These AU features and the AU relationships gathered from training data and manually pre-defined edge connections \cite{tian2001recognizing} were combined to construct a knowledge graph (see Fig. \ref{fig:au}c). However, the significant difference is that AUs define a set of facial muscle actions, which means there might be multiple AUs in the same ROI. Like in Fig. \ref{fig:fa}, AU12 and AU15 co-occur at lip corners but refer to '\emph{puller}' and '\emph{depressor}', respectively. Therefore, for many AU graphs, their definition of nodes is independent of those in ROI graphs, even though they are similar in feature map extraction. For instance, graph nodes in \cite{xie2020assisted} were AU features directly obtained by \emph{ResNet} without defining ROIs. The homologous protocol was also conducted in \cite{song2021hybrid}. Some special AU-map graphs have been proposed to introduce structure learning for more complex FAA tasks. For AU intensity estimation, \cite{walecki2017deep} trained a \emph{Convolutional Neural Network (CNN)} to learn deep AU features from multiple databases jointly. The \emph{copula functions} \cite{berkes2008characterizing} were applied to model pair-wise AU dependencies in a \emph{CRF} graph. In addition, \emph{Bayesian networks (BNs)} are also used to capture the AU inherent dependencies for this task \cite{song2021hybrid,song2021dynamic}. To account for indistinguishable affective faces, \cite{corneanu2018deep} designed a \emph{VGG}-like patch prediction module plus a fusion module to predict the probability of each AU. A prior knowledge taken from the given databases and a mutual gating strategy were used simultaneously to generate initial edge connections. To model uncertainty samples in real-world databases, \cite{song2021uncertain} established an uncertain graph, in which a weighted probabilistic mask that followed \emph{Gaussian} distribution was imposed on each AU feature map. By doing this, the importance of edges and the underlying uncertain information could be encoded in the graph representation. Another attempt in \cite{niu2019multi} boosted semi-supervised AU recognition for labeled and unlabeled face images. The parameters of two AU classifiers were used as graph nodes to share the latent relationships among AUs. \subsection{Sample-level Graph Representations} Recently, several graph representations beyond a single sample have been proposed, which indicates that this is still an open research field. In \cite{he2019image}, a correlation graph with word-embedded affective labels as nodes was built for distribution learning. Its edges could be generated either by psychologically normalized \emph{Gaussian} function or conditional probabilities. To combine signals from multiple corpora, \cite{chien2020cross} proposed a dual-branch framework, in which the visual semantic features were extracted in source and target sets. These features were then retrieved with correlation coefficients to generate positive edge connections for a learnable visual semantic graph (see Fig. \ref{fig:au}d). Besides, \cite{chen2021learning} constructed a \emph{KNN} graph with edges of binary weights to preserve the intrinsic geometrical structure of source and target data, which can seek more latent common information to reduce the distribution difference and make representations more discriminative. \subsection{Discussion} As a significant part of the graph-based FAA method, different affective graph representations have their merits, shortcomings, and requirements (see Table \ref{tab:agad}). \begin{table*}[!htbp] \centering \scriptsize \caption{An Overview of Affective Graph Representations} \label{tab:agad} \setlength{\tabcolsep}{1.5mm}{ \begin{tabular}{|l|l|l|l|l|} \toprule[1.5pt] \makecell[c]{Category} & \makecell[c]{Branch} & \makecell[c]{Strength} & \makecell[c]{Limitation} & \makecell[c]{Demand} \\ \midrule[0.5pt] \multirow{3}*{Spatial} & Landmark-level & \makecell[l]{Effective facial geometry embedding;\\ Flexible structural relationships} & Sensitive to the landmark detection accuracy & High-quality face registration\\ \cmidrule[0.5pt](r){2-5} & Region-level & \makecell[l]{Versatile local texture extraction;\\ Underlying correlation beyond locations} & \makecell[l]{Landmark sensitive for related ROI graphs;\\ Redundant or missing regions for NPI graphs} & Suitable for various situations \\ \midrule[0.5pt] \multicolumn{2}{|l|}{Spatio-Temporal} & Extra dynamic evolution information & Relatively fixed edges in the time domain & Video/Sequence input \\ \midrule[0.5pt] \multirow{2.5}*{AU-level} & AU-label & \multirow{2.5}*{\makecell[l]{Meaningful semantic dependencies;\\ Explicit prior knowledge introduction}} & Cannot be an end-to-end framework & \multirow{2.5}*{Reliable \& sufficient AU annotations} \\ \cmidrule[0.5pt](r){2-2} \cmidrule[0.5pt](r){4-4} & AU-map & & Unstable co-occurring distributions & \\ \midrule[0.5pt] \multicolumn{2}{|l|}{Sample-level} & \makecell[l]{Modular to existing architectures;\\ Cross-corpus information} & Lack of in-face modelling & Large-scale/Multiple databases \\ \bottomrule[1.5pt] \end{tabular}} \end{table*} \emph{Spatial graph representations:} Conceptually, landmark-level graphs model the facial shape variations of fiducial points and easily generate the internal structural relationships of different affective displays. However, most methods are sensitive to facial landmarks' detection errors, thereby failing in uncontrolled conditions. On the other hand, the selection of landmarks and the connection of edges have not yet formed a standard rule. Their effects on the graph representation are rarely reported, even though some FACS-based strategies have been designed. Region-level graphs explicitly regard an affective face as multiple local crucial facial areas compared with landmark-level graphs. The spatial relationships among selected regions are measured through feature similarity instead of manual initialization based on facial geometry. The circumstance resulting from inaccurate or unreasonable landmarks will also impact related ROI graphs. Since most NPI graphs utilize a region searching strategy, the problem is how to avoid the loss of target face and how to exclude invalid regions. \emph{Spatio-temporal graph representations:} With extra dynamic affective information, spatio-temporal graphs can help aggregate evolution features in continuous time. For landmark-level methods, the current initialization strategy of edges is to link the facial landmark with the same index frame by frame. Unfortunately, no research has been reported to learn the interaction of landmarks with different indexes in the temporal dimension. Besides, in addition to \emph{Euclidean} distance and \emph{Hop} distance, other edge attributes measurement methods should also be explored to model the semantic context both spatially and temporally. For the frame-level methods, embedding domain knowledge related to affective behaviours like the muscular activity by graph structure is not explicitly considered in recent work. Therefore, building a hybrid spatio-temporal graph is a practical way to simultaneously encode the two levels of affective information. \emph{AU-level graph representations:} As a distinctive type, AU-level graphs provide certain semantics of facial affects by representing each AU and its co-occurrence dependency. The measurement criteria of AU correlations are versatile but not general. Most AU-label graphs rely on the label distributions of one or multiple given databases. Nevertheless, AU labelling requires annotators with professional certificates and is a time-consuming task that causes existing databases with AU annotations to be usually small-scale. Therefore, the distribution from limited samples may not reflect the true dependencies of individual AUs, and its impact on FAA still needs to be assessed. \emph{Sample-level graph representations:} Sample-level graphs are an appealing field that introduces latent relationships in data distributions. Such characteristic makes it convenient to integrate with existing FAA methods. However, it also puts forward higher requirements for the diversity and balance of samples. On the other hand, to the best of our knowledge, there is no work combining sample-level and other in-face graphs to construct a joint representation, which we think is a good topic. \section{Affective Graph Relational Reasoning}\label{sec:agrr} Generally, graph relational reasoning can be considered a two-step process, i.e., understanding the structure from a certain group of entities and making inferences of the system as a whole or the property within \cite{kemp2008discovery}. However, things are slightly different in the case of graph-based FAA. Depending on what kind of affective graph representation is exploited, the contribution of graph relational reasoning can be either merged before the decision level with other affective features or reflected as a collaborative way in the level of feature learning. In this Section, we review relational reasoning methods designed for affective graph representations in four categories: \emph{Dynamic BNs (DBNs)}, classical deep models, \emph{Graph Neural Networks (GNNs)} and non-deep machine learning techniques. \subsection{Dynamic Bayesian Networks}\label{sec:rr-dbn} \emph{DBNs} are often used to reason about relationships among facial displays like AUs \cite{el2005real} and, of course, for AU-label graph representations. The \emph{BN} is a \emph{DAG} that reflects a joint probability distribution among a set of variables. In the work of \cite{tong2007facial,cui2020knowledge}, a \emph{DAG} was manually initialized according to prior knowledge, and than large databases were used to perform structure learning to find the optimal probability graph structure. After that, the probabilities of different AUs were inferred by learning the \emph{DBN}. Following this idea, \cite{zhu2014multiple} additionally integrated \emph{DBN} to a multi-task feature learning framework and made the AU inference by calculating the joint probability of each category node. Sometimes \emph{DBN} is also combined with some statistical methods to explore different graph structures \cite{song2021hybrid,song2021dynamic}, such as \emph{Hidden Markov Models} \cite{baltruvsaitis2011real}. Another advanced research of \emph{DBN} is \cite{cui2020label} that modeled the inherent relationships between category labels and property labels. Its parameters were utilized to denote the conditional probability distribution of each AU given the facial affect. The wrong labels could be corrected by leveraging the dependencies after the structure optimization. \subsection{Adjustments of Classical Deep Models} \label{sec:rr-deep} Before \emph{GNNs} are widely employed, many studies have adopted conventional \emph{Deep Neural Networks (DNNs)} to process affective representations with the graph structure. These deep models are not explicitly designed but can conduct standard operations on structural graph data by adjusting the internal architecture or applying an additional transformation to the input graph representation. Fig. \ref{fig:dnn} shows examples of classical deep models for graph relational reasoning. \begin{figure}[tb] \centering \includegraphics[width=0.9\columnwidth]{fig/dnn.pdf} \caption{Classical deep models for graph relational reasoning. (a) RNN \cite{corneanu2018deep}; (b) CNN \cite{liu2019facial}; (c) MLP \cite{dapogny2018confidence}. Zoom in for better view.} \label{fig:dnn} \end{figure} \subsubsection{Recurrent neural networks} The \emph{Recurrent Neural Networks (RNNs)} variant is one of the successfully extended model types for handling graph structural inputs. Similar to random walk, \cite{zhong2019graph} applied a \emph{Bidirectional RNN} to deal with its landmark-level spatial graph representation in a rigid order. The Gabor features of each graph node was updated by multiplying with the average of the connected edges to incorporate the structural information. Subsequently, the nodes were iterated by the RNN with learnable parameters in forwarding and the backward direction. In \cite{corneanu2018deep}, the authors built a structure inference module to capture AU relationships from an AU-map graph representation. Based on a collection of interconnected recurrent structure inference units and a parameter sharing \emph{RNN}, the mutual relationship between two nodes could be updated by replicating an iterative message passing mechanism with the control of a gating strategy (see Fig. \ref{fig:dnn}a). Following the sequential idea of RNNs,\cite{li2019semantic} exploited a \emph{Gated Graph Neural Network (GGNN)} \cite{li2016gated} that calculated the hidden state of the next time-step by jointly considering the current hidden state of each node and adjacent nodes. The relational reasoning could be done through the iterative update of \emph{GGNN} over its AU-map graph. \subsubsection{Convolutional neural networks} Unlike the sequential networks, \cite{liu2019facial} utilized a variant \emph{CNN} to process the landmark-level spatial affective graph. Compared to standard convolution architectures, the convolution layer in this study convolved over the diagonal of a particular adjacency matrix to aggregate the information from multiple nodes. Then a list of the diagonal convolution outputs was further processed by three 1D sequential convolution layers. The corresponding pooling processes were performed behind convolution operations to integrate feature sets (see Fig. \ref{fig:dnn}b). Another attempt for landmark-level spatial graph representations is the \emph{Graph Temporal Convolutional Networks (Graph-TCN)} \cite{lei2020novel}. It followed the idea of \emph{TCNs} that consisted of residual convolution, dilated causal convolution, and weight normalization \cite{bai2018empirical}. By using different dilation factors, TCNs were applied to convolve the elements inside one node sequence and from multiple node sequences. Thus, the \emph{TCN} for a node and \emph{TCN} for an edge could be trained respectively to extract node feature and edge feature simultaneously. Besides, \cite{fan2020facial} exploited a Semantic Correspondence Convolution module to model the correlation among its region-level spatial graph. Based on the assumption that the channels of co-occurring AUs might be activated simultaneously, the \emph{Dynamic Graph CNN (DG-CNN)} \cite{wang2019dynamic} was applied on the edges of the constructed \emph{KNN} graph to connect feature maps sharing similar visual patterns. After the aggregation function, affective features were obtained to estimate AU intensities. \subsubsection{Multilayer perceptron networks} As a vanilla architecture, \emph{Multilayer Perceptrons (MLPs)} has also been explored. \cite{dapogny2018confidence} employed a hierarchical \emph{Auto-Encoder (AE)} based on \emph{MLPs} to capture relationships from a landmark-level spatial graph. Specifically, the first stage learned the texture variations from the extracted \emph{HOG} features for each node. In contrast, the second stage accumulated features of multiple nodes whose appearance changes were closely related and computed the confidence scores as the triangle-wise weights over edges. Finally, a \emph{Random Forest (RF)} was used for facial affect classification and AU detection simultaneously. In \cite{song2021hybrid}, a hybrid graph network composed of different dynamic \emph{MLPs} performed multiple types of message passing, which provided more complementary information for reasoning the positive and negative dependencies among AU nodes (see Fig. \ref{fig:dnn}c). \subsection{Graph Neural Networks}\label{sec:rr-gnn} Unlike conventional deep learning frameworks mentioned in Sec. \ref{sec:rr-deep}, \emph{GNNs} are proposed to extend the 'depth' from 2D image to graph structure and establish an end-to-end learning framework instead of additional architecture adjustment or data transformation \cite{li2018beyond}. Several types of \emph{GNNs} have successfully addressed the relational reasoning of affective graph representations in FAA methods. Fig. \ref{fig:gnn} illustrates several \emph{GNN} architectures for graph relational reasoning. \begin{figure*}[htb] \centering \includegraphics[width=1.95\columnwidth]{fig/gnn.pdf} \caption{GNNs for graph relational reasoning. (a) GCN as an auxiliary module \cite{niu2019multi}; (b) GCN as a collaborative framework \cite{song2021dynamic}; (C) STGCN \cite{chen2021cafgraph} (d) Spectral GCN \cite{jin2021learning}; (e) GAT \cite{chen2021cafgraph}. Zoom in for better view.} \label{fig:gnn}\vspace{-10pt} \end{figure*} \subsubsection{Graph convolutional networks} \emph{Graph Convolutional Networks (GCNs)}, especially the spatial \emph{GCN} \cite{kipf2017semi}, are the most popular \emph{GNN} in graph-based FAA research. Practically, \emph{GCNs} can be set as an auxiliary module \cite{lei2021micro,zhao2021geometry} or part of the collaborative feature learning framework \cite{song2021dynamic}. For the auxiliary module, \emph{GCNs} are applied immediately after the graph representation. However, the outputs of relational reasoning are not directly used for facial affect classification or AU detection but are later combined with other deep features as a weighting factor (see Fig. \ref{fig:gnn}a). \cite{niu2019multi} employed a two-layer \emph{GCN} for message passing among different nodes in its AU-level graph. Both the dependency of positive and negative samples were considered and used to infer a link condition between any two nodes. The output of \emph{GCN} was formulated as a weight matrix of the pre-trained AU classifiers. Besides, \emph{GCNs} can also be utilized following the above manner to execute relational reasoning on atypical graph representations, such as multi-target graph \cite{zhang2019context}, distribution graph \cite{he2019image}, and cross-domain graph \cite{xie2020adversarial}. For the collaborative framework, \emph{GCNs} usually inherit the previous node feature learning model progressively (see Fig. \ref{fig:gnn}b). Like in \cite{liu2020relation}, a \emph{GCN}-based multi-label encoder was proposed to update features of each node over a region-level spatial graph representation. The reasoning process was the same as that in the auxiliary framework. Similar studies also include \cite{zhang2020region} and \cite{chien2020cross}. In addition, to incorporate the dynamic in spatio-temporal graphs, \cite{liu2021video} set \emph{GCNs} as an imitation of attention mechanism or weighting mechanism to share the most contributing features to explore the dependencies among frames. After training, the structure helped nodes update features based on messages from the peak frame and emphasize the concerned facial region. A more feasible way is to apply \emph{Spatial Temporal GCN (STGCN)} \cite{li2019spatio} on spatio-temporal graphs \cite{zhou2020facial,chen2019efficient,zhou2020learning,chen2021cafgraph} (see Fig. \ref{fig:gnn}c). In their relational reasoning, features of each node were generated with its neighbor nodes in the current frame and consecutive frames by using spatial graph convolution and temporal convolution, respectively. Alternatively, the approach of spectral \emph{GCN} \cite{defferrard2016convolutional} has also been studied \cite{rao2021facial}. \cite{jin2021learning} devised a lightweight GCN following the \emph{Message Passing Neural Network} \cite{gilmer2017neural}. A learnable adjacency matrix was adapted to infer the spatial dependencies of ROI nodes in different facial affects. \cite{shirian2021dynamic} extended in \emph{Inception} idea from standard \emph{CNNs} to spectral \emph{GCNs} that captured emotion dynamics at multiple temporal scales. The yielded embeddings of different dimensions were jointly learned over a classification loss and a graph learning loss for the optimal graph structure. \subsubsection{Graph attention networks} \emph{Graph Attention Networks (GATs)} aim to strengthen the node connections with high contribution and offer a more flexible way to process the graph structure \cite{velivckovic2018graph}. \cite{song2021uncertain} introduced an uncertain \emph{GNN} with \emph{GAT} as the backbone. The goal is to select valuable edges, depress noisy edges, and learn AU dependencies on its AU-map graph. In addition, the underlying uncertainties were considered in a probabilistic way, close to the idea of \emph{Bayesian} methods in \emph{GNN} \cite{zhang2019bayesian}, to alleviate the data imbalance by weighting the loss function. On the other hand, \emph{GAT} collaboratively worked with \emph{GCN} in \cite{kumar2021micro} to deal with two-stream graph inputs. Compared to applying \emph{GAT} directly, \cite{xie2020assisted} proposed a GNN that added a self-attention graph pooling layer after three sequential \emph{GCN} layers. A similar block was done in \cite{liu2021sg} which revised the \emph{GCN} block with channel and node attention. It improved the reasoning process on graph representations because only important nodes would be aggregated, including affective information and facial topology. To make nodes interact more dynamically instead of using a constant graph structure, \cite{chen2021cafgraph} applied a set of learnable edge attention masks to the \emph{STGCN} for subtle adjustments of the defined spatio-temporal graph representation (see Fig. \ref{fig:gnn}e). \subsection{Non-deep Machine Learning Methods} \label{sec:rr-td} Although refining deep features extracted by parameterized neural networks and gradient-based methods is the mainstream, they require numerous training samples for effective learning. Due to the insufficient data in the early years or the purpose of efficient computation, many non-deep machine learning techniques have been applied for affective graph relational reasoning. Graph structure learning is one of the widely used approaches. In \cite{kaltwang2015latent}, the reasoning of its spatial graph representation was conducted by \emph{LT} learning. Parameters update and graph-edit of \emph{LT} structure were performed iteratively to maximize the marginal \emph{log}-likelihood of a set of training data. \cite{walecki2017deep} employed \emph{CRF} to infer AU dependencies in an AU-map graph. The use of \emph{copula} functions allowed it to model non-linear dependencies among nodes easily. At the same time, an iterative balanced batch learning strategy was introduced to optimize the most representative graph structure by updating each set of parameters with batches. Approaches of graph feature selection are also exploited in this part, such as \emph{Graph Sparse Coding (GSC)} \cite{liu2018sparse,chen2021learning} and \emph{Elastic Graph Matching (EGM)} \cite{zafeiriou2008discriminant}. These methods have provided a more diverse concept for graph relational reasoning. \subsection{Discussion} Although all the methods above can achieve affective graph relational reasoning, the choice has a causal relationship with the type of graph representation (see Table \ref{tab:agrr}). \begin{table}[!htbp] \centering \scriptsize \caption{Causal Relationships between Graphs and Reasoning methods} \label{tab:agrr} \setlength{\tabcolsep}{2.5mm}{ \begin{tabular}{c|cccc} \toprule[1.5pt] Category & Spatial & Spatio-Temporal & AU-level & Sample-level \\ \midrule[0.5pt] DBNs & & & $\surd$ & \\ DNNs & $\surd$ & $\surd$ & $\surd$ & \\ GNNs & $\surd$ & $\surd$ & $\surd$ & $\surd$ \\ Non-deep & $\surd$ & $\surd$ & $\surd$ & $\surd$ \\ \bottomrule[1.5pt] \end{tabular}} \end{table} \emph{Dynamic Bayesian network}: Nearly half of AU-label graph representations employ \emph{DBNs} as their relational reasoning model. However, the representation quality highly relies on the available training data that need balanced label distribution in positive-negative samples and categories. This strong assumption will limit the effectiveness of node dependencies learned by \emph{DBNs}. Another problem is that \emph{DBNs} can only be combined with facial features as a relatively independent module and are hard to integrate into an end-to-end learning framework. \emph{Classical deep model}: Standard deep models, including \emph{CNNs}, \emph{RNNs} and \emph{MLPs}, have been explored to conduct graph relational reasoning before the emergence of \emph{GNNs}. Even if they are suitable for more graph representations than \emph{DBNs}, these grid models focus more on local features. The additional adjustments in input format or/and network architecture cause losses of node information or let node messages only pass and update in a specific sequence, which suppresses the global property represented by the graph. Thus, we think the specifically designed networks like \emph{GNNs} will become dominant in this part. \emph{Graph neural network}: \emph{GNNs} are developing techniques that make full advantages of graphs. Architectures with different focuses have been proposed but have their flaws as well. For instance, \emph{GCNs} cannot handle directed edges well (e.g., AU-level graphs), while \emph{GATs} only use the node links without considering edge attributes (e.g., spatial graphs). Besides, due to the low dimension of the nodes in affective graphs, too deep \emph{GNNs} may be counterproductive. In addition, being an auxiliary block or part of the whole framework will influence the construction of \emph{GNNs}. Therefore, managing graph representation and relational reasoning using \emph{GNNs} still need to be explored. \emph{Non-deep methods}: Non-deep machine learning has a place in early studies and is even applied in recent work because no training is required. They partly inspire advanced techniques like \emph{DBNs} and \emph{GNNs}. Nevertheless, one of the reasons they have been replaced is that these approaches need to be designed separately to cope with different graph representations, similar to hand-crafted feature extraction. Hence, it is not easy to form a general framework. On the other hand, more training data and richer computing resources allow deep models to perform more effective and higher-level relational reasoning on affective graphs. \section{Applications and Performance}\label{sec:appe} According to different description models of facial affects, the FAA can be subdivided into multiple applications. The typical output of FAA systems is the label of a basic facial affect or AUs. Recent research also extends the goal to predict micro-expression or affective intensity labels or continuous affects. This section compares and discusses graph-based FAA methods from four main application categories: facial expression recognition, AU detection, micro-expression recognition, and a few special applications. Due to page limitation, we select most relevant and representative papers following these standards: published in more well-known forums in the past five years; or belonging to distinct branches of graph representation and reasoning for diversity consideration. \subsection{Databases} Most FAA studies apply public databases of facial affect as validation material. A comprehensive overview is presented in Table \ref{tab:db}. The characteristics of these databases are listed from four aspects: samples, attributes, graph-related properties, and certain contents. Fig. \ref{fig:data} exhibits several examples of facial affects under different conditions. In addition, for better interpreting the graph-based FAA, we summarize corresponding elements (e.g., landmark coordinates, AU labels) self-carried by databases, which are rarely considered in previous related surveys. \begin{table*}[!htbp] \centering \scriptsize \begin{threeparttable} \caption{An Overview of Facial Affect Databases} \label{tab:db} \setlength{\tabcolsep}{2mm}{ \begin{tabular}{lcccccccccc} \toprule[1.5pt] \multirow{2}*{Database 'year} & \multicolumn{3}{c}{Samples} & \multicolumn{3}{c}{Attributes} & \multicolumn{3}{c}{Graph-based Properties$^3$} & \multirow{2}*{Special Contents$^4$} \\ \cmidrule[0.5pt](r){2-4} \cmidrule[0.5pt](r){5-7} \cmidrule[0.5pt](r){8-10} & Data Type & Subjects & Number & Eli. \& Sou.$^1$ & Affects$^2$ & B.B.$^1$ & LM & AU & Dynamic & \\ \midrule[0.5pt] CK(+) '10 & Sequences & 97(123) & 486(593) & P \& Lab & 6B+N(+C) & $\bullet$ & $\bullet$ & $\bullet$ + I & $\bullet$ & / \\ MMI '10 & Images/Videos & 75 & 740/2900 & P \& Lab & 6B+N & $\circ$ & $\circ$ & $\bullet$ & $\bullet$ + D & Head pose \\ Oulu-CASIA '11 & Sequences & 80 & 2880 & P \& Lab & 6B & $\bullet$ & $\circ$ & $\circ$ & $\bullet$ & NIR \\ DISFA '13 & Sequences & 27 & 130,000 & S \& Lab & 6B+N & $\bullet$ & $\bullet$ & $\bullet$ + I & $\bullet$ + F & / \\ \midrule[0.5pt] FER-2013 '13 & Images & / & 35887 & S \& Web & 6B+N & $\bullet$ & $\circ$ & $\circ$ & $\circ$ & Wild \\ SFEW 2.0 '15 & Images & / & 1766 & S \& Movie & 6B+N & $\bullet$ & $\bullet$ & $\circ$ & $\circ$ & Wild \\ AFEW 7.0 '17 & Videos & / & 1809 & S \& Movie & 6B+N & $\bullet$ & $\bullet$ & $\circ$ & $\bullet$ & Audio, Wild \\ \midrule[0.5pt] BU-3DFE '06 & Images & 100 & 2500 & P \& Lab & 6B+N & $\bullet$ & $\bullet$ & $\circ$ & $\circ$ & 3D, Multi-view, I \\ BU-4DFE '08 & Videos & 101 & 606 & P \& Lab & 6B+N & $\bullet$ & $\bullet$ & $\bullet$ + I & $\bullet$ & 3D, Multi-view \\ BP4D '14 & Videos & 41 & 328 & S \& Lab & 6B+E+P & $\bullet$ & $\bullet$ & $\bullet$ + I & $\bullet$ + F & 3D, Head pose \\ \midrule[0.5pt] SMIC '13 & Sequences & 16 & 164 & S \& Lab & 3B$^\dag$+N & $\bullet$ & $\circ$ & $\circ$ & $\bullet$ & Micro., NIR \\ CASME II '14 & Sequences & 35 & 247 & S \& Lab & 3B$^\ddag$+R+O & $\bullet$ & $\circ$ & $\bullet$ & $\bullet$ + D & Micro. \\ SAMM '18 & Sequences & 32 & 159 & S \& Lab & 6B+C & $\bullet$ & $\circ$ & $\bullet$ & $\bullet$ + D & Micro. \\ CAS(ME)$^2$ '18 & Sequences & 22 & 300+57 & S \& Lab & 3B$^\dag$+O & $\bullet$ & $\circ$ & $\bullet$ & $\bullet$ + D & Macro. \& Micro. \\ \midrule[0.5pt] EmotioNet '16 & Images & / & 950,000 & S \& Web & 6B+17Comp. & $\bullet$ & $\bullet$ & $\bullet$ + I & $\circ$ & Wild \\ ExpW '18 & Images & / & 91,793 & S \& Web & 6B+N & $\bullet$ & $\circ$ & $\circ$ & $\circ$ & Multi-sub., Wild\\ RAF-DB '19 & Images & / & 29672 & S \& Web & 6B+N+11Comp. & $\bullet$ & $\bullet$ & $\circ$ & $\circ$ & Wild \\ AffectNet '19 & Images & / & 420,299 & S \& Web & 6B+N+C+O & $\bullet$ & $\bullet$ & $\circ$ & $\circ$ & V\&A, Wild \\ EMOTIC '19 & Images & / & 23,571 & S \& Web & 6B+N+19Comp. & $\bullet$ & $\circ$ & $\circ$ & $\circ$ & V\&A, Multi-sub., Wild \\ \bottomrule[1.5pt] \end{tabular}} \begin{tablenotes} \item[1] Eli.: elicitation; Sou.: source; P: posed; S: spontaneous; B.B.: bounding boxes; LM: landmarks; $\bullet$ = Yes, $\circ$ = No. \item[2] 6B: six basic affects; N: neutral; C: contempt; E: embarrassment; P: pain; O: others; R: repression; 3B$^\dag$: three basic affects (positive, negative, surprise); 3B$^\ddag$: three basic affects (happiness, disgust, surprise); Comp.: compound affects. \item[3] I: intensity annotation; D: onset-apex-offset annotation; F: frame-level annotation. \item[4] NIR: near-infrared; Multi-sub.: multiple subjects per image; Micro.: micro-expression; Macro.: macro-expression; Wild: in-the-wild; V\&A: valence and arousal. \end{tablenotes} \end{threeparttable} \end{table*} \begin{figure}[tb] \centering \includegraphics[width=0.95\columnwidth]{fig/data.pdf} \caption{Facial affect databases. (a) Oulu-CASIA contains posed facial affects; (b) SFEW 2.0 has facial affects under in-the-wild scenarios; (c) BP4D provides 3D affective face images; (d) EMOTIC, multiple faces appear per image with VAD annotations; (e) The SMIC collects images of spontaneous micro facial affects in visual light and near infrared light; (f) DISFA offers frame-level AU intensity labels.} \label{fig:data}\vspace{-10pt} \end{figure} Databases containing posed facial affects, including Extended Cohn-Kanade Dataset (CK+) \cite{kanade2000comprehensive,lucey2010extended}, M\&M Initiative Facial Expression Database (MMI) \cite{valstar2010induced}, and Oulu-CASIA NIR\&VIS Facial Expression Database (Oulu-CASIA) \cite{zhao2011facial}, are chosen by early FAA methods. More challenging databases, such as FER-2013 \cite{goodfellow2013challenges}, Static Facial Expression in the Wild (SFEW) 2.0 \cite{dhall2015video}, and Acted Facial Expression in the Wild (AFEW) 7.0 \cite{dhall2017individual}, tend to acquire spontaneous affective data from complex and wild environments. Some databases also contain intensity labels of facial affects and even AUs, e.g., Denver Intensity of Spontaneous Facial Action Database (DISFA) \cite{mavadati2013disfa}, Binghamton University 3D/4D Facial Expression Database (BU-3DFE/4DFE) \cite{yin20063d,zhang2013high} and Binghamton-Pittsburgh 3D Dynamic Spontaneous Facial Expression Database (BP4D) \cite{zhang2014bp4d}. Another type of database is for micro-expressions. Participants are required to keep a neutral face while watching videos associated with induction of specific affects \cite{zhao2019automatic}. Following this setting, Spontaneous Micro Facial Expression Database (SMIC) \cite{li2013spontaneous}, Improved Chinese Academy of Sciences Micro-Expression Database (CASME II) \cite{yan2014casme}, Spontaneous Micro-Facial Movement Database (SAMM) \cite{davison2018samm}, Chinese Academy of Sciences Macro-Expression and Micro-Expression Database (CAS(ME)$^2$) \cite{qu2018cas} have been released. However, it is hard to collect and annotate large-scale micro-expression data with uncontrolled scenarios due to its subtle, rapid, and involuntary nature. Recently, several large-scale databases have been developed to provide massive data with spontaneous facial affects and in-the-wild conditions, such as Real-World Affective Face Database (RAF-DB) \cite{li2018reliable}, Large-Scale Face Expression in-the-Wild dataset (ExpW) \cite{zhang2018facial2}, EMOTIC \cite{kosti2019context}, AffectNet \cite{mollahosseini2017affectnet}, and EmotioNet \cite{fabian2016emotionet}. Concerning graph-based FAA, it is available to find and select suitable databases with corresponding metadata, such as landmarks, AU labels, and dynamics, for different graph representation purposes. However, existing databases also have some shortcomings. On the one hand, not enough accurate AU annotations are provided by in-the-wild databases, limiting AUs' role in FAA. On the other hand, there is still a blank in the dynamic large-scale affective database field, so it is hard to use temporal information to generate affective graph representation. Finally, databases about natural and spontaneous facial affects in a continuous domain need more attention instead of discrete categories. \subsection{Facial Expression Recognition} Facial expression recognition (FER), or macro-expression recognition, has been working on basic facial affects classification. An inevitable trend of FER is that the research focus has shifted from the early posed facial affects in controlled conditions to the recent spontaneous facial affects in real scenarios. In other words, recognizing the former is considered a solved problem for FAA methods, including graph-based FER, which can be corroborated from the results in Table \ref{tab:fer}. For example, the performance on the CK+ database is very close to $100\%$ \cite{kotsia2006facial,rivera2015spatiotemporal,liu2021video,liu2021sg}. \begin{table*}[!htbp] \centering \scriptsize \begin{threeparttable} \caption{Performance summary of representative graph-based FER methods} \label{tab:fer} \setlength{\tabcolsep}{0.8mm}{ \begin{tabular}{|l|c|c|c|c|c|c|c|l|l|c|} \toprule[1.5pt] \multirow{2}*{References} & \multicolumn{2}{c|}{Prep.$^1$} & \multicolumn{3}{c|}{Representation$^2$} & \multicolumn{2}{c|}{Reasoning} & \makecell[c]{\multirow{2}*{Posed Database$^3$}} & \makecell[c]{\multirow{2}*{Wild Database}} & \multirow{2}*{Validation$^4$} \\ \cmidrule[0.5pt](r){2-3} \cmidrule[0.5pt](r){4-6} \cmidrule[0.5pt](r){7-8} & B.B. & LM & Category & Node & Edge & Model & Classifier & & & \\ \midrule[1.0pt] \citet{kotsia2006facial} & $\circ$ & 104 & $\mathcal{S:L}$ & $\mathbb{C}$ & $\bigtriangleup$ & \emph{Tracking} & \emph{SVM} & CK \emph{ar}: 0.997 & \makecell[c]{/} & LO CV \\ \midrule[0.5pt] \citet{zafeiriou2008discriminant} & $\bullet$ & / & $\mathcal{S:R}$ & \emph{NM} & \emph{L} & \emph{Tracking} & \emph{EGM} & CK \emph{ar}: 0.971 & \makecell[c]{/} & LO CV \\ \midrule[0.5pt] \citet{mohseni2014facial} & $\circ$ & 50 & $\mathcal{S:L}$ & $\mathbb{C}$ & \emph{M}+$\mathbb{E}$ & \emph{Tracking} & \emph{Adaboost} & MMI \emph{ar}: 0.877 & \makecell[c]{/} & 10F CV \\ \midrule[0.5pt] \citet{rivera2015spatiotemporal} & $\bullet$ & / & $\mathcal{ST:R}$ & \emph{Histograms} & \emph{DNG} & \emph{Tracking} & \emph{SVM} & \makecell[l]{CK+ \emph{ar}: 1; MMI \emph{ar}: 0.976;\\ Oulu \emph{ar}: 0.984} & \makecell[c]{/} & 10F CV \\ \midrule[0.5pt] \citet{yao2015capturing} & $\bullet$ & / & $\mathcal{S:R}$ & \emph{LBP} & \emph{L} & / & \makecell[c]{\emph{SVM} \\\emph{CNN}} & \makecell[c]{/} & \makecell[l]{SFEW \emph{ar}: 0.5538;\\ AFEW \emph{ar}: 0.5380;} & HO \\ \midrule[0.5pt] \citet{dapogny2018confidence} & $\bullet$ & 49 & $\mathcal{S:L}$ & $\mathbb{C}$+\emph{HOG} & $\bigtriangleup$ & \emph{AE} & \emph{RF} & \makecell[l]{CK+ \emph{ar}: 0.934;\\ BU-4DFE \emph{ar}: 0.750} & SFEW \emph{ar}: 0.371 & \makecell[c]{10F-SI CV\\ /HO} \\ \midrule[0.5pt] \citet{zhong2019graph} & $\bullet$ & 46 & $\mathcal{S:L}$ & \emph{Gabor} & \emph{F}+$\mathbb{E}$ & \emph{RNN} & \emph{Softmax} & \makecell[l]{CK+ \emph{ar}: 0.9827; MMI \emph{ar}: 0.9444;\\ Oulu \emph{ar}: 0.9306} & \makecell[c]{/} & 10F-SI CV \\ \midrule[0.5pt] \citet{chen2020label} & $\bullet$ & / & $\mathcal{AU:B}$ & $\Phi$ & \emph{KNN} & / & \emph{Softmax} & \makecell[l]{CK+ \emph{ar}: 0.9308;\\ MMI \emph{ar}: 0.7049;\\ Oulu \emph{ar}: 0.6385} & \makecell[l]{SFEW \emph{ar}: 0.5650;\\ RAF \emph{ar}: 0.8553;\\ AffNet: \emph{ar}: 0.5935} & \makecell[c]{CD\\ (AffNet+RAF)} \\ \midrule[0.5pt] \citet{liu2019facial} & $\bullet$ & 68 & $\mathcal{S:L}$ & $\mathbb{C}$+\emph{HOG} & $\bigtriangleup$ & \emph{CNN} & \emph{Softmax} & CK+ \emph{ar}: 0.9767; MMI \emph{ar}: 0.8011 & SFEW \emph{ar}: 0.5536 & \makecell[c]{10F-SI CV\\ /HO} \\ \midrule[0.5pt] \citet{xie2020adversarial} & $\bullet$ & / & $\mathcal{S:R}$ & \emph{ResNet} & \emph{K-means} & \emph{GCN} & \emph{Softmax} & \makecell[l]{CK+ \emph{ar}: 0.8527;\\ JAFEE \cite{lyons1999automatic} \emph{ar}: 0.6150} & \makecell[l]{SFEW \emph{ar}: 0.5643;\\ FER2013 \emph{ar}: 0.5895\\ ExpW \emph{ar}: 68.50\%} & CD (RAF) \\ \midrule[0.5pt] \citet{zhou2020facial} & $\bullet$ & 34 & $\mathcal{ST:L}$ & $\mathbb{C}$+\emph{HOG} & \emph{M}+$\mathbb{H}$ & \emph{GCN} & \emph{Softmax} & CK+ \emph{ar}: 0.9863; Oulu \emph{ar}: 0.8723 & \makecell[c]{/} & 10F-SI CV \\ \midrule[0.5pt] \citet{liu2021video} & $\bullet$ & / & $\mathcal{ST:F}$ & \emph{VGG} & \emph{F} & \emph{GCN} & \emph{LSTM} & \makecell[l]{CK+ \emph{ar}: 0.9954; MMI \emph{ar}: 0.8589;\\ Oulu \emph{ar}: 0.9104} & \makecell[c]{/} & 10F-SI CV \\ \midrule[0.5pt] \citet{zhou2020learning} & $\bullet$ & 44 & $\mathcal{ST:L}$ & $\mathbb{C}$+\emph{HOG} & \emph{L}+$\mathbb{H}$ & \emph{GCN} & \emph{Softmax} & CK+ \emph{ar}: 0.9892; Oulu \emph{ar}: 0.8750 & AFEW \emph{ar}: 0.4512 & \makecell[c]{10F-SI CV\\ /HO} \\ \midrule[0.5pt] \citet{cui2020knowledge} & $\circ$ & / & $\mathcal{AU:B}$ & \emph{CNN} & $\Phi$ & \emph{DBN} & \emph{Softmax} & \makecell[l]{CK+ \emph{ar}: 0.9759; BP4D \emph{ar}: 0.8382;\\ MMI \emph{ar}: 0.8490} & EmotioNet \emph{ar}: 0.9555 & 5F-SI CV\\ \midrule[0.5pt] \citet{liu2021sg} & $\bullet$ & 40 & $\mathcal{S:L}$ & \makecell[c]{$\mathbb{C}$+\emph{HOG}+\emph{Gabor}\\ /$\mathbb{C}$+CNN} & \makecell[c]{\emph{L}+$\mathbb{H}$\\ /\emph{L}+$\mathbb{E}$} & \emph{GCN} & \emph{Softmax} & \makecell[l]{CK+ \emph{ar}: 0.9923; MMI \emph{ar}: 0.8575;\\ Oulu \emph{ar}: 0.9088} & \makecell[l]{SFEW \emph{ar}: 0.5742\\ RAF \emph{ar}: 0.8713} & \makecell[c]{10F-SI CV\\ /HO} \\ \midrule[0.5pt] \citet{chen2021learning} & $\circ$ & / & $\mathcal{X}$ & \emph{HOG} & \emph{KNN} & \emph{GSC} & \emph{SVM} & \makecell[l]{CK+ (JAFEE) \emph{ar}: 0.7171;\\ JAFEE (CK+) \emph{ar}: 0.5667;\\ Oulu (CK+) \emph{ar}: 0.4834;\\ CK+ (Oulu) \emph{ar}: 0.7756} & \makecell[c]{/} & CD \\ \midrule[0.5pt] \citet{shirian2021dynamic} & $\circ$ & 68 & $\mathcal{ST:F}$ & $\mathbb{C}$ & \emph{F} & \emph{GCN} & \emph{Softmax} & \makecell[l]{RML \cite{wang2008recognizing} \emph{ar}: 0.9411;\\ eNTERFACE \cite{martin2006enterface} \emph{ar}: 0.8749;\\ RAVDESS \cite{livingstone2018ryerson} \emph{ar}: 0.8565} & \makecell[c]{/} & 10F CV \\ \midrule[0.5pt] \citet{jin2021learning} & $\bullet$ & 68 & $\mathcal{S:R}$ & \emph{LBP/AE} & \emph{F/M} & \emph{GCN} & \emph{Softmax} & CK+ \emph{ar}: 0.9432; Oulu \emph{ar}: 0.7328 & RAF \emph{ar}: 0.5825 & \makecell[c]{10F-SI CV\\ /HO} \\ \midrule[0.5pt] \citet{zhao2021geometry} & $\bullet$ & 68 & $\mathcal{S:L}$ & $\mathbb{C}$+\emph{CNN} & \emph{M} & \emph{GCN} & \emph{Softmax} & \makecell[l]{CK+ (RAF) \emph{ar}: 0.9320;\\ MMI (RAF) \emph{ar}: 0.7439;\\ Oulu (RAF) \emph{ar}: 0.6302} & \makecell[l]{SFEW \emph{ar}: 0.5711\\ RAF \emph{ar}: 0.8752} & \makecell[c]{10F-SI CV\\ /HO} \\ \midrule[0.5pt] \citet{rao2021facial} & $\bullet$ & 68 & $\mathcal{S:L}$ & $\mathbb{C}$ & \emph{M} & \emph{GCN} & \emph{Softmax} & \makecell[l]{CK+ \emph{ar}: 0.9868;\\ JAFEE \emph{ar}: 0.9664} & \makecell[l]{FER2013 \emph{ar}: 0.7806\\ RAF \emph{ar}: 0.8695} & \makecell[c]{10F/LO CV\\ /HO} \\ \bottomrule[1.5pt] \end{tabular}} \begin{tablenotes} \item[1] Prep.: processing; B.B.: bounding boxes; $\bullet$ = Yes, $\circ$ = No; LM: landmarks. \item[2] $\mathcal{S/ST/AU/X}$: \{spatial; spatio-temporal; AU-level; sample-level\} representation; $\mathcal{:L/R/F}$: \{landmark; region; frame\}-level graph; $\mathbb{C}$: landmark coordinates; $\Phi$: label distributions; $\bigtriangleup$: triangulation; \emph{L/M/F}: \{learning; manual; full\} connections; $\mathbb{E}$: Euclidean distance; $\mathbb{H}$: Hop distance. \item[3] \emph{ar}: average accuracy rate; DB1 (DB2): train on database 2, test on database 1. \item[4] CV: cross validation; LO: leave-one-subject-out; HO: holdout validation; 10F: 10-flods; SI: subject independent; CD (DB): cross database validation (training database). \end{tablenotes} \end{threeparttable} \end{table*} From the view of the representation, spatial graphs and spatio-temporal graphs are dominant. Specifically, hand-crafted features (e.g., \emph{LBP} \cite{yao2015capturing,jin2021learning}, \emph{Gabor} \cite{zhong2019graph,liu2021sg}, \emph{HOG} \cite{liu2019facial,zhou2020facial,chen2021learning}) or deep-based features (e.g., \emph{CNN} \cite{liu2021sg,zhao2021geometry}, \emph{VGG} \cite{liu2021video}, \emph{ResNet} \cite{xie2020assisted}) are employed to enhance the node representation similar to many non-graph FER methods \cite{zhao2007dynamic,zhang2017facial}. For reasoning approaches, early studies prefer to capture the relations of an individual node from predefined graph structures using tracking strategies \cite{kotsia2006facial,zafeiriou2008discriminant,mohseni2014facial,rivera2015spatiotemporal} or general machine learning models (e.g., \emph{RF} \cite{dapogny2018confidence}, \emph{RNN} \cite{zhong2019graph}, \emph{CNN} \cite{liu2019facial}). In the latest work, \emph{GCNs} become one of the mainstream choices in the latest work and show state-of-the-art performances on posed and in-the-wild databases \cite{xie2020assisted,liu2021sg,jin2021learning,zhao2021geometry,rao2021facial}. Another observation is that the framework of combining the spatio-temporal graph representation and \emph{GNNs} is getting more attention in FER studies \cite{zhou2020facial,zhou2020learning,liu2021video,shirian2021dynamic}. Although many graph-based studies have shown improvements in predicting facial affects, FER still has some potential topics. One thing is that the goal of existing methods stays on classifying basic facial affects. No study of graph-based methods to recognize compound affects (or mixture affects), whose labels are provided by recent databases like RAF-DB and EmotioNet, is reported. One possible solution is introducing AU-level graph representations that can describe fine-grained macro-expressions with closer inter-class distances. The other topic is practical graph-based representations due to the big gap between the performance of current methods and the acceptable result in practice when analyzing in-the-wild facial affects. In addition, since existing databases lack sufficient dynamic annotated samples, the evaluation of spatio-temporal graphs in large-scale conditions remains explored. \subsection{Action Unit Detection} The AU detection (AUD) facilitates a comprehensive analysis of the facial affect and is typically formulated as a multi-task problem that learns a two-class classification model for each AU. It can expand the recognition categories of macro-expressions through the AU combination \cite{kaltwang2015latent} and can be used as a pre-step to enhance the recognition of micro-expressions \cite{lei2021micro}. Compared with graph-based FER, the wide usage of graph structures has a long history in AUD \cite{martinez2017automatic} and has played a more dominant role. Table \ref{tab:aud} summarizes graph-based AUD methods including the performance comparison. \begin{table*}[!htbp] \centering \scriptsize \begin{threeparttable} \caption{Performance summary of representative graph-based AUD methods} \label{tab:aud} \setlength{\tabcolsep}{1.7mm}{ \begin{tabular}{|l|c|c|c|c|c|c|c|l|c|} \toprule[1.5pt] \multirow{2}*{References} & \multicolumn{2}{c|}{Prep.$^1$} & \multicolumn{3}{c|}{Representation$^2$} & \multicolumn{2}{c|}{Reasoning} & \makecell[c]{\multirow{2}*{Database$^3$}} & \multirow{2}*{Validation$^4$} \\ \cmidrule[0.5pt](r){2-3} \cmidrule[0.5pt](r){4-6} \cmidrule[0.5pt](r){7-8} & B.B. & LM & Category & Node & Edge & Model & Output & & \\ \midrule[1.0pt] \citet{tong2007facial} & $\bullet$ & / & $\mathcal{AU:B}$ & \emph{Gabor} & $\Phi$ & \emph{DBN} & \emph{Adabst} & \makecell[l]{CK \emph{ar}: 0.9933;\\ MMI (CK) \emph{ar}: 0.939} & \makecell[c]{LO CV\\ /CD} \\ \midrule[0.5pt] \citet{zhu2014multiple} & $\bullet$ & 49 & $\mathcal{AU:B}$ & $\mathbb{C}$+\emph{Gabor} & $\Phi$ & \emph{DBN} & \emph{MPE} & \makecell[l]{CK+ \emph{ar}: 90.48\%, \emph{f}$_1$: 0.7072; \\ DISFA \emph{ar}: 93.56\%, \emph{f}$_1$: 0.7095} & 2F, 10F CV \\ \midrule[0.5pt] \citet{kaltwang2015latent} & $\circ$ & 66 & $\mathcal{S:L}$ & $\mathbb{C}$ & \emph{L} & \multicolumn{2}{c|}{\emph{LT}} & DISFA \emph{corr}: 0.43, \emph{mse}: 0.39, \emph{icc}: 0.36 & 9F CV \\ \midrule[0.5pt] \citet{walecki2017deep} & $\circ$ & / & $\mathcal{AU:M}$ & \emph{CNN} & \emph{L} & \emph{CRF} & \emph{\makecell[c]{Ordinal\\ Regression}} & \makecell[l]{FERA 2015 \cite{valstar2015fera} \emph{icc}: 0.63, \emph{mae}: 1.23; \\ DISFA \emph{icc}: 0.45, \emph{mae}: 0.61} & HO \\ \midrule[0.5pt] \citet{corneanu2018deep} & $\bullet$ & / & $\mathcal{AU:M}$ & \emph{VGG} & $\Phi$ & \emph{RNN} & \emph{Sigmoid} & \makecell[l]{BP4D \emph{f}$_1$: 0.617; DISFA \emph{f}$_1$: 0.567} & 3F-SI CV \\ \midrule[0.5pt] \citet{dapogny2018confidence} & $\bullet$ & 49 & $\mathcal{S:L}$ & $\mathbb{C}$+\emph{HOG} & $\bigtriangleup$ & \emph{AE} & \emph{RF} & \makecell[l]{CK+ \emph{auc}: 0.953, \emph{f}$_1$: 0.788, \emph{nf}$_1$: 0.865;\\ BP4D: \emph{auc}: 0.727, \emph{f}$_1$: 0.557, \emph{nf}$_1$: 0.636;\\ DISFA \emph{auc}: 0.824, \emph{f}$_1$: 0.491} & 10F-SI CV \\ \midrule[0.5pt] \citet{li2019semantic} & $\bullet$ & 20 & $\mathcal{AU:M}$ & $\mathbb{C}$+\emph{VGG} & \emph{M+L} & \emph{GGNN} & \emph{FC} & \makecell[l]{BP4D \emph{auc}: 0.741, \emph{f}$_1$: 0.629;\\ DISFA \emph{auc}: 0.807, \emph{f}$_1$: 0.559} & No report \\ \midrule[0.5pt] \citet{niu2019multi} & $\bullet$ & / & $\mathcal{AU:M}$ & $\mathbb{W}$ & \emph{L} & \emph{GCN} & \emph{FC} & BP4D \emph{f}$_1$: 0.598; EmotioNet \emph{f}$_1$: 0.681 & 3F-SI CV/ HO \\ \midrule[0.5pt] \citet{liu2020relation} & $\bullet$ & 19 & $\mathcal{S:R}$ & \makecell[c]{\emph{CNN}\\+\emph{AE}} & \emph{M} & \emph{GCN} & \emph{FC} & \makecell[l]{BP4D \emph{auc}: 0.873, \emph{f}$_1$: 0.628;\\ DISFA \emph{auc}: 0.746, \emph{f}$_1$: 0.550} & 3F-SI CV \\ \midrule[0.5pt] \citet{fan2020facial} & $\bullet$ & 20 & $\mathcal{S:R}$ & \emph{ResNet} & KNN+$\mathbb{E}$ & \emph{DG-CNN} & \emph{\makecell[c]{Heatmap\\ Regression}} & \makecell[l]{BP4D \emph{icc}: 0.72, \emph{mae}: 0.58;\\ DISFA \emph{icc}: 0.47, \emph{mae}: 0.20} & 3F-SI CV \\ \midrule[0.5pt] \citet{liu2019facial} & $\bullet$ & 68 & $\mathcal{S:L}$ & $\mathbb{C}$+\emph{HOG} & $\bigtriangleup$ & \emph{CNN} & \emph{FC} & CK+ \emph{auc}: 0.929 & 10F-SI CV \\ \midrule[0.5pt] \citet{zhang2020region} & $\bullet$ & 18 & $\mathcal{S:R}$ & \emph{HRN} & \emph{L} & \emph{GCN} & \emph{\makecell[c]{Heatmap\\ Regression}} & BP4D \emph{f}$_1$: 0.635; DISFA \emph{f}$_1$: 0.620 & 3F-SI CV \\ \midrule[0.5pt] \citet{cui2020label} & $\circ$ & 51 & $\mathcal{AU:B}$ & \emph{LBP} & $\Phi$ & \emph{DBN} & \makecell[c]{\emph{LR}\\\emph{/CNN}\\\emph{/SVM}} & \makecell[l]{CK+ \emph{f}$_1$: 0.830; BP4D \emph{f}$_1$: 0.687;\\ EmotionNet \emph{f}$_1$: 0.626;\\ MMI (CK+) \emph{f}$_1$: 0.532} & \makecell[c]{5F-SI CV\\ /CD} \\ \midrule[0.5pt] \citet{cui2020knowledge} & $\circ$ & / & $\mathcal{AU:B}$ & \emph{VGG} & $\Phi$ & \emph{DBN} & \emph{FC} & \makecell[l]{CK+ \emph{f}$_1$: 0.74; BP4D \emph{f}$_1$: 0.57;\\ MMI \emph{f}$_1$: 0.58} & 5F-SI CV \\ \midrule[0.5pt] \citet{song2021uncertain} & $\bullet$ & / & $\mathcal{AU:M}$ & \emph{ResNet} & \emph{Mask} & \emph{GAT} & \emph{Softmax} & \makecell[l]{BP4D \emph{ar}: 0.782, \emph{f}$_1$: 0.633;\\ DISFA \emph{ar}: 0.934, \emph{f}$_1$: 0.600} & 3F-SI CV \\ \midrule[0.5pt] \citet{song2021hybrid} & $\bullet$ & / & $\mathcal{AU:M}$ & \emph{ResNet} & $\Phi$ & \emph{Hybrid GNN} & \emph{Softmax} & BP4D \emph{f}$_1$: 0.634; DISFA \emph{f}$_1$: 0.610 & 3F-SI CV \\ \midrule[0.5pt] \citet{song2021dynamic} & $\bullet$ & / & $\mathcal{AU:M}$ & \emph{ResNet} & $\Phi$ & \emph{GCN+LSTM} & \emph{FC} & \makecell[l]{FERA 2015 \emph{icc}: 0.72, \emph{mae}: 0.57;\\ DISFA \emph{icc}: 0.56, \emph{mae}: 0.22} & 3F-SI CV \\ \midrule[0.5pt] \citet{chen2021cafgraph} & $\bullet$ & 68 & $\mathcal{ST:L}$ & \emph{DCT+CNN} & \emph{M+Mask} & \emph{GCN} & \emph{Softmax} & BP4D \emph{f}$_1$: 0.649; DISFA \emph{f}$_1$: 0.658 & 3F-SI CV \\ \bottomrule[1.5pt] \end{tabular}} \begin{tablenotes} \item[1] Prep.: processing; B.B.: bounding boxes; $\bullet$ = Yes, $\circ$ = No; LM: landmarks. \item[2] $\mathcal{S/ST/AU}$: \{spatial; spatio-temporal; AU-level\} representation; $\mathcal{:L/R/B/M}$: \{landmark; region; label; map\}-level graph; $\mathbb{C}$: landmark coordinates; $\Phi$: label distributions; $\bigtriangleup$: triangulation; \emph{L/M}: \{learning; manual\} connections; $\mathbb{E}$: Euclidean distance. \item[3] \emph{ar}: average accuracy rate; \emph{f}$_1$: F1 score; \emph{nf}$_1$: F1-norm score; \emph{corr}: Pearson correlation coefficient; \emph{mae}: mean absolute error; \emph{mes}: mean squared error; \emph{icc}: intra-class correlation coefficient, ICC(3,1); \emph{auc}: area under the receiver operating characteristic curve; DB1 (DB2): train on database 2, test on database 1. \item[4] CV: cross validation; LO: leave-one-subject-out; (K)F: k-folds; SI: subject independent; HO: holdout validation; CD: cross database validation. \end{tablenotes} \end{threeparttable} \end{table*} Specifically, spatial graphs and AU-level graphs are equally popular in the representation part of AUD. Interestingly, no matter landmark-level or region-level, all the spatial graphs constructed in the listed AUD methods employed facial landmarks \cite{kaltwang2015latent,dapogny2018confidence,liu2020relation,fan2020facial,liu2019facial,zhang2020region}, even for the spatio-temporal graph \cite{chen2021cafgraph}. The possible reason is that the landmark information is helpful and practical for locating the facial areas where AUs may occur. In this setting, their node representations were close to that in spatial graphs of FER methods, which usually combined geometric coordinates with appearance features (e.g., \emph{HOG} \cite{dapogny2018confidence,liu2019facial}). Although some AUD methods using AU-level graphs also exploited traditional features (e.g., \emph{Gabor} \cite{tong2007facial,zhu2014multiple}, \emph{LBP} \cite{cui2020label}) or deep features (e.g., \emph{VGG} \cite{corneanu2018deep}) to introduce appearance information, their graph representations were initialized from the AU label distribution of the training set. Thus, the \emph{DBN} model has become popular in the relational reasoning stage \cite{tong2007facial,zhu2014multiple,cui2020label}. Another similar trend to graph-based FER is that \emph{GNNs} have been widely utilized to learn the latent dependency among individual AUs in recent studies, such as \emph{GCN} \cite{niu2019multi,liu2020relation,zhang2020region,chen2021cafgraph}, \emph{GAT} \cite{song2021uncertain}, \emph{GGNN} \cite{li2019semantic}, and \emph{DG-CNN} \cite{fan2020facial}. But the difference is that \emph{fully-connected (FC)} layers \cite{li2019semantic,niu2019multi,liu2020relation,liu2019facial} or regression models \cite{walecki2017deep,fan2020facial,zhang2020region} are often applied for predicting labels instead of \emph{softmax} classifier \cite{song2021uncertain,chen2021cafgraph}. A particular line of AUD research analyzes the facial affects by estimating the AU intensities, which could have greater information value in understanding complex affective states \cite{zhi2020comprehensive}. Even though a few attempts in estimating AU intensities based on graph structures have existed \cite{kaltwang2015latent,corneanu2018deep,fan2020facial}, the study of using the latest spatio-temporal graph representations and \emph{GNNs} has not been reported. Another big challenge in AUD is few and imbalanced samples. Recent graph-based methods using transfer learning \cite{niu2019multi,cui2020label} or uncertainty learning \cite{song2021uncertain} were proposed to address this problem. They showed an advantage of the graph-based method in this topic and are helpful to implement AUD in large-scale unlabeled data. \subsection{Micro-Expression Recognition} Micro-expressions are fleeting and involuntary facial affects that people usually exhibit in high stake situations when attempting to conceal or mask their true feelings \cite{zhao2019automatic}. The earliest well-known studies came from \cite{haggard1966micromomentary} as well as \cite{ekman1969nonverbal}. Generally, a micro-expression lasts only 1/25 to 1/2 seconds long and is too subtle and fleeting for an untrained person to perceive. Therefore, developing an automatic micro-expression recognition (MER) system is valuable in reading human hidden affective states. Besides the short duration, low intensity and localization characteristics also make it challenging. To this end, graph-based MER methods have been designed to address the above challenges and have become appealing in the past two years \cite{liu2018sparse}, especially in 2020 \cite{lei2020novel,xie2020assisted}. Table \ref{tab:mer} lists the reported performance of a few representative recent studies of graph-based MER. These methods fall into the landmark-level spatial graph \cite{liu2018sparse,lei2020novel} and the AU-level graph \cite{xie2020assisted} in terms of representation types. For the former, their idea is to use landmarks to locate and analyze specific facial areas to deal with the local response and the subtleness of micro-expressions. The latter aims to infer the AU relationship to improve the final performance. The difference in processing ideas is also reflected in the reasoning procedure. Approaches like \emph{GSC} \cite{liu2018sparse} and variant \emph{CNNs} \cite{lei2020novel} are exploited in the landmark-level graph to integrate the individual node feature representations. In comparison, \emph{GCNs} are employed to learn an optimal graph structure of the AU dependency knowledge from training data and make predictions. Nevertheless, one common thing is that all the methods consider the local appearance in a spatio-temporal way by using \emph{optical-flow} or \emph{DNNs}. \begin{table*}[!htbp] \centering \scriptsize \begin{threeparttable} \caption{Performance summary of representative graph-based MER methods} \label{tab:mer} \setlength{\tabcolsep}{1.5mm}{ \begin{tabular}{|l|c|c|c|c|c|c|c|l|c|} \toprule[1.5pt] \multirow{2}*{References} & \multicolumn{2}{c|}{Prep.$^1$} & \multicolumn{3}{c|}{Representation$^2$} & \multicolumn{2}{c|}{Reasoning} & \makecell[c]{\multirow{2}*{Database$^3$}} & \multirow{2}*{Validation$^4$} \\ \cmidrule[0.5pt](r){2-3} \cmidrule[0.5pt](r){4-6} \cmidrule[0.5pt](r){7-8} & B.B. & LM & Category & Node & Edge & Model & Classifier & & \\ \midrule[1.0pt] \citet{liu2018sparse} & $\bullet$ & 66 & $\mathcal{S:R}$ & \emph{Optical-flow} & \emph{KNN} & \emph{\makecell[c]{GSC}} & \emph{SVM} & \makecell[l]{SMIC (3 cl.) \emph{ar}: 0.6795, \emph{f}$_1$: 0.6844;\\ CASME I \cite{yan2013casme} (4 cl.) \emph{ar}: 0.7219, \emph{f}$_1$: 0.7236;\\ CASME II (5 cl.) \emph{ar}: 0.6356, \emph{f}$_1$: 0.6364} & LO CV \\ \midrule[0.5pt] \citet{lei2020novel} & $\bullet$ & 28 & $\mathcal{S:L}$ & \emph{TCN} & \emph{F} & \emph{Graph-TCN} & \emph{Softmax} & \makecell[l]{CASME II (5 cl.) \emph{ar}: 0.7398, \emph{f}$_1$: 0.7246;\\ SAMM (5 cl.) \emph{ar}: 0.7500, \emph{f}$_1$: 0.6985;\\ SAMM (4 cl.) \emph{ar}: 0.8050, \emph{f}$_1$: 0.7657} & LO CV \\ \midrule[0.5pt] \citet{xie2020assisted} & $\bullet$ & / & $\mathcal{AU:M}$ & \emph{CNN} & \emph{L} & \emph{GCN} & \emph{Softmax} & \makecell[l]{CASME II (3 cl.) \emph{ar}: 0.712, \emph{f}$_1$: 0.355;\\ CASME II (7 cl.) \emph{ar}: 0.561, \emph{f}$_1$: 0.394;\\ SAMM (3 cl.) \emph{ar}: 0.702, \emph{f}$_1$: 0.433;\\ SAMM (8 cl.) \emph{ar}: 0.523, \emph{f}$_1$: 0.357\\ SMIC (CASME II) (3 cl.) \emph{ar}: 0.344, \emph{f}$_1$: 0.319;\\ SMIC (SAMM) (3 cl.) \emph{ar}: 0.451, \emph{f}$_1$: 0.309} & \makecell[c]{LO CV\\ /CD} \\ \midrule[0.5pt] \citet{kumar2021micro} & $\bullet$ & 51 & $\mathcal{S:L}$ & $\mathbb{C}$+\emph{Optical-flow} & \emph{M+L} & \emph{GCN+GAT} & \emph{Softmax} & \makecell[l]{CASME II (3 cl.) \emph{ar}: 0.8966, \emph{f}$_1$: 0.8695;\\ CASME II (5 cl.) \emph{ar}: 0.8130, \emph{f}$_1$: 0.7090;\\ SAMM (3 cl.) \emph{ar}: 0.8872, \emph{f}$_1$: 0.8118;\\ SAMM (5 cl.) \emph{ar}: 0.8824, \emph{f}$_1$: 0.8279} & LO CV \\ \midrule[0.5pt] \citet{lei2021micro} & $\bullet$ & 30 & $\mathcal{AU:B}$ & \emph{Embedding} & $\Phi$ & \emph{GCN} & \emph{Softmax} & \makecell[l]{CASME II (4 cl.) \emph{ar}: 0.8080, \emph{f}$_1$: 0.7871;\\ CASME II (5 cl.) \emph{ar}: 0.7427, \emph{f}$_1$: 0.7047;\\ SAMM (4 cl.) \emph{ar}: 0.8239, \emph{f}$_1$: 0.7735;\\ SAMM (5 cl.) \emph{ar}: 0.7426, \emph{f}$_1$: 0.7045} & LO CV \\ \bottomrule[1.5pt] \end{tabular}} \begin{tablenotes} \item[1] Prep.: processing; B.B.: bounding boxes; $\bullet$ = Yes, $\circ$ = No; LM: landmarks. \item[2] $\mathcal{S/AU}$: \{spatial; AU-level\} representation; $\mathcal{:L/B/M}$: \{landmark; label; map\}-level graph; $\mathbb{C}$: landmark coordinates; $\Phi$: label distributions; \emph{L/F}: \{learning; fully\} connections; $\mathbb{E}$: Euclidean distance; $\mathbb{G}$: Gradient using slope equation. \item[3] \emph{ar}: average accuracy rate; \emph{f}$_1$: F1 score; \emph{war}:weighted average recall; \emph{wf}$_1$: weighted F1 score; \emph{uar}: unweighted average recall; (N) cl.: (N) affective classes; DB1 (DB2): train on database 2, test on database 1. \item[4] CV: cross validation; LO: leave-one-subject-out; CD: cross database validation. \end{tablenotes} \end{threeparttable} \end{table*} A problem in graph-based MER is the lack of large-scale in-the-wild data. The small sample size limits the AU-level graph representation that relies on initializing the AU relationship from the AU label distribution of the training set. The lab-controlled data make it difficult to follow the trend in FER studies, which generalizes the graph-based FAA methods in real-world scenarios. However, the analysis of uncontrolled micro-expressions is fundamental because micro-expressions and macro-expressions can co-occur in many real cases. For example, the furrowing on the forehead slightly and quickly when smiling indicates the true feeling \cite{ekman1969nonverbal}. Since the evolutionary appearance information is crucial for the micro-expression analysis, building a spatio-temporal graph representation that can model the duration and the dynamic of micro-expressions is also a helpful but unexplored topic. \subsection{Special Tasks} The graph-based methods also play a vital role in several special FAA tasks, such as pain detection \cite{kaltwang2015latent}, non-basic affect recognition \cite{zhang2019context,he2019image}, occluded FER \cite{dapogny2018confidence,zhou2020learning}, and multi-modal affect recognition \cite{chen2019efficient,chien2020cross}. Table \ref{tab:other} summarizes the latest graph-based FAA methods for special tasks. Their node representations and edge initialization strategies for graph constructions in this field are similar to those in graph-based FER, MER, and AUD methods. While for the reasoning step, \emph{GCN} is the top-1 option. This observation implies that the framework of the graph-based method discussed in this paper can be easily extended to many other FAA tasks and promote performance improvement. \begin{table*}[!htbp] \centering \scriptsize \begin{threeparttable} \caption{Performance summary of graph-based methods for special FAA tasks} \label{tab:other} \setlength{\tabcolsep}{1.2mm}{ \begin{tabular}{|l|c|c|c|c|c|c|c|l|c|} \toprule[1.5pt] \multirow{2}*{References} & \multicolumn{2}{c|}{Prep.$^1$} & \multicolumn{3}{c|}{Representation$^2$} & \multicolumn{2}{c|}{Reasoning} & \makecell[c]{\multirow{2}*{Database$^3$}} & \multirow{2}*{Validation$^4$} \\ \cmidrule[0.5pt](r){2-3} \cmidrule[0.5pt](r){4-6} \cmidrule[0.5pt](r){7-8} & B.B. & LM & Category & Node & Edge & Model & Output & & \\ \midrule[1.0pt] \citet{kaltwang2015latent} & $\circ$ & 66 & $\mathcal{S:L}$ & $\mathbb{C}$ & \emph{L} & \multicolumn{2}{c|}{\emph{LT}} & \makecell[l]{ShoulderPain \cite{lucey2011painful} \emph{corr}: 0.23, \emph{mse}: 0.60} & 8F CV \\ \midrule[0.5pt] \citet{dapogny2018confidence} & $\bullet$ & 49 & $\mathcal{S:L}$ & $\mathbb{C}$+\emph{HOG} & $\bigtriangleup$ & \emph{AE} & \emph{RF} & \makecell[l]{CK+ (eyes occluded) \emph{ar}: 0.879;\\ CK+ (mouth occluded) \emph{ar}: 0.727} & 10F-SI CV \\ \midrule[0.5pt] \citet{zhang2019context} & $\bullet$ & / & $\mathcal{S:R}$ & \emph{VGG} & \emph{L} & \emph{GCN} & \emph{Softmax}/\emph{FC} & \makecell[l]{EMOTIC (26 cl.) \emph{prc}: 0.2842; EMOTIC (VAD) \emph{er}: 0.9} & HO \\ \midrule[0.5pt] \citet{chen2019efficient} & $\bullet$ & 68 & $\mathcal{ST:L}$ & $\mathbb{C}$ & $\bigtriangleup$+\emph{M} & \emph{GCN} & \emph{FC} & \makecell[l]{CES \cite{ringeval2019avec} \emph{val\_ccc}: 0.515, \emph{aro\_ccc}: 0.513} & HO \\ \midrule[0.5pt] \citet{he2019image} & $\circ$ & / & $\mathcal{X}$ & \emph{Embedding} & \emph{M+L} & \emph{GCN} & \emph{Softmax} & \makecell[l]{FlickLDL \cite{borth2013large} \emph{ar}: 0.691; TwiterLDL \cite{yang2017joint} \emph{ar}: 0.758} & HO \\ \midrule[0.5pt] \citet{zhou2020learning} & $\bullet$ & 44 & $\mathcal{ST:L}$ & $\mathbb{C}$+\emph{HOG} & \emph{L}+$\mathbb{H}$ & \emph{GCN} & \emph{SoftMax} & \makecell[l]{CK+ (random occlusion) \emph{ar}: 0.9551;\\ Oulu (random occlusion) \emph{ar}: 0.8121;\\ AFEW (random occlusion) \emph{ar}: 0.4047} & \makecell[c]{10F-SI CV\\ /HO} \\ \midrule[0.5pt] \citet{chien2020cross} & $\circ$ & / & $\mathcal{X}$ & \emph{CNN} & \emph{\makecell[c]{Transfer\\ Knowledge}} & \emph{GCN} & \emph{FC} & \makecell[l]{Amigos \cite{correa2018amigos} (Ascertain) \emph{val\_uar}: 0.798, \emph{aro\_uar}: 0.679;\\ Ascertain \cite{subramanian2016ascertain} (Amigos) \emph{val\_uar}: 0.704, \emph{aro\_uar}: 0.569} & CD \\ \bottomrule[1.5pt] \end{tabular}} \begin{tablenotes} \item[1] Prep.: processing; B.B.: bounding boxes; $\bullet$ = Yes, $\circ$ = No; LM: landmarks. \item[2] $\mathcal{S/ST/X}$: \{spatial; spatio-temporal; sample-level\} representation; $\mathcal{:L/R}$: \{landmark; region\}-level graph; $\mathbb{C}$: landmark coordinates; $\Phi$: label distributions; $\bigtriangleup$: triangulation; \emph{M/L}: \{manual/learning\} connections. \item[3] \emph{corr}: Pearson correlation coefficient; \emph{mes}: mean squared error; \emph{prc}: area under the precision recall curves; \emph{er}: average error rate; \emph{val/aro}: valance/arousal; \emph{ccc}: concordance correlation coefficient; \emph{uar}: unweighted average recall; (N) cl.: (N) affective classes; VAD: valence, arousal, dominance; DB1 (DB2): train on database 2, test on database 1; \emph{ar}: average accuracy rate; \emph{f}$_1$: F1 score; \emph{mif}$_1$: micro F1 score; \emph{maf}$_1$: macro F1 score. \item[4] CV: cross validation; (K)F: k-folds; SI: subject independent; HO: holdout validation; CD: cross database validation. \end{tablenotes} \end{threeparttable} \end{table*} \section{Open Directions}\label{sec:od} Graph-based FAA methods have been dissected into fundamental components for elaboration and discussion in this review. When encoding facial affect into graphs, strategies vary according to node and edge elements. Relational reasoning approaches infer latent relationships or inherent dependencies of graph nodes in terms of space, time, and semantics. The category of graph representations will affect the technique choice of relational reasoning to a certain extent. Despite significant advances and numerous work, the graph-based FAA is still an appealing field with many open directions. Due to advantages in modeling and reasoning latent relationships of facial affects, graph-based methods may provide complementary information to help solve some challenges that non-graph-based approaches face. Also, the graph-based method has natural advantages or unexplored research potential in other topics. \subsection{In-the-wild Scenarios} Although many efforts have been made for graph-based FAA in natural conditions \cite{yao2015capturing,dapogny2018confidence,chen2020label,liu2019facial,xie2020assisted,zhou2020learning,niu2019multi,cui2020label}, even the state-of-the-art performance is far from actual applications. Factors like illumination, head pose, and part occlusion are challenging in constructing an effective graph representation. For one thing, significant illumination changes and head pose variations will impair the accuracy of face detection and registration, which is vital for establishing landmark-level graphs. ROI graphs without landmarks or NPI graphs \cite{yao2015capturing, xie2020adversarial} should be a possible direction to avoid this problem. Also, missing face parts resulting from camera view or context occlusion make it challenging to encode enough facial information and obtain meaningful connections in an affective graph. Pilot work \cite{dapogny2018confidence,zhou2020learning} has tried to exploit a sub-graph without masked facial parts or generate adaptive edge links to alleviate the influence. Unfortunately, there has still been a considerable performance decrease compared to normal conditions. Proposing more effective spatio-temporal graphs can account for these problems based on evolutional affective information. \subsection{3D and 4D Facial Affects} Using 3D and 4D face images might be another good topic because the 3D face shape provides additional depth information and dynamically contains subtle facial deformations. They are intuitively insensitive to pose and light changes. Some studies have transformed 3D faces into 2D images and generated graph representations \cite{dapogny2018confidence,corneanu2018deep,li2019semantic,fan2020facial}, but they have not fully taken advantage of the 3D data. Alternatively, non-graph-based \cite{behzad2020landmarks} and graph-based methods \cite{pei20093d} have been explored to conduct FAA directly on 3D or 4D faces. Since the 3D face mesh structure is naturally close to the graph structure, employing the graph representation and reasoning to handle 3D face images will promote the improvement of in-the-wild FAA. Besides, there is also a potential topic of using 3D and 4D data with graph-based methods, especially landmark-level graphs and \emph{GNNs}, in micro-expression recognition. \subsection{Valence and Arousal} Estimating the continuous dimension is a rising topic in FAA. Unlike discrete labels, Valence-Arousal (V-A) annotations describe a wider range of facial affects that are consistent with those in the real world. Large-scale FAA databases (Aff-Wild I \cite{zafeiriou2017aff}, II \cite{kollias2020analysing}) containing V-A annotations have been released to support the continuous FAA. Existing graph-based methods mainly perform the V-A measurement \cite{kaltwang2015latent,walecki2017deep,fan2020facial} on lab-controlled databases except for a few studies like \cite{zhang2019context}. Recent graph-based methods have studied multi-label learning according to intrinsic mappings between facial affect categories and other annotations \cite{li2019semantic,cui2020label}. Such underlying assumptions can also be extended to the V-A measurement task, where AU-level graphs and \emph{DBNs}, as well as sample-level graphs, are potential directions. \subsection{Context and Multi-modality} Most current FAA methods only consider a single face in one image or sequence. However, people usually have affective behaviors, including facial expressions, body gestures, and emotionally speaking in real cases \cite{huang2018multimodal}. These facial affective displays are highly associated with context surroundings that include but are not limited to the affective behavior of other people in social interactions or inanimate objects. Existing studies like \cite{zhang2019context} and \cite{xie2020adversarial} have employed graph reasoning to infer relationships between the target face and other objects in the same image. Facial affects and other helpful contexts can be combined in a graph representation to perform the analysis on a fuller scope, such as gesture \cite{kaliouby2005real,liu2021imigue}. Another valuable topic is to introduce additional data channels that are multi-modality. Sample-level and spatio-temporal have also been successfully extended to process multi-modal affect analysis tasks with audio \cite{chen2019efficient} and physiological signal \cite{chien2020cross}, respectively, which shows a good research prospect. \subsection{Cross-database and Transfer Learning} Insufficient annotations and imbalanced labels are two problems that limit the development of FAA research. One possible solution is to use graph-based transfer learning. Efforts like \cite{niu2019multi,cui2020label,song2021uncertain} have exploited the graph structure to solve this challenge in semi-supervision, label correction, generation, or uncertainty measurement. On the other hand, the performance of affective features extracted using graph-based representation and reasoning has been proved through cross-database validation in all FER \cite{chen2020label,xie2020adversarial}, AUD \cite{tong2007facial,cui2020label}, MER \cite{xie2020assisted}, and cross-corpus analysis \cite{chen2021learning,chien2020cross}. Specifically, the strength of distribution modeling of AU-level and sample-level graphs is valuable in improving the generalization capability of affective features. \ifCLASSOPTIONcompsoc \section*{Acknowledgments} \textbf{Funding:} This work was supported by the China Scholarship Council [CSC, No.202006150091], and the Ministry of Education and Culture of Finland for AI forum project. The authors would like to thank Muzammil Behzad and Tuomas Varanka for providing materials and suggestions for the figures used in this paper. \ifCLASSOPTIONcaptionsoff \newpage \fi { \footnotesize \bibliographystyle{IEEEtranN}
\section{Introduction} While machine learning (ML)-based software is increasingly used in all parts of our society, researchers and practitioners emphasize the importance of a human-centered perspective when designing these systems (e.g.~\cite{baumer2017toward, gilliesHumanCentredMachineLearning2016, Kogan2020:humancentereddatascience, benjamin_materializing_2019}). In this context, Explainable AI (XAI) techniques are increasingly used. The former, i.e., specific algorithms such as LIME~\cite{ribeiro_why_2016} or SHAP~\cite{Lundberg:2017tc}, aim to support human understanding and sense-making of the results of ML-based software by providing explanations. The XAI techniques can be categorized into explanation methods (e.g. local, global, example-based or counterfactual)~\cite{liao_questioning_2020}; therefore, the scope and type of the explanations provided differ as do their content and representation. The overall goal of XAI techniques is to provide interpretability and transparency~\cite{carvalho2019MLinterpretability,molnar2020interpretable}, since research has shown that the degree to which the ML results can be interpreted by explanations can enhance user understanding, which, in turn, leads to more trust~\cite{stumpf2007toward}. Therefore, explanations need to be carefully designed in \textit{Explanation User Interfaces} (Explanation UI) for their context of use~\cite{tomsett2018interpretable, liao_questioning_2020}. The characteristics of Explanation UIs needed are currently under research (e.g. \cite{cheng_explaining_2019, liao_questioning_2020, kaur2020interpreting, jesus2021can}). Previous research has shown that study participants have had difficulties to understand the underlying conceptional model of the XAI techniques provided. Nonetheless, the explanations provided conveyed trust in the XAI techniques. At the same time, the 'ease of use' reduced the critically thinking of the study participants~\cite{kaur2020interpreting}. Efforts to improve evaluation approaches of XAI techniques still disconnect the Explanation UI from the context of use~\cite{jesus2021can}, even though insights from social science emphasize the subjectivity of explanations~\cite{miller_explanation_2019}. This highlights the need to adapt them to the context and audience~\cite{miller_explanation_2019}. Explanations can have different purposes that relate to specific (intelligibility) questions, such as situation-specific information in the form of \textit{why} or \textit{why not} questions or \textit{what if} questions that allow people to probe the model~\cite{liao_questioning_2020, lim2009assessing}. In our research, we missed a methodological guidance ourselves\footnote{There are valuable exceptions to this claim, such as the research by Ehsan et al.~\cite{ehsan2021expanding}, Eiband et al.~\cite{eiband2018bringing} and Baumer~\cite{baumer2017toward}.}, which motivates our proposal for assembling \textit{Situated Case Studies}. Our proposal is inspired by existing initiatives such as the XAI stories\footnote{More information: \url{https://pbiecek.github.io/xai_stories/}.} that focus on technical aspects of XAI and the ''Princeton Dialogues on AI and Ethics Case Studies''\footnote{More information: \url{https://aiethics.princeton.edu/case-studies/}.}, and extends approaches such as the Explainability Fact Sheet~\cite{sokol2020explainability}. Different from these approaches, we focus on a design perspective. In order to emphasize the notion of situatedness, we suggest a reflective approach to design. A situated approach does not attempt ''to establish one correct understanding and set of metrics'' when designing interactions but instead studies the ''local, situated practices of users''~\cite{harrison2011making}. This, in turn, requires us to reconsider how much of an intended outcome lies in the control of a designer. As Sch\"on~\cite{schoen1983reflective} highlights, the actual effect of a design might differ from the designer's initial intention. The designer, therefore, has to enter into a ''conversation'' with a situation, by a chosen methodological approach. This should create a dynamic in which ''the situation 'talks back', and [the designer] responds to the situation's back-talk''~\cite[p.79]{schoen1983reflective}. Sch\"on describes this conversation with a situation as reflective (ibid.). Sengers et al.~\cite{sengers2005reflective} emphasize this as a need for the \textit{critical} reflection of both users and designers in the design process. In the following, we introduce three case studies from our ongoing research. We consider each of these case studies as ''situated'' and as such in need of a particular methodological approach in order to enter into such a ''conversation.'' Human-centered design (HCD) comprises a number of dimensions~\cite{KlingStar1998:HCD} that can be used to define angles for reflection that should be considered in the design of Explanation UIs: (1) Who does the usage of the ML-based system affect? (\textit{stakeholder}); (2) whose purposes are served in the design process and whose not? (\textit{purpose}); and (3) how will the design of the ML-based system impact people’s experience? What unintended consequences might result from the design and the deployment of the ML-based system? (\textit{context}). By taking this approach, we expect to gain a deeper understanding of the specific characteristics of each case study, which will later allow us to reflect better on the choice of methodology. Our goal is to subsequently reintegrate our methodological choices to inform future design and research in the area of Explanation UIs. \section{Situated Case Studies} In the following, we briefly describe three selected case studies in which we apply a HCD approach in the context of XAI. These research studies aim to enable a closer, more effective and transparent collaboration between humans and machines, especially with non-technical experts or lay users. \subsection{Case 1: Explaining Privacy-Preserving Machine Learning} The first case study is situated in the medical domain and focuses on the value-oriented data donation of patients. This research aims to balance the trade-off between the need for unrestricted data in individualized medicine, on the one hand, and the protection of patients' personal data, on the other. There is a particular urgency (especially due to the GDPR\footnote{The General Data Protection Regulation (GDPR) is a regulation in EU law on data protection and privacy in the European Union (EU).}) of applying privacy-preserving ML, i.e. here differential privacy (DP)~\cite{papernot2018scalable}, in the clinical context. We explore in this case study how existing possibilities and limitations of DP can be explained to the patients (stakeholders) in such a way that it enables them to make informed decisions (purpose) about their data donation (context). At the beginning of the project, we envisioned a typical HCD process, assuming that the problem was well-defined: We would need to investigate the \textit{explainability needs}\footnote{According to Liao et al. \cite{liao_questioning_2020}, \textit{explainability needs} ''represent categories of prototypical questions users may ask to understand AI.''} of our stakeholders while the purpose and context of use were clearly outlined. Reality taught us otherwise. We experienced that even in our interdisciplinary project team (consisting of experts in medicine, machine learning, security and HCI) many questions existed regarding the ML pipeline (e.g. how does DP affect the accuracy of ML predictions?) and the explanation of DP (e.g. how can different privacy levels be explained and realized in DP?). Besides patients, clinical researchers need to understand the capabilities and limitations of this technology; therefore, Explanation UIs are needed for lay users, i.e., patients, and non-technical experts, i.e., clinical researchers. Thus, we had to take a step back and extended our design approach by considering the clinical researchers as well. We extend Wolf's suggestion of using \textit{explainability scenarios}~\cite{wolf_explainability_2019} as a resource for designing for interpretability and also use them as a resource for reflecting on the effects of our designs. Instead of focusing on the explanation methods, i.e. what can be explained, a scenario concentrates on the \textit{explainability needs}, i.e. which \textit{explainability needs} align with what explanation method? We have so far defined three scenarios which can be used to engage with our different stakeholders. Each scenario provides an Explanation UI in a different context of use. We plan to use these scenarios as resource for reflection in co-creation workshops. While our focus in this use case still lies on the patients as designated users of our Explanation UIs for data donation, our process so far has shown that we also need to factor in the clinical researchers who need a deeper understanding of privacy preserving ML to raise their acceptance in applying this technology. \subsection{Case 2: Explaining Interactive Clustering Results} The second case study originates from the area of digital media studies, where ML techniques are increasingly used to handle large-scale data in qualitative research settings (e.g.~\cite{chen2018using, smith2018closing}). This case study is motivated by the need to scale up qualitative interpretive research~\cite{buzzanell2018interpretive} of textual comments from YouTube with a ML-based data analysis pipeline (purpose). Based on a close interdisciplinary collaboration between media studies and HCI researchers (stakeholder), we built a text analysis pipeline in which -- after pre-processing the data -- the semantic similarity between sentences is computed based on embeddings generated by a pre-trained language model. Uniform Manifold Approximation and Projection~\cite{mcinnes2018umap} is then used for dimensionality reduction and k-medoids for clustering similar comments. The resulting basic clustering visualization is used in an iterative process of (re-)labeling the data. During the latter, the major sense-making with the data takes place (context). It turned out that this approach of using the pipeline to refine the model iteratively was challenging. The situation was primarily caused by the cluster visualization, which represented the ML pipeline results. The results often did not align with the mental model of the non-technical expert, which is a typical problem in human-AI interaction (cf.~\cite{amershi2019guidelines}). At the same time, the HCI researcher realized that the visualization was taken for given when presenting preliminary results, and the media researcher did not critically reflect on the limitations of the quantitative approach (e.g. existing bias in the word embeddings). Baumer echoes this observation from his research and calls for allowing a non-technical audience to critically interrogate the data and explore alternative perspectives~\cite{baumer2017toward}. In the design process, we experienced these unintended consequences of our ML pipeline and realized the need for an \textit{Explanation UI} that supports a critical reflection. However, we had difficulties to collect and concretely describe implicit \textit{explainability needs} that the media researcher had not yet become aware of. More specifically, we realized that we require a better understanding of how explanations might influence (or redirect) non-technical experts in their research process. Thus, we decided to design an \textit{Explanation UI} which augments the existing clustering visualization. This interface allows users to, for example, assess the clustering results by exploring the comments contained or relevant features for the word embeddings. Inspired by research from Hohman~\cite{Hohman:Gamut}, we plan to use this \textit{Explanation UI} as a 'technology probe' and will conduct contextual inquiries to identify the implicit \textit{explainability needs}. We will then translate the implicit needs into explanations and explore, finally, how these available explanations impact the sense-making process of non-technical experts. \subsection{Case 3: Explanations in Narrative-based Decision-Making} The third case study relates to an ongoing research collaboration with a medical ethicist. As has already been mentioned, ML is increasingly used in clinical settings to support decision-making (e.g.~\cite{papernot2018scalable}). However, in complex situations, there is a need for a holistic perspective of the patient, their (family) situation, preferences and moral concepts of what a good life represents for them. What is best for the patient does not only depend on external evidence, but has to be found out in each individual situation in a narrative structured decision-making process. Physicians might use ML-based systems for understanding possible therapy outcomes in advance. In the meeting, however, they would then present 'their' interpretation of the ML result. However, in clinical practice, the medical ethicist envisions a more active involvement of 'the AI'~\footnote{We adopted the term ''AI'' for two reasons. First, the medical ethicist wants the technical system to get its ''own voice'' in the meeting, and second, the ''materiality'' of the technical systems is not yet defined and part of the design process.}. In this case study, we aim to sketch out an adaptive ML-based system that allows meeting participants to actively engage, dispute, or collaborate with ''the AI'' through explanations as part of the narrative-based decision-making process. Thus, the ML-based system continuously adapts in its capability by providing possible therapy scenarios based on the provided data. Insight into this is crucial in order to understand what factors will impact how (and if) ''the AI'' can contribute to the process and how this might impact the decision-making process. We assume that \textit{Explanation UIs} that incorporate conversational models are especially suitable in this context~\cite{miller_explanation_2019}. One challenging aspect of this case study is to envision concrete situations and interactions of how physicians and clinical staff can engage with 'the AI' (cf.~\cite{yang2020-Re-Examining-Human-AI-Interaction}). We have started the contextualization by using the medical ethicist's manifold ethnographic experiences as a basis for detailing existing situations within the narrative-based decision-making process where 'the AI' participates. However, this case study is highly exploratory and the impact of using such an 'AI' in this context is rather ambiguous. The level of uncertainty within the design process is especially high compared to the other case studies discussed. Taking this into account and inspired by the research of Dunne and Raby~\cite{dunne2013speculative}, we will use speculative design to imagine alternative futures of how such an 'AI' materializes in the context given. These futures can be probable, plausible, possible and preferable~\cite{dunne2013speculative} and provide a lens to our stakeholders to envision better how such an 'AI' could participate in their present decision-making. We plan to use \textit{Speculative Enactments} as an approach to do speculative design research with participants~\cite{Elsden2017_SpeculativeEnactments}. \section{Conclusion} All three case studies include various stakeholder groups, purposes and contexts. While applying our HCD perspective, we were forced to critically reflect on each setup. In our discussions, we used the case studies to derive scenarios that take different perspectives on the design problem space and, thus, reveal consequences of different types~\cite{Carroll:2000gb}. Understanding the particularity of each use case allows us to adapt the HCD methods used accordingly. Each situated case study introduces a different challenge. In the first case study, we undermine the role of clinical researchers as stakeholders in the design process. In the second case study, we realized that the purpose of the design needed to be extended, and in the last case study, the context of application is uncertain. In each case, we follow a certain methodological path. Since all case studies are ongoing, we cannot evaluate our methodological choices yet. In any case, we suggest that in the context of human-centered XAI, these case studies can inform and inspire other researchers to reflect on their particular application context, the purpose of each XAI approach, the intended users and the Explanation UI designed. By expanding additional case studies, we hope to contribute to ongoing efforts for the systematic engagement and reflective use of HCD methods to explain ML-based systems. \section{Acknowledgements} We thank the reviewers for their insightful comments. This work is supported by the German Research Foundation (EXC 2025: Matters of Activity. Image Space Material) and the Federal Ministry of Education and Research (grant 16SV8463: WerteRadar). \balance{} \bibliographystyle{SIGCHI-Reference-Format}
\section{Introduction} It is well known that the most general gravity theory in four dimensions is given by the Einstein-Hilbert action together with a cosmological constant, where its dynamic is codified in non-linear second order differential equations. Nevertheless, motivations such as the accelerated expansion of the Universe \cite{Riess:1998cb}, as well as the first detection of gravitational waves \cite{TheLIGOScientific:2017qsa,Monitor:2017mdv} have motivated the active exploration of modified theories of gravity, being higher dimensional gravity theories an interesting object of study, in particular in the context of the Anti-de Sitter/Conformal Field Theory duality \cite{Maldacena:1997re}. A via of exploration considering this approach is given by the introduction of higher powers of the curvature terms. Under this scenario, we have the Lanczos-Lovelock action \cite{Lanczos:1938sf,Lovelock:1971yv}, corresponding to the most general action in higher dimensions such that the equations of motions with respect to the metric are at most of second-order, given by \begin{eqnarray}\label{lovelock} &&\int \sum_{p=0}^{[D/2]}\alpha_p~ L^{(p)},\\ && L^{(p)}=\epsilon_{a_1\cdots a_d} R^{a_1a_2} \wedge \cdots \wedge R^{a_{2p-1}a_{2p}}\wedge e^{a_{2p+1}}\wedge \cdots \wedge e^{a_d}.\nonumber \end{eqnarray} Here (\ref{lovelock}) is represented as a polynomial with a degree $[ D/2 ]$, wherein our notations $[ \,]$ is the integer part, and is written in term of the Riemann curvature $R^{ab} = d\,\Sigma^{ab} + \Sigma^{a}_{\;c} \wedge \Sigma^{cb}$ and the vielbein $e^{a}$, together with the coupling constant $\alpha_{p}$. About their general properties and solutions see for example the references \cite{Charmousis:2008kc,Garraffo:2008hu,Camanho:2011rj}. For topological AdS black holes and their thermodynamical atributes see the references \cite{Banados:1993ur,Cai:1998vy,Crisostomo:2000bb,Aros:2000ij,Arenas-Henriquez:2019rph}. Together with the above, as was shown in \cite{Crisostomo:2000bb}, to construct a theory with a unique AdS vacuum, fixing the cosmological constant, the coupling constants $\alpha_{p}$'s must be tied and yielding a set of theories indexed through to an integer $n$ which reads \begin{eqnarray} &&S_{(n)}=-\frac{1}{2n(D-3)! }\int \sum_{p=0}^{n} {n \choose p }\frac{L^{(p)}}{(D-2p)},\\ \label{Ik} &&1\leq n\leq \Big[\frac{D-1}{2}\Big], \nonumber \end{eqnarray} where $$ {n \choose p }= \frac{n!}{p!\, (n-p)!},$$ and the action (\ref{Ik}) can be recast as \begin{eqnarray} I_{(n)}&=&\frac{1}{2}\int d^{D}x \,\sqrt{-g} \mathcal{L}_{(n)}(g_{\mu \nu}, R_{\mu \nu \sigma \rho}),\label{Ik2} \\ &=&\frac{1}{2}\int d^{D}x\,\sqrt{-g} \Big[R+\frac{(D-1)(D-2)}{n} \nonumber\\ &+&\frac{(n-1)}{2!(D-3)(D-4)}{L}^{(2)}\nonumber\\ &+& \frac{(n-1)(n-2)}{3!(D-3)(D-4)(D-5)(D-6)}{L}^{(3)}+\cdots \Big],\nonumber \end{eqnarray} where $R$ is the scalar curvature and \begin{eqnarray*} L^{(2)}&=&R^{2}-4\,R_{\mu \nu}R^{\mu \nu}+R_{\alpha\beta\mu\nu}R^{\alpha\beta\mu\nu},\label{gaussbonnet}\\ L^{(3)}&=&R^3 -12RR_{\mu \nu } R^{\mu \nu } + 16\,R_{\mu \nu }R^{\mu }_{\phantom{\mu} \rho }R^{\nu \rho }\nonumber\\ &+& 24 R_{\mu \nu }R_{\rho \sigma }R^{\mu \rho \nu \sigma } + 3RR_{\mu \nu \rho \sigma } R^{\mu \nu \rho \sigma }\nonumber\\ &-&24R_{\mu \nu }R^{\mu} _{\phantom{\mu} \rho \sigma \kappa } R^{\nu \rho \sigma \kappa }+ 4 R_{\mu \nu \rho \sigma }R^{\mu \nu \eta \zeta } R^{\rho \sigma }_{\phantom{\rho \sigma} \eta \zeta }\nonumber\\ &-&8R_{\mu \rho \nu \sigma } R^{\mu \phantom{\eta} \nu \phantom{\zeta} }_{\phantom{\mu} \eta \phantom{\nu} \zeta } R^{\rho \eta \sigma \zeta }.\label{cubiclagrangian} \end{eqnarray*} On the other hand, the addition of scalar field $\Phi$ non-minimally coupled to the scalar curvature $R$ and a potential $U(\Phi)$ as a matter source \begin{eqnarray} S_{\Phi}&=&\int {d}^D x\sqrt{-g} \Biggl[ -\frac{1}{2}\nabla_{\mu}\Phi\nabla^{\mu}\Phi-\frac{\xi}{2}R\Phi^2-U(\Phi)\Biggr]\nonumber\\ &=&\int {d}^D x\sqrt{-g} \mathcal{L}_{\Phi},\label{eq:LPhi} \end{eqnarray} allow to obtain a variety of black holes solutions with a planar base manifold for the event horizon with a wide range of values for the non-minimally coupled parameter $\xi$ \cite{Correa:2013bza}. Just for completeness, this kind of matter source has been a good toy model to find non-minimally dressed black holes solutions in three \cite{Martinez:1996gn,Henneaux:2002wm,Bravo-Gaete:2020ftn}, four \cite{Bocharova:1970skc,Bekenstein:1974sf,Martinez:2005di,Cisterna:2019uek,Anabalon:2012tu,Cisterna:2021xxq} and higher dimensions \cite{Correa:2013bza,Gaete:2013ixa,Gaete:2013oda,Erices:2017izj,Ayon-Beato:2019kmz}, with different gravity theories and matter sources, even black holes solutions with non standard asymptotically behaviour. As it was argued in \cite{Correa:2013bza} the thermodynamics analysis of these configurations shows that the mass as well as the entropy vanish, which makes the unique integration constant arose from the configuration to be treated as a sort of hair. The present work aims to explore this issue by considering a more general model that includes a non-linear Maxwell source coupled to the scalar field $\Phi$. In doing so, and as we will show below, the indicated integration constant is no longer a hair, making possible a nontrivial thermodynamics analysis for the black hole solutions in a certain range for the non-minimal coupling $\xi$. Moreover, we exhibit a certain limit in the proposed theory that correctly reproduces the results from \cite{Correa:2013bza}. The plan of the paper is organized as follows: In Section \ref{Section-sol}, we will present the procedure elaborated in \cite{Correa:2013bza} and we will propose that with a suitable structure for the metric function as well as an addition of a matter source, we can construct a non-minimally dressed charged black hole with non-null thermodynamical quantities. In Section \ref{Section-soln} we will present an electrically charged configuration while in Section \ref{Section-term} we explore its non-null thermodynamic properties. Finally, the Section \ref{Section-conclusions} is devoted to our conclusions and discussions. \section{Action, field equations and derivation of the hairy solution}\label{Section-sol} In order to be as clear and self-contained as possible, we will start deriving the solution reported in \cite{Correa:2013bza}, considering the action \begin{eqnarray}\label{eq:actioncorrea} S=I_{(n)}+S_{\Phi}, \end{eqnarray} where $I_{(n)}$ and $S_{\Phi}$ are given by the gravity (\ref{Ik2}) and matter source (\ref{eq:LPhi}) contribution respectively. The field equations with respect to the metric $g_{\mu \nu}$ and the scalar field $\Phi$ read \begin{eqnarray} {{\cal E}}^{(n)}_{\mu\nu}:={{\cal G}}^{(n)}_{\mu\nu}- T_{\mu \nu}^{\Phi}=0,\label{eq:gmunu}\\ {{\cal E}}_{\Phi}:=\Box \Phi-\xi R\Phi-\frac{dU(\Phi)}{d\Phi}=0,\label{eq:phi} \end{eqnarray} with \begin{eqnarray*} {\cal G}^{(n)}_{\mu\nu}&=& P_{( \mu}^{\alpha \beta \gamma} R_{\nu) \alpha \beta \gamma }- 2 \nabla^{\rho} \nabla^{\sigma} P_{\mu \nu \sigma \rho}-\frac{1}{2} g_{\mu \nu} \mathcal{L}_{(n)},\\ T_{\mu \nu}^{\Phi}&=&\nabla_{\mu}\Phi\nabla_{\nu}\Phi - g_{\mu\nu}\Bigl[\frac{1}{2}\nabla_{\sigma}\Phi\nabla^{\sigma}\Phi +U(\Phi)\Bigr]\nonumber \\ &+& { \xi(g_{\mu\nu}\Box -\nabla_{\mu} \nabla_{\nu}+G_{\mu\nu} )\Phi^2},\\ \end{eqnarray*} where $P^{\mu \nu \sigma \rho}=\delta \mathcal{L}_{(n)} / \delta R_{\mu \nu \sigma \rho}$ with $\mathcal{L}_{(n)}$ the lagrangian given previously in (\ref{Ik2}). The metric Ansatz of our study takes the form \begin{eqnarray}\label{metric} ds^2=-r^2\big(1-f(r)\big) dt^2+\frac{dr^2}{r^2\big(1-f(r)\big)}+r^2 \sum_{i=1}^{D-2} dx_{i}^{2},\nonumber\\ \end{eqnarray} while that $\Phi=\Phi(r)$. For the sake of completeness, the equations of motion with respect to the metric and the potential $U(\Phi)$ are reported in the appendix. With all these components, we start the analysis by using the combination $\mathcal{E}_{t}^{t}-\mathcal{E}_{r}^{r}=0$, yielding a second-order differential equation for the scalar field given by $$2r^2 \left[\xi \Phi \Phi''+\left(\xi-\frac{1}{2}\right) (\Phi')^2\right](1-f)=0,$$ where $(')$ denotes the derivative with respect the radial coordinate $r$. For $f \neq 1$, the scalar field takes the form \begin{equation}\label{eq:phixi} \Phi(r)=(ar-b)^{\frac{2\xi}{4 \xi-1}}, \end{equation} and to satisfy $\displaystyle {\lim_{r \rightarrow +\infty} \Phi = 0}$ we need \begin{equation}\label{eq:rangexi} 0<\xi<\frac{1}{4}, \end{equation} while that for the particular case $\xi=1/4$ the scalar field is given as follows \begin{equation}\label{eq:phixi14} \Phi(r)=b e^{ar}, \end{equation} where for both cases $a$ is a possitive integration constant and $b$ is a positive parameter presents in the potential $U(\Phi)$. Then, under the substitution \begin{equation} \Sigma=f^{n-1}- \xi \Phi^{2}, \end{equation} the combination \begin{equation}\label{eq:Eii} \mathcal{E}_{t}^{t}-\mathcal{E}_{x_i}^{x_i} =(\Sigma f' r^{D})'=0 \end{equation} is trivially satisfied if $\Sigma=0$ and $n>1$, implying that \begin{equation} f=( \xi \Phi^{2})^{\frac{1}{n-1}}, \label{eq:finitial} \end{equation} keeping the same range for $\xi$ given in (\ref{eq:rangexi}), where $\displaystyle {\lim_{r \rightarrow +\infty} f =0}$ is satisfied. Finally, one checks that the potential $U(\Phi)$ is precisely the one who supports the remaining Einstein equation, $\mathcal{E}_{t}^{t}=0$, as well as the scalar field equation (\ref{eq:phi}). Although this model allows a family of black hole configurations for a wide range of values for the non-minimally coupled parameter $\xi$, at the time to study their thermodynamic properties, the mass as well as the entropy of the solution vanish trivially, and the integration constant $a$ from the scalar field can be viewed as a sort of hair \cite{Correa:2013bza}. The clue of this conclusion is in the fact that the entropy of the solution is proportional to \begin{eqnarray} \label{Sprop} \left(1-\xi \Phi^{2}\right)\big{|}_{r_h}, \end{eqnarray} which is zero when the metric function takes the form (\ref{eq:finitial}), where $r_h$ is the location of the event horizon for $f$. A way to improve this solution is by constructing a more general model, looking for non-vanishing thermodynamic parameters. This, in turn, is devoted to the following section, when we will analyze an electrical configuration. \section{Electrically charged hairy black hole}\label{Section-soln} As we saw above, one of the main issues is that the entropy is proportional to a quantity that vanishes at the horizon. In order to avoid this, a possible idea is to add new sources that perturb the geometry of the solution. To that end, for reasons that will be clear below, let us consider the addition of two parameters $\eta$ and $q$ into the self-interacting potential $U(\Phi)$, now reading \begin{eqnarray} U_{\eta,q}(\Phi)&=& \frac{1}{(1-4\xi)^2}\sum_{i=1}^{6} \beta_{i} \Phi^{\gamma_{i}},\label{eq:potxi} \end{eqnarray} where \begin{eqnarray*} \beta_{1}&=&\frac{[4(D-1)\xi-D+2] [4\xi D-D+1]\xi}{2},\\ \gamma_1&=&2,\\ \\ \beta_{2}&=&{4[4(D-1)\xi-D+2]b\xi^2},\qquad \gamma_2=\frac{1}{2 \xi},\\ \\ \beta_3&=&{2\xi^2 b^2},\qquad \gamma_3=\frac{1-2\xi}{\xi},\\ \\ \beta_4&=& \Big\{\eta ^{\frac{1}{n-1}}\, [4 n D \xi-(n+4\xi-1)(D-1)]\\ &\times& \big[\big(-4nq(-n+Dn-D+2)+2n\big)\xi^2\\ &+&\big(q (n^2D-4n \eta+2 n-D n+8 \eta+4Dn\eta-2n^2\\ &-&4\eta D) -2n \eta\big)\xi-\eta q (n-1) (D-2)\big]\Big\}\\ &\Big{/}&\big\{2 q n (n-1)^2\big\},\\ \gamma_4&=&\frac{2n}{n-1},\\ \\ \beta_5&=& \big\{\eta^{\frac{1}{n-1}}\xi b \big[\big(-16nq(-n+Dn-D+2)+4D n\\ &+&8-4D\big)\xi^2+\big((4n(Dn-2n-D) +8n\\ &+&16\eta(-n+Dn-D+2))q -4\eta (Dn+2-D)\\ &-&(n-1)(D-2)\big)\xi-4\eta q (n-1)(D-2) \\ &+&\eta (n-1)(D-2)\big]\big\}\Big{/}\big\{q(n-1)^2\big\},\\ \gamma_5&=&\frac{4 \xi+n-1}{2 \xi (n-1)}, \end{eqnarray*} \begin{eqnarray*} \beta_6&=& \frac{\eta^{\frac{1}{n-1}}b^2(n+4\xi-1)\xi [\eta(2q-1)-\xi(2nq-1)]} {q (n-1)^2},\\ \gamma_6&=&\frac{(4-2n)\xi+n-1}{\xi(n-1)}. \end{eqnarray*} It can be observed that the parameter $\eta$ reproduces the potential $U(\Phi)$ from \cite{Correa:2013bza} in the limit $\eta \to \xi$. On the other hand, the parameter $q$ corresponds to the power of a non-linear Maxwell source, coupled to the scalar field $\Phi$ and represented by the action \begin{eqnarray}\label{eq:maxwell} S_{M}&=&-\frac{1}{4}\int{d}^Dx\sqrt{-g} \epsilon (\Phi) \left(F_{\mu \nu} F^{\mu \nu}\right)^{q} \end{eqnarray} with $F_{\mu \nu}:=\partial_{\mu} A_{\nu}-\partial_{\nu} A_{\mu}$, $A_{\mu} dx^{\mu}=A_{t}(r)dt$. Seminal works of a nonlinear electrodynamics source can be found in \cite{Gonzalez:2009nn,Maeda:2008ha,Hassaine:2008pw}. Since we are interested in real solutions, we will restrict $q$ to be a nonzero rational number with odd denominator. The coupling function $\epsilon (\Phi)$ is given by \begin{eqnarray} \epsilon(\Phi)^{\frac{1}{2q-1}}&=& \left\{\Phi^{\frac{1-n+2\xi(n-2)}{\xi(n-1)}} \left(\Phi^{\frac{4\xi-1}{2\xi}}+b\right)^{\frac{1+2(1-D)q}{2q-1}}\right\}\nonumber\\ &\Big{/}&\Big\{\left[4(1+(n-1)D)\xi-(n-1)(D-1)\right] \Phi^{\frac{4\xi-1}{2\xi}}\nonumber\\ &+&b(n+4\xi-1)\Big\}.\label{eq:epsilon} \end{eqnarray} In resume, we are interested in the following action: \begin{eqnarray} S &=& \int d^{D}x\sqrt{-g} \left[ \dfrac{\mathcal{L}_{(n)}}{2} -\frac{1}{2}\nabla_{\mu}\Phi\nabla^{\mu}\Phi \right.\nonumber \\ &-&\left.\frac{\xi}{2}R\Phi^2 - U_{\eta,q}(\Phi)-\dfrac{1}{4}\epsilon (\Phi) (F_{\mu \nu} F^{\mu \nu})^{q} \right]. \end{eqnarray} Using (\ref{eq:gmunu})-(\ref{eq:phi}), and replacing $U(\Phi) \mapsto U_{\eta,q}(\Phi)$ {accordingly, the} equations of motions for the complete model now read \begin{subequations}\label{eq:EOM} \begin{eqnarray} &&E_{\mu \nu}:={{\cal E}}^{(n)}_{\mu\nu}- T_{\mu\nu}=0, \label{eq:Einstein_phi_M}\\ && {{\cal E}}_{\Phi}-\frac{1}{4} \frac{d \epsilon}{d \Phi} \left( F_{\alpha \beta} F^{\alpha \beta}\right)^{q}=0\label{eq:phi_M},\\ && \nabla_{\mu} \Big(\epsilon(\Phi) \left( F_{\alpha \beta} F^{\alpha \beta}\right)^{q-1} F^{\mu \nu}\Big)=0,\label{eq:M} \end{eqnarray} where \begin{equation*} T_{\mu \nu}=\epsilon(\Phi)\Big[q \left(F_{\sigma \rho} F^{\sigma \rho}\right)^{q-1} F_{\mu \sigma} F_{\nu}^{\phantom{\nu}\sigma}-\frac{1}{4} g_{\mu \nu}\left(F_{\sigma \rho} F^{\sigma \rho}\right)^{q}\Big], \end{equation*} \end{subequations} finding an asymptotically AdS black hole solution for $\xi$ given in (\ref{eq:rangexi}), where the line element takes the form \begin{eqnarray} ds^2&=&-N^2(r)F(r) dt^2+\frac{dr^2}{F(r)}+r^2 \sum_{i=1}^{D-2} dx_{i}^{2},\label{metric-sol}\\ N(r)&=&1,\qquad F(r)=r^2\big[1-( \eta \Phi(r)^{2})^{\frac{1}{n-1}}\big],\label{metric-function-sol} \end{eqnarray} with the scalar field $\Phi(r)$ given by (\ref{eq:phixi}), and the Maxwell strength reads \begin{eqnarray}\label{eq:Frt} F_{rt}&=&(A_{t})'=\frac{Q}{\left(r^{D-2} \epsilon(\Phi)\right)^{\frac{1}{2q-1}}}, \end{eqnarray} and the integration constants $Q$ and $a$ are tied by the relation \begin{eqnarray} \label{relcst} Q = \left[\dfrac{4(\eta - \xi)\xi \eta^{\frac{1}{n-1}}} {q (-2)^{q} (n-1)^2(1-4\xi)^2 a^{\frac{2(D-2)q}{2q-1}}}\right]^{\frac{1}{2q}}. \end{eqnarray} \begin{table \caption{\label{tabla1} Admissible values for the parameters $\eta,q$ ensuring a real solution.} \begin{tabular}{|c|c|c|c|} \hline Sign of $q$ & num($q$) & denom($q$) & Range for $\eta$\\ \hline \hline Case 1: $q>0$ & even & odd & $\eta \geq \xi$\\ [1ex] \hline \hline Case 2: $q>0$ &odd & odd & $0\leq \eta \leq \xi$\\ [1ex] \hline \hline Case 3: $q<0$ &even & odd & $0\leq \eta \leq \xi$\\ [1ex] \hline \hline Case 4: $q<0$ &odd & odd & $\eta \geq \xi$\\ [1ex] \hline \end{tabular} \end{table} A few comments can be made at this point. First, we note that the Ricci scalar for (\ref{metric-sol})-(\ref{metric-function-sol}), with the scalar field given previously in (\ref{eq:phixi}), reads \begin{eqnarray*} R&=&\left[D(D-1)+\frac{2 (\Phi''r+2D\Phi')r}{\Phi(n-1)}-\frac{2(n-3)(\Phi')^2r^2}{(n-1)^2 \Phi^2}\right]\\ &\times&{(\eta \Phi^2)^{\frac{1}{n-1}}}-{D(D-1)}, \end{eqnarray*} showing the existence of a curvature singularity located at $$r_{s}=\frac{b}{a}.$$ To complement the above, the coordinate singularity $F(r)= 0$ {leads to a sign restriction on $\eta$. To avoid naked singularities, hereafter we will assume $\eta > 0$}, and as a consequence, the curvature singularity $r_s$ is always hidden by an event horizon located at \begin{equation}\label{eq:rh} r_h=\frac{b}{a}+\frac{\eta^{\frac{1-4\xi}{4\xi}}}{a}. \end{equation} On second place, it is observed that (\ref{relcst}) imposes extra restrictions in our parameters $\eta,q$. Indeed, since we are interested in real solutions, the constraint between $Q$ and $a$ forces $\dfrac{\eta - \xi}{q(-2)^q}$ to be non negative. The allowed configurations are shown in the Table \ref{tabla1}. {Here is important to note that the inclusion of the Maxwell field (\ref{eq:maxwell}), given by (\ref{eq:Frt})-(\ref{relcst}), allow us to obtain a new hairy charged black hole solution where the location of the event horizon $r_h$ (\ref{eq:rh}) is written in function of the parameter $\eta$. Indeed, one can interpret the role of this parameter by saying that it generates a shift in the location of $r_h$. In addition, it is worth pointing out the importance of the Maxwell strength (\ref{eq:Frt})-(\ref{relcst}) in order to obtain non-null thermodynamical quantities. In fact, given that we are not adding a gravity theory contribution, {\em{a priori}} the entropy ${\mathcal{S}}$ keep being proportional to (\ref{Sprop}), where now with the new location of the event horizon (\ref{eq:rh}) $${\mathcal{S}} \propto (\eta-\xi), $$ while that the electric charge becomes $${\mathcal{Q}}_{e} \propto (\eta-\xi)^{\frac{2q-1}{2q}},$$ where the limit $\eta \to \xi$ makes the Maxwell source term to vanish, returning exactly to the hairy solution found previously in \cite{Correa:2013bza}. Finally,} it is observed that the coupling function $\epsilon(\Phi)$ (\ref{eq:epsilon}) is positive outside the singularity provided that $4(1+(n-1)D)\xi - (n-1)(D-1) \geq 0$, imposing a bound on the nonminimal coupling $\xi$. All of these facts will be fully explored and discused in the following section. We finish this section briefly reporting the solution for the case $\xi=1/4$. Here the potential $U_{\eta,q}(\Phi)$ as well as the coupling function $\epsilon(\Phi)$ read \begin{eqnarray*} U_{\eta,q}(\Phi)&=&\frac{\Phi^2}{8} \Big[4\, \ln \left( {\frac {\Phi}{b}} \right)^{2}+ 4\left( D-1 \right) \ln \left( {\frac {\Phi }{b}} \right)\nonumber\\ &+& \left( D-1 \right) \left( D-2 \right) \Big]-\frac{ \eta^{\frac{1}{n-1}}\Phi^{\frac{2n}{n-1}}}{8 q n (n-1)^2}\nonumber\\ &\times& \Big[{n}^{2} \left( 8\eta -2-4q(4 \eta-n) \right) \ln \left( {\frac {\Phi}{b}} \right)^{2}\\ &+&n \left( n-1 \right) \big(D(4\eta-1)-4q(4\eta-n)(D-1)\big) \\ &\times& \ln \left( {\frac {\Phi}{b}} \right) + q\left( n-1 \right) ^{2} \left( D-1 \right) \left( D-2 \right) \\ &\times& \left( n-4\,\eta \right)\Big], \\ \\ \epsilon(\Phi)^{\frac{1}{2q-1}}&=&\frac{\Phi^{-\frac{2n}{n-1}}}{D(n-1)+2n \ln\left(\frac{\Phi}{b}\right)}\,\ln\left(\frac{\Phi}{b}\right)^{\frac{1+2(1-D)q}{2q-1}}, \end{eqnarray*} while that the metric is given by (\ref{metric-sol})-(\ref{metric-function-sol}) where now the scalar field $\Phi$ acquires the structure found previously in (\ref{eq:phixi14}), and the Maxwell tensor is represented by (\ref{eq:Frt}) but now the integration constants $Q$ and $a$ are related as $$Q=\left[\frac{(4\eta-1)\eta^{\frac{1}{n-1}}} {2 q(-2)^q a^{\frac{2q(D-2)}{2q-1}} (n-1)^2}\right]^{\frac{1}{2q}}.$$ After this analysis for this electrically charged hairy black hole solution, now we will study the thermodynamics for the case $0<\xi<\frac{1}{4}$ through the Euclidean action. \section{Thermodynamics of the charged hairy black hole solution}\label{Section-term} We now turn into the study of the themodynamic quantities of the solution (\ref{metric-sol})-(\ref{metric-function-sol}) by means of the Euclidean approach, where the partition function is identified with the Euclidean path integral in the saddle point approximation around the Euclidean continuation of the classical solution \cite{Gibbons:1976ue, Regge:1974zd}, where the time coordinate $\tau=it$ is imaginary and periodic with period $\beta = T^{-1}$. The Euclidean action is related to the Gibbs free energy $\mathcal{G}$ by \begin{equation}\label{eq:gibbs} I_{E} = \beta \mathcal{G} = \beta (\mathcal{M} - T\mathcal{S} - \Phi_e \mathcal{Q}_e), \end{equation} where $\mathcal{M}$ is the mass, $\mathcal{S}$ is the entropy and $\Phi_e,\mathcal{Q}_e$ stands for the electric potential and electric charge, respectively. For this analysis, it is enough to consider the following class of static metrics $$ds^2 = N(r)^2F(r)d\tau^2 + \dfrac{dr^2}{F(r)} + r^2d\Sigma_{D-2}^2.$$ Thus, the reduced Euclidean action reads \begin{eqnarray} I_{E} &=& \beta \Sigma_{D-2} \int_{r_h}^{\infty} dr [ N\mathcal{H} + A_{\tau}p'] + B,\label{eq:red-act-1}\\ \mathcal{H}&=&-\frac{1}{2n}(D-2)\frac{d}{dr} \left[r^{D-1}\left(1-\frac{F}{r^2}\right)^n\right]\nonumber\\ &+& r^{D-2}\Big\{\left(\frac{1-4\xi}{2}\right)F(\Phi^{\prime})^2- \left(F^{\prime}+\frac{2(D-2)}{r}F\right)\nonumber\\ &\times&\xi\Phi\Phi^{\prime}+\Phi^2\left(-\frac{\xi}{2r^2}(D-2)(D-3)F\right)\nonumber\\ &-&2\xi\Phi\Phi^{\prime\prime}F\nonumber -\frac{(D-2)\xi}{2r}F^{\prime}\Phi^2+U_{\eta,q}(\Phi) \Big\}\nonumber\\ &+&\frac{(2q-1)}{2q} \left(\frac{p^{2q}}{ q (-2)^{q-1} r^{D-2} \epsilon(\Phi)}\right)^{\frac{1}{2q-1}}, \label{eq:red-act-2} \end{eqnarray} where $\tau \in [0,\beta]$, $r\geq r_{h}$, $\Sigma_{D-2}$ represents the volume of the compactified $(D-2)$- dimensional euclidean manifold, and $B$ is a boundary term, which is properly fixed by requiring that the reduced action has an extremum. In this reduced action, $$p = {q (-2)^{q-1} r^{D-2}\epsilon(\Phi) }\left(\frac{A_{\tau}'}{N}\right)^{2q-1},$$ is the conjugate momentum of $A_{\tau}$, and by Gauss Law, $p = constant \equiv {Q}_e$. We work in the grand canonical ensemble, so that we will consider variations of the action where the temperature $T$ and the potential $\displaystyle \Phi_e \equiv \lim_{r \rightarrow +\infty}A_{\tau}(r) - A_{\tau}(r_h)$ are fixed. In order to avoid divergent terms, we must restrict the admissible values of $\xi$ to the range: \begin{eqnarray} \label{xi:bound2} \xi^{\star} \equiv \dfrac{(n-1)(D-1)}{4(1+(n-1)D)}\leq \xi<\frac{1}{4}, \end{eqnarray} leading to the following electric potential: \begin{eqnarray}\label{eq:pot} \Phi_e&=& \frac{r_h (n-1)^{\frac{q-1}{q}}(1-4\xi)^{\frac{q-1}{q}}}{b+\eta^{\frac{1-4\xi}{4\xi}}} \left(\dfrac{4(\eta-\xi)\xi\eta^{\frac{1}{n-1}}}{q(-2)^q} \right)^{\frac{1}{2q}} \nonumber\\ &\times& \Big[ \eta^{-\frac{4\xi+n-1}{4 (n-1)\xi}}\left(\eta^{\frac{1-4\xi}{4\xi}}+b\right)^D-\delta_{\xi}^{\xi^{\star}}\Big],\end{eqnarray} where $$\delta_{\xi}^{\xi^{\star}} = \begin{cases} 1&,\quad \xi = \xi^{\star}, \\ \ \\ 0&,\quad \xi \neq \xi^{\star}, \\ \end{cases}$$ and now $r_h$ is the location of the event horizon given in (\ref{eq:rh}). For the black hole solution (\ref{metric-function-sol}), the Hawking temperature $T$ reads \begin{eqnarray} T = \dfrac{(1+b\eta^{\frac{4\xi-1}{4\xi}}) r_h \xi}{(n-1)(1-4\xi)\pi} = \beta^{-1}. \end{eqnarray} With all above, the variation of the reduced action leads to \begin{eqnarray*} \delta B &=& \beta \Sigma_{D-2}\left[ \left\lbrace - \dfrac{1}{2}N(D-2)r^{D-3}\left(1 - \dfrac{F}{r^2}\right)^{n-1} \right. \right. \\ &+&\left. Nr^{D-2}\xi\Phi\Phi' + \dfrac{1}{2}(D-2)\xi\Phi^2r^{D-3} \right\rbrace \delta F \\ &+&\left. 2Nr^{D-2}\xi\Phi F \delta \Phi'-2Nr^{D-2}\Big(\dfrac{F\Phi'}{2}- \xi\Phi'F \right.\nonumber\\ &+& \dfrac{\xi\Phi F'}{2} \Big)\delta\Phi -\left.A_{\tau}\delta p \right], \end{eqnarray*} where this variation has to be computed at $r=+\infty$ and at the event horizon $r=r_{h}$. At the infinity, we obtain \begin{align*} &\delta B(\infty) = \beta\Sigma_{D-2} \\ &\displaystyle \times \lim_{r\to \infty} \left(-\dfrac{2(D-2)\xi \eta^{\frac{1}{n-1}}(\eta - \xi) r^{D}\Phi(r)^{\frac{4\xi+n-1}{2\xi(n-1)}}}{(1-4\xi)(n-1)} \right)\delta a, \end{align*} where it can be observed that this limit is divergent unless $\eta = \xi$ or $\xi^{\star}\leq \xi<1/4$, as in (\ref{xi:bound2}). Additionally, this lower bound in the latter condition determines the unique value for $\xi$ that ensures a finite and nonzero contribution to the boundary term. In that specific case, we obtain $$\delta B(\infty) = -\beta\Sigma_{D-2}\cdot \left(\dfrac{2(D-2)\xi^{\star} \eta^{\frac{1}{n-1}}(\eta - \xi^{\star})}{(1-4\xi^{\star})(n-1)a^D}\right) ~ \delta a.$$ In order to compute the variation at the horizon, we use the relations \begin{eqnarray*} \delta F\Big{|}_{r_h} &=& -F'(r_{h})~\delta r_h,\quad \delta p = \delta Q_e,\\ \delta \Phi \Big{|}_{r_h} &=& \delta(\Phi(r_{h})) - \Phi'(r_h)\delta r_{h}, \end{eqnarray*} and a simple calculation leads to $$\delta B(r_h)= 2\pi \Sigma_{D-2} \left(1 - \dfrac{\xi}{\eta} \right)~ \delta r_{h}^{D-2} + \beta \Sigma_{D-2}\Phi_e\delta Q_e.$$ Thus, the boundary term is \begin{eqnarray}\label{Bound} B &= \beta\Sigma_{D-2} \dfrac{2\xi\eta^{\frac{1}{n-1}}(\eta - \xi)(D-2)}{(D-1)(n-1)(1-4\xi)a^{D-1}}~\delta_{\xi}^{\xi^{\star}} \nonumber \\ &- 2\pi\Sigma_{D-2}\left(1-\dfrac{\xi}{\eta}\right)r_{h}^{D-2} - \beta\Sigma_{D-2}\Phi_e \mathcal{Q}_e, \end{eqnarray} and the identification of the thermodynamics parameters is obtained by comparing (\ref{Bound}) with (\ref{eq:gibbs}), where the thermodynamic quantities read: \begin{align} \mathcal{M} &= \Sigma_{D-2}\left(\dfrac{2\xi\eta^{\frac{1}{n-1}}(\eta - \xi)(D-2)}{(D-1)(n-1)(1-4\xi)a^{D-1}}\right)~\delta_{\xi}^{\xi^{\star}} \nonumber\\ &=\Sigma_{D-2}\left(\dfrac{2\xi\eta^{\frac{1}{n-1}}(\eta - \xi)(D-2)}{(D-1)(n-1)(1-4\xi)}\right) \nonumber\\ &\times\left(\frac{r_h}{b+\eta^{\frac{1-4\xi}{4\xi}}}\right)^{D-1}~\delta_{\xi}^{\xi^{\star}},\label{eq:mass}\\ \mathcal{S} &= 2\pi\Sigma_{D-2}\left(1-\dfrac{\xi}{\eta}\right)r_{h}^{D-2}, \label{eq:entrop}\\ \mathcal{Q}_e &= {\Sigma_{D-2} Q_e} \nonumber\\ &=\dfrac{\Sigma_{D-2}~q(-2)^{q-1}}{a^{D-2}}\left[\dfrac{4(\eta - \xi)\xi \eta^{\frac{1}{n-1}}} {q (-2)^{q} (n-1)^2(1-4\xi)^2 }\right]^{\frac{2q-1}{2q}} \nonumber\\ &={\Sigma_{D-2}~q(-2)^{q-1}} \left(\frac{r_h}{b+\eta^{\frac{1-4\xi}{4\xi}}}\right)^{D-2} \nonumber\\ &\times \left[\dfrac{4(\eta - \xi)\xi \eta^{\frac{1}{n-1}}} {q (-2)^{q} (n-1)^2(1-4\xi)^2 }\right]^{\frac{2q-1}{2q}}. \label{eq:charge} \end{align} It is a simple exercise to check that the First Law of Black Holes Thermodynamics $$\delta \mathcal{M} = T\delta \mathcal{S} + \Phi_e \delta \mathcal{Q}_e,$$ holds. Following the procedure performed in \cite{Banados}, we note that the reduced action (\ref{eq:red-act-1})-(\ref{eq:red-act-2}) has the scaling symmetries \begin{eqnarray*} \bar{r}&=&\sigma r,\quad \bar{N}(\bar{r})=\sigma^{1-D} N(r),\quad \bar{F}(\bar{r})=\sigma^{2} F(r),\\ \bar{\Phi}(\bar{r})&=&\Phi(r),\quad \bar{p}(\bar{r})=\sigma^{D-2} p(r),\quad \bar{A}_{\tau}(\bar{r})=\sigma^{2-D} A_{\tau}(r), \end{eqnarray*} where $\sigma$ is a positive constant, allowing a Noether current \begin{eqnarray*} C(r) &=& \left[ \left\lbrace - \dfrac{1}{2}N(D-2)r^{D-3}\left(1 - \dfrac{F}{r^2}\right)^{n-1} \right. \right. \\ &+&\left. Nr^{D-2}\xi\Phi\Phi' + \dfrac{1}{2}(D-2)\xi\Phi^2r^{D-3} \right\rbrace (-rF'+2F) \\ &+&\left. 2Nr^{D-2}\xi\Phi F (-r\Phi''-\Phi')-2Nr^{D-2}\Big(\dfrac{F\Phi'}{2} \right.\nonumber\\ &-& \xi\Phi'F+ \dfrac{\xi\Phi F'}{2} \Big)(-r\Phi') -\left.A_{\tau} \big(-rp'+(D-2)p\big) \right], \end{eqnarray*} which is conserved ($C'(r)=0$). Evaluating at infinity and at the horizon $r_h$: \begin{eqnarray*} C(\infty)&=&\frac{\mathcal{M} (D-1)}{\Sigma_{D-2}},\\ C(r_h)&=&\frac{T \mathcal{S} (D-2)}{\Sigma_{D-2}}+\frac{\Phi_e \mathcal{Q}_{e} (D-2)}{\Sigma_{D-2}}, \end{eqnarray*} and given that $C(r)$ is a constant, we have $C(\infty)=C(r_h)$, permitting to obtain a $D$-dimensional Smarr relation \cite{Smarr:1972kt} \begin{eqnarray}\label{eq:smarr} \mathcal{M}= \left(\dfrac{D-2}{D-1}\right) ( T\mathcal{S} + \Phi_e\mathcal{Q}_e). \end{eqnarray} Many commentaries can be made from these thermodynamical quantities. {Restoring $\kappa = 8\pi G$, it can be observed that the entropy satisfies $\mathcal{S} = \dfrac{\mathcal{A}}{4\tilde{G}}$, where $$\tilde{G} = \dfrac{G}{1-\frac{\xi}{\eta}}$$ is an ``effective'' Newton constant. If one imposes the positivity of this effective Newton constant, then $\eta > \xi$, concluding that these configurations only are feasible for Cases 1 or 4 from Table \ref{tabla1}.} {Together with the above, for the uncharged case (when $\eta \rightarrow \xi$) all the thermodynamical quantities vanish except for the Hawking Temperature, where $$T = \dfrac{(1+b\xi^{\frac{4\xi-1}{4\xi}}) r_h \xi}{(n-1)(1-4\xi)\pi} \neq 0, $$ recovering the analisys performed in \cite{Correa:2013bza}. } Curiously enough, from equations (\ref{eq:charge}) and (\ref{eq:pot}) we have that the electric charge and electric potential have opposite signs, as shown in Figure \ref{p1}. The above is due to we are working on real solutions, so $(\eta-\xi)/\big[q (-2)^q\big]$ is a non-negative quantity, as we had already noted. This leads to $\mathcal{Q}_{e}<0$. In what respects to $\Phi_{e}$, it can be noticed that the expression \begin{equation}\label{eq:cond} \eta^{-\frac{4\xi+n-1}{4 (n-1)\xi}}\left(\eta^{\frac{1-4\xi}{4\xi}}+b\right)^D-\delta_{\xi}^{\xi^{\star}} \end{equation} is always positive for $\xi^{\star}\leq\xi<1/4$, leading to $\Phi_{e}>0$. The above is reinforced by the fact that through the Smarr formula (\ref{eq:smarr}) $$0 < \mathcal{M}<\left(\frac{D-2}{D-1}\right)T \mathcal{S},$$ implying that $\Phi _e\mathcal{Q}_e < 0$. \begin{figure}[!ht] \begin{center} \includegraphics[scale=0.15]{figcharge.png} \includegraphics[scale=0.27]{figpot.png} \caption{Up panel: Electric charge $\mathcal{Q}_{e}$ versus the parameter $\eta$ and the location of the event horizon $r_h$, which is a negative quantity. Down panel: Electric potential $\Phi_{e}$, versus the parameter $\eta$ and the location of the event horizon $r_h$, which is a positive quantity. For both cases, we suppose $0<r_h<1$ and $0<\eta<1$. } \label{p1} \end{center} \end{figure} It is worth pointing out that with these thermodynamical quantities we can study the local stability considering small perturbation around the equilibrium. As a first step, we rewrite the temperature $T$ and the electric potential $\Phi_{e}$, in the function of the extensive quantities $\mathcal{S}$ and $\mathcal{Q}_{e}$, given by \begin{eqnarray*} T&=&\displaystyle{\frac{\left( {\eta}^{-{\frac {4\,\xi-1}{4\xi}}}+b \right) \xi\,{\eta}^{ {\frac {4\,\xi-1}{4 \xi}}} \left( {\frac {\mathcal{S}\eta}{2 \pi \,\Sigma_ {D-2} \left( \eta-\xi \right) }} \right) ^{ \frac{1}{ D-2}} }{(n-1)(1-4\xi)\pi}}, \\ \Phi_{e}&=& \frac{\left( 1-4\,\xi \right) \left( n-1 \right)} {\left({ \frac {\Sigma_{D-2} \left( -2 \right) ^{q-1}q}{\mathcal{Q}_e}} \right) ^{\frac{1}{ D-2 } }} \\ &\times&\left[{\frac {4 \xi\, \left( \eta-\xi \right) {\eta}^{ \frac{1}{ n-1}}}{ \left( -2 \right) ^{q}q \left( 1-4\,\xi \right) ^{2} \left( n -1 \right) ^{2}}} \right]^{\frac{D-2q-1}{2(D-2)q}}\\ &\times&\Big[ \eta^{-\frac{4\xi+n-1}{4 (n-1)\xi}}\left(\eta^{\frac{1-4\xi}{4\xi}}+b\right)^D-\delta_{\xi}^{\xi^{\star}}\Big], \end{eqnarray*} and following the steps performed in \cite{Mansoori:2013pna,Mansoori:2014oia}, the specific heat $C_{\Phi_{e}}$ at constant electrical potential as well as the electric permittivity $\epsilon_{T}$ at constant temperature read \begin{eqnarray*}\label{eq:cq} C_{\Phi_{e}}&\equiv& T\left(\frac{\partial \mathcal{S}}{\partial T}\right)_{\Phi_{e}}=\frac{T \{\mathcal{S},\Phi_{e}\}_{\mathcal{S},\mathcal{Q}_{e}}}{\{T,\Phi_{e}\}_{\mathcal{S},\mathcal{Q}_{e}}}\\ &=&(D-2)\mathcal{S}\cdot \delta_{\xi}^{\xi^{\star}},\\ \\ \epsilon_{T}&\equiv&\left(\frac{\partial \mathcal{Q}_{e}}{\partial \Phi_{e}}\right)_{T}=\frac{\{\mathcal{Q}_{e},T\}_{\mathcal{S},\mathcal{Q}_{e}}} {\{\Phi_{e},T\}_{\mathcal{S},\mathcal{Q}_{e}}}\\ &=&\frac{(D-2) \Sigma_{D-2} \mathcal{Q}_{e}}{(n-1) (1-4 \xi)} \left(\frac{\Sigma_{D-2} (-2)^{q-1} q}{\mathcal{Q}_{e}}\right)^{\frac{1}{D-2}} \\ &\times&\frac{\left[\frac{4 \xi (\eta-\xi)\eta^{\frac{1}{n-1}}}{q (-2)^{q} (1-4\xi)^2 (n-1)^2}\right]^{\frac{2q+1-D}{2(D-2)q}}}{\eta^{\frac{1-4\xi-n}{4\xi (n-1)}} \left(\eta^{\frac{1-4\xi}{4\xi}}+b\right)^{D}-{\delta_{\xi}^{\xi^{\star}}}}, \end{eqnarray*} where we are considering the partial derivatives in the function of Poisson brackets, where if $f$ and $g$ are explicit functions of $a$ and $b$: $$\{f,g\}_{a,b}:=\left(\frac{\partial f }{\partial a}\right)_{b}\left(\frac{\partial g} {\partial b}\right)_{a} -\left(\frac{\partial f} {\partial b}\right)_{a}\left(\frac{\partial g} {\partial a}\right)_{b}.$$ The case $\xi=\xi^{\star}$ deserves to be discussed. The specific heat $C_{\Phi_{e}}$ is now positive for $\eta>\xi^{\star}$, represented again by Cases 1 and 4 from Table \ref{tabla1} and interpreted as local stability under thermal fluctuations. Nevertheless, with respect to the electrical permittivity $\epsilon_{T}$, this is negative, being an unstable configuration under electrical perturbations. This is not surprising, since this hairy electrical configuration has opposite signs between the charge $\mathcal{Q}_{e}$ and the electrical potential $\Phi_e$, being explained by the fact that $\mathcal{Q}_{e}$ increases when $\Phi_e$ decreases and the system leave the equilibrium state \cite{Gonzalez:2009nn,Chamblin:1999hg}. Finally, the Global stability can be studied in the grand canonical ensemble with the Gibbs free energy $\mathcal{G}=I_{E}/\beta$ as a state function, wherein our case and by using the Smarr relation (\ref{eq:smarr}) is given by \begin{eqnarray} \mathcal{G}&=&\mathcal{M}-T \mathcal{S}-\Phi_e \mathcal{Q}_{e}=-\frac{\mathcal{M}}{D-2},\nonumber\\ \label{eq:Gibbs} \end{eqnarray} which is negative. For these black hole configurations, the concavity condition simply reads \begin{eqnarray*} \frac{\partial^{2}\mathcal{G}}{\partial T^2}&=&- \dfrac{C_{\Phi_e}}{T}, \end{eqnarray*} ensuring global thermodynamic stability (${\partial^{2}\mathcal{G}}/{\partial T^2}<0$). Some particular cases are presented in Figure \ref{gibbs}. \begin{figure}[!ht] \begin{center} \includegraphics[scale=0.1]{figgibbs.png} \caption{Gibbs free energy $\mathcal{G}$ versus temperature $T$ for some particular cases. Here we note that when the dimension $D$ of the solution and the integer $n$ increase, $\mathcal{G}$ becomes more negative.} \label{gibbs} \end{center} \end{figure} \section{Conclusions and discussions}\label{Section-conclusions} In the present paper, we extend the model presented in \cite{Correa:2013bza}, characterized by a special truncation of the Lanczos-Lovelock gravity theories dressed by a scalar field non-minimal coupling together with a suitable choice of the potential. To perform this, we add a special matter source characterized by a non-linear Maxwell field coupling with a function depending on the scalar field. From this model, there is the presence that an integration constant that for our situation no longer a hair, making possible a nontrivial thermodynamics analysis for the black hole solutions in a certain range for the non-minimal coupling $\xi$, exhibiting a limit in the proposed theory that recovers the original result from \cite{Correa:2013bza}. Computing its thermodynamics parameters, by using the Euclidean action, we obtain interesting thermodynamical quantities satisfying the higher dimensional First Law of Thermodynamics. From this regularized action and thanks to its scaling symmetries, we obtain a Noether current allowing us a derivation of a Smarr formula, following the procedure elaborated in \cite{Banados}. It is worth pointing out that the mass is the only null quantity except for a special election for the non-minimal coupling parameter $\xi$. The above allows us to analyze local and global thermodynamical stability for some election of the coupling parameter, following the criteria from the non-negativity of the specific heat $C_{\Phi_{e}}$ as well as the electrical permittivity $\epsilon_{T}$, showing that this charged hairy higher dimensional configuration is locally stable under thermal fluctuations but is unstable under electrical fluctuations, due in part to the opposite signs present between the electrical charge and the electrical potential. Supplementary to the above, the global stability by using the concavity criteria for the Gibbs free energy, is assured only if $\xi=\xi^{\star}$. Just for completeness, the case $b=0$ is briefly discussed. When $\xi \neq \xi^{\star}$, and the coupling function $\epsilon (\Phi)$ (\ref{eq:epsilon}) can be set to a constant, provided the following relation between $q$ and $\xi$: $$\dfrac{4\xi n}{(n-1)(1-4\xi)} = \dfrac{2(D-2)q}{2q-1}.$$ On contrast, the case $b=0$ and $\xi = \xi^{\star}$ recovers the stealth configuration already found in \cite{Gaete:2013oda,Gaete:2013ixa}, which is a particular solution of the Einstein equations with the property that the gravity and matter source section vanish identically, this is $${{\cal G}}^{(n)}_{\mu\nu}=0=T_{\mu \nu}^{\Phi}.$$ Some natural extensions of this work would be for example to consider the inclusion of matter sources such as linear Maxwell fields \cite{BravoGaete:2019rci} to obtain electric and/or magnetic configurations, or the addition of other non-linear electrodynamics theories (see for example \cite{Plebanski:1968,Alvarez:2014pra,Stetsko:2020nxb,Stetsko:2020tjg}). \begin{acknowledgments} We would like to thank especially to Mokhtar Hassaine for stimulating discussions and nice comments to improve the draft. MB wishes to dedicate this work in memory of his mentor and friend Gonzalo Hidalgo Am\'estica. SG is part of the research group GEMA Res. 180/2019 VRIP-UA. \end{acknowledgments} \section{Appendix}\label{Section-Appendix} In this Section, we report the equations of motions (\ref{eq:gmunu}) varying the action (\ref{eq:actioncorrea}) respect to the metric $g_{\mu \nu}$. Each one is given by \begin{widetext} \begin{eqnarray*} {\cal{G}}^{(n)t}_{\,\,t}&=&{\cal{G}}^{(n)r}_{\,\,r}=-\frac{(D-2)}{2n}\,\left(nr f'+(D-1)f\right) f^{n-1},\\ \\ {\cal{G}}^{(n)x_{i}}_{\,\,x_{i}}&=&-\frac{f^{n-2}}{2n} \big(n r^2 f''f+n(n-1)r^2 (f')^2+2n f r (D-1)f'\nonumber\\ &+&(D-2)(D-1)f^2\big),\\ \\ {T}^{\Phi t}_{\,\,t}&=& 2\xi r^2 \Phi (1-f) \Phi''+2(1-f)r^2\left(\xi-\frac{1}{4}\right) (\Phi')^2\nonumber\\ &-&2 \left[\frac{1}{2}r f'-(D-1)(1-f)\right] r\xi \Phi \Phi'-\frac{1}{2} r \xi \Phi^2 (D-2) f'\nonumber\\ &+&\frac{1}{2} (D-1) (D-2) \xi(1-f)\Phi^2-U(\Phi), \\ \\ {T}^{\Phi r}_{\,\,r}&=& \frac{1}{2}r^2(1-f) (\Phi')^2-2\left[\frac{1}{2} r f'-(D-1)(1-f)\right] r \xi \Phi \Phi' \\ &-&\frac{1}{2} r \xi \Phi^2 (D-2) f'+\frac{1}{2}(D-1)(D-2) \xi(1-f)\Phi^2\\ &-&U(\Phi), \\ \\ {T}^{\Phi x_i}_{\,\,x_i}&=&2\xi r^2 \Phi(1-f) \Phi''-\frac{1}{2}r^2 f'' \xi \Phi^2 +2(1-f)r^2 \left(\xi-\frac{1}{4}\right)(\Phi')^2\\ &-&2 \left[r f'-(D-1)(1-f)\right] r \Phi \xi \Phi'-r \xi \Phi^2 (D-1) f' \\ &+&\frac{1}{2}(D-1)(D-2) \xi(1-f)\Phi^2\\ &-&U(\Phi), \end{eqnarray*} while that the potential $U(\Phi)$ in \cite{Correa:2013bza} reads: \begin{eqnarray*} U(\Phi)&=& \frac{1}{(1-4\xi)^2}\sum_{i=1}^{6} \alpha_{i} \Phi^{\gamma_{i}}, \end{eqnarray*} with \begin{eqnarray*} \alpha_{1}&=&\frac{[4(D-1)\xi-D+2] [4\xi D-D+1]\xi}{2},\qquad \gamma_1=2,\\ \\ \alpha_{2}&=&{4[4(D-1)\xi-D+2]b\xi^2},\qquad \gamma_2=\frac{1}{2 \xi},\\ \\ \alpha_3&=&{2\xi^2 b^2},\qquad \gamma_3=\frac{1-2\xi}{\xi},\\ \\ \alpha_4&=& -\dfrac{\xi ^{\frac{n}{n-1}}}{2n(n-1)}\, [4 n D \xi-(n+4\xi-1)(D-1)][4\xi((n-1)D-n+2)-(n-1)(D-2)] ,\quad \gamma_4=\frac{2n}{n-1},\\ \\ \alpha_5&=& \dfrac{16b\xi(n(D-1)-(D-2))-4D(n-1)+8(n-1)}{n-1}\xi^{\frac{2n-1}{n-1}},\qquad \gamma_5=\frac{4 \xi+n-1}{2 \xi (n-1)}, \\ \\ \alpha_6&=& -\frac{2\xi^{\frac{2n-1}{n-1}}b^2(n+4\xi-1)}{(n-1)},\qquad \gamma_6=\frac{(4-2n)\xi+n-1}{\xi(n-1)}.\\ \end{eqnarray*} \end{widetext}
\section{Introduction} \label{sec-intro} Ecosystems can exhibit alternative stable states at similar environmental conditions~\cite{may1977nature,scheffer2001nature}. For example, in semi-arid ecosystems, vegetated state and bare state can co-exist at similar values of mean annual precipitation. Similarly, lakes can exist in turbid or clear states for the same amount of nutrient loading rates. Such systems with bistable (or multiple stable) states are prone to abruptly shift from one stable state to another when they cross a threshold value of the external driver. These systems also show hysteresis, i.e. the reverse transition occurs at a driver value different from the conditions that caused the initial transition~\cite{may1977nature}. Therefore, restoration is often difficult and sometimes even impossible. To explain these widely observed phenomena, strong positive feedback within ecosystems is often invoked as a necessary condition~\cite{taylor2005allee,xu2015local,kefi2016can,sankaran2019mee}. Here, we present a new insight on how demographic noise -- stochastic effect arising from discrete and probabilistic birth and death events in finite systems -- can exacerbate these effects even in systems with weak positive interactions. In ecological systems with positive feedback, organisms interact to enhance the local birth rates and/or reduce the local death rates. Many analytical and numerical simulation models incorporate ecosystem specific positive interactions~\cite{taylor2005allee,sankaran2019mee,guichard2003amnat,dakos2011AmNat,kefi2007nature,von2010periodic,manor2008facilitation,scanlon2007positive,couteron2001periodic}. For example, in semi-arid ecosystems, plants increase local infiltration of surface water and reduce evaporation; thus, the chance of germination and growth of a plant nearby another plant is higher than that in a bare region. Such positive density dependence on the growth rates -- also called Allee effect -- is an important factor in maintaining multiple stable states and in driving abrupt transitions between these states~\cite{taylor2005allee,xu2015local,kefi2016can,sankaran2019mee}. % Besides interaction processes like positive feedback, stochasticity also plays an important role in determining ecosystem dynamics and stability. Broadly, stochasticity can be classified into two types: environmental (extrinsic) stochasticity arising from random fluctuations in the environmental drivers and demographic (intrinsic) stochasticity arising from probabilistic and discrete nature of birth and death of individuals. While it is known that environmental stochasticity can alter resilience and induce shifts between bistable ecological systems \cite{guttal2007ecomodel,sharma2015theoeco,chen2018amnat,meng2020interface,lucarini2019prl}, the effect of demographic stochasticity on the resilience of ecosystems has received less attention~\cite{meng2020interface,dennis2002allee,weissmann2014stochastic,martin2015PNAS,sarkar2020}. For example, demographic noise may smoothen out abrupt transitions~\cite{weissmann2014stochastic,martin2015PNAS}. In contrast, some studies make an opposite prediction too, i.e. demographic noise promotes abrupt transitions~\cite{dennis2002allee}. However, these studies use a phenomenological approach to incorporate noise in the models. In this approach, the direct relationship between the individual-level processes and the structure of noise at the population level are not rigorously established. Although demographic noise is now relatively well studied in a number of ecological contexts~\cite{mobilia2007jstat,black2012TREE,rogers2012epl,jhawar2019book,jhawar2020natphys,dobramysl2018jphysA}, the precise role of finite population size on the dynamics of abrupt shifts is not much explored. Furthermore, few studies disentangle the effects of spatial interactions from demographic stochasticity on stability and resilience of ecosystems (but see~\cite{dennis2002allee,realpe2013ecocomp,lande1998demographic,ovaskainen2010stochastic}). In this paper, we explore the effects of demographic stochasticity arising from finite population sizes on ecological transitions. The manuscript is organised as follows, with an effort to make it pedagogical and accessible to anyone who is familiar with basic non-linear dynamics and stochastic processes. In Section~\ref{sec-model}, we present a minimal, spatially-explicit individual-based model which incorporates local processes of birth and death and positive feedback interactions among individuals~\cite{sankaran2019mee,lubeck2006JStatPhys,sankaran2018ecoind}. We then present van Kampen's system-size expansion method in Section~\ref{sec-meso-sde} which yields a mesoscopic model, i.e. a stochastic differential equation governing the system dynamics while accounting for finite-size stochastic effects. Using this method, we derive the mesoscopic description of our individual-based spatial model and relate microscopic interaction rules to the structure of demographic noise. In Section~\ref{sec-mft}, we show results of the model in the deterministic mean-field limit. In Section~\ref{sec-demo-noise}, using analytical calculations and numerical simulations, we show that demographic stochasticity promotes alternative stable states even with relatively weak positive interactions. % Finally, we discuss various implications, including the counteracting effects of demographic noise and spatial interactions on ecosystem transitions. \section{A minimal individual-based model for ecosystem transitions} \label{sec-model} Our model is based on a statistical-physics inspired cellular-automaton model of tricritical directed percolation~\cite{lubeck2006JStatPhys} that has been adopted in ecological contexts~\cite{sankaran2019mee,sankaran2018ecoind,majumder2019ecology}. Here, the two dimensional space is divided into $L\times L = N$ discrete sites. Each site can take one of the two states: empty (denoted by 0) or occupied (by an organism; denoted by 1). We update these states at discrete time steps using probabilistic rules of birth and death, described below (See Fig \ref{fig-model-schematic} for a schematic of the update rules of the model). \begin{figure}[ht] \resizebox{1.0\columnwidth}{!}{% \includegraphics{ModelSchemePQD1.png} } \caption{\textbf{Schematic of the model update rules}. Left panel shows the baseline reproduction process as implemented when the neighbouring site of a focal plant is empty. Right panel shows the positive feedback process which is implemented when the neighbouring site of a focal plant is occupied. (Schematic adapted with modification from Figure 1 in the Supporting Information for~\cite{sankaran2019mee})} \label{fig-model-schematic} % \end{figure} {\it Baseline reproduction:} During each discrete time step, a site is selected randomly, henceforth called the focal site. If the focal site is empty, no update is done and another site is randomly selected. However, if the focal site is occupied by an organism, one of its four nearest neighbours is selected at random. This neighbour may be occupied or empty. If it is empty, we implement what we refer to as the baseline reproduction rule: the focal plant reproduces with a probability $p$ and establishes a new plant at the neighbouring empty site (resulting in a transition represented as 10 $\to$ 11). In addition, the focal plant may die with a probability $d$ (represented as 10 $\to$ 00). We interpret $p$ as the baseline birth probability of the plants (or more generally an organism) per unit time which can be thought of as a parameter representative of external factors like precipitation; we also refer to $p$ as the environmental driver and a reduction in $p$ as increased environmental stress. We interpret $d$ as the density-independent death rate; this is in contrast to the previous models where the death rate was assumed to be $1-p$~\cite{sankaran2019mee,lubeck2006JStatPhys,sankaran2018ecoind,majumder2019ecology}. {\it Positive feedback}: If the neighbouring site of the focal site, however, is occupied, we implement the positive feedback rule: we randomly pick one of the six neighbours of the pair as the third site. If the third site is empty a plant germinates there with a probability $q$ (represented as 110 $\to$ 111) or the focal plant dies with a probability $d$ (represented as 11 $\to$ 01); the latter rule is implemented only if the third site is not germinated. The positive feedback (i.e. $q>0$) has two effects: It enhances the birth rate of the plants. In addition, there is reduction of death rate of the focal plant when there are occupied neighbors. Therefore, a discrete step update may involve (i) nothing if the focal site is empty, (ii) a basic reproduction rule if the chosen pair is 10, leading to one of the four outcomes shown in the left panel of Fig \ref{fig-model-schematic} or (iii) a positive feedback rule if the chosen pair is 11, leading to one of the two outcomes shown in the right panel of Fig \ref{fig-model-schematic}. One time unit completes after $L^2$ discrete updates such that all the cells are selected, on average, once for an update. % We now make remarks on how this model relates to {\it contact process}, a well known spatial stochastic process studied in the context of infectious disease spread and population dynamics~\cite{da1999PRE,morris1995spread}. Unlike the contact process, we assume that reproduction by the focal plant and its death are not mutually exclusive. We model birth and death as independent processes and both can happen in the same discrete time step, corresponding to the update $10 \rightarrow 01$ which occurs with a probability $pd$. Likewise, there is a finite chance of neither of these events occurring, corresponding to the update $10 \rightarrow 10$ with a probability $(1-p)(1-d)$. Therefore, the update rules of our model do not converge to the discrete formulation of the contact process by setting $q=0$ and $d=1-p.$ However, we stress that $10 \rightarrow 10$ and $10 \rightarrow 01$ transitions do not affect analytical approximations like mean-field and pair approximations since these updates have no effect on the macroscopic density of plants on the landscape. See Section~\ref{sec-meso-sde} and Appendix A. Hence, in the mean-field limit, our model with $q=0$ and $d=1-p$ is equivalent to the contact process. Likewise, these transitions do not affect the doublet densities either; therefore, the pair-approximation for the contact process and our model with $q=0$ and $d=1-p$ are identical. \section{Coarse-grained population level model with demographic noise} \label{sec-meso-sde} Mean-field approximation of stochastic cellular-automaton models are constructed in the macroscopic limit ($N \to \infty$); thus, apart from spatial interactions, they fail to account for the stochasticity arising from finite system sizes \cite{mobilia2007jstat,mckane2005prl,biancalani2014PRL}. In this section, we first illustrate how the so called {\it system-size expansion method} can be used to obtain a mesoscopic dynamical description - which approximates the dynamics of a coarse-grained state variable such as population density and its dependence on the size of the system~\cite{jhawar2019book,biancalani2014PRL,van1992book}. We first derive the SDE using system size expansion method for a generic set of stochastic update rules which determine the value of a state variable $x$. We then apply the method to the model described in the previous section. % \subsection{Deriving the mesoscopic model with system-size expansion} \label{sec-system-size-expansion} We would like to describe the dynamics of a scalar variable $\rho$, representing the proportion of occupied cells or density of the landscape. For the sake of generality, we use the notation $x$ for the state variable, since the subsequent steps outlined in this section are applicable to a system of reactions which can be described by a single dynamical state variable. We further assume that in a finite system of size $N$ the stochastic update rules are `birth' or `death' like events, which may change $x$ to $x+\frac{1}{N}$ or $x-\frac{1}{N}$. To begin with, we write the master equation to describe the temporal evolution of the probability distribution of $x$ at time $t$~\cite{van1992book,gardiner1985book}, denoted by $P(x,t)$ , \begin{equation} \label{eq-masterequation} \begin{split} \frac{\partial P(x,t)}{\partial t} &= \sum_{x' \ne x} [T(x|x')P(x',t) - T(x'|x)P(x,t)] \\ & = T(x|x+\frac{1}{N}) P(x+\frac{1}{N},t) + T (x|x-\frac{1}{N}) P(x-\frac{1}{N},t) \\ &- T(x+\frac{1}{N}|x) P(x,t) - T (x-\frac{1}{N}|x) P(x,t) \end{split} \end{equation} \noindent where $T(x|x')$ is the transition rate from the state $x'$ to state $x$, which in turn depends on the stochastic update rules of the model. Following~\cite{jhawar2019book,biancalani2014PRL}, to simplify the above master equation, we define the step operators $\epsilon^+$ and $\epsilon^-$ as \begin{equation*} \epsilon^+ h(x) = h(x+\frac{1}{N}) \quad \quad \quad \epsilon^- h(x) = h(x-\frac{1}{N}) \end{equation*} \noindent In addition, for brevity, we denote the transition rates that correspond to birth and death as $T^+$ and $T^-$, respectively, \begin{equation*} T^+(x) = T (x+\frac{1}{N}|x)\\ \quad \quad \quad T^-(x) = T(x-\frac{1}{N}|x) \end{equation*} Using these operators and the abbreviated notation for transition rates, we may rewrite the master equation (\ref{eq-masterequation}) as \begin{equation} \label{eq-abb-master} \frac{\partial P(x,t)}{\partial t} = (\epsilon^- - 1) T^+(x) P(x,t) + (\epsilon^+ - 1) T^-(x) P(x,t) \end{equation} Assuming large $N$, we approximate our step operators with a second order Taylor series: \begin{equation} \label{eq-step-approx} \epsilon^{\pm} h(x) \approx \left[1 \pm \frac{1}{N} \frac{\partial}{\partial x} + \frac{1}{2N^2} \frac{\partial^2}{\partial x ^2} \right]h(x) \end{equation} Substituting Eq (\ref{eq-step-approx}) in Eq (\ref{eq-abb-master}), distributing terms and rearranging, we have \begin{equation*} \begin{split} \frac{\partial P(x,t)}{\partial t} & \approx - \frac{1}{N} \frac{\partial}{\partial x} \left[\left(T^+(x) - T^-(x)\right) P(x,t) \right] + \frac{1}{2N^2} \frac{\partial^2}{\partial x ^2} \left[\left(T^+(x) + T^-(x)\right) P(x,t) \right] \end{split} \end{equation*} To ease the notation, we make the following substitutions \begin{equation} f(x) = T^+(x) - T^-(x) \quad \quad \quad g(x) = \sqrt{T^+(x) + T^-(x)}\\ \label{eq-f-and-g} \end{equation} Next, we rescale time as $t=Nt'$ and drop the prime to obtain \begin{equation} \label{eq-FPE} \frac{\partial P(x,t)}{\partial t} = - \frac{\partial}{\partial x} \left[f(x) P(x,t) \right] + \frac{1}{2N} \frac{\partial^2}{\partial x ^2} \left[g^2(x)P(x,t) \right] \end{equation} This is called the Fokker-Plank equation (FPE). For a given stochastic process, FPE describes the time evolution of the state variable's probability distribution $P(x,t)$. If we wish to analyse individual trajectories, we must construct a stochastic differential equation (SDE) for the state variable. For a given stochastic process, the SDE and FPE are closely related~\cite{van1992book,gardiner1985book}. The {\it Ito sense} SDE corresponding to the the FPE (\ref{eq-FPE}) is given by~\cite{van1992book,gardiner1985book} \begin{equation} \label{eq-sde} \frac{dx}{dt} = f(x) + \frac{1}{\sqrt{N}}g(x) \eta(t) \end{equation} \noindent where $\eta(t)$ is a Gaussian white noise with $\left< \eta(t) \right> = 0$ and $\left<\eta(t)\eta(t') \right> = \delta(t-t').$ Eq~(\ref{eq-sde}) together with Eq~(\ref{eq-f-and-g}) constitute the mesoscopic description of the microscopic stochastic model of our interest. We remark that the stochastic term in this description has two features: First, the noise is multiplicative, i.e. the strength of noise depends on the current value of the state variable $x$. Secondly the strength also depends, inversely, on the system size $N$. \subsection{Steady-states and bifurcation diagram of mesoscopic model} \label{sec-steady-bif} To obtain the steady-state probability distribution function $P_s(x)$, we set $\frac{\partial P_s(x,t)}{\partial t} = 0$ in Eq~(\ref{eq-FPE}). We then solve the resulting ordinary differential equation under the {\it no current} condition at the boundary. This is equivalent to assuming that $\partial_x P(x) \to 0$ as $x \to \infty$ and $P(x) \to 0$ as $x \to \infty$; the latter is a necessary condition for the normalisation of probability density function. This yields \begin{equation} P_s(x) = \frac{1}{Z} \exp(- 2 \, N \, U(x)) \end{equation} \noindent where $U(x)$ is referred to as effective potential and is given by~\cite{horsthemke1984noise} \begin{equation} U(x) = - \int_{x_0}^{x} \frac{f(y) - \frac{1}{N} g(y) g'(y)}{g(y)^2} dy \end{equation} \noindent where $x_0$ is an arbitrary value in the physical domain of the state variable. Bifurcation diagram is typically described for mean-field deterministic systems (but see ~\cite{guttal2007ecomodel}). Here, to obtain the bifurcation diagram of the mesoscopic description which contains the noise term, we identify the extrema of $P_s(x)$. If the extrema correspond to a mode of $P_s$, it corresponds to a most likely state which can be considered equivalent to a stable state with noise. On the other hand, if the extrema is a minima of $P_s$, we argue that it corresponds to an unstable state in a noisy system. We also note the trivial solution $\rho^*=0$ of Eq~(\ref{eq-FPE-model}) is an absorbing state and is also consistent with $\rho^*=0$ being a steady-state solution of the mesoscopic SDE (Eq~\ref{eq-sde_model}). To plot the bifurcation diagram, we plot both the trivial solution and nonzero solutions (extrema of $P_s$) as a function of $p$, for different values of $N$ (Fig~\ref{fig-finite-analytical}). While the above procedure can in principle be done analytically, there may be no closed form solutions for $P_s(x)$. In such cases, one may use numerical integrator schemes and obtain the bifurcation diagram. \subsection{Mesoscopic dynamics (SDE) of our model} \label{sec-sde-pqd} We did not use any specific form for the transition rates in the previous subsection to emphasize the generality of system-size expansion in deriving mesoscopic models. Now, we explicitly write transition rates for the density $\rho$ -- the proportion of occupied sites in the cellular-automaton landscape -- and obtain an SDE for its dynamics. In the limit of a well-mixed system, specifying the transition rates is a straightforward application of the law of mass action: the rate of reaction is proportional to the concentration of the reacting species. Applying this principle, we obtain \begin{equation}\label{eq-transition1} T^+(\rho) = T(\rho + \frac{1}{N}|\rho) = \rho(1-\rho)p + \rho^{2}(1-\rho)q \end{equation} \begin{equation}\label{eq-transition2} T^-(\rho) = T(\rho - \frac{1}{N}|\rho) = \rho(1-\rho)d + \rho^{2}(1-q)d \end{equation} In Eq (\ref{eq-transition1}) we have used the fact that the density can change from $\rho$ to $\rho + \frac{1}{N}$ in two ways: $01 \rightarrow 11$ with a probability $p$ or $011 \rightarrow 111$ with a probability $q$. Similarly, in Eq~(\ref{eq-transition2}) the density can change from $\rho$ to $\rho-\frac{1}{N}$ in two ways: $10 \rightarrow 00$ with a probability $d$ or $11 \rightarrow 01$ with a probability $(1-q)d$. See Appendix~\ref{sec-app-mfa} for further detailed steps on well-mixed or mean-field approximation. We emphasise that reactions $01 \rightarrow 01$ and $01 \rightarrow 10$ have no effect on $\rho$, hence they do not appear in the master equation. Substituting Eq~(\ref{eq-transition1}) and Eq~(\ref{eq-transition2}) in Eq~(\ref{eq-sde}), we obtain the mesoscopic SDE for our model, interpreted in an {\it Ito sense}, \begin{eqnarray} \label{eq-sde_model} \frac{d\rho}{dt} & = & (p-d)\rho - (p-q-qd)\rho^{2} - q\rho^{3} \nonumber \\ & + & \frac{1}{\sqrt{N}} \sqrt{(p+d)\rho -(p-q+qd)\rho^{2} -q\rho^{3}} \, \eta(t) \end{eqnarray} \noindent where $\eta(t)$ is a Gaussian white noise with zero mean and a unit variance. The mesoscopic SDE (\ref{eq-sde_model}) has two terms: The first term is the deterministic part and is same as the mean-field approximation (see Appendix~\ref{sec-app-mfa}). The second term is the stochastic part, where the strength of noise depends on the state of the system ($\rho$) and is inversely related to the system size $N$. Therefore, via Eq~(\ref{eq-sde_model}) we are able to capture the demographic noise -- which arises from stochasticity of birth and death in finite systems. In the next two sections, we analyse two scenarios of the above mesoscopic description. First we analyse the steady-states in the macroscopic limit $N \to \infty$ -- which is same as the mean-field approximation -- and then we analyse the effect of demographic noise for finite $N$. \section{Mean-field approximation shows that positive feedback promotes alternative stable states in infinitely large systems} \label{sec-mft} \begin{figure}[t] \resizebox{1.0\columnwidth}{!}{% \includegraphics{fig-mean-field.pdf} } \caption{\textbf{Mean-field model shows continuous transition (A) or discontinuous transition (B), depending on the value of the positive feedback parameter $q$}. Black, blue and red curves show the three equilibrium densities. Solid lines are the stable states and dotted lines are the unstable states. For low values of positive feedback ($q<q_t$), the system shifts from a vegetated state to a bare state ($\rho=0$) continuously at $p_c=d$. For strong positive feedback ($q>q_t$), two stable states exist for a range of parameter value: $p_{c2}-p_{c1}$. When $p$ is reduced below a threshold ($p_{c_1} = d-\frac{(p_{c_1}-q-qd)^2}{4q}$, hence lower than $d$), the system shifts from a vegetated state to bare state abruptly. The reverse transition occurs at the $p_{c_2}=d$ \textbf{(C)} shows the stability diagram of the mean-field model for all values of $p$ and $q$. Solid line shows the critical thresholds ($p_{c1}$) below which only bare state is stable. Black dot represents the tri-critical point at which the nature of transition changes from continuous to discontinuous. The region between the solid line and the dotted line has two states. Here, $d$ is kept fixed as $0.3$.} \label{fig-mean-field} % \end{figure} Considering the macroscopic limit, i.e. $N \rightarrow \infty$, the stochastic differential equation converges to an ordinary (deterministic) differential equation given by \begin{equation} \frac{d\rho}{dt} = (p-d)\rho - (p-q-qd)\rho^2 - q\rho^3 \label{eq-meanfield} \end{equation} We obtain the equilibria of the mean-field model by setting $d\rho/dt = 0$ and find their stability; we refer the reader to Appendix A for detailed steps. One of the equilibria is a bare state $\rho*=0$. Based on the linear stability analysis~\cite{strogatz1994nonlinear}, we find that the bare state is stable when $p<d$ and is unstable for $p>d$. In other words, when the baseline birth rate $p$ exceeds a critical threshold of $p_c=d$, the system in bare state undergoes a transition to a vegetated state ($\rho^*>0$). % The nature of the transition as a function of $p$, however, depends on the value of the positive feedback parameter $q$. Based on linear stability analysis, we find that the transition from a bare state to a vegetated state, as a function of $p$, is a continuous transition for $0 \le q<\frac{d}{1+d}$, i.e. low values of $q$. In other words, for ecosystems with weak positive interactions, the transition from a vegetated to a bare state is smooth and gradual function of the environmental driver (Fig~\ref{fig-mean-field} A). For systems with strong positive feedback, specifically $q >q_t = \frac{d}{1+d}$, the transition between bare state and the vegetated state is a discontinuous function of $p$ (Fig~\ref{fig-mean-field}B). Here, for a range of driver values $p_{c_1}<p<p_{c_2}$, where $p_{c_1}=d-\frac{(p_{c_1}-q-qd)^2}{4q}$ and $p_{c_2}=d$, we find three equilibria; a stable bare state (solid black line in Fig~\ref{fig-mean-field} B), an unstable intermediate vegetated state (dotted red line in Fig~\ref{fig-mean-field} B) and a stable large vegetated state (solid blue line in Fig~\ref{fig-mean-field} B). The value of parameter $p$ at which the stable and unstable vegetated states meet and cease to exist, denoted $p_{c1}$, is referred to as a saddle-node bifurcation in the non-linear dynamics literature. If a system is in the vegetated state and the driver values reduces below the critical threshold of $p_{c1}$ ($<d$), the system undergoes an abrupt transition from a vegetated state to the bare state. Likewise, when the driver increases above the threshold $p_{c2}=d$, a system in bare state undergoes an abrupt transition to a vegetated state. These transitions are also referred to as abrupt regime shifts, catastrophic shifts, tipping points or critical transitions~\cite{scheffer2001nature,scheffer2009nature}. We also note that the system exhibits hysteresis; i.e. the two abrupt transitions occur at different threshold values of $p$. Furthermore, depending on the initial condition, the system may reach either the bare state or the vegetated state. The threshold value of positive feedback at which the type of transition changes from smooth to abrupt ($q=\frac{d}{1+d}$) is called the tri-critical point. The region of bistability, i.e. the range $p_{c_1}$ to $p_{c_2}$, increases with the strength of positive feedback $q$. Fig \ref{fig-mean-field} C summarises the mean-field predictions of our spatially-explicit stochastic model, as a function of environmental driver (baseline birthrate $p$) and positive feedback parameter ($q$). It shows that vegetated systems with strong positive feedback can survive in harsher environmental conditions (i.e. for lower values of $p$ than the critical threshold of continuous transitions; note that $p_{c1}<d$). However, systems with strong positive feedback are also more prone to collapse as a function of changing environmental conditions. In other words, within the mean-field approximation (i.e. in well-mixed, infinitely large systems), large positive feedback among individuals promotes bistability in ecosystems. The mean-field approximation results and interpretations of our model are consistent with the literature on spatial ecosystem models with positive feedback~\cite{kefi2016can,guichard2003amnat,kefi2007TPB,kefi2014PlosOne}, which often incorporate models of ecosystems with many more parameters (but see~\cite{sankaran2019mee,majumder2019ecology}). We now move onto studying the role of demographic noise. \section{Demographic noise can induce alternative stable states even with weak positive feedback} \label{sec-demo-noise} To investigate the effects of demographic noise induced by finite system-sizes, we first calculate the steady-state probability density function of our mesoscopic model (Eq~(\ref{eq-sde_model})) with $q=0$, i.e in the weak positive feedback limit. To do so, we revert to the corresponding Fokker-Planck equation \begin{equation} \label{eq-FPE-model} \frac{\partial P(\rho,t)}{\partial t} = - \frac{\partial}{\partial \rho} \left[\left((p-d)\rho-p\rho^2\right) P(\rho) \right] + \frac{1}{2N} \frac{\partial^2}{\partial \rho ^2} \left[\left((p+d)\rho-p\rho^2\right) P(\rho) \right] \end{equation} \noindent where the strength of demographic noise is proportional to $\frac{1}{\sqrt{N}}$. Using the method described in Section~\ref{sec-steady-bif}, we compute the steady-state $P_s(\rho)$ and the bifurcation diagram of the mesoscopic model. We find that for finite systems, the transition from vegetated to bare state is discontinuous (Fig~\ref{fig-finite-analytical} A and B). Furthermore, the transition occurs at a threshold value of the driver $p$ which is larger than the mean-field threshold (i.e $p_c>d$), implying that the collapse to bare state occurs in conditions in which larger systems would survive in the vegetated state. Therefore, we predict that small systems may exhibit alternative stable states and abrupt collapse due to demographic noise. As shown in section~\ref{sec-mft}, in the macroscopic limit $N \to \infty$, the SDE converges to mean-field model and the system shows continuous transition from vegetated state to bare state at $p_c=d$ (Fig ~\ref{fig-finite-analytical} C). % \begin{figure}[t] \resizebox{1.0\columnwidth}{!}{% \includegraphics{fig-finite-size.pdf} } \caption{\textbf{Bifurcation diagrams constructed by finding the extrema of the steady-state probability distribution for the FPE of our model shows that finite systems undergo abrupt shifts.} Solid lines are the stable states and dotted lines are the unstable states in the stochastic model. The steady-states are derived from the FPE with $q=0$. (A) and (B) show that finite systems have alternative stable states and they show abrupt transition. The bifurcation diagram converges to the mean-field bifurcation diagram as $N \rightarrow \infty$ as shown in (C). Here, $d=0.3$ and $q=0$.} \label{fig-finite-analytical} % \end{figure} To verify if these predictions hold true in spatially-explicit systems, we conducted extensive numerical simulations of our spatially-explicit individual-based model using the stochastic update rules described in Section~\ref{sec-model}. We display the results in Fig.~\ref{fig-num-sim}. For all parameter values (except for $p>0.65$ in $L=512$, where we simulated 10000 time steps to reach steady-state), we run the simulation for 1 million time steps so that the system reaches a steady-state. We chose four system sizes: $16 \times 16, 32 \times 32$, $128 \times 128$ and $512 \times 512$ for the purpose of illustration in Figure~\ref{fig-num-sim}. For the system size $16 \times 16$, for each value of $p$ we construct a normalized steady-state frequency distribution of density, denoted $f(\rho)$, based on 10,000 independent realizations (Fig~\ref{fig-num-sim} A). For $128 \times 128$, due to computational constraints, we calculate $f(\rho)$ based on 100 realisations only (Fig~\ref{fig-num-sim} B). We then calculate the `bifurcation diagram' for $L = 16$ (Fig~\ref{fig-num-sim} C), $32$ (Fig~\ref{fig-num-sim} D), $128$ (Fig~\ref{fig-num-sim} E), $512$ (Fig~\ref{fig-num-sim} F) based respectively on 10000, 2000, 100 and 100 realisations as follows: for each $p$, the upper arm was constructed by culling the realizations that fell into the absorbing phase ($\rho^{*}=0$) and calculating the mean of the densities of the remaining realisations. The lower arm $(\rho^{*}=0)$ was plotted if at least one realization with $\rho^{*}=0$ was reported. This method gives a well defined bi-stable region for each $L.$ Indeed, we confirm the qualitative predictions: small systems which have higher demographic noise exhibit bimodal frequency distribution of steady-state density~(\ref{fig-num-sim}A, C, D) and thus may undergo abrupt transitions from a vegetated state to a bare state. Furthermore, we confirm the analytical prediction that smaller system sizes undergo abrupt transition from the vegetated to bare state at larger values of the driver $p$ in comparison to the macroscopic limit (Fig~\ref{fig-num-sim}C-E). We also find that the region of bistability reduces with increasing system size (Fig~\ref{fig-num-sim}C-D). Finally, larger systems are likely to undergo continuous transitions (\ref{fig-num-sim}B, F). \begin{figure}[t] \resizebox{1.0\columnwidth}{!}{% \includegraphics{fig-num-sim.pdf} } \caption{\textbf{Numerical simulations of the spatially-explicit individual-based model confirm bistability for finite-size systems.} \textbf{(A)} Region between $p=0.45$ to $p=0.5$ shows bi-modality. Further, a range of densities with zero-probability of occurrence is evident between the non-zero mode and the mode at zero. \textbf{(B)} \textbf{$L=128.$} There is no sign of bi-modality and the transition from $\rho^{*}=0$ to $\rho^{*}>0$ is much smoother. \textbf{(C), (D), (E)} and \textbf{(F)} show ``bifurcation diagrams" constructed from numerical simulations for different system sizes in two dimensions.} \label{fig-num-sim} % \end{figure} \section{Discussion} \label{sec-disc} In this study, we used a spatially-explicit individual-based model to investigate the role of demographic stochasticity in ecological transitions. Using analytical methods and numerical simulations, we showed that demographic noise in finite systems can cause bistability and abrupt transitions even with weak positive feedback mechanisms. In other words, we predict that smaller ecosystems can undergo abrupt regime shifts even when larger ecosystems will survive under the same environmental conditions. Our conclusions are broadly consistent with the results in the ecology literature, which has extensively looked at the role of stochasticity in population extinctions. Specifically, these studies conclude that demographic stochasticity can induce Allee-like effects, in which populations smaller than a threshold size are likely to go to extinction~\cite{dennis2002allee,lande1998demographic,ovaskainen2010stochastic}. However, these studies take phenomenological mean-field approaches, i.e. they construct the deterministic and stochastic terms of the dynamics using phenomenological heuristic. In contrast, we begin with a spatially-explicit individual-based model with stochastic update rules. We then derive, using the method of system size expansion, how these microscopic update rules scale to mesoscopic dynamics of the population. This allowed us to explicitly capture the effect of finite system size in the stochastic term. Our derivations show that the stochastic term is a multiplicative noise term, depending on both the state variable density ($\rho$) and the system size ($N$); this is of the form $\frac{1}{\sqrt{N}}\sqrt{\rho + \mathcal{O}(\rho^2)}$. However, most previous studies include the density effects via a $\sqrt{\rho}$ term alone \cite{weissmann2014stochastic,butler2009PNAS,dOdorico2005PNAS,mankin2002PRE,mankin2004PRE} and do not consider the effect of system size. Therefore, we argue our bottom-up approach helps in calculating the precise structure of demographic noise from the individual-based rules. Some recent studies of ecosystem transitions use phenomenological spatial models with demographic stochasticity \cite{weissmann2014stochastic,martin2015PNAS,butler2009PNAS}. These models analyse the combined effects of spatial interactions (via a diffusion term) and the demographic noise (assumed to be proportional to $\sqrt{\rho}$). By including both spatial interactions and demographic noise in the models, they find that demographic noise smoothens ecosystem transitions. However, these studies do not disentangle the effect of spatial interactions from the effect of demographic noise. Using our approach, by ignoring the spatial fluctuations in our approximations, we can disentangle the effect of demographic noise and spatial interactions. We conjecture that while demographic noise makes the system prone to abrupt transitions, spatial interactions can smoothen these transitions (as supported by pair approximation calculations in Appendix~\ref{sec-app-pair}). Another form of stochasticity, environmental noise, is also very important for determining ecosystem dynamics. Many studies have shown that large environmental noise can induce abrupt transitions in ecosystems even before critical thresholds \cite{guttal2007ecomodel,chen2018amnat,siteur2016oikos,ashwin2012tipping}. However, in some cases~\cite{dOdorico2005PNAS} environmental fluctuations can change the stability landscape and induce resilience. The combined effect of demographic noise and environmental noise needs to be carefully investigated to obtain insights for the management of ecosystems. In conclusion, we show that even with limited positive feedback, finite systems can undergo discontinuous transitions. These findings can help us understand mechanisms of abrupt transitions in ecosystems. Ecological systems are finite in extent and are getting fragmented because of human activities. We predict that fragmented ecosystems are more sensitive to changes in external conditions than larger systems. A plethora of recent studies have investigated the possibility of forecasting abrupt transitions, using the idea of early warning signals~\cite{sharma2015theoeco,sarkar2020,scheffer2009nature,dakos2010TheorEco,guttal2008EcoLet,guttal2009TheorEco,carpenter2006EcoLet,carpenter2010ecosphere,dai2012science,eby2017GEB,barbier2006self,guttal2016PlosOne,lenton2011early,burthe2016early}. This begs an obvious question - are there early warning signals of transitions in systems with demographic noise? We suggest that researchers may investigate this and other related questions in the future. \section{Acknowledgements} VG acknowledges support from DBT-IISc partnership program and DST-FIST. SM, AD and SS acknowledge scholarship support from MHRD. \section{Codes} Codes and data available at \url{https://github.com/tee-lab/demographic_noise} \begin{appendices} \section{Mean-field Approximation}\label{sec-app-mfa} To write the mean-field equation for the dynamics of the model, we assume infinite size and no spatial structure in the ecosystem, meaning each site in the system is equally likely to be occupied. The probability of any site being occupied is same as the global occupancy. Therefore, the transition rates in this model are as follows. Transition rate for a site to change from 1 to 0 : $$ \omega(1 \rightarrow 0) = d (1-\rho) + (1-q)d\rho $$ (Here d is the death rate, not the symbol for a differential). Similarly, transition rate from 0 to 1: $$ \omega(0 \rightarrow 1) = p \rho + q\rho^2 $$ Probability of finding a site in occupied(1) state : $P(1)=\rho$ and probability of finding a site in state in empty(0) site: $P(0)=(1-\rho)$ The master equation can then be written as: $$\frac{dP(1)}{dt} = \omega(0 \rightarrow 1)P(0) - \omega(1 \rightarrow 0) P(1)$$ Substituting the above transition rates, \begin{equation} \frac{d\rho}{dt}= f(\rho) = (p-d)\rho - (p-q-qd)\rho^2 - q\rho^3 \label{meanfield} \end{equation} For simplicity, the above equation can be written in terms of $a$, $b$ and $c$ as: \begin{equation} f(\rho) = a\rho - b\rho^2 - c\rho^3 \label{simplemeanfield} \end{equation} where $a=p-d$, $b=p-q-qd$ and $c=q$. At equilibrium, $\frac{d\rho}{dt}=0$. This gives the following equilibria: $$\rho\text{*}=0 ,\text{ } \rho\text{*} = -\frac{b}{2c}+\sqrt[]{\frac{b^2}{4c^2} + \frac{a}{c}}\text{ and } \rho\text{*} = -\frac{b}{2c}-\sqrt[]{\frac{b^2}{4c^2} + \frac{a}{c}} $$ We call these solutions as $\rho_0$ , $\rho_A$ and $\rho_B$ respectively. For the above equilibria to be stable, $f'(\rho\text{*})<0$. From (\ref{simplemeanfield}), we get: \begin{equation} f'(\rho) = a\rho - b \rho^{2} -c \rho^{3} \end{equation} $$f'(\rho)|_{\rho_0} = a $$ $$f'(\rho)|_{\rho_A} = -2a - \frac{b^2}{2c} + b \sqrt[]{\frac{a}{c}+ \frac{b^2}{4c^2}} $$ $$f'(\rho)|_{\rho_B} = -2a - \frac{b^2}{2c} - b \sqrt[]{\frac{a}{c}+ \frac{b^2}{4c^2}} $$ In this analyses, we consider $c>0$ because $c=q$ in our model which is a probability. From the above three equilibrium densities, only real and positive solutions are realistic. Therefore, we will reject the negative solutions. For the non-zero solutions to be real, $a>-\frac{b^2}{4c}$ \subsection*{Case 1: $b>0$} In this parameter region, given $a>-\frac{b^2}{4c}$, $\rho_B$ is always negative. Therefore, the mean-field equation has only two solutions $\rho_0$, which is stable for $a<0$ and $\rho_A$, which is stable for $a>0$. At $a=0$, $\rho_A = 0$ and it increases monotonically after that. The mean-field system undergoes a continuous transition (also called second-order transition or trans-critical bifurcation) at a critical point $a=0$ for all values of $b>0$. \subsection*{Case 2: $b<0$} In this parameter regime, $\rho_0$ is stable for $a<0$ and unstable for $a>0$. $\rho_B$ is real and positive only when $\frac{-b^2}{4c} < a < 0$ and it is unstable in this regime. $\rho_A$ is stable for $ a \geq \frac{-b^2}{4c}$. At $ a = \frac{-b^2}{4c}$, $\rho_A = \frac{|b|}{2c}$. The mean-field system shows a saddle-node bifurcation at the point $(a,\rho^*) = (\frac{-b^2}{4c}, \frac{|b|}{2c})$. The transition from an active phase (vegetated state) to absorbing phase (bare state) is discontinuous. In the mean-field approximation, our model undergoes a continuous transition when $b>0$ and a discontinuous transition when $b<0$. The system has a tri-critical point at $a=0, b=0$ where the nature of transition changes from continuous to discontinuous. Now, translating it back to our system (Eq~(\ref{meanfield})) with parameters $p,q$ and $d$,the tri-critical point occurs at $p_t=d$ and $q_t=\frac{d}{1+d}$. For $q<q_t$, continuous phase transition occurs at $p_c=d$. However, the critical point ($p_{c_1}$) decreases as a function of $q$ when $q>q_t$. Therefore, in discontinuous regime, the vegetated state can sustain harsher conditions represented by low values of $p$ when strength of positive feedback among plants is high. However, when the external conditions pass a threshold, the system collapses abruptly to the bare state. \section{Pair Approximation}\label{sec-app-pair} In the mean-field approximation, we assumed that each site on the lattice has equal probability of being occupied by a plant and that there are no spatial fluctuations in the system. We now incorporate the local spatial effects in the master equation. We assume that the probability of occupancy of a site depends on the state of its nearest neighbours. Therefore, we introduce conditional probability $q_{i|j}$ defined as probability that a site is in state $i$ given its nearest neighbour is in state $j$. In this approximation we have singlet density $\rho_1$ (same as mean-field approximation) and an additional doublet density ($\rho_{ij}$) defined as the probability of a site being in state $i$ and its neighbour being in state $j$. The pair $ij$ has the following properties in this approximation. \begin{equation} \rho_{ij} = \rho_{ji} \\ \quad \quad \quad \quad \rho_{ij} = \rho_i~q_{j|i} \\ \quad \quad \quad \quad q_{j|i} = 1- q_{i|i} \label{eq-pair-prop} \end{equation} Note that $i$ and $j$ can be 0 or 1. For singlet density ($\rho_1$), the master equation can be written as: \begin{equation} \frac{d\rho_1}{dt} = \omega(0 \rightarrow 1)\rho_0 - \omega(1 \rightarrow 0) \rho_1 \label{eq-pair-singlet-master} \end{equation} The transition rates $\omega(0 \rightarrow 1)$ and $\omega(1 \rightarrow 0)$ are defined as follows: \begin{equation} \omega(0 \rightarrow 1)= p~q_{1|0} + q~q_{1|0}~q_{1|1} \\ \quad \quad \text{and} \quad \quad \omega(1 \rightarrow 0) = d~q_{0|1} - (1-q)~d~q_{1|1} \label{eq-pair-trans-prob} \end{equation} Here $p$ is the baseline birth probability, $q$ is the positive feedback parameter and $d$ is the death probability. Substituting Eq (\ref{eq-pair-trans-prob}) in Eq (\ref{eq-pair-singlet-master}) and using the fact that $\rho_{ij} = \rho_{ji}$ and $\rho_{ij} = \rho_i~q_{j|i}$ (Eq~(\ref{eq-pair-prop})) we obtain the following form for the master equation \begin{equation} \frac{d\rho_1}{dt} = \left\lbrace p~q_{0|1} + q~q_{1|1}~q_{0|1} - d~q_{0|1} - (1-q)~d~q_{1|1} \right\rbrace \rho_1 \label{eq-pair-master-long-singlet} \end{equation} Similarly, for the doublet density ($\rho_{11}$), the master equation can be written as \begin{equation} \begin{split} \frac{d\rho_{11}}{dt} &= \omega(10 \rightarrow 11)\rho_{10} + \omega(01 \rightarrow 11)\rho_{01} - \omega(11 \rightarrow 01)\rho_{11} - \omega(11 \rightarrow 10)\rho_{11}\\ &=2 \lbrace \omega(10 \rightarrow 11)\rho_{10}\rbrace - 2 \lbrace \omega(11 \rightarrow 10)\rho_{11}\rbrace \end{split} \label{eq-pair-doublet-master} \end{equation} The transition rate $\omega(10 \rightarrow 11)$ is defined as \begin{equation} \omega(10 \rightarrow 11) = \frac{1}{z}~p + \frac{z-1}{z}~p~q_{1|0} + \frac{1}{z}~q~q_{1|1} + \frac{z-1}{z}~q~q_{1|0}~q_{1|1} \label{eq-pair-10-11} \end{equation} Here $z$ is the number of nearest neighbours. The first term represents the rate of the event in which the $1$ in the pair $10$ reproduces at $0$ with probability $p$. The second term represents the rate of the event in which a neighbour of $0$ in the pair $10$ other than the $1$ in the pair is also $1$ (we call such neighbours as \textit{non-pair neighbours}; this occurs with probability $q_{1|0}$) \textit{and} it reproduces at $0$ with probability $p.$ The next two terms represent the growth rate due to positive feedback. The third term represents the event in which a non-pair neighbour of the $1$ in $10$ is also occupied (this occurs with probability $q_{1|1}$) \textit{and} a birth occurs with enhanced probability $q$ at $0$ of the pair. The last term represents the event in which a non-pair neighbour of the $0$ in $10$ is occupied (this occurs with probability $q_{1|0}$) \textit{and} its next neighbour is also occupied (this occurs with probability $q_{1|1}$) \textit{and} a birth occurs at the $0$ of the pair with enhanced probability $q$. Similarly, we define the transition rate $\omega(11 \rightarrow 10)$ as \begin{equation} \omega(11 \rightarrow 10) = \frac{1}{z}(1-q)~d + \frac{z-1}{z}(1-q)~d~q_{1|1} + \frac{z-1}{z}d~q_{0|1} \label{eq-pair-11-10} \end{equation} The first term represents the rate of the event in which a $1$ in the pair $11$ dies with a diminished probability $(1-q)d$ due to the facilitative interaction with the other $1$ of the pair. The second term represents the rate of the event in which a non-pair neighbour of $1$ in the pair $11$ (which we call \textit{focal} to distinguish it from the other $1$ of the pair) is occupied (this occurs with probability $q_{1|1}$) \textit{and} the \textit{focal} $1$ dies with a diminished probability $(1-q)d$ due to the facilitative interaction with this non-pair neighbour. The third term represents the rate of the event in which a non-pair neighbour of the \textit{focal} $1$, is $0$ (this occurs with probability $q_{0|1}$) \textit{and} the focal $1$ dies with probability $d.$ Substituting Eq (\ref{eq-pair-10-11}) and Eq (\ref{eq-pair-11-10}) in Eq (\ref{eq-pair-doublet-master}), the master equation for the doublet density takes the following form \begin{equation} \begin{split} \frac{d\rho_{11}}{dt} &= 2 \left\lbrace \textmd{ } \lbrace \frac{1}{z} p +\frac{z-1}{z} p~q_{1|0} + \frac{1}{z} q~q_{1|1} + \frac{z-1}{z} q~q_{1|0}~q_{1|1} \rbrace \textmd{ } \rho_{10} \right\rbrace \\ &-2\left\lbrace \lbrace \frac{1}{z}(1-q)~d + \frac{z-1}{z}(1-q)~d~q_{1|1} + \frac{z-1}{z}d~q_{0|1}\rbrace \textmd{ } \rho_{11} \right\rbrace \end{split} \label{eq-pair-master-long-doublet} \end{equation} We are interested in two dimensional landscapes modelled by a square lattice. We use a von-Newmann neighbourhood $(z=4)$ in all our analyses. Note that using the properties in Eq (\ref{eq-pair-prop}), we may write $\rho_{10}=(q_{0|1}/q_{1|1})\rho_{11}.$ Further, we may write $q_{1|1}=1-q_{0|1}.$ Substituting these in Eq (\ref{eq-pair-master-long-singlet}) and Eq (\ref{eq-pair-master-long-doublet}) we obtain \begin{equation*} \frac{d\rho_1}{dt} = M_1 \rho_1 \\ \quad \quad \quad \frac{d\rho_{11}}{dt} = M_{11} \rho_{11} \end{equation*} $M_{1}$ and $M_{11}$ are defined as follows \begin{equation} M_1 = p~q_{0|1} + q~(1-q_{0|1})~q_{0|1} - d~q_{0|1} - (1-q)d~(1-q_{0|1}) \label{eq-pair-M1} \end{equation} \begin{equation} \begin{split} M_{11} &= 2 \left(~\frac{1}{4}~p~\frac{q_{0|1}}{(1-q_{0|1})} + \frac{3}{4} p~q_{1|0}~\frac{q_{0|1}}{(1-q_{0|1})} + \frac{1}{4} q~q_{0|1} +\frac{3}{4} q~q_{1|0}~q_{0|1} \right)\\ &- 2 \left(~\frac{1}{4}(1-q)~d + \frac{3}{4} (1-q)~d~(1-q_{0|1})+ \frac{3}{4} q_{0|1}~d ~\right) \end{split} \label{eq-pair-M11} \end{equation} $\rho_1 = 0$ and $\rho_{11}=0$ give the trivial equilibria. In addition, $M_1 = 0$ and $M_{11}= 0$ provide other equilibria of the system. To ease the notation, we substitute $q_{0|1}={\bf a}$ in Eq (\ref{eq-pair-M1}), set $M_{1}=0$ and simplify to obtain a quadratic equation in $\bf a$ \begin{equation} q {\bf a^2} - \left[ p + q(1-d) \right] {\bf a} + d(1-q) = 0 \label{eq-pair-a} \end{equation} Assuming $q \neq 0$, the two solutions ${\bf a_+} $ and ${\bf a_-}$ are: \begin{equation} {\bf a_+} = \frac{p + q(1-d) + \sqrt{ \left[p+q(1-d)\right]^2 - 4q(1-q)d }}{2q} \label{eq-pair-solutiona+} \end{equation} \begin{equation} {\bf a_-} = \frac{p + q(1-d) - \sqrt{ \left[p+q(1-d)\right]^2 - 4q(1-q)d }}{2q} \label{eq-pair-solutiona-} \end{equation} Now, we substitute $q_{0|1}={\bf a}$ and $q_{1|0} = {\bf b}$ in Eq (\ref{eq-pair-M11}), set $M_{11}=0$ and simplify to obtain a solution for $\bf b$ assuming $3 \mathbf{a} [p + q(1- \mathbf{a})] \neq 0$ \begin{equation} \mathbf{b} = \frac{ (1-\mathbf{a})\lbrace{(1-q)d\left[1+3(1-\mathbf{a})\right] + \mathbf{a}\left(3d-q\right) \rbrace} - p\mathbf{a}}{3 \mathbf{a} [p + q(1- \mathbf{a})]} \label{eq-pair-solutionb} \end{equation} Density ($\rho_1$) can be calculated from $q_{0|1}$ and $q_{1|0}$ as following $$ \rho_1 = \frac{\rho_{10}}{q_{0|1}} = \frac{\rho_{01}}{q_{0|1}} = \frac{\rho_0~q_{1|0}}{q_{0|1}} $$ $$ \rho_1~q_{0|1} = (1-\rho_1)~q_{1|0} $$ \begin{equation} \rho_1 = \frac{q_{1|0}}{q_{0|1}+q_{1|0}} = \frac{{\bf b}}{{\bf a}+\bf{b}} \label{eq-pair-rho-from-ab} \end{equation} Therefore, the steady-state density can be calculated from Eq (\ref{eq-pair-rho-from-ab}) where {\bf a} and {\bf b} can be obtained from Eq (\ref{eq-pair-solutiona+}), Eq (\ref{eq-pair-solutiona-}) and Eq (\ref{eq-pair-solutionb}). \subsection*{Case 1: No positive feedback ($q=0$)} The master equation for the singlet and doublet density reduces to the contact process when $q=0$ \cite{matsuda1992PTP}. We know that the contact process model undergoes a continuous phase transition~\cite{marro2005nonequilibrium}, where density of active cells (vegetation density in our case) decreases to zero continuously. Therefore, at the critical point ($p_c$), the density ($\rho_1$) goes to zero. Substituting $q=0$ and $p=p_{c}$ in Eq (\ref{eq-pair-a}) $$ -p_c {\bf a} + d = 0 \implies {\bf a} = \frac{d}{p_c} $$ Because $\rho_1 = 0$ at $p=p_{c}$, Eq (\ref{eq-pair-rho-from-ab}) implies ${\bf b} = 0.$ Substituting $q=0$, $p=p_{c}$, $\mathbf{a}=d/p_{c}$ and $\mathbf{b}=0$ in Eq (\ref{eq-pair-solutionb}), assuming $d \neq 0$ and simplifying we get \begin{equation} p_{c} = \frac{4}{3}d \label{eq-pair-p-c-contact-process} \end{equation} Thus, given that the contact process exhibits a continuous phase transition, the pair approximation predicts a critical point $p_c=\frac{4d}{3}.$ This result is consistent with the results of ~\cite{matsuda1992PTP}. \subsection*{Case 2: With positive feedback ($q>0$)} Now, we investigate the role of positive feedback on phase transition in our model. For $q>0$, $\mathbf a$ will have two solutions given by Eq (\ref{eq-pair-solutiona+}) and Eq (\ref{eq-pair-solutiona-}). Therefore, substituting these in Eq (\ref{eq-pair-solutionb}) to obtain $\mathbf{b}$ and then substituting $\mathbf{a}$ and $\mathbf{b}$ in Eq (\ref{eq-pair-rho-from-ab}), vegetation density will have two non-zero values for some values of $p$ and $d$. From mean-field approximation, we know that one of these solutions is stable and the other is unstable. The region in parameter space where these two solutions (one stable and one unstable) coexist and are positive will show the discontinuous transition. Indeed for a fixed $d=0.3$, the system shows continuous transition for low values of $q$ and discontinuous transition for high values of $q$. We define the critical point $p=p_{c}$ as the point where vegetation density drops to zero. At the critical point for discontinuous transition, two non-zero solutions of $\rho_1$ (one stable and one unstable) meet. This occurs where determinant in Eq (\ref{eq-pair-solutiona+}) or Eq (\ref{eq-pair-solutiona-}) vanishes. $$ \left[p_c +q(1-d)\right]^2 - 4q(1-q)d = 0 $$ Since $p_c, q$ and $d$ are non-negative, we have $$ p_c = \sqrt{4q(1-q)d} - (1-d)q $$ At the tri-critical point ($q=q_t$), the transition changes from continuous to discontinuous (see \ref{fig-pair-approx}). Therefore, at this point, the critical density (defined as the density at which transition occurs) is zero. Substituting these values in Eq (\ref{eq-pair-solutionb}) for $d=0.3$, we get, $ (p_t,q_t)=(0.27,0.36) $. In the continuous transition regime ($q<q_t$), unlike the mean-field approximation, critical point decreases as a function of $q$. This shows that in our model, positive feedback in the systems with local spatial interactions helps the system sustain its vegetated state in harsh conditions which are represented as low values of $p$. Note that we did not perform stability analysis for this model. However, it is reasonable to assume that the stability of the equilibria will remain the same as the mean-field model. The bifurcation diagram obtained by the pair approximation is shown in Fig \ref{fig-pair-approx}. It is qualitatively same as the output of mean-field model. However, it is clear that the vegetated state is sustained for harsher conditions because there is a reduction in the area of the bare state region. The region of bistability is also reduced in this approximation. Therefore, it can be concluded that local spatial interactions increase the resilience of the system as compared to well-mixed system. This effect of local spatial interactions is the opposite of the effect of the demographic noise as shown in Fig~\ref{fig-finite-analytical}. The real system with both the local interactions and finite-size can show the dynamics resulting from the interplay between these two effects. \begin{figure} \resizebox{1\columnwidth}{!}{% \includegraphics{fig-pair-approx.pdf} } \caption{\textbf{Bifurcation diagram obtained by pair approximation analysis.} (A) and (B) show the continuous and discontinuous transitions at $q<q_t$ and $q>q_t$ respectively. (C) is the full phase diagram as a function of $q$ and $p$.The black dot represents the tri-critical point $q=q_t$ at which the nature of transition changes from continuous to discontinuous. The region between solid and dotted black lines is the bistable region }. \label{fig-pair-approx} % \end{figure} \end{appendices} \clearpage
\section{Introduction} \label{sec:intro} \begin{figure*}[t] \centering \includegraphics[width=0.9\textwidth]{figures/graph_full.png} \caption{Random architectures aggregate ensembles of paths. This creates a variety of receptive fields (effective neighborhood sizes on the domain graph) that are combined to compute the output. Figure shows the domain graph where nodes are colored (red means high weight, blue low weight) according to the receptive field weighted by the path distribution of a domain node. The receptive field is shown at all the architecture nodes directly contributing to the output. Histograms represent the distribution of path lengths from source to architecture node.} \label{fig:full} \end{figure*} Data defined over the nodes of graphs are ubiquitous. Social network profiles \cite{hamilton2017inductive}, molecular interactions \cite{duvenaud2015convolutional}, citation networks \cite{sen2008collective}, 3D point clouds \cite{simonovsky2017dynamic} are just examples of a wide variety of data types where describing the domain as a graph allows to encode constraints and patterns among the data points. Exploiting the graph structure is crucial in order to extract powerful representations of the data. However, this is not a trivial task and only recently graph neural networks (GNNs) have started showing promising approaches to the problem. GNNs \cite{wu2020comprehensive} extend the deep learning toolbox to deal with the irregularity of the graph domain. Much of the work has been focused on defining a graph convolution operation \cite{bronstein2017geometric}, i.e., a layer that is well-defined over the graph domain but also retains some of the key properties of convolution such as weight reuse and locality. A wide variety of such graph convolution operators has been defined over the years, mostly based on neighborhood aggregation schemes where the features of a node are transformed by processing the features of its neighbors. Such schemes have been shown to be as powerful as the Weisfeiler-Lehman graph isomorphism test \cite{weisfeiler,xu2018powerful}, enabling them to simultaneuosly learn data features and graph topology. However, contrary to classic literature on CNNs, few works \cite{li2019deepgcnsjournal,dehmamy2019understanding,xu2018representation,dwivedi2020benchmarking} addressed GNNs architectures and their role in extracting powerful representations. Several works, starting with the early GCN \cite{kipf2016semi}, noticed an inability to build deep GNNs, often resulting in worse performance than that of methods that disregard the graph domain, when trying to build anything but very shallow networks. This calls for exploring whether advances on CNN architectures can be translated to the GNN space, while understanding the potentially different needs of graph representation learning. Li et al. \cite{li2019deepgcns} suggest that GCNs suffer from oversmoothing as several layers are stacked, resulting in the extraction of mostly low-frequency features. This is related to the lack of self-loop information in this specific graph convolution. It is suggested that ResNet-like architectures mitigate the problem as the skip connections supply high frequency contributions. Xu et al. \cite{xu2018representation} point out that the size of the receptive field of a node, i.e., which nodes contribute to the features of the node under consideration, plays a crucial role, but it can vary widely depending on the graph and too large receptive fields may actually harm performance. They conclude that for graph-based problems it would be optimal to learn how to adaptively merge contributions from receptive fields of multiple size. For this reason they propose an architecture where each layer has a skip connection to the output so that contributions at multiple depths (hence sizes of receptive fields) can be merged. Nonetheless, the problem of finding methods for effectively increasing the capacity of graph neural networks is still standing, since stacking many layers has been proven to provide limited improvements \cite{li2019deepgcns, oono2019graph, alon2020bottleneck, nt2019revisiting}. In this paper, we argue that the recently proposed randomly wired architectures \cite{xie2019exploring} are ideal for GNNs. In a randomly wired architecture, ``layers'' are arranged according to a random directed acyclic graph and data are propagated through the paths towards the output. Such architecture is ideal for GNNs because it realizes the intuition of \cite{xu2018representation} of being able of merging receptive fields of varied size. Indeed, the randomly wired GNNs (RAN-GNNs) can be seen as an extreme generalization of their jumping network approach where layer outputs can not only jump to the network output but to other layers as well, continuously merging receptive fields. Hence, randomly wired architectures provide a way of effectively scaling up GNNs, mitigating the depth problem and creating richer representations. Fig. \ref{fig:full} shows a graphical representation of this concept by highlighting the six layers directly contributing to the output, having different receptive fields induced by the distribution of paths from the input. Our novel contributions can be summarized as follows: i) we are the first to analyze randomly wired architectures and show that they are generalizations of ResNets when looked at as ensembles of paths \cite{veit2016residual}; ii) we show that path ensembling allows to merge receptive fields of varied size and that it can do so \textit{adaptively}, i.e., trainable weights on the architecture edges can tune the desired size of the receptive fields to be merged to achieve an optimal configuration for the problem; iii) we introduce improvements to the basic design of randomly wired architectures by optionally embedding a path that sequentially goes through all layers in order to promote larger receptive fields when needed, and by presenting MonteCarlo DropPath, which decorrelates path contributions by randomly dropping architecture edges; iv) we provide extensive experimental evidence, using recently introduced benchmarking frameworks \cite{dwivedi2020benchmarking, hu2020ogb} to ensure significance and reproducibility, that randomly wired architectures consistently outperform ResNets, often by large margins, for four of the most popular graph convolution definitions on multiple tasks. \section{Background} \subsection{Graph Neural Networks} A major shortcoming of CNNs is that they are unable to process data defined on irregular domains. In particular, one case that is drawing attention is when the data structure can be described by a graph and the data are defined as vectors on the graph nodes. This setting can be found in many applications, including 3D point clouds \cite{wang2019dynamic,valsesia2018learning}, computational biology \cite{alipanahi2015predicting, duvenaud2015convolutional}, and social networks \cite{kipf2016semi}. However, extending CNNs from data with a regular structure, such as images and video, to graph-structured data is not straightforward if one wants to preserve useful properties such as locality and weight reuse. GNNs redefine the convolution operation so that the new layer definition can be used on domains described by graphs. The most widely adopted graph convolutions in the literature rely on message passing, where a weighted aggregation of the feature vectors in a neighborhood is computed. The GCN \cite{kipf2016semi} is arguably the simplest definition, applying the same linear transformation to all the node features, followed by neighborhood aggregation and non-linear activation: \begin{align*} \mathbf{h}^{(l+1)}_i = \sigma\left( \frac{1}{\vert \mathcal{N}_i \vert} \sum_{j \in \mathcal{N}_i} \mathbf{W}\mathbf{h}^{(l)}_j \right). \end{align*} Variants of this definition have been developed, e.g., GraphSage \cite{hamilton2017inductive} concatenates the feature vector of node $i$ to the feature vectors of its neighbors, so that self-information can also be exploited; GIN \cite{xu2018powerful} uses a multilayer perceptron instead of a linear transform, replaces average with sum to ensure injectivity and proposes a different way of computing the output by using all the feature vectors produced by the intermediate layers. These definitions are all isotropic because they treat every edge in the same way. It has been observed that better representation capacity can be achieved using anistropic definitions, where every edge can have a different transformation, at the cost of increased computational complexity. The Gated GCN \cite{bresson2017residual} and GAT \cite{velivckovic2017graph} definitions fall in this category. \subsection{Randomly wired architectures} In recent work, Xie et al. \cite{xie2019exploring} explore whether it is possible to avoid handcrafted design of neural network architectures and, at the same time, avoid expensive neural architecture search methods \cite{elsken2019neural}, by designing random architecture generators. They show that ``layers'' performing convolution, normalization and non-linear activation can be connected in a random architecture graph. Strong performance is observed on the traditional image classification task by outperforming state-of-the-art architectures. The authors conjecture that random architectures generalize ResNets and similar constructions, but the underlying principles of their excellent performance are unclear, as well as whether the performance translates to tasks other than image recognition or to operations other than convolution on grids. \section{Randomly wired GNNs} In this section, we first introduce randomly wired graph neural networks (RAN-GNNs) and the notation we are going to use. We then analyze their behavior when viewed as ensembles of paths. \begin{figure} \centering \includegraphics[width=0.25\textwidth]{figures/arch_node.pdf} \caption{An architecture node is equivalent to a GNN layer.} \label{fig:architecture_node} \end{figure} A randomly wired architecture consists of a directed acyclic graph (DAG) connecting a source architecture node, which is fed with the input data, to a sink architecture node. One should not confuse the architecture DAG with the graph representing the GNN domain: to avoid any source of confusion we will use the terms \textit{architecture nodes} (edges) and \textit{domain nodes} (edges), respectively. A domain node is a node of the graph that is fed as input to the GNN. An architecture node is effectively a GNN layer performing the following operations (Fig. \ref{fig:architecture_node}): i) aggregation of the inputs from other architecture nodes via a weighted sum as in \cite{xie2019exploring}: \begin{align} \mathbf{h}^{(i)} = \sum_{j \in \mathcal{A}_i} \omega_{ij} \mathbf{h}^{(j)} = \sum_{j \in \mathcal{A}_i} \sigma(w_{ij}) \mathbf{h}^{(j)} , \quad i=1,...,L-1 \label{eq:aggr} \end{align} being $\sigma$ a sigmoid function, $\mathcal{A}_i$ the set of direct predecessors of the architecture node $i$, and $w_{ij}$ a scalar trainable weight; ii) a non-linear activation; iii) a graph-convolution operation (without output activation); iv) batch normalization. The architecture DAG is generated using a random graph generator. In this paper, we will focus on the Erd\H{o}s-Renyi model where the adjacency matrix of the DAG is a strictly upper triangular matrix with entries being realizations of a Bernoulli random variable with probability $p$. If multiple input architecture nodes are randomly generated, they are all wired to a single global input. Multiple output architecture nodes are averaged to obtain a global output. Other random generators may be used, e.g., small-world and scale-free random networks have been studied in \cite{xie2019exploring}. However, a different generator will display a different behavior concerning the properties we study in Sec. \ref{sec:gradient_analysis}. \subsection{Randomly wired architectures behave like path ensembles} \label{sec:gradient_analysis} It has already been shown that ResNets behave like ensembles of relatively shallow networks, where one can see the ResNet architecture as a collection of paths of varied lengths \cite{veit2016residual}. More specifically, in a ResNet with $n$ layers, where all layers have a skip connection except the first one and the last one, there are exactly $2^{L-2}$ paths, whose lengths follow a Binomial distribution (i.e., the number of paths of length $l$ from layer $k$ to the last layer is $\binom{L-k-1}{l-2}$), and the average path length is $\frac{L}{2}+1$ \cite{veit2016residual}. In this section, we show that a randomly wired neural network can also be considered as an ensemble of networks with varied depth. However, in this case, the distribution of the path length is different from the one obtained with the ResNet, as shown in the following lemma. \begin{lemma} Let us consider a randomly wired network with $L$ architecture nodes, where the architecture DAG is generated according to an Erd\H{o}s-Renyi graph generator with probability $p$. The average number of paths of length $l$ from node $k$ to the sink, where $k<L$, is $\mathbb{E}[N_l^{(k)}]=\binom{L-k-1}{l-2}p^{l-1}$ and the average total number of paths from node $k$ to the sink is $\mathbb{E}[N^{(k)}]=p(1+p)^{L-k-1}$. \label{lemma1} \end{lemma} \begin{proof} Let us first consider the number of paths of length $l$ from node $k$ to the sink. We define the path length as the number of nodes in the path. In a randomly wired network with $n$ architecture nodes, we have that the first node of all the paths is node $k$ and the last one is node $n$ (i.e., the sink node). Therefore, the minimum path length is 2. If $l\ge 2$, the number of all possible paths of length $l$ between node $k$ and the sink is $\binom{n-k-1}{l-2}$. Since in a path of length $l$ there are $l-1$ edges and each edge has probability $p$ of being generated by the Erd\H{o}s-Renyi model, each one of the paths of length $l$ has probability $p^{l-1}$ of being present in the network. Thus, the expected number of paths with length $l$ between node $k$ and the sink is $\mathbb{E}[N_l^{(k)}]=\binom{n-k-1}{l-2}p^{l-1}$. If we set $k=1$, we obtain the average number of paths of length $l$ from source to sink $\mathbb{E}[N_l]=\binom{n-2}{l-2}p^{l-1}$. We can now compute the average total number of paths $\mathbb{E}[N^{(k)}]$ as follows \[ \begin{split} \mathbb{E}[N^{(k)}]&=\sum_{l=2}^{n-k+1} \binom{n-k-1}{l-2}p^{l-1} =\sum_{\tilde l=0}^{\tilde n} \binom{\tilde n}{\tilde l}p^{\tilde l+1}\\ &= p\sum_{\tilde l=0}^{\tilde n} \binom{\tilde n}{\tilde l}p^{\tilde l} =p(1+p)^{\tilde n}=p(1+p)^{n-k-1}, \end{split} \] where $\tilde n=n-k-1$, $\tilde l=l-2$ and the fourth equality follows from the binomial theorem. If we set $k=1$, we obtain the average total number of paths from source to sink $\mathbb{E}[N_p]=p(1+p)^{n-2}$. \end{proof} We can observe that if $p=1$, the randomly wired network converges to the ResNet architecture. This allows to think of randomly wired architectures as generalizations of ResNets as they enable increased flexibility in the number and distribution of paths, instead of enforcing the use of all $2^{L-2}$ paths. \subsection{Receptive field analysis} \label{sec:receptive} In the case of GNNs, we define the receptive field of a domain node as the neighborhood that affects the output features of that node. As discussed in Sec. \ref{sec:intro}, the work in \cite{xu2018representation} highlights that one of the possible causes of the depth problem in GNNs is that the size of the receptive field is not adaptive and may rapidly become excessively large. Inspired by this observation, in this section we analyze the receptive field of a randomly wired graph neural network. We show that the receptive field of the output is a combination of the receptive fields of shallower networks, induced by each of the paths. This allows to effectively merge the contributions from receptive fields of varied size. Moreover, we show that the trainable parameters along the path edges modulate the contributions of various path lengths and enable adaptive receptive fields, that can be tuned by the training procedure. We first introduce a definition of the receptive field of a feedforward graph neural network\footnote{We use the term ``feedforward neural network'' to indicate an architecture made of a simple line graph, without skip connections: this is a representation of one path.}. \begin{definition} Given a feedforward graph neural network with $L$ layers, the receptive field of radius $L$ of a domain node is its $L$-hop neighborhood. \end{definition} In a randomly wired architecture, each path induces a corresponding receptive field whose radius depends on the length of the path. Then, the receptive field at the output of the network is obtained by combining the receptive fields of all the paths. In order to analyze the contribution of paths of different lengths to the receptive field of the network, we introduce the concept of distribution of the receptive field radius of the paths. Notice that if we consider a feedforward network with $L$ layers, the distribution of the receptive field radius is a delta centered in $L$. The following lemma allows to analyze the distribution of the receptive field radius in a randomly wired architecture. \begin{lemma} \label{lemma:derivative} The derivative $\frac{\partial y}{\partial x_0}$ of the output $y$ of a randomly wired architecture with respect to the input $x_0$ is \begin{equation}\label{eq:path_sum} \frac{\partial y}{\partial x_0}=\sum_{p\in\mathcal{P}}\frac{\partial y_p}{\partial x_0}=\sum_{p\in\mathcal{P}}\prod_{\{i,j\}\in\mathcal{E}^{p}}\omega_{ij}\frac{\partial \bar{y}_p}{\partial x_0}= \sum_{l=2}^L\sum_{p\in\mathcal{P}^l}\lambda_p\frac{\partial \bar{y}_p}{\partial x_0}, \end{equation} where $y_p$ is the output of path $p$, $\bar{y}_p$ is the output of path $p$ when we consider all the aggregation weights equal to 1, $\lambda_p=\frac{\partial y_p}{\partial x_0}/\frac{\partial \bar{y}_p}{\partial x_0}$, $\mathcal{P}$ is the set of all paths from source to sink, $L$ is the number of architecture nodes, $\mathcal{P}^l$ is the set of paths from source to sink of length $l$ and $\mathcal{E}^p$ is the set of edges of the path $p$. \end{lemma} \begin{proof} Direct computation. \end{proof} From Lemma \ref{lemma:derivative}, we can observe that the contribution of each path to the gradient is weighted by its corresponding architecture edge weights. Thus, we can define the following distribution $\rho$ of the receptive field radius: \begin{equation} \rho_l=\sum_{p\in\mathcal{P}^l}\lambda_p=\sum_{p\in\mathcal{P}^l}\prod_{\{i,j\}\in\mathcal{E}^{p}}\omega_{ij}\qquad \mathrm{for }\ \ l=2,...,n, \label{eq:rho} \end{equation} where we have assumed that the gradient $\frac{\partial \bar{y}_p}{\partial x_0}$ depends only on the path length, as done in \cite{veit2016residual}. This is a reasonable assumption if all the architecture nodes perform the same operation. The distribution of the receptive field radius is therefore influenced by the architecture edge weights. Figure \ref{fig:path1} shows an example of how such weights can modify the radius distribution. If we consider $\omega_{ij}=1$ for all $i$ and $j$, we obtain that the radius distribution is equal to the path length distribution. In order to provide some insight into the role of parameter $p$ in the distribution of the receptive field radius, we focus on this special case and analyze the distribution of the path lengths in a randomly wired architecture by introducing the following Lemma. \begin{lemma} Let us consider a randomly wired network with $L$ architecture nodes, where the architecture DAG is generated according to a Erd\H{o}s-Renyi graph generator with probability $p$. The average length of the paths from node $k$ to the sink is $\mathbb{E}[l^{(k)}]\approx\frac{p}{1+p}(L-k-1)+2$. \label{lemma:avg_length} \end{lemma} \begin{proof} From Lemma 3.1, we can compute the average length of the paths from node $k$ to the sink as follows \begin{equation} \begin{split} \mathbb{E}[l^{(k)}]&=\sum_{l=2}^{n-k+1}l\mathbb{E}\left[\frac{N_l^{k}}{N^{(k)}}\right]\approx\frac{\sum_{l=2}^{n-k+1}l\mathbb{E}[N_l^{(k)}]}{\mathbb{E}[N^{(k)}]}\\ &=\frac{\sum_{l=2}^{n-k+1}\binom{n-k-1}{l-2}p^{l-1}l}{p(1+p)^{n-k-1}}, \end{split} \label{eq:l_m} \end{equation} where we have neglected the higher order terms \cite{elandt1980survival}. The numerator in \eqref{eq:l_m} can be computed as follows \[ \begin{split} \sum_{l=2}^{n-k+1}\hspace{-5pt}\binom{n-k-1}{l-2}p^{l-1}l &= \sum_{\tilde l=0}^{\tilde n} \binom{\tilde n}{\tilde l}p^{\tilde l+1}(\tilde l+2)\\ &=\sum_{\tilde l=0}^{\tilde n} \binom{\tilde n}{\tilde l}p^{\tilde l+1}\tilde l+2\sum_{\tilde l=0}^{\tilde n} \binom{\tilde n}{\tilde l}p^{\tilde l+1}\\ &=p^2\sum_{\tilde l=0}^{\tilde n} \binom{\tilde n}{\tilde l}p^{\tilde l-1}\tilde l + 2p\sum_{\tilde l=0}^{\tilde n} \binom{\tilde n}{\tilde l}p^{\tilde l}\\ &=p^2\tilde n(1+p)^{\tilde n -1}+2p(1+p)^{\tilde n}\\ &=p^2(n-k-1)(1+p)^{n-k-2}\\ &+2p(1+p)^{n-k-1}, \end{split} \] where $\tilde n=n-k-1$, $\tilde l=l-2$ and the fourth equality is obtained differentiating the binomial theorem with respect to $p$ . Then, we obtain \[ \mathbb{E}[l^{(k)}]=\frac{p}{1+p}(n-k-1)+2. \] If we consider $k=1$, i.e. the sink, we obtain $\mathbb{E}[l]=\frac{p}{1+p}(n-2)+2$. \end{proof} Therefore, if $p=1$ and $\omega_{ij}=1$ for all $i$ and $j$ the radius distribution is a Binomial distribution centered in $\frac{L}{2}+1$ (as in ResNets), instead when $p<1$ the mean of the distribution is lower. The path length distribution for different $p$ values is shown in Fig. \ref{fig:path2}. This shows that, differently from feedforward networks, the receptive field of ResNets and randomly wired architectures is a combination of receptive fields of varied sizes, where most of the contribution is given by shallow paths, i.e. smaller receptive fields. The parameter $p$ of the randomly wired neural network influences the distribution of the receptive field radius: a lower $p$ value skews the distribution towards shallower paths, instead a higher $p$ value skews the distribution towards longer paths. \begin{figure}[t] \centering \includegraphics[width=0.95\columnwidth]{figures/paths1.pdf} \caption{Distribution of receptive field radius ($p=0.4$, $\omega_{ij}=1$ for unweighted, $\omega_{ij}=0.5$ for weighted).} \label{fig:path1} \end{figure} \begin{figure}[t] \centering \includegraphics[width=0.95\columnwidth]{figures/paths2.pdf} \caption{Path distribution as function of architecture edge probability.} \label{fig:path2} \end{figure} After having considered the special case where $\omega_{ij}=1$ for all $i$ and $j$, we now focus on the general case. Since the edge architecture weights are trainable parameters, they can be adapted to optimize the distribution of the receptive field radius. This is one of the strongest advantages provided by randomly wired architectures with respect to ResNets. This is particularly relevant in the context of GNNs, where we may have a non-uniform growth of the receptive field caused by the irregularity of the graph structure \cite{xu2018representation}. Notice that the randomly wired architecture can be seen as a generalization of the jumping knowledge networks proposed in \cite{xu2018representation}, where all the architecture nodes, not only the last one, merge contributions from previous nodes. We also remark that, even if we modify the ResNet architecture by adding trainable weights to each branch of the residual module, we cannot retrieve the behaviour of the randomly wired architecture. In fact, the latter has intrinsically more granularity than a ResNet: the expected number of architecture edge weights of a randomly wired network is $\frac{pL(L+1)}{2}$, instead a weighted ResNet has only $2(L-2)$ weights. Ideally, we would like to weigh each path independently (i.e., directly optimizing the value of $\lambda_p$ in Eq. \eqref{eq:path_sum}). However, this is unfeasible because the number of parameters would become excessively high and the randomly wired architecture provides an effective tradeoff. Given an architecture node, weighting in a different way each input edge is important because to each edge corresponds a different length distribution of the paths going through such edge, as shown by the following Lemma. \begin{lemma} Let us consider a randomly wired network with $n$ architecture nodes, where the architecture DAG is generated according to a Erd\H{o}s-Renyi graph generator with probability $p$. Given an edge $\{i,j\}$ between the architecture nodes $i$ and $j$ where $i<j$, the average length of the paths from the source to the sink going through that edge is $\mathbb{E}[l_{ij}]\approx\frac{p}{1+p}(L-(j-i)-3)+4$. \end{lemma} \begin{proof} From Lemma 3.3, we can compute the average length of the paths going through the edge $\{i,j\}$ as follows \[ \mathbb{E}[l_{ij}]=\mathbb{E}[l^{n-i+1}+l^{j}]\approx\frac{p}{1+p}(n-(j-i)-3)+4. \] \end{proof} \subsection{Sequential path} In the previous sections we have shown that a randomly wired architecture behaves like an ensemble of paths merging contribution from receptive fields of varied size, where most of the contribution is provided by shallow paths. As discussed previously, this provides numerous advantages with respect to feedforward networks and ResNets. However, some graph-based tasks may actually benefit from a larger receptive field \cite{li2019deepgcns}, so it is interesting to provide randomly wired architectures with mechanisms to directly promote longer paths. Differently from ResNets, in a randomly wired neural network with $L$ architecture nodes the longest path may be shorter than $L$, leading to a smaller receptive field. In order to overcome this issue, we propose to modify the generation process of the random architecture by imposing that it should also include the sequential path, i.e., the path traversing all architecture nodes. This design of the architecture skews the initial path length distribution towards longer paths, which has the effect of promoting their usage. Nevertheless, the trainable architecture edge weights will ultimately define the importance of such contribution. Fig. \ref{fig:path1} shows an example of how including the sequential path changes the distribution of the receptive field radius. \subsection{MonteCarlo DropPath regularization} \label{sec:droppath} The randomly wired architecture offers new degrees of freedom to introduce regularization techniques. In particular, one could delete a few architecture edges during training with probability $p_\text{drop}$ as a way to avoid co-adaptation of architecture nodes. This is reminiscent of DropOut \cite{srivastava2014dropout} and DropConnect \cite{wan2013regularization}, although it is carried out at a higher level of abstraction, i.e., connections between ``layers'' instead of neurons. It is also reminiscent of techniques used in Neural Architecture Search \cite{zoph2018learning} and the approach used in ImageNet experiments in \cite{xie2019exploring}, although implementation details are unclear for the latter. We propose to use a MonteCarlo approach where paths are also dropped in testing. Inference is performed multiple times for different realizations of dropped architecture edges and results are averaged. This allows to sample from the full predictive distribution induced by DropPath, as in MonteCarlo DropOut \cite{gal2015dropout}. The following lemma shows that MonteCarlo DropPath decorrelates the contributions of paths in Eq. \eqref{eq:path_sum} even if they share architecture edges, thus allowing finer control over the modulation of the receptive field radius. \begin{lemma} Let us consider two distinct paths $p_1$ and $p_2$ of a randomly wired network where the edges of the paths can be deleted with probability $p_{\text{drop}}$. Then, even if the two paths share some architecture edges, their contributions to the derivative $\frac{\partial y}{\partial x_0}$, as defined in Lemma \ref{lemma:derivative}, are decorrelated. \end{lemma} \begin{proof} Let us consider two paths $p_1$ and $p_2$ with at least one common edge, we can compute the covariance between these two paths as follows: \begin{align*} &\mathrm{Cov}(\lambda_{p_1},\lambda_{p_2})=\mathbb{E}[\lambda_{p_1}\lambda_{p_2}]-\mathbb{E}[\lambda_{p_1}]\mathbb{E}[\lambda_{p_2}]\\ &=\prod_{\{i,j\}\in \mathcal{E}^{p_1}}\hspace{-5pt} \omega_{ij}\prod_{\{i,j\}\in \mathcal{E}^{p_2}}\hspace{-5pt}\omega_{ij} \mathbb{E}\Bigg[\prod_{\{i,j\}\in \mathcal{I}(p_1,p_2)}\hspace{-3pt}z_{ij}^2 \prod_{\{i,j\}\in \mathcal{D}(p_1,p_2)}\hspace{-5pt}z_{ij}\Bigg]\\ &-\prod_{\{i,j\}\in \mathcal{E}^{p_1}}\hspace{-5pt} \omega_{ij}\prod_{\{i,j\}\in \mathcal{E}^{p_2}} \hspace{-5pt}\omega_{ij} \mathbb{E}\hspace{-3pt}\left[\prod_{\{i,j\}\in \mathcal{E}^{p_1}}\hspace{-5pt}z_{ij}\right]\mathbb{E}\hspace{-3pt}\left[\prod_{\{i,j\}\in \mathcal{E}^{p_2}}\hspace{-5pt}z_{ij}\right]\hspace{-5pt}=0, \end{align*} where $\mathcal{I}(p_1,p_2)=\mathcal{E}^{p_1}\cap \mathcal{E}^{p_2}$, $\mathcal{D}(p_1,p_2)=(\mathcal{E}^{p_1}\cup \mathcal{E}^{p_2})-(\mathcal{E}^{p_1}\cap \mathcal{E}^{p_2})$, $\lambda_{p_1}=\prod_{\{i,j\}\in p_1} z_{ij}\omega_{ij}$, $\lambda_{p_2}=\prod_{\{i,j\}\in p_2} z_{ij}\omega_{ij}$, $z_{ij}\sim\mathrm{Bernoulli}(1-p_\text{drop})$, and we have assumed all $\omega_{ij}$ deterministic. \end{proof} \section{Experimental results} Experimental evaluation of GNNs is a topic that has recently received great attention. The emerging consensus is that benchmarking methods routinely used in past literature are inadequate and lack reproducibility. In particular, \cite{vignac2020choice} showed that commonly used citation network datasets like CORA, CITESEER, PUBMED are too simple and skew results towards simpler architectures or even promote ignoring the underlying graph. TU datasets are also recognized to be too small \cite{errica2019fair} and the high variability across splits does not allow for sound comparisons across methods. In order to evaluate the gains offered by randomly wired architectures across, we adopt recently proposed benchmarking frameworks such as the one in \cite{dwivedi2020benchmarking} and Open Graph Benchmarks \cite{hu2020ogb}. First, we use two datasets in \cite{dwivedi2020benchmarking} to analyse the performance differences between the baseline ResNet architecture, i.e., a feedforward architecture with skip connections after every layer, and the randomly wired architecture. We omit results on architectures without skip connections as these have already been shown to have poorer performance \cite{dwivedi2020benchmarking}. We focus on the ZINC and CIFAR10 datasets. ZINC is one of the most popular real-world molecular datasets, and considers the task of property regression (constrained solubility) for the molecules represented as graphs. CIFAR10 is a well-known dataset for image classification, and, in this context, images are described by graphs of superpixels. For this experiment, we test four of the most commonly used graph convolution definitions: GCN \cite{kipf2016semi}, GIN \cite{xu2018powerful}\footnote{GIN and RAN-GIN compute the output as in \cite{xu2018representation}, using all architecture nodes.}, Gated GCN \cite{bresson2017residual}, and GraphSage \cite{hamilton2017inductive}. Notice that we do not attempt to optimize a specific method, nor we are interested in comparing one graph convolution to another. A fair comparison is ensured by running both methods with the same number of trainable parameters and with the same hyperparameters, keeping exactly the same ones used in \cite{dwivedi2020benchmarking}. The learning rate of both methods is adaptively decayed between $10^{-3}$ and $10^{-5}$ and the stopping criterion is validation loss not improving for 5 epochs after reaching the minimum learning rate. Results are averaged over 4 runs with different weight initialization and different random architecture graphs, drawn with $p=0.6$. The random architectures use sequential paths (Sec. \ref{sec:receptive}), but no DropPath (Sec. \ref{sec:droppath}) for the ZINC experiment, and DropPath but no sequential paths for CIFAR10. The results in Tables \ref{table:ZINC} and \ref{table:CIFAR} show the performance achieved by randomly wired architectures and their ResNets counterparts for increasing model capacity (number of architecture nodes or layers $L$). We can notice that randomly wired GNNs have compelling performance in many regards. The superscript reports the standard deviation among runs and the subscript reports the level of significance by measuring how many baseline standard deviations the average value of the random architecture deviates from the average value of the baseline. Results are in bold if they are at least $1\sigma$ significant. First of all, randomly wired GNNs typically provide lower error or higher accuracy than their ResNet counterparts for the same number of parameters. Moreover, they are more effective at increasing capacity than stacking layers: while they are essentially equivalent to ResNets for very short networks (e.g., for $L=4$), they enable larger gains when additional layers are introduced. This is highlighted by Table \ref{table:gain}, which shows the relative improvement in mean absolute error or accuracy averaged over all the graph convolution definitions, with respect to the short 4-layer network, where random wiring and ResNets are almost equivalent. This table highlights that deeper ResNets always provide smaller gains with respect to their shallow counterpart than the randomly wired GNNs. This allows us to conclude that randomly wired GNNs are a more effective way of increasing model capacity. \begin{table} \caption{ZINC Mean Absolute Error.} \label{table:ZINC} \setlength\tabcolsep{1.5pt} \renewcommand{\arraystretch}{1.5} \centering \begin{tabular}{ccccc} & $L=4$ & $L=8$ & $L=16$ & $L=32$ \\ \hline GCN & $\textbf{0.469}^{\pm 0.002}_{2.9\sigma}$ & $0.465^{\pm 0.012}$ & $0.445^{\pm 0.022}$ & $0.426^{\pm 0.011}$ \\ \textbf{RAN-GCN} & $0.509^{\pm 0.015}$ & $\textbf{0.447}^{\pm 0.019}_{1.5\sigma}$ & $\textbf{0.398}^{\pm 0.015}_{2.1\sigma}$ & $\textbf{0.385}^{\pm 0.015}_{3.7\sigma}$\\ \hline GIN & $0.375^{\pm 0.014}_{0.4\sigma}$ & $0.444^{\pm 0.017}$ & $0.461^{\pm 0.022}$ & $0.633^{\pm 0.089}$\\ \textbf{RAN-GIN} & $0.381^{\pm 0.021}$ & $\textbf{0.398}^{\pm 0.004}_{2.7\sigma}$ & $\textbf{0.426}^{\pm 0.020}_{1.6\sigma}$ & $\textbf{0.540}^{\pm 0.155}_{1.0\sigma}$ \\ \hline GatedGCN & $0.368^{\pm 0.007}$ & $0.339^{\pm 0.027}$ & $0.284^{\pm 0.014}$ & $0.277^{\pm 0.025}$\\ \textbf{RAN-GatedGCN} & $0.364^{\pm 0.007}_{0.5\sigma}$ & $\textbf{0.310}^{\pm 0.010}_{1.1\sigma}$ & $\textbf{0.218}^{\pm 0.017}_{4.7\sigma}$ & $\textbf{0.215}^{\pm 0.025}_{2.5\sigma}$ \\ \hline GraphSage & $0.428^{\pm 0.007}_{0.1\sigma}$ & $0.363^{\pm 0.005}$ & $0.355^{\pm 0.003}$ & $0.351^{\pm 0.009}$\\ \textbf{RAN-GraphSage} & $0.429^{\pm 0.010}$ & $\textbf{0.368}^{\pm 0.015}_{1.0\sigma}$ & $\textbf{0.340}^{\pm 0.009}_{5.0\sigma}$ & $\textbf{0.333}^{\pm 0.008}_{2.0\sigma}$ \\ \hline \end{tabular} \end{table} \begin{table}[] \caption{CIFAR10 Accuracy.} \label{table:CIFAR} \setlength\tabcolsep{2pt} \renewcommand{\arraystretch}{1.5} \centering \begin{tabular}{ccccc} & $L=4$ & $L=8$ & $L=16$ & $L=32$ \\ \hline GCN & $54.28^{\pm 0.35}$ & $54.85^{\pm 0.20}$ & $54.74^{\pm 0.52}$ & $54.76^{\pm 0.53}$ \\ \textbf{RAN-GCN} & $\textbf{55.31}^{\pm 0.25}_{2.9\sigma}$ & $\textbf{57.81}^{\pm 0.08}_{14.8\sigma}$ & $\textbf{57.29}^{\pm 0.44}_{4.9\sigma}$ & $\textbf{58.49}^{\pm 0.21}_{7.0\sigma}$ \\ \hline GIN & $\textbf{70.66}^{\pm 0.78}_{2.94\sigma}$ & $66.67^{\pm 0.73}$ & $63.99^{\pm 1.45}$ & $58.18^{\pm 2.92}$\\ \textbf{RAN-GIN}& $67.48^{\pm 1.08}$ & $\textbf{67.36}^{\pm 0.70}_{1.0\sigma}$ & $\textbf{67.25}^{\pm 0.74}_{2.2\sigma}$ & $\textbf{62.73}^{\pm 1.57}_{1.6\sigma}$ \\ \hline GatedGCN & $\textbf{69.26}^{\pm 0.36}_{2.0\sigma}$ & $68.27^{\pm 0.80}$ & $69.16^{\pm 0.66}$ & $69.46^{\pm 0.47}$\\ \textbf{RAN-GatedGCN} & $68.55^{\pm 0.03}$ & $68.86^{\pm 1.64}_{0.7\sigma}$ & $\textbf{72.00}^{\pm 0.44}_{4.3\sigma}$ & $\textbf{73.50}^{\pm 0.68}_{8.6\sigma}$ \\ \hline GraphSage & $\textbf{66.14}^{\pm 0.21}_{2.4\sigma}$ & $65.58^{\pm 0.46}_{0.6\sigma}$ & $66.12^{\pm 0.11}_{0.0\sigma}$ & $65.33^{\pm 0.34}$\\ \textbf{RAN-GraphSage} & $65.02^{\pm 0.47}$ & $65.31^{\pm 0.38}$ & $66.10^{\pm 1.11}$ & $\textbf{67.68}^{\pm 0.37}_{6.9\sigma}$ \\ \hline \end{tabular} \end{table} \begin{table} \caption{Median Relative Gain over $L=4$.} \label{table:gain} \setlength\tabcolsep{3pt} \renewcommand{\arraystretch}{1.5} \centering \begin{tabular}{ccccc} & & $L=8$ & $L=16$ & $L=32$ \\ \hline \multirow{2}{*}{ZINC} & ResNet & $-0.50\%$ & $+0.37\%$ & $+3.24\%$ \\ \cline{2-5} & \textbf{Random} & $\textbf{+5.43\%}$ & $\textbf{+8.89\%}$ & $\textbf{+11.36\%}$ \\ \hline \multirow{2}{*}{CIFAR10}& ResNet & $-1.14\%$ & $-0.08\%$ & $-0.47\%$ \\ \cline{2-5} & \textbf{Random} & $\textbf{+0.45\%}$ & $\textbf{+2.62\%}$ & $\textbf{+4.92\%}$ \\ \hline \end{tabular} \end{table} \begin{table}[t] \centering \caption{\textrm{ogbg-molpcba} Average Precision.} \label{table:molpcba} \setlength\tabcolsep{2pt} \renewcommand{\arraystretch}{1.5} \begin{tabular}{cccc} & Test AP & Val AP & No. params \\ \hline GCN & $0.2020^{\pm 0.0024}$ & $0.2059^{\pm 0.0033}$ & $565,928$ \\ \hline GIN & $0.2266^{\pm 0.0028}$ & $0.2305^{\pm 0.0027}$ & $1,923,433$ \\ \hline ChebNet & $0.2306^{\pm 0.0016}$ & $0.2372^{\pm 0.0018}$ & $1,475,003$ \\ \hline SIGN & $0.2047^{\pm 0.0036}$ & $0.2163^{\pm 0.0022}$ & $5,516,228$ \\ \hline \textbf{RAN-GIN} & $0.2493^{\pm 0.0076}$ & $0.2514^{\pm 0.0093}$ & $1,868,774$ \\ \hline GCN+VN+FLAG & $0.2384^{\pm 0.0037}$ & $0.2556^{\pm 0.0040}$ & $2,017,028$ \\ \hline GIN+VN+FLAG & $0.2834^{\pm 0.0038}$ & $0.2912^{\pm 0.0026}$ & $3,374,533$ \\ \hline DeeperGCN+VN+FLAG & $0.2842^{\pm 0.0043}$ & $0.2952^{\pm 0.0029}$ & $5,550,208$ \\ \hline \textbf{RAN-GIN+VN+FLAG} & $0.2879^{\pm 0.0048}$ & $\textbf{0.3041}^{\pm 0.0031}$ & $5,572,026$ \\ \hline GINE++VN & $\textbf{0.2917}^{\pm 0.0015}$ & $\textbf{0.3065}^{\pm 0.0030}$ & $6,147,029$ \\ \hline \end{tabular} \end{table} Moreover, we compare the proposed method against other state-of-the-art techniques to build graph neural networks, including methods that address the oversmoothing problem to build deeper GNNs (DeeperGCN) \cite{li2020deepergcn} or argue that going wide instead of deep is more effective to increase the capacity (SIGN) \cite{rossi2020sign}. This experiment is done on the ogbg-molpcba dataset from Open Graph Benchmarks \cite{hu2020ogb} and results are taken from the public leaderboard. We use a randomly wired version of GIN and compare results with two different setups: a vanilla RAN-GIN with the same number of parameters as GIN, and a larger RAN-GIN using the virtual node trick \cite{gilmer2017neural} and FLAG augmentations \cite{kong2020flag}. Both versions additionally use DropPath with $p_{drop}=0.01$. The results are reported in Table \ref{table:molpcba}. We can see that RAN-GIN (12 layers) significantly outperforms GIN and a number of other techniques for a comparable number of parameters. Furthermore, RAN-GIN with virtual node and FLAG augmentations reaches state-of-the-art performance on this benchmark, outperforming DeeperGCN and being very close to the recently proposed GINE \cite{brossard2020graph}\footnote{Notice that we did not test RAN-GINE.}. \section{Ablation experiments} In this section, we explore how some of the design choices for randomly wired GNNs can affect model performance. \subsection{Architecture Edge probability} We first investigate the impact of the probability $p$ of drawing an edge in the random architecture. Table \ref{table:p_ablation} shows the results for a basic random architecture without DropPath nor embedded sequential path. It appears that an optimal value of $p$ exists that maximizes performance. This could be explained by a tradeoff between size of receptive field and the ability to modulate it. \begin{table}[t] \centering \caption{Edge probability, $L=16$, RAN-GCN.} \renewcommand{\arraystretch}{1.5} \begin{tabular}{ccccc} & $p=0.2$ & $p=0.4$ & $p=0.6$ & $p=0.8$ \\ \hline ZINC & $0.440^{\pm 0.025}$ & $0.427^{\pm 0.025}$ & $\textbf{0.409}^{\pm 0.010}$ & $0.415^{\pm 0.012}$ \\ CIFAR10 & $56.53^{\pm 0.61}$ & $56.21^{\pm 0.48}$ & $\textbf{57.44}^{\pm 0.46}$ & $56.06^{\pm 0.48}$ \\ \hline \end{tabular} \label{table:p_ablation} \vspace{-1pt} \end{table} \begin{table}[t] \centering \caption{DropPath on CIFAR10, RAN-GatedGCN. No sequential path embedding.} \label{table:droppath_ablation} \setlength\tabcolsep{2pt} \renewcommand{\arraystretch}{1.5} \centering \begin{tabular}{ccccc} & $L=8$ & $L=16$ & $L=32$ \\ \hline None & $68.07^{\pm 0.94}$ & $70.78^{\pm 0.38}$ & $72.75^{\pm 0.37}$\\ DropPath &$\textbf{68.86}^{\pm 1.64}$ & $\textbf{72.00}^{\pm 0.44}$ & $\textbf{73.50}^{\pm 0.68}$ \\ \hline \end{tabular} \end{table} \begin{table}[] \centering \caption{DropPath on CIFAR10, RAN-GatedGCN. No sequential path embedding.} \label{table:pdrop_ablation} \setlength\tabcolsep{2pt} \renewcommand{\arraystretch}{1.5} \begin{tabular}{ccccc} \multicolumn{5}{c}{$p_\text{drop}$} \\ 0 & 0.005 & 0.01 & 0.02 & 0.03 \\ \hline $70.78^{\pm 0.38}$ & $70.90^{\pm 0.46}$ & $\textbf{72.00}^{\pm 0.44}$ & $71.55^{\pm 0.83}$ & $71.09^{\pm 1.79}$ \\ \hline \end{tabular} \end{table} \begin{table}[t!] \centering \caption{Sequential path embedding on ZINC, RAN-GatedGCN. No DropPath.} \label{table:linear_ablation} \setlength\tabcolsep{2pt} \renewcommand{\arraystretch}{1.5} \vspace{-11pt} \centering \small \begin{tabular}{ccccc} & $L=8$ & $L=16$ & $L=32$ \\ \hline Fully random & $0.332^{\pm 0.027}$ & $0.264^{\pm 0.029}$ & $0.234^{\pm 0.030}$ \\ Random+Sequential & $\textbf{0.310}^{\pm 0.010}$ & $\textbf{0.218}^{\pm 0.017}$ & $\textbf{0.215}^{\pm 0.025}$ \\ \hline \end{tabular} \end{table} \subsection{DropPath} The impact of DropPath on CIFAR10 is shown in Table \ref{table:droppath_ablation}. We found the improvement due to DropPath to be increasingly significant for a higher number of architecture nodes, as expected due to the increased number of edges. The value of the drop probability $p_\text{drop}=0.01$ was not extensively cross-validated. However, Table \ref{table:pdrop_ablation} shows that higher drop rates typically lowered performance. \subsection{Embedded sequential path} The impact of embedding a sequential path as explained in Sec. \ref{sec:receptive} is shown in Table \ref{table:linear_ablation}. It can be observed that its effect of promoting receptive fields with larger radius is useful on this task for any number of architecture nodes. We remark that, while we do not report results for the sake of brevity, this is not always the case and some tasks (e.g., CIFAR10) do not benefit from promoting larger receptive fields. \section{Conclusion} We showed how randomly wired architectures can boost the performance of GNNs by merging receptive fields of multiple size. Consistent and statistically significant improvements over a wide range of tasks and graph convolutions highlight how such constructions are more effective at increasing model capacity than building deep GNN by stacking several layers in a linear fashion, even when residual connections are used. \bibliographystyle{IEEEtran}
\section{Introduction} \subsection{Objective} Suppose that $X=X^\theta$ is the square-root diffusion process taking values in $(0,\infty)$: \begin{equation} dX_t = (\alpha-\beta X_t)dt + \sqrt{\gamma X_t}dw_t, \label{hm:cir} \end{equation} where $X_0>0$ a.s., independent of the standard Wiener process $w$. The process $X$ is also known as the Cox-Ingersoll-Ross (CIR) model; see, among others, \cite{cir1985} and \cite{GoiYor03}. We are concerned here with asymptotically efficient estimation of the parameter \begin{equation} \theta:=(\alpha,\beta,\gamma) \in \Theta \subset (0,\infty)^3, \nonumber \end{equation} when $X$ is observed at $t_j=j h$ where $h=h_n\to 0$ while $T_n:=nh\to \infty$ as $n\to\infty$; no further condition on the rate of $h\to 0$ is imposed, and the equidistant assumption is just for simplicity. Historically, parametric estimation of the model \eqref{hm:cir} was studied by: \begin{itemize} \item \cite{Ove98}, \cite{AlaKeb12}, and \cite{AlaKeb13}, when $X$ is \textit{continuously} observed, where they considered asymptotic behaviors of the maximum-likelihood estimation; \item \cite{OveRyd97}, when $X$ is observed \textit{at low-frequency}, where the sampling step size $h>0$ is fixed, and they considered not only the moment-matching type estimators, but also the local asymptotic normality. \end{itemize} Despite of popularity in applications of the model, however, parameter estimation issue has not been fully addressed in case of \textit{high-frequency} sampling, which provides us with quantitative effect of sampling frequency for each parameters, together with simpler form of Fisher-information matrix. The existing literature, which includes \cite{Kes97} and \cite{Yos11} with the references therein, are mostly concerned with the uniformly ellipticity, which does not hold in \eqref{hm:cir}; even when the diffusion coefficient is not uniformly elliptic, it is quite often assumed that the inverse of the diffusion coefficient can be bounded by a constant multiple of the function $1+|x|^C$ for some $C>0$, hence is not bounded below. Still, we should mention the previous work \cite{AlaKebTra20}, where the authors deduced the local asymptotic normality (LAN) for $(\alpha,\beta)$ when the diffusion parameter $\gamma$ is assumed to be known; \cite{AlaKebTra20} also considered the cases of $\beta=0$ and $\beta<0$ (the associated statistical experiments are LAQ and LAMN, respectively). It is well-known \cite{cir1985} that the CIR model has a noncentral chi-squared transition density, hence far from being Gaussian. Nevertheless, having the LAN result of \cite{AlaKebTra20} in hand, we will see that the Gaussian quasi-likelihood function (GQLF), which is constructed through the small-time Gaussian approximation of the true transition density, is asymptotically efficient especially for estimation of the drift parameters. Even better, the GQLF enables us to effectively bypass numerical optimization. \medskip The rest of this paper is organized as follows. After describing some preliminary facts, in Section \ref{sec_GQLA} we will look at the asymptotic behavior of the Gaussian maximum quasi-likelihood estimator, together with an explicit initial estimator. Section \ref{nh:sec_simulations} presents some simulation results. \subsection{Preliminaries} \label{sec_preliminaries} Let us describe the basic setup imposed throughout this paper. Denote by $(\Omega,\mathcal{F},(\mathcal{F}_t)_{t\ge 0},\mathbb{P})$ the underlying filtered probability space. It is known that \eqref{hm:cir} admits a unique strong solution, hence for our purpose we may and do suppose that $\mathcal{F}_t=\sigma(X_0) \vee \sigma(w_s:\,s\le t)$. The zero boundary is non-attracting if $2\alpha>\gamma$, so that $X$ stays positive with probability one, see \cite{cir1985}. We assume the stronger assumption that the parameter space $\Theta$ is a bounded convex domain, whose compact closure satisfies that \begin{equation} \overline{\Theta}\subset \left\{(\alpha,\beta,\gamma)\in(0,\infty)^3:\, 2\alpha > 5\gamma \right\}. \label{hm:param.assumption} \end{equation} We will denote by $\theta_0=(\alpha_0,\beta_0,\gamma_0)\in\Theta$ the true value of $\theta$, and write $\mathbb{P}_\theta$ for the distribution of $X$ associated with the value $\theta$, with simply writing $\mathbb{P}$ for $\mathbb{P}_{\theta_0}$, which may cause no confusion. The expectation with respect to $\mathbb{P}$ will be denoted by $\mathbb{E}$. Under $\mathbb{P}_\theta$, $X$ admits the gamma invariant distribution with shape parameter $2\alpha/\gamma$ and scale one $2\beta/\gamma$. We denote the invariant distribution under $\mathbb{P}_\theta$ by $\pi_\theta(dx)$: \begin{equation} \pi_\theta(dx)=\frac{(2\beta/\gamma)^{2\alpha/\gamma}}{\Gamma(2\alpha/\gamma)}x^{(2\alpha/\gamma)-1}e^{-(2\beta/\gamma)x}I_{(0,\infty)}(x)dx, \nonumber \end{equation} where $I_A$ denotes the indicator function of a set $A$; we will simply write $\pi_0(dx)=\pi_{\theta_0}(dx)$. The $q$th moment of $\pi_\theta$ is given by \begin{equation} \int_0^\infty x^q \pi_\theta(dx)=\frac{\Gamma\left(q+(2\alpha/\gamma)\right)}{(2\beta/\gamma)^{q}\Gamma(2\alpha/\gamma)}, \nonumber \end{equation} which is finite if and only if $q>-2\alpha/\gamma$; in particular, \begin{align*} &\int\left(\frac{1}{\gamma_0x}\right)\pi_{0}(dx) = \frac{1}{\gamma_0}\frac{2\beta_0}{2\alpha_0-\gamma_0}, \\ &\int\left(\frac{x}{\gamma_0}\right)\pi_{0}(dx) = \frac{1}{\gamma_0}\frac{\alpha_0}{\beta_0}. \end{align*} Though not essential, we focus on the stationary case throughout this paper, that is, the initial distribution $\mathcal{L}(X_0)=\pi_0$ under the true distribution. Since $X$ is (exponentially) strong-mixing by \cite[Corollary 2.1]{GenJeaLar00}, we then have the ergodic theorem: \begin{equation} \frac{1}{T}\int_0^T f(X_t)dt \stackrel{p}{\to} \tcr{\int f(x) \pi_{0}(dx)}, \qquad T\to\infty, \label{hm:conti.LLN} \end{equation} for any measurable function $f\in L^1(\pi_0)$, where $\stackrel{p}{\to}$ denotes the convergence in $\mathbb{P}$-probability. For later reference, we state the basic tools from \cite[Propositions 3, 4, and 5]{AlaKeb13} and \cite[Section 3]{AlaKebTra20}. \begin{lemma} \label{hm:lem_AKT} \begin{enumerate} \item For each $p<\frac{2\alpha}{\gamma}$, \begin{equation} \sup_{t\in\mathbb{R}_+}\mathbb{E}\left(X_t^{-p}\right) < \infty. \nonumber \end{equation} \item For each $p\ge 1$, there exists a constant $C_p>0$ such that \begin{equation} \sup_{s,t\in\mathbb{R}_+:\,0<|t-s|<1}\mathbb{E}\left(|X_t-X_s|^{p}\right) \le C_p|t-s|^{p/2}. \nonumber \end{equation} \item For each $p<\frac12\left(\frac{2\alpha}{\gamma}-1\right)$, \begin{equation} \frac1n \sum_{j=1}^{n} X_{t_{j-1}}^{-p} \stackrel{p}{\to} \int_{0}^{\infty}x^{-p}\pi_{0}(dx) =\frac{(2\beta/\gamma)^{p} \Gamma((2\alpha/\gamma) -p)}{\Gamma(2\alpha/\gamma)}. \label{hm:LLN} \end{equation} \end{enumerate} \end{lemma} By Lemma \ref{hm:lem_AKT} with \eqref{hm:conti.LLN} it is routine to deduce that \begin{equation} \frac1n \sum_{j=1}^{n} f(X_{t_{j-1}}) \stackrel{p}{\to} \int_{0}^{\infty}f(x)\pi_{0}(dx) \n \end{equation} for each $\mathcal{C}^1$-function with $f(x)$ and $\partial_x f(x)$ being of at most polynomial growth for $|x|\to\infty$. We also have $(2\alpha/\gamma -1)/2 > 2$ under \eqref{hm:param.assumption}, hence in particular \eqref{hm:LLN} holds true for $p=1,2$. Applying the integration by parts we have \begin{equation} X_t = e^{-\beta(t-s)}X_s + \frac{\alpha}{\beta}(1-e^{-\beta(t-s)}) + \sqrt{\gamma} e^{-\beta t} \tcr{\int_{s}^{t}e^{u\beta}\sqrt{X_u}dw_u}, \quad t>s. \label{hm:X_sol} \end{equation} Let the symbol $\mathbb{E}_\theta^{j-1}(\cdot)$ stand for the conditional expectation under $\mathbb{P}_{\theta}$ with respect to $\mathcal{F}_{t_{j-1}}$. We have $\mathbb{E}_\theta^{j-1}(\int_{t_{j-1}}^{t_{j}} e^{\beta s} \sqrt{X_s} dw_s)=0$ a.s. since \begin{align} \mathbb{E}_\theta^{j-1}\left(\left\langle\int_{t_{j-1}}^{\cdot} e^{\beta s} \sqrt{X_s} dw_s\right\rangle_{t_{j}}\right) &=\mathbb{E}_\theta^{j-1}\left(\int_{t_{j-1}}^{t_{j}} e^{2\beta s} X_s ds\right) \nonumber\\ &=\int_{t_{j-1}}^{t_{j}} e^{2\beta s} \mathbb{E}_\theta^{j-1}(X_s) ds < \infty\quad \text{a.s.} \nonumber \end{align} by the stationarity. This together with \eqref{hm:X_sol} leads to the explicit expressions of the conditional mean and the conditional variance: \begin{align} \mu_{j-1}(\alpha,\beta)&:=\mathbb{E}^{j-1}_\theta(X_{t_{j}}) \nonumber\\ &= e^{-\beta h}X_{t_{j-1}} + \frac{\alpha}{\beta}(1-e^{-\beta h}), \label{hm:cond.mean} \\ \sigma^2_{j-1}(\theta) &:=\mathrm{var}^{j-1}_\theta(X_{t_{j}}) \nonumber\\ &= \gamma e^{-2\beta t_j}\mathbb{E}_\theta^{j-1}\left( \int_{t_{j-1}}^{t_j}e^{2s\beta} X_s ds \right) \nonumber\\ &= \gamma e^{-2\beta t_j} \int_{t_{j-1}}^{t_j}\left\{ e^{2s\beta}\left( e^{-\beta(s-t_{j-1})}X_{t_{j-1}} + \frac{\alpha}{\beta}(1-e^{-\beta(s-t_{j-1})})\right)\right\} ds \nonumber\\ &= \frac{\gamma}{\beta}(1-e^{-\beta h}) \left( e^{-\beta h} X_{t_{j-1}} +\frac{\alpha}{2\beta}(1-e^{-\beta h}) \right). \label{hm:cond.var} \end{align} Note that the conditional mean is free from the diffusion parameter $\gamma$. \section{Gaussian quasi-likelihood} \label{sec_GQLA} We denote by $\mathbb{H}_n(\theta)$ the GQLF, which is defined through approximating the conditional distribution $\mathcal{L}(X_{t_j}|X_{t_{j-1}})$ under $\mathbb{P}_\theta$ by $N(\mu_{j-1}(\theta), \sigma^2_{j-1}(\theta))$ with the expressions \eqref{hm:cond.mean} and \eqref{hm:cond.var}: \begin{align} \mathbb{H}_n(\theta) &:= \sum_{j=1}^{n} \log \phi\left( X_{t_j};\, \mu_{j-1}(\alpha,\beta),\, \sigma^2_{j-1}(\theta)\right), \nonumber\\ &= C_n -\frac12 \sum_{j=1}^{n} \left( \log\sigma^2_{j-1}(\theta) + \frac{1}{\sigma^2_{j-1}(\theta)}(X_{t_j} - \mu_{j-1}(\alpha,\beta))^2 \right) \nonumber\\ &=C_n-\frac12 \sum_{j=1}^{n} \log\left\{\frac{\gamma}{\beta}(1-e^{-\beta h}) \left( e^{-\beta h} X_{t_{j-1}} +\frac{\alpha}{2\beta}(1-e^{-\beta h}) \right)\right\} \nonumber\\ &\qquad{}-\frac12 \sum_{j=1}^{n} \frac{\left(X_{t_j} - e^{-\beta h}X_{t_{j-1}} - \frac{\alpha}{\beta}(1-e^{-\beta h})\right)^2}{\frac{\gamma}{\beta}(1-e^{-\beta h}) \left( e^{-\beta h} X_{t_{j-1}} +\frac{\alpha}{2\beta}(1-e^{-\beta h}) \right)}, \label{hm:def_GQLF} \end{align} where $C_n$ is a constant which does not depend on $\theta$, hence irrelevant to optimization, and where $\phi(\cdot;\mu,\sigma^2)$ denotes the Gaussian density with mean $\mu$ and variance $\sigma^2$. Then, we define the Gaussian quasi-maximum likelihood estimator (GQMLE) by any \begin{equation} \hat{\theta}_n=(\hat{\al}_n,\hat{\beta}_n,\hat{\gam}_n) \in \mathop{\mathrm{argmax}}_{\overline{\Theta}}\mathbb{H}_n. \label{hm:def_GQMLE} \end{equation} It is well-known that the GQLF effectively works for uniformly elliptic diffusions with coefficients smooth enough (see \cite{Kes97}, \cite{Yos11}). As for the present model \eqref{hm:cir}, we need to take care of the irregularity of the diffusion coefficient when proving moment estimates and basic limit theorems. The GQMLE $\hat{\theta}_n$ cannot be given in a closed form, because of its nonlinearity in the parameters. Nevertheless, as in \cite[Sect 3]{OveRyd97} we can proceed with initial estimator which we will denote by $\hat{\theta}_{0,n}=(\hat{\al}_{0,n},\hat{\beta}_{0,n},\hat{\gam}_{0,n})$. The asymptotics is rather similar \cite{OveRyd97}, while we need to take care about some moment estimates in the present high-frequency setup. Let \begin{align} D_n := \mathrm{diag}\big(\sqrt{T_n},\,\sqrt{T_n},\,\sqrt{n}\big), \label{hm:def_D} \end{align} and \begin{align} \mathcal{I}(\theta) &:= \begin{pmatrix} \int\left(\frac{1}{\gamma x}\right)\pi_{\theta}(dx)&-\frac{1}{\gamma}&0\\ -\frac{1}{\gamma}&\int\left(\frac{x}{\gamma}\right)\pi_{\theta}(dx)&0\\ 0&0&\frac{1}{2} \int\left(\frac{1}{\gamma^2}\right)\pi_{\theta}(dx) \end{pmatrix} \nonumber\\ &=\begin{pmatrix} \frac{1}{\gamma}\frac{2\beta}{2\alpha-\gamma}&-\frac{1}{\gamma}&0 \\ -\frac{1}{\gamma}&\frac{1}{\gamma}\frac{\alpha}{\beta}&0 \\ 0&0&\frac{1}{2\gamma^2} \end{pmatrix}. \label{hm:def_I} \end{align} and note that $\mathcal{I}(\theta)$ is invertible for $\theta\in\overline{\Theta}$: \begin{align*} \mathcal{I}(\theta)^{-1} = \begin{pmatrix} \frac{\alpha(2\alpha-\gamma)}{\beta}&2\alpha-\gamma&0\\ 2\alpha-\gamma&2\beta&0\\ 0&0&2\gamma^2\\ \end{pmatrix}; \end{align*} formally, $D_n$ and $\mathcal{I}(\theta)$ respectively correspond to the optimal rate of convergence for the regular estimators and the Fisher information matrix in case of uniformly elliptic diffusions \cite{Gob02}. Let $\partial_a:=\partial/\partial a$, the partial-differentiation operator with respect to a variable $a$, with the $k$-fold operation being denoted by $\partial_a^k$. We will first consider a $D_n$-consistent initial estimator $\hat{\theta}_{0,n}=(\hat{\al}_{0,n},\hat{\beta}_{0,n},\hat{\gam}_{0,n})$ given in a closed form as in \cite{OveRyd97}, and then construct a Newton-Raphson and/or a scoring one-step estimator toward the GQMLE: \begin{itemize} \item Newton-Raphson method \begin{equation} \hat{\theta}_{n}^{(1,1)}=\hat{\theta}_{0,n}-\left(\partial_{\theta}^2\mathbb{H}_n(\hat{\theta}_{0,n})\right)^{-1}\partial_{\theta}\mathbb{H}_n(\hat{\theta}_{0,n}) \n \end{equation} \item Method of scoring \begin{equation} \hat{\theta}_{n}^{(1,2)}=\hat{\theta}_{0,n}+D_{n}^{-1}\mathcal{I}(\hat{\theta}_{0,n})^{-1}D_{n}^{-1}\partial_{\theta}\mathbb{H}_n(\hat{\theta}_{0,n}) \n \end{equation} \end{itemize} It will turn out that the GMQLE $\hat{\theta}_n$ and the one-step estimators $\hat{\theta}_{n}^{(1,1)}$ and $\hat{\theta}_{n}^{(1,2)}$ are all asymptotically equivalent at rate $D_n$. \subsection{Explicit initial estimator} \label{hm:sec_preliminary.est} First, we look at the drift parameter $(\alpha,\beta)$. We introduce the conditional least-squares estimator $(\hat{\al}_{0,n},\hat{\beta}_{0,n})$ defined to be a maximizer of \begin{align*} \mathbb{H}_{1,n}(\alpha,\beta) := -\sum_{j=1}^{n} \left(X_{t_{j}}-\mu_{j-1}(\alpha,\beta)\right)^2, \end{align*} given in the closed forms \begin{align} \hat{\al}_{0,n} &= \frac{\bar{X}_n-e^{-\hat{\beta}_{0,n} h}\bar{X}_n'}{1-e^{-\hat{\beta}_{0,n} h}}\hat{\beta}_{0,n}, \label{hm:aesz_def} \\ \hat{\beta}_{0,n} &= -\frac1h \log \left(\frac{\sum_{j=1}^{n} (X_{t_{j-1}}-\bar{X}_n')(X_{t_{j}}-\bar{X}_n)}{\sum_{j=1}^{n} (X_{t_{j-1}}-\bar{X}_n')^2}\right), \label{hm:besz_def} \end{align} where $\bar{X}_n := n^{-1} \sum_{j=1}^{n} X_{t_j}$ and $\bar{X}_n' := n^{-1} \sum_{j=1}^{n} X_{t_{j-1}}$. As for the diffusion parameter $\gamma$, we substitute $(\hat{\al}_{0,n},\hat{\beta}_{0,n})$ into $(\alpha,\beta)$ in the GQLF \eqref{hm:def_GQLF} and denote the resulting function by $\mathbb{H}_{2,n}(\gamma)$: \begin{align*} \mathbb{H}_{2,n}(\gamma) &:= \mathbb{H}_n\big(\hat{\al}_{0,n},\hat{\beta}_{0,n},\gamma\big) \nonumber\\ &=\sum_{j=1}^{n} \log \phi\left( X_{t_j};\, \mu_{j-1}(\hat{\al}_{0,n},\hat{\beta}_{0,n}),\, \sigma^2_{j-1}(\hat{\al}_{0,n},\hat{\beta}_{0,n},\gamma)\right) \nonumber\\ &= C_n -\frac12 \sum_{j=1}^{n} \bigg( \log\sigma^2_{j-1}(\hat{\al}_{0,n},\hat{\beta}_{0,n},\gamma) \nonumber\\ &{}\qquad + \frac{1}{\sigma^2_{j-1}(\hat{\al}_{0,n},\hat{\beta}_{0,n},\gamma)}(X_{t_j} - \mu_{j-1}(\hat{\al}_{0,n},\hat{\beta}_{0,n}))^2 \bigg). \end{align*} Then, we define $\hat{\gam}_{0,n}$ to be a maximizer of $\mathbb{H}_{2,n}$: \begin{align} \label{hm:gesz_def} \hat{\gam}_{0,n} = \frac1n \sum_{j=1}^{n} \frac{(X_{t_{j}}-\mu_{j-1}(\hat{\al}_{0,n},\hat{\beta}_{0,n}))^2}{\frac{1}{\hat{\beta}_{0,n}}(1-e^{-\hat{\beta}_{0,n} h}) \left( e^{-\hat{\beta}_{0,n} h} X_{t_{j-1}} +\frac{\hat{\al}_{0,n}}{2\hat{\beta}_{0,n}}(1-e^{-\hat{\beta}_{0,n} h})\right)}. \end{align} \begin{lemma} \label{hm:lem_cLSE} $D_n(\hat{\theta}_{0,n}-\theta_0) = O_p(1)$. \end{lemma} \begin{proof} Let $\rho:=(\alpha,\beta)\in\Theta_\rho\subset(0,\infty)^2$, with $\Theta_\rho$ denoting the parameter space of $\rho$, and let $\hat{\rho}_{0,n}:=(\hat{\al}_{0,n},\hat{\beta}_{0,n})$. Let $B_n(\rho):=(e^{-\beta h}, \frac{\alpha}{\beta}(1-e^{-\beta h}))^\top$, $x_{j-1}:=(X_{t_{j-1}},1)^\top$, $\bm{x}_n:=(x_0,x_1,\dots,x_{n-1})^\top$, and $\bm{y}_n:=(X_{t_1},\dots,X_{t_n})$. Then $\mathbb{H}_{1,n}(\rho)=-\| \bm{y}_n - \bm{x}_n B_n(\rho)\|^2$ and the corresponding estimating equation $\partial_\rho\mathbb{H}_{1,n}(\rho)=0$ is equivalent to $\partial_{B_n}\mathbb{H}_{1,n}(\rho)=0$. The solution $\hat{B}_n = B_n(\hat{\rho}_n)$ is given by $B_n(\hat{\rho}_n) = (\bm{x}_n^\top \bm{x}_n)^{-1} \bm{x}_n^\top \bm{y}_n$. Note that \begin{equation} \frac1n \bm{x}_n^\top \bm{x}_n \stackrel{p}{\to} \int \begin{pmatrix} x^2 & x \\ x & 1 \end{pmatrix} \pi_0(dx) >0. \nonumber \end{equation} By \eqref{hm:X_sol}, we have $\bm{y}_n=\bm{x}_n B_n(\rho_0) + M_n$ under $\mathbb{P}$, where $M_n =(M_{n,j})_{j=1}^{n}$ with \begin{equation} M_{n,j} := \gamma_0 \int_{t_{j-1}}^{t_j} e^{-(t_j - s)\beta_0} \sqrt{X_s} dw_s. \nonumber \end{equation} Since $\{(M_{n,j},\mathcal{F}_{t_{j}})\}_{j\le n}$ forms a martingale-difference array satisfying that \begin{equation} \sup_{n,j}\mathbb{E}\left(\left|h^{-1/2}M_{n,j}\right|^q\right)<\infty \nonumber \end{equation} for every $q>0$, we have \begin{equation} \sqrt{\frac{n}{h}} \left( B_n(\hat{\rho}_n) - B_n(\rho_0) \right)= \left( \frac1n\bm{x}_n^\top \bm{x}_n \right)^{-1} \frac{1}{\sqrt{n}} \sum_{j=1}^{n} \frac{1}{\sqrt{h}}M_{n,j} x_{j-1} = O_p(1). \label{hm:lem_cLSE-p1} \end{equation} Apply the delta method to \eqref{hm:lem_cLSE-p1} with the mapping $(x,y) \mapsto (\log x,y)$ to obtain \begin{equation} \sqrt{\frac{n}{h}} \left( (-\hat{\beta}_{0,n} h) - (-\beta_0 h),~\frac{\hat{\al}_{0,n} h }{\hat{\beta}_{0,n} h}(1-e^{-\hat{\beta}_{0,n} h}) - \frac{\alpha_0 h }{\beta_0 h}(1-e^{-\beta_0 h}) \right) = O_p(1). \n \end{equation} Another application of the delta method to the last display with the mapping $(x,y) \mapsto (xy/(e^x -1), -x)$ yields $\sqrt{n/h}( \hat{\al}_{0,n} h -\alpha_0 h,~\hat{\beta}_{0,n} h -\beta_0 h) = O_p(1)$, followed by $\sqrt{T_n} (\hat{\rho}_{0,n} -\rho_0) = O_p(1)$. \medskip To deduce that $\sqrt{n}(\hat{\gam}_{0,n}-\gamma_0)=O_p(1)$, we recall the expressions \eqref{hm:cond.var} and \eqref{hm:gesz_def}. \tcr{For convenience we introduce the following notation: \begin{align} c(x,\rho)&=\gamma^{-1}\sigma^2(x,\theta), \nonumber\\ \pi'(x,\rho)&=2\sqrt{h} c(x,\rho)^{-1}\{\mu(x,\rho_0)-\mu(x,\rho)\}, \nonumber\\ \pi''(x,\rho)&=h c(x,\rho)^{-1}, \nonumber\\ \chi'_{j}(\rho) &:= h^{-1/2}\left(X_{t_{j}} -\mu_{j-1}(\rho)\right), \label{hm:def_chi1} \\ \chi''_{j}(\theta) &:= \frac1h \left\{\left(X_{t_{j}} -\mu_{j-1}(\rho)\right)^2 - \gamma c_{j-1}(\rho)\right\}. \n \end{align} Then, for any $q>0$, the family of random variables $(\chi'_{j})_{j\le n}=(\chi'_{j}(\rho_0))_{j\le n}$ and $(\chi''_{j})_{j\le n}=(\chi''_{j}(\theta_0))_{j\le n}$ are two $L^q(\mathbb{P}_\theta)$-martingale-difference arrays with respect to the filtration $(\mathcal{F}_{t_j})$.} We can write \begin{align} \sqrt{n}(\hat{\gam}_{0,n}-\gamma_0) &= \frac{1}{\sqrt{n}}\sum_{j=1}^{n} \left\{\frac{\left(X_{t_{j}}-\mu_{j-1}(\hat{\rho}_{0,n})\right)^2}{c_{j-1}(\hat{\rho}_{0,n})}-\gamma_0\right\} \nonumber\\ &= G_{1,n}(\hat{\rho}_{0,n})+G_{2,n}(\hat{\rho}_{0,n})+G_{3,n}+G_{4,n}, \nonumber \end{align} where \begin{align} & G_{1,n}(\rho) := \frac{1}{\sqrt{n}}\sum_{j=1}^{n} \pi'_{j-1}(\rho)\, \chi'_{j}, \qquad G_{2,n}(\rho) := \frac{1}{\sqrt{n}}\sum_{j=1}^{n} \pi''_{j-1}(\rho)\, \chi''_{j}, \nonumber\\ & G_{3,n} := \frac1n \sum_{j=1}^{n} \pi''_{j-1}(\hat{\rho}_{0,n}) \frac{\sqrt{n}}{h}\left(\mu_{j-1}(\rho_0) - \mu_{j-1}(\hat{\rho}_{0,n})\right)^2 \nonumber\\ and \nonumber\\ & G_{4,n} := \frac1n \sum_{j=1}^{n} \pi''_{j-1}(\hat{\rho}_{0,n}) \frac{\sqrt{n}}{h}\gamma_0\left(c_{j-1}(\rho_0) - c_{j-1}(\hat{\rho}_{0,n})\right). \nonumber \end{align} In what follows, we will write $a_n \lesssim b_n$ if $\sup_n(a_n/b_n)\le c$ for some universal constant $c>0$; even when $a_n$ and $b_n$ are non-negative random variables, we will use the same symbol $a_n \lesssim b_n$ if the inequality holds a.s. To estimate $G_{3,n}$ and $G_{4,n}$, we recall \eqref{hm:cond.mean} and note that $\sup_\rho |\pi''_{j-1}(\rho)| \lesssim X_{t_{j-1}}^{-1}$. We have $G_{3,n}=O_p(n^{-1/2})$, since \begin{align} |G_{3,n}| &\lesssim \frac{1}{\sqrt{n}} \Bigg\{ \bigg(\frac1n \sum_{j=1}^{n} X_{t_{j-1}}^{-1} \bigg) \left|\sqrt{T_n}(\hat{\al}_{0,n} -\alpha)\right|^2 \nonumber\\ &{}\qquad +\bigg(\frac1n \sum_{j=1}^{n} (X_{t_{j-1}} + X_{t_{j-1}}^{-1}) \bigg) \left|\sqrt{T_n}(\hat{\beta}_{0,n} -\beta_0)\right|^2 \Bigg\} \nonumber \end{align} and the terms inside the curly bracket are $O_p(1)$ by the law of large numbers \eqref{hm:LLN}. Likewise, by \eqref{hm:cond.var}, \begin{align} |G_{4,n}| \lesssim \frac1n \sum_{j=1}^{n} X_{t_{j-1}}^{-1} \left|\sqrt{T_n}(\hat{\rho}_{0,n} -\rho_0)\right| \sqrt{h}, \nonumber \end{align} so that $G_{4,n}=O_p(n^{-1/2})$. It remains to deduce that both $G_{1,n}(\hat{\rho}_{0,n})$ and $G_{2,n}(\hat{\rho}_{0,n})$ are $O_p(1)$. Regard $G_{1,n}(\rho)$ and $G_{2,n}(\rho)$ as stochastic processes in $\mathcal{C}(\overline{\Theta_\rho})$. Since Burkholder's inequality ensures that $G_{i,n}(\rho)=O_p(1)$ for each $i=1,2$ and $\rho\in\overline{\Theta_\rho}$, it suffices to verify the tightness of $G_{i,n}(\cdot)$ in $\mathcal{C}(\overline{\Theta_\rho})$. In view of the Kolmogorov tightness criterion (e.g. \cite{IbrHas81}), it is in turn sufficient to show the moment estimate \begin{equation} \exists \delta,K,C>0~\forall\rho,\rho',\quad \sup_n \mathbb{E}\left(\left|G_{1,n}(\rho)-G_{1,n}(\rho')\right|^K\right) \le C |\rho-\rho'|^{2+\delta}. \label{hm:lem_cLSE-p2} \end{equation} Elementary calculations give \begin{align} \sup_\rho |\partial_\rho \pi'_{j-1}(\rho)| &\lesssim \sqrt{h}\big(1+X_{t_{j-1}}^{-1}+X_{t_{j-1}}^{-2}\big). \nonumber \end{align} By the standing assumption that $2\alpha > 5\gamma$ for each $\rho\in\overline{\Theta_\rho}$ and Lemma \ref{hm:lem_AKT}, we can find a sufficiently small $\delta>0$ such that, for $K=2+\delta$, \begin{equation} \sup_{j\le n}\mathbb{E}\left((1+X_{t_{j-1}})^{C'}\sup_\rho |\partial_\rho \pi'_{j-1}(\rho)|^K \right) = O(1). \nonumber \end{equation} By means of Burkholder's and Jensen's inequalities and using the estimate that $\mathbb{E}_{\theta_0}^{j-1}(|\chi'_j|^K) \lesssim (1+X_{t_{j-1}})^{C'}$ a.s. for some universal constant $C'=C'(K)$, we see that \begin{align} & \sup_n \mathbb{E}\left(\left|G_{1,n}(\rho)-G_{1,n}(\rho')\right|^K\right) \nonumber\\ &= \sup_n \mathbb{E}\left(\left|\frac{1}{\sqrt{n}} \sum_{j=1}^{n} \left(\pi'_{j-1}(\rho)-\pi'_{j-1}(\rho')\right) \chi'_j \right|^K\right) \nonumber\\ &\lesssim \sup_n \mathbb{E}\left(\left| \frac1n \sum_{j=1}^{n} \left(\pi'_{j-1}(\rho)-\pi'_{j-1}(\rho')\right)^2 (\chi'_j)^2 \right|^{K/2}\right) \nonumber\\ &\lesssim \sup_n \frac1n \sum_{j=1}^{n} \mathbb{E}\left\{\left(\pi'_{j-1}(\rho)-\pi'_{j-1}(\rho')\right)^K \mathbb{E}_{\theta_0}^{j-1}(|\chi'_j|^K) \right\} \nonumber\\ &\lesssim \sup_n \frac1n \sum_{j=1}^{n} \mathbb{E}\left((1+X_{t_{j-1}})^{C'}\sup_\rho |\partial_\rho \pi'_{j-1}(\rho)|^K \right) |\rho-\rho'|^{K} \nonumber\\ &\lesssim |\rho-\rho'|^{K}. \nonumber \end{align} This verifies \eqref{hm:lem_cLSE-p2} for $G_{1,n}$. In a similar manner we can deduce \eqref{hm:lem_cLSE-p2} for $G_{2,n}$ by using \begin{align} \sup_\rho |\partial_\rho \pi''_{j-1}(\rho)| &\lesssim h \big(X_{t_{j-1}}^{-1} + X_{t_{j-1}}^{-2}\big). \nonumber \end{align} Thus, we have seen that both $G_{1,n}(\cdot)$ and $G_{2,n}(\cdot)$ are tight in $\mathcal{C}(\overline{\Theta_\rho})$. Hence $\sqrt{n}(\hat{\gam}_{0,n}-\gamma_0)=O_p(1)$, completing the proof. \end{proof} We could prove the asymptotic normality of $D_n(\hat{\theta}_{0,n}-\theta_0)$ directly by means of the central limit theorem for martingale difference arrays, though it does not play an important role in our study. \subsection{Asymptotics for joint GQMLE} Recall the definitions \eqref{hm:def_GQLF}, \eqref{hm:def_GQMLE}, and \eqref{hm:def_D}. The objective of this section is to deduce the asymptotic normality of the GQMLE. Let $\stackrel{\mathcal{L}}{\to}$ denote the convergence in law, and recall \eqref{hm:def_I} for the definition of $\mathcal{I}(\theta_0)$. \begin{lemma} \label{hm:lem_AN.GQMLE} We have \begin{equation} D_n(\hat{\theta}_n-\theta_0) \stackrel{\mathcal{L}}{\to} N_p\left(0,\, \mathcal{I}(\theta_0)^{-1}\right). \label{hm:gqmle-t2} \end{equation} \end{lemma} Trivially we have \begin{equation} \mathcal{I}(\hat{\theta}_n)^{1/2}D_n(\hat{\theta}_n-\theta_0) \stackrel{\mathcal{L}}{\to} N_p\left(0,\, I_3\right), \nonumber \end{equation} where $I_p$ denotes the $p$-dimensional identity matrix. The scenario of the proof is much the same as in the classic uniformly-elliptic diffusion models as in \cite{Kes97}, except that we need to take care about tightness/integrability issues caused by the diffusion-coefficient form. Before proceeding to the proof, we introduce some notation and make a few remarks. Given a random function $\zeta_n(\theta)$ and a real sequence $r_n>0$, we will write $\zeta_n(\theta)=o_p^\ast(r_n)$ and $\zeta_n(\theta)=O_p^\ast(r_n)$ if $\sup_\theta |r_n^{-1}\zeta_n(\theta)|\stackrel{p}{\to} 0$ and $\sup_\theta |r_n^{-1}\zeta_n(\theta)|=O_p(1)$, respectively; we will analogously write $\zeta_n(\theta)=o^\ast(r_n)$ and $\zeta_n(\theta)=O^\ast(r_n)$ when $\zeta_n$ is non-random. We also note that under \eqref{hm:LLN} the following uniform law of large numbers is in force: \begin{equation} \frac1n \sum_{j=1}^{n} f_{j-1}(\rho) \stackrel{p}{\to} \int f(x,\rho)\pi_0(dx) \label{hm:gqmle-t3} \end{equation} uniformly in $\rho=(\alpha,\beta)$ for any measurable $f$ such that \begin{equation} \max_{k=0,1}\sup_\rho |\partial_{\rho}^k f(x,\rho)| \lesssim |x|^{-2} \vee (1+|x|^K), \qquad x>0, \nonumber \end{equation} for some $K\ge 0$; this does hold, since we have the tightness \begin{equation} \sup_\rho \left| \frac1n\sum_{j=1}^{n} \partial_\rho f_{j-1}(\rho)\right| = O_p(1) \nonumber \end{equation} in addition to the $\rho$-wise convergence \eqref{hm:gqmle-t3}, so that the stochastic Ascoli-Arzel\`{a} theorem \cite[Theorem 7.3]{Bil99} applies. This fact will be repeatedly used in the sequel without mentioning. \medskip Now, we turn to proving \eqref{hm:gqmle-t2}. The consistency $\hat{\theta}_n\stackrel{p}{\to}\theta_0$ can be derived in a similar manner to \cite{Kes97}, through applying the argmax theorem twice. At first stage, we define \begin{align} \mathbb{Y}_{1,n}(\gamma) &= \frac1n\left( \mathbb{H}_n(\hat{\rho}_n,\gamma)-\mathbb{H}_n(\hat{\rho}_n,\gamma_0)\right), \nonumber\\ \mathbb{Y}_{1,0}(\gamma) &= -\frac12 \left(\log \frac{\gamma}{\gamma_0}+\frac{\gamma_0}{\gamma}-1\right), \nonumber \end{align} the former being maximized at $\hat{\gam}_n$. The argmax theorem ensures $\hat{\gam}_n\stackrel{p}{\to}\gamma_0$ if we show that $\sup_\gamma|\mathbb{Y}_{1,n}(\gamma) - \mathbb{Y}_{1,0}(\gamma)|\stackrel{p}{\to} 0$ and $\mathrm{argmax}\,\mathbb{Y}_{1,0}=\{\gamma_0\}$. The latter is trivial, and the former can be seen as follows: since $h\mathbb{E}_{\theta_0}^{j-1}\{(\chi'_{j})^2\}=\sigma_{j-1}^2(\theta_0)$ with $\chi'_{j}$ given by \eqref{hm:def_chi1}, applying Burkholder's inequality and \eqref{hm:LLN} we obtain \tcr{ \begin{align} \mathbb{Y}_{1,n}(\gamma) &= -\frac{1}{2n} \sum_{j=1}^{n}\left\{ \log\left(\frac{\sigma_{j-1}^2(\rho_0,\gamma)}{\sigma_{j-1}^2(\theta_0)}\right) +\left(\sigma_{j-1}^{-2}(\rho_0,\gamma) - \sigma_{j-1}^{-2}(\theta_0)\right)\,(\chi'_{j})^2h\right\} \nonumber\\ &= -\frac{1}{2n} \sum_{j=1}^{n}\bigg\{ \log\frac{\gamma}{\gamma_0} +\bigg(\frac{1}{\gamma}-\frac{1}{\gamma_0}\bigg) c_{j-1}^{-1}(\rho_0) (\chi'_{j})^2h \bigg\}\nonumber\\ &=-\frac{1}{2n} \sum_{j=1}^{n}\bigg\{ \log\frac{\gamma}{\gamma_0} +\bigg(\frac{\gamma_0}{\gamma}-1\bigg)\bigg\} + O^\ast_p\left(\frac{1}{\sqrt{n}}\right) \nonumber\\ &= \mathbb{Y}_{1,0}(\gamma) + o^\ast_p(1). \label{hm:gqmle-t1} \end{align} As for the consistency of $\hat{\rho}_n=(\hat{\al}_n,\hat{\beta}_n)$, we introduce \begin{align} \mathbb{Y}_{2,n}(\rho) &:= \frac{1}{T_n}\left( \mathbb{H}_n(\rho,\hat{\gam}_n)-\mathbb{H}_n(\rho_0,\hat{\gam}_n)\right), \nonumber\\ \mathbb{Y}_{2,0}(\rho) &:= -\frac{1}{2\gamma_0} (\rho-\rho_0)^\top \int \begin{pmatrix} x^{-1} & -1 \\ -1 & x \end{pmatrix} \pi_{0}(dx) (\rho-\rho_0). \nonumber \end{align} Obviously, we have $\mathrm{argmax}_{\rho}\,\mathbb{Y}_{2,n}(\rho)=\{\rho_0\}$. Some manipulation gives the following decomposition: \begin{align} \mathbb{Y}_{2,n}(\rho) &= -\frac{1}{2T_n}\sum_{j=1}^{n} \log\left(\frac{c_{j-1}(\rho)}{c_{j-1}(\rho_0)}\right) -\frac{\hat{\gam}_n^{-1}}{2T_n} \sum_{j=1}^{n} \Big(c_{j-1}^{-1}(\rho)h\left\{(\chi'_{j}(\rho))^2 - (\chi'_{j})^2\right\} \nonumber\\ &{}\qquad +h(c_{j-1}^{-1}(\rho)-c_{j-1}^{-1}(\rho_0))(\chi'_{j})^2\Big) \nonumber\\ &= \mathbb{Y}_{2,n}^{(1)}(\rho) + \mathbb{Y}_{2,n}^{(2)}(\rho) + \mathbb{Y}_{2,n}^{(3)}(\rho), \nonumber \end{align} where, letting $g_{j-1}(\rho):=c_{j-1}(\rho_0)/c_{j-1}(\rho)$, \begin{align} \mathbb{Y}_{2,n}^{(1)}(\rho) &:= \frac12\left(-\frac{1}{T_n} \sum_{j=1}^{n} \log g_{j-1}(\rho) + \frac{\hat{\gam}_n^{-1}}{T_n} \sum_{j=1}^{n} (g_{j-1}(\rho)-1) h (\chi'_j)^2 \right), \nonumber\\ \mathbb{Y}_{2,n}^{(2)}(\rho) &:= \frac{\hat{\gam}_n^{-1}}{\sqrt{T_n}} \, \left\{\frac{1}{\sqrt{n}}\sum_{j=1}^{n} \pi''_{j-1}(\rho) \left(\frac{\mu_{j-1}(\rho)-\mu_{j-1}}{h}\right) \chi'_j \right\}, \nonumber\\ \mathbb{Y}_{2,n}^{(3)}(\rho) &:= - \frac{\hat{\gam}_n^{-1}}{2n} \sum_{j=1}^{n} \pi''_{j-1}(\rho) \left(\frac{\mu_{j-1}(\rho)-\mu_{j-1}}{h}\right)^2. \nonumber \end{align} In an analogous manner to \eqref{hm:gqmle-t1} and through the tightness criterion as in the proof of Lemma \ref{hm:lem_cLSE}, we can obtain $\mathbb{Y}_{2,n}^{(2)}(\rho)= O_p^\ast(T_n^{-1/2})=o_p^\ast(1)$ and $\mathbb{Y}_{2,n}^{(3)}(\rho) =\mathbb{Y}_{2,0}(\rho) + o_p^\ast(1)$. To see that $\mathbb{Y}_{2,n}^{(1)}(\rho)$, we note the inequality $0\le -(\log x) + x-1\le(2^{-1} \vee x^{-1})(x-1)^2$ valid for $x>0$ and the bound $|g_{j-1}(\rho)-1|\lesssim h(1+X_{t_{j-1}}^{-1})$. Using them together with the consistency of $\hat{\gam}_n$ and the tightness argument as before, we obtain \begin{align} \mathbb{Y}_{2,n}^{(1)}(\rho) &= \frac{1}{2 T_n} \sum_{j=1}^{n} \Big(-\log g_{j-1}(\rho) + (g_{j-1}(\rho)-1)\Big) \nonumber\\ &{}\qquad - \frac{\hat{\gam}_n^{-1}(\hat{\gam}_n-\gamma_0)}{2T_n} \sum_{j=1}^{n} (g_{j-1}(\rho)-1)+O^\ast_p\left(\frac{1}{\sqrt{n}}\right) \nonumber\\ &=O^\ast_p\left(\frac{nh^2}{T_n}\right)+o^\ast_p(1) +O^\ast_p\left(\frac{1}{\sqrt{n}}\right) = o^\ast_p(1). \nonumber \end{align} } After all we have derived $\mathbb{Y}_{2,n}^{(1)}(\rho)=\mathbb{Y}_{2,0}(\rho)+o_p^\ast(1)$, hence followed by $\hat{\rho}_n\stackrel{p}{\to}\rho_0$. \medskip Having the consistency of $\hat{\theta}_n$ in hand, we proceed with the standard route through the third-order Taylor expansion of $\partial_\theta\mathbb{H}_n(\hat{\theta}_n)$ around $\theta_0\in\Theta$. That is, we may and do focus on the event $\{\partial_\theta\mathbb{H}_n(\hat{\theta}_n)=0\}$, on which \begin{equation} 0 = D_n^{-1}\partial_\theta\mathbb{H}_n(\theta_0) + \left( -\int_0^1 D_n^{-1}\partial_\theta^2\mathbb{H}_n\left(\theta_0+s(\hat{\theta}_n-\theta_0)\right)D_n^{-1} ds \right) [D_n(\hat{\theta}_n-\theta_0)]. \nonumber \end{equation} Hence, by the consistency $\hat{\theta}_n\stackrel{p}{\to}\theta_0$, it suffices to verify the following statements: \begin{description} \item[{\rm (AN1)}] $\ds{\Delta_n(\theta_0) := D_n^{-1}\partial_\theta\mathbb{H}_n(\theta_0) \stackrel{\mathcal{L}}{\to} N_p\left(0,\mathcal{I}(\theta_0)\right)}$; \item[{\rm (AN2)}] $\ds{\mathcal{I}_n(\theta_0) := -D_n^{-1}\partial_\theta^2\mathbb{H}_n(\theta_0) D_n^{-1} \stackrel{p}{\to} \mathcal{I}(\theta_0)}$; \item[{\rm (AN3)}] $\ds{\sup_{\theta:\,|\theta-\theta_0|\le\delta_n} \left|\mathcal{I}_n(\theta)-\mathcal{I}(\theta_0)\right| \stackrel{p}{\to} 0}$ for any (non-random) positive sequence $\delta_n\to 0$. \end{description} Let us look at the the partial derivatives $\partial_\theta^k\mathbb{H}_n(\theta)=\partial_{(\rho,\gamma)}^k\mathbb{H}_n(\rho,\gamma)$ for $k=1,2$ through the expression \eqref{hm:def_GQLF}: with the notation introduced in Section \ref{hm:sec_preliminary.est}, \begin{align} \mathbb{H}_n(\theta) &= C_n -\frac12 \sum_{j=1}^{n} \left( \log\gamma + \log c_{j-1}(\rho) + \frac{h}{\gamma c_{j-1}(\rho)} \chi'_{j-1}(\rho)^2 \right). \nonumber \end{align} The calculations will be elementary, yet tedious. For notational convenience we will write $A_k(x;\rho,h)$, $k\ge 0$, for a generic matrix-valued measurable function on $\mathbb{R}\times\Theta_\rho\times (0,1]$ such that \begin{equation} \exists C>0,\quad \limsup_{h\to 0}\,\sup_\rho|A_k(x;\rho,h)| \lesssim \frac{1+|x|^C}{1\wedge |x|^k}. \label{hm:A_property} \end{equation} Further, we write $\mathcal{A}_k(\rho,h)$ for the set of all $A_k(x;\rho,h)$ satisfying \eqref{hm:A_property}. It should be noted that by the assumption \eqref{hm:param.assumption} and Lemma \ref{hm:lem_AKT}, for each $k<5$ we can find a (small) constant $\epsilon_k>0$ such that \begin{equation} \sup_t \mathbb{E}\left( |A_k(X_t;\rho,h)|^{1+\epsilon_k} \right)<\infty. \label{hm:A_property2} \end{equation} \begin{proof}[Proof of (AN1)] Let $\zeta_j:=(\chi'_j,\chi''_j)=(\chi'_j(\rho_0),\chi''_j(\theta_0))$. In what follows, we abbreviate $\partial_\rho$ as ``overhead dot'' (like $\partial_\rho \mu_{j-1}(\rho)$ as $\dot{\mu}_{j-1}(\rho)$), respectively, and moreover, omit ``$(\theta_0)$'' and ``$(\rho_0)$'' from the notation. Then, straightforward calculations lead to \begin{align} \Delta_n(\theta_0) &= D_n^{-1}\sum_{j=1}^{n} \begin{pmatrix} \frac{\dot{\mu}_{j-1} \sqrt{h}}{\gamma_0 c_{j-1}} & \frac{\dot{c}_{j-1} h}{2\gamma_0 c_{j-1}^2} \\ 0 & \frac{h}{2\gamma_0^2 c_{j-1}} \end{pmatrix} [\zeta_j] = \frac{1}{\sqrt{n}}\sum_{j=1}^{n} \begin{pmatrix} \frac{\dot{\mu}_{j-1}}{\gamma_0 c_{j-1}} & \frac{\dot{c}_{j-1} h}{2\gamma_0 c_{j-1}^2} \\ 0 & \frac{h}{2\gamma_0^2 c_{j-1}} \end{pmatrix} [\zeta_j]. \nonumber \end{align} Note that $\frac{\dot{\mu}_{j-1}}{\gamma_0 c_{j-1}}$ and $\frac{h}{2\gamma_0^2 c_{j-1}}$ belong to the class $\mathcal{A}_1(\rho,h)$ as functions of $X_{t_{j-1}}$, while $\frac{\dot{c}_{j-1}}{2\gamma_0 c_{j-1}^2}$ to $\mathcal{A}_1(\rho,h)$. By the Burkholder and H\"{o}lder inequalities combined with the $L^q$-property of $(\zeta_j)$, we obtain, for $\delta>0$ small enough, \begin{align} & \mathbb{E}\left(\left|\frac{1}{\sqrt{n}}\sum_{j=1}^{n} \frac{\dot{c}_{j-1} }{2\gamma_0 c_{j-1}^2} [\zeta_j] \right|^2 \right) \nonumber\\ &\lesssim \frac1n \sum_{j=1}^{n} \mathbb{E}\left(\left|\frac{\dot{c}_{j-1} }{2 c_{j-1}^2} [\zeta_j] \right|^2 \right) \nonumber\\ &\lesssim \frac1n \sum_{j=1}^{n} \mathbb{E}\left(\left|\frac{\dot{c}_{j-1}/h^2 }{2 (c_{j-1}/h)^2}\right|^{2+\delta}\right)^{2/(2+\delta)} \mathbb{E}\left(\left| \zeta_j\right|^{2(2+\delta)/\delta}\right)^{\delta/(2+\delta)} \lesssim 1, \label{AN1_p1} \end{align} where we used \eqref{hm:A_property2}. The estimate \eqref{AN1_p1} entails that the off-diagonal part in the expression of $\Delta_n(\theta_0)$ is of order $O_p(h)$, hence is asymptotically negligible. Write $\mathbb{E}^{j-1}:=\mathbb{E}^{j-1}_{\theta_0}$, and also \tcr{$x^{\otimes2} := xx^{\top}$ for any vector or matrix $x$.} Using Lemma \ref{hm:lem_AKT} and the same argument as in \eqref{hm:gqmle-t1}, we see that the leading term of the quadratic characteristic of $\Delta_n(\theta_0)$ equals \begin{align} & \frac{1}{n}\sum_{j=1}^{n} \begin{pmatrix} \frac{\dot{\mu}_{j-1}}{\gamma_0 c_{j-1}} & 0 \\ 0 & \frac{h}{2\gamma_0^2 c_{j-1}} \end{pmatrix} \mathbb{E}^{j-1}\left(\zeta_j^{\otimes 2}\right) \begin{pmatrix} \frac{\dot{\mu}_{j-1}}{\gamma_0 c_{j-1}} & 0 \\ 0 & \frac{h}{2\gamma_0^2 c_{j-1}} \end{pmatrix}^{\top} \nonumber\\ &= \frac{1}{n}\sum_{j=1}^{n} \begin{pmatrix} \frac{\dot{\mu}_{j-1}}{\gamma_0 c_{j-1}} & 0 \\ 0 & \frac{h}{2\gamma_0^2 c_{j-1}} \end{pmatrix} \begin{pmatrix} \sigma_{j-1}^2(\theta_0)/h & (\chi'_j)^3 \sqrt{h} - (\sigma_{j-1}^2/h) \sqrt{h}\, \chi'_j \\ \mathrm{sym.} & \mathbb{E}^{j-1}\left\{((\chi'_j)^2 - \sigma^2_{j-1}/h)^2\right\} \end{pmatrix} \nonumber\\ &{}\qquad \times \begin{pmatrix} \frac{\dot{\mu}_{j-1}}{\gamma_0 c_{j-1}} & 0 \\ 0 & \frac{h}{2\gamma_0^2 c_{j-1}} \end{pmatrix}^{\top} \nonumber\\ &= \frac{1}{n}\sum_{j=1}^{n} \begin{pmatrix} \frac{\dot{\mu}_{j-1}^{\otimes 2}}{h \sigma^2_{j-1}} & 0 \\ 0 & \frac{1}{2\gamma_0^2} \end{pmatrix} + o_p(1) \nonumber\\ &= \frac{1}{n}\sum_{j=1}^{n} \mathrm{diag} \left\{ \frac{1}{\gamma_0} \begin{pmatrix} X_{t_{j-1}}^{-1} & -1 \\ -1 & X_{t_{j-1}} \end{pmatrix},~\frac{1}{2\gamma_0^2} \right\} + o_p(1) \nonumber\\ &= \frac{1}{n}\sum_{j=1}^{n} \mathrm{diag} \left\{ \frac{1}{\gamma_0}\int_0^\infty \begin{pmatrix} x^{-1} & -1 \\ -1 & x \end{pmatrix} \pi_0(dx),~\frac{1}{2\gamma_0^2} \right\} + o_p(1) \stackrel{p}{\to} \mathcal{I}(\theta_0). \nonumber \end{align} In a quite similar manner to \eqref{AN1_p1}, we can pick a $\delta\in(0,3)$ for which the H\"older inequality guarantees \begin{align} & \sum_{j=1}^{n} \mathbb{E}\left(\left|\frac{1}{\sqrt{n}}\frac{\dot{\mu}_{j-1}}{\gamma_0 c_{j-1}}[\zeta_j]\right|^{2+\delta}\right) + \sum_{j=1}^{n} \mathbb{E}\left(\left|\frac{1}{\sqrt{n}}\frac{h}{2\gamma_0^2 c_{j-1}}[\zeta_j]\right|^{2+\delta}\right) \nonumber\\ &\lesssim \frac{1}{n^{\delta/2}} \cdot \frac1n\sum_{j=1}^{n} 1 \lesssim \frac{1}{n^{\delta/2}} \to 0. \nonumber \end{align} This verifies the Lyapunov condition, and the martingale central limit theorem concludes (AN1). \end{proof} The arguments concerning moment estimates in the above proof will be repeatedly used in the proofs of (AN2) and (AN3), hence we will proceed without mentioning the full details. \begin{proof}[Proof of (AN2)] By computing $\partial_\theta^2\mathbb{H}_n(\theta)$, we observe that \begin{align} -\frac{1}{T_n}\partial^2_\rho\mathbb{H}_n &= \frac1n\sum_{j=1}^{n} \frac{(\dot{\mu}_{j-1}/h)^{\otimes 2}}{\sigma^2_{j-1}/h} +\frac1n\sum_{j=1}^{n}\Big( h A_2(X_{t_{j-1}};\rho,h) \nonumber\\ &{}\qquad + \sqrt{h} A_2(X_{t_{j-1}};\rho,h)\chi'_j + h A_3(X_{t_{j-1}};\rho,h)\chi''_j \Big) \nonumber\\ &=\frac1n\sum_{j=1}^{n} \frac{(\dot{\mu}_{j-1}/h)^{\otimes 2}}{\sigma^2_{j-1}/h} + o_p(1) \nonumber\\ &=\frac{1}{\gamma_0}\int_0^\infty \begin{pmatrix} x^{-1} & -1 \\ -1 & x \end{pmatrix} \pi_0(dx) + o_p(1), \nonumber\\ -\frac{1}{n\sqrt{h}}\partial_\rho\partial_\gamma\mathbb{H}_n &= \frac1n\sum_{j=1}^{n} \Big( \sqrt{h} A_1(X_{t_{j-1}};\rho,h) + A_1(X_{t_{j-1}};\rho,h)\chi'_j \nonumber\\ &{}\qquad + \sqrt{h} A_2(X_{t_{j-1}};\rho,h)\chi''_j \Big) \nonumber\\ &=o_p(1), \nonumber\\ -\frac{1}{n}\partial^2_\gamma\mathbb{H}_n &= \frac{1}{2\gamma_0^2} + \frac1n\sum_{j=1}^{n} A_2(X_{t_{j-1}};\rho,h) \chi''_j = \frac{1}{2\gamma_0^2} + o_p(1). \nonumber \end{align} Applying Lemma \ref{hm:lem_AKT} with \eqref{hm:A_property2} to these expressions yields (AN2): $\mathcal{I}_n(\theta_0) \stackrel{p}{\to} \mathcal{I}(\theta_0)$. \end{proof} \begin{proof}[Proof of (AN3)] To show the claim, we simply look at the uniform-in-$\theta$ behavior of $\partial_\theta^3\mathbb{H}_n(\theta)$. Further by continuing the partial differentiations from $\partial_\theta^2\mathbb{H}_n(\theta)$ and again applying Lemma \ref{hm:lem_AKT} with \eqref{hm:A_property2}, it is not difficult to deduce the order estimate $\sup_\theta \left|\partial_\theta\mathcal{I}_n(\theta)\right| = O_p(1)$. The claim follows on noting that \begin{align} \sup_{\theta:\,|\theta-\theta_0|\le\delta_n} \left|\mathcal{I}_n(\theta) -\mathcal{I}(\theta_0)\right| &\lesssim \left|\mathcal{I}_n(\theta_0) -\mathcal{I}(\theta_0)\right| + \delta_n \sup_\theta \left|\partial_\theta\mathcal{I}_n(\theta)\right| \nonumber\\ &=o_p(1) + O_p(\delta_n) = o_p(1) \nonumber \end{align} by (AN2). \end{proof} \subsection{One-step improvement} We have seen that $D_n(\hat{\theta}_{0,n}-\theta_0) = O_p(1)$ and $D_n(\hat{\theta}_n-\theta_0) \stackrel{\mathcal{L}}{\to} N_p\left(0,\, \mathcal{I}(\theta_0)^{-1}\right)$ in Lemmas \ref{hm:lem_cLSE} and \ref{hm:lem_AN.GQMLE}, respectively. Let us now look at the Newton-Raphson method and the method of scoring, from $\hat{\theta}_{0,n}$ to the joint GQMLE $\hat{\theta}_n$ defined by \eqref{hm:def_GQMLE}: \begin{align} \hat{\theta}_{n}^{(1,1)} &= \hat{\theta}_{0,n}-\left(\partial_{\theta}^2\mathbb{H}_n(\hat{\theta}_{0,n})\right)^{-1}\partial_{\theta}\mathbb{H}_n(\hat{\theta}_{0,n}), \label{onestep-NR}\\ \hat{\theta}_{n}^{(1,2)} &= \hat{\theta}_{0,n}+D_{n}^{-1}\mathcal{I}(\hat{\theta}_{0,n})^{-1}D_{n}^{-1}\partial_{\theta}\mathbb{H}_n(\hat{\theta}_{0,n}). \label{onestep-scoring} \end{align} Observe that the following statements hold from what we have obtained so far, in particular (AN1) to (AN3): \begin{align} & |\mathcal{I}_n(\hat{\theta}_{0,n})^{-1}| = O_p(1), \nonumber\\ & |I_p - \mathcal{I}_n(\hat{\theta}_{0,n})^{-1}\mathcal{I}_n(\hat{\theta}_{0,n}')| = o_p(1), \nonumber \end{align} where $\hat{\theta}_{0,n}'$ is any random point on the segment connecting $\hat{\theta}_{0,n}$ and $\hat{\theta}_n$. Let $\hat{\del}_{0,n} := D_n(\hat{\theta}_{0,n}-\hat{\theta}_n)$; we have $\hat{\del}_{0,n}=O_p(1)$. \tcr{Recall that we are focusing on the event $\{\partial_\theta\mathbb{H}_n(\hat{\theta}_n)=0\}$, so that $\Delta_n(\hat{\theta}_n)=0$.} For some $\hat{\theta}_{0,n}'$ as above, \begin{align} D_n(\hat{\theta}_{n}^{(1,1)} - \hat{\theta}_n) &= \hat{\del}_{0,n} + \mathcal{I}_n(\hat{\theta}_{0,n})^{-1} \Delta_n(\hat{\theta}_{0,n}) \nonumber\\ &= \hat{\del}_{0,n} + \mathcal{I}_n(\hat{\theta}_{0,n})^{-1} \left\{\Delta_n(\hat{\theta}_n) + D_n^{-1}\partial_\theta^2\mathbb{H}_n(\hat{\theta}_{0,n}')[\hat{\theta}_{0,n}-\hat{\theta}_n]\right\} \nonumber\\ &= \left( I_p - \mathcal{I}_n(\hat{\theta}_{0,n})^{-1}\mathcal{I}_n(\hat{\theta}_{0,n}') \right) \hat{\del}_{0,n} = o_p(1). \nonumber \end{align} Hence, we obtained $D_n(\hat{\theta}_{n}^{(1,1)}-\hat{\theta}_n) = o_p(1)$. An analogous argument leads to $D_n(\hat{\theta}_{n}^{(1,2)}-\hat{\theta}_n) = o_p(1)$, and we conclude the following theorem. \begin{theorem} \label{thm_GQMLEs} We have $D_n(\hat{\theta}_{n}^{(1,i)}-\hat{\theta}_n) = o_p(1)$ for $i=1,2$, hence in particular, the asymptotic normality \begin{align} D_n(\hat{\theta}_{n}^{(1,i)}-\theta_0) \stackrel{\mathcal{L}}{\to} N_3\left(0,\,\mathcal{I}(\theta_0)^{-1}\right) \nonumber \end{align} and their Studentized versions \begin{equation} \mathcal{I}(\hat{\theta}_{n}^{(1,i)})^{1/2}D_n(\hat{\theta}_{n}^{(1,i)}-\theta_0) \stackrel{\mathcal{L}}{\to} N_3(0, I_3) \nonumber \end{equation} hold. \end{theorem} We end this section with several remarks. \begin{remark} \label{rem_GQMLEs-1} \begin{enumerate} \item The previous study \cite{AlaKebTra20} derived the local asymptotic normality for $(\alpha,\beta)$, assuming that the diffusion parameter $\gamma$ is known: \cite[Theorem 1]{AlaKebTra20} says that, if $\theta_0\in\Theta$ further satisfies that \begin{equation} \frac{2\alpha_0}{\gamma_0} > \frac{11+\sqrt{89}}{2} \approx 10.217, \nonumber \end{equation} then any regular estimator $(\hat{\al}_n^\star,\hat{\beta}_n^\star)$ such that \begin{equation} \left(\sqrt{T_n}(\hat{\al}_n^\star -\alpha_0),\,\sqrt{T_n}(\hat{\beta}_n^\star-\beta_0)\right) \stackrel{\mathcal{L}}{\to} N_2\left(0,\, \left\{ \frac{1}{\gamma_0} \begin{pmatrix} \frac{\beta_0}{\alpha_0-\gamma_0/2} & -1 \\ -1 & \frac{\alpha_0}{\beta_0} \end{pmatrix} \right\}^{-1} \right) \nonumber \end{equation} is asymptotically efficient in the sense of Haj\'{e}k-Le Cam. Theorem \ref{thm_GQMLEs} suggests that the asymptotic optimality of the GQMLE would remain valid under a weaker restriction on the parameter space; recall \eqref{hm:param.assumption}. On the one hand, the optimality of the GMQLE may seem unnatural since the small-time Gaussian approximation is quite inappropriate for the non-central chi-square distribution. On the other hand, it is natural since the driving noise is Gaussian, so that the model would be approximately Gaussian in small time. Note that this observation is just an intuition, and does not theoretically run counter to anything. \item It is well-known in the literature that high-frequency data over any bounded domain, say $[0,T]$ for fixed $T>0$ (namely $T_n\equiv T$), is enough to consistently estimate $\gamma$ even when the diffusion coefficient is not uniformly elliptic: see the seminal paper \cite{genon1993} for details. We may set $t_j=Tj/n$ for a fixed $T>0$, and then the modified quasi-log likelihood \begin{equation} \gamma \mapsto \sum_{j=1}^{n} \log \phi\left( X_{t_j};\, 0,\, h\gamma X_{t_{j-1}} \right), \nonumber \end{equation} where the drift coefficient is completely ignored, would provide us with an asymptotically normally distributed estimator of $\gamma$ with convergence rate being $\sqrt{n}$. In this case, the drift coefficient may be regarded as an infinite-dimensional nuisance element, while we cannot consistently estimate it in theory. \item Since we know beforehand that $(\hat{\al}_n,\hat{\beta}_n)$ and $\hat{\gam}_n$ are asymptotically independent, we may replace $\partial_{\theta}^2\mathbb{H}_n(\hat{\theta}_{0,n})$ in \eqref{onestep-NR} by the simpler block-diagonal form \begin{equation} \mathrm{diag}\left(\partial_{\rho}^2\mathbb{H}_n(\hat{\theta}_{0,n}),\,\partial_{\gamma}^2\mathbb{H}_n(\hat{\theta}_{0,n})\right). \nonumber \end{equation} \end{enumerate} \end{remark} \section{Numerical experiments} \label{nh:sec_simulations} In this section, we compare simulation results of the initial estimator \eqref{hm:aesz_def}, \eqref{hm:besz_def}, \eqref{hm:gesz_def} with the one step estimators based on the Newton-Raphson \eqref{onestep-NR} and the scoring method \eqref{onestep-scoring}. We use exact CIR simulator for $(X_{t_j})_{j=1,\dots,n}$ through non-central chi-squares \cite{MalWie13}. The 1.000 simulated estimators are performed for $n=5.000, 10.000, 20.000$ and $T=T_n=500, 1.000, 2.000$. So that the condition $\frac{2\alpha}{\gamma}>5$ is fulfilled, we choose as true value $\theta_0=(\alpha_0,\beta_0,\gamma_0)=(3,1,1)$. Table \ref{table1} summarizes the mean and standard deviation (sd) of these estimators. As a comparison for the behavior at smaller $T$ and $n$, we contrast boxplots for $T=500, n=5.000$ and $T=50, n=200$ (Figures \ref{fig1} to \ref{fig3}). Additionally, the corresponding histograms are given in Figure \ref{fig4} and \ref{fig5}. \begin{table} \caption{The mean and the standard deviation (sd) of the estimators with true values $(\alpha_0,\beta_0,\gamma_0)=(3,1,1)$.} \label{table1} {\tiny \begin{align*} \begin{array}{cccccccccc} \hline n=5.000& & T=500 & & &T=1.000& & &T=2.000 &\\ \textrm{initial}& \hat{\alpha}_{0,n} &\hat{\beta}_{0,n} &\hat{\gamma}_{0,n}& \hat{\alpha}_{0,n} &\hat{\beta}_{0,n} &\hat{\gamma}_{0,n}& \hat{\alpha}_{0,n} &\hat{\beta}_{0,n} &\hat{\gamma}_{0,n}\\ \hline \textrm{mean}& 3.0188 & 1.0079 & 0.9998 & 3.0200 & 1.0072 & 1.0023& 3.0037 &1.0015 & 1.0006\\ \textrm{sd}&0.2111 & 0.0752 & 0.0211 & 0.1570 & 0.0552 & 0.0235 & 0.1216 & 0.0421 & 0.0254\\ \hline \hline \textrm{Newton} & \hat{\alpha}_{1,n} &\hat{\beta}_{1,n} &\hat{\gamma}_{1,n}& \hat{\alpha}_{1,n} &\hat{\beta}_{1,n} &\hat{\gamma}_{1,n}& \hat{\alpha}_{1,n} &\hat{\beta}_{1,n} &\hat{\gamma}_{1,n}\\ \hline \textrm{mean}&3.0141 &1.0064 &1.0001 & 3.0197 & 1.0071 & 1.0025 & 3.0027 & 1.0012 & 1.0010\\ \textrm{sd} & 0.1872 & 0.0681 & 0.0220 & 0.1435 & 0.0515 & 0.0248 & 0.1156 & 0.0403 & 0.0270\\ \hline \hline \textrm{scoring} & \hat{\alpha}_{2,n} &\hat{\beta}_{2,n} &\hat{\gamma}_{2,n}& \hat{\alpha}_{2,n} &\hat{\beta}_{2,n} &\hat{\gamma}_{2,n}& \hat{\alpha}_{2,n} &\hat{\beta}_{2,n} &\hat{\gamma}_{2,n}\\ \hline \textrm{mean} & 3.0105 & 1.0052 & 0.9998 & 3.0182 & 1.0066 & 1.0023 & 3.0017 & 1.0008 & 1.0006\\ \textrm{sd }& 0.1877 & 0.0682 & 0.0211 & 0.1434 & 0.0514 & 0.0235 & 0.1152 & 0.0400 & 0.0255 \\ \hline \hline n=10.000 & &&&&&&&&\\ \textrm{initial}& \hat{\alpha}_{0,n} &\hat{\beta}_{0,n} &\hat{\gamma}_{0,n}& \hat{\alpha}_{0,n} &\hat{\beta}_{0,n} &\hat{\gamma}_{0,n}& \hat{\alpha}_{0,n} &\hat{\beta}_{0,n} &\hat{\gamma}_{0,n}\\ \hline \textrm{mean} & 3.0351 & 1.0129 & 1.0001 & 3.0152 & 1.0060 & 1.0003 & 3.0097 & 1.0026 & 1.0012 \\ \textrm{sd} & 0.2143 & 0.0741 & 0.0145 & 0.1519 & 0.0541 & 0.0150 & 0.1135 & 0.0404 & 0.0167 \\ \hline \hline \textrm{Newton} & \hat{\alpha}_{1,n} &\hat{\beta}_{1,n} &\hat{\gamma}_{1,n}& \hat{\alpha}_{1,n} &\hat{\beta}_{1,n} &\hat{\gamma}_{1,n}& \hat{\alpha}_{1,n} &\hat{\beta}_{1,n} &\hat{\gamma}_{1,n}\\ \hline \textrm{mean} & 3.0257 & 1.0099 & 1.0004 & 3.0121 & 1.0050 & 1.0005 & 3.0097 & 1.0026 & 1.0013 \\ \textrm{sd} & 0.1849 & 0.0654 & 0.0150 & 0.1319 & 0.0476 & 0.0156 & 0.1030 & 0.0372 & 0.0175 \\ \hline \hline \textrm{scoring} & \hat{\alpha}_{2,n} &\hat{\beta}_{2,n} &\hat{\gamma}_{2,n}& \hat{\alpha}_{2,n} &\hat{\beta}_{2,n} &\hat{\gamma}_{2,n}& \hat{\alpha}_{2,n} &\hat{\beta}_{2,n} &\hat{\gamma}_{2,n}\\ \hline \textrm{mean} & 3.0219 & 1.0085 & 1.0001 & 3.0101 & 1.0043 & 1.0003 & 3.0089 & 1.0023 & 1.0012 \\ \textrm{sd} & 0.1849 & 0.0654 & 0.0145 & 0.1320 & 0.0475 & 0.0150 & 0.1028 & 0.0371 & 0.0167\\ \hline \hline n=20.000& & & & && & &&\\ \textrm{initial}& \hat{\alpha}_{0,n} &\hat{\beta}_{0,n} &\hat{\gamma}_{0,n}& \hat{\alpha}_{0,n} &\hat{\beta}_{0,n} &\hat{\gamma}_{0,n}& \hat{\alpha}_{0,n} &\hat{\beta}_{0,n} &\hat{\gamma}_{0,n}\\ \hline \textrm{mean} & 3.0394 & 1.0140 & 1.0008 & 3.0102 & 1.0039 & 0.9996 & 3.0060 & 1.0023 & 1.0001\\ \textrm{sd} & 0.2010 & 0.0717 & 0.0105 & 0.1464 & 0.0518 & 0.0104 & 0.1071 & 0.0374 & 0.0109 \\ \hline \hline \textrm{Newton} & \hat{\alpha}_{1,n} &\hat{\beta}_{1,n} &\hat{\gamma}_{1,n}& \hat{\alpha}_{1,n} &\hat{\beta}_{1,n} &\hat{\gamma}_{1,n}& \hat{\alpha}_{1,n} &\hat{\beta}_{1,n} &\hat{\gamma}_{1,n}\\ \hline \textrm{mean} & 3.0263 & 1.0097 & 1.0010 & 3.0120 & 1.0045 & 0.9996 & 3.0043 & 1.0018 & 1.0002 \\ \textrm{sd} & 0.1756 & 0.0635 & 0.0106 & 0.1269 & 0.0460 & 0.0106 & 0.0946 & 0.0334 & 0.0112\\ \hline \hline \textrm{scoring} & \hat{\alpha}_{2,n} &\hat{\beta}_{2,n} &\hat{\gamma}_{2,n}& \hat{\alpha}_{2,n} &\hat{\beta}_{2,n} &\hat{\gamma}_{2,n}& \hat{\alpha}_{2,n} &\hat{\beta}_{2,n} &\hat{\gamma}_{2,n}\\ \hline \textrm{mean} & 3.0223 & 1.0083 & 1.0008 & 3.0101 & 1.0038 & 0.9996 & 3.0034 & 1.0015 & 1.0002\\ \textrm{sd} & 0.1759 & 0.0636 & 0.0105 & 0.1270 & 0.0460 & 0.0104 & 0.0946 & 0.0333 & 0.0109\\ \hline \end{array} \end{align*} } \end{table} \begin{figure}[h] \begin{multicols}{2} \includegraphics[width=0.49\textwidth,trim=0pt 30pt 0pt 30pt,clip ]{T=50,n=200_alpha.pdf} \newpage \includegraphics[width=0.49\textwidth,trim=0pt 30pt 0pt 30pt,clip]{T=500,n=5000_alpha_2.pdf} \end{multicols} \caption{Results of estimating $\alpha_0$ for $T=50, n=200$ (left) and $T=500, n=5.000$ (right): (i) initial estimator, (ii) Newton-Raphson method, (iii) scoring method. The red line indicates the true value.} \label{fig1} \end{figure} \begin{figure}[h] \begin{multicols}{2} \includegraphics[width=0.49\textwidth,trim=0pt 30pt 0pt 30pt,clip ]{T=50,n=200_beta.pdf} \newpage \includegraphics[width=0.49\textwidth,trim=0pt 30pt 0pt 30pt,clip]{T=500,n=5000_beta_2.pdf} \end{multicols} \caption{Results of estimating $\beta_0$ for $T=50, n=200$ (left) and $T=500, n=5.000$ (right): (i) initial estimator, (ii) Newton-Raphson method, (iii) scoring method. The red line indicates the true value.} \label{fig2} \end{figure} \begin{figure}[h] \begin{multicols}{2} \includegraphics[width=0.49\textwidth,trim=0pt 30pt 0pt 30pt,clip ]{T=50,n=200_gamma.pdf} \newpage \includegraphics[width=0.49\textwidth,trim=0pt 30pt 0pt 30pt,clip]{T=500,n=5000_gamma_2.pdf} \end{multicols} \caption{Results of estimating $\gamma_0$ for $T=50, n=200$ (left) and $T=500, n=5.000$ (right): (i) initial estimator, (ii) Newton-Raphson method, (iii) scoring method. The red line indicates the true value.} \label{fig3} \end{figure} \if0 \begin{figure}[H] \centering \begin{subfigure}{0.495\textwidth} \centering \includegraphics[width=\textwidth,trim=0pt 30pt 0pt 30pt,clip ]{T=50,n=200_alpha.pdf} \end{subfigure} \hfill \begin{subfigure}{0.495\textwidth} \centering \includegraphics[width=\textwidth,trim=0pt 30pt 0pt 30pt,clip]{T=500,n=5000_alpha_2.pdf} \end{subfigure} \caption{Results of estimating $\alpha_0$ for $T=50, n=200$ (left) and $T=500, n=5.000$ (right): (i) initial estimator, (ii) Newton-Raphson method, (iii) scoring method. The red line indicates the true value.} \end{figure} \begin{figure}[H] \centering \begin{subfigure}{0.495\textwidth} \centering \includegraphics[width=\textwidth,trim=0pt 30pt 0pt 30pt,clip ]{T=50,n=200_beta.pdf} \end{subfigure} \hfill \begin{subfigure}{0.495\textwidth} \centering \includegraphics[width=\textwidth,trim=0pt 30pt 0pt 30pt,clip]{T=500,n=5000_beta_2.pdf} \end{subfigure} \caption{Results of estimating $\beta_0$ for $T=50, n=200$ (left) and $T=500, n=5.000$ (right): (i) initial estimator, (ii) Newton-Raphson method, (iii) scoring method. The red line indicates the true value.} \end{figure} \begin{figure}[H] \centering \begin{subfigure}{0.495\textwidth} \centering \includegraphics[width=\textwidth,trim=0pt 30pt 0pt 30pt,clip ]{T=50,n=200_gamma.pdf} \end{subfigure} \hfill \begin{subfigure}{0.495\textwidth} \centering \includegraphics[width=\textwidth,trim=0pt 30pt 0pt 30pt,clip]{T=500,n=5000_gamma_2.pdf} \end{subfigure} \caption{Results of estimating $\gamma_0$ for $T=50, n=200$ (left) and $T=500, n=5.000$ (right): (i) initial estimator, (ii) Newton-Raphson method, (iii) scoring method. The red line indicates the true value.} \end{figure} \fi \begin{figure}[H] \includegraphics[width=\textwidth,trim=0pt 0pt 0pt 0 pt]{histogram_T=50.pdf} \caption{Histograms of the standardized estimators for $T=50, n=200$: (i) initial estimator, (ii) Newton-Raphson method, (iii) scoring method. The red curve indicates the density of the standard normal distribution. } \label{fig4} \end{figure} \begin{figure}[H] \includegraphics[width=\textwidth,trim=0pt 0pt 0pt 0 pt]{histogram_T=500.pdf} \caption{Histograms of the standardized estimators for $T=500, n=5.000$: (i) initial estimator, (ii) Newton-Raphson method, (iii) scoring method. The red curve indicates the density of the standard normal distribution. } \label{fig5} \end{figure} By means of Table \ref{table1} the performance of the three estimators behaves quite similar. Upon closer inspection, we recognize the smallest improvement in the estimates of $\gamma_0$. The two estimators $\hat{\gamma}_{0,n}$ and $\hat{\gamma}_{2,n}$ have even the same values on four decimal points except for two deviations of $10^{-4}$. Comparing the estimators for $\alpha_0$ and $\beta_0$, we detect, with one exception (Newton-Raphson method for $T=1.000$ and $n=20.000$), a small improvement in the one step estimators compared to the initial estimator. Besides, the scoring method performs slightly better than the Newton-Raphson method. Overall, the three-estimators performances seem to be quite similar. This leads to the assumption that the initial estimator is already asymptotically optimal. The almost undetectable difference of the estimates of $\gamma_0$ is due to the faster convergence rate $\sqrt{n}$ instead of $\sqrt{T_n}=\sqrt{T}$. Since we choose especially large values for $n$ and $T$ in Table \ref{table1}, we can assume that the differences become more pronounced for smaller values. Therefore, comparing the boxplots for $T=50, n=200$ in Figures \ref{fig1} to \ref{fig3} the differences between the estimators are vanishingly small. This suggests that the initial estimator is already effective. The improvements in performance become visually apparent when comparing with the boxplots for $T=500, n=5.000$. \bigskip \noindent {\bf Acknowledgement.} We are grateful to the two anonymous referees for their valuable comments which led to substantial improvements. This work was partially supported by JST CREST Grant Number JPMJCR14D7, Japan (HM), and by DFG-GRK 2131, Germany (NH). The contents are partly based on the master thesis of CY \cite{CY.thesis}. \bigskip
\section{Introduction: Filling the Blanks in Reversible Process Algebras} \textbf{Reversibility's Future} is intertwined with the development of formal models for analyzing and certifying concurrent behaviors. Even if the development of quantum computers~\cite{Matthews2021}, CMOS adiabatic circuits~\cite{Frank2020} and computing biochemical systems promise unprecedented efficiency or \enquote{energy-free} computers, it would be a mistake to believe that when one of those technologies---each with their own connection to reversibility---reaches a mature stage, distribution of the computing capacities will become superfluous. On the opposite, the future probably resides in connecting together computers using different paradigms (i.e.\@\xspace, \enquote{traditional}, quantum, biological, etc.), and possibly themselves heterogeneous (for instance using the \enquote{classical control of quantum data} motto~\cite{Perdrix2006}). In this coming situation, \enquote{traditional} model-checking techniques will face an even worst state explosion problem in presence of reversiblility, that e.g.\@\xspace the usual \enquote{back-tracking} methods % will likely fail to circumvent. Due to the notorious difficulty of connecting heterogeneous systems correctly % and the \enquote{volatile} nature of reversible computers---that can erase all trace of their previous actions---, it seems absolutely necessary to design languages for the specification and verification of reversible distributed systems. \textbf{Process Algebras} offer an ideal touch of abstraction while maintaining implementable specification and verification languages. % In the family of process calculi, the Calculus of Communicating Systems (CCS)~\cite{Milner1980% } plays a particular role, both as seminal work and as direct root of numerous systems (e.g.\@\xspace \(\pi\)-~\cite{Sangiorgi2001}, Ambient~\cite{Zappa2005}, applied~\cite{Abadi2018} and distributed~\cite{Hennessy2007} calculi). Reversible CCS (RCCS)~\cite{Danos2004} and CCS with keys (CCSK)~\cite{Phillips2006} are two extensions to CCS providing a better understanding of the mechanisms underlying reversible concurrent computation---and they actually turned out to be the two faces of the same coin~\cite{Lanese2019}. Most~\cite{Arpit2017,Cristescu2015b,Medic2020,Mezzina2017}---if not all---of the latter systems developed to enhance the expressiveness with some respect (rollback operator, name-passing abilities, probabilistic features) stem from one approach or the other. However, those two systems, as well as their extensions, both share the same drawbacks, in terms of missing features and missing opportunities. \textbf{An Incomplete Picture} is offered by RCCS and CCSK, as they miss \enquote{expected} features despite repetitive attempts. For instance, to our knowledge, no satisfactory notion of context was ever defined: the discussed notions~\cite{Aubert2016jlamp} do not allow of the \enquote{hot-plugging} of a process with a past into a context with a past as well. As a consequence, the notions of congruence remains out of reach, forbidding the study of bisimilarities---though they are at the core of process algebras~\cite{Sangiorgi2001b}. % Also, recursion and replication are different~\cite{Palamidessi2005}, but % only recursion have been investigated~\cite{Graversen2018,Krivine2006} or mentioned~\cite{Danos2004,Danos2005}, and only for \enquote{memory-less} processes. Stated differently, the study of the duplication of systems with a past have been left aside. \textbf{Opportunities Have Been Missed} as previous process algebras are \emph{conservative extensions of restricted versions of CCS}, instead of considering \enquote{a fresh start}. For instance, reversible calculi inherited the sum operator in its guarded version: while this restriction certainly makes sense when studying (weak) bisimulations for forward-only models, we believe it would be profitable to suspend this restriction and consider \emph{all} sums, to establish their specificities and interests in the reversible frame. Also, both RCCS and CCSK have impractical mechanisms for keys or identifiers: aside from supposing \enquote{eternal freshness}---which requires to \enquote{ping} all threads when performing a transition, creating a potential bottle-neck---, they also require to inspect, in the worst case scenario, \emph{all the memories of all the threads} before performing a backward transition. \textbf{Our Proposal} for \enquote{yet} another language is guided by the desire to \enquote{complete the picture}, but starts from scratch instead of trying to \enquote{correct} existing systems\footnote{Of course, due credit should be given for those previous calculi, that strongly inspired ours, and into which our proposal can (partially) be translated, as explained in \autoref{sec:translation}.}. We start by defining an \enquote{identified calculus} that sidesteps the previous limitations of the key and memory mechanisms and considers multiple declensions of the sum: \begin{enumerate*} \item the summation~\cite[p.~68]{Milner1980}, that we call \enquote{non-deterministic choice} and write \(\ovee\),~\cite{Visme19}, \item the guarded sum, \(+\), and \item the internal choice, \(\sqcap\), inspired from the Communicating Sequential Processes (CSP)~\cite{Hoare1985}---even if we are aware that this operator can be represented using prefix, parallel composition and restriction~\cite[p. 225]{Amadio2016} in forward systems, we would like to re-consider all the options in the reversible set-up, where \enquote{representation} can have a different meaning.% \end{enumerate*} Our formalism meets usual criterion, and allows to sketch interesting definitions for contexts, that allows to prove that, even under a mild notion of context, the usual bisimulation for reversible calculi is not a congruence. We also lay out the alternatives to define replication, and justify precisely why duplicated processes should have their memory \enquote{marked}. As a by-product, we obtain a notion of concurrency, both for forward and forward-and-backward calculi, that rests solely on identifiers and can be checked locally. \textbf{Our Contribution} tries to lay out solid foundation to study reversible process algebras in all generality, and opens some questions that have been left out. Our detailed frame explicits aspects not often acknowledged, but does not yet answer questions such as \enquote{what is the right structural \emph{congruence} for reversible calculi}~\cite{Aubert2020d}: while we can define a structural \emph{relation} for our calculus, we would like to get a better take on what a congruence for reversible calculi is before committing. How our three sums differ and what benefits they could provide is also left for future work, possibly requiring a better understanding of non-determinism in the systems we model. All proofs and some ancillary definitions can be found in Appendix~\ref{sc:app}. \section{A Forward-Only Identified Calculus With Multiple Sums} We enrich CCS's processes and labeled transition system (LTS) with identifiers needed to define reversible systems: indeed, in addition to the usual labels, the reversible LTS developed thus far all annotate the transition with an additional key or identifier that becomes part of the memory. This development can be carried out independently of the reversible aspect, and could be of independent interest. Our formal \enquote{identifier structures} allows to precisely define how such identifiers could be generated while guaranteeing eternal freshness of the identifiers used to annotate the transitions (\autoref{lem:unicity}) of our calculus that extends CCS conservatively (\autoref{lm:ccsidentified}). \subsection{Preamble: Identifier Structures, Patterns, Seeds and Splitters} \label{sec:ident} \begin{definition}[Identifier structure and pattern] An \emph{identifier structure} \(\idst = (\ids, \gamma, \oplus)\) is s.t.\ \begin{itemize} \item \(\ids\) is an infinite set of \emph{identifiers}, with a partition between infinite sets of \emph{atomic identifiers} \(\ids_a\) and \emph{paired identifiers} \(\ids_p\), i.e.\@\xspace \(\ids_a \cup \ids_p = \ids\), \(\ids_a \cap \ids_p = \emptyset\), \item \(\gamma : \mathbb{N} \to \ids_a\) is a bijection called a \emph{generator}, \item \(\oplus : \ids_a \times \ids_a \to \ids_p\) is a bijection called a \emph{pairing function}. \end{itemize} Given an identifier structure \(\idst\), an \emph{identifier pattern \(\ip\)} is a tuple \((c,s)\) of integers called \emph{current} and \emph{step} such that \(s > 0\). The \emph{stream} of atomic identifiers generated by an identifier pattern \((c,s)\) is \(\idst(c,s) = \gamma(c), \gamma(c + s), \gamma(c + s + s), \gamma(c +s +s+s),\hdots\). \end{definition} \begin{example} \label{ex:ident-struct} Traditionally, a pairing function is a bijection between \(\mathbb{N} \times \mathbb{N}\) and \(\mathbb{N}\), and the canonical examples are Cantor's bijection and \((m, n) \mapsto 2^m(2n+1)-1\)~\cite{Rosenberg2003,Szudzik2017}. Let \(\mathrm{p}\) be any of those pairing function, and let \(\mathrm{p}^{-}(m, n) = -(\mathrm{p}(m, n))\). Then, \(\iZ= (\mathbb{Z}, \id_{\mathbb{N}}, \mathrm{p}^{-})\) is an identifier structure, with \(\ids_a = \mathbb{N}\) and \(\ids_p = \mathbb{Z}^{-}\). As an example, the streams \(\iZ(0, 2)\) and \(\iZ(1, 2)\) are the series of even and odd numbers. \end{example} Starting now, we assume given a particular identifier structure \(\idst\) and use \(\iZ\) in our examples. \begin{definition}[Compatible identifier patterns] Two identifier patterns \(\ip_1\) and \(\ip_2\) are \emph{compatible}, \(\ip_1 \perp \ip_2\), if the identifiers in the streams \(\idst(\ip_1)\) and \(\idst(\ip_2)\) are all different. \end{definition} \begin{definition}[Splitter] \label{def:split} A \emph{splitter} is a function \({\scalebox{1}[0.89]{$\cap$}}\) from identifier pattern to pairs of compatible identifier patterns, and we let \({\scalebox{1}[0.89]{$\cap$}}_1(\ip)\) (resp.\@\xspace \({\scalebox{1}[0.89]{$\cap$}}_2(\ip)\)) be its first (resp.\@\xspace second) projection. \end{definition} We now assume that every identifier structure \(\idst\) is endowed with such a function. \begin{example} \label{ex:compatible} For \(\iZ\) the obvious splitter is \({\scalebox{1}[0.89]{$\cap$}}(c, s) = ((c, 2 \times s), (c+s, 2 \times s)) \). % Note that \({\scalebox{1}[0.89]{$\cap$}} (0, 1) = ((0, 2), (1, 2))\), and it is easy to check that the two streams \(\iZ(0, 2)\) and \(\iZ(1, 2)\) % have no identifier in common. However, \((1, 7)\) and \((2, 13)\) % are not compatible in \(\iZ\), as their streams both contain \(15\). \end{example} \begin{definition}[Seed (splitter)] \label{def:seed} A \emph{seed} \(\mathsf{s}\) is either an identifier pattern \(\ip\), or a pair of seeds \((\mathsf{s}_1, \mathsf{s}_2)\) such that all the identifier patterns occurring in \(\mathsf{s}_1\) and \(\mathsf{s}_2\) are pairwise compatible. Two seeds \(\mathsf{s}_1\) and \(\mathsf{s}_2\) are \emph{compatible}, \(\mathsf{s}_1 \perp \mathsf{s}_2\), if all the identifier patterns in \(\mathsf{s}_1\) and \(\mathsf{s}_2\) are compatible. We extend the splitter \({\scalebox{1}[0.89]{$\cap$}}\) and its projections \({\scalebox{1}[0.89]{$\cap$}}_j\) (for \(j \in \{1, 2\}\)) to functions from seeds to seeds that we write \([{\scalebox{1}[0.89]{$\cap$}}]\) and \([{\scalebox{1}[0.89]{$\cap$}}_j]\) defined by \begin{align*} [{\scalebox{1}[0.89]{$\cap$}}](\ip) & = {\scalebox{1}[0.89]{$\cap$}} (\ip) & & & [{\scalebox{1}[0.89]{$\cap$}}_j](\ip) & = {\scalebox{1}[0.89]{$\cap$}}_j (\ip) \\ [{\scalebox{1}[0.89]{$\cap$}}](\mathsf{s}_1, \mathsf{s}_2) & = ([{\scalebox{1}[0.89]{$\cap$}}](\mathsf{s}_1), [{\scalebox{1}[0.89]{$\cap$}}](\mathsf{s}_2)) & & & [{\scalebox{1}[0.89]{$\cap$}}_j](\mathsf{s}_1, \mathsf{s}_2) & = ([{\scalebox{1}[0.89]{$\cap$}}_j](\mathsf{s}_1), [{\scalebox{1}[0.89]{$\cap$}}_j](\mathsf{s}_2)) \end{align*} \end{definition} That this operation is well-defined is proven in \autoref{sec:app-iden}. \begin{example} A seed over \(\iZ\) is \((\id \times {\scalebox{1}[0.89]{$\cap$}}) ({\scalebox{1}[0.89]{$\cap$}}(0, 1)) =( (0, 2) , ((1, 4),(3, 4)))\). \end{example} \subsection{Identified CCS and Unicity Property} \label{sect:ident-ccs} We will now discuss and detail how a general version of (forward-only) CCS can be equipped with identifiers structures so that every transition will be labeled not only by a (co-)name, \(\tau\) or \(\upsilon\)\footnote{% We use this label to annotate the \enquote{internally non-deterministic} transitions introduced by the operator \(\sqcap\). It can be identified with \(\tau\) for simplicity if need be, and as \(\tau\), it does not have a complement. }% , but also by an identifier that is guaranteed to be unique in the trace. \begin{definition}[Names, co-names and labels] Let \(\ensuremath{\mathsf{N}}=\{a,b,c,\dots\}\) be a set of \emph{names} and \(\out{\ensuremath{\mathsf{N}}}=\{\out{a},\out{b},\out{c},\dots\}\) its set of \emph{co-names}. We define the set of labels \(\ensuremath{\mathsf{L}} = \ensuremath{\mathsf{N}} \cup \out{\ensuremath{\mathsf{N}}} \cup\{\tau, \upsilon\}\), and use \(\alpha\) (resp.\@\xspace \(\mu\), \(\lambda\)) to range over \(\ensuremath{\mathsf{L}}\) (resp.\@\xspace \(\ensuremath{\mathsf{L}} \backslash \{\tau\}\), \(\ensuremath{\mathsf{L}} \backslash \{\tau, \upsilon\}\)). The \emph{complement} of a name is given by a bijection \(\out{\cdot}:\ensuremath{\mathsf{N}} \to \out{\ensuremath{\mathsf{N}}}\), whose inverse is also written \(\out{\cdot}\).% \end{definition} \begin{definition}[Operators] \label{def:operators} \begin{multicols}{2} \noindent \begin{align} P,Q \coloneqq & \lambda. P \tag{Prefix} \\ & P \mid Q \tag{Parallel Composition} \\ & P \backslash \lambda \tag{Restriction} \end{align} \begin{align} & P \ovee Q \tag{Non-deterministic choice} \\ & (\lambda_1. P_1) + (\lambda_2 . P_2) \tag{Guarded sum} \\ & P \sqcap Q \tag{Internal choice} \end{align} \end{multicols} As usual, the inactive process \(0\) is not written when preceded by a prefix, and we call \(P\) and \(Q\) the \enquote{threads} in a process \(P \mid Q\). \end{definition} The labeled transition system (LTS) for this version of CCS, that we denote \(\redl{\alpha}\), can be read from \autoref{fig:ltsrules} by removing the seeds and the identifiers. % Now, to define an identified declension of that calculus, we need to describe how each thread of a process can access its own identifier pattern to independently \enquote{pull} fresh identifiers when needed, without having to perform global look-ups. We start by defining how a seed can be \enquote{attached} to a CCS process. \begin{definition}[Identified process] Given an identifier structure \(\idst\), an \emph{identified process} is a CCS process \(P\) endowed with a seed \(\mathsf{s}\) that we denote \(\mathsf{s} \circ P\). \end{definition} We assume fixed a particular an identifier structure \(\idst = (\ids, \gamma, \oplus, {\scalebox{1}[0.89]{$\cap$}})\), and now need to introduce how we \enquote{split} identifier patterns, to formalize when a process evolves from e.g.\@\xspace \(\ip \circ a.(P\mid Q)\) that requires only one identifier pattern to \((\ip_1, \ip_2) \circ P \mid Q\), that requires two---because we want \(P\) and \(Q\) to be able to pull identifiers from respectively \(\ip_1\) and \(\ip_2\) without the need for an agreement. To make sure that our processes are always \enquote{well-identified} (\autoref{def:well-id-proc}), i.e.\@\xspace with a matching number of threads and identifier patterns, we introduce an helper function. \begin{definition}[Splitter helper] \label{def:split-help} Given a process \(P\) and an identifier pattern \(\ip\), we define \[{\scalebox{1}[0.89]{$\cap$}}^?(\ip, P) = \begin{dcases*} ({\scalebox{1}[0.89]{$\cap$}}^?({\scalebox{1}[0.89]{$\cap$}}_1 (\ip), P_1), {\scalebox{1}[0.89]{$\cap$}}^?({\scalebox{1}[0.89]{$\cap$}}_2 (\ip), P_2)) & if \(P = P_1 \mid P_2 \) \\ \ip \circ P & otherwise \end{dcases*} \] and write e.g.\@\xspace \({\scalebox{1}[0.89]{$\cap$}}^? \ip \circ a \mid b\) for the \enquote{recomposition} of the pair of identified processes \({\scalebox{1}[0.89]{$\cap$}}^?(\ip, a \mid b) = ({\scalebox{1}[0.89]{$\cap$}}_1 (\ip)\circ a, {\scalebox{1}[0.89]{$\cap$}}_2 (\ip) \circ b)\) into the identified process \(({\scalebox{1}[0.89]{$\cap$}}_1 (\ip), {\scalebox{1}[0.89]{$\cap$}}_2 (\ip)) \circ a \mid b\). \end{definition} Note that in the definition below, only the rules act., \(+\) and \(\sqcap\) can \enquote{uncover} threads, and hence are the only place where \({\scalebox{1}[0.89]{$\cap$}}^?\) is invoked. % \begin{definition}[ILTS] \label{def:ilts} We % let the \emph{identified labeled transition system} between identified processes be the union of all the relations \(\fwlts{i}{\alpha}\) for \(i \in \ids\) and \(\alpha \in \ensuremath{\mathsf{L}}\) of \autoref{fig:ltsrules}. Structural relation is as usual and presented in \autoref{sec:struct}. \begin{figure}[h] \begin{tcolorbox}[title = Action and Restriction] \begin{prooftree} \hypo{} \infer[]1[act.]{(c,s)\circ \lambda. P \fwlts{\gamma(c)}{\lambda} {\scalebox{1}[0.89]{$\cap$}}^?(c + s, s)\circ P} \end{prooftree} \hfill \begin{prooftree} \hypo{\mathsf{s}\circ P \fwlts{i}{\alpha} \mathsf{s}' \circ P '} \infer[left label={\(a \notin \{\alpha, \bar{\alpha}\}\)}]1[res.]{\mathsf{s}\circ P \backslash a \fwlts{i}{\alpha} \mathsf{s}' \circ P ' \backslash a} \end{prooftree} \end{tcolorbox} \begin{tcolorbox}[title=Parallel Group] \begin{prooftree} \hypo{\mathsf{s}_1 \circ P \fwlts{i_1}{\lambda} \mathsf{s}_1' \circ P'} \hypo{\mathsf{s}_2 \circ Q \fwlts{i_2}{\out{\lambda}} \mathsf{s}_2' \circ Q'} \infer[left label={\(\mathsf{s}_1 \perp \mathsf{s}_2\)}] 2[syn.]{(\mathsf{s}_1, \mathsf{s}_2)\circ P \mid Q \fwlts{i_1 \oplus i_2}{\tau} (\mathsf{s}_1', \mathsf{s}_2')\circ P' \mid Q'} \end{prooftree} \\[1.8em] \begin{prooftree} \hypo{\mathsf{s}_1 \circ P \fwlts{i}{\alpha} \mathsf{s}_1' \circ P'} \infer[left label={\(\mathsf{s}_1 \perp \mathsf{s}_2\)}] 1[\(\mid_{\mathrm{L}}\)]{(\mathsf{s}_1, \mathsf{s}_2)\circ P \mid Q \fwlts{i}{\alpha} (\mathsf{s}_1', \mathsf{s}_2) \circ P' \mid Q} \end{prooftree} \hfill \begin{prooftree} \hypo{\mathsf{s}_2 \circ Q \fwlts{i}{\alpha} \mathsf{s}_2' \circ Q'} \infer[left label={\(\mathsf{s}_1 \perp \mathsf{s}_2\)}] 1[\(\mid_{\mathrm{R}}\)]{(\mathsf{s}_1, \mathsf{s}_2)\circ P \mid Q \fwlts{i}{\alpha} (\ip_1, \ip_2') \circ P \mid Q'} \end{prooftree} \end{tcolorbox} \begin{tcolorbox}[title=Sum Group] \begin{prooftree} \hypo{\mathsf{s}\circ P \fwlts{i}{\alpha} \mathsf{s}' \circ P '} \infer1[\(\ovee_{\mathrm{L}}\)]{\mathsf{s}\circ P \ovee Q \fwlts{i}{\alpha} \mathsf{s}'\circ P '} \end{prooftree} \hfill \begin{prooftree} \hypo{} \infer1[\(+_{\mathrm{L}}\)]{(c, s)\circ (\lambda_1 . P_1) + (\lambda_2 . P_2) \fwlts{\gamma(c)}{\lambda_1} {\scalebox{1}[0.89]{$\cap$}}^? (c + s, s) \circ P_1} \end{prooftree} \\[1.8em] \begin{prooftree} \hypo{\mathsf{s}\circ Q \fwlts{i}{\alpha} \mathsf{s}'\circ Q'} \infer1[\(\ovee_{\mathrm{R}}\)]{\mathsf{s}\circ P \ovee Q \fwlts{i}{\alpha} \mathsf{s}'\circ Q'} \end{prooftree} \hfill \begin{prooftree} \hypo{} \infer1[\(+_{\mathrm{R}}\)]{(c, s)\circ (\lambda_1 . P_1) + (\lambda_2 . P_2) \fwlts{\gamma(c)}{\lambda_2} {\scalebox{1}[0.89]{$\cap$}}^? (c + s, s) \circ P_2} \end{prooftree} \\[1.8em] \begin{prooftree} \hypo{} \infer1[\(\sqcap_{\mathrm{L}}\)]{(c, s)\circ P \sqcap Q \fwlts{\gamma(c)}{\upsilon} {\scalebox{1}[0.89]{$\cap$}}^? (c + s, s) \circ P } \end{prooftree} \hfill \begin{prooftree} \hypo{} \infer1[\(\sqcap_{\mathrm{R}}\)]{(c, s)\circ P \sqcap Q \fwlts{\gamma(c)}{\upsilon} {\scalebox{1}[0.89]{$\cap$}}^? (c + s, s) \circ Q} \end{prooftree} \end{tcolorbox} \caption{Rules of the identified labeled transition system (ILTS)} \label{fig:ltsrules} \end{figure} \end{definition} \begin{example} The result of \({\scalebox{1}[0.89]{$\cap$}}^?(0, 1) \circ (a \mid (b \mid (c+d)))\) is \(((0, 2), ((1, 4), (3, 4))) \circ (a \mid (b \mid (c+d))\), and \(a\) (resp.\@\xspace \(b\), \(c+d\)) would get its next transition identified with \(0\) (resp.\@\xspace \(1\), \(3\)). \end{example} \begin{definition}[Well-identified process] \label{def:well-id-proc} An identified process \(\mathsf{s} \circ P\) is \emph{well-identified} iff \(\mathsf{s} = (\mathsf{s}_1, \mathsf{s}_2)\), \(P = P_1 \mid P_2\) and \(\mathsf{s}_1 \circ P_1\) and \(\mathsf{s}_2 \circ P_2\) are both well-identified, or \(P\) is not of the form \(P_1 \mid P_2\) and \(\mathsf{s}\) is an identifier pattern. \end{definition} From now on, we will always assume that identified processes are well-identified. \begin{definition}[Traces] In a transition \(t:\mathsf{s}\circ P\fwlts{i}{\alpha} \mathsf{s}'\circ P'\), process \(\mathsf{s}\circ P\) is the \emph{source}, and \(\mathsf{s}'\circ P'\) is the \emph{target} of transition \(t\). Two transitions are \emph{coinitial} (resp.\@\xspace \emph{cofinal}) if they have the same source (resp.\@\xspace target). Transitions \(t_1\) and \(t_2\) are \emph{composable}, \(t_1;t_2\), if the target of \(t_1\) is the source of \(t_2\). A sequence of pairwise composable transitions is called a \emph{trace}, written \(t_1; \cdots; t_n\). \end{definition} \begin{restatable}[Unicity]{lemma}{lemunicity}\label{lem:unicity} The trace of an identified process % contains any identifier at most once, and if a transition has identifier \(i_1 \oplus i_2 \in \ids_p\), then neither \(i_1\) nor \(i_2\) occur in the trace. \end{restatable} \begin{restatable}{lemma}{lmccsidentified}\label{lm:ccsidentified} For all CCS process \(P\), \(\exists \mathsf{s}\) s.t.\ \(P \redl{\alpha_1} \cdots \redl{\alpha_n} P' \Leftrightarrow (% \mathsf{s} \circ P \fwlts{i_1}{\alpha_1} \cdots \fwlts{i_n}{\alpha_n} \mathsf{s}' \circ P')\). \end{restatable} \begin{definition}[Concurrency and compatible identifiers] \label{def:concurrencyforward} \label{def:compatible-ident} Two coinitial transitions \(\mathsf{s} \circ P \fwlts{i_1}{\alpha_1} \mathsf{s}_1 \circ P_1\) and \(\mathsf{s} \circ P \fwlts{i_2}{\alpha_2} \mathsf{s}_2 \circ P_2\) are \emph{concurrent} iff \(i_1\) and \(i_2\) are \emph{compatible}, \(i_1 \perp i_2\), i.e.\@\xspace iff \[\begin{dcases} i_1 \neq i_2 & \text{if \(i_1\), \(i_2 \in \ids_a\)} \\ \text{there is no } i \in \ids_a \text{ s.t.\ } i_1 \oplus i = i_2 & \text{if } i_1 \in \ids_a, i_2 \in \ids_p \\ \text{there is no } i \in \ids_a \text{ s.t.\ } i \oplus i_2 = i_1 & \text{if } i_1 \in \ids_p, i_2 \in \ids_a \\ \text{for } i_1^1, i_1^2, i_2^1 \text{ and } i_2^2 \text{ s.t.\ } i_1 = i_1^1 \oplus i_1^2 \text{ and } i_2 = i_2^1 \oplus i_2^2, i_1^j \neq i_2^k \text{ for } j, k \in \{1, 2\} & \text{if } i_1, i_2 \in \ids_p \end{dcases} \] \end{definition} \begin{example} \label{example-trans} The identified process \(\mathsf{s} \circ P = ((0, 2), (1, 2)) \circ a + b \mid \out{a}.c\) has four possible transitions: \begin{align*} t_1 : \mathsf{s}\circ P\fwlts{0}{a} ((2, 2), (1, 2)) \circ 0 \mid \out{a}.c & & t_3 : \mathsf{s}\circ P\fwlts{1}{\out{a}} ((0, 2), (3, 2)) \circ a + b \mid c \\ t_2 : \mathsf{s}\circ P\fwlts{0}{b} ((2, 2), (1, 2)) \circ 0 \mid \out{a}.c & & t_4 : \mathsf{s}\circ P\fwlts{0\oplus 1}{\tau} ((2, 2), (3, 2)) \circ 0 \mid c \end{align*} Among them, only \(t_1\) and \(t_3\), and \(t_2\) and \(t_3\) are concurrent: transitions are concurrent when they do not use overlapping identifiers, not even as part of synchronizations. \end{example} Hence, concurrency becomes an \enquote{easily observable} feature that does not require inspection of the term, of its future transitions---as for \enquote{the diamond property}~\cite{Levy1978}---or of an intermediate relation on proof terms~\cite[p.~415]{Boudol1988}. We believe this contribution to be of independent interest, and it will help significantly the precision and efficiency of our forward-and-backward calculus in multiple respect. \section{Reversible and Identified CCS} A reversible calculus is always defined by a forward calculus and a backward calculus. Here, we define the forward part as an extension of the identified calculus of \autoref{def:ilts}, without copying the information about the seeds for conciseness, but using the identifiers they provide freely. The backward calculus will require to make the seed explicit again, and we made the choice of having backward transitions re-use the identifier from their corresponding forward transition, and to restore the seed in its previous state. Expected properties are detailed in \autoref{sec:rever-prop}. \subsection{Defining the Identified Reversible CCS} \label{sec:rever-def} \begin{definition}[Memories and reversible processes] \label{def:memory} Let \(o \in \{\ovee, +, \sqcap\}\), \(d \in \{\mathrm{L}, \mathrm{R}\}\), we define \emph{memory events}, \emph{memories} and \emph{identified reversible processes} as follows, for \(n \geqslant 0\): \begin{align} e \coloneqq & \mem{i, \mu, ((o_1, P_1, d_1), \hdots (o_n, P_n, d_n))} \tag{Memory event} \\ m_s \coloneqq & e . m_s \enspace | \enspace \emptyset \tag{\emph{Memory stack}} \\ m_p \coloneqq & [m, m] % \tag{\emph{Memory pair}} \\ m \coloneqq & m_s \enspace | \enspace m_p \tag{Memory} \\ R,S \coloneqq & \mathsf{s} \circ m \rhd P \tag{Identified reversible processes} \end{align} In a memory event, if \(n = 0\), then we will simply write \(\_\). We generally do not write the trailing empty memories in memory stacks, e.g.\@\xspace we will write \(e\) instead of \(e.\emptyset\). \end{definition} Stated differently, our memory are represented as a stack or tuples of stacks, on which we define the following two operations. % \begin{definition}[Operations on memories] \label{def:op-on-mem} The \emph{identifier substitution} in a memory event is written \(e[i \shortleftarrow j]\) and is defined as substitutions usually are. The \emph{identified insertion} is defined by {\small \[\mem{i, \mu, ((o_1, P_1, d_1), \hdots (o_n, P_n, d_n))} \concat_j (o, P, d) = \begin{dcases*} \mem{i, \mu, ((o_1, P_1, d_1), \hdots (o_n, P_n, d_n), (o, P, d))} & if \(i = j\) \\ \mem{i, \mu, ((o_1, P_1, d_1), \hdots (o_n, P_n, d_n))} & otherwise \end{dcases*} \] } The operations are easily extended to memories by simply propagating them to all memory events. \end{definition} When defining the forward LTS below, we omit the identifier patterns to help with readability, but the reader should assume that those rules are \enquote{on top} of the rules in \autoref{fig:ltsrules}. The rules for the backward LTS, in \autoref{fig:birltsrules}, includes both the seeds and memories, and is the exact symmetric of the forward identified LTS with memory, up to the condition in the parallel group that we discuss later. A bit similarly to the splitter helper (\autoref{def:split-help}), we need an operation that duplicates a memory if needed, that we define on processes with memory but without seeds for clarity. \begin{definition}[Memory duplication] \label{def:dup} Given a process \(P\) and a memory \(m\), we define \[ \delta^? (m, P) = \begin{dcases*} (\delta^?(m, P_1), \delta^?(m, P_2)) & if \(P = P_1 \mid P_2 \) \\ m \rhd P & otherwise \end{dcases*} \] and write e.g.\@\xspace \(\delta^? (m) \rhd a \mid b\) for the \enquote{recomposition} of the pair of identified processes \(\delta^?(m, a \mid b) = (\delta^? (m, a), \delta^? (m, b)) = (m \rhd a, m \rhd b)\) into the process \([m, m] \rhd a \mid b\). \end{definition} \begin{definition}[IRLTS] We let the \emph{identified reversible labeled transition system} between identified reversible processes be the union of all the relations \(\fwlts{i}{\alpha}\) and \(\bwlts{i}{\alpha}\) for \(i \in \ids\) and \(\alpha \in \ensuremath{\mathsf{L}}\) of Figures~\ref{fig:irltsrules} and \ref{fig:birltsrules}, and let \(\twoheadrightarrow=\rightarrow \cup \rightsquigarrow\). Structural relation can be defined as usual and is presented in \autoref{sec:struct}. \begin{figure}[h] \begin{tcolorbox}[title=Action and Restriction] \begin{prooftree} \hypo{} \infer[]1[act.]{m \rhd \lambda . P \fwlts{i}{\lambda} \delta^?(\mem{i, \lambda, \_}.m) \rhd P} \end{prooftree} \hfill \begin{prooftree} \hypo{m \rhd P \fwlts{i}{\alpha} m' \rhd P '} \infer[left label={\(a \notin \{\alpha, \bar{\alpha}\}\)}]1[res.]{m \rhd P \backslash a \fwlts{i}{\alpha} m'\rhd P ' \backslash a} \end{prooftree} \end{tcolorbox} \begin{tcolorbox}[title=Parallel Group] \begin{prooftree} \hypo{m_1 \rhd P \fwlts{i_1}{\lambda} m_1' \rhd P'} \hypo{m_2 \rhd Q \fwlts{i_2}{\out{\lambda}} m_2' \rhd Q'} \infer% 2[syn.]{[m_1, m_2]\rhd P \mid Q \fwlts{i_1 \oplus i_2}{\tau} [m_1'[i_1 \shortleftarrow i_1 \oplus i_2], m_2'[i_2 \shortleftarrow i_2 \oplus i_1]]\rhd P' \mid Q'} \end{prooftree} \\[1.8em] \begin{prooftree} \hypo{m_1 \rhd P \fwlts{i}{\alpha} m_1' \rhd P'} \infer% 1[\(\mid_{\mathrm{L}}\)]{[m_1, m_2]\rhd P \mid Q \fwlts{i}{\alpha} [m_1', m_2]\rhd P' \mid Q} \end{prooftree} \hfill \begin{prooftree} \hypo{m_2 \rhd Q \fwlts{i}{\alpha} m_2' \rhd Q'} \infer% 1[\(\mid_{\mathrm{R}}\)]{[m_1, m_2]\rhd P \mid Q \fwlts{i}{\alpha} [m_1, m_2']\rhd P \mid Q'} \end{prooftree} \end{tcolorbox} \begin{tcolorbox}[title=Sum Group] \scalebox{0.8}{ \begin{prooftree} \hypo{m \rhd P \fwlts{i}{\alpha} m' \rhd P '}\textsl{} \infer1[\(\ovee_{\mathrm{L}}\)]{m\rhd(P \ovee Q) \fwlts{i}{\alpha} m'\concat_i(\ovee, Q, \mathrm{R})\circ P '} \end{prooftree} } \hfill \scalebox{0.8}{ \begin{prooftree} \hypo{} \infer1[\(+_{\mathrm{L}}\)]{m \rhd ((\lambda_1 . P_1) + (\lambda_2 . P_2)) \fwlts{i}{\lambda_1} \delta^?(\mem{i, \lambda_1, (+, \lambda_2.P_2, \mathrm{R})} . m) \rhd P_1} \end{prooftree} } \\[1.8em] \scalebox{0.8}{ \begin{prooftree} \hypo{m \rhd Q \fwlts{i}{\alpha} m' \rhd Q'} \infer1[\(\ovee_{\mathrm{R}}\)]{m \rhd (P \ovee Q) \fwlts{i}{\alpha} m'\concat_i(\ovee, P, \mathrm{L}) \rhd Q'} \end{prooftree} } \hfill \scalebox{0.8}{ \begin{prooftree} \hypo{} \infer1[\(+_{\mathrm{R}}\)]{m \rhd ((\lambda_1 . P_1) + (\lambda_2 . P_2)) \fwlts{i}{\lambda_1} \delta^?(\mem{i, \lambda_2, (+, \lambda_1.P_1, \mathrm{L})} . m) \rhd P_2} \end{prooftree} } \\[1.8em] \scalebox{0.9}{ \begin{prooftree} \hypo{} \infer1[\(\sqcap_{\mathrm{L}}\)]{m \rhd(P \sqcap Q) \fwlts{i}{\upsilon} \delta^?(\mem{i, \upsilon, (\sqcap, Q, \mathrm{R})} . m) \rhd P } \end{prooftree} } \hfill \scalebox{0.9}{ \begin{prooftree} \hypo{} \infer1[\(\sqcap_{\mathrm{R}}\)]{m \rhd(P \sqcap Q) \fwlts{i}{\upsilon} \delta^?(\mem{i, \upsilon, (\sqcap, P, \mathrm{L})} . m) \rhd Q} \end{prooftree} } \end{tcolorbox} \caption{Forward rules of the identified reversible labeled transition system (IRLTS)} \label{fig:irltsrules} \end{figure} \end{definition} In its first version, RCCS was using the whole memory as an identifier~\cite{Danos2004}, but then it moved to use specific identifiers~\cite{Aubert2015d,Medic2016}, closer in inspiration to CCSK's keys~\cite{Phillips2006}. This strategy, however, forces the act. rules (forward and backward) to check that the identifier picked (or present in the memory event that is being reversed) is not occurring in the memory, while our system can simply pick identifiers from the seed without having to inspect the memory, and can go backward simply by looking if the memory event has identifier in \(\ids_a\)---something enforced by requiring the identifier to be of the form \(\gamma^{-1}(c)\). Furthermore, memory events and annotated prefixes, as used in RCCS and CCSK, do not carry information on whenever they synchronized with other threads: retrieving this information require to inspect all the memories, or keys, of all the other threads, while our system simply observes if the identifier is in \(\ids_p\), hence enforcing a \enquote{locality} property. However, when backtracking, the memories of the threads need to be checked for \enquote{compatibility}, otherwise i.e.\@\xspace \(((1, 2), (2, 2)) \circ [\mem{0, a, \_}, \mem{0, a, \_}] \rhd P \mid Q\) could backtrack to \(((1, 2), (0, 2)) \circ [\mem{0, a, \_}, \emptyset] \rhd P \mid a.Q\) and then be stuck instead of \((0, 1) \circ \emptyset \rhd a.(P \mid Q)\). \begin{figure}[ht!] \begin{tcolorbox}[title=Action and Restriction] \begin{prooftree} \hypo{} \infer% 1[act.]{{\scalebox{1}[0.89]{$\cap$}}^?(\gamma^{-1}(i) + s, s) \circ \delta^?(\mem{i, \lambda, \_}.m) \rhd P \bwlts{i}{\lambda} (\gamma^{-1}(i), s) \circ m \rhd \lambda . P } \end{prooftree} \\[1.8em] \begin{prooftree} \hypo{\mathsf{s} \circ m \rhd P \bwlts{i}{\alpha} \mathsf{s}' \circ m' \rhd P '} \infer[left label={\(a \notin \{\alpha, \bar{\alpha}\}\)}]1[res.]{\mathsf{s} \circ m \rhd P \backslash a \bwlts{i}{\alpha} \mathsf{s}' \circ m'\rhd P' \backslash a} \end{prooftree} \end{tcolorbox} \begin{tcolorbox}[title=Parallel Group] \begin{flushleft} The rule syn. (resp.\@\xspace \(\mid_{\mathrm{L}}\)) can be applied only if \(\mathsf{s}_1 \perp \mathsf{s}_2\) and \(i_1 \notin m_2'\), \(i_2 \notin m_1'\) (resp.\@\xspace \(i \notin m_2\)). \end{flushleft} \begin{prooftree} \hypo{\mathsf{s}_1 \circ m_1 [i_1 \oplus i_2 \shortleftarrow i_1] \rhd P \bwlts{i_1}{\lambda} \mathsf{s}_1' \circ m_1' \rhd P'} \hypo{\mathsf{s}_2 \circ m_2 [i_2 \oplus i_1 \shortleftarrow i_2] \rhd Q \bwlts{i_2}{\out{\lambda}} \mathsf{s}_2' \circ m_2' \rhd Q'} \infer% 2[syn.]{(\mathsf{s}_1, \mathsf{s}_2) \circ [m_1, m_2]\rhd P \mid Q \bwlts{i_1 \oplus i_2}{\tau} (\mathsf{s}_1', \mathsf{s}_2') \circ [m_1', m_2']\rhd P' \mid Q'} \end{prooftree} \\[1.8em] \begin{prooftree} \hypo{\mathsf{s}_1 \circ m_1 \rhd P \bwlts{i}{\alpha} \mathsf{s}_1' \circ m_1' \rhd P'} \infer% 1[\(\mid_{\mathrm{L}}\)]{(\mathsf{s}_1, \mathsf{s}_2) \circ [m_1, m_2]\rhd P \mid Q \bwlts{i}{\alpha} (\mathsf{s}_1', \mathsf{s}_2) \circ [m_1', m_2]\rhd P' \mid Q} \end{prooftree} \end{tcolorbox} \begin{tcolorbox}[title=Sum Group] \begin{prooftree} \hypo{\mathsf{s} \circ m \rhd P \bwlts{i}{\alpha} \mathsf{s}' \circ m' \rhd P '} \infer1[\(\ovee_{\mathrm{L}}\)]{\mathsf{s} \circ m\concat_i(\ovee, Q, \mathrm{R})\rhd P \bwlts{i}{\alpha} \mathsf{s}' \circ m' \rhd (P' \ovee Q)} \end{prooftree} \\[1.8em] \begin{prooftree} \hypo{} \infer% 1[\(+_{\mathrm{L}}\)]{{\scalebox{1}[0.89]{$\cap$}}^?(\gamma^{-1}(i) + s, s) \circ \delta^?(\mem{i, \lambda_1, (+, \lambda_2.P_2, \mathrm{R})} . m) \rhd P_1 \bwlts{i}{\lambda_1} (\gamma^{-1}(i), s) \circ m \rhd ((\lambda_1 . P_1) + (\lambda_2 . P_2)) } \end{prooftree} \\[1.8em] \begin{prooftree} \hypo{} \infer1[\(\sqcap_{\mathrm{L}}\)]{{\scalebox{1}[0.89]{$\cap$}}^?(\gamma^{-1}(i) + s, s) \circ \delta^?(\mem{i, \upsilon, (\sqcap, Q, \mathrm{R})} . m) \rhd P \bwlts{i}{\upsilon} (\gamma^{-1}(i), s) \circ m \rhd(P \sqcap Q) } \end{prooftree} \end{tcolorbox} The rules \(\mid_{\mathrm{R}}\), \(\ovee_{\mathrm{R}}\), \(+_{\mathrm{R}}\) and \(\sqcap_{\mathrm{R}}\) can easily be inferred. \caption{Backward rules of the identified reversible labeled transition system (IRLTS)} \label{fig:birltsrules} \end{figure} \subsection{Properties: From Concurrency to Causal Consistency and Unicity} \label{sec:rever-prop} We now prove that our calculus satisfies typical properties for reversible process calculi~\cite{Cristescu2013,Danos2004,Lanese2013,Phillips2006}. Notice that showing that the forward-only part of our calculus is a conservative extension of CCS is done by extending~\autoref{lm:ccsidentified} to accommodate memories and it is immediate. We give a notion of concurrency, and prove that our calculus enjoys the required axioms to obtain causal consistency \enquote{for free}~\cite{Lanese2020}. All our properties, as commonly done, are limited to the reachable processes. \begin{definition}[Initial, reachable and origin process] \label{def:initial} A process \(\mathsf{s} \circ m \rhd P\) is \emph{initial} if \(\mathsf{s} \circ P\) is well-identified and if \(m = \emptyset\) if \(P\) is not of the form \(P_1 \mid P_2\), or if \(m = [m_1, m_2]\), \(P = P_1 \mid P_2\) and \([{\scalebox{1}[0.89]{$\cap$}}_j](\mathsf{s}) \circ m_j \rhd P_j\) for \(j \in \{1, 2\}\) are initial. A process \(R\) is \emph{reachable} if it can be derived from an initial process, its \emph{origin}, written \(\orig{R}\), by applying the rules in Figures~\ref{fig:irltsrules} and~\ref{fig:birltsrules}. \end{definition} \subsubsection{Concurrency} To define concurrency in the forward \emph{and backward} identified LTS is easy when both transitions have the same direction: forward transitions will adopt the definition of the identified calculus, and backward transitions will always be concurrent. More care is required when transitions have opposite directions, but the seed provides a good mechanism to define concurrency easily. In a nutshell, the forward transition will be in conflict with the backward transition when the forward identifier was obtained using the identifier pattern(s) that have been used to generate the backward identifier, something we call \enquote{being downstream}. Identifying the identifier pattern(s) that have been used to generate an identifier in the memory is actually immediate: \begin{definition} Given a backward transition \(t: \mathsf{s} \circ m \rhd P \bwlts{i}{\alpha} \mathsf{s}' \circ m' \rhd P'\), we write \(\ip_t\) (resp.\@\xspace \(\ip_t^1\), \(\ip_t^2\)) for the unique identifier pattern(s) in \(\mathsf{s}'\) such that \(i \in \ids_a\) (resp.\@\xspace \(i_1\) and \(i_2\) s.t.\ \(i_1 \oplus i_2 = i \in \ids_p\)) is the first identifier in the stream generated by \(\ip_t\) (resp.\@\xspace are the first identifiers in the streams generated by \(\ip_t^1\) and \(\ip_t^2\)). \end{definition} \begin{definition}[Downstream] An identifier \(i\) is \emph{downstream} of an identifier pattern \((c, s)\) if \[\begin{dcases} i \in \idst(c,s) & \text{if } i \in \ids_a \\ \text{there exists } j, k \in \ids_a \text{ s.t.\ } j \oplus k = i \text{ and } j \text{ or } k \text{ is downstream of } (c, s) & \text{if } i \in \ids_p \end{dcases} \] \end{definition} \begin{definition}[Concurrency]\label{def:concurrency} Two different coinitial transitions \(t_1: \mathsf{s}\circ m\rhd P\fbwlts{i_1}{\alpha_1} \mathsf{s}_1\circ m_1\rhd P_1\) and \(t_2:\mathsf{s}\circ m\rhd P \fbwlts{i_2}{\alpha_2} \mathsf{s}_2\circ m_2\rhd P_2\) are \emph{concurrent} % iff \begin{itemize} \item \(t_1\) and \(t_2\) are forward transitions and \(i_1 \perp i_2\) (\autoref{def:concurrencyforward}); \item \(t_1\) is a forward and \(t_2\) is a backward transition and \(i_1\) (or \(i_1^1\) and \(i_1^2\) if \(i_1= i_1^1 \oplus i_1^2\)) is not downstream of \(\ip_{t_2}\) (or \(\ip_{t_2}^1\) nor \(\ip_{t_2}^2\)); \item \(t_1\) and \(t_2\) are backward transitions. \end{itemize} \end{definition} \begin{example} Re-using the process from \autoref{example-trans} and adding the memories, after having performed \(t_1\) and \(t_3\), we obtain the process \( \mathsf{s}\circ [m_1,m_2] \rhd 0 \mid c\), where \(\mathsf{s}=((2,2),(3,2))\), \(m_1=\mem{0, a, (+, b, \mathrm{R})}\) and \(m_2= \mem{1, \out{a}, \_}\), that has three possible transitions: \begin{align*} & t_1 : \mathsf{s}\circ [m_1, m_2] \rhd 0 \mid c\fwlts{3}{c} ((2,2),(5,2))\circ [m_1, \mem{3, c, \_} . m_2] \rhd 0 \mid 0 \\ & t_2 : \mathsf{s}\circ [m_1, m_2] \rhd 0 \mid c\bwlts{1}{\out{a}} ((2,2),(1,2))\circ[m_1, \emptyset] \rhd 0 \mid \out{a}.c \\ & t_3 : \mathsf{s}\circ [m_1, m_2] \rhd 0 \mid c\bwlts{0}{a} ((0,2),(3,2))\circ[\emptyset, m_2] \rhd a + b \mid c \end{align*} Among them, \(t_2\) and \(t_3\) are concurrent, as they are both backward, as well as \(t_1\) and \(t_3\), as \(3\) was not generated by \(\ip_{t_3} = (0, 2)\). However, as \(3\) is downstream of \(\ip_{t_2} = (1, 2)\), \(t_1\) and \(t_2\) are \emph{not} concurrent. \end{example} \subsubsection{Causal Consistency} We now prove that our framework enjoys causal consistency, a property stating that an action can be reversed only provided all its consequences have been undone. Causal consistency holds for a calculus which satisfies four basic axioms~\cite{Lanese2020}: \emph{Loop Lemma}---\enquote{any reduction can be undone}---, \emph{Square Property}---\enquote{concurrent transitions can be executed in any order}---, \emph{Concurrency (independence) of the backward transitions}---\enquote{coinitial backward transitions are concurrent}--- and \emph{Well-foundedness}---\enquote{each process has a finite past}. Additionally, it is assumed that the semantics is equipped with the independence relation, in our case concurrency relation. \begin{restatable}[Axioms]{lemma}{lmaxioms}\label{lm:axioms} For every reachable processes \(R\), \(R'\), IRLTS satisfies the following axioms: \begin{description} \item [Loop Lemma:] for every forward transition \(t :R\fwlts{i}{\alpha}R'\) there exists a backward transition \(t^{\bullet} :R'\bwlts{i}{\alpha}R\) and vice versa. \item [Square Property:] if \(t_1 :R\fbwlts{i_1}{\alpha_1}R_1\) and \(t_2:R\fbwlts{i_2}{\alpha_2}R_2\) are two coinitial concurrent transitions, there exist two cofinal transitions \(t'_2 :R_1\fbwlts{i_2}{\alpha_2}R_3\) and \(t'_1 :R_2\fbwlts{i_1}{\alpha_1}R_3\). \item [Backward transitions are concurrent:] any two coinitial backward transitions \(t_1: R\bwlts{i_1}{\alpha_1}R_1\) and \(t_2:R\bwlts{i_2}{\alpha_2}R_2\) where \(t_1\neq t_2\) are concurrent. \item [Well-foundedness:] there is no infinite backward computation. \end{description} \end{restatable} We now define the \enquote{causal equivalence}~\cite{Danos2004} relation on traces allowing to swap concurrent transitions and to delete transitions triggered in both directions. The causal equivalence relation is defined for the LTSI which satisfies the Square Property and re-use the notations from above. \begin{definition}[Causal equivalence] \label{def:equivalence} \emph{Causal equivalence}, \(\sim\), is the least equivalence relation on traces closed under composition satisfying \(t_1;t'_2 \sim t_2;t'_1\) and \( t;t^{\bullet}\sim \epsilon\)--- \(\epsilon\) being the empty trace. \end{definition} Now, given the notion of causal equivalence, using an axiomatic approach~\cite{Lanese2020} and that our reversible semantics satisfies necessary axioms, we obtain that our framework satisfies causal consistency, given bellow. \begin{theorem}[Causal consistency] \label{thm:causal} In IRLTS, two traces are coinitial and cofinal iff they are causally equivalent. \end{theorem} Finally, we give the equivalent to the \enquote{unicity lemma} (\autoref{lm:ccsidentified}) for IRLTS: note that since the same transition can occur multiple times, and as backward and forward transitions may share the same identifiers, we can have the exact same guarantee that any transition uses identifiers only once only up to causal consistency. \begin{restatable}[Unicity for IRLTS]{lemma}{lemunicityir}\label{lem:unicityir} For a given trace \(d\), there exist a trace \(d'\), such that \(d'\sim d\) and \(d'\) contains any identifier at most once, and if a transition in \(d'\) has identifier \(i_1 \oplus i_2 \in \ids_p\), then neither \(i_1\) nor \(i_2\) occur in \(d'\). \end{restatable} \subsection{Links to RCCS and CCSK: Translations and Comparisons} \label{sec:translation} We give the details of a possible encoding of our IRLTS terms into RCCS and CCSK terms in \autoref{sec:app-translation}. Our calculus is more general, since it allows multiple sums, and more precise, since the identifier mechanisms is explicit, but has some drawbacks with respect to those calculi as well. While RCCS \enquote{maximally distributes} the memories to all the threads, our calculus for the time being forces all the memories to be stored in one shared place. Poor implementations of this mechanism could result in important bottlenecks, as memories need to be centralized: however, we believe that an asynchronous handling of the memory accesses could allow to bypass this limitation in our calculus, but reserve this question for future work. With respect to CCSK, our memory events are potentially duplicated every time the \(\delta^?\) operator is applied, resulting in a space waste, while CCSK never duplicates any memory event. Furthermore, the stability of CCSK's terms through execution---as the number of threads do not change during the computation---could constitute another advantage over our calculus. We believe the encoding we present to be fairly straightforward, and that it will open up the possibility of switching from one calculus to another based on the needs to distribute the memories or to reduce the memory footprint. \section{Advances and New Features in Reversible Calculi} % \subsection{Replication, and Why We Cannot Create Exact Copies of Memory Events} Adding replication to the identified calculi is easy: it suffices to add the replication operator \(!P\) to the operators (\autoref{def:operators}) and the \enquote{replication group} of \autoref{fig:reprules} to the ILTS rules (\autoref{fig:ltsrules}). \begin{figure}% \begin{tcolorbox}[title=Replication Group] \begin{prooftree} \hypo{[{\scalebox{1}[0.89]{$\cap$}}_2](\mathsf{s}) \circ P \fwlts{i}{\mu} \mathsf{s}' \circ P'} \infer[]1[repl.\(_1\)]{\mathsf{s} \circ !P \fwlts{i}{\mu} ([{\scalebox{1}[0.89]{$\cap$}}_1]\mathsf{s}, \mathsf{s}')\circ !P \mid P'} \end{prooftree} \\[1.8em] \begin{prooftree} \hypo{[{\scalebox{1}[0.89]{$\cap$}}_2]([{\scalebox{1}[0.89]{$\cap$}}_1](\mathsf{s})) \circ P \fwlts{i_1}{\lambda} \mathsf{s}_1 \circ P'} \hypo{[{\scalebox{1}[0.89]{$\cap$}}_2]([{\scalebox{1}[0.89]{$\cap$}}_2](\mathsf{s})) \circ P \fwlts{i_2}{\out{\lambda}} \mathsf{s}_2 \circ P''} \infer[]2[repl.\(_2\)]{\mathsf{s}\circ !P \fwlts{i_1 \oplus i_2}{\tau} ([{\scalebox{1}[0.89]{$\cap$}}_1](\mathsf{s}), (\mathsf{s}_1, \mathsf{s}_2))\circ !P \mid (P' \mid P'')} \end{prooftree} \end{tcolorbox} \caption{Additional rules for the identified labeled transition system} \label{fig:reprules} \end{figure} We adopt a pair of rules to obtain a finitely branching transition system without loosing computational nor decisional power~\cite[Section 4.3.1]{Busi2009}. The handling of the identifier components is guided by the intuition: repl.\(_1\) can be seen as a two-steps procedure, combining the operations of splitting \(\mathsf{s} \circ !P\) into \([{\scalebox{1}[0.89]{$\cap$}}](\mathsf{s}) \circ !P \mid P\) and then performing the transition from \([{\scalebox{1}[0.89]{$\cap$}}_2](\mathsf{s}) \circ P\). The situation with repl.\(_2\) is similar, with \(\mathsf{s} \circ !P\) split \emph{in three} \((\id \times [{\scalebox{1}[0.89]{$\cap$}}]) ([{\scalebox{1}[0.89]{$\cap$}}](\mathsf{s})) \circ !P \mid (P \mid P)\) to let the two last threads synchronize. Proving that the rules are still well-formed (\autoref{lem:lts-well}) amounts to verify that \([{\scalebox{1}[0.89]{$\cap$}}_1](\mathsf{s})\) and \([{\scalebox{1}[0.89]{$\cap$}}_2](\mathsf{s})\) are compatible, and that they remain compatible after any transition. This gives the unicity property (\autoref{lem:unicity}) as well as the other properties listed in \autoref{sec:ident-proof} for free. We would like now to argue that there are essentially four options in the handling of the memory for the forward part of the reversible calculus: we detail in \autoref{fig:exporules} only the forward part of repl.\(_1\), ignoring the seeds and assuming the existence of an operator \(?\) to tag memories and of a \enquote{memory difference} operator \(m' \setminus m\) that returns the events in \(m'\) not in \(m\). % \begin{figure} \begin{tcolorbox}[title=Replication Group] \begin{prooftree} \hypo{ m \rhd P \fwlts{i}{\lambda} m' \rhd P'} \infer[]1[repl.\(_1^{a)}\)]{m \rhd !P \fwlts{i}{\lambda} [? m, ? m'] \rhd !P \mid P'} \end{prooftree} \hfill \begin{prooftree} \hypo{ m \rhd P \fwlts{i}{\lambda} m' \rhd P'} \infer[]1[repl.\(_1^{c)}\)]{m \rhd !P \fwlts{i}{\lambda} [? m,? (m' \setminus m)] \rhd 0 \mid P'} \end{prooftree} \\[1.8em] \begin{prooftree} \hypo{ m \rhd P \fwlts{i}{\lambda} m' \rhd P'} \infer[]1[repl.\(_1^{b)}\)]{m \rhd !P \fwlts{i}{\lambda} [? m,? (m' \setminus m)] \rhd !P \mid P'} \end{prooftree} \hfill \begin{prooftree} \hypo{ m \rhd P \fwlts{i}{\lambda} m' \rhd P'} \infer[]1[repl.\(_1^{d)}\)]{m \rhd !P \fwlts{i}{\lambda} [? m, [\emptyset, ? (m' \setminus m)]] \rhd 0 \mid (!P\mid P')} \end{prooftree} \end{tcolorbox} \caption{Forward rules of the identified reversible labeled transition system with replication} \label{fig:exporules} \end{figure} Note that the rules c) and d) are not exactly extensions of the identified rule, but enable to \enquote{split} a duplicated process between its future and its past, preserving a copy of its current state in d). More conservatively, those rules could impose \(m = \delta^? \emptyset\) to prevent the duplication of memory altogether. Without this restriction, we argue that \emph{un-distinguishable copies of events cannot exist} while maintaining \autoref{thm:causal}. Let us illustrate this point with two examples, using the a) and b) rules: \begin{align*} (0, 1) \circ \emptyset \rhd a . !b & \fwlts{0}{a} (1, 1) \circ \mem{0, a, \_} \rhd !b \tag{act.} \\ & \fwlts{2}{b} ((1, 2), (4, 2)) \circ [\mem{0, a, \_}, \mem{2, b, \_} . \mem{0, a, \_}] \rhd !b \mid 0 \tag{repl.\(_1^{a)}\)} \\ & \bwlts{2}{b} ((1, 2), (2, 2)) \circ [\mem{0, a, \_}, \mem{0, a, \_}] \rhd !b \mid b \tag{act.} \\ & \bwlts{0}{a} (0, 1) \circ \emptyset \rhd a.(!b \mid b) \tag{act.} \end{align*} \begin{align*} (0, 1) \circ \emptyset \rhd a . !b & \fwlts{0}{a} (1, 1) \circ \mem{0, a, \_} \rhd !b \tag{act.} \\ & \fwlts{2}{b} ((1, 2), (4, 2)) \circ [\mem{0, a, \_}, \mem{2, b, \_}] \rhd !b \mid 0 \tag{repl.\(_1^{b)}\)} \\ & \bwlts{2}{b} ((1, 2), (2, 2)) \circ [\mem{0, a, \_}, \emptyset] \rhd !b \mid b \tag{act.} \end{align*} Note that in the first case \emph{the origin of the process changed} and that in the second, \emph{the process cannot backtrack to an initial process anymore}, as it can not undo the transition identified by \(0\) anymore. Both cases make it impossible to preserve causal consistency (\autoref{thm:causal}). Stated differently, \emph{forward rules in the replication group must be un-done using corresponding backward rules}, but as the copy of the replicated process does not keep track of its \enquote{duplicated status}, the only way to enforce this rule is to \emph{mark the memories}. This observation implies that at least in the a) and b) rules, the \(?\) operator is a necessity if causal consistency needs to be preserved. More liberal definition of our seed mechanism could allow process resulting from the application of the c) and d) rules to backtrack to an initial process, that would be different from the original process: if and how this mechanism could be exploited to execute in parallel the future and the past of the same process remains to be determined. In any case, by using the \(?\) operator in the memory to \enquote{force} the backward transitions to fold up the replicated process back to the state before the execution, we conjecture that none of the usual properties would be lost. Furthermore, we conjecture that introducing different \(?\) symbols for the rules a)--d) and adopting the exact symmetric rules for the backward transitions would \emph{allow the four rules to co-exist}, opening the ability to represent different behaviors when it comes to duplicating processes or memories. \subsection{Contexts, and How We Do Not Have Congruences in Reversible Calculi Yet} \label{sec:context} We remind the reader of the definition of contexts \(\cont{\cdot}\) on CCS terms \(\ensuremath{\mathsf{P}}\), before introducing contexts \(\icont{\cdot}\) (resp.\@\xspace \(\mcont{\cdot}\), \(\rcont{\cdot}\)) on identified terms \(\ensuremath{\mathsf{I}}\) (resp.\@\xspace on memories \(\ensuremath{\mathsf{M}}\), on identified reversible terms \(\ensuremath{\mathsf{R}}\)). \begin{definition}[Term Context] \label{def:term-context} A context \(\cont{\cdot} : \ensuremath{\mathsf{P}} \to \ensuremath{\mathsf{P}}\) is inductively defined using all process operators and a fresh symbol \(\cdot\) (the \emph{slot}) as follows (omitting the symmetric contexts): \begin{equation*} \cont{\cdot} \coloneqq \lambda . \cont{\cdot} \enspace | \enspace P \mid \cont{\cdot} \enspace | \enspace \cont{\cdot} \backslash \lambda \enspace | \enspace \lambda_1.P + \lambda_2 . \cont{\cdot} \enspace | \enspace P \ovee \cont{\cdot} \enspace | \enspace P \sqcap \cont{\cdot} \enspace | \enspace \cdot \end{equation*} \end{definition} When placing an identified term into a context, we want to make sure that a well-identified process remains well-identified, something that can be easily achieved by noting that for all process \(P\) and seed \(\mathsf{s}\), \(({\scalebox{1}[0.89]{$\cup^?$}} {\scalebox{1}[0.89]{$\cap$}}^? \mathsf{s}) \circ P\) is always well-identified, for the following definition of \({\scalebox{1}[0.89]{$\cup^?$}}\): \begin{definition}[Unifier] \label{def:unifier} Given a process \(P\) and a seed \(\mathsf{s}\), we define \begin{align*} {\scalebox{1}[0.89]{$\cup^?$}}(\ip, P) & = \ip \circ P & & & {\scalebox{1}[0.89]{$\cup^?$}} ((\mathsf{s}_1, \mathsf{s}_2), P) & = \begin{dcases*} ({\scalebox{1}[0.89]{$\cup^?$}}({\scalebox{1}[0.89]{$\cap$}}_1 (\mathsf{s}_1), P)) & if \(\mathsf{s}_1\) is not of the form \(\ip_1\) \\ ({\scalebox{1}[0.89]{$\cap$}}_1 (\mathsf{s}_1), P) & otherwise \end{dcases*} \end{align*} \end{definition} \begin{definition}[Identified Context] \label{def:icontext} An identified context \(\icont{\cdot} : \ensuremath{\mathsf{I}} \to \ensuremath{\mathsf{I}}\) is defined using term contexts as \(\icont{\cdot} = ({\scalebox{1}[0.89]{$\cup^?$}} {\scalebox{1}[0.89]{$\cap$}}^? \cdot) \circ \cont{\cdot}\). \end{definition} \begin{example} A term \((0, 1) \circ a + b\) placed in the identified context \(({\scalebox{1}[0.89]{$\cup^?$}} {\scalebox{1}[0.89]{$\cap$}}^? \cdot) \circ \cdot \mid \out{a}\) would result in the term \(((0, 2), (1, 2)) \circ a + b \mid \out{a}\) from \autoref{example-trans}. The term \(((0, 2), (1, 2))\circ a \mid b\) placed in the same context would give \(((0, 4), (1, 4)), (2, 4)) \circ (a \mid b)\mid \out{a}\). \end{example} We now turn our attention to \emph{memory contexts}, and write \(\ensuremath{\mathsf{M}}\) for the set of all memories. \begin{definition}[Memory Context] \label{def:memory-context} A memory context \(\mcont{\cdot} : \ensuremath{\mathsf{M}} \to \ensuremath{\mathsf{M}}\) is inductively defined using the operators of \autoref{def:memory}, the operations of Definitions~\ref{def:op-on-mem} and \ref{def:dup}, an \enquote{append} operation and a fresh symbol \(\cdot\) (the \emph{slot}) as follows: \begin{equation*} \mcont{\cdot} \coloneqq [\mcont{\cdot}, m] \enspace | \enspace [m, \mcont{\cdot}] \enspace | \enspace e.\mcont{\cdot} \enspace | \enspace \mcont{\cdot}.e \enspace | \enspace \delta^? \mcont{\cdot} \enspace | \enspace \mcont{\cdot}[j \shortleftarrow k] \enspace | \enspace \mcont{\cdot} \concat_j (o, P, d) \enspace | \enspace \cdot \end{equation*} Where \(e. m = [e.m_1, e.m_2]\)and \(m . e = [m_1 . e, m_2 . e]\) if \(m = [m_1, m_2]\), and \(m.e = m' . e . \emptyset\) if \(m = m' . \emptyset\). \end{definition} \begin{definition}[Reversible Context] \label{def:rcontext} A reversible context \(\rcont{\cdot} : \ensuremath{\mathsf{R}} \to \ensuremath{\mathsf{R}}\) is defined using term and memory contexts as \(\rcont{\cdot} = ({\scalebox{1}[0.89]{$\cup^?$}} {\scalebox{1}[0.89]{$\cap$}}^? \cdot) \circ \mcont{\cdot} \rhd \cont{\cdot}\). It is \emph{memory neutral} if \(\mcont{\cdot}\) is built using only \(\cdot\), \([\emptyset, \mcont{\cdot}]\) and \([\mcont{\cdot}, \emptyset]\). \end{definition} Of course, a reversible context can change the past of a reversible process \(R\), and hence the initial process \(\orig{R}\) to which it corresponds (\autoref{def:initial}). % \begin{example} Let \(\rcont{\cdot}_1 = [\emptyset, \cdot] \rhd P \mid \cont{\cdot}\) and \(\rcont{\cdot}_2 = \delta^?[\cdot] \rhd P \mid \cont{\cdot}\). Letting \(R = (1, 1) \circ \mem{0, a, \_} \rhd b\), we obtain \(\rcont{R}_1 = ((1, 2), (2, 2)) \circ [\emptyset, \mem{0, a, \_}] \rhd P \mid b\) and \(\rcont{R}_2 = ((1, 2), (2, 2)) \circ [\mem{0, a, \_}, \mem{0, a, \_}] \rhd P \mid b\), and we have \begin{align*} \rcont{R}_1 & \bwlts{0}{a} ((1, 2), (0, 2)) \circ [\emptyset, \emptyset] \rhd P \mid a.b & & & \rcont{R}_2 & \bwlts{0}{a} (0, 1) \circ \emptyset \rhd a.(P \mid b) \end{align*} \end{example} Note that not all of the reversible contexts, when instantiated with a reversible term, will give accessible terms. Typically, a context such as \([\emptyset, \cdot] \rhd \cdot\) will be \enquote{broken} in the sense that the memory pair created will never coincide with the structure of the term and its memory inserted in those slots. % However, even restricted to contexts producing accessible terms, reversible contexts are strictly more expressive that term contexts. To make this more precise in \autoref{lem:contexts}, we use two bisimulations close in spirit to Forward-reverse bisimulation~\cite{Phillips2007} and back-and-forth bisimulation~\cite{Bednarczyk1991}, but that leave some flexibility regarding identifiers and corresponds to Hereditary-History Preserving Bisimulations~\cite{Aubert2020b}. Those bisimulations---\textnormal{B\&F}\xspace and \textnormal{SB\&F}\xspace---are recalled in \autoref{sec:bf} and proven below \emph{not} to be congruences, not even under \enquote{memory neutral} contexts. \begin{restatable}{lemma}{lemcont}\label{lem:cont} \label{lem:contexts} For all non-initial reversible process \(R\), there exists reversible contexts \(\rcont{\cdot}\) such \(\orig{\rcont{R}}\) is reachable and for all term context \(\cont{\cdot}\), \(\cont{\orig{R}}\) and \(\orig{\rcont{R}}\) are not \textnormal{B\&F}\xspace. \end{restatable} \begin{theorem} \textnormal{B\&F}\xspace and \textnormal{SB\&F}\xspace are not congruences, not even under memory neutral contexts. \end{theorem} \begin{proof} The processes \(R_1 = (1, 1) \circ \mem{0, a, \_} \rhd b+b\) and \(R_2 = (1, 1) \circ \mem{0, a, (+, b.a, \mathrm{R})} \rhd b\) are \textnormal{B\&F}\xspace, but letting \(\rcont{\cdot} = \cdot \rhd \cdot + c\), \(\rcont{R_1}\) and \(\rcont{R_2}\) are not. Indeed, it is easy to check that \(R_1\) and \(R_2\), as well as \(\orig{R_1} = (0, 1) \circ \emptyset \rhd a .(b+b)\) and \(\orig{R_2} = (0, 1) \circ \emptyset \rhd (a.b) + (a.b)\), are \textnormal{B\&F}\xspace, but \(\orig{\rcont{R_1}} = (0, 1) \circ \emptyset \rhd a.((b+b)+c)\) and \(\orig{\rcont{R_2}} = (0, 1) \circ \emptyset \rhd (a.(b+c))+(a.b)\) are not \textnormal{B\&F}\xspace, and hence \(\rcont{R_1}\) and \(\rcont{R_2}\) cannot be either. The same example works for \textnormal{SB\&F}\xspace. \end{proof} We believe similar reasoning and example can help realizing that \emph{none of the bisimulations introduced for reversible calculi are congruences} under our definition of reversible context. Some congruences for reversible calculi have been studied~\cite{Aubert2016jlamp}, but they allowed the context to be applied only to the origins of the reversible terms: whenever interesting congruences allowing contexts to be applied to non-initial terms exist is still an open problem, in our opinion, but we believe our formal frame will allow to study it more precisely. \bibliographystyle{splncs04}
\section{Introduction} Grothendieck and Hartshorne introduced dualizing complexes; see \cite{H}. Dualizing complexes and the rich duality theory induced by them were appeared in many contexts in algebraic geometry and commutative algebra. Semidualizing modules are also proven to be a venerable tool in commutative algebra. To unify the study of dualizing complexes and semidualizing modules, Christensen \cite{C1} introduced the notion of semidualizing complexes. Immediate examples of semidualizing complexes are the shifts of the underlying rings and dualizing complexes. These are precisely semidualizing complexes with finite projective dimension and semidualizing complexes with finite injective dimension. It is known that a homologically bounded complex $X$ with finitely generated homology modules is a dualizing complex for a local ring $R$ if and only if there exists an integer $d$ such that the $d$th Bass number of $X$ is one and the other Bass numbers of $X$ are zero; see \cite[Chapter V, Proposition 3.4]{H}. We establish some criteria for semidualizing complexes that are either the shifts of the underlying ring or dualizing, via their Betti and Bass numbers. Throughout, $(R,\mathfrak{m},k)$ is a commutative Noetherian local ring with non-zero identity. Since the time Hilbert proved his celebrated Syzygy theorem, the importance of free resolutions becomes clear. The numerical invariants Betti numbers of a finitely generated $R$-module $M$ are defined by the minimal free resolution of $M$. By definition, the $i$th Betti number of $M$, denoted $\beta^R_i(M)$, is the minimal number of generators of the $i$th syzygy of $M$ in its minimal free resolution. By knowing the Betti numbers of an $R$-module, we can decode a lot of valuable information about it. The $i$th Bass number of an $R$-module $M$, denoted $\mu^i_R(M)$, is defined by using the minimal injective resolution of $M$. Similar to the Betti numbers, the Bass numbers also reveal a lot of information about the module. The type of an $R$-module $M$ is defined to be $\mu^{\dim_RM}_R(M)$. It is known that local rings with small type have nice properties; see e.g. \cite{B, V, F1, R, CHM, K, Ao, Le1, Le2, CSV}. By the work of Bass \cite{B}, every Cohen-Macaulay local ring of type one is Gorenstein. (In \cite{CSV}, this is improved to the statement that if $R$ is a Cohen-Macaulay local ring and $\mu^n_R(R)=1$ for some $n\geq 0$, then $R$ is Gorenstein of dimension $n$.) Vasconcelos \cite[4, p. 53]{V} conjectured that every local ring of type one is Gorenstein. Foxby \cite{F1} solved this conjecture for equicharacteristic local rings. The general case was answered by Roberts \cite{R}. In this article, we prove that if $X$ is a Cohen-Macaulay complex with $\beta^R_{\sup X}(X)=1$, then $X\simeq \Sigma^{\sup X} R/\operatorname{Ann}_RX$; see Theorem \ref{29}(a). As an application, we show that if $M$ is a finitely generated $R$-module of type one, then $M$ is the dualizing module for the ring $R/\text{Ann}_RM$; see Corollary \ref{210}. This gives an affirmative answer to a conjecture raised by Foxby \cite[Conjecture B]{F1}, which is already proved; see e.g. \cite[Corollary 2.7]{Le1}. We may improve Theorem \ref{29}(a), if we consider a semidualizing complex $C$ with $\beta^R_{\sup C}(C)\leq 2$. We do this in Theorems \ref{29}(b), \ref{212} and \ref{216}. These results assert that: \begin{theorem}\label{11} Let $(R,\mathfrak{m},k)$ be a local ring and $C$ a semidualizing complex for $R$. \begin{enumerate} \item[(a)] If $\beta^R_{\sup C}(C)=1$ and $\operatorname{Ass} R$ is a singleton, then $C\simeq \Sigma^{\sup C}R$. \item[(b)] If $\beta^R_{\sup C}(C)=2$ and $R$ is a domain, then $\operatorname{amp} C=0$. \item[(c)] If $\beta^R_{n}(C)=1$ for some integer $n$ and either $R$ is Cohen-Macaulay, or $C$ is a module with a rank, then $C\simeq \Sigma^nR$ and $n=\sup C$. \end{enumerate} \end{theorem} Dually, concerning semidualizing complexes with small type, in Corollaries \ref{213} and \ref{217}, we prove that: \begin{theorem}\label{12} Let $(R,\mathfrak{m},k)$ be a local ring and $C$ a semidualizing complex for $R$. \begin{enumerate} \item[(a)] If $C$ is a module of type one, then $C$ is dualizing. \item[(b)] If $C$ has type one, then $C$ is dualizing provided either $\operatorname{Ass} R$ is a singleton and $R$ admits a dualizing complex, or $\operatorname{Ass} \widehat{R}$ is a singleton. \item[(c)] If $C$ has type two and $R$ is a domain admitting a dualizing complex, then $C$ is Cohen-Macaulay. \item[(d)] If $\mu_R^{n}(C)=1$ for some integer $n$, $C$ is Cohen-Macaulay and $R$ is either Cohen-Macaulay or analytically irreducible, then $C$ is dualizing and $n=\dim_RC$. \end{enumerate} \end{theorem} Each of parts (a) and (b) extends the above-mentioned result of Roberts. Also, part (c) extends the main result of \cite{CHM}. Finally, part (d) generalizes \cite[Characterization 1.6]{CSV}. It is known that every dualizing complex has type one. Also, it is easy to check that if a complex $C$ is quasi-isomorphic to a shift of $R$, then $\beta^R_{\sup C}(C)=1$. Thus, we immediately exploit Theorem \ref{11}(a) and Theorem \ref{12}(b) to obtain the following corollary: \begin{corollary}\label{13} Let $(R,\mathfrak{m},k)$ be an analytically irreducible local ring and $C$ a semidualizing complex for $R$. Then \begin{enumerate} \item[(a)] $C$ is quasi-isomorphic to a shift of $R$ if and only if $\beta^R_{\sup C}(C)=1$. \item[(b)] $C$ is a dualizing complex for $R$ if and only if $\mu^{\dim_RC}_R(C)=1$. \end{enumerate} \end{corollary} \section{The Results} In what follows, $\mathcal{D}(R)$ denotes the derived category of the category of $R$-modules. Also, $\mathcal{D}^f_{\Box}(R)$ denotes the full subcategory of homologically bounded complexes with finitely generated homology modules. The isomorphisms in $\mathcal{D}(R)$ are marked by the symbol $\simeq$. For a complex $X\in \mathcal{D}(R)$, its supremum and infimum are defined, respectively, by $\sup X:=\sup \{i\in \mathbb{Z}\mid \text{H}_i(X)\neq 0\}$ and $\inf X:=\inf \{i\in \mathbb{Z}\mid \text{H}_i(X) \neq 0\}$, with the usual convention that $\sup \emptyset=-\infty$ and $\inf \emptyset=\infty$. Also, amplitude of $X$ is defined by $\operatorname{amp} X:=\sup X-\inf X$. In what follows, we will use, frequently, the endofunctors $-\otimes_R^{{\bf L}}-$, ${\bf R}\operatorname{Hom}_R(-,-)$ and $\Sigma^n(-), n\in\mathbb{Z},$ on the category $\mathcal{D}(R)$. For the definitions and basic properties of these functors, we refer the reader to \cite[Appendix]{C2}. Theorem \ref{29} is the first main result of this paper. To prove it, we need Lemmas \ref{25}, \ref{27} and \ref{28}. For proving Lemma \ref{27}, we require to establish Lemmas \ref{21}, \ref{22} and \ref{26}. Lemma \ref{21} improves, slightly, the celebrated New Intersection theorem. Our proofs of Lemmas \ref{21}, \ref{22} are slight modifications of the proofs of \cite[Theorem 1.2]{F1} and \cite[Lemma 3.2]{F1}. Also, Remark \ref{24} serves as a powerful tool throughout the paper. \begin{lemma}\label{21} Let $(R,\mathfrak{m},k)$ be a local ring. Let $$F= 0\longrightarrow F_s\longrightarrow F_{s-1}\longrightarrow \cdots \longrightarrow F_0\longrightarrow 0$$ be a non-exact complex of finitely generated free $R$-modules and $t$ be a non-negative integer such that $\dim_R(\text{H}_i(F))\leq i+t$ for all $0\leq i\leq s$. Then $\dim R\leq s+t$. \end{lemma} \begin{proof} Without loss of generality, we may and do assume that $R$ is complete. Let $\mathfrak{p}$ be a prime ideal of $R$ with $\dim R/\mathfrak{p}=\dim R$ and set $\widetilde{F}:=F\otimes_R R/\mathfrak{p}$. Then $\widetilde{F}$ is a bounded complex of finitely generated free $R/\mathfrak{p}$-modules. By virtue of \cite[Corollary A.4.16]{C2}, we have $\inf \widetilde{F}=\inf F$, and so the complex $\widetilde{F}$ is non-exact. Next, we show that $\dim_{R/\mathfrak{p}}(\text{H}_i(\widetilde{F}))\leq i+t$ for all $0\leq i\leq s$. Suppose that the contrary holds. Then, we may choose $\ell$ to be the least integer such that $\dim_{R/\mathfrak{p}}(\text{H}_{\ell}(\widetilde{F}))>\ell+t$. So, there is a prime ideal $\mathfrak{q}/\mathfrak{p}\in \operatorname{Supp}_{R/\mathfrak{p}}(\text{H}_{\ell}(\widetilde{F}))$ such that $\dim (R/\mathfrak{p})/(\mathfrak{q}/\mathfrak{p})>\ell+t$. From the choice of $\ell$, it turns out that $\inf((\widetilde{F})_{\mathfrak{q}/\mathfrak{p}})=\ell$. But, $$\begin{array}{ll} (\widetilde{F})_{\mathfrak{q}/\mathfrak{p}}&\cong (F\otimes_RR/\mathfrak{p})\otimes_{R/\mathfrak{p}}(R/\mathfrak{p})_{\mathfrak{q}/\mathfrak{p}}\\ &\cong F\otimes_R R_{\mathfrak{q}}/\mathfrak{p} R_{\mathfrak{q}} \\ &\cong (F\otimes_RR_{\mathfrak{q}})\otimes_{R_{\mathfrak{q}}}R_{\mathfrak{q}}/\mathfrak{p} R_{\mathfrak{q}} \\ &\cong F_{\mathfrak{q}}\otimes_{R_{\mathfrak{q}}}R_{\mathfrak{q}}/\mathfrak{p} R_{\mathfrak{q}},\\ \end{array}$$ and so applying \cite[Corollary A.4.16]{C2} again, yields that $\inf F_{\mathfrak{q}}=\ell$. Hence $\mathfrak{q}\in \operatorname{Supp}_R(\text{H}_{\ell}(F))$, and so $\dim_R(\text{H}_{\ell}(F))>\ell+t$. We arrive at a contradiction. Therefore, in the rest of proof, we assume that $R$ is a catenary local domain. We proceed by induction on $d:=\dim R$. Obviously, the claim holds for $d=0$. Suppose that $d>0$ and the claim holds for $d-1$. If $\dim_R(\text{H}_i(F))\leq 0$ for all $0\leq i\leq s$, then by the New Intersection theorem, we deduce that $\dim R\leq s$. So, we may assume that $\dim_R(\text{H}_j(F))> 0$ for some $0\leq j\leq s$. Then, we can take a prime ideal $\mathfrak{p}\in \operatorname{Supp}_R(\text{H}_j(F))$ such that $\dim R/\mathfrak{p}=1$. Now, $F_{\mathfrak{p}}$ is a non-exact complex of finitely generated free $R_{\mathfrak{p}}$-modules and $$\dim_{R_{\mathfrak{p}}}(\text{H}_i(F_{\mathfrak{p}}))\leq \dim_R(\text{H}_i(F))-1\leq i+(t-1)$$ for all $0\leq i\leq s$. Since $\dim R_{\mathfrak{p}}=\dim R-1$, the induction hypothesis implies that $\dim R_{\mathfrak{p}}\leq s+(t-1)$. Hence, $\dim R\leq s+t$. \end{proof} To present the next result, we have to fix some notation. Let $t$ be a non-negative integer and $$F= \cdots \longrightarrow F_i\longrightarrow F_{i-1} \longrightarrow \cdots \longrightarrow F_{t+1}\longrightarrow F_t\longrightarrow 0$$ be a complex of finitely generated free $R$-modules. For each $i\geq t$, set $$\gamma_i(F): =r_i-r_{i-1}+\cdots +(-1)^{i-t}r_t,$$ where $r_j$ is the rank of $F_j$ for each $j\geq t$. \begin{lemma}\label{22} Let $(R,\mathfrak{m},k)$ be a local ring and $t\leq \dim R$ a non-negative integer. Let $$F=\cdots\longrightarrow F_i\longrightarrow F_{i-1} \longrightarrow \cdots \longrightarrow F_t\longrightarrow 0$$ be a complex of finitely generated free $R$-modules such that $\dim_R(\text{H}_i(F))\leq i$ for all $t\leq i\leq \dim R$. Then for each integer $t\leq n\leq \dim R$, we have: \begin{itemize} \item[(a)] $\gamma_n(F)\geq 0$. \item[(b)] $\gamma_n(F)>0$ if $\text{H}_t(F)\neq 0$ and either $\dim_R(\text{H}_n(F))=n$ or $n<\dim R$. \end{itemize} \end{lemma} \begin{proof} Let the complex $$G=0\longrightarrow F_n\longrightarrow F_{n-1}\longrightarrow \cdots \longrightarrow F_t\longrightarrow 0$$ be the truncation of $F$ at the spot $n$ and let $Z_n$ denote the kernel of the differential map $F_n\longrightarrow F_{n-1}$. Then, $\text{H}_i(G)=\text{H}_i(F)$ for all $i<n$ and $\text{H}_n(G)=Z_n$. If $n=t$, then $\gamma_n(F)$ is the rank of the free $R$-module $F_t$, and so both assertions are immediate in this case. So, in the rest of the proof, we assume that $n>t$. (a) Let $\mathfrak{p}$ be a prime ideal of $R$ with $\dim R/\mathfrak{p}\geq n$. As $\dim_R(\text{H}_i(F))\leq i$ for all $t\leq i\leq n-1$, it follows that the complex $$0\longrightarrow (Z_n)_{\mathfrak{p}}\longrightarrow (F_n)_{\mathfrak{p}}\longrightarrow (F_{n-1})_{\mathfrak{p}}\longrightarrow \cdots \longrightarrow (F_t)_{\mathfrak{p}}\longrightarrow 0$$ is exact. Hence, $(Z_n)_{\mathfrak{p}}$ is a free $R_{\mathfrak{p}}$-module of rank $\gamma_n(F)$. So, $\gamma_n(F)\geq 0$. (b) Assume that $\text{H}_t(F)\neq 0$. Suppose that $\dim_R Z_n<n$. Then, applying Lemma \ref{21} to the complex $G$, we get $\dim R\leq n$. Also, we have $$\dim_R(\text{H}_n(F))\leq \dim_R Z_n<n.$$ Thus, if either $\dim_R(\text{H}_n(F))=n$ or $n<\dim R$, then $\dim_R Z_n\geq n$. Let $\mathfrak{p}\in \operatorname{Supp}_R Z_n$ be such that $\dim R/\mathfrak{p}\geq n$. Then, as we saw in the proof of (a), the non-zero $R_{\mathfrak{p}}$-module $(Z_n)_{\mathfrak{p}}$ is free of rank $\gamma_n(F)$, and so $\gamma_n(F)>0$. \end{proof} Let $(R,\mathfrak{m},k)$ be a local ring. For an $R$-complex $X$ and an integer $n$, the $n$th Betti number of $X$, $\beta^R_n(X)$, is defined as the rank of the $k$-vector space $\operatorname{Tor}^R_n(k,X)(:=\text{H}_{n}(k\otimes_R^{{\bf L}}X))$. Dually, the $n$th Bass number of $X$, $\mu^n_R(X)$, is defined as the rank of the $k$-vector space $\operatorname{Ext}_R^n(k,X)(:=\text{H}_{-n}({\bf R}\operatorname{Hom}_R(k,X)))$. Also, dimension, depth and Cohen-Macaulay defect of an $R$-complex $X$ are, respectively, defined as follows: $$\dim_RX:=\sup\{\dim_R( \text{H}_i(X))-i \mid \ i\in\mathbb{Z}\},$$ $$\operatorname{depth}_RX:=\inf\{i\in \mathbb{Z} \mid \operatorname{Ext}_R^i(k,X)\neq 0 \}, \ \ \text{and}$$ $$\operatorname{cmd}_RX:=\dim_RX-\operatorname{depth}_RX.$$ For an $R$-complex $X$, it is known that $\dim_RX=\sup \{\dim R/\mathfrak{p}-\inf X_{\mathfrak{p}} \mid \mathfrak{p}\in \operatorname{Spec} R\}.$ We set $$\operatorname{Assh}_RX:=\{\mathfrak{p}\in \operatorname{Spec} R \mid \dim R/\mathfrak{p}-\inf X_{\mathfrak{p}}=\dim_RX\}.$$ Finally, the type of an $R$-complex $X$ is defined to be $\mu^{\dim_RX}_R(X)$. \begin{definition}\label{23} Let $(R,\mathfrak{m},k)$ be a local ring. A non-exact complex $X\in \mathcal{D}^f_{\square}(R)$ is called Cohen-Macaulay if $\operatorname{depth}_RX=\dim_RX.$ \end{definition} Let $(R,\mathfrak{m},k)$ be a local ring. A \emph{semidualizing complex} for $R$ is a complex $C\in \mathcal{D}_{\Box}^f(R)$ such that the homothety morphism $R\longrightarrow {\bf R}\operatorname{Hom}_R(C,C)$ is an isomorphism in $\mathcal{D}(R)$. If, furthermore, $C$ has finite injective dimension, then it is called a \emph{dualizing complex}. It is obvious that any shift of a (semi)dualizing complex is again a (semi)dualizing complex. A dualizing complex $D$ satisfying $\sup D=\dim R$, is called a \emph{normalized dualizing complex}. Given a dualizing complex $D$, it is immediate that $\Sigma^{\dim R-\sup D}D$ is a normalized dualizing complex. For a normalized dualizing complex $D$, it is known that $\mu^i_R(D)=0$ for all $i\neq 0$ and $\mu^0_R(D)=1$; in particular $D$ has depth zero. An $R$-module which is a (semi)dualizing complex for $R$ is said to be a \emph{(semi)dualizing module}. Immediate examples of semidualizing modules are free $R$-modules of rank one. It is known that the ring $R$ possesses a dualizing complex if and only if it is homomorphic image of a Gorenstein local ring. In particular, in view of the Cohen Structure theorem, every complete local ring admits a (normalized) dualizing complex. Also, by virtue of \cite[Theorem 3.3.6]{BH}, we can see that the ring $R$ admits a dualizing module if and only if it is Cohen-Macaulay and it is homomorphic image of a Gorenstein local ring. \begin{remark}\label{24} Let $(R,\mathfrak{m},k)$ be a local ring and $D$ a normalized dualizing complex for $R$. There is a dagger duality functor $$(-)^{\dag}:={\bf R}\operatorname{Hom}_R(-,D):\mathcal{D}_{\Box}^f(R)\longrightarrow \mathcal{D}_{\Box}^f(R),$$ such that for every $X\in \mathcal{D}_{\Box}^f(R)$, the following assertions hold: \begin{itemize} \item[(a)] $(X^{\dag})^{\dag}\simeq X$. \item[(b)] $\dim_RX=\sup X^{\dag}$ and $\operatorname{depth}_RX=\inf X^{\dag}$. \item[(c)] $X$ is a Cohen-Macaulay complex if and only if $\operatorname{amp} X^{\dag}=0$. \item[(d)] $\mu^n_R(X)=\beta^R_n(X^{\dag})$ for all integers $n$. \item[(e)] $\operatorname{id}_RX=\operatorname{pd}_RX^{\dag}$. \item[(f)] $X$ is a semidualizing complex for $R$ if and only if $X^{\dag}$ is so. \end{itemize} \end{remark} \begin{proof} For parts (a) and (b) see e.g. \cite[Theorem A.8.5]{C2}. For part (b), note that $\operatorname{depth}_RD=0$. (c) is obvious by (b). (d) As $D$ is a normalized dualizing complex for $R$, we have $\mu^i_R(D)=0$ for all $i\neq 0$ and $\mu^0_R(D)=1$. Thus, for every integer $n$, \cite[Theorem 4.1(a)]{F2} yields that $$\mu^n_R(X)=\mu^n_R({\bf R}\operatorname{Hom}_R(X^{\dag},D))=\sum \limits_{i\in \mathbb{Z}}\beta^R_i(X^{\dag}) \mu^{n-i}_R(D)=\beta^R_n(X^{\dag}).$$ (e) For each complex $Y\in \mathcal{D}_{\Box}^f(R)$, by virtue of \cite[Corollary 2.10.F and Proposition 5.5]{AF}, it turns out that $\operatorname{pd}_RY=\sup (k\otimes_R^{\bf L}Y)$ and $\operatorname{id}_RY=-\inf ({\bf R}\operatorname{Hom}_R(k,Y))$, and so $$\operatorname{pd}_RY=\sup \{i\in \mathbb{Z} \mid \beta^R_i(Y)\neq 0\}, \ \ \text {and}$$ $$\operatorname{id}_RY=\sup \{i\in \mathbb{Z} \mid \mu^i_R(Y)\neq 0\}.$$ Therefore, (d) implies that $\operatorname{id}_RX=\operatorname{pd}_RX^{\dag}$. (f) See \cite[Corollary 2.12]{C1}. \end{proof} In the statement and proof of the next result, we use the notions of weak annihilator of a complex and attached prime ideals of an Artinian module. We recall these notions. For an Artinian $R$-module $A$, the set of attached prime ideals of $A$, $\operatorname{Att}_RA$, is the set of all prime ideals $\mathfrak{p}$ of $R$ such that $\mathfrak{p}=\operatorname{Ann}_RL$ for some quotient $L$ of $A$; see e.g. \cite[Chapter 7]{BS} for more details. Following \cite{Ap}, for a complex $X\in\mathcal{D}(R)$, the weak annihilator of $X$ is defined as $\operatorname{Ann}_RX:=\bigcap \limits_{i\in \mathbb{Z}} \operatorname{Ann}_R(\text{H}_i(X))$. \begin{lemma}\label{25} Let $(R,\mathfrak{m},k)$ be a local ring and $X\in \mathcal{D}_{\Box}^f(R)$ a non-exact complex. Let $n:=\sup X$ and $d:=\dim_RX$. \begin{itemize} \item[(a)] $\dim_R(\text{H}_i(X))\leq i+d$ for all $i\leq n$. \item[(b)] If $X$ is Cohen-Macaulay, then $\dim_R(\text{H}_n(X))=n+d$. \item[(c)] If $R$ possesses a normalized dualizing complex $D$ and $\operatorname{amp} X=0=\operatorname{amp} X^{\dag}$, then $\operatorname{Ann}_RX=\operatorname{Ann}_RX^{\dag}$. \end{itemize} \end{lemma} \begin{proof} (a) It is obvious, because $$d=\dim_RX=\sup\{\dim_R(\text{H}_i(X))-i\mid\ i\in\mathbb{Z}\}.$$ (b) Without loss of generality, we may and do assume that $R$ is complete. Then $R$ possesses a normalized dualizing complex $D$. By virtue of Remark \ref{24}, we have $\operatorname{amp} X^{\dag}=0$, $\sup X^{\dag}=d$ and $\dim_RX^{\dag}=n$. So, $X^{\dag}\simeq \Sigma^{d}\text{H}_d(X^{\dag})$. Set $N:=\text{H}_d(X^{\dag})$. As $\dim_RX^{\dag}=n$, it follows that $\dim_RN=n+d$. Thus, in view of Remark \ref{24}(a) and the Local Duality theorem \cite[Chapter V, Theorem 6.2]{H}, we have the following display of isomorphisms: $$\begin{array}{ll} \text{H}_{\mathfrak{m}}^{\dim_RN}\left(N\right)&\cong \operatorname{Hom}_R\left(\text{H}_{n+d}\left(N^{\dag}\right) ,\text{E}_R(R/\mathfrak{m})\right)\\ &\cong \operatorname{Hom}_R\left(\text{H}_n\left(\Sigma^{-d}N^{\dag}\right),\text{E}_R(R/\mathfrak{m})\right)\\ &\cong \operatorname{Hom}_R\left(\text{H}_n\left(\left(\Sigma^{d}N\right)^{\dag}\right),\text{E}_R(R/\mathfrak{m})\right)\\ &\cong \operatorname{Hom}_R\left(\text{H}_n\left(\left(X^{\dag}\right)^{\dag}\right),\text{E}_R(R/\mathfrak{m})\right)\\ &\cong \operatorname{Hom}_R\left(\text{H}_n(X),\text{E}_R(R/\mathfrak{m})\right). \end{array}$$ Now, \cite[Theorem 7.3.2 and Exercise 7.2.10(iv)]{BS} yields that $$\operatorname{Ass}_R(\text{H}_n(X))=\operatorname{Att}_R(\text{H}_{\mathfrak{m}}^{\dim_RN} \left(N\right))=\{\mathfrak{p}\in \operatorname{Ass}_RN\mid\ \dim R/\mathfrak{p}=\dim_RN \},$$ and so $\dim_R(\text{H}_n(X))=n+d$. (c) First of all note that for an $R$-module $L$, an $R$-complex $Y$ and an integer $i$, we may easily verify that $\operatorname{Ann}_RL\subseteq \operatorname{Ann}_R(\text{H}_i(L^{\dag}))$ and $\operatorname{Ann}_RY=\operatorname{Ann}_R(\Sigma^{i}Y)$. Set $M:=\text{H}_n(X)$ and $N:=\text{H}_d(X^{\dag})$. Then $X\simeq \Sigma^{n}M$ and $X^{\dag}\simeq \Sigma^{d}N$. Thus, the claim is equivalent to $\operatorname{Ann}_RM=\operatorname{Ann}_RN$. Now, we have $M^{\dag}\simeq \Sigma^{n+d}N$ and $N^{\dag}\simeq \Sigma^{n+d}M$, and so $$\begin{array}{ll} \operatorname{Ann}_RM&\subseteq \operatorname{Ann}_R(M^{\dag})\\ &=\operatorname{Ann}_RN\\ &\subseteq \operatorname{Ann}_R(N^{\dag})\\ &=\operatorname{Ann}_RM. \end{array}$$ \end{proof} \begin{lemma}\label{26} Let $(R,\mathfrak{m},k)$ be a local ring. Let $X\in \mathcal{D}^f_{\Box}(R)$ be a non-exact complex such that $\beta^R_{\sup X}(X)=1$ and $\operatorname{amp} X=0$. Then $X\simeq \Sigma^{\sup X}R/\operatorname{Ann}_RX$. Furthermore: \begin{itemize} \item[(a)] If $X$ is Cohen-Macaulay, then the local ring $R/\operatorname{Ann}_RX$ is also Cohen-Macaulay. \item[(b)] If $\operatorname{Ann}_RX=0$, then $\operatorname{pd}_RX<\infty$. \end{itemize} \end{lemma} \begin{proof} Set $R_X:=R/\operatorname{Ann}_RX$, $n:=\sup X$ and $M:=\text{H}_n(X)$. Then $X\simeq \Sigma^n M$. Now, $$\beta^R_{0}(M) =\beta^R_{0}(\Sigma^{-n}X)=\beta^R_{n}(X)=1.$$ Thus $M$ is cyclic, and so $M\cong R_X$. Therefore, $X\simeq \Sigma^nR_X$, as required. Now, the remaining assertions are trivial. \end{proof} \begin{lemma}\label{27} Let $(R,\mathfrak{m},k)$ be a local ring. Let $X\in \mathcal{D}^f_{\Box}(R)$ be a non-exact complex with $\beta^R_{\sup X}(X)=1$. Suppose that $\dim_RX=0$ and $\dim_R(\text{H}_{\sup X}(X))=\sup X$. Then $X\simeq \Sigma^{\sup X} R/\operatorname{Ann}_RX$. \end{lemma} \begin{proof} In view of Lemma \ref{26}, the assertion is equivalent to $\operatorname{amp} X=0$. Let $n:=\sup X$ and $t:=\inf X$. We claim that $n=t$. On the contrary, assume that $n>t$. Let $$F=\cdots\longrightarrow F_i\longrightarrow F_{i-1}\longrightarrow \cdots \longrightarrow F_t\longrightarrow 0$$ be the minimal free resolution of $X$. Then $F_i$ is a free $R$-module, of finite rank $\beta^R_i(X)$, for all integers $i$. From the definition of dimension of a complex, we get $$0=\dim_RX\geq \dim_R(\text{H}_{t}(X))-t,$$ and so $t\geq 0$. Our assumptions implies that $\dim_R(\text{H}_i(X))\leq i$ for all $i<n$ and $\dim_R(\text{H}_n(X))=n$. In particular, $n\leq \dim R$. Thus, by Lemma \ref{22}, we have $\gamma_n(F)>0$ and $\gamma_{n-1}(F)>0$. This yields that $$\beta^R_n(X)=\gamma_n(F) +\gamma_{n-1}(F)\geq 2.$$ We arrive at a contradiction. \end{proof} For every semidualizing complex $C$ for a local ring $R$, Christensen \cite[Corollary 3.4]{C1} has proved the inequality $\operatorname{cmd} R\leq\operatorname{cmd}_RC+\operatorname{amp} C$. Part (c) of the next result shows that it is an equality, provided $\operatorname{Ass} R$ is a singleton. \begin{lemma}\label{28} Let $(R,\mathfrak{m},k)$ be a local ring and $C$ a semidualizing complex. \begin{itemize} \item[(a)] $\operatorname{Ass}_R(\text{H}_{\sup C}(C))=\{\mathfrak{p}\in \operatorname{Ass} R \mid \inf C_{\mathfrak{p}}=\sup C\}$. \item[(b)] $\operatorname{Assh}_RC\subseteq \operatorname{Ass} R$. \item[(c)] If $\operatorname{Ass} R$ is a singleton, then $\dim_RC=\dim R-\sup C$ and $\operatorname{cmd} R=\operatorname{cmd}_RC+\operatorname{amp} C$. \end{itemize} \end{lemma} \begin{proof} Set $n:=\sup C$ and $d:=\dim_RC$. (a) By \cite[Corollary A.7]{C1}, a prime ideal $\mathfrak{p}$ of $R$ belongs to $\mathfrak{p}\in \operatorname{Ass}_R(\text{H}_{n}(C))$ if and only $\operatorname{depth} R_{\mathfrak{p}}=0$ and $\inf C_{\mathfrak{p}}=n$. But, for a prime ideal $\mathfrak{p}$ of $R$, it is evident that $\mathfrak{p}\in \operatorname{Ass} R$ if and only if $\operatorname{depth} R_{\mathfrak{p}}=0$. Thus, $$\operatorname{Ass}_R(\text{H}_{n}(C))=\{\mathfrak{p}\in \operatorname{Ass} R \mid \inf C_{\mathfrak{p}}=n\}.$$ (b) Let $A$ be an Artinian $R$-module. Then $A$ can be given a natural structure as an Artinian $\widehat{R}$-module, and so $$\operatorname{Att}_RA=\{\mathfrak{p}\cap R\mid \mathfrak{p}\in \operatorname{Att}_{\widehat{R}}A\}.$$ Also, we know that there is a natural $\widehat{R}$-isomorphism $A\otimes_R\widehat{R}\cong A$. By \cite[Proposition 2.1]{HD}, the $R$-module $\text{H}_{\mathfrak{m}}^d(C)$ is Artinian. This and \cite[Corollary 3.4.4]{Li} yield, respectively, the following $\widehat{R}$-isomorphisms: $$\text{H}_{\mathfrak{m}}^d(C)\cong \text{H}_{\mathfrak{m}}^d(C)\otimes_R\widehat{R}\cong \text{H}_{\widehat{\mathfrak{m}}}^d(C\otimes_R\widehat{R}).$$ By \cite[Lemma 2.6]{C1}, it follows that $C\otimes_R\widehat{R}$ is a semidualizing complex for the local ring $\widehat{R}$ and we may check that $\dim_{\widehat{R}}(C\otimes_R\widehat{R})=\dim_RC$. Thus, by \cite[Lemma 2.5]{HD}, we deduce that $$\begin{array}{ll} \operatorname{Assh}_RC&=\operatorname{Att}_R(\text{H}_{\mathfrak{m}}^d(C))\\ &=\{\mathfrak{p}\cap R\mid \mathfrak{p}\in \operatorname{Att}_{\widehat{R}}(\text{H}_{\widehat{\mathfrak{m}}}^d(C\otimes_R\widehat{R}))\}\\ &=\{\mathfrak{p}\cap R\mid \mathfrak{p}\in \operatorname{Assh}_{\widehat{R}}(C\otimes_R\widehat{R})\}. \end{array}$$ On the other hand, it is known that $$\operatorname{Ass} R=\{\mathfrak{p}\cap R\mid \mathfrak{p}\in \operatorname{Ass} \widehat{R}\}.$$ Therefore, we may and do assume that $R$ is complete. Then $R$ possesses a normalized dualizing complex $D$. Now, the Local Duality theorem \cite[Chapter V, Theorem 6.2]{H} implies that $$\text{H}_{\mathfrak{m}}^d\left(C\right)\cong \operatorname{Hom}_R\left(\text{H}_d(C^\dag),\text{E}_R(R/\mathfrak{m})\right),$$ and so $$\operatorname{Assh}_RC=\operatorname{Att}_R(\text{H}_{\mathfrak{m}}^d(C))=\operatorname{Ass}_R(\text{H}_d(C^\dag)).$$ By parts (f) and (b) of Remark \ref{24}, $C^\dag$ is a semidualizing complex for $R$ with $\sup C^\dag=d$. Thus, (a) yields that $\operatorname{Assh}_RC\subseteq \operatorname{Ass} R$. (c) Let $\mathfrak{p}$ be the unique member of $\operatorname{Ass} R$. Then, by virtue of (b) and (a), we have $$\operatorname{Assh}_RC=\{\mathfrak{p}\}= \operatorname{Ass}_R(\text{H}_{n}(C)).$$ Hence, $$\dim_RC=\dim R/\mathfrak{p}-\inf C_{\mathfrak{p}}=\dim R-n.$$ By \cite[Corollary 3.2]{C1}, it turns out that $$\operatorname{depth} R=\operatorname{depth}_RC+\inf C.$$ This implies that $$\begin{array}{ll} \operatorname{cmd}_RC+\operatorname{amp} C&=\dim R-n-\operatorname{depth}_RC+n-\inf C\\ &=\dim R-\operatorname{depth} R\\ &=\operatorname{cmd} R. \end{array}$$ \end{proof} Now, we are ready to prove our first theorem. \begin{theorem}\label{29} Let $(R,\mathfrak{m},k)$ be a local ring. Let $X\in \mathcal{D}^f_{\Box}(R)$ be a non-exact complex with $\beta^R_{\sup X}(X)=1$. \begin{itemize} \item[(a)] Assume that $X$ is Cohen-Macaulay. Then $X\simeq \Sigma^{\sup X}R/\operatorname{Ann}_RX$. \item[(b)] Assume that $\operatorname{Ass} R$ is a singleton and $X$ is a semidualizing complex for $R$. Then $X\simeq \Sigma^{\sup X}R$. \end{itemize} \end{theorem} \begin{proof} (a) By replacing $X$ with $\Sigma^{\dim_RX}X$, we may further assume that $\dim_RX=0$. Then, by Lemma \ref{25}, we have $\dim_R(\text{H}_{\sup X}(X))=\sup X$. Now, Lemma \ref{27} yields the claim. (b) By replacing $X$ with $\Sigma^{\dim R-\sup X}X$, we may and do assume that $\sup X=\dim R$. Then, Lemma \ref{28}(c) implies that $\dim_RX=0$. On the other hand, by Lemma \ref{28}(a), we deduce that $$\dim_R(\text{H}_{\sup X}(X))=\dim R=\sup X.$$ Now, Lemma \ref{27} yields that $X\simeq \Sigma^{\sup X}R/\operatorname{Ann}_RX$. But, then $R/\operatorname{Ann}_RX$ would be a semidualizing module for $R$, which in turns implies that $\operatorname{Ann}_RX=0$. \end{proof} The next result provides an affirmative answer to a conjecture raised by Foxby \cite[Conjecture B]{F1}. \begin{corollary}\label{210} Let $(R,\mathfrak{m},k)$ be a local ring. Let $M$ be a non-zero finitely generated $R$-module of type one. Then $M$ is the dualizing module for the local ring $R/\text{Ann}_RM$. In particular, the local ring $R/\operatorname{Ann}_RM$ is Cohen-Macaulay. \end{corollary} \begin{proof} Without loss of generality, we may and do assume that $R$ is complete. Then $R$ possesses a normalized dualizing complex $D$. Set $X:=M^{\dag}$ and $n:=\dim_RM$. By using parts (a),(b) and (c) of Remark \ref{24}, we can see that $X$ is a Cohen-Macaulay complex and $\sup X=n$. By Remark \ref{24}(d), we conclude that $\beta^R_n(X)=1$, and so Theorem \ref{29}(a) yields that $X\simeq \Sigma^n R/\operatorname{Ann}_RM$. Note that Lemma \ref{25}(c) implies that $\operatorname{Ann}_RX=\operatorname{Ann}_RM$. As $$(R/\operatorname{Ann}_RM)^{\dag}={\bf R}\operatorname{Hom}_R(R/\operatorname{Ann}_RM,D)$$ is a dualizing complex for the local ring $R/\operatorname{Ann}_RM$ and $$M\simeq (M^{\dag}) ^{\dag}\simeq X^{\dag}\simeq \Sigma^{-n}(R/\operatorname{Ann}_RM)^{\dag},$$ it follows that $M$ is the dualizing module for the local ring $R/\text{Ann}_RM$. \end{proof} Although the next result is known to the experts, we give a proof for the sake of completeness. \begin{lemma}\label{211} Let $(R,\mathfrak{m},k)$ be a local ring. Let $$F=\cdots\longrightarrow F_i\overset{\partial^F_i}\longrightarrow F_{i-1}\longrightarrow \cdots \overset{\partial^F_{t+1}}\longrightarrow F_t\longrightarrow 0$$ be a complex of finitely generated free $R$-modules such that $\operatorname{im} \partial^F_i \subseteq \mathfrak{m} F_{i-1}$ for all integers $i>t$. \begin{enumerate} \item[(a)] If $F\simeq 0$, then $F_i=0$ for all $i\geq t$. \item[(b)] Assume that $F$ is indecomposable in $\mathcal{D}(R)$ and $\partial^F_j$ is zero for some $j>t$. Then $F_i=0$ either for all $i\geq j$ or for all $i\leq j-1$. \end{enumerate} \end{lemma} \begin{proof} (a) We can split $F$ into the short exact sequences $$0\longrightarrow \operatorname{im} \partial ^{F}_{t+2}\lhook\joinrel\longrightarrow F_{t+1}\longrightarrow F_t\longrightarrow 0$$ $$\vdots$$ $$0\longrightarrow \operatorname{im} \partial ^{F}_{i+2}\lhook\joinrel\longrightarrow F_{i+1}\longrightarrow \operatorname{im} \partial ^{F}_{i+1} \longrightarrow 0$$ $$\vdots$$ Then, it turns out that the $R$-module $\operatorname{im} \partial^{F}_{i}$ is projective for all $i>t+1$ and all of the above short exact sequences are split. Thus $F$ is split-exact, and so the complex $k\otimes _RF$ is split-exact too. Since, $\operatorname{im} \partial^F_{i}\subseteq \mathfrak{m} F_{i-1}$ for all $i>t$, it follows that all differential maps of the complex $k\otimes_R F$ are zero. Hence, $$0=\operatorname{H}_i (k\otimes_R F)=k\otimes_R F_{i}$$ for all $i\geq t$. Now, by Nakayama's lemma, $F_i=0$ for all $i\geq t$. (b) Set $$Y :=\dots \longrightarrow F_l \longrightarrow F_{l-1} \longrightarrow \dots \longrightarrow F_j\longrightarrow 0$$ and $$Z :=0\longrightarrow F_{j-1}\longrightarrow F_{j-2}\longrightarrow \dots \longrightarrow F_t\longrightarrow 0.$$ Then, clearly we have $F\cong Y\oplus Z $. So, either $Y\simeq 0$ or $Z\simeq 0$. Now, the claim follows by $(a)$. \end{proof} Next, we prove our second theorem. \begin{theorem}\label{212} Let $(R,\mathfrak{m},k)$ be a local domain and $C$ a semidualizing complex. If $\beta^R_{\sup C}(C)=2$, then $\operatorname{amp} C=0$. \end{theorem} \begin{proof} Set $n:=\sup C$. If $\operatorname{pd}_RC<\infty$, then \cite[Proposition 8.3]{C1} implies that $C\simeq R$, and so $\operatorname{amp} C=0$. So, in the rest of the proof, we assume that $\operatorname{pd}_RC=\infty$. Let $$F=\cdots\longrightarrow F_i\longrightarrow F_{i-1}\longrightarrow \cdots \longrightarrow F_t\longrightarrow 0$$ be the minimal free resolution of $C$. Then $F_i$ is a free $R$-module, of finite rank $\beta^R_i(C)$, for all $i\geq t$. Since, $R$ is indecomposable and $R\simeq {\bf R}\operatorname{Hom}_R(C,C)$, it follows that $C$ and, consequently, $F$ are indecomposable in $\mathcal{D}(R)$. Since $F_n\neq 0$, in view of Lemma \ref{211}(b), vanishing of the map $\partial^F_{n+1}$ implies that $F_i=0$ for all $i>n$. So, as $\operatorname{pd}_RC=\infty$, we deduce that $\partial^F_{n+1}\neq 0$. Next, we show that $\partial^F_{n}=0$. As $\operatorname{im} \partial^F_{n}$ is torsion-free, we equivalently prove that $\operatorname{rank}_R(\operatorname{im} \partial^F_{n}) =0$. Lemma \ref{28}(a) yields that $\operatorname{Ass}_R(\text{H}_{n}(C))\subseteq \operatorname{Ass} R$. Hence $\operatorname{Ass}_R(\text{H}_{n}(C))=\{0\}$, and so $\text{H}_{n}(C)$ is torsion-free. As the $R$-module $\text{H}_{n}(C)$ is non-zero and torsion-free, it follows that $\operatorname{rank}_R(\text{H}_{n}(C))\geq 1$. As, also, $\operatorname{rank}_R(\operatorname{im} \partial^F_{n+1})$ is positive, from the short exact sequence $$0\longrightarrow \operatorname{im} \partial^F_{n+1}\longrightarrow \ker \partial^F_{n}\longrightarrow \text{H}_n(F)\longrightarrow 0,$$ we get that $\operatorname{rank}_R(\ker \partial^F_{n})\geq 2$. Finally, in view of the short exact sequence $$0\longrightarrow \ker \partial^F_{n}\longrightarrow F_n \longrightarrow \operatorname{im} \partial^F_{n} \longrightarrow 0,$$ we see that $\operatorname{rank}_R(\operatorname{im} \partial^F_{n})=0$. Now as $\partial^F_{n}=0$ and $F_n\neq 0$, Lemma \ref{211}(b) yields that $F_i=0$ for all $i\leq n-1$. In particular, $\inf C=\inf F=n$, and so $\operatorname{amp} C=0$. \end{proof} Each of parts (a) and (b) of the next result generalizes the main result of \cite{R}. Also, its part (c) extends the main result of \cite{CHM}. \begin{corollary}\label{213} Let $(R,\mathfrak{m},k)$ be a local ring and $C$ a semidualizing complex for $R$. \begin{enumerate} \item[(a)] Assume that $C$ is a module of type one. Then $C$ is dualizing. \item[(b)] Assume that $C$ has type one. Then $C$ is dualizing; provided either\\ $(1)$ $\operatorname{Ass} R$ is a singleton and $R$ admits a dualizing complex; or\\ $(2)$ $\operatorname{Ass} \widehat{R}$ is a singleton. \item[(c)] Assume that $R$ is a domain admitting a dualizing complex and $C$ has type two. Then $C$ is Cohen-Macaulay. \end{enumerate} \end{corollary} \begin{proof} (a) is immediate by Corollary \ref{210}. Note that $\operatorname{Ann}_RC=\operatorname{Ann}_RR=0$. By \cite[Lemma 2.6]{C1}, $C\otimes_R\widehat{R}$ is a semidualizing complex for $\widehat{R}$. It is easy to verify that the $R$-complex $C$ and the $\widehat{R}$-complex $C\otimes_R\widehat{R}$ have the same type. On the other hand, by \cite[Proposition 5.5]{AF}, we have $$\begin{array}{ll} \operatorname{id}_RC&=-\inf ({\bf R}\operatorname{Hom}_R(k,C))\\ &=-\inf ({\bf R}\operatorname{Hom}_R(k,C)\otimes_R\widehat{R})\\ &=-\inf ({\bf R}\operatorname{Hom}_{\widehat{R}}(k,C\otimes_R\widehat{R}))\\ &=\operatorname{id}_{\widehat{R}}(C\otimes_R\widehat{R}). \end{array} $$ So in part (2) of (b), we may also assume that $R$ possesses a dualizing complex. Let $D$ be a normalized dualizing complex for $R$. Set $n:=\dim_RC$. By Remark \ref{24}(f), $L:=C^{\dag}$ is also a semidualizing complex for $R$. By parts (b) and (d) of Remark \ref{24}, we have $\sup L=n$ and $\beta^R_n(L)=\mu_R^n(C)$. (b) We have $\beta^R_n(L)=1$ and $\operatorname{Ass} R$ is a singleton. Hence, Theorem \ref{29}(b) implies that $L\simeq \Sigma^{n}R$. So, by Remark \ref{24}(a), we have $C\simeq \Sigma^{-n}D$. (c) We have $\beta^R_n(L)=2$. Theorem \ref{212} yields that $\operatorname{amp} L=0$, and so, in view of Remark \ref{24}(c), we conclude that $C$ is Cohen-Macaulay. \end{proof} The next result is a useful tool for reducing the study of Betti numbers of semidualizing modules over Cohen-Macaulay local rings to the same study on Artinian local rings. \begin{lemma}\label{214} Let $(R,\mathfrak{m},k)$ be a $d$-dimensional Cohen-Macaulay local ring and $C$ a semidualizing module for $R$. Let $\underline{x}=x_1, x_2, \dots, x_d\in \mathfrak{m}$ be an $R$-regular sequence and set $\overline{R}: =R/\langle \underline{x}\rangle$ and $\overline{C}:=C/\langle \underline{x}\rangle C$. Then $\overline{C}$ is a semidualizing module for the Artinian local ring $\overline{R}$ and $\beta^{\overline{R}}_{i}(\overline{C})= \beta^R_{i}(C)$ for all integers $i\geq 0$. Furthermore, $C\cong R$ if and only if $\overline{C}\cong \overline{R}$. \end{lemma} \begin{proof} By \cite[Theorem 2.2.6]{S}, $\overline{C}$ is a semidualizing module for the Artinian local ring $\overline{R}$. Let $F$ be a free resolution of the $R$-module $C$. By \cite[Proposition 1.1.5]{BH}, we conclude that $\overline{R}\otimes_RF$ is a free resolution of the $\overline{R}$-module $\overline{C}$. Hence, for every non-negative integer $i$, we have the following natural $R$-isomorphisms: $$\operatorname{Tor}^{\overline{R}}_i(k,\overline{C})\cong \text{H}_i(k\otimes_{\overline{R}}(\overline{R}\otimes_RF)) \cong \text{H}_i(k\otimes_RF)\cong \operatorname{Tor}^{R}_i(k,C).$$ Thus $\beta^{\overline{R}}_{i}(\overline{C})=\beta^R_{i}(C)$ for all $i\geq 0$. The remaining assertion is immediate by \cite[Proposition 4.2.18]{S}. \end{proof} We apply the following obvious result in the proof of Theorem \ref{216}. \begin{lemma}\label{215} Let $K$ be an $R$-module and $0\longrightarrow L\longrightarrow M\longrightarrow N\longrightarrow 0$ an short exact sequence of $R$-homomorphisms such that $\operatorname{Ext}_R^i(M,K)=0=\operatorname{Ext}_R^i(N,K)$ for all $i>0$. Then the sequence $$0\longrightarrow \operatorname{Hom}_R(N,K)\longrightarrow \operatorname{Hom}_R(M,K)\longrightarrow \operatorname{Hom}_R(L,K)\longrightarrow 0$$ is exact and $\operatorname{Ext}_R^i(L,K)=0$ for all $i>0$. \end{lemma} The following result is also needed in the proof of Theorem \ref{216}. It is interesting in its own right. \begin{lemma}\label{2151} Let $(R,\mathfrak{m},k)$ be a local ring and $M$ a finitely generated $R$-module with a rank. If the projective dimension of $M$ is infinite, then $\beta^R_{n}(M)\geq 2$ for all $n\in \mathbb{N}_0$. \end{lemma} \begin{proof} On the contrary, assume that $\beta^R_{n}(M)<2$ for some $n\in \mathbb{N}_0$. Then $\beta^R_{n}(M)=1$, because $\operatorname{pd}_RM=\infty$. For each non-negative integer $i$, set $\beta_i:=\beta_i^R(M)$. Hence, there is an exact sequence $$F=\cdots \longrightarrow R^{\beta_i}\overset{\partial_i}\longrightarrow R^{\beta_{i-1}}\longrightarrow \cdots \overset{\partial_{1}}\longrightarrow R^{\beta_0}\overset{\partial_{0}} \longrightarrow M\longrightarrow 0.$$ For each natural integer $i$, set $\Omega^iM:=\ker \partial_{i-1}$. Splitting $F$ into short exact sequences and applying \cite[Proposition 1.4.5]{BH}, successively, to them, yields that each $\Omega^iM$ has a rank. Since $\Omega^iM$ is torsion-free and non-zero, it follows that $\operatorname{rank}_R (\Omega^{i}M)>0$ for all $i\in \mathbb{N}$. By applying \cite[Proposition 1.4.5]{BH} to the short exact sequence $$0\longrightarrow \Omega^{n+1}M \longrightarrow R\longrightarrow \Omega^nM \longrightarrow 0,$$ it turns out that $$\operatorname{rank}_R (\Omega^{n+1}M)+ \operatorname{rank}_R (\Omega^{n}M)=1.$$ Hence, either $\operatorname{rank}_R (\Omega^{n}M)=0$ or $\operatorname{rank}_R (\Omega^{n+1}M)=0$, and we arrive at the desired contradiction. \end{proof} Finally, we are in a position to prove our third (and last) theorem. \begin{theorem}\label{216} Let $(R,\mathfrak{m},k)$ be a local ring and $C$ a semidualizing complex for $R$ such that $\beta^R_{n}(C)=1$ for some integer $n$. Assume that either $R$ is Cohen-Macaulay or $C$ is a module with a rank. Then $C\simeq \Sigma^nR$ and $n=\sup C$. \end{theorem} \begin{proof} First, we assume that $R$ is Cohen-Macaulay. By \cite[Corollary 3.4(a)]{C1}, we have $\operatorname{amp} C\leq \operatorname{cmd} R$, and so we may and do assume that $C$ is a module. Then, it would be enough to show that $C\cong R$. On the contrary, suppose that $C\ncong R$. By Lemma \ref{214}, we may and do assume that $R$ is Artinian. By \cite[Corollaries 2.1.14 and 2.2.8]{S}, we know that if $C$ is cyclic or $\operatorname{pd}_RC<\infty$, then $C\cong R$. So, we may and do assume that $n\geq 1$ and $\operatorname{pd}_RC=\infty$, and look for a contradiction. For each non-negative integer $i$, set $\beta_i:=\beta_i^R(C)$. Hence, the minimal free resolution of $C$ has the form $$\cdots \longrightarrow R^{\beta_{n+1}}\longrightarrow R\longrightarrow R^{\beta_{n-1}}\longrightarrow \cdots \longrightarrow R^{\beta_{1}}\longrightarrow R^{\beta_{0}}\longrightarrow 0.$$ Then, we have the following short exact sequences: $$(0) \ \ \ \ \ \ \ \ \ \ \ \ \ 0\longrightarrow \Omega^1C\longrightarrow R^{\beta_{0}}\longrightarrow C\longrightarrow 0$$ $$(1) \ \ \ \ \ \ \ \ \ \ \ \ \ \ 0\longrightarrow \Omega^2C\longrightarrow R^{\beta_{1}}\longrightarrow \Omega^1C\longrightarrow 0$$ $$ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \vdots$$ $$(n-1) \ \ \ \ \ \ \ \ \ \ \ \ \ 0\longrightarrow \Omega^nC\longrightarrow R^{\beta_{n-1}}\longrightarrow \Omega^{n-1}C\longrightarrow 0$$ $$(n) \ \ \ \ \ \ \ \ \ \ \ \ \ 0\longrightarrow \Omega^{n+1}C\longrightarrow R\longrightarrow \Omega^nC\longrightarrow 0.$$ We successively apply the contravariant functor $(-)^*:=\operatorname{Hom}_R(-,C)$ to the short exact sequences $(0), (1), \dots, (n)$ and use Lemma \ref{215} to get the following short exact sequences: $$(0)^* \ \ \ \ \ \ \ \ \ \ \ \ \ 0\longrightarrow R\longrightarrow C^{\beta_{0}}\longrightarrow (\Omega^1C)^*\longrightarrow 0$$ $$(1)^* \ \ \ \ \ \ \ \ \ \ \ \ \ \ 0\longrightarrow (\Omega^1C)^*\longrightarrow C^{\beta_{1}}\longrightarrow (\Omega^2C)^*\longrightarrow 0$$ $$ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \vdots$$ $$(n-1)^* \ \ \ \ \ \ \ \ \ \ \ \ \ 0\longrightarrow (\Omega^{n-1}C)^*\longrightarrow C^{\beta_{n-1}}\longrightarrow (\Omega^{n}C)^*\longrightarrow 0$$ $$(n)^* \ \ \ \ \ \ \ \ \ \ \ \ \ 0\longrightarrow (\Omega^{n}C)^*\longrightarrow C\longrightarrow (\Omega^{n+1}C)^*\longrightarrow 0.$$ As $\operatorname{pd}_RC=\infty$, it follows that $\Omega^iC\neq 0$ for all integers $i\geq 0$. Suppose that $(\Omega^jC)^*=0$ for some integer $j\geq 0$. Then, by \cite[Proposition 3.1.6]{S}, $(\Omega^{j-1}C)^*\cong C^{\beta_{j-1}}\in \mathcal{B}_C(R)$. Applying \cite[Proposition 3.1.7(b)]{S}, successively, to the short exact sequences $(j-2)^*, \dots, (1)^*, (0)^*$ yields that $R\in \mathcal{B}_C(R)$. Now, \cite[Corollary 4.1.7]{S} implies that $C\cong R$. Thus $(\Omega^iC)^*\neq 0$ for all integers $i\geq 0$. Set $h:=\beta_{0}-\beta_{1}+\cdots +(-1)^n\beta_{n}$. Using the short exact sequences $(0), (1), \dots, (n)$, we deduce that $$(A_1): \ \ \ \ \ \ell_R(C)=h\ell_R(R)+(-1)^{n+1}\ell_R(\Omega^{n+1}C)$$ and $$(B_1): \ \ \ \ \ \ \ \ \ \ell_R(\Omega^{n+1}C)<\ell_R(R).$$ Similarly, by using the short exact sequences $(0)^*, (1)^*, \dots, (n)^*$, we may see that $$(A_2): \ \ \ \ \ \ell_R(R)=h\ell_R(C)+(-1)^{n+1}\ell_R((\Omega^{n+1}C)^*)$$ and $$(B_2): \ \ \ \ \ \ \ \ \ell_R((\Omega^{n+1}C)^*)<\ell_R(C).$$ Assume that $n$ is even. If $h\leq 0$, then $A_1$ yields that $\ell_R(C)<0$. If $h=1$, then $A_1$ and $A_2$, respectively, imply that $\ell_R(C)<\ell_R(R)$ and $\ell_R(R)<\ell_R(C)$. If $h\geq 2$, then $A_1$ and $B_1$ imply that $\ell_R(C)> \ell_R(R)$. On the other hand, $A_2$ and $B_2$ imply that $\ell_R(R)>\ell_R(C)$. Next, assume that $n$ is odd. If $h<0$, then, by $A_1$ and $B_1$, we deduce that $\ell_R(C)<0$. If $h=0$, then $A_1$ and $B_1$ imply that $\ell_R(C)<\ell_R(R)$ and $A_2$ and $B_2$ imply that $\ell_R(R)<\ell_R(C)$. If $h\geq 1$, then $A_1$ and $A_2$, respectively, imply that $\ell_R(C)>\ell_R(R)$ and $\ell_R(R)>\ell_R(C)$. Therefore if either $n$ is even or odd, we arrive at a contradiction. Now, assume that $C$ is a module with a rank. Then, Lemma \ref{2151} implies that $C$ has finite projective dimension, and so $C\cong R$ by \cite[Corollary 2.2.8]{S}. \end{proof} The next result extends \cite[Characterization 1.6]{CSV}. \begin{corollary}\label{217} Let $(R,\mathfrak{m},k)$ be a local ring and $C$ a semidualizing complex for $R$ such that $\mu_R^{n}(C)=1$ for some integer $n$. Assume that either \begin{enumerate} \item[(a)] $R$ is Cohen-Macaulay, or \item[(b)]$R$ is analytically irreducible and $C$ is Cohen-Macaulay. \end{enumerate} Then $C$ is dualizing and $n=\dim_RC$. \end{corollary} \begin{proof} We may and do assume that $R$ is complete. Then $R$ possesses a normalized dualizing complex $D$. By parts (f) and (d) of Remark \ref{24}, it turns out that $L:=C^{\dag}$ is also a semidualizing complex for $R$ and $\beta^R_n(L)=1$. Set $d:= \dim_RC$. Then, by Remark \ref{24}(b), $d=\sup L$. (a) Assume that $R$ is Cohen-Macaulay. Then Theorem \ref{216} implies that $L\simeq \Sigma^{n}R$ and $n=d$. Thus, by Remark \ref{24}(a), we deduce that $C\simeq \Sigma^{-d}D$. (b) Assume that $R$ is analytically irreducible and $C$ is Cohen-Macaulay. As $C$ is Cohen-Macaulay, Remark \ref{24}(c) implies that $\operatorname{amp} L=0$. Since $R$ is a domain, it follows that $\text{H}_{d}(L)$ is a semidualizing module with a rank, and so Theorem \ref{216} implies that $$L\simeq \Sigma^{d}\text{H}_{d}(L)\simeq \Sigma^{d}R.$$ Using this, as in the proof (a), we can obtain $C\simeq \Sigma^{-d}D$. \end{proof}
\section{Introduction} LTE-Licensed Assisted Access (LAA), which uses Listen Before Talk (LBT) to access the 5 GHz unlicensed spectrum was specified by 3GPP Release-13 in 2016 \cite{3gpp}. While LBT is similar to its Wi-Fi counterpart, Carrier Sense Multiple Access with Collision Avoidance (CSMA-CA), the difference in access parameters like transmission duration (TXOP) and energy detection (ED) levels between LAA and Wi-Fi can lead to reduced throughput when the two systems coexist. While coexistence between LAA and Wi-Fi has been an active research area for a few years now, these studies are based primarily on theoretical analyses~\cite{TON,TCCN}, simulations~\cite{iqbal2017impact}, and limited experiments evaluating the effects of ED, TXOP, optimal resource scheduling, etc. With widespread deployments of LAA in many US cities, it is now possible to research coexistence performance of Wi-Fi and LAA in real-world scenarios. This research using real deployments can serve as a basis for improving coexistence of next-generation wireless networks in unlicensed spectrum~\cite{ACM} e.g. 5G NR-U and Wi-Fi 6E. In our recent work~\cite{sathya2020measurement}, we measured the coexistence performance of overlapping LAA and Wi-Fi networks in various locations in Chicago. We believe that this was the first such measurement campaign that studied LAA and Wi-Fi performance in real deployments. This measurement campaign revealed several aspects of LAA that have not been adequately addressed in the research literature to date: (i) all LAA deployments we encountered aggregate three 20 MHz unlicensed channels, thus potentially creating increased interference to Wi-Fi operations; (ii) the majority of Wi-Fi deployments today are 40 MHz and 80 MHz, while most of the previous literature focused only on a single LAA and a single Wi-Fi cell using the same 20 MHz channel; (iii) multi-channel Wi-Fi and multi-channel LAA usage create coexistence scenarios that have not been adequately studied; (iv) even though LAA deployments are primarily outdoors and Wi-Fi deployments are indoors, the signal strength of both at client devices operating outdoors is comparable, leading to increased coexistence and hidden node problems; and (v) the impact of LAA on Wi-Fi latency and the larger TXOPs used by LAA need further study and analysis. Since our previous measurement campaigns were conducted on the streets of downtown Chicago, we were limited by the deployed locations and number of Wi-Fi access points (APs), the number of Wi-Fi clients, and inability to use packet monitoring tools like Wireshark. In order to perform controlled experiments we needed a LAA base-station (BS) where we could control the number and location of coexisting Wi-Fi APs. Fortunately, We were able to identify such an area on the University of Chicago (UChicago) campus near the university bookstore where an AT\&T LAA BS was recently deployed. We deployed our own Wi-Fi APs inside the bookstore, on the same LAA channels and discovered that this deployment creates a hidden-node problem between the Wi-Fi APs and the LAA BS. While the hidden-node problem has been well studied in the context of traditional overlapping Wi-Fi APs in theory, simulations and experiments, we believe that the same rigorous study has not yet happened for hidden nodes between Wi-Fi and LAA, especially in the experimental context of this paper. Our experiments lead to the conclusion that in a hidden-node scenario with LAA, Wi-Fi experiences a performance degradation that is more severe than that experienced by LAA, thus indicating a need to develop more advanced protocols for coexistence between LAA and Wi-Fi. The paper is organized as follows. Section II provides a brief overview of LAA \& Wi-Fi medium access mechanisms, existing literature on LAA and Wi-Fi coexistence, including the Wi-Fi/LAA hidden-node scenario. Section III describes the experimental setup of the deployment we studied and the tools used to measure performance. Section IV describes the measurements and accompanying discussions and conclusions are presented in Section V. \section{Overview of LAA and Wi-Fi Coexistence} In this section we summarize the main differences between LAA and Wi-Fi, followed by a discussion of existing research on LAA and Wi-Fi coexistence, both generally and specific to the hidden-node problem. \subsection{Comparison of LAA and Wi-Fi} LAA as specified by 3GPP in Release 13 \cite{lagen2019new}, permits downlink transmissions only in unlicensed channels and all uplink transmissions and signaling occur over the licensed channel. While the medium access protocol (MAC) is similar to Wi-Fi's, there are key differences as described below. \subsubsection{Energy Detection Threshold} Both LBT, as specified by LAA, and CSMA-CA, as specified by Wi-Fi, seek to avoid collisions by backing off from transmitting when the channel is busy. Both schemes define a busy channel as an energy level higher than a set threshold observed over the specified channel. LBT specifies an ED threshold of -72 dBm over 20 MHz, while Wi-Fi uses an ED threshold of -62 dBm over 20 MHz for non-Wi-Fi signals and a preamble detection threshold of -82 dBm for Wi-Fi. We have shown in ~\cite{iqbal2017impact} that this asymmetry leads to lower throughput performance of Wi-Fi. In a hidden-node scenario where the Wi-Fi AP and the LAA BS cannot detect each other, the Wi-Fi performance will deteriorate further since the commonly used request-to-send/clear-to-send (RTS/CTS) protocol cannot be used between the two. \subsubsection{Medium Access Category} LAA's LBT mechanism specifies a different transmission opportunity (TXOP) duration for different types of downlink traffic as shown in Table~\ref{ltedltxop}. Voice and video use a smaller TXOP to satisfy the Quality of Service (QoS) requirements, which can be met by the use of short packets. However, for data, LAA specifies a maximum TXOP of 8 ms to maximize throughput, or 10 ms if there is no coexisting Wi-Fi. In most realistic traffic scenarios we measured, such as Data, Data + Video, Data + Streaming, we observe that the LAA BS uses a maximum TXOP of 8 ms. Similarly, Wi-Fi also defines access categories for different types of traffic as shown in Table~\ref{wtxop} for 802.11ac. Compared to LAA, the data traffic (Best Effort and Background) is allocated a smaller TXOP duration of 2.528 ms, compared to 8 ms used by LAA. This asymmetry with respect to LAA can lead to LAA occupying the channel longer than Wi-Fi on average. Additionally, both access categories also define initial Clear Channel Assessment (CCA) duration, and minimum and maximum contention window (CW) sizes. The initial CCA is used to determine whether the channel is clear for transmission at the beginning by observing it for a set period. For Wi-Fi, this period is defined as Arbitrary Inter-Frame Spacing (AIFS). For LAA, the CW is exponentially increased when the Hybrid Automatic Repeat Request - Acknowledgment (HARQ-ACK) reply contains 80\% Negative ACKs (NACKs), while for Wi-Fi, the CW is exponentially increased when a single transmission fails (no ACK received). \begin{table}[htb] \centering \caption{Access Categories in Downlink LAA~\cite{sathya2020measurement}} \begin{tabular}{|p{55pt}|p{20pt}|l|l|l|} \hline \cellcolor{Gray} \textbf{Access Class \# (DL)} & \cellcolor{Gray} \textbf{Initial CCA} & \cellcolor{Gray} \textbf{CWmin} & \cellcolor{Gray} \textbf{CWmax} & \cellcolor{Gray} \textbf{$TXOP$} \\ \hline\hline 1 (Voice) & 25 $\mu$ s & 30 $\mu$ s & 70 $\mu$ s & 2 ms \\ \hline 2 (Video)& 25 $\mu$ s & 70 $\mu$ s & 150 $\mu$ s & 3 ms \\ \hline 3 (Best Effort)& 43 $\mu$ s & 150 $\mu$ s & 630 $\mu$ s & 8 ms or 10 ms \\ \hline 4 (Background)& 79 $\mu$ s & 150 $\mu$ s & 10.23 ms & 8 ms or 10 ms \\ \hline \end{tabular} \label{ltedltxop} \end{table} \begin{table}[htb] \centering \caption{Access Categories in Wi-Fi (802.11ac)~\cite{sathya2020measurement}} \begin{tabular}{|p{70pt}|p{25pt}|l|l|l|} \hline \cellcolor{Gray} \textbf{Access Category} & \cellcolor{Gray} \textbf{AIFS} & \cellcolor{Gray} \textbf{CWmin} & \cellcolor{Gray} \textbf{CWmax} & \cellcolor{Gray} \textbf{$TXOP$} \\ \hline\hline Voice (AC\_VO) & 18 $\mu$ s & 27 $\mu$ s & 63 $\mu$ s & 2.08 ms \\ \hline Video (AC\_VI) & 18 $\mu$ s & 62 $\mu$ s & 135 $\mu$ s & 4.096 ms \\ \hline Best Effort (AC\_BE) & 27 $\mu$ s & 135 $\mu$ s & 9.207 ms & 2.528 ms \\ \hline Background (AC\_BK) & 63 $\mu$ s & 135 $\mu$ s & 9.207 ms & 2.528 ms \\ \hline \end{tabular} \label{wtxop} - \end{table} \subsection{Related Work on LAA and Wi-Fi Coexistence} There has been extensive research on coexistence of Wi-Fi and LTE, mainly focused on using analysis and simulation to study fair coexistence. In \cite{7460494}, the authors explored design of LBT schemes for LAA as a means of providing equal opportunity channel access in the presence of Wi-Fi. Similarly, \cite{tao2015enhanced} proposed an enhanced LBT algorithm with contention window size adaptation for LAA to achieve fair channel access and quality of Service (QoS) fairness. Comprehensive experiments on the coexistence of LAA and Wi-Fi are described in \cite{jian2015coexistence, QC}, without addressing the hidden-node problem. In our prior work, \cite{TON, iqbal2017impact} we studied the impact of different sensing duration's and ED thresholds via analysis, simulations and limited experiments using a software-defined-radio (SDR) testbed and concluded that the overall throughput of both coexisting systems improved if both Wi-Fi and LTE employed an ED threshold of -82 dBm.. \begin{figure}[!tb] \centering \includegraphics[scale=0.5]{hnf.eps} \caption{Hidden Node Problem in LAA Wi-Fi Coexistence.} \label{hidden} \end{figure} \subsection{Hidden-nodes in LAA and Wi-Fi Coexistence} The hidden-node problem is a common one in wireless networking, where interference occurs at a receiver because the transmitter is "hidden" from an interfering transmitter. In traditional Wi-Fi/Wi-Fi coexistence, or overlapping service areas, the hidden node problem is solved by the use of the RTS/CTS packets which are received by all radio transceivers in range. However, since LAA and Wi-Fi cannot decode each others packets, this solution does not work when the two coexist in an overlapping coverage area. This is shown in Fig.~\ref{hidden}, where the LAA BS is not aware of the Wi-Fi APs transmission in the interference zone. Furthermore, the asymmetry of LAA and Wi-Fi energy detection levels may cause the Wi-Fi client's RTS packet to be ignored by the BS. In~\cite{campos2020analysis}, this hidden-node problem is addressed, in 20 MHz, by ns-3 simulations. The Channel Quality Indicator (CQI), Reference Signal Received Power (RSRP), and Reference Signal Received Quality (RSRQ) metrics at the LAA client device are used to develop a collision detection algorithm that is then used to modify the LAA MAC parameters. Other papers mostly address the hidden-node problem in the context of LTE-Unlicensed (LTE-U), which is a variant of LTE unlicensed channel access that uses a duty cycle method instead of LBT~\cite{baswade2018lte, baswade2018law}. Hence, there is no research on the hidden-node issue of LAA \& Wi-Fi coexistence that is based on analyzing real deployments which use multiple 20 MHz channels for both Wi-Fi and LAA. We seek to address this gap in this paper. \section{Experiment Set-up and Tools} There are a number of Release 13 compliant LAA base-stations deployed on the UChicago campus by AT\&T mostly on lamp-posts near campus buildings. We chose a particular deployment for this study where a LAA BS is mounted on a pole near the UChicago bookstore. The BS aggregates up to three Wi-Fi channels: 149, 153, and 157 in the U-NII 3 band and has the capability of 2 $\times$ 2 MIMO transmissions with a maximum modulation coding scheme (MCS) of 256 QAM. In this section we describe the set-up and tools used in the experiment. \begin{figure*}[ht] \begin{subfigure}{.33\textwidth} \centering \includegraphics[width=5.2cm]{BStore.eps} \caption{Wi-Fi AP Deployment}\label{e1} \end{subfigure} \begin{subfigure}{.23\textwidth} \centering \includegraphics[width=3.2cm]{ATTBS.eps} \caption{LAA BS Deployment}\label{e2} \end{subfigure} \begin{subfigure}{.43\textwidth} \centering \includegraphics[width=7.2cm]{Bloc.eps} \caption{Experiment Location}\label{e3} \end{subfigure} \caption{UChicago Bookstore Experiment Location} \label{e4} \end{figure*} \begin{figure*}[ht] \begin{subfigure}{.33\textwidth} \centering \includegraphics[width=5.2cm]{ExCe1.eps} \caption{Clients at Center (S1)}\label{e5} \end{subfigure} \begin{subfigure}{.33\textwidth} \centering \includegraphics[width=5.2cm]{ExCl1.eps} \caption{Clients Close to Wi-Fi AP (S2)}\label{e6} \end{subfigure} \begin{subfigure}{.33\textwidth} \centering \includegraphics[width=5.2cm]{ExClo1.eps} \caption{Clients Close to LAA (S3)}\label{e7} \end{subfigure} \caption{Deployment of LAA by AT\&T, and coexisting Wi-Fi on Channels 149, 153 and 157} \label{e8} \end{figure*} \subsection{Measurement Tools: SigCap, Network Signal Guru (NSG), and Wireshark} We use SigCap, an Android app we developed that extracts information from the radios on a client device without requiring root access \cite{sathya2020measurement}. SigCap collects data from the cellular receiver (RSRP, RSSI, LTE band, etc.) and Wi-Fi receiver (RSSI, channel number, etc.) which can be easily exported for further analysis. However, to obtain more detailed measurements, we also use the Network Signal Guru (NSG) app \cite{NSG} which uses root access to extract additional LTE information such as throughput, latency, TXOP, signal-to-interference-and-noise ratio (SINR), block error rate (BLER), and allocated resource blocks (RB) for each channel. Wireshark was used to capture additional Wi-Fi information such as Wi-Fi amendment (e.g., 802.11ac), number of clients on each channel, number of streams used for transmission, modulation coding schemes, and throughput. \subsection{Location of Experiments} We deployed three Wi-Fi APs inside the bookstore, near windows facing the LAA BS as shown in Fig.~\ref{e4} (a). AP1 is on the fourth floor of the building, and AP2 \& AP3 are on the third floor. All distances shown are measured on the ground, not point-to-point. Fig.~\ref{e4} (b) shows the pole where the LAA BS is mounted in the black enclosure at the top. We deduce that this is indeed the BS location from the high SINR and RSRP value recorded by NSG near the pole. Fig.~\ref{e4} (c) shows the diagram of the experiment location. We deployed the clients in three locations shown as red, blue, and yellow circles representing the following scenarios: \begin{itemize} \item \textbf{Scenario S1 (red): clients midway between LAA BS \& Wi-Fi APs.} In this scenario, the Wi-Fi and LAA clients are midway between the LAA BS and the Wi-Fi APs at a distance of 41.7 m from the Wi-Fi APs and 40.5 m from the LAA BS, as shown in Fig.~\ref{e8} (a). \item \textbf{Scenario S2 (blue): clients close to Wi-Fi APs.} All clients are closer to the APs at a distance of 27.4 m from the Wi-Fi APs and 66.3 m from the LAA BS, as shown in Fig.~\ref{e8} (b). \item \textbf{Scenario S3 (yellow): clients close to the LAA BS.} All clients are closer to the LAA BS at a distance of 79.8 m from the Wi-Fi APs and 12.23 m from the LAA BS, as shown in Fig.~\ref{e8} (c). \end{itemize} The Wi-Fi clients are placed on benches about 2 ft above ground, the LAA client is hand-held at about 5 ft above the ground, and the Wi-Fi APs and LAA BS are at a height of approximately 50 ft and 30 ft, respectively. \subsection{Devices and Parameters used in the experiment} Table~\ref{exp8} shows the various devices used in the experiments. All three APs operate on Channel 155 using the 80 MHz mode with each AP on a different 20 MHz primary channel as shown in Table~\ref{exp8}. We disabled dynamic frequency selection to prevent the APs from moving to other channels. We also used Wireshark to verify that the only Wi-Fi data transmissions that took place during the duration of our experiments were from the APs we deployed, even though we detected the presence of beacons from other campus APs. Thus, our experiment included only the 3 APs and the LAA BS coexisting with each other. We use a total of 5 phones as client devices. For the Wi-Fi-only experiments, all 5 are used as Wi-Fi clients and for the Wi-Fi/LAA coexistence experiments device A, B, C, \& D in Table~\ref{exp8}) are used as Wi-Fi clients and device E, a Google Pixel 3 phone, is used as the LAA client. All client devices are equipped with NSG and SigCap. \begin{table}[!t] \scriptsize \caption{Devices and configurations} \centering \begin{tabular}{|c|c|} \hline \bfseries Parameter &\bfseries Value \\ [0.4ex] \hline\hline Wireshark Laptop & 3 \\ \hline Wi-Fi AP & \pbox{30cm}{ \vspace{0.2cm} AP1 $\rightarrow$ Netgear (Primary Ch. 149) \\ AP2 $\rightarrow$ TP-Link (Primary Ch. 157) \\ AP3 $\rightarrow$ Netgear (Primary Ch. 153) \\ }\\ \hline Wi-Fi Device Clients & \pbox{30cm}{ \vspace{0.2cm} A $\rightarrow$ T-Mobile Google Pixel 3 \\ B $\rightarrow$ Motorola Edge+ \\ C $\rightarrow$ Samsung S9\\ D $\rightarrow$ Xiaomi \\ E $\rightarrow$ AT\&T Google Pixel 3 \\ } \\ \hline LAA Device Client & E $\rightarrow$ AT\&T Google Pixel 3 \\ \hline 802.llac 80 MHz supported clients & A, B, C, E \\ \hline 802.lln 40 MHz supported client & D \\ \hline \end{tabular} \label{exp8} \end{table} \subsection{Verifying the hidden-node} In order to verify that this deployment was indeed a hidden-node, we used SigCap to measure the RSSI of the LAA BS at each of the APs, and the RSSI of the Wi-Fi APs at the LAA BS (using a phone mounted on a 30 ft pole). Table~\ref{tableRssi} shows that the strongest Wi-Fi signal level at the LAA BS is from AP2 at -77 dBm, and the strongest LAA BS's signal level is at AP2 at -84 dBm. These signal levels are well below the ED thresholds of -72 dBm used by LAA and -62 dBm used by Wi-Fi. Hence, we are confident that the LAA BS and the Wi-Fi APs will not attempt to back-off to each other. \begin{table}[!t] \caption{RSSI Measurement of LAA BS and Wi-Fi APs} \centering \begin{tabular}{|l|c|c|c|} \hline & \bfseries AP1 & \bfseries AP2 & \bfseries AP3 \\ \hline \bfseries RSSI of LAA BS at AP$n$ & -88 dBm & -84 dBm & N/A\\ \hline \bfseries RSSI of AP$n$ at LAA BS & -80 dBm & -77 dBm & -81 dBm \\ \hline \end{tabular} \label{tableRssi} \end{table} \subsection{Traffic Types} We conducted our experiments using the following traffic types: \begin{itemize} \item \textbf{Data (D):} Pure data traffic assumed as a full buffer, generated by downloading a large YUV dataset ($>$10 GB) from Derf Test Media Collection \cite{YUV}. \item \textbf{Video (V):} A Youtube video is downloaded, with a resolution of 1920$\times$1080 and bit-rate of 12 Mbps. \item \textbf{Data + Video (D+V):} Combination of data and video traffic as described above. \item \textbf{Streaming (S):} A live stream video on Youtube is loaded, with a resolution of 1280$\times$720 and a bit rate of 7.5 Mbps. \item \textbf{Data + Streaming (D+S):} Combination of data and streaming traffic as described above. \end{itemize} We observed (using NSG) that 95\% - 100\% of the available LAA resource blocks were always allocated to our client device: this is possibly due to (a) COVID-19, as there were very few people on campus and (b) LAA is only available on newer phones that tend to be more expensive and hence are not yet widely used. This allows us to perform a controlled coexistence experiment as follows: \begin{itemize} \item \textbf{Wi-Fi/Wi-Fi Scenario:} All five clients are connected to a Wi-Fi AP and initiate downloads of the same traffic type. We assume in this case that no other device is associated with the LAA BS, which can be assumed to be not transmitting any data other than reference signals. \item \textbf{Wi-Fi/LAA Scenario:} Four clients are connected to Wi-Fi, and one client is connected to the LAA BS, all initiating downloads of the same traffic type. \end{itemize} \begin{table}[htb] \scriptsize \caption{Baseline throughput of LAA alone (no Wi-Fi)} \begin{tabular}{|p{1.4cm}|p{1.1cm}|p{1.1cm}|p{0.8cm}|p{1.1cm}|p{1cm}|} \hline \cellcolor{Gray} \textbf{Scenarios} & \cellcolor{Gray} \textbf{D} & \cellcolor{Gray} \textbf{D+V} & \cellcolor{Gray} \textbf{S} & \cellcolor{Gray} \textbf{D+S} & \cellcolor{Gray} \textbf{V} \\ \hline\hline S2: Licensed & 26.3 Mbps & 32.7 Mbps & 8.4 Mbps & 12.2 Mbps & 10.9 Mbps \\ \hline S2: LAA 149 & 53.5 Mbps & 58.6 Mbps & - & 44.1 Mbps & 8.1 Mbps \\ \hline S2: LAA 153 & 60.4 Mbps & 67.1 Mbps & - & 52.9 Mbps & 9.8 Mbps \\ \hline S2: LAA 157 & 61.5 Mbps & 61.9 Mbps & - & 49.4 Mbps & 8.3 Mbps \\ \hline \end{tabular} \label{ta4} \end{table} \section{Representative measurements of LAA \& Wi-Fi}\label{is} We use NSG to measure the TXOP, SINR, RBs, and throughput of LAA, with all results averaged over ten measurements in the same location. Similarly, Wireshark is used to measure Wi-Fi throughput. The LAA BS uses a maximum of three unlicensed 20 MHz channels and a single 15 MHz licensed channel for a maximum total bandwidth of 75 MHz and 375 RBs. \begin{figure*}[htb] \begin{subfigure}{.33\textwidth} \centering \includegraphics[width=5.2cm]{Th1l.eps} \caption{Clients at Center (S1)} \end{subfigure} \begin{subfigure}{.33\textwidth} \centering \includegraphics[width=5.2cm]{Th2l.eps} \caption{Clients Close to Wi-Fi APs (S2)} \end{subfigure} \begin{subfigure}{.33\textwidth} \centering \includegraphics[width=5.2cm]{Th3l.eps} \caption{Clients Close to LAA BS (S3)} \end{subfigure} \caption{LAA throughput, Wi-Fi/LAA coexistence, all Wi-Fi clients associated to AP2} \label{atla} \end{figure*} \subsection{Baseline LAA performance, Scenario S2} We established a baseline LAA performance with Scenario S2, where all Wi-Fi clients were associated with the Wi-Fi APs without initiating any traffic: 1 client @ AP1, two clients @ AP2, 1 client @ AP3. The LAA client then initiated traffic according to the scenarios (D, D+V, S, D+S, V), and Table~\ref{ta4} shows the average throughput of LAA on each carrier and traffic type. We consistently measured an aggregate throughput of greater than 150 Mbps over the three unlicensed carriers, compared to about 25 Mbps over the single licensed carrier. Since the Wi-Fi clients are not engaged in data transmission, we measure a throughput of about 43 kbps, due to management frame transmissions alone. \subsection{Measurements results, all scenarios} AP2 was the only AP that the Wi-Fi clients could connect to in all the three scenarios. Hence, in this section, we present results with all Wi-Fi clients connected to AP2. In each scenario, the Wi-Fi and LAA clients were close to each other. \subsubsection{LAA SINR and throughput when coexisting with Wi-Fi} Table~\ref{laas} shows the average LAA SINR on Channels 149, 153, and 157. In all scenarios, the LAA SINR on Channel 157 is much lower compared to the other channels for all traffic types. This is because all Wi-Fi clients are associated with AP2 which uses Channel 157 as its primary channel. Since the default mode of the APs was set to use RTS/CTS, the traffic on the primary channel, Channel 157, is higher than on the other channels, even though the actual data transmission occurs over all channels. This leads to a reduced LAA SINR on Channel 157. Fig.~\ref{atla} shows the LAA throughput in the different scenarios. There are two conclusions from this result: (i) when the traffic type is real-time video streaming, the unlicensed channels are not used at all. This is because the QoS requirements of real-time traffic cannot be guaranteed in the unlicensed band, and (ii) Channel 157 is not used by LAA at all. This could be either due to the increased management traffic from the clients that is sensed at the LAA BS or the reduced SINR value that is fed back to the LAA BS which uses the information to not allocate this channel for transmission. We also observe that the maximum TXOP of 8 ms is used on Channels 149 and 153 for D, D+V, and D+S, and TXOP of 3 ms is used for video (V) transmission and the average number of RBs allocated on these 2 channels is always greater than 90 each. \begin{table}[htb] \caption{Average LAA SINR in Scenarios S1, S2 and S3} \begin{tabular}{|p{1.7cm}|p{1cm}|p{0.9cm}|p{0.5cm}|p{1cm}|p{0.9cm}|} \hline \cellcolor{Gray} \textbf{Scenarios} & \cellcolor{Gray} \textbf{D} & \cellcolor{Gray} \textbf{D+V} & \cellcolor{Gray} \textbf{S} & \cellcolor{Gray} \textbf{D+S} & \cellcolor{Gray} \textbf{V} \\ \hline\hline S1: LAA 149 & 12 dB & 10 dB & - & 9 dB & 12.2 dB \\ \hline S1: LAA 153 & 8 dB & 13 dB & - & 8 dB & 13 dB \\ \hline \textcolor{red}{S1: LAA 157} & -3 dB & -1 dB & - & -0.5 dB & -4 dB \\ \hline S2: LAA 149 & 14 dB & 12.6 dB & - & 9.7 dB & 12.8 dB \\ \hline S2: LAA 153 & 10 dB & 11.4 dB & - & 8.2 dB & 14.2 dB \\ \hline \textcolor{red}{S2: LAA 157} & -2 dB & -3.2 dB & - & -1.9 dB & -2.9 dB \\ \hline S3: LAA 149 & 20.3 dB & 20.6 dB & - & 20 dB & 22 dB \\ \hline S3: LAA 153 & 22.6 dB & 23 dB & - & 23.2 dB & 22.8 dB \\ \hline \textcolor{red}{S3: LAA 157} & -2.1 dB & -3.4 dB & - & -4 dB & -3.6 dB \\ \hline \end{tabular} \label{laas} \end{table} Fig.~\ref{atla} also shows that the LAA throughput in Scenario S2 is higher than in Scenario S1, even though S2 is farther from the LAA BS than S1. This is because location S1 did not have direct line-of-sight to the LAA BS even though it was closer, due to tall trees in between. This is also evident from Table~\ref{laas} where the SINR in location S1 is consistently lower than in S2. Throughput, and SINR, are highest in S3 due to proximity and line-of-sight to the LAA BS. Comparing the results with the baseline LAA performance measured earlier at S2 on data (D) traffic, we observe a reduction of 61.2 Mbps in aggregate throughput from the baseline, which is around 35\% of baseline. \begin{figure*}[ht] \begin{subfigure}{.33\textwidth} \centering \includegraphics[width=5.2cm]{Th7.eps} \caption{Clients at center (S1)} \end{subfigure} \begin{subfigure}{.33\textwidth} \centering \includegraphics[width=5.2cm]{Th3.eps} \caption{Clients close to Wi-Fi APs (S2)} \end{subfigure} \begin{subfigure}{.33\textwidth} \centering \includegraphics[width=5.2cm]{Th5.eps} \caption{Clients close to LAA BS (S3)} \end{subfigure} \caption{Wi-Fi Throughput, Wi-Fi/Wi-Fi coexistence, all Wi-Fi clients associated to AP2} \label{wifiTputW} \end{figure*} \begin{figure*}[ht] \begin{subfigure}{.33\textwidth} \centering \includegraphics[width=5.2cm]{Th8.eps} \caption{Clients at center (S1)} \end{subfigure} \begin{subfigure}{.33\textwidth} \centering \includegraphics[width=5.2cm]{Th4.eps} \caption{Clients close to Wi-Fi APs (S2)} \end{subfigure} \begin{subfigure}{.33\textwidth} \centering \includegraphics[width=5.2cm]{Th6.eps} \caption{Clients close to LAA BS (S3)} \end{subfigure} \caption{Wi-Fi Throughput, Wi-Fi/LAA coexistence, all Wi-Fi clients associated to AP2} \label{wifiTputL} \end{figure*} \begin{figure*}[ht] \begin{subfigure}{.33\textwidth} \centering \includegraphics[width=5.2cm]{Th3e.eps} \caption{LAA Tput on Wi-Fi/LAA}\label{fig:laa36} \end{subfigure} \begin{subfigure}{.33\textwidth} \centering \includegraphics[width=5.2cm]{Th31.eps} \caption{Wi-Fi Tput on Wi-Fi/Wi-Fi}\label{fig:laa149} \end{subfigure} \begin{subfigure}{.33\textwidth} \centering \includegraphics[width=5.2cm]{Th41.eps} \caption{Wi-Fi Tput on Wi-Fi/LAA}\label{fig:laawifi36} \end{subfigure} \caption{LAA and Wi-Fi Throughput, Wi-Fi clients associated to three Wi-Fi APs, Scenario S2} \label{a1} \end{figure*} \subsubsection{Wi-Fi throughput when coexisting with LAA} Fig.~\ref{wifiTputW} (a), (b), and (c) show the baseline throughput when Wi-Fi coexists with itself in scenarios S1, S2 and S3, respectively and Fig.~\ref{wifiTputL} (a), (b), and (c) show the throughput when Wi-Fi coexists with LAA in scenarios S1, S2 and S3, respectively. The lower throughput on Wi-Fi client D (Xiaomi phone) in these figures is due to this device supporting only 802.11n. Comparing the two sets of figures, we observe that the average throughput per Wi-Fi client when Wi-Fi coexists with itself (Fig.~\ref{wifiTputW}, Wi-Fi/Wi-Fi) is much higher than when it coexists with LAA (Fig.~\ref{wifiTputL}, Wi-Fi/LAA). The only traffic type that does not experience a degradation in throughput is real-time streaming (S) and this is because LAA does not use the unlicensed band at all for this traffic type, as we saw previously. In Scenario S2 were all the clients are close to the AP and in line-of-sight, the largest decrease in average throughput per client is 97\% when coexisting with LAA, in Scenario S1 the highest decrease of average throughput per client is 89.8\% and in Scenario S3, where the clients are distant from the Wi-Fi AP and the throughput is low even in the absence of LAA, the largest decrease of average throughput per client is 82.4\%. It should be noted that the Wi-Fi throughput in general is lower than LAA even when coexisting with itself: we verified that this is due to the University backhaul network for Wi-Fi being limited to approximately 65 Mbps, unlike the LAA BS which is not controlled by the University. \subsection{Throughput when all three APs are used in Scenario S2} Since all APs were not reachable at all channels and locations, we present results only for Scenario S2 where all APs were being received with good signal strength. When Wi-Fi/Wi-Fi coexistence is being studied, the five Wi-Fi clients are associated as follows: clients A and B to AP2, clients C and E to AP1, and client D to AP3. When Wi-Fi/LAA coexistence is being studied, client E is used as the LAA client. Fig.~\ref{a1} (b) and (c) show Wi-Fi throughput with Wi-Fi/Wi-Fi and Wi-Fi/LAA respectively. As in the previous experiment, we again observe a reduction in Wi-Fi throughput when Wi-Fi coexists with LAA compared to the Wi-Fi/Wi-Fi scenario, with the largest decrease in average throughput per client being 85.1\% when coexisting with LAA. We also see in Fig.~\ref{a1} (c) a slightly higher throughput on client C which is associated with AP1 and client D which is associated with AP3, compared to clients A and B which are both associated with AP2: this is because AP2 has two clients associated with it. We also note that AP2 uses Channel 157 as its primary channel and since there are two clients associated with it, management traffic is higher and there is a corresponding lower throughput on Channel 157 for the LAA client as seen in Fig.~\ref{a1} (a). Interestingly, we see that when the Wi-Fi clients are distributed over all three Wi-Fi APs, LAA can transmit on all three unlicensed channels, as shown in Fig.~\ref{a1} (a), unlike the previous experiment where all Wi-Fi clients were connected to one Wi-Fi AP and only two unlicensed channels were being used by LAA as shown in Fig.~\ref{atla} (b). Hence the largest decrease of aggregate throughput from the baseline is only 13.8\% compared to the 62\% reduction when all Wi-Fi clients were connected to one AP. \section{Conclusions and future work} The experimental scenario we have measured in this paper is one that is of considerable interest and not been studied in the coexistence literature to date. The conventional wisdom is that if Wi-Fi is deployed indoors and LAA is deployed outdoors, there will be minimal degradation in performance. However, we have demonstrated that in a realistic environment, like an university campus, where Wi-Fi usage is considerable in busy outdoor areas such as outside a bookstore, the presence of an outdoor LAA BS in close proximity can significantly affect Wi-Fi performance: Wi-Fi throughput can degrade as much as 97\% when coexisting with LAA whereas LAA throughput only degrades 35\%. Furthermore, we have made a number of interesting conclusions regarding coexistence between Wi-Fi and LAA under such circumstances, which are not apparent from existing analysis and simulations. For instance, when both Wi-Fi and LAA use multiple channels, the choice of primary channels among the different APs can have a substantial effect on the throughput of LAA due to the increase in Wi-Fi management frames like RTS/CTS. This leads to the surprising result that LAA has higher throughput when coexisting with three 80 MHz Wi-Fi APs operating on the same channel but using different primary channels than with one 80 MHz Wi-Fi AP when the total number of clients in both cases is the same. Since the work described in this paper relied on deployed LAA and off-the shelf Wi-Fi APs, we were unable to change parameters like sensing thresholds and TXOP duration's, or implement preamble detection instead of energy detection as a coexistence mechanism, to determine the effects on performance. Our future work will focus on addressing the unique problems we identified in this paper via analysis, system simulations using ns-3, and SDR testbeds.
\section{Introduction} A crucial property of mean curvature flow is that embeddedness is preserved under the evolution, and this property is especially consequential in the class of mean-convex flows. Indeed, White \cite{Whi00,Whi03} proved several important results on singularities of embedded, mean-convex flows. Among other things, White showed certain ``collapsed'' singularity models, like the grim reaper or the multiplicity-two hyperplane, cannot arise as blow-up limits of embedded mean-convex flows. In \cite{SW09}, Sheng and Wang introduced a quantitative version of the concept of embeddedness. Let $M_t$ be a family of embedded, mean-convex hypersurfaces evolving by mean curvature flow. We say that the flow $M_t$ is $\alpha$-noncollapsed if \[\frac{1}{2} \, \alpha^{-1} \, H(x,t) \, |x-y|^2 - \langle x-y,\nu(x,t) \rangle \geq 0\] for all points $x,y \in M_t$. This concept has a natural geometric interpretation. A flow is $\alpha$-noncollapsed if, for every point $x \in M_t$, there exists a ball of radius $\alpha H(x,t)^{-1}$ which lies in the inside of $M_t$ and which touches $M_t$ at $x$. It is a consequence of White's work that every compact, embedded, mean-convex solution of mean curvature flow is $\alpha$-noncollapsed, for some $\alpha > 0$, up to the first singular time. Alternative proofs of this result were given by Sheng and Wang \cite{SW09} and by Andrews \cite{And12}. In \cite{Bre15}, the first author proved a sharp version of this noncollapsing estimate. More precisely, if we start from a closed, embedded, mean-convex solution of mean curvature flow, then every blow-up limit is $1$-noncollapsed. In this note, we prove a local version of the noncollapsing estimate for the mean curvature flow. \begin{theorem} \label{main.thm} Let us fix radii $R$ and $r$ such that $R \geq \sqrt{1+3n} \, r$. Moreover, let $\Lambda$ be a positive real number. Let $M_t$, $t \in [-r^2,0]$, be an embedded solution of mean curvature flow in the ball $B_{3R}(0)$ satisfying $R^{-1} \leq \Lambda H$ and $|A| \leq \Lambda H$ for all $t \in [-r^2,0]$ and all $x \in M_t \cap B_{\sqrt{1+3n} \, r}(0)$. Moreover, suppose that \[\frac{1}{2} \, \Lambda \, H(x,-r^2) \, |x-y|^2 - \langle x-y,\nu(x,-r^2) \rangle \geq 0\] for all $x \in M_{-r^2} \cap B_{\sqrt{1+3n} \, r}(0)$ and all $y \in M_{-r^2} \cap B_{3R}(0)$. Then \[\Lambda \, (2+6n)^{4} \, H(x,t) \, |x-y|^2 - \langle x-y,\nu(x,t) \rangle \geq 0\] for all $t \in [-r^2,0]$, all $x \in M_t \cap B_{\frac{r}{2}}(0)$, and all $y \in M_t \cap B_{3R}(0)$. \end{theorem} The proof of Theorem \ref{main.thm} relies on two main ingredients. The first is the evolution equation from \cite{Bre15} for the reciprocal of the inscribed radius. The second is a particular choice of cutoff function inspired in part by the work of Ecker and Huisken \cite{EH91}. The argument can be readily adapted to fully nonlinear flows given by speeds $G = G(h_{ij})> 0$ which are homogeneous of degree one, concave, and satisfy $0 < \frac{\partial G}{\partial h_{ij}} \leq K g_{ij}$ for a uniform constant $K$. Let us now discuss an application of the main theorem. \begin{corollary} \label{ancient.solution.1} Let $\Lambda$ be a positive real number. Let $M_t$, $t \in (-\infty,0]$, be an embedded ancient solution of mean curvature flow in $\mathbb{R}^{n+1}$ such that $H > 0$ and $|A| \leq \Lambda H$ at each point in space-time. Suppose that there exists a sequence of times $t_j \to -\infty$ such that \[\frac{1}{2} \, \Lambda \, H(x,t_j) \, |x-y|^2 - \langle x-y,\nu(x,t_j) \rangle \geq 0\] for all $x \in M_{t_j} \cap B_{\sqrt{-(1+3n)t_j}}(0)$ and all $y \in M_{t_j}$. Then \[\Lambda \, (2+6n)^{4} \, H(x,t) \, |x-y|^2 - \langle x-y,\nu(x,t) \rangle \geq 0\] for all $t \in (-\infty,0]$, all $x \in M_t$, and all $y \in M_t$. \end{corollary} To deduce Corollary \ref{ancient.solution.1} from Theorem \ref{main.thm}, we put $r_j = \sqrt{-t_j}$. Moreover, for each $j$, we choose $R_j$ large enough so that $R_j \geq \sqrt{-(1+3n)t_j}$ and $R_j^{-1} \leq \Lambda H$ for all $t \in [t_j,0]$ and all $x \in M_t \cap B_{\sqrt{-(1+3n)t_j}}(0)$. If we apply Theorem \ref{main.thm} and take the limit as $j \to \infty$, the assertion follows. \begin{corollary} \label{ancient.solution.2} Let $M_t$, $t \in (-\infty,0]$, be a convex ancient solution of mean curvature flow in $\mathbb{R}^{n+1}$ with $H > 0$. Suppose that there exists a sequence $t_j \to -\infty$ such that the rescaled hypersurfaces $(-t_j)^{-\frac{1}{2}} \, M_{t_j}$ converge in $C_{\text{\rm loc}}^\infty$ to a cylinder $S^{n-k} \times \mathbb{R}^k$ with multiplicity $1$, where $k \in \{0,1,\hdots,n-1\}$. Then there exists a constant $\Lambda(n)$ such that \[\Lambda(n) \, H(x,t) \, |x-y|^2 - \langle x-y,\nu(x,t) \rangle \geq 0\] for all $t \in (-\infty,0]$, all $x \in M_t$, and all $y \in M_t$. \end{corollary} In \cite{Wan11}, X.-J. Wang considered ancient solutions to mean curvature flow that can be expressed as level sets $M_t = \{u=-t\}$, where $u$ is a convex function which is defined on the entire space $\mathbb{R}^{n+1}$ and satisfies \[\sum_{i,j=1}^{n+1} \Big ( \delta_{ij} - \frac{D_i u \, D_j u}{|\nabla u|^2} \Big ) \, D_i D_j u = 1.\] Wang showed that such ancient solutions admit a blow-down limit which is a cylinder $S^{n-k} \times \mathbb{R}^k$ with multiplicity $1$, where $k \in \{0,1,\hdots,n-1\}$ (see \cite{Wan11}, Theorem 1.3). By Corollary \ref{ancient.solution.2}, such an ancient solution must be noncollapsed. \section{Proof of Theorem \ref{main.thm}} By scaling, it suffices to prove the assertion for $r=1$. Let us fix a radius $R \geq \sqrt{1+3n}$. Moreover, we fix a positive real number $\Lambda$. Let $M_t$, $t \in [-1,0]$, be an embedded solution of mean curvature flow in the ball $B_{3R}(0)$ satisfying $R^{-1} \leq \Lambda H$ and $|A| \leq \Lambda H$ for all $t \in [-1,0]$ and all $x \in M_t \cap B_{\sqrt{1+3n}}(0)$. Moreover, we assume that \[\frac{1}{2} \, \Lambda \, H(x,-1) \, |x-y|^2 - \langle x-y,\nu(x,-1) \rangle \geq 0\] for all $x \in M_{-1} \cap B_{\sqrt{1+3n} }(0)$ and all $y \in M_{-1} \cap B_{3R}(0)$. We define a function $\varphi$ by \[\varphi(x,t) := (2\Lambda)^{-\frac{1}{4}} \, (1+3n)^{-1} \, (1-|x|^2-3nt)\] for all $t \in [-1,0]$ and all $x \in M_t \cap B_{\sqrt{1-3nt}}(0)$. Moreover, we define \[\Phi(x,t) := \varphi(x,t)^{-4} \, H(x,t)\] for all $t \in [-1,0]$ and all $x \in M_t \cap B_{\sqrt{1-3nt}}(0)$. In the following, let $\lambda_1 \leq \hdots \leq \lambda_n$ denote the eigenvalues of the second fundamental form. \begin{lemma} \label{aux} We have $\Phi \geq 2\Lambda H$ for all $t \in [-1,0]$ and all $x \in M_t \cap B_{\sqrt{1-3nt}}(0)$. Moreover, the eigenvalues of the second fundamental form satisfy $|\lambda_i| \leq \frac{\Phi}{2}$ for all $t \in [-1,0]$ and all $x \in M_t \cap B_{\sqrt{1-3nt}}(0)$. \end{lemma} \textbf{Proof.} By definition, $\varphi \leq (2\Lambda)^{-\frac{1}{4}}$ and $\Phi \geq 2\Lambda H$ for all $t \in [-1,0]$ and all $x \in M_t \cap B_{\sqrt{1-3nt}}(0)$. This proves the first statement. To prove the second statement, we observe that $|A| \leq \Lambda H \leq \frac{\Phi}{2}$ for all $t \in [-1,0]$ and all $x \in M_t \cap B_{\sqrt{1-3nt}}(0)$. This completes the proof of Lemma \ref{aux}. \\ \begin{lemma} \label{testfunction} The function $\varphi$ satisfies \[\frac{\partial \varphi}{\partial t} - \Delta \varphi < 0\] for all $t \in [-1,0]$ and all $x \in M_t \cap B_{\sqrt{1-3nt}}(0)$. \end{lemma} \textbf{Proof.} We compute \[\frac{\partial \varphi}{\partial t} - \Delta \varphi = -(2\Lambda)^{-\frac{1}{4}} \, (1+3n)^{-1} \, n < 0 \] for all $t \in [-1,0]$ and all $x \in M_t \cap B_{\sqrt{1-3nt}}(0)$. \\ \begin{lemma} \label{inequality.for.Phi} The function $\Phi$ satisfies \[\frac{\partial \Phi}{\partial t} - \Delta \Phi - |A|^2 \, \Phi + 2 \sum_{i=1}^n \frac{(D_i \Phi)^2}{\Phi-\lambda_i} > 0\] for all $t \in [-1,0]$ and all $x \in M_t \cap B_{\sqrt{1-3nt}}(0)$. \end{lemma} \textbf{Proof.} Using Lemma \ref{testfunction}, we obtain \begin{align*} \frac{\partial \Phi}{\partial t} - \Delta \Phi &= \varphi^{-4} \, \Big ( \frac{\partial H}{\partial t} - \Delta H \Big ) - 4 \, \varphi^{-5} H \, \Big ( \frac{\partial \varphi}{\partial t} - \Delta \varphi \Big ) \\ &- \frac{4}{3} \, \varphi^{-4} H \, \Big | \frac{\nabla H}{H} - 4 \, \frac{\nabla \varphi}{\varphi} \Big |^2 + \frac{4}{3} \, \varphi^{-4} H \, \Big | \frac{\nabla H}{H} - \frac{\nabla \varphi}{\varphi} \Big |^2 \\ &> |A|^2 \, \varphi^{-4} H - \frac{4}{3} \, \varphi^{-4} H \, \Big | \frac{\nabla H}{H} - 4 \, \frac{\nabla \varphi}{\varphi} \Big |^2 \\ &= |A|^2 \, \Phi - \frac{4}{3} \, \frac{|\nabla \Phi|^2}{\Phi} \end{align*} for all $t \in [-1,0]$ and all $x \in M_t \cap B_{\sqrt{1-3nt}}(0)$. Moreover, it follows from Lemma \ref{aux} that $\frac{\Phi}{2} \leq \Phi-\lambda_i \leq \frac{3\Phi}{2}$ for all $t \in [-1,0]$ and all $x \in M_t \cap B_{\sqrt{1-3nt}}(0)$. Consequently, \[\frac{\partial \Phi}{\partial t} - \Delta \Phi > |A|^2 \, \Phi - \frac{4}{3} \, \frac{|\nabla \Phi|^2}{\Phi} \geq |A|^2 \, \Phi - 2 \sum_{i=1}^n \frac{(D_i \Phi)^2}{\Phi-\lambda_i}\] for all $t \in [-1,0]$ and all $x \in M_t \cap B_{\sqrt{1-3nt}}(0)$. This completes the proof of Lemma \ref{inequality.for.Phi}. \\ We next define \[Z(x,y,t) := \frac{1}{2} \, \Phi(x,t) \, |x-y|^2 - \langle x-y,\nu(x,t) \rangle\] for $t \in [-1,0]$, $x \in M_t$, and $y \in M_t$. \\ \begin{lemma} \label{two.point.function} We have $Z(x,y,t) \geq 0$ for all $t \in [-1,0]$, all $x \in M_t \cap B_{\sqrt{1-3nt}}(0)$, and all $y \in M_t \cap B_{3R}(0)$. \end{lemma} \textbf{Proof.} Suppose that the assertion is false. Let $J$ denote the set of all times $t \in [-1,0]$ with the property that we can find a point $x \in M_t \cap B_{\sqrt{1-3nt}}(0)$ and a point $y \in M_t \cap B_{3R}(0)$ such that $Z(x,y,t) < 0$. Moreover, we define $\bar{t} := \inf J$. By definition, $Z(x,y,t) \geq 0$ for all $t \in [-1,\bar{t})$, all $x \in M_t \cap B_{\sqrt{1-3nt}}(0)$, and all $y \in M_t \cap B_{3R}(0)$. Moreover, we can find a sequence of times $t_j \in J$ such that $t_j \to \bar{t}$. For each $j$, we can find a point $x_j \in M_{t_j} \cap B_{\sqrt{1-3nt_j}}(0)$ and a point $y_j \in M_{t_j} \cap B_{3R}(0)$ such that $Z(x_j,y_j,t_j) < 0$. Clearly, $x_j \neq y_j$, and \[\frac{2 \, \langle x_j-y_j, \nu(x_j,t_j) \rangle}{|x_j -y_j|^2} > \Phi(x_j,t_j).\] Using the Cauchy-Schwarz inequality, we obtain \[\frac{2}{|x_j-y_j|} > \Phi(x_j,t_j) \geq 2\Lambda H(x_j,t_j) \geq 2R^{-1}.\] In other words, $|x_j-y_j| \leq R$. After passing to a subsequence, the points $x_j$ converge to a point $\bar{x} \in M_{\bar{t}}$ satisfying $|\bar{x}| \leq \sqrt{1-3n\bar{t}}$. Moreover, the points $y_j$ converge to a point $\bar{y} \in M_{\bar{t}}$ satisfying $|\bar{x}-\bar{y}| \leq R$. In particular, $|\bar{y}| \leq \sqrt{1+3n} + R \leq 2R$. If $|\bar{x}| = \sqrt{1-3n\bar{t}}$ and $\bar{x} \neq \bar{y}$, then \[\frac{2 \, \langle \bar{x}-\bar{y}, \nu(\bar{x},\bar{t}) \rangle}{|\bar{x}-\bar{y}|^2} = \limsup_{j \to \infty} \frac{2 \, \langle x_j-y_j, \nu(x_j,t_j) \rangle}{|x_j -y_j|^2} \geq \limsup_{j \to \infty} \Phi(x_j,t_j) = \infty,\] which is impossible. If $|\bar{x}| = \sqrt{1-3n\bar{t}}$ and $\bar{x} = \bar{y}$, then \[\lambda_n(\bar{x},\bar{t}) \geq \limsup_{j \to \infty} \frac{2 \, \langle x_j-y_j, \nu(x_j,t_j) \rangle}{|x_j -y_j|^2} \geq \limsup_{j \to \infty} \Phi(x_j,t_j) = \infty,\] which is impossible. If $|\bar{x}| < \sqrt{1-3n\bar{t}}$ and $\bar{x} = \bar{y}$, then \[\lambda_n(\bar{x},\bar{t}) \geq \limsup_{j \to \infty} \frac{2 \, \langle x_j-y_j, \nu(x_j,t_j) \rangle}{|x_j -y_j|^2} \geq \limsup_{j \to \infty} \Phi(x_j,t_j) = \Phi(\bar{x},\bar{t}),\] which contradicts Lemma \ref{aux}. Therefore, we must have $|\bar{x}| < \sqrt{1-3n\bar{t}}$ and $\bar{x} \neq \bar{y}$. Moreover, \[\frac{2 \, \langle \bar{x}-\bar{y}, \nu(\bar{x},\bar{t}) \rangle}{|\bar{x}-\bar{y}|^2} = \limsup_{j \to \infty} \frac{2 \, \langle x_j-y_j, \nu(x_j,t_j) \rangle}{|x_j -y_j|^2} \geq \limsup_{j \to \infty} \Phi(x_j,t_j) \geq \Phi(\bar{x},\bar{t}).\] We claim that $\bar{t} \in (-1,0]$. Indeed, if $\bar{t}=-1$, then our assumption implies \[\frac{2 \, \langle \bar{x}-\bar{y}, \nu(\bar{x},\bar{t}) \rangle}{|\bar{x}-\bar{y}|^2} \leq \Lambda \, H(\bar{x},\bar{t}) < \Phi(\bar{x},\bar{t}),\] which is impossible. Consequently, $\bar{t} \in (-1,0]$. To summarize, we have shown that $\bar{t} \in (-1,0]$, $Z(\bar{x},\bar{y},\bar{t}) \leq 0$, and $Z(x,y,t) \geq 0$ for all $t \in [-1,\bar{t})$, all $x \in M_t \cap B_{\sqrt{1-3nt}}(0)$, and all $y \in M_t \cap B_{3R}(0)$. Arguing as in the proof of Proposition 2.3 in \cite{Bre15}, we conclude that \[\frac{\partial \Phi}{\partial t} - \Delta \Phi - |A|^2 \, \Phi + 2 \sum_{i=1}^n \frac{(D_i \Phi)^2}{\Phi - \lambda_i} \leq 0\] at the point $(\bar{x},\bar{t})$. This contradicts Lemma \ref{inequality.for.Phi}. This completes the proof of Lemma \ref{two.point.function}. \\ We now complete the proof of Theorem \ref{main.thm}. By definition, $\varphi(x,t) \geq (2\Lambda)^{-\frac{1}{4}} \, (2+6n)^{-1}$ and $\Phi(x,t) \leq 2\Lambda \, (2+6n)^{4} \, H(x,t)$ for all $t \in [-1,0]$ and all $x \in M_t \cap B_{\frac{1}{2}}(0)$. Using Lemma \ref{two.point.function}, we conclude that \[\Lambda \, (2+6n)^{4} \, H(x,t) \, |x-y|^2 - \langle x-y,\nu(x,t) \rangle \geq Z(x,y,t) \geq 0\] for all $t \in [-1,0]$, all $x \in M_t \cap B_{\frac{1}{2}}(0)$, and all $y \in M_t \cap B_{3R}(0)$. This completes the proof of Theorem \ref{main.thm}.
\section{Introduction} Let $\mathbb{C}$ denote the complex plane and $dA$ be the area measure. The Fock space $F^2$ is the space of all entire functions $f$ on $\mathbb{C}$ such that $$||f||_2^2=\frac{1}{\pi} \int_{\mathbb{C}}|f(z)|^2e^{-|z|^2}dA(z)<\infty.$$ For any fixed non-negative integer $m$, the Fock-Sobolev space $F^{2,m}(\mathbb{C})$ consists of all entire functions $f$ on $\mathbb{C}$ such that $$\| f^{(m)}\|_2^2<\infty.$$ Cho and Zhu\cite{Cho} have shown that $f\in F^{2,m}(\mathbb{C}^n)$ if and only if $z^\alpha f(z)$ is in $F^2(\mathbb{C}^n)$ for all multi-indices $\alpha$ with $|\alpha|=m.$ The result can of course be take as an alternative definition of $F^{2,m}.$ Let $L^2_m$ be the space of Lebesgue measurable functions $f$ on $\mathbb{C}$ such that the function $|z|^mf(z)$ is in $L^2(\mathbb{C},e^{-|z|^2}dA).$ It is well known that $L^2_m$ is a Hilbert space with the inner product $$<f,g>_m=\frac{1}{\pi m!}\int_{\mathbb{C}} f(z)\overline{g(z)}|z|^{2m}e^{-|z|^2}dA(z),\quad f,g\in L^2_m.$$ It is clear that the Fock-Sobolev space $F^{2,m}(\mathbb{C})$ is a closed subspace of the Hilbert space $L^2_m$. There is an orthogonal projection $P$ from $L^2_m$ onto $F^{2,m}(\mathbb{C})$, which is given by $$Pf(z)=\frac{1}{\pi m!}\int_{\mathbb{C}} f(w){K_m(z,w)}|w|^{2m}e^{-|w|^2}dA(w),\quad f\in F^{2,m},$$ where $$K_m(z,w)=\sum_{k=0}^\infty \frac{m!}{(k+m)!} (z\overline{w})^k$$ is the reproducing kernel of Fock-Sobolev space $F^{2,m}(\mathbb{C}).$ See \cite{Cho} for more details about the Fock-Sobolev space. Let $D$ denote the set of all finite linear combinations of kernel functions in $F^{2,m}(\mathbb{C}).$ It is well-known that $D$ is dense in $F^{2,m}(\mathbb{C}).$ Let $\varphi$ be a Lebesgue measurable function on $\mathbb{C}$ that satisfies \begin{equation}\label{welldown} \int_{\mathbb{C}}|\varphi(w)||K_m(z,w)||w|^{2m}e^{-|w|^2}dA(w)<\infty. \end{equation} So we can densely define the Toeplitz operator with the symbol $\varphi$ on $F^{2,m}(\mathbb{C})$ as follows: \begin{align*} T_\varphi f(z) &=\frac{1}{\pi m!}\int_{\mathbb{C}} \varphi(w)f(w){K_m(z,w)}|w|^{2m}e^{-|w|^2}dA(w). \end{align*} The Hankel operator $H_\varphi$ with the symbol $\varphi$ is given by $H_\varphi f=(I-P)(\varphi f),$ where $I$ is the identity operator on $L^2_m.$ Let $k_m(z,w)$ be the normalization of the reproducing kernel $K_m(z,w),$ the Berezin transform of $T_\varphi$ is $$\widetilde{T}_\varphi(z)=<\varphi k_m(w,z),k_m(w,z)>_m=\widetilde{\varphi}(z).$$ Let $H$ be Hibert space of analytic function. Sarason's product problem for $H$ is the following: \textit{ Suppose $f,g\in H,$ is the boundedness of $T_fT_{\overline{g}}$ equivalent to the boundedness of $\left[\widetilde{|f|^{2}}(z) \widetilde{|g|^{2}}(z)\right]?$} Sarason \cite{Sarason} originally asked this for $H=H^2$, the Hardy space of unit circle. We now call it the Sarason's conjecture. It was partially solved for Topelitz operators on the Hardy space in \cite{Zheng}, on the Bergman space in \cite{Stroethoff}. Unfortunately, Sarason's conjecture is not true, both for Hardy space and Bergman space, see \cite{Aleman,Nazarov} for counterexamples. However, the Sarason's conjecture is true for classical Fock space. A recent very impressive theorem, proved by Cho and Zhu, characterizes the Sarason's product problem for the classical Fock space, see \cite{Cho1}. The corresponding question for analogous Hankel operators defined on the $F^2$ was resolved by Ma-Yan-Zheng-Zhu in their paper \cite{MA}. They obtained that there are functions $f(z)=e^{2\pi \texttt{i} z}$ and $g(z)=e^{z}$ such that $H_{\overline{f}}^{*} H_{\overline{g}}=0$ on $F^2$. By definition, \begin{equation}\label{l111} H_{\overline{f}}^*H_{\overline{g}}=T_{f\overline{g}}-T_{f}T_{\overline{g}}=(T_f,T_{\overline{g}}]. \end{equation} Up to our knowledge, the boundedness of a single Toeplitz operator on $F^2$ is still an open problem, see \cite{Bauer,Berger,Berger1}. So, it is difficult to characterize the commuting Toeplitz operators on Fock spaces. In fact, the commutativity of Toeplitz operators on $F^2$ is also an open problem. There is only one result for the semi-commuting Toeplitz operators on Fock space $F^2$, see \cite{Bauer1}. \begin{theorem}\label{A} Let $\epsilon(\mathbb{C})$ be the set of entire functions $g$ on $\mathbb{C}$ such that $|g(z)|e^{-c|z|}$ is essentially bounded on $\mathbb{C}$ for some $c>0.$ Suppose $f,g\in \epsilon(\mathbb{C}),$ then the following statements are equivalent:\\ (a) $T_fT_{\overline{g}}=T_{f\overline{g}}$.\\ (b) $\widetilde{f\overline{g}}=f\overline{g}.$\\ (c) Either (1) or (2) holds; (1) $f$ or \ $g$ is constant. (2) There are finite collections $\{a_j\}_{j=1}^N$ and $\{b_l\}_{l=1}^M$ of distinct complex numbers such that $$f \in Span \{K_{a_1},\cdots, K_{a_N}\},\quad \text{and} \quad g\in Span \{K_{b_1},\cdots, K_{b_M}\}$$ with \ $a_j\overline{b_l}= 2\eta\pi \mathrm{i}$ for each $j$ and $l$. Here, $\eta$ is any integer and $K_z$ is the kernel of $F^2.$ \end{theorem} In fact, the $\epsilon(\mathbb{C})$ can be characterized by the following set $$ \mathcal{A}_1=\left\{\sum_{j=1}^{N} p_{j} K_{a_{j}}: N \in \mathbb{N} \text { and } p_{j} \in \mathcal{P}, a_{j} \in \mathbb{C} \text { for } j=1, \ldots, N\right\}. $$ where $\mathcal{P}$ is the space of all holomorphic polynomials on $\mathbb{C}$. For the Fock space $F^2$, there is a unitary operator $U_w$ on $F^2$ such that $U_{w} f(z)=f(z-w)k_w(z),$ where $k_w$ is the normalized reproducing kernel of $F^2$. Using the unitary operator, it is easy to see that \begin{align*} \widetilde{f}(z)=\langle fk_z,k_z\rangle_{F^2} &=\frac{1}{\pi}\int_{\mathbb{C}} f(z \pm w) e^{-|w|^2}dA (w). \end{align*} More explicitly, for $f,g\in \mathcal{A}_{1},$ the berezin of $f\overline{g}$ must be of the form $$ \sum_j\widetilde{\left\{p_j \bar{\eta_j} K_{a_j} \overline{K_{b_j}}\right\}}(z)=\sum_je^{b_j \cdot \overline{a_j}} K_{a_j}(z) K_z(b_j) \eta_j^{*}\left(\partial_{z}+\overline{z}+\overline{a_j}\right) p(z+b_j), $$ see Lemma 3.3 in \cite{Bauer1}. The results of \cite{Bauer1} are base on the property of Berezin transform and the decomposition. Unfortunately, we know nothing about the semi-commutant of two Toeplitz operators on Fock-Sobolev space $F^{2,m}(\mathbb{C})(m\neq0)$ from 2014 until now. There are two natural problems, which arise from Theorem \ref{A} . \begin{proA} Let $f,g\in D,$ what is the relationship between their symbols when two Toeplitz operators $T_f$ and $T_{\overline{g}}$ commute on $F^{2,m}(\mathbb{C})?$ \end{proA} \begin{proB} Is Theorem \ref{A} hold? \end{proB} In this paper, we will focus on the two problems. First, we will show that there are actually no nontrivial functions $f$ and $g$ in $D$ such that $H_{\overline{f}}^* H_{\overline{g}}=(T_f,T_{\overline{g}}]=0$ on $F^{2,m}(\mathbb{C})(m>0)$. Precisely, the first main result is stated as follows. \begin{A} Let $m$ be a positive integer, and suppose that $f$ and $g$ are functions in $D$. Then the following statements are equivalent. \\ (a) $H_{\overline{f}}^* H_{\overline{g}}=0$ on $F^{2,m}(\mathbb{C})$ . \\ (b) $T_{f}T_{\overline{g}}=T_{f\overline{g}}$ on $F^{2,m}(\mathbb{C})$.\\ (c) $\widetilde{f\overline{g}}=f\overline{g}.$\\ (d) At least one of $f$ and $g$ is a constant. \end{A} Every function $f \in D$ is related to the reproducing kernel by the formula \begin{equation}\label{1} f(z)=\sum_{k=1}^{N} c_{k} K_m\left(z, \omega_{k}\right), \end{equation} where $N$ is a finite positive integer and $c_k,\omega_{k}\in \mathbb{C}.$ The main obstacle of the proof of the Theorem is to calculate the product of the Hankel operators, although every function in $D$ has the form (\ref{1}). More specifically, the idea of the proof of the Theorem is to solve the following equations of $a_k$, $A_k$, $b_j$ and $B_j$: $$(\sum_{k=1}^{N_1} a_{k} H_ {\overline{K_m\left(z, A_{k}\right)}}^*)(\sum_{j=1}^{N_2} b_{j} H_ {\overline{K_m\left(z, B_{j}\right)}})z^l=0,$$ where $l$ is any negative integer, and $N_1,N_2$ are two fixed finite positive integers. This proof provide a simpler way to prove the main Theorem in \cite{Bauer1}(Theorem \ref{A}, in this paper), see step 1 of Theorem \ref{zerop} As is well known, Fock spaces and Fock Sobolev spaces have the same properties, since the Fock-sobolev space is the Fock space with the radial weight. For instance, Sarason's problem, the boundedness and compactness of composition operators, the commuting Toeplitz operators with radial symbols and so on, see \cite{Bauer2,Carswell,Chen,Cho2,Cho1,Choe}. But the answer of the second question is negative. \begin{B} Let $m$ be a positive integer. Then Theorem 1 doesn't hold on $F^{2,m}(\mathbb{C})$. In fact, $T_{e^{a z}} T_{\overline{e^{b z}}}=T_{e^{a z} \overline{e^{b z}}}$ if and only if $ab=0.$ \end{B} The above results say that there is a difference between the Fock-Sobolev space and the Fock space. The operator $U_{w}$ is a key to consider the operators on $F^2$. However, the translations do not have such good property on Fock-Sobolev space $F^{2,m}(\mathbb{C})$, since the kernel of Fock-Sobolev is very complicated. In other words, the Berezin transform of the function can almost never be computed explicitly. Thus, the approach does not work in Fock-Sobolev space. So, we'll look at the Berezin transform from a different angle. \section{Semi-Commuting Toeplitz Operators}\label{s4} In order to prove our result, we need several lemmas. A direct calculation gives the following lemma which we shall use often. \begin{lemma}\label{Hz} Let $k,j$ and $l$ be non-negative integers. Then \begin{equation*} T_{\overline{z}^k} z^l= \left\{ \begin{array}{ll} 0\quad & \hbox{if $l<k$,} \\ \frac{(l+m)!}{(l-k+m)! } z^{l-k}\quad & \hbox{if $l\geq k;$} \end{array} \right.\end{equation*} \begin{equation*} T_{z^l}T_{\overline{z}^k}z^j=\left\{ \begin{array}{ll} 0\quad & \hbox{if $j<k$,} \\ \frac{ (j+m)!}{(j-k+m)! } z^{j+l-k}\quad & \hbox{if $j\geq k;$} \end{array} \right.\end{equation*} \begin{equation*} T_{z^l \overline{z}^k} z^j=\left\{ \begin{array}{ll} 0\quad & \hbox{if $j+l<k$,} \\ \frac{ (j+l+m)!}{(j+l-k+m)! } z^{j+l-k}\quad & \hbox{if $j+l\geq k$.} \end{array} \right.\end{equation*} \end{lemma} \begin{proof} Here we only give the proof of the frist equation. By a straightforward calculus argument, \begin{align*} T_{\overline{z}^k} z^l&=\frac{1}{\pi m!} \int_{\mathbb{C}} \overline{\omega}^k \omega^l K_m(z,\omega)|\omega|^{2m}e^{-|\omega|^2}dA(\omega)\\ &=\frac{1}{\pi m!} \sum_{\eta=0}\frac{z^\eta}{\|z^\eta\|^2_m} \int_{\mathbb{C}} \overline{\omega}^{k+\eta} \omega^l |\omega|^{2m} e^{-|\omega|^2}dA(\omega)\\ &= \frac{1}{\pi m!} \sum_{\eta=0}\frac{z^\eta}{\|z^\eta\|^2_m} \int_{0}^\infty r^{1+\eta+k+l+2m}e^{-r^2}dr \int_{0}^{2\pi} e^{i(l-k+\eta)}d\theta\\ &= \frac{(l+m)!}{ (l-k+m)!}z^{l-k}. \end{align*} This completes the proof. \end{proof} \begin{lemma}\label{lemma1} Let $\{w_i\}_{i=1}^N$ be a finite collection of non-zero complex numbers, then $\{1-K_{m}(\cdot,w_i)\}_{i=1}^N$ is linearly independent. \end{lemma} \begin{proof} Without loss of generality, assume $\{w_i\}_{i=1}^N$ is a finite collection of distinct non-zero complex numbers. Let $\sum_{i=1}^N a_i(1- K_{m}(\cdot,w_i))=0 ,$ then $$\langle z^l , \sum_{i=1}^N a_i (1- K_{m}(z,w_i))\rangle_m=\sum_{i=1}^N a_i w_i^l=0$$ for all $l\geq1.$ Let $$M=\left( \begin{array}{ccc} w_1 & \cdots & w_N \\ \vdots & \vdots & \vdots \\ w_1^N & \ldots & w_N^N \\ \end{array} \right),\quad X=\left( \begin{array}{c} a_1 \\ \vdots \\ a_N \\ \end{array} \right). $$ So, $MX=0.$ By hypothesis, $|M|=\prod_{i=1}^N w_i \prod_{1\leq l<j\leq N}(w_j-w_l)\neq0.$ Thus, $a_i=0$ for all $1\leq i\leq N.$ \end{proof} Let $k,l$ and $j$ be three positive integers. Suppose $l\geq j\geq2$ and $k\geq j-1.$ For any fixed $j$, define the expression \begin{equation}\label{E0} \Xi(k)=\prod_{i=1}^j (l+k+m-j+i)=C_0+\sum_{i=1}^{j}C_i\bigg\{ \prod_{\lambda=0}^{i-1} (k+m-\lambda)\bigg\}, \end{equation} where $C_i$ is a positive number independent of $k$, but dependent on $l,$ $m$ and $j$. Note that $C_{j-1}=jl$ and $C_j=1.$ It is clear that \begin{align}\label{E4} \Xi(j)=\prod_{i=1}^j (l+m+i)=\sum_{i=0}^{j}C_i \frac{(m+j)!}{(m+j-i)!}. \end{align} There are non-constant functions $f$ and $g$ in the set of all finite linear combinations of kernel functions of $F^2({\mathbb{C}})$ such that $H_{\overline{f}}^*H_{\overline{g}}=0$ on Fock space $F^2({\mathbb{C}})$, see \cite{MA}. But it's not true in Fock-Sobolev space, see Theorem \ref{zerop}. This means that there is a huge difference between Fock spaces and Fock-Sobolev spaces. Before we prove this result, we establish the following special case first. \begin{lemma}\label{ex} Let $j$ and $l$ be two non-negative integers such that $l\geq j\geq2$. Let $A$ and $B$ be two non-zero constants. For any fixed $j$, define the expression \begin{align}\label{E-1} C(j,l)=&\sum_{k\geq0}\frac{m!}{(k+m)!} \frac{(l+k+m)!}{(k+l-j+m)!}A^k B^{l+k-j}\nonumber\\ &-\sum_{0\leq k\leq j} \frac{m!}{(k+m)!} \frac{(j+m)!}{(k+l-j+m)!} \frac{(l+m)!}{(j-k+m)!}A^k B^{l+k-j}. \end{align} Suppose \begin{align*} m!\frac{e^{AB}-q_m(AB)}{(AB)^m}=\sum_{k\geq 0}\frac{m!(AB)^k}{(k+m)!}=1, \end{align*} where $q_0=0$ and $q_m$ is the Taylor polynomial of $e^{AB}$ of order $m-1$ for all $m\geq1$. Then $$C(j,l)=\sum_{k=1}^{j-1}Q_k A^k B^{l+k-j}-\sum_{i=0}^{j-2}C_i A^iB^{l+i-j}\bigg\{\sum_{k=1}^{j-i-1} \frac{m!(AB)^k}{(k+m)!}\bigg\},$$ where the $C_i$ is defined as before (\ref{E0}). Moreover $$Q_k=\frac{m!}{(k+m)!} \frac{(l+k+m)!}{(k+l-j+m)!}-\frac{m!}{(k+m)!} \frac{(j+m)!}{(k+l-j+m)!} \frac{(l+m)!}{(j-k+m)!} $$ for $1\leq k\leq j-1.$ \end{lemma} \begin{proof} For simplicity, we write $$J=\sum_{k=1}^{j-1}Q_k A^k B^{l+k-j},\quad E =m!\frac{e^{AB}-q_m(AB)}{(AB)^m},$$ $$M=\sum_{i=0}^{j-2}C_i A^iB^{l+i-j}\bigg\{\sum_{k=1}^{j-i-1} \frac{m!(AB)^k}{(k+m)!}\bigg\},$$ and $$I=\sum_{k\geq j+1}\frac{m!}{(k+m)!} \frac{(l+k+m)!}{(k+l-j+m)!}A^k B^{l+k-j}.$$ In fact, for $l\geq j\geq 2,$ \begin{equation}\label{E1} C(j,l)=I+J+(\prod_{i=1}^j \frac{l+m+i}{m+i}-1)A^j B^l. \end{equation} By (\ref{E0}) and a simple computation, \begin{align*} I&=\sum_{k\geq j+1}\frac{m!}{(k+m)!}\bigg(\prod_{i=1}^j (l+k+m-j+i)\bigg) A^k B^{l+k-j}\nonumber\\ &=\sum_{k\geq j+1}\frac{m!}{(k+m)!}\bigg\{C_0+\sum_{i=1}^{j}C_i \prod_{\lambda=0}^{i-1} (k+m-\lambda)\bigg\} A^k B^{l+k-j}\nonumber\\ &=\sum_{i=0}^jC_i\bigg\{ E-\sum_{k=0}^{j-i} \frac{m!(AB)^k}{(k+m)!} \bigg\}A^iB^{l+i-j}\nonumber\\ &=\sum_{i=0}^{j-1}C_i\bigg\{ E-1-\sum_{k=1}^{j-i} \frac{m!(AB)^k}{(k+m)!} \bigg\}A^iB^{l+i-j}+C_j (E-1)A^jB^l\nonumber\\ \end{align*} where the $C_i$ is defined as before (\ref{E0}). Since $E=1$, then \begin{align}\label{E2} I&=-\sum_{i=0}^{j-1}C_i A^iB^{l+i-j}\bigg\{\sum_{k=1}^{j-i} \frac{m!(AB)^k}{(k+m)!}\bigg\}\nonumber\\ &=-\sum_{i=0}^{j-2}C_i A^iB^{l+i-j}\bigg\{\sum_{k=1}^{j-i-1} \frac{m!(AB)^k}{(k+m)!}\bigg\}-\sum_{i=0}^{j-1} \frac{m!C_i}{(j-i+m)!}A^j B^l, \end{align} By (\ref{E1}) and (\ref{E2}), \begin{align*} C(j,l)&=J-M+\bigg\{\prod_{i=1}^j \frac{l+m+i}{m+i}-1-\sum_{i=0}^{j-1} \frac{m!C_i}{(j-i+m)!}\bigg\}A^j B^l. \end{align*} Since $C_j=1,$ it is immediate from (\ref{E4}) that \begin{align*} &\quad\prod_{i=1}^j \frac{l+m+i}{m+i}-1-\sum_{i=0}^{j-1} \frac{m!C_i}{(j-i+m)!}\\ &=\prod_{i=1}^j\frac{1}{m+i}\bigg\{\prod_{i=1}^j (l+m+i)-\prod_{i=1}^j(m+i)-\sum_{i=0}^{j-1} \frac{C_i (m+j)!}{(j-i+m)!}\bigg\}\\ &=\prod_{i=1}^j\frac{1}{m+i}\bigg\{\prod_{i=1}^j (l+m+i)-\sum_{i=0}^{j} \frac{C_i (m+j)!}{(j-i+m)!}\bigg\}\\ &=0. \end{align*} Thus $C(j,l)=J-M.$ This is the desired result. \end{proof} The coefficients of $A^k B^{l+k-j}$ can almost never be computed explicitly for all $l\geq j\geq2, 1\leq k\leq j.$ Lemma \ref{ex} shows that the coefficient of $A^jB^l$ is zero. Fixed $j\geq2,$ we now consider the coefficient of $A^{j-1} B^{l-1}$ for all $l\geq j.$ \begin{lemma}\label{re1} For $l\geq j\geq2,$ we let $ \Theta$ denote the coefficient of $ A^{j-1} B^{l-1}.$ Then $\Theta\neq0$ if $m\neq0.$ \end{lemma} \begin{proof} It follows from Lemma \ref{ex} that $$\Theta=Q_{j-1}-\sum_{i=0}^{j-2}C_i \frac{m!}{(j-i-1+m)!},$$ where $C_i$ as defined in (\ref{E0}). It is obvious that \begin{align*} Q_{j-1}&=\frac{m!}{(j-1+m)!}\frac{(l+j-1+m)!}{(l-1+m)!}-\frac{m!}{(j-1+m)!}\frac{(j+m)!(l+m)}{(1+m)!}\\ &=\prod_{\lambda=1}^{j-1}\frac{1}{m+\lambda}\bigg\{\prod_{i=1}^j (l+m+i-1)-\frac{(j+m)!(l+m)}{(1+m)!}\bigg\}. \end{align*} By (\ref{E0}), we have \begin{align*} \Xi(j-1)&=\prod_{i=1}^{j}(l+m+i-1)=C_0+\sum_{i=1}^{j}C_i\bigg\{ \prod_{\lambda=0}^{i-1} (j-1+m-\lambda)\bigg\}\\ &=\sum_{i=0}^{j-2}C_i \frac{(m+j-1)!}{(j-i-1+m)!}+C_{j-1}\prod_{i=1}^{j-1}(m+i)+\prod_{i=0}^{j-1}(m+i), \end{align*} then \begin{align*} &\quad \sum_{i=0}^{j-2}C_i \frac{m!}{(j-i-1+m)!}\\ &=\prod_{\lambda=1}^{j-1} \frac{1}{m+\lambda}\bigg\{\sum_{i=0}^{j-2}C_i \frac{(m+j-1)!}{(j-i-1+m)!}\bigg\}\\ &=\prod_{\lambda=1}^{j-1} \frac{1}{m+\lambda}\bigg\{ \prod_{i=1}^{j}(l+m+i-1)\\ &\quad-C_{j-1}\prod_{i=1}^{j-1}(m+i)-\prod_{i=0}^{j-1}(m+i)\bigg\}. \end{align*} By above equations, then \begin{align*}\Theta&=\prod_{\lambda=1}^{j-1}\frac{1}{m+\lambda}\bigg\{\prod_{i=1}^{j}(l+m+i-1)-\frac{(j+m)!(l+m)}{(1+m)!} \\ &\quad-\prod_{i=1}^{j}(l+m+i-1)+C_{j-1}\prod_{i=1}^{j-1}(m+i)+ \prod_{i=0}^{j-1}(m+i)\bigg\}\\ &=\prod_{\lambda=1}^{j-1}\frac{1}{m+\lambda}\bigg\{-(l+m)\prod_{i=2}^j(m+i)+jl\prod_{i=1}^{j-1}(m+i)+ \prod_{i=0}^{j-1}(m+i)\bigg\}\\ &=\prod_{\lambda=1}^{j-1}\frac{1}{m+\lambda}\prod_{i=1}^{j-1}(m+i)\bigg\{-\frac{(l+m)(j+m)}{m+1}+jl+m\bigg\}\\ &=\frac{m(j-1)(l-1)}{m+1} \end{align*} and hence we have $\Theta\neq0$ if $m\neq0.$ \end{proof} Lemma \ref{re1} shows that the coefficient of $A^{j-1} B^{l-1}$ is non-zero if $m\neq0$. Easily modifying the proof of Theorem 9 in \cite{MA}, we get $H_{\overline{f}}^* H_{\overline{g}}=0$ if and only if $\widetilde{fg}=f\overline{g}.$ So, we omit its proof here. Recall that $D$ is the set of all finite linear combinations of kernel functions in $F^{2,m}(\mathbb{C}).$ We now prove Theorem \ref{A}. \begin{theorem}\label{zerop} Let $f$ and $g$ be functions in $D.$ Suppose $m\neq0$, then $H_{\overline{f}}^* H_{\overline{g}}=(T_f,T_{\overline{g}}]=0$ on $F^{2,m}(\mathbb{C})$ if and only if at least one of $f$ and $g$ is a constant function. \end{theorem} \begin{proof} It is clear that $H_{\overline{f}}^* H_{\overline{g}}=0$ if one of $f$ and $g$ is constant function. Conversely, suppose $H_{\overline{f}}^* H_{\overline{g}}=0,$ then $T_f T_{\overline{g}}=T_{f\overline{g}}$ by (\ref{l111}). We set $f(z)=\sum_{i=1}^{N_1} a_i K_m(z,A_i)$ and $g(z)=\sum_{\lambda=1}^{N_2} b_\lambda K_m(z,B_\lambda),$ where $N_1$, $N_2$ are finite positive integers, and $a_i,A_i,b_\lambda,B_\lambda\in \mathbb{C}$. We can rewrite $$f(z)=\sum_{i=1}^{N_1}\sum_{k_i=0}^\infty a_i\frac{m!}{(k_i+m)!}\overline{A}_i^{k_i}z^{k_i}$$ and $$g(z)=\sum_{\lambda=1}^{N_2}\sum_{\ell_\lambda=0}^\infty b_\lambda\frac{m!}{(\ell_\lambda+m)!}\overline{B}_\lambda^{\ell_\lambda}z^{\ell_\lambda}.$$ By Lemma \ref{Hz}, we have \begin{align*} T_{f(z)} T_{\overline{g}(z)}z^l&=\sum_{i=1}^{N_1}\sum_{\lambda=1}^{N_2}\sum_{k_i=0}^\infty\sum_{0\leq\ell_\lambda\leq l} a_i \overline{b}_\lambda \frac{m!}{(k_i+m)!}\frac{m!}{(\ell_\lambda+m)!} \\ &\quad \times\frac{(l+m)!}{(l-\ell_\lambda+m)!} \overline{A}_i^{k_i}B_\lambda^{\ell_\lambda}z^{l+k_i-\ell_\lambda} \end{align*} and \begin{align*} T_{f(z)\overline{g}(z)}z^l&=\sum_{i=1}^{N_1}\sum_{\lambda=1}^{N_2}\sum_{k_i=0}^\infty \sum_{0\leq\ell_\lambda\leq l+k_i} a_i \overline{b}_\lambda \frac{m!}{(k_i+m)!}\frac{m!}{(\ell_\lambda+m)!} \\ &\quad \times\frac{(l+k_i+m)!}{(l+k_i-\ell_\lambda+m)!} \overline{A}_i^{k_i}B_\lambda^{\ell_\lambda}z^{l+k_i-\ell_\lambda}. \end{align*} Let $l+k_i-\ell_\lambda=j\geq0,$ then $\ell_\lambda=l+k_i-j$ and $k_i\geq \text{max}\{0, j-l\}.$ If $\ell_\lambda\leq l$, then $k_i\leq j$. By the above two equations, we obtain $T_f T_{\overline{g}}=T_{f\overline{g}}$ if and only if \begin{align}\label{QQQQ} & \quad\sum_{i=1}^{N_1}\sum_{\lambda=1}^{N_2} \sum_{max(0,j-l)\leq k_i\leq j}a_i \overline{b}_\lambda \frac{m!}{(k_i+m)!} \frac{(j+m)!}{(k_i+l-j+m)!} \nonumber\\ &\quad \times \frac{(l+m)!}{(j-k_i+m)!}\overline{A}_i^{k_i} B_\lambda^{l+k_i-j}\nonumber\\ &= \sum_{i=1}^{N_1}\sum_{\lambda=1}^{N_2} \sum_{max(0,j-l)\leq k_i}^\infty a_i \overline{b}_\lambda\frac{m!}{(k_i+m)!} \frac{(l+k_i+m)!}{(k_i+l-j+m)!}\overline{A}_i^{k_i} B_\lambda^{l+k_i-j} \end{align} for all $j,l\geq0.$ We define \begin{align*} C(j,l,i,\lambda)&=\sum_{0\leq k_i}^\infty \frac{m!}{(k_i+m)!} \frac{(l+k_i+m)!}{(k_i+l-j+m)!}\overline{A}_i^{k_i} B_\lambda^{l+k_i-j}\\ &\quad-\sum_{0\leq k_i\leq j}\frac{m!}{(k_i+m)!} \frac{(j+m)!}{(k_i+l-j+m)!} \frac{(l+m)!}{(j-k_i+m)!}\overline{A}_i^{k_i} B_\lambda^{l+k_i-j}. \end{align*} Note that $C(j,l,i,\lambda)$ is independent of $i$ and $\lambda$. In other words, if we set $k=k_i$, $A=\overline{A}_i$ and $B=B_\lambda$ in (\ref{E-1}), then $C(j,l,i,\lambda)=C(j,l),$ where $C(j,l)$ as defined in (\ref{E-1}). Without loss of generality, assume $j\leq l$. By (\ref{QQQQ}), we obtain \begin{equation}\label{E-2} 0=\sum_{i=1}^{N_1}\sum_{\lambda=1}^{N_2}a_i\overline{b}_\lambda C(j,l,i,\lambda). \end{equation} Because of its length, the proof will be divided into several steps.\\ \textbf{Step 1.} We claim that $$1=m! \frac{e^{\overline{A}_iB_\lambda}-q_m(\overline{A}_iB_\lambda)}{(\overline{A}_iB_\lambda)^m}, \quad 1\leq i \leq N_1, 1\leq\lambda \leq N_2.$$ To prove this claim, assume $a_i,A_i, b_\lambda,B_\lambda\neq0$ where $1\leq i\leq N_1$ and $1\leq j\leq N_2$. If $l\geq j=0$, then (\ref{E-2}) becomes \begin{align}\label{QQQQQQ} \sum_{i=1}^{N_1}\sum_{\lambda=1}^{N_2} a_i \overline{b}_\lambda B_\lambda^{l} &=\sum_{i=1}^{N_1}\sum_{\lambda=1}^{N_2} a_i \overline{b}_\lambda B_\lambda ^l m! \frac{e^{\overline{A}_iB_\lambda}-q_m(\overline{A}_iB_\lambda)}{(\overline{A}_iB_\lambda)^m} \end{align} for all $l\geq0.$ By (\ref{QQQQQQ}), \begin{equation}\label{equation1} \sum_{i=1}^{N_1}\sum_{\lambda=1}^{N_2} a_i\overline{b}_\lambda (1-m!\frac{e^{\overline{A}_iB_\lambda}-q_m(\overline{A}_iB_\lambda)}{(\overline{A}_iB_\lambda)^m})B_\lambda^{l}=0, \quad l\geq0. \end{equation} Now assume $\{B_\lambda\}$ be a finite collection of distinct non-zero complex numbers. Let $$E_1=(c_{k,\lambda})_{1\leq k,\lambda\leq N_2}=\bigg( \sum_{i=1}^{N_1} a_i B_\lambda^k (1-m!\frac{e^{\overline{A}_iB_\lambda}-q_m(\overline{A}_iB_\lambda)}{(\overline{A}_iB_1\lambda)^m}\bigg)_{1\leq k,\lambda\leq N_2}$$ and $$X_1=\left( \begin{array}{c} b_1 \\ \vdots \\ b_{N_2} \\ \end{array} \right). $$ It follows from (\ref{equation1}) that $E_1X_1=0$. By the property of Vandermonde determinant, \begin{align*} 0&=|E_1|= \prod_{1\leq \iota< \kappa\leq N_2 }^{N_2}(B_\iota-B_\kappa) \prod_{\lambda=1}^{N_2}B_\lambda\bigg(\sum_{i=1}^{N_1} a_i (1-m!\frac{e^{\overline{A}_iB_\lambda}-q_m(\overline{A}_iB_\lambda)}{(\overline{A}_iB_\lambda)^m})\bigg) \\ &=\prod_{\lambda=1}^{N_2}\bigg(\sum_{i=1}^{N_1} a_i (1-m!\frac{e^{\overline{A}_iB_\lambda}-q_m(\overline{A}_iB_\lambda)}{(\overline{A}_iB_\lambda)^m})\bigg). \end{align*} This implies there is a $\kappa$ so that $$\sum_{i=1}^{N_1} a_i (1-m!\frac{e^{\overline{A}_iB_\kappa}-q_m(\overline{A}_iB_\kappa)}{(\overline{A}_iB_\kappa)^m}=0.$$ By the same way, we have $$\sum_{i=1}^{N_1} a_i (1-m!\frac{e^{\overline{A}_iB_\lambda}-q_m(\overline{A}_iB_\lambda)}{(\overline{A}_iB_\lambda)^m})=\sum_{i=1}^{N_1} a_i (1-K_m(B_\lambda,A_i))=0 $$ for all $1\leq \lambda \leq N_2.$ Since every $a_i$ is non-zero constant, then, by Lemma \ref{lemma1}, $$1-K_m(B_\lambda,A_i)=1-m!\frac{e^{\overline{A}_iB_\lambda}-q_m(\overline{A}_iB_\lambda)}{(\overline{A}_iB_\lambda)^m}=0$$ for all $1\leq \lambda \leq N_2.$ In this case, $B_\lambda$ will be the independent variable. In fact, if we set $j\geq l=0,$ then, by (\ref{QQQQ}), \begin{align*}\label{QQQQQ} \sum_{i=1}^{N_1}\sum_{\lambda=1}^{N_2} a_i\overline{b}_\lambda \overline{A}_i^{j} &= \sum_{i=1}^{N_1}\sum_{\lambda=1}^{N_2} a_i\overline{b}_\lambda \overline{A}_i^{j}m! \frac{e^{\overline{A}_iB_\lambda}-q_m(\overline{A}_iB_\lambda)}{(\overline{A}_iB_\lambda)^m} \end{align*} for all $j\geq0.$ Exchanging the roles of $A_i$ and $B_\lambda$, we see that $$1-m!\frac{e^{\overline{A}_iB_\lambda}-q_m(\overline{A}_iB_\lambda)}{(\overline{A}_iB_\lambda)^m}=0$$ for all $1\leq i \leq N_1.$ This shows that \begin{equation*} m! \frac{e^{\overline{A}_iB_\lambda}-q_m(\overline{A}_iB_\lambda)}{(\overline{A}_iB_\lambda)^m}=1, \quad 1\leq i \leq N_1, 1\leq\lambda \leq N_2. \end{equation*} Now we can prove this theorem by Lemma \ref{ex}.\\ \textbf{Step 2.} To prove that \begin{align*} \sum_{i=1}^{N_1}\sum_{\lambda=1}^{N_2}a_i\overline{b}_\lambda \overline{A}_i B_\lambda^{l-1}=0 \end{align*} for all $l\geq2$. Let us now assume $l\geq j=2.$ Using (\ref{E-2}), Lemma \ref{ex} and \ref{re1}, we have \begin{align*} 0&= \sum_{i=1}^{N_1}\sum_{\lambda=1}^{N_2} a_i \overline{b}_\lambda\frac{m(l-1)\overline{A}_i B_\lambda^{l-1}}{m+1} \end{align*} for all $l\geq2$. It follows that \begin{align}\label{ex1} \sum_{i=1}^{N_1}\sum_{\lambda=1}^{N_2}a_i\overline{b}_\lambda \overline{A}_i B_\lambda^{l-1}=0 \end{align} for all $l\geq2$. This completes Step 2.\\%This shows that Lemma \ref{ex} is true when $j=2$. \textbf{Step 3.} We claim $$\sum_{i=1}^{N_1}a_i\overline{A}_i^{l}=0\quad \text{or}\quad \sum_{\lambda=1}^{N_2} \overline{b}_\lambda B_{\lambda}^{l}=0$$ for all $l\geq1.$ To prove this claim, we assume $l\geq j=3$. By lemma \ref{ex} and (\ref{E-2}), $$0=\sum_{i=1}^{N_1}\sum_{\lambda=1}^{N_2}a_i\overline{b}_\lambda\bigg\{\eta_1\overline{A}_iB_{\lambda}^{l-2}+\eta_2\overline{A}_i^2B_{\lambda}^{l-1}+ \eta_3\overline{A}_i^3B_{\lambda}^{l} \bigg\}$$ where $\eta_k$ is the coefficient of $\overline{A}_i^kB_\lambda^{l+k-3}(1\leq k\leq3)$. Note that $\eta_k$ is independent of $i$ and $\lambda.$ By Lemma \ref{re1} and (\ref{ex1}), we have $$\sum_{i=1}^{N_1}\sum_{\lambda=1}^{N_2}a_i\overline{b}_\lambda\eta_1\overline{A}_iB_{\lambda}^{l-2}=0,\quad \eta_2\neq0,\quad \eta_3=0$$ for all $l\geq3.$ Then $$\sum_{i=1}^{N_1}\sum_{\lambda=1}^{N_2}a_i\overline{b}_\lambda \overline{A}_i^2 B_\lambda^{l-1}=0,\quad l\geq3.$$ By the iteration method, we get \begin{align*} \sum_{i=1}^{N_1}\sum_{\lambda=1}^{N_2}a_i\overline{b}_\lambda \overline{A}_i^{j-1}B_{\lambda}^{l-1}=0 \end{align*} for all $l\geq j\geq2.$ In particular, we have \begin{align*} \sum_{i=1}^{N_1}\sum_{\lambda=1}^{N_2}a_i\overline{b}_\lambda \overline{A}_i^{l}B_{\lambda}^{l}=0 \end{align*} for all $l\geq1.$ This shows that $$\sum_{i=1}^{N_1}a_i\overline{A}_i^{l}=0\quad \text{or}\quad \sum_{\lambda=1}^{N_2} \overline{b}_\lambda B_{\lambda}^{l}=0$$ for all $l\geq1.$ This completes Step 3.\\ \textbf{Step 4.} We now complete the proof of the theorem. For any $l\geq1,$ we do only the case $\sum_{i=1}^{N_1}a_i\overline{A}_i^{l}=0.$ If $\sum_{i=1}^{N_1}a_i\overline{A}_i^{l}=0$ for all $l\geq1$, then we have $D_1X_1=0$, where $$D_1=\left( \begin{array}{cccc} \overline{A}_1 & \cdots & \cdots & \overline{A}_{N_1} \\ \overline{A}_1^2 &\cdots & \cdots & \overline{A}_{N_1}^2 \\ \vdots & \vdots & \vdots & \vdots \\ \overline{A}_1^{N_1} & \cdots & \cdots & \overline{A}_{N_1}^{N_1}\\ \end{array} \right), \quad X_1=(a_1,a_2\cdots,a_{N_1})^T.$$ Note that if $N_1=1,$ then $a_1\overline{A}_1=0$. This contradiction shows that at least one of $a_1$ and $A_1$ is 0, then $f$ is a constant function since $f(z)=a_1K(z,A_1).$ Suppose $N_1\geq 2.$ Since $a_i\neq0$ for $1\leq i \leq N_1,$ then $|D_1|=0.$ In fact, $|D_1|$ is a Vandermond determinant with the first row removed, then $$\prod_{i=1}^{N_1}\overline{A}_i\prod_{1\leq \iota< \kappa \leq N_1}(\overline{A}_\kappa-\overline{A}_\iota)=0.$$ Since $A_i\neq0$ for $1\leq i \leq N_1,$ then there are $\kappa_1$ and $\kappa_2$ such that $A_{\kappa_1}=A_{\kappa_2}$ where $\kappa_1\neq\kappa_2$ and $1\leq\kappa_1,\kappa_2\leq N_1$. So we can rewrite $$f(z)=a_1 K(z,A_1)+\cdots+(a_{\kappa_1}+a_{\kappa_2})K(z,A_{\kappa_1})+\cdots+a_{N_1}K(z,A_{N_1}).$$ If $a_{\kappa_1}+a_{\kappa_2}=0,$ we will omit $K(z,A_{\kappa_1})$, so we may assume $a_{\kappa_1}+a_{\kappa_2}\neq0.$ Without loss of generality, assume $1<\kappa_1,\kappa_2\leq N_1$ and $a_{\kappa_1}+a_{\kappa_2}\neq0.$ By hypothesis, we can obtain $D_2X_2=0$, where $$D_2=\left( \begin{array}{ccccc} \overline{A}_1 & \cdots &A_{\kappa_1} & \cdots & \overline{A}_{N_1} \\ \overline{A}_1^2 & \cdots & A_{\kappa_1}^2 & \cdots & \overline{A}_{N_1}^2 \\ \vdots & \cdots & \vdots & \cdots & \cdots \\ \vdots & \cdots & \cdots & \cdots & \cdots \\ \overline{A}_1^{N_1-1} & \cdots & \overline{A}_{\kappa_1}^{N_1-1} & \cdots &\overline{A}_{N_1}^{N_1-1} \\ \end{array} \right) $$ and $$ X_2=(a_1,a_2\cdots,(a_{\kappa_1}+a_{\kappa_2}),\cdots,a_{N_1})^T.$$ Note that if $N_1=3,$ then $$\left\{ \begin{array}{ll} a_1 \overline{A}_1+(a_{\kappa_1}+a_{\kappa_2})\overline{A}_{\kappa_1}=0 \\ a_1 \overline{A}_1^2+(a_{\kappa_1}+a_{\kappa_2})\overline{A}_{\kappa_1}^2=0, \end{array} \right.$$ and hence we have $a_1=-(a_{\kappa_1}+a_{\kappa_2})$ and $A_1=A_{\kappa_1}=A_{\kappa_2}.$ Thus $f=0.$ We have used the fact $\{a_{\kappa_1},a_{\kappa_2}\}=\{a_2,a_3\}.$ Suppose $N_1 \geq 4.$ For the same reason, there are $\kappa_3$ and $\kappa_4$ such that $A_{\kappa_3}=A_{\kappa_4},$ where $\kappa_3\neq\kappa_4$ and $1\leq\kappa_3,\kappa_4\leq N_1.$ Finally, we conclude that \begin{align}\label{ex4} A_1=A_2=\cdots=A_{N_1} \end{align} if the sum of any $k(2\leq k\leq N_1-1)$ elements in $\{a_i:1\leq i\leq N_1\}$ is not equal to 0. By assumption, $\sum_{i=1}^{N_1}a_i=0$ for $N_1\geq2,$ this together with (\ref{ex4}) show that $f=0,$ since $f(z)=\sum_{i=1}^{N_1}a_i K(z,A_i).$ On the other hand, suppose that $T_\varphi T_{\overline{\psi}}= T_{\varphi\overline{\psi}}$, then $$T_{\varphi+c_1} T_{\overline{\psi}+c_2}= T_{(\varphi+c_1)(\overline{\psi}+c_2)},$$ where $c_1$ and $c_2$ are constants. This together with preceding proof show that $f$ or $g$ is a constant function if $T_fT_{\overline{g}} = T_{f\overline{g}}$. The proof is complete. \end{proof} \begin{remark}\label{RE1} The proof of Theorem \ref{zerop} shows that the hypothesis $ m\neq0$ is necessary. In other words, the (\ref{ex1}) doesn't hold if $m=0.$ Then the iteration method doesn't work, since we have lost the initial value. \end{remark} Now, we now proceed to answer the second question. \begin{theorem} Let $m$ be a positive integer. Suppose $a,b\in \mathbb{C},$ then $T_{e^{a z}} T_{\overline{e^{b z}}}=T_{e^{a z} \overline{e^{b z}}}$ on $F^{2,m}(\mathbb{C})$ if and only if $ab=0.$ \end{theorem} \begin{proof} If $ab=0,$ it is clear that $T_{e^{a z}} T_{\overline{e^{b z}}}=T_{e^{a z} \overline{e^{b z}}}$. Now assume $ab\neq0.$ then, by (\ref{QQQQ}), \begin{align*} & \sum_{k=\max \{0, j-l\}} \frac{(k+l+m) !}{k !(k+l-j) !} a^{k} \overline{b}^{k+l-j} \\ =& \sum_{k=\max \{0, j-l\}}^{j} \frac{(j+m) !}{k !(k+l-j) !} \frac{(l+m) !}{(j-k_i+m) !} a^{k} \overline{b}^{k+l-j} \end{align*} Let $0=l\leq j,$ we obtain \begin{align*} 0 =\sum_{k=1}^{\infty} \frac{a^{k} \bar{b}^{k}}{k !} \frac{(k+j+m) !}{(k+j) !}. \end{align*} Using the equation, we now define $$\rho(j)=\sum_{k=1}^{\infty} \frac{a^{k} \bar{b}^{k}}{k !}\prod_{i=1}^m(k+j+i)=0.$$ A simple calculation gives \begin{equation}\label{EQ1}\left\{ \begin{array}{ll} \rho(j)-\rho(j-1)=\sum_{k=1}^{\infty} \frac{ma^{k} \bar{b}^{k}}{k !}\prod_{i=2}^{m}(k+j-1+i)=0; \\ \rho(j+1)-\rho(j)=\sum_{k=1}^{\infty} \frac{ma^{k} \bar{b}^{k}}{k !}\prod_{i=2}^{m}(k+j+i)=0;\\ \rho(j+2)-\rho(j+1)=\sum_{k=1}^{\infty} \frac{ma^{k} \bar{b}^{k}}{k !}\prod_{i=2}^{m}(k+j+1+i)=0;\\ \rho(j+3)-\rho(j+2)=\sum_{k=1}^{\infty} \frac{ma^{k} \bar{b}^{k}}{k !}\prod_{i=2}^{m}(k+j+2+i)=0;\\ \vdots \end{array} \right.\end{equation} By (\ref{EQ1}), \begin{equation}\label{EQ5}\left\{ \begin{array}{ll} \frac{\rho(j+1)-2\rho(j)+\rho(j-1)}{m(m-1)}=\sum_{k=1}^{\infty} \frac{a^{k} \bar{b}^{k}}{k !}\prod_{i=3}^{m}(k+j-1+i)=0;\quad\natural\\ \frac{\rho(j+2)-2\rho(j+1)+\rho(j)}{m(m-1)}=\sum_{k=1}^{\infty} \frac{a^{k} \bar{b}^{k}}{k !}\prod_{i=3}^{m}(k+j+i)=0; \quad \sharp\\ \frac{\rho(j+3)-2\rho(j+2)+\rho(j+1)}{m(m-1)}=\sum_{k=1}^{\infty} \frac{a^{k} \bar{b}^{k}}{k !}\prod_{i=3}^{m}(k+j+1+i)=0; \quad \flat\\ \vdots \end{array} \right.\end{equation} It follows from (\ref{EQ5}) that \begin{equation}\label{EQ6} \left\{ \begin{array}{ll} \frac{\sharp- \natural}{m-2} =\sum_{k=1}^{\infty} \frac{a^{k} \bar{b}^{k}}{k !}\prod_{i=4}^{m}(k+j-1+i)=0;\\ \frac{\flat-\sharp}{m-2}=\sum_{k=1}^{\infty} \frac{a^{k} \bar{b}^{k}}{k !}\prod_{i=4}^{m}(k+j+i)=0;\\ \vdots \end{array} \right. \end{equation} Using (\ref{EQ1}), (\ref{EQ5}) and (\ref{EQ6}), we can obtain that \begin{equation}\label{EQ3}\left\{ \begin{array}{ll} \sum_{k=1}^{\infty} \frac{a^{k} \bar{b}^{k}}{k !}(k+m)=0, \\ \sum_{k=1}^{\infty} \frac{a^{k} \bar{b}^{k}}{k !}\prod_{i=m-1}^{m}(k+i)=0. \end{array} \right.\end{equation} It follows (\ref{EQ3}) that \begin{equation}\label{EQ4}\left\{ \begin{array}{ll} a\overline{b}e^{a\overline{b}}+m(e^{a\overline{b}}-1) =0, \\ (a\overline{b})^2e^{a\overline{b}}+2m a\overline{b}e^{a\overline{b}}+m(m-1)(e^{a\overline{b}}-1)=0. \end{array} \right.\end{equation} Using (\ref{EQ4}), we can see that \begin{equation}\label{EQ7}\left\{ \begin{array}{ll} a\overline{b}e^{a\overline{b}}+m(e^{a\overline{b}}-1) =0, \\ (a\overline{b})^2e^{a\overline{b}}+2m a\overline{b}e^{a\overline{b}}-(m-1)a\overline{b}e^{a\overline{b}}=0. \end{array} \right.\end{equation} By (\ref{EQ7}), \begin{equation*}\left\{ \begin{array}{ll} a\overline{b}=-(m+1), \\ e^{a\overline{b}}=-m. \end{array} \right.\end{equation*} Thus, \begin{equation*}\left\{ \begin{array}{ll} a\overline{b}=-(m+1), \\ e^{a\overline{b}}-a\overline{b}-1=0. \end{array} \right.\end{equation*} This contradiction implies that $ab=0$. This proof is complete. \end{proof} \section{Concluding Remarks} In this final section, we consider the possibility of extending the result to other symbol spaces. \begin{theorem}\label{T1} Suppose $f,g\in \mathcal{P}.$ Then $H^*_{\overline{f}}H_{\overline{g}}=0$ on $F^{2,m}(\mathbb{C})$ if and only if at least one of $f$ and $g$ is a constant function. \end{theorem} We omit the proof of Theorem \ref{T1} here, since it is a slight improvement of result contained in \cite{Yan}. Define $$\mathcal{A}=\left\{\sum_{i=1}^N p_i(z) K_m(z,a_i): p_i\in \mathcal{P} ~\text{and}~ a_j\in \mathbb{C}~ \text{for}~ i=1,\cdots, N\right\}.$$ It is easy to see that $$e^{\overline{a}z}=(\overline{a}z)^mK_{m}(z,a)+q_m(\overline{a}z).$$ This implies that $\mathcal{A}_1\subseteq \mathcal{A}.$ Note that $\mathcal{P}$ and $D$ are dense in $F^{2,m}(\mathbb{C})$. It would be an interesting problem to consider the semi-commutativity of the Toeplitz operators on $F^{2,m}(\mathbb{C})$. By what was proved in the previous paragraph, we give a conjecture: \begin{conjecture} Suppose $f$ and $g$ be functions in $\mathcal{A},$ then $H^*_{\overline{f}}H_{\overline{g}}=0$ on $F^{2,m}(\mathbb{C})$ if and only if at least one of $f$ and $g$ is a constant function. \end{conjecture}
\section{Introduction} \label{sec:introduction} Medical imaging consists of set of processes or techniques to create visual representations of the interior parts of the body such as organs or tissues for clinical purposes to monitor health, diagnose and treat diseases and injuries. Moreover, it also helps in creating database of anatomy and physiology. \\ The benefits of a medical imaging test rely on both image and interpretation quality, with the latter being mainly handled by the radiologist; however, interpretation is prone to errors and can be limited, since humans suffer from factors like fatigue and distractions. This is one reason patients sometimes have different interpretations from various doctors, which can make choosing a plan of action a stressful and tedious process.\\ \cite{bengio}\\ \textcolor{blue}{Many deep neural networks trained on natural images exhibit a curious phenomenon in common: on the first layer they learn features similar to Gabor filters and color blobs. Such first-layer features appear not to be specific to a particular dataset or task, but general in that they are applicable to many datasets and tasks. Features must eventually transition from general to specific by the last layer of the network, but this transition has not been studied extensively. In this paper we experimentally quantify the generality versus specificity of neurons in each layer of a deep convolutional neural network and report a few surprising results. Transferability is negatively affected by two distinct issues: (1) the specialization of higher layer neurons to their original task at the expense of performance on the target task, which was expected, and (2) optimization difficulties related to splitting networks between co-adapted neurons, which was not expected. In an example network trained on ImageNet, we demonstrate that either of these two issues may dominate, depending on whether features are transferred from the bottom, middle, or top of the network. We also document that the transferability of features decreases as the distance between the base task and target task increases, but that transferring features even from distant tasks can be better than using random features. A final surprising result is that initializing a network with transferred features from almost any number of layers can produce a boost to generalization that lingers even after fine-tuning to the target dataset. }\\ \cite{RUSBoost}\\ \textcolor{blue}{Class imbalance is a problem that is common to many application domains. When examples of one class in a training data set vastly outnumber examples of the other class(es), traditional data mining algorithms tend to create sub-optimal classification models. Several techniques have been used to alleviate the problem of class imbalance, including data sampling and boosting. In this paper, we present a new hybrid sampling/boosting algorithm, called RUSBoost, for learning from skewed training data. This algorithm provides a simpler and faster alternative to SMOTEBoost, which is another algorithm that combines boosting and data sampling. This paper evaluates the performances of RUSBoost and SMOTEBoost, as well as their individual components (random undersampling, synthetic minority oversampling technique, and AdaBoost). We conduct experiments using 15 data sets from various application domains, four base learners, and four evaluation metrics. RUSBoost and SMOTEBoost both outperform the other procedures, and RUSBoost performs comparably to (and often better than) SMOTEBoost while being a simpler and faster technique. Given these experimental results, we highly recommend RUSBoost as an attractive alternative for improving the classification performance of learners built using imbalanced data.} We investigate the performance of transfer learning algorithms in image classification problems imbalanced target dataset. Target class imbalance problem has been well studied in traditional machine learning but the same cannot be said for research in the area of computer vision and transfer learning. We use x-ray images of pneumonia patients to investigate the classification performance of transfer learning algorithms on imbalance datasets. We compare the effects of imbalanced datasets on the performances of several transfer learning models from various pre-trained models. The evaluation metrics include Area under the ROC curve $ (AUC)$, area under the precision-recall curve and balanced accuracy. Based on results from our experiments we conclude that $(i)$ the effect of class imbalance on transfer learning classification performance is detrimental; $(ii)$ the method of addressing class imbalance that emerged as dominant in almost all analyzed scenarios was oversampling; \cite{SMOTE}\\ \textcolor{blue}{An approach to the construction of classifiers from imbalanced datasets is described. A dataset is imbalanced if the classification categories are not approximately equally represented. Often real-world data sets are predominately composed of ``normal'' examples with only a small percentage of ``abnormal`` or ``interesting`` examples. It is also the case that the cost of misclassifying an abnormal (interesting) example as a normal example is often much higher than the cost of the reverse error. Under-sampling of the majority (normal) class has been proposed as a good means of increasing the sensitivity of a classifier to the minority class. This paper shows that a combination of our method of over-sampling the minority (abnormal) class and under-sampling the majority (normal) class can achieve better classifier performance (in ROC space) than only under-sampling the majority class. This paper also shows that a combination of our method of over-sampling the minority class and under-sampling the majority class can achieve better classifier performance (in ROC space) than varying the loss ratios in Ripper or class priors in Naive Bayes. Our method of over-sampling the minority class involves creating synthetic minority class examples. Experiments are performed using C4.5, Ripper and a Naive Bayes classifier. The method is evaluated using the area under the Receiver Operating Characteristic curve (AUC) and the ROC convex hull strategy.} \\ \section{Transfer Learning and Fine-tuning} \label{sec:transferlearningfinetuning} In many real-world situations there is often not enough data train on. Deep learning models are known to perform better on larger datasets. Deep learning models for image classification learn features from first layers, these features are not specific to a particular dataset or task \cite{bengio}.These learned features can be aplicable to many other task and datasets by modifying the last layer in the neural network of the specific task. This technique is known as transfer learning in that we train a base network on a base dataset then transfer the learned features to a second target network to be trained on a target dataset or task. The features computed by the last layer in the network must depend greatly on the chosen dataset or the task. It is specific to the dataset for example if the classification task is to predict five labels, the last layer would output five softmax units for one for each target class. When face with limited target datasets, transfer learning can be an effective approach to to training a large target network using features learned from a large base network. Transfer learning works if the features are general as opposed to been specific to the base task. The steps to transfer learning is to train a base network and then transfer its first $n$ layers to replace the first $n$ layers of a target network. The remaining layers of the target network are then randomly initialized and trained toward the target task. Transfer learning usually involves two approaches fine-tuning and freezen layers. The errors from the new task can be backprogated into the base features to fine-tune them to the new task. It is also common to freeze the transferred feature layers such that they do not change during training on the new task. \subsection{Cost-Sensitive Learning} The idea behind cost-sensitive learning is to impose a cost on the classifier if mis-classification takes place. Model assign mis-classification costs via cost matrix. The main drawback of this approach is that the cost of errors for different classes is not even in most imbalance problems and is usually unknown in most databases In cost-sensitive learning instead of each instance being either correctly or incorrectly classified, each class (or instance) is given a misclassification cost. Thus, instead of trying to optimize the accuracy, the problem is then to minimize the total mis-classification cost. Cost-sensitive multi-class classification is a problem related to multi-class classification, in which instead of there being one or more "correct" labels for each observation, there is an associated vector of costs for labeling each observation under each label, and the goal is to build a classifier that predicts the class with the minimum expected cost. In regular classification the aim is to minimize the misclassification rate and thus all types of misclassification errors are deemed equally severe. A more general setting is cost-sensitive classification where the costs caused by different kinds of errors are not assumed to be equal and the objective is to minimize the expected costs. Let the cost for predicting class k for a true label l be $c(k,l)$. The cost $c(k,l)$ can be organized as a $K \times K$ cost matrix ,where $K$ is the number of classes. The general assumption is that correct prediction cost is minimal. ie $c(y,y) \leq c(k,y)$ . for all $k=1,\cdot,K$. A further generalization of this scenario are example-dependent misclassification costs where each example $(x,y)$ is coupled with an individual cost vector of length $K$. Its $k-th$ component expresses the cost of assigning $x$ to class $k$. A real-world example is fraud detection where the costs do not only depend on the true and predicted status fraud/non-fraud, but also on the amount of money involved in each case. Naturally, the cost of predicting the true class label $y$ is assumed to be minimum. The true class labels are redundant information, as they can be easily inferred from the cost vectors. Moreover, given the cost vector, the expected costs do not depend on the true class label $y$. The classification problem is therefore completely defined by the feature values $x$ and the corresponding cost vectors. \subsection{Sampling based Approaches} Sampling techniques uses a data based approach to balance the distribution of the target label classes.Traditional ML algorithms are then applied on the dataset. Sampling techniques have the disadvantage of throwing away data in the case of under-sampling. Over-sampling creates artificial duplicates of the minority class. This may lead to over-fitting. \subsection{Pre-Trained Models for Transfer Learning} \section{Training from Scratch} \label{sec:trainingfromscratch} Convolution Neural Networks (CNN) are popular for various computer vision task such as image classification, object detection etc. They have shown remarkable performance for various computer vision and image processing task. Some of the popular CNN architectures include the classical LeNet-5, AlexNet and VGG-16. Some modern architectures include Inception,RexNet and DenseNet. The basic principle underlying CNN is convolution which down-sample the features to a matrix/vector of features. The resultant matrix or vector is later given to a layer of neurons which will further transform the vector to a single value vector. This single value will be later identified as the label. Arhitectures such \subsection{Neural Structured Learning} \label{subsec:neuralstructuredlearning} Neural Structured Learning combines supervised and semi-supervised learning algorithms in a way that adds learned structured signals to the feature inputs of a neural network. The neural network here uses both labeled for supervised learning and unlabeled data to learn similar hidden representations for neighboring nodes on a graph by biasing the network. This is done in the same way as label propagation. Semi-supervised machine which use unlabeled learning can improve performance compared to supervised machine learning that use only labeled data.\cite{neuralgraph}. Semi-Supervised learning is important in cases where there is no labeled data or its very costly to label data.Some fields where unlabeled data is abundantly available include computer vision, natural language processing and social networks analysis. Graph based techniques such as label propagation are versatile and can construct a smooth graph on labeled and unlabeled data.Graphs can in a natural way use nodes to describe the relationships between similar embeddings, images and connections between entities on the web or social networks.The discriminative objective function typical of supervised learning neural networks is augmented with a graph in neural structured graphs.Graph-augmented neural network training can work for a wide range of neural networks, such as feed-forward, convolutional and recurrent networks.\cite{neuralgraph} \section{Methods of Addressing Class Imbalance} \label{sec:methodsofaddressingclassimbalance} Some of the most commonly used methods used with deep learning to handle CNN training on a dataset with class imbalance include the following: \begin{enumerate} \item Random minority oversampling \item Random majority undersampling \item Two-phase training with pre-training on randomly oversampled dataset \item Two-phase training with pre-training on randomly undersampled dataset \item Thresholding with prior class probabilities \item Oversampling with thresholding \item Undersampling with thresholding \item Generative Adversarial Network (GAN) \item Data Augmentation methods such as generative transformations, geometric transformations,Photometric morphologies and transformations and domain knowledge transformations can be used to increase the size of the training data, reduce imbalance and improve model performance. \end{enumerate} \section{Evaluation Metrics} \label{sec:evaluationmetrics} The most widely used metric for evaluation image classification task is the accuracy metric which is the number of target labels correctly predicted. The accuracy metric is however not suitable metric when there is target class imbalance because accuracy is biased towards the majority target class label, this could lead to making misleading conclusions on the model performance. for example a dataset with $99\%$ of the target label been from one class will have accuracy of $99\%$ if all examples were naively classified as been from the majority class.The area under the receiver operating characteristic curve which is a plot of sensitivity(true positive rate ) vs false positive rate (1-specitivity) for many prediction thresholds. \begin{itemize} \item Multi-class ROC-AUC \item accuracy \end{itemize} \section{Introduction} The state of Natural Language Processing (NLP) has been undergoing a revolution. Due to the vast increase in the availability of digitised text data, computers are increasingly needed to keep track of signals online, on social media, on the Internet of Things (IoT) and/or in conversations with customers, partners and other stakeholders. The amount of data available is significantly beyond what human analysts can reasonably digest manually. This touches every conceivable application area — from medical diagnosis and financial system interfaces to translation systems and cybersecurity. Specifically, NLP has made dramatic strides in allowing engineers to reuse NLP knowledge acquired at major laboratories and institutions — such as Google, Facebook or Microsoft — and adapting it to the engineer’s problem very quickly on a laptop or even smartphone. This is loosely called \textit{transfer learning} \citep{rosenstein2005transfer} by the machine learning community. Unfortunately, the state of NLP on Ghanaian languages has not kept up with these developments. To date, there is no reliable machine translation system for any Ghanaian languages. This makes it harder for the global Ghanaian diaspora to learn their own languages, something many want to do. It risks their language and culture not being preserved in an increasingly digitised future. It also means that service providers and health workers trying to reach remote areas hit by emergencies, disasters, etc. face needless additional obstacles to providing life-saving care. To begin closing this gap, in this paper we present a parallel machine translation training corpus for English and Akuapem Twi of 25,421 sentence pairs. We used a transformer-based translator to generate initial translations in Akuapem Twi, which were later verified and corrected where necessary by native speakers. The typical use case for the dataset is for further training of machine translation models or the fine-tuning of an unsupervised embedding for the Akuapem Twi dialect of Akan. Moreover, the data set can also be used for other downstream NLP tasks, such as named entity recognition and part-of-speech tagging, with appropriate additional annotations. Furthermore, we present 697 crowd-sourced parallel sentences from native speakers of Twi across the country, collected via Google Forms. This dataset is recommended as a testing dataset for machine translation of English to Twi and Twi to English models. We fine-tune our transformer translation model on the training corpus and report benchmarks on the crowd-sourced test set. \section{Related Work} \subsection{Machine Translation} Machine translation (MT) converts sentences from a source language to a targeted language using computer systems, with or without human aid \citep{Hutchins1992AnIT}. Historically, MT spans from the 1949 work of Warren Weaver through recent developments like automatic translation from Google \citep{Chragui2012TheoreticalOO}. In this study, we built on the OPUS-MT English to Twi model \citep{TiedemannThottingal:EAMT2020}. OPUS-MT models are based on state-of-the art transformer-based neural machine translation. The neural network architecture for these models is based on a standard transformer setup with 6 self-attentive layers in both the encoder and decoder network, and 8 attention heads in each layer \citep{vaswani2017attention}. For many low-resource languages, these models can be a good starting point for building useful models. In this work, we use the English to Twi OPUS-MT model to generate preliminary translations that are corrected by native speakers. While this approach has some risks -- such as \textit{translationese} or overly literal translations making it into the dataset -- it reduced the cost of generating the data by a factor of approximately 50 percent. This made the project feasible to execute, given the resources and budget available. The resulting data is used to fine-tune the model for better performance. \subsection{Description of Akuapem Twi} Ghana is a multilingual country with at least 75 local languages. Of these, the Twi language of the Akan people is the most widely spoken. It is spoken as a native language in parts of southern and central Ghana, as well as some areas of Cote d’Ivoire. By some estimates it has approximately 20 million native speakers \citep{Ethniclinguisticgroups}. Akan comprises at least four distinct dialects, namely Asante Twi, Akuapem Twi, Fante and Bono. Knowing the Akan language alone allows you to navigate your way through most parts of Ghana. You are likely to find someone who at the very least understands the language in almost every part of the country. The description of Akuapem Twi focuses on the syntax and the phonology of the language. This description is important in text translation because of loan words. The phonological analysis discusses the phonological processes involved in the adaptation of lexical borrowing from English to Akan and how the adaptation provides values that are closer to a native speaker’s perception and intuition. Akuapem Twi is an Akan dialect from the Niger-Congo Potou-Tano family cluster. It was the first Ghanaian language to achieve literary status with its transcription of the Bible. Spoken by the Akuapem ethnic subgrouping in the Eastern Region of Ghana and some parts of Cote d’Ivoire, the number of speakers native to the language is approximated to be 629,000 \citep{ethnologue}. It shares mutual intelligibility with other Akan dialects, specifically Fante and Asante Twi. Akuapem Twi is a tonal language with high, mid, and low tones which have contrastive semantic interpretations. It operates a 10 vowel system with feature specifications in oral, nasal, and ±ATR vowel harmony systems. The Akuapem vowel chart is shown in Figure \ref{fig:vchart}. \begin{figure} \centering \includegraphics[width=8cm,height=3cm]{avc.png} \caption{Akuapem Vowel Chart} \label{fig:vchart} \end{figure} The different types of vowels are: \begin{itemize} \item Oral vowels: /a, æ, i, \textsci, e, \textepsilon, o, \textupsilon, \textopeno, u/ \item Nasalised vowels : / \~i, ĩ, ã, \textscu, ũ / \item ±ATR Vowel Harmony \end{itemize} The Advanced Tongue Root (ATR) is a regressive assimilation vowel harmony process in Akan \citep{Sefa}. In –ATR, the position of the tongue is pushed back whereas in the +ATR the tongue is pushed forward. \citep{Dolphyne} distinguishes the two groups as follows: \begin{itemize} \item Advanced Tongue Root /i, e, æ, o, u/ \item Unadvanced Tongue Root /\textsci, \textepsilon, a, \textopeno, \textupsilon / \end{itemize} The +ATR and –ATR vowel harmony groups have a complementary distribution. The language forbids co-occurrence of the two sets within a word with more than a syllable \citep{APENTENGAMFO}. The consonant inventory consists of the following: \begin{itemize} \item /b, d, f, g, h, k, m, n, \textipa{\ng}, p, r, s, t/ \item Glides : / w, j/ \item Affricates : [ \texttctclig, \textdzlig,\textctc,\textltailn, \textipa{\ng}, w, h\textsuperscript{w}, k\textsuperscript{w}] \end{itemize} The language is characterised by extensive palatalisation. In the phonological phonotactics, when a front vowel follows the velar consonants /g, k/ or the glottal fricative /h/, a palatalised derivative is produced in the Surface Form. \begin{itemize} \item /h, g, k/ $\rightarrow$ [\textctc,\textdzlig,\texttctclig]/ $\_$(+Front,-Low) \end{itemize} However there are exceptions to the rule where palatalisation does not occur in the set environment. \begin{itemize} \item /h, k, g/ $\rightarrow$ [h, k, g]/$\_$(+Front,-Low) \end{itemize} Possible reasons for the exceptions and the alveo-palatals both existing in the language have been attributed to amphichronic phonology and the present derivation admittedly being the product of the diachronic changes \citep{Adomako}. This theory is proven in monolingual Akan speakers who forgo the palatalised phonemes in favour of the non-palatalised ones. On syllabic directionality, Akuapem Twi operates to a large extent, a no coda syllable structure, and bans consonant clusters. The coda constraints in this directionality are sonorants/syllabic consonants which include nasals and glides (m, n, ng, w). The syllabic consonants on their own constitute voiced syllables word final. Ergo, Akuapem Twi does not have a closed syllable structure. The syllable structures available in the language are: \begin{itemize} \item V - \hspace{2mm}\textbf{a} \item CV - a.\textbf{ba} {seed} \item CV.N - a.\textbf{ba.n} {government} \end{itemize} Just as the syllabic consonant is a syllable on its own, vowels in a sequence constitute syllables on their own and they carry tone as well \citep{Adomako,Dolphyne}. Though the language does not permit consonant clusters in its directionality, there appears to be an enduring violation to this constraint, the CCV, represented specifically as the CrV, (a type of syllable consisting of a consonant, the letter "r", and a vowel). Marfo and Yankson \citep{MarfoYankson} argue that the CCV, represented in Akan as the CrV, is the Surface Form (SF) of the Underlying Representation (UR) CV.rV, attributing it to a derivation that ‘has resulted from a phonological process that ends in a syllable reduction and a subsequent fusion of this reduced syllable into another’ \citep{Marfo}. Phonological processes like epenthesis, deletion and syllable structure modification are used to nativise foreign words that are borrowed into the native language. In that regard, forms that exist in the source language do not necessarily have to undergo a lot of phonological processes to be adapted into the native language, case in point the CrV structure. See Table \ref{table:Loanwords1} for illustration. \begin{table} [t] \centering \begin{tabular}{ |c | c | c | } \hline word & source language & native language \\ \hline driver & dra\textsci v\textschwa & dr\textopeno ba \\ \hline \end{tabular} \caption {Loanword adaptation for CrV syllable structure.} \label {table:Loanwords1} \end{table} English operates both a closed and open syllable structure. When a word with a closed syllable structure is borrowed from English, the nativisation process would request that the word be phonologized as open in Akuapem Twi by way of an epenthetic vowel (insertion of a vowel). See Table \ref{table:Loanwords2} for an example. \begin{table} [t] \centering \begin{tabular}{ |c | c | c | } \hline word & source language & native language \\ \hline traffic & traf\textsci k & traf\textsci k\textbf{\textsci} \\ \hline \end{tabular} \caption {Loanword adaptation for vowel insertion.} \label {table:Loanwords2} \end{table} On the other hand, sounds in the source language that are not attested in the native language are replaced with an approximation of the sound in the native language. The syntax of Akuapem Twi has a taxonomy of lexemes in both functional and lexical categories. Major lexical categories are nouns, verbs and adjectives. Nouns can be subjects or objects of a predicate. They can also take on adjuncts such as adjectives and determiners and be morphologically inflected with phi-features – gender, number. Verbs indicate tense, aspect and negation with morphophonological inflections and are always placed between the subject and the object except when they are in the imperative. Usually, the root of the verb form which is the simple present tense is inflected with a set of functional affixes to indicate different tenses. An illustration is presented in Table \ref{table:Tense}. \begin{table} [t] \centering \begin{tabular}{ |c | c | c | c |} \hline di & eat & SIMPLE PRESENT \\ \hline re-di & is eating & PROGRESSIVE \\ \hline be-di & will eat & FUTURE \\ \hline a-di & has eaten & PRESENT PERFECT \\ \hline di-i & ate & PAST \\ \hline \end{tabular} \caption {Akuapem Twi Indicating Tense} \label {table:Tense} \end{table} Both the nominal subjects and objects can have adjuncts such as adjectives and determiners together to form a constituency. The determiners mostly follow the noun as well but can precede it in a few instances. The word order of Akuapem Twi is the nuclear predication, SVO – Subject Verb Object. For example: [[Papa no] (S)\hspace{2mm} [nnoaa] (V) \hspace{3mm}[hwee] (O) \hspace{6mm}bio] \hspace{2mm}\textit{Man the\hspace{6mm} has not cooked anything \hspace{6mm}again.} \textbf{The man has not cooked anything again} Questions in the language are raised in two ways: tone and the interrogative marker `so'. In tone, a declarative sentence can become a question by raising the tone at the end of the sentence. This is illustrated as follows. \begin{enumerate} \item Papa no nnoaa hwee bio? \item So papa no nnoaa hwee bio? \end{enumerate} \section{Parallel Corpora} Parallel corpora or translation corpora involve texts and their translations. Source and target texts may be aligned at word, sentence or paragraph level\citep{zanettin2014translation}. According to Li \citep{doval2019parallel}, the first parallel corpora was the Canadian Hansard Corpus which consisted of Canadian parliamentary proceedings published in English and French. Other parallel corpora mostly available online are Multilingwis, EPTIC ( European Parliament Translation and Interpreting Corpus), Cluvi and Intercorp. These resources contain authentic examples of previously translated texts unlike online automatic aids like Google Translate, Bab.la, Babelfish and Systran. Much like these parallel corpora, the unidirectional English- Akuapem Twi parallel corpus for this study may serve as resource for research in many domains including Natural Language Processsing (NLP), computational linguistics and lexicography. Furthermore, since corpora are usually open-ended, the unidirectional English- Akuapem Twi corpus may be enlarged and uploaded online to develop general language tools and computer- assisted translation tools such as electronic dictionaries, spell- checker programmes, translation memories (TMs), concordances and terminology banks \citep{genette2016reliable}. As more tools are developed, more authentic translations can be done to overcome the challenge of scarcity of electronic texts in a low resource dialect of Akan like Akuapem as well as other Ghanaian languages and to speed up the evolution of Akan from simple online existence to optimal online presence. \subsection{Existing Datasets in Akan} The amount of multilingual text available for Twi is not as extensive as it should be, and this section seeks to explore the current state of such data. For languages with greater resources, there is a significant amount of text available online for the use of NLP, with some of the best sources being Wikipedia and the Bible. For lesser-resourced languages, the Bible is the most available resource \citep{Resnik}. It is essential to consider that many of these resources typically have a non-native and religious bias, resulting in low translation quality and noisy datasets. Recently, \citet{YorubaandTwipaper} explored the major existing Twi datasets -- Bible translation pairs (labeled as clean), Jehovah’s Witness data, Wikipedia data, and the JW300 Twi corpus \citep{agic2020jw300}. The latter 3 are assessed and labeled as noisy due to dialectal inconsistencies. These inconsistencies make it crucial to create cleaner data. The JW300 Twi corpus and Jehovah’s Witness datasets are significant in size, together providing over 1.5 million word tokens. However, it is important to be aware of the religious influences of this data and the errors it contains, making this corpus noisy for NLP tasks. The JW300 dataset presents the corpus in an incredibly convenient way, available as parallel translation sentence pairs of English to Akuapem Twi, though there is a slight mixing of the Akuapem and Asante dialects within this data, contributing to the noise. \citet{YorubaandTwipaper} further explored the ways that NMT tasks can be supported within a small dataset of just clean data. Utilizing the clean data provides a higher accuracy assessment from native speakers, but as the dataset grows, the use of noisy data becomes necessary and leads to greater errors. Another religiously biased dataset is the Bible, explored for NLP purposes by \citet{YorubaandTwipaper} and \citet{BibleCorp}. This dataset contains 600,000 tokens and is the cleanest dataset currently available in Twi. This Bible data is also presented as a parallel English to Asante Twi corpus. This parallel corpus was additionally used by \citet{BibleCorp} to conduct neural machine translation with state-of-the-art MT architectures. Within the research conducted by \citet{BibleCorp}, the Twi corpora contained a single version, whereas the English consisted of four different versions: King James Version, Good News Bible, Easy to Read Version, and New International Version. The TypeCraft (TC) Akan Corpus was created to improve the development of online lexicographical data for lesser resourced languages \citep{TCAkan}. The TC-Akan Corpus contains 261 pieces of text, with 98,000 tokens. These words were annotated for part-of-speech and glossed for the TC-Akan Corpus, leading to 1,367 words within this dictionary. This project was spurred by the existence of two physical Twi dictionaries, which are fairly comprehensive, but are not in a format that is supported online. Another important feature of the TC-Akan corpus is its refinement of current online dictionaries, available from the Ghana Institute of Linguistics Literacy and Bible Translation (GILLBT). The compilation of words from these dictionaries had to be refined for dialectal and spelling accuracy, coupled with the removal English loan words to ensure a clean corpus. Considering the synthesis of all of this data and the growing need for neural MT in Twi, creating data that is clean and widely available is necessary. \section{Methodology} In this section we describe the methodology for generating our parallel corpus. \subsection{Source English Sentence Data} The corpus of English sentences used as the source text was curated from tatoeba.org \citep{Tatoeba.org} -- this data is licensed under the Creative Commons - Attribution 2.0 France license (terms of use on page). The sentences originally appeared as part of a bilingual corpus for English and German. A total of 50,000 English sentences were randomly sampled from the above dataset and used for our project. \subsection{Crowd-sourced Parallel Data} The crowd-sourced data was obtained from voluntary responses of people through a Google Form survey over a period of 2 months. A set of English sentences were randomly selected from the source English sentence data for volunteers to respond by providing the correct Twi translations. The responses were manually verified and corrected by in-house native speakers and linguists. This often involved correcting wrongly used special characters. However, it is important to mention that these crowd-sourced parallel data were not scored during the verification phase as compared to our machine generated preliminary translations. \begin{table*} [t] \centering \begin{tabular}{ |c || c | c | c |} \hline \multicolumn{4}{|c|}{Human Verified Corpus} \\ [1ex] \hline & sentence count & word count & unique word count \\ \hline English & 25,421 & 163,861 & 13,058 \\ \hline Akuapem Twi & 25,421 & 170,908 & 12,314 \\ \hline \multicolumn{4}{|c|}{Crowd-sourced Data Corpus} \\ [1ex] \hline & sentence count & word count & unique word count\\ \hline English & 697 & 3,525 & 1,225 \\ \hline Akuapem Twi & 697 & 6,702 & 2,541 \\ \hline \end{tabular} \caption {Dataset Statistics} \label {table:Metadata} \end{table*} \subsection{Distribution of sentences to researchers} As part of the process of generating 50,000 English to Akuapem Twi sentence pairs, we used the transformers library by Hugging Face \citep{Huggingface} to load the aforementioned OPUS-MT pretrained model from the Language Technology Research Group at the University of Helsinki \citep{TiedemannThottingal:EAMT2020}. We first tuned some hyperparameters of the model in order to improve the preliminary translations. We found the temperature and beam search settings to be the most important. Specifically, we used a temperature setting of 1.0, with 4 beams and early stopping enabled for beam search. Ten (10) researchers from NLP Ghana had earlier been nominated, based on their knowledge and fluency of the Akuapem Twi language, to work as members of the team for scoring, verification and correction of the preliminary translations. As we had initially aimed to translate 50,000 sentences, 10 researchers were provided with 5,000 sentence pairs each for revision. As a form of motivation or compensation for their work, every researcher was offered \$1 for 50 scoring, verification and corrections. The 5,000 sentence pairs were saved in a google sheet and distributed to each researcher. \subsection{Verification and Correction of Preliminary Translations} The typical process of verification of translations involved a researcher who is also a native speaker of the local language. In other words, researchers reviewed the preliminary translations generated by the translator. Based on the accuracy of the translation as determined by the researchers who were human translators, these preliminary translations were either maintained or revised. \subsection{Final Dataset} At the initial stages of the translation process, we learned that the professional linguist market rate is significantly higher at ~1\$ per 1 translation on average. Perhaps unsurprisingly, we were unable to hit 100\% of our target, but achieved a decent 50+\% completion within the agreed timeline of two months, as presented next. \subsubsection{Statistics of Human-verified Corpus} Overall, due to monetary and time constraints approximately 25,000 of English to Akuapem Twi sentence pairs were scored, verified and corrected where necessary by 10 native speakers. Final statistics of the dataset are described in Table \ref{table:Metadata}. \subsection{Evaluation} The crowd-sourced data corpus was already translated by native speakers hence was already verified. The main evaluation for the dataset was therefore on the 25,000 English to Akuapem Twi sentence pairs. Ten (10) native Twi speakers were employed to verify the preliminary translations from the model. This is similar to the use of humans for verification employed by \citep{chen2018emotionlines} in verifying the emotions associated with a particular text. Instead of five people checking a single sentence as used in \citep{chen2018emotionlines}, one person was employed to check on the quality and clarity of a specific translated sentence. They would then score it on a scale of 1 to 10, with 10 being a perfect translation. A scoring threshold of eight (8) was established, below which the translated sentence was edited to make more sense, and above which it was left as-is. At a score of 8, another person double-checked the quality of the translated text to see if it needed editing. \section{Translator Fine-Tuning} After the human-verified data was prepared, it was used to fine-tune the aforementioned OPUS-MT transformer model further. The weights of the transformer architecture, implemented with the transformers Python library by Hugging Face (with PyTorch backend), were initialized to the Helsinki OPUS-MT model. All the model layers were then fine-tuned using the Adam optimizer \citep{kingma2014adam} for 20 epochs. This was done on a single Azure Cloud GPU-enabled NC6 Virtual Machine, with a batch size of 8. This took 2 hours and 20 minutes to execute, achieving a loss value of about 0.12. The well-known Bilingual Evaluation Understudy (BLEU) \citep{papineni2002bleu} score for measuring the quality of text which has been translated from our algorithms is the metric used to measure the quality of the translations. In BLEU, there is a “reference” -- a human translated version of a sentence, as well as a “candidate” -- translation generated by the algorithm. The “candidate” is compared with the “reference” and the BLEU score, which is a modified precision measure, is generated \citep{papineni2002bleu}. While human evaluation of machine translations is expensive, BLUE is fast, less expensive and language-independent. Moreover, it has a high correlation with evaluations from humans \citep{papineni2002bleu} though the degree of high correlation differs by language-pairs as seen with submissions on the WMT metrics shared task \citep{WMT}. On our evaluation of the model, BLEU scores on the “candidate” sentences (translated sentences from the fine-tuned model - from English to Akuapem Twi) are generated using the \textit{corpus-bleu} function in the Python \textit{nltk bleu-score} module. The test data used is the crowd-sourced data of 697 English sentences and 697 Akuapem Twi “references”. The highest BLEU score achieved was 0.720 using the following parameters: \textit{smoothing function} value of \textit{7}, with \textit{auto-reweigh} of \textit{True} and \textit{weight} tuple values of \textit{(0.58,0,0,0)}, indicating the focus is on “adequacy” instead of “fluency” in the translations \citep{papineni2002bleu}. In comparison, the OPUS-MT model before fine-tuning scored 0.694 using the same parameters indicating the fine-tuned model made a noticeable improvement of 3.75\% over the OPUS-Model. Subjectively, the fine-tuned model was reported as a smoother experience by testers, who found it to yield egregiously wrong translations less frequently. \section{Result and Discussion} We found translations of the crowd-sourced and verified data to be largely accurate and acceptable. Many of the sentences in the source text are simple and express universal concepts which are rendered very close in the target language, while taking into consideration the target culture and conventions. Akuapem Twi is very close to Asante Twi, and many of the translations are correct in both dialects of Akan. A number of translation strategies were used depending on the translation difficulty encountered. These strategies include loaning (borrowing), equivalence, cultural substitution, translation by a more general word among others. For example, words like \textit{Paris, Boston, Australia} and \textit{camera} were borrowed completely from the source language. Nonetheless, others like \textit{coffee, computer} and \textit{gas} were borrowed and adapted in terms of orthography and phonology -- as \textit{k\textopeno fe}, \textit{k\textopeno mputa} and \textit{gaas} respectively. There is also an attempt to provide several translations of the same source item in different contexts. This is useful for words like \textit{welcome} which may mean \textit{akwaaba} or \textit{ndaase nni h\textopeno} depending on the context. However, a closer look at the translations reveals the need for further improvement to the presented corpus. The difficult and time-consuming process of compiling corpora especially in African languages like Akan -- which is yet to emerge from simple online existence to optimal online presence -- may account for a number of errors in the crowd-sourced translations. In this regard, since one of the aims of the parallel corpus is to facilitate further training of machine translation models in Akuapem Twi, and considering that corpora are usually open-ended, the translations must be revised further and updated as well to enlarge and improve the quality. For example, we recently identified what appears to be a mistranslation in entry 86 of the human-verified data, where \textit{turn on the gas} is rendered as \textit{fa w’ani si gaas no so} -- \textit{keep an eye on the gas}. A more appropriate translation might be \textit{s\textopeno} \textit{gaas no}. There is also the need to pay attention to, for example, cultural sensitivity by providing alternative translations to taboo words in Akuapem Twi and Akan in general to enrich the corpus. It is noteworthy that natives often prefer euphemistic terms, and these may even be found in texts within specialised fields like Medicine. The human translator might need to consider this, together with other aspects of culture for the target audience, when improving the corpus in the future. Additionally, machine translations generated by the fine-tuned transformer model are mostly grammatically correct, but sometimes not idiomatic. Human touch or post-editing remains crucial to ensure higher accuracy and quality. Other examples underlining the need for the human touch after machine translation are presented in Table \ref{table:HumanTouch}. \begin{table*} [t] \centering \begin{tabular}{ |c | c | c | c |} \hline SOURCE TEXT & OPUS MT TRANSLATION & CORRECTION \\ \hline I've gotten better & M'ani agye yiye & Meho at\textopeno me \\ \hline How did it go last night? & \scalebox{1.4}{\textepsilon}y\textepsilon \textepsilon \hspace{0.3mm} d\textepsilon n na ade kyee & Nn\textepsilon ra anadwo \textepsilon kosii s\textepsilon n?\\ \hline \end{tabular} \caption {Human Touch After Machine Translation} \label {table:HumanTouch} \end{table*} In the two examples above, the OPUS MT Translation of both conform to punctuation rules syntax of Akan that has a subject-verb- object (SVO) structure. However, both translations are misleading in terms of meaning and require revision by a human translator as indicated in the correction/OPUS MT Translation after Fine-tuning column. Finally, from our previous experiences we hope to offer our human translators compensations commensurate with the tasks we give them in the future. This will ensure that they score, verify and correct machine generated translations with minimal errors. \section{Conclusion} In this paper, we have presented a bilingual machine translation training corpus of 25,421 sentence pairs for English and Akuapem Twi. We used a transformer-based translator to generate initial translations into Akuapem Twi, which were later verified and revised where necessary by native speakers. The main idea of a typical use case for the dataset is for further training of machine translation models in Akuapem Twi. The data can also be used for other downstream NLP tasks such as named entity recognition and part-of-speech tagging, with appropriate additional annotations. Another potential application is fine-tuning an unsupervised embedding for the Akuapem Twi dialect of the Akan language. In addition, about 697 crowd-sourced sentences of a higher quality are provided for use as an evaluation set for the tasks highlighted above. It is recommended as a testing dataset for English to Twi and Twi to English machine translation models. In order to contribute towards the growth of the African NLP community, especially in the area of research and development, the dataset is \href{https://zenodo.org/record/4432117#.YF5rndKSk2y}{publicly available}. \section*{Acknowledgments} We are grateful to Microsoft for Startups Social Impact Program -- for supporting this research effort via providing GPU compute through Algorine Research. We would also like to thank Julia Kreutzer and Jade Abbot for their constructive feedback. This project was also supported by the \href{https://www.k4all.org/project/language-dataset-fellowship/}{AI4D language dataset fellowship} through K4All and Zindi Africa. We would also like to thank the \href{https://gajreport.com}{Ghanaian American Journal} for their work in sharing our work and mission with the Ghanaian public.
\section{Introduction}\label{sec0} \IEEEPARstart{I}{n} large-scale distributed storage systems, node failures occasionally happen. A self-sustaining system should be able to recover the data stored in failed nodes by downloading data from surviving nodes. An important metric of repair efficiency is the repair bandwidth, i.e., the total amount of data transmitted during the repair process. Regenerating codes are a kind of erasure codes used in distributed storage systems that can optimize the repair bandwidth for given storage overhead \cite{Dimakis2011}. Particularly, the ones with the minimum storage, i.e., MSR codes, are appealing in practice in spite of their intricate constructions \cite{Kumar2011,Sasidharan2015,Rawat2016,Ye2016}. The main reason that MSR codes can achieve the optimal repair bandwidth is dividing the data stored in each node into sub-packets of which only a fraction is downloaded from each helper node for repair. The number of sub-packets stored in each node is termed the {\it sub-packetization}. It has been proved that exponential sub-packetization is necessary for MSR codes \cite{SubPBoundSTOC19}. Since the sub-packetization level is closely related to the implementation complexity of the underlying codes, reducing the sub-packetization is significant in practice. Another metric of repair efficiency is the volume of accessed data at the helper nodes which characterizes the disk I/O cost. MSR codes with both the optimal-access property and near optimal sub-packetization were built in \cite{Ye2016sub-}. The MSR code applies to a homogeneous distributed storage model where all nodes as well as communication between them are treated indifferently. However, modern data centers often have hierarchical topologies by organizing nodes in racks, where the cross-rack communication cost is much more expensive than the intra-rack communication cost. This motivates a number of studies that address the repair problem for hierarchical data centers. In this work, we focus on the rack-aware storage model defined as follows. \begin{table*}[htbp] \renewcommand\arraystretch{1.75} \begin{center} \begin{tabular}{|c|c|c|c|c|} \hline & sub-packetization $\alpha$& access per rack & $\bar{d}$ &field size $|F|$ \\ \hline Z. Chen et al. \cite{Chen}& $\bar{s}^{\bar{n}} $& $u\cdot\bar{s}^{\bar{n}-1}$& $\bar{k}\leq\bar{d}\leq\bar{n}-1$ &$n|(|F|-1)$ and $|F|\geq n+\bar{s}-1$\\ \hline H. Hou et al. \cite{Hou2020}& $\bar{s}^{\lceil\bar{n}/\bar{s}\rceil}$ & $\bar{s}^{\lceil\bar{n}/{\bar{s}}\rceil-1}+(u-1)\cdot\bar{s}^{\lceil\bar{n}/{\bar{s}}\rceil}$& $\bar{d}=\bar{n}-1$ & $|F|>k\alpha\sum_{i=1}^{\min\{k,\bar{n}\}}\binom{n-\bar{n}}{k-i}\binom{\bar{n}}{i}$\\ \hline This paper & $\bar{s}^{\lceil\frac{\bar{n}}{u-u_{0}}\rceil}$&$u\cdot\bar{s}^{\lceil\frac{\bar{n}}{u-u_{0}}\rceil-1}$ & $\bar{k}\leq\bar{d}\leq\bar{n}-1$ & $ u|(|F|\!-\!1)$ and $|F|\!>\!n$ \\ \hline \end{tabular} \end{center} \caption{\scriptsize Comparisons with existing constructions of $(n=\bar{n}u,k=\bar{k}u+u_{0})$ MSRR codes where $\bar{s}=\bar{d}-\bar{k}+1$.}\label{t0} \end{table*} Suppose $n=\bar{n}u$ and the $n$ nodes are organized in $\bar{n}$ racks each containing $u$ nodes. A data file consisting of $B$ symbols is stored across the $n$ nodes each storing $\alpha$ symbols such that any $k=\bar{k}u+u_{0}$ ($0\!\leq\! u_{0}\! < \!u$) nodes can retrieve the data file. To rule out the trivial case, we assume throughout that $k\geq u$ \footnote{When $k<u$, a single node erasure can be trivially recovered by the $u-1$ surviving nodes within the same rack because they are sufficient to retrieve the data file.}. Suppose a node fails. The repair process is to generate a replacement node that stores exactly the data of the failed node. The rack that contains the failed node is called the {\it host rack}. The repair is based on the two kinds of communication below: \begin{enumerate} \item \textbf{Intra-rack transmission.} All surviving nodes in the host rack transmit information to the replacement node. \item \textbf{Cross-rack transmission.} Outside the host rack, $\bar{d}$ helper racks each transmit $\beta$ symbols to the replacement node. \end{enumerate} \noindent Since the cost of intra-rack communication is negligible compared with that of the cross-rack communication, the nodes within each rack can communicate freely without taxing the system bandwidth. Consequently, the $\beta$ symbols provided by each helper rack are computed from the data stored in all nodes in that helper rack, and the repair bandwidth $\gamma$ only dependents on the cross-rack transmission, i.e., $\gamma=\bar{d}\beta$. This rack-aware storage model was introduced in \cite{Hu}\cite{Hou}. Moreover, the authors of \cite{Hou} derived a tradeoff between the repair bandwidth and storage overhead for $\bar{k}\leq \bar{d}\leq \bar{n}-1$. The codes with parameters lying on the tradeoff curve are called rack-aware regenerating codes. In particular, the minimum storage rack-aware regenerating (MSRR) code has parameters: \begin{equation}\label{bw-bound} \alpha={B}/{k},\ \ \ \beta=\alpha/(\bar{d}-\bar{k}+1)\;. \end{equation} Certainly $B,\alpha,\beta$ are all integers and $\alpha$ is called the sub-packetization. On the one hand, codes with small sub-packetization are preferred in practice due to the low complexity in both the encoding and repair process. On the other hand, $\alpha$ must be large enough to guarantee the existence of MSRR codes for arbitrary $n,k$. It was proved in \cite{Chen} that $(n\!=\!\bar{n}u,k\!=\!\bar{k}u,\bar{k}\!\leq\! \bar{d}\!\leq\! \bar{n}\!-\!1)$ optimal-access (i.e., the symbols accessed on each helper rack are downloaded without processing) MSRR codes exist only if $\alpha \geq \min\{\bar{s}^{\frac{\bar{n}}{\bar{s}u}},\bar{s}^{\bar{k}-1}\}$, where $\bar{s}\!=\!\bar{d}\!-\!\bar{k}\!+\!1$. The authors in \cite{Chen} also developed the first explicit constructions of MSRR codes for all admissible parameters, i.e., $n\!=\!\bar{n}u, ~k\!=\!\bar{k}u+u_{0}~(0\!\leq \!u_{0}\!<\!u)$ and $\bar{k}\!\leq\!\bar{d}\!\leq\!\bar{n}\!-\!1$ \footnote{These parameters coincide with the assumptions made when proving the cut-set bound and deriving the MSRR code parameters in \cite{Hou}. Thus in this paper we regard this range as all admissible parameters for MSRR codes. }. However, their codes have sub-packetization $\bar{s}^{\bar{n}}$, higher than the proved lower bound. To our knowledge, no MSRR codes attaining the bounds on sub-packetization have been derived so far, even for the codes without the optimal-access property. \subsection{Contribution and related work} In this paper, we present an improved explicit construction of MSRR codes for all admissible parameters. Our code has sub-packetization $\bar{s}^{\lceil\frac{\bar{n}}{u-u_0}\rceil}$, thus taking a step towards shrinking the gap between realization and proved lower bound. Moreover, we also reduce the field size almost by half. Namely, in \cite{Chen} the codes are built over a finite field $F$ satisfying $n\mid (|F|-1)$ and $|F|>n+\bar{s}-1$, which results in $|F|\geq 2n+1$, while our code needs $u\mid (|F|-1)$ and $|F|>n$ which results in $|F|\approx n$. In \cite{Hou}, after derivation of the parameters for MSRR codes, the authors also discussed the construction. They designed specific structure for satisfying the optimal repair while leaving the MDS property to the Schwartz-Zippel Lemma. As a result, their constructions need some constraints on the parameters and the finite fields being large enough. The first explicit constructions of MSRR codes for all admissible parameters were developed in \cite{Chen}. Actually, two constructions were derived where both have the same sub-packetization level but the latter possesses lower access and smaller field size. Thus we only list the parameters of the second construction in \cite{Chen} for comparison in Table \ref{t0}. Note that our code keeps the same access level as their low-access construction, i.e., $\frac{u\alpha}{\bar{s}}$ symbols from each helper rack. Although it is by a factor of $u$ greater than the lower bound proved in \cite{Chen}, it is the lowest access among all existing constructions that are applicable to all admissible parameters. In a recent work \cite{Hou2020}, Hou et al. present a coding framework for converting any $(\bar{n},\bar{k},\bar{d})$ MSR code into an $(n=\bar{n}u,k=\bar{k}u\!+\!u_0,\bar{d})$ MSRR code with the same sub-packetization. However, for arbitrary $\bar{n}$ and $\bar{k}$ all existing explicit constructions of $(\bar{n},\bar{k},\bar{d})$ MSR codes have sub-packetization $\bar{s}^{\bar{n}}$ except the ones in \cite{Ye2016sub-,Tang} that have sub-packetization $\bar{s}^{\lceil\frac{\bar{n}}{\bar{s}}\rceil}$ but only apply to $\bar{d}\!=\!\bar{n}\!-\!1$. By using the conversion framework, an $(n,k,\bar{d}\!=\!\bar{n}\!-\!1)$ MSRR code is obtained. However, the conversion again relies on the Schwartz-Zippel Lemma, so the MSRR code exists provided the finite field is sufficiently large. Comparisons between our MSRR code and previous constructions are shown in Table \ref{t0}. The remaining of the paper is organized as follows. Section II describes a repair framework for MSRR codes that is used in both Chen\&Barg's codes and the code in this work. Then Section III presents the explicit construction of MSRR codes. Section IV concludes the paper. \section{A Repair Framework for MSRR Codes} First introduce some notations. For integers $0\leq m<n$, let $[n]=\{1,...,n\}$ and $[m,n]=\{m,m\!+\!1,...,n\}$. We label the racks from $0$ to $\bar{n}-1$ and the nodes within each rack from $0$ to $u-1$. Moreover, we represent each of the $n=\bar{n}u$ nodes by a pair $(e,g)\in[0,\bar{n}\!-\!1]\times [0,u\!-\!1]$ where $e$ is the rack index and $g$ is the node index within the rack. In this section, we formalize the construction of MSRR codes from the parity check equations. Denote $r\!=\!n\!-\!k$ and $\bar{r}\!=\!\bar{n}\!-\!\bar{k}$ throughout the paper. Since the MSRR code is first an $(n,k;\alpha)$ MDS array code, the code can be defined by the following parity check equations. \begin{equation}\label{PCE} \textstyle{\sum_{e=0}^{\bar{n}-1}\sum_{g=0}^{u-1}H_{(e,g)}{\bm c}_{(e,g)}^\tau}={\bm 0}\;, \end{equation} where $H_{(e,g)}$ is a $r\alpha\!\times\! \alpha$ matrix over a finite field $F$ and ${\bm c}_{(e,g)}\!=\!(c_{(e,g),0},...,c_{(e,g),\alpha-1})\!\in\! F^{\alpha}$ denotes the vector stored in node $(e,g)$. The MDS property means any $k$ out of the ${\bm c}_{(e,g)}$'s can recover all other $r$ vectors, which is equivalent to require the concatenation of any $r$ distinct $H_{(e,g)}$'s results in a $r\alpha\times r\alpha$ invertible matrix. Besides, the MSRR codes should satisfy the optimal repair property. That is, each vector ${\bm c}_{(e^*,g^*)}\in F^{\alpha}$ can be recovered from $\{{\bm c}_{(e^*,g)}\mid g\in[0, u-1], g\neq g^*\}\cup\{{\bm s}_e\mid e\in\mathcal{H}\}$ for any $\mathcal{H}\!\subseteq\! [0,\bar{n}\!-\!1]\!-\!\{e^*\}$ with $|\mathcal{H}|\!=\!\bar{d}$, where ${\bm s}_e\!\in F^{{\alpha}/({\bar{d}-\bar{k}+1})}$ is computed from $\{{\bm c}_{(e,g)}\mid g\in[0,u-1]\}$. The next theorem gives a sufficient condition for the optimal repair property. \begin{theorem}\label{thm2} Suppose $\mathcal{C}$ is an $(n,k;\alpha)$ array code defined by the parity check equations in \eqref{PCE}. Denote $\beta=\alpha/(\bar{d}-\bar{k}+1)$. Then $\mathcal{C}$ satisfies the optimal repair property if for any $e^*\in[0,\bar{n}-1]$, there exists a matrix $S_{e^*}\in F^{\bar{r}\beta\times r\alpha}$ such that \begin{itemize} \item[(a)]For $g\!\in\![0,u\!-\!1]$, $S_{e^*}H_{(e^*,g)}\!=\!P_{e^*}Q_{(e^*,g)}$, where $Q_{(e^*,g)}$ is an $\alpha\times \alpha$ invertible matrix and $P_{e^*}\in F^{\bar{r}\beta\times \alpha}$; \item[(b)]For all $e\!\neq\! e^*$ and $g\!\in\![0,u\!-\!1]$, $S_{e^*}H_{(e,g)}\!=\!P_eR_eQ_{(e,g)}$, where $P_e\!\in\! F^{\bar{r}\beta\times \beta}, R_e\!\in \!F^{\beta\times \alpha}, Q_{(e,g)}\!\in\! F^{\alpha\times\alpha}$. \item[(c)]For any $\{e_1,...,e_{\bar{n}-\bar{d}-1}\}\!\in\! [0,\bar{n}\!-\!1]\!-\!\{e^*\}$, the matrix $\begin{pmatrix}P_{e^*}&P_{e_1}&\cdots&P_{e_{\bar{n}-\bar{d}-1}}\end{pmatrix}\in F^{\bar{r}\beta\times\bar{r}\beta}$ is invertible. \end{itemize} \end{theorem} \begin{proof} For any $e^*\!\in\![0,\bar{n}\!-\!1]$, we prove that existence of the matrix $S_{e^*}$ implies the optimal repair of any individual node in rack $e^*$. Actually, multiply $S_{e^*}$ from the left on both sides of \eqref{PCE}, then we have \begin{equation}\label{eq3} P_{e^*}\sum_{g=0}^{u-1}Q_{(e^*,g)}{\bm c}_{(e^*,g)}^\tau+\sum_{e\neq e^*}P_eR_e\sum_{g=0}^{u-1}Q_{(e,g)}{\bm c}_{(e,g)}^\tau=\bm{0}\;. \end{equation} Furthermore, for all $e\in[0,\bar{n}-1]$ denote \begin{equation}\label{eq40} \tilde{\bm c}_e^\tau=\textstyle{\sum_{g=0}^{u-1}Q_{(e,g)}{\bm c}_{(e,g)}^\tau}\end{equation} then \eqref{eq3} becomes \begin{equation}\label{eq50} P_{e^*}\tilde{\bm c}_{e^*}^\tau+\textstyle{\sum_{e\neq e^*}P_e(R_e\tilde{\bm c}_e^\tau)}=\bm{0}\;. \end{equation} The condition (c) of the hypothesis implies that by downloading the vector ${\bm s}_{e}^\tau=R_{e}\tilde{\bm c}_{e}^\tau$ from the helper rack $e\in [0,\bar{n}-1]-\{e^*,e_1,...,e_{\bar{n}-1-\bar{d}}\}$, one can recover $\big\{\tilde{\bm c}_{e^*}^\tau\big\}\cup\big\{R_{e_i}\tilde{\bm c}_{e_i}^\tau\!\mid\! i\!\in\![\bar{n}\!-\!\bar{d}\!-\!1]\}$. Obviously, ${\bm s}_{e}\!\in\! F^\beta$, thus only $\beta$ symbols are downloaded from each helper rack. Moreover, from the condition (a) of the hypothesis one can further derive ${\bm c}_{(e^*,g^*)}$ from $\tilde{\bm c}_{e^*}$ and $\{{\bm c}_{(e^*,g)}\mid g\in[0,u-1], g\neq g^*\}$. \end{proof} \begin{remark}\label{rmk1} Theorem \ref{thm2} presents a specific but simpler repair framework for MSRR codes. More details are given below. \begin{enumerate} \item The matrix $S_{e^*}$ actually means selecting $\bar{r}\beta$ parity check equations from (\ref{PCE}) which then define an $(\bar{r}+\bar{d},\bar{d};\beta)$ MDS array code as shown in (\ref{eq50}), where for $e\neq e^*$, $R_e\tilde{\bm c}_e^\tau\in F^\beta$ represents one component of the MDS array codeword, and $\tilde{\bm c}_{e^*}^\tau\!\in\! F^{\alpha}$ represents $\bar{d}\!-\!\bar{k}\!+\!1$ components. The MDS property comes from the condition (c). \item The condition (a) and (b) guarantee that after multiplying the matrix $S_{e^*}$ a common divisor $P_e$ can be drawn out for each rack $e$. Therefore, all $u$ nodes in rack $e$ play as a whole (i.e., the $\tilde{\bm c}_e$ defined in (\ref{eq40})) in the repair process. \item The matrix $R_e$ means a compression from $\alpha$ symbols to $\beta$ symbols, while for the host rack $e^*$ there is no compression. This guarantees the ratio of downloaded data size to recovered data size. \item The condition (a) requires that $Q_{(e^*,g)}$, $g\!\in\![0,u\!-\!1]$, are invertible matrices, which implies the same selection of parity check equations (i.e., $S_{e^*}$) can be used for the repair of any single node failure in rack $e^*$. \end{enumerate} Although Theorem \ref{thm2} proposes a stronger requirement than the optimal repair property, it also simplifies the design of MSRR codes and provides some insights into the constructions of \cite{Chen} and this work. \end{remark} \begin{remark}\label{rmk2} The repair of single node failures in rack $e^*$ uses only part of the $r\alpha$ parity check equations in (\ref{PCE}) which exactly correspond to the nonzero columns of $S_{e^*}$. Divide the $r\alpha$ parity check equations into $r$ blocks each containing $\alpha$ equations. In \cite{Chen} a total of $\bar{r}$ blocks of check equations are used for the repair of single node failures in one rack. By contrast, we use $\bar{r}(u-u_0)$ blocks of check equations to repair single node failures in $u-u_0$ racks. That is, more parity check equations are used to repair more racks in our construction. As a result, a smaller exponent (i.e., $\lceil\frac{\bar{n}}{u-u_0}\rceil$) in the sub-packetization is enough to ensure the repair of all $\bar{n}$ racks. \end{remark} \section{The Explicit Construction} Suppose $k\!=\!\bar{k}u\!+\!u_{0}\ (0\!\leq \!u_{0}\!<\!u)$ and $\bar{k}\!\leq\!\bar{d}\!\leq\!\bar{n}-1$. We construct an $(\bar{n}u,k,\bar{d})$ MSRR code $\mathcal{C}$ with sub-packetization $\alpha=\bar{s}^m$, where $\bar{s}=\bar{d}-\bar{k}+1$ and $m=\lceil\frac{\bar{n}}{u-u_{0}}\rceil$. The code $\mathcal{C}$ is defined by parity check equations as in \eqref{PCE}. First we introduce some notations related to the expression of $H_{(e,g)}$'s. \begin{itemize} \item Divide $H_{(e,g)}$ into $r$ row blocks $H_{t,(e,g)}$, $t\in[0,r\!-\!1]$, where $H_{t, (e,g)}\in F^{\alpha\times \alpha}$ is the $(t+1)$-th $\alpha$ rows of $H_{(e,g)}$. \item Label the rows and columns of $H_{t, (e,g)}$ by the integers in $[0,\alpha-1]$. For any $a,b\in[0,\alpha-1]$, $H_{t,(e,g)}(a,b)$ denotes the $(a,b)$-th entry of $H_{t,(e,g)}$. \item For each integer $a\!\in\![0,\alpha\!-\!1]$, let $(a_0,...,a_{m-1})$ be its $\bar{s}$-ary expansion, i.e., $a\!=\!\sum_{\tau=0}^{m-1}a_{\tau}\bar{s}^{\tau}$, $a_{\tau}\!\in\![0,\bar{s}\!-\!1]$. For any $v\!\in\![0,\bar{s}\!-\!1]$ and $\tau\!\in\![0,m\!-\!1]$, let $a(\tau,v)$ be the integer that has the $\bar{s}$-ary expansion $(a_{0},...,a_{\tau-1}, v, a_{\tau+1},...,a_{m-1})$. \item For $e\!\in\![0,\bar{n}\!-\!1]$, define $\pi(e)\!=\!e\!-\!(u-u_0)\lfloor\frac{e}{u-u_0}\rfloor$, i.e., $e\equiv \pi(e)~{\rm mod~}(u-u_0)$. \end{itemize} Secondly we choose some specific elements in a finite field $F$, where $u|(|F|-1)$ and $|F|>n$. \begin{enumerate} \item Let $\xi$ be a primitive element of $F$ and $\eta$ be an element of $F$ with multiplicative order $u$. \item Denote $\lambda_{(e,g)}=\xi^e\eta^g$ for $e\!\in\![0,\bar{n}\!-\!1],g\!\in\![0,u\!-\!1]$. It can be seen $\lambda_{(e,g)}\!\neq\!\lambda_{(e',g')}$ for $(e,g)\!\neq\! (e',g')\!\in\![0,\bar{n}\!-\!1]\times[0,u\!-\!1]$, because $(\xi^{e-e'})^u\neq 1$ for $e\!\neq\! e'\in[0,\bar{n}-1]$ while $(\eta^{g'\!-g})^u=1$ for all $g,g'\in[0,u-1]$. \item Let $\mu_1,\cdots,\mu_{\bar{s}-1}$ be $\bar{s}-1$ distinct nonzero elements in $F$ such that $\{\mu_{1},\cdots,\mu_{\bar{s}-1}\}\cap\{\xi^{eu}:e\in[0,\bar{n}-1]\}=\emptyset$. Note $\bar{s}-1+\bar{n}=\bar{d}-\bar{k}+\bar{n}<2\bar{n}$, so these $\mu_i$'s exist for $u\geq 2$ and $|F|>n$. \end{enumerate} Next we give Algorithm \ref{alg1} for defining the $H_{t,(e,g)}$'s. The whole parity check matrix is established by running Algorithm \ref{alg1} for $t\in[0,r-1]$. \begin{algorithm}[th] \caption{\\Defining $H_{t,(e,g)}$'s for $e\in[0,\bar{n}-1]$ and $g\in[0,u-1]$.}\label{alg1} \begin{algorithmic}[1] \STATE Diagonal: for $a\!\in\![0,\alpha\!-\!1]$, set $H_{t,(e,g)}(a,a)\!=\!\lambda_{(e,g)}^{t}$; \STATE Non-diagonal: \FOR{$e\in[0,\bar{n}-1]$, $g\in[0,u-1]$ and $a\!\in\![0,\alpha\!-\!1]$} \STATE Initialize $H_{t,(e,g)}(a,b)\!=0$ for all $b\neq a$; \STATE Denote $\tau=\lfloor\frac{e}{u-u_0}\rfloor$; ~~\IF{$a_{\tau}=0$ and $t\equiv \pi(e)~{\rm mod~}u$} \STATE Set $H_{\!t,(e,g)\!}(a,b)\!=\!\lambda_{(e,g)}^{\pi(e)}\mu_{v}^{\lfloor\frac{t}{u}\rfloor}$ for $b\!\!=\!\!a(\tau,v),v\!\in\![\bar{s}\!-\!1]$; \ENDIF \ENDFOR \end{algorithmic} \end{algorithm} We give some explanations of Algorithm \ref{alg1}. Actually, Line 1 defines the diagonal entries of $H_{t,(e,g)}$'s, Line 4 initializes all non-diagonal entries as zeros, and then Line 6-7 updates the non-diagonal entries in some blocks (i.e., $t\equiv \pi(e)~{\rm mod~}u$), some rows (i.e., $a_{\tau}=0$) and some columns (i.e, $b\!\in\!\{a(\tau,v)\!\mid\! v\!\neq\! 0\}$). In the following we prove $\mathcal{C}$ is an MSRR code by showing it satisfies the MDS property and optimal repair property. \begin{remark}\label{re1} The proofs are derived in an inductive way, which depends on a partition on the coordinates of a vector in $F^\alpha$. In more detail, for each vector in $F^\alpha$, its coordinates are indexed by subscripts ranging in $[0,\alpha\!-\!1]$. For any $a\!\in\![0,\alpha\!-\!1]$, let $w(a)$ be the number of digits that equal $0$ in $a$'s $\bar{s}$-ary expansion $(a_{0},...,a_{m-1})$. Denote $\mathcal{L}_{\sigma}\!=\!\{a\!\in\![0,\alpha\!-\!1]\!\mid\!\omega(a)\!=\!\sigma\}$. Obviously, $\cup_{\sigma=0}^m\mathcal{L}_{\sigma}$ forms a partition of the set $[0,\alpha\!-\!1]$. We prove the two properties of $\mathcal{C}$ by induction on $\sigma$. \end{remark} \subsection{Proof of the MDS property} \begin{theorem}\label{thm3} The code $\mathcal{C}$ satisfies the MDS property, i.e., for any $r$ nodes $(e_1,g_1),...,(e_r,g_r)\in[0,\bar{n}-1]\times[0,u-1]$, the matrix $H=(H_{(e_1,g_1)}~H_{(e_2,g_2)}~\cdots~H_{(e_r,g_r)})$ is invertible. \end{theorem} \begin{proof} It suffices to show for any $\bm x\!\in\!(F^{\alpha})^r$, $H{\bm x} ^{\tau}\!=\bm 0$ always implies $\bm x\!=\!\bm 0$. Denote $\bm x\!=\!(\bm x_1,...,\bm x_r)$ and $\bm x_{i}\!=\!(x_{i,0},x_{i,1},...,x_{i,\alpha-1})\in F^{\alpha}$ for $i\!\in\! [r]$. Using the partition defined in Remark \ref{re1}, next we prove $\bm x=0$ by showing $\{x_{i,\mathcal{L}_{\sigma}}\!\mid \!i\!\in\![r]\}$ contains only zeros for all $\sigma\in [0,m]$. This is accomplished by induction on $\sigma$. For simplicity, denote $H_t=(H_{t,(e_1,g_1)}~\cdots~H_{t,(e_r,g_r)})$ for $t\in[0,r-1]$. Then the linear system $H{\bm x} ^{\tau}\!=\bm 0$ becomes \begin{equation}\label{eq4} H_t{\bm x}^\tau=\textstyle{\sum_{i=1}^rH_{t,(e_i,g_i)}{\bm x}_i^\tau}={\bm 0},~\forall t\in[0,r-1]\;. \end{equation} First consider the base case $\sigma=0$. For any $a\in \mathcal{L}_{0}$, by the definition of $H_{t,(e,g)}$ in Algorithm \ref{alg1} we know the $a$-th row of $H_{t,(e,g)}$ are all zeros except the $(a,a)$-th entry. Choose the $a$-th rows in the linear system \eqref{eq4}, one can obtain the following linear system \begin{equation}\label{B-1} \textstyle{\sum_{i=1}^r\lambda_{(e_i,g_i)}^{t}x_{i,a}}=0,~\forall t\in[0,r-1]. \end{equation} Since $\lambda_{(e_1,g_1)},...,\lambda_{(e_r,g_r)}$ are distinct elements in $F$, it immediately follows $x_{1,a}=\cdots=x_{r,a}=0$. Thus $\{x_{i,\mathcal{L}_{0}}\mid i\in[r]\}$ contains only zeros. Now suppose it has been proved $\{x_{i,\mathcal{L}_{\sigma}}\!\mid\! i\in[r]\}$ contains only zeros for some $\sigma\geq 0$. Then for any $a\in \mathcal{L}_{\sigma+1}$, the $a$-th rows in \eqref{eq4} are \begin{equation}\label{B-2} \sum_{i=1}^r\lambda_{(e_i,g_i)}^{t}x_{i,a}+\sum_{i=1}^r\sum_{v=1}^{\bar{s}-1}f_{t}(a,e_i) \lambda_{(e_i,g_i)}^{\pi(e_i)}\mu_{v}^{\lfloor\frac{t}{u}\rfloor}x_{i,a(\lfloor\frac{e_i}{u-u_0}\rfloor,v)}=0, \end{equation} where $$ f_{t}(a,e_i)=\begin{cases} 1\ \ \ \ \ \ \ \mathrm{if} \ a_{\lfloor\frac{e_i}{u-u_0}\rfloor}=0\mathrm{~and~} t\equiv \pi(e_i)~{\rm mod~}u\\ 0\ \ \ \ \ \ \ \mathrm{otherwise}. \end{cases} $$ However, for the parameters $t,e_i$ such that $f_{t}(a,e_i)\!\neq\!0$, it must have $a(\lfloor\frac{e_i}{u-u_0}\rfloor,v)\!\in\!\mathcal{L}_{\sigma}$ for $v\!\in\![\bar{s}\!-\!1]$, and then $x_{i,a(\lfloor\frac{e_i}{u-u_0}\rfloor,v)}=0$ by the induction hypothesis. As a result, \eqref{B-2} becomes $\sum_{i=1}^r\!\lambda_{(e_i,g_i)}^{t}x_{i,a}\!=\!0$ for $t\!\in\![0,r\!-\!1]$. Similar to \eqref{B-1}, it follows $x_{1,a}=\cdots=x_{r,a}=0$. Thus $\{x_{i,\mathcal{L}_{\sigma+1}}\!\mid\!i\in[r]\}$ contains only zeros. Therefore, the inductive proof is finished. \end{proof} \subsection{Proof of the repair property} \begin{theorem}\label{thm4} The code $\mathcal{C}$ satisfies the optimal repair property, i.e., for any node $(e^*,g^*)$ and any $\mathcal{H}\!\subseteq\! [0,\bar{n}\!-\!1]\!-\!\{e^*\}$ with $|\mathcal{H}|\!=\!\bar{d}$, the vector ${\bm c}_{(e^*,g^*)}$ can be recovered from $$\{{\bm c}_{(e^*,g)}\mid g\in[0,u-1],g\neq g^*\}\cup\{{\bm s}_e\mid e\in\mathcal{H}\}$$ where ${\bm s}_e\!\in F^{\beta}$ is computed from $\{{\bm c}_{(e,g)}\mid g\in[0,u-1]\}$. \end{theorem} \begin{proof} We firstly select a system of the parity check equations with respect to the values of $t$, i.e., \begin{equation}\label{eq8} \sum_{e=0}^{\bar{n}-1}\sum_{g=0}^{u-1}H_{t,(e,g)}{\bm c}_{(e,g)}^\tau={\bm 0}, ~\forall ~t\in T_{e^*} \end{equation} where $T_{e^*}\!=\!\{t\in[0,r-1]\!\mid \!t\!\equiv\! \pi(e^*)~{\rm mod~}u\}$. Since $r=n-k=(\bar{n}-\bar{k})u-u_0=\bar{r}u-u_0$, it obviously has \begin{equation}\label{eqt} T_{e^*}=\{\pi(e^*)+iu\mid i\in[0,\bar{r}-1]\}\;.\end{equation} Denote $\tau^*\!=\!\lfloor\frac{e^*}{u-u_0}\rfloor$ and $A(\tau^*,0)\!=\!\{a\!\in\![0,\alpha\!-\!1]\mid a_{\tau^*}=0\}$. Then, for all $a\!\in\! A(\tau^*,0)$ we pick the $a$-th rows from the equations in \eqref{eq8} which will be used to enable the repair of single node failures in rack $e^*$. For simplicity, denote $\mathcal{A}_\sigma=A(\tau^*,0)\cap\mathcal{L}_\sigma$ for $\sigma\in[m]$. Obviously, $\cup_{\sigma=1}^m\mathcal{A}_\sigma$ forms a partition of $A(\tau^*,0)$. First consider the $a$-th rows in \eqref{eq8} for all $a\in\mathcal{A}_1$ which induce the following linear system \begin{align} &\sum_{g=0}^{u-1}\lambda^{iu}_{(e^*,g)}\cdot\lambda_{(e^*,g)}^{\pi(e^*)}{ c}_{(e^*,g),a}\!+ \!\sum_{v=1}^{\bar{s}-1}\mu_v^i\!\Big(\!\sum_{g=0}^{u-1}\lambda_{(e^*,g)}^{\pi(e^*)}{ c}_{(e^*,g),a(\tau^*,v)}\!\Big)\notag\\ &+\!\sum_{e\neq e^*}\sum_{g=0}^{u-1}\lambda^{iu}_{(e,g)}\cdot\lambda_{(e,g)}^{\pi(e^*)}{ c}_{(e,g),a}\!=\!0,~~~\forall~ i\!\in\![0,\bar{r}\!-\!1]\;. \label{eq9} \end{align} We give some explanations about \eqref{eq9}. By Algorithm \ref{alg1}, for any $a\!\in\!\mathcal{A}_1$ and $t\!\in\! T_{e^*}$ the $a$-th row of $H_{t,(e^*\!,g)}$ has nonzero entries in the diagonal position and $\bar{s}\!-\!1$ non-diagonal positions, which respectively correspond to the first two terms in the left side of \eqref{eq9}. For any $e\!\neq\! e^*$, it has $\big(\lfloor\frac{e}{u-u_0}\rfloor,\pi(e)\big)\neq \big(\tau^*,\pi(e^*)\big)$. Combining with the fact that $a_\tau\!\neq\! 0$ for all $\tau\!\neq\!\tau^*$ due to $a\!\in\!\mathcal{A}_1$, the conditions $a_{\lfloor\frac{e}{u-u_0}\rfloor}=0$ and $t\equiv \pi(e)~{\rm mod~}u$ can not simultaneously hold for all $t\!\in\! T_{e^*}$. Therefore, the $a$-th rows of $H_{t,(e,g)}$'s only have nonzero entries in the diagonal positions which result in the third term in the left side of \eqref{eq9}. Moreover, according to the expression of $T_{e^*}$ in \eqref{eqt}, one can finally derive \eqref{eq9}. Then for all $e\in[0,\bar{n}-1]$, denote \begin{equation}\label{eq7} \tilde{\bm c}_{e}=\sum_{g=0}^{u-1}\lambda_{(e,g)}^{\pi(e^*)}{\bm c}_{(e,g)}=(\tilde{ c}_{e,0},...,\tilde{ c}_{e,\alpha-1})\in F^\alpha\;. \end{equation} Obviously, ${\bm c}_{(e^*,g^*)}$ can be computed from $\tilde{\bm c}_{e^*}$ and the intra-rack transmission $\{{\bm c}_{(e^*,g)}\!\mid\! g\!\in\![0, u-1], g\!\neq\! g^*\}$. Moreover, because $\lambda_{(e,g)}=\xi^e\eta^g$ and $\eta$ has multiplicative order $u$, it has $\lambda_{(e,g)}^{iu}=(\xi^{eu})^i$. Using the notation defined in \eqref{eq7}, the linear system \eqref{eq9} becomes \begin{equation}\label{eq11} \sum_{e=0} ^{\bar{n}-1}(\xi^{eu})^i\tilde{c}_{e,a}\!+\!\sum_{v=1}^{\bar{s}-1}\!\mu_v^i\tilde{c}_{e^*\!,a(\tau^*\!,v)}\!=\!0,~\forall i\!\in\![0,\bar{r}\!-\!1]\;. \end{equation} By the selection of $\xi$ and $\mu_v$'s, \eqref{eq11} actually defines a $(\bar{r}\!+\!\bar{d},\bar{r})$ GRS codeword $(\tilde{c}_{0,a},...,\tilde{c}_{\bar{n}-1,a},\tilde{c}_{e^*\!,a(\tau^*\!,1)},..., \tilde{c}_{e^*\!,a(\tau^*\!,\bar{s}-1)})$, so downloading $\{\tilde{c}_{e,a}\mid e\in\mathcal{H}\}$ can recover $\{\tilde{c}_{e^*\!,a},\tilde{c}_{e^*\!,a(\tau^*\!,1)},...,\\\tilde{c}_{e^*\!,a(\tau^*\!,\bar{s}-1)}\}\cup \{\tilde{c}_{e,a}\mid e\in[0,\bar{n}\!-\!1]\!-\!\mathcal{H}\}$. Furthermore, we prove $\{\tilde{c}_{e^*\!,a(\tau^*\!,0)},..., \tilde{c}_{e^*\!,a(\tau^*\!,\bar{s}-1)}\!\mid \!a\!\in\! \mathcal{A}_{\sigma}\}$ can be recovered from $\{\tilde{c}_{e,b}\!\mid\! b\!\in\! \cup_{\delta=1}^\sigma\mathcal{A}_{\delta}, e\!\in\!\mathcal{H}\}$ for all $\sigma\in[m]$. This is accomplished by induction on $\sigma$ and the above is the proof for the base case $\sigma\!=\!1$. Let us see the inductive step. For any $a\in \mathcal{A}_{\sigma+1}$, we still pick the $a$-th rows from the parity check equations in \eqref{eq8} and obtain a linear system similar to \eqref{eq11} except the left side has the fourth term corresponding to the nonzero non-diagonal entries in the $a$-th rows of $H_{t,(e,g)}$ for the $e\neq e^*$ satisfying $\pi(e)=\pi(e^*)$ and $a_{\lfloor\frac{e}{u-u_0}\rfloor}=0$. However, from $e\neq e^*$ and $\pi(e)=\pi(e^*)$, it must have $\lfloor\frac{e}{u-u_0}\rfloor\neq\lfloor\frac{e^*}{u-u_0}\rfloor=\tau^*$, thus $a(\lfloor\frac{e}{u-u_0}\rfloor,v)\in \mathcal{A}_{\sigma}$ for $v\in[\bar{s}-1]$. Therefore, by the induction hypothesis the fourth term can be computed from $\{\tilde{c}_{e,b}\mid e\in\mathcal{H}, b\!\in\! \cup_{\delta=1}^\sigma\mathcal{A}_{\delta}\}$. Then similar to \eqref{eq11}, one can recover $\{\tilde{c}_{e^*\!,a},\tilde{c}_{e^*\!,a(\tau^*\!,1)},...,\tilde{c}_{e^*\!,a(\tau^*\!,\bar{s}-1)}\}\bigcup \{\tilde{c}_{e,a}\mid e\in[0,\bar{n}-1]-\mathcal{H}\}$ by additionally downloading $\{\tilde{c}_{e,a}\mid e\in\mathcal{H}\}$ for all $a\in\mathcal{A}_{\sigma+1}$. Therefore, by downloading ${\bm s}_e\!=\!(\tilde{c}_{e,a})_{a\in A(\tau^*,0)}\!\in\! F^{\beta}$ from each helper rack $e\!\in\!\mathcal{H}$ along with the intra-rack communication, the repair is accomplished. \end{proof} \begin{remark}\label{Re2} Although Theorem \ref{thm4} is proved by an inductive process according to a partition of the coordinates (see Remark \ref{re1}), it actually coincides with the sufficient conditions given in Theorem \ref{thm2} for the optimal repair. \begin{enumerate} \item Selection of parity check equations for repair. In Theorem \ref{thm2} the matrix $S_{e^*}$ selects a linear system from (\ref{PCE}) which then induces an MDS array code defined in (\ref{eq50}). In Theorem \ref{thm4} this selection is sequentially accomplished by the restriction to the set $T_{e^*}$ defined in (\ref{eqt}) and then to the rows indexed by $A(\tau^*,0)$. The resultant MDS code is defined in (\ref{eq11}). Since $T_e\!=\!T_{\pi(e)}$ for all $e\!\in\![0,\bar{n}\!-\!1]$ and $\pi(e)$ ranges in $[0,u\!-\!u_0\!-\!1]$, $u-u_0$ linear systems are used for repair in our code. By contrast, \cite{Chen} only used the linear system labeled by $T_0$ for repair. \item All $u$ nodes in a rack play as a whole in the repair. From (\ref{eq7}) one can see our code $\mathcal{C}$ also follows this rule. Specifically, since in (\ref{eq9}) it has $\lambda_{(e,g)}^{iu}=(\xi^{eu})^i$ for all $g\in[0,u-1]$, $(\xi^{eu})^i$ is like the common divisor $P_e$ drawn out for each rack $e$ in Theorem \ref{thm2}, and the diagonal matrix $\lambda_{(e,g)}^{\pi(e^*)}I_{\alpha}$ corresponds to the matrix $Q_{(e,g)}$ in Theorem \ref{thm2}, where $I_\alpha$ is the $\alpha\times\alpha$ identity matrix. Obviously, $\lambda_{(e,g)}^{\pi(e^*)}I_{\alpha}$ is invertible for all $e\in[0,\bar{n}-1]$. \end{enumerate} \end{remark} \begin{remark} From \eqref{eq7} and the proof of Theorem \ref{thm4} one can easily see the repair of a node failure needs to access $\alpha/\bar{s}$ symbols from each node in the helper racks, which is the same as the low-access construction in \cite{Chen}. \end{remark} \section{Conclusion and Future Work} In this work, by using the parity-check equations in an more efficient way for repair, we reduce the sub-packetization of existing explicit constructions of MSRR codes from $(\bar{d}-\bar{k}+1)^{\bar{n}}$ to $(\bar{d}-\bar{k}+1)^{\lceil\frac{\bar{n}}{u-u_{0}}\rceil}$, which helps to bridge the gap from the proved lower bound. Further reducing the sub-packetization and proving a lower bound without the optimal-access hypothesis are left as future work. Besides, constructing optimal-access MSRR codes for nontrivial parameters seems to be an even harder problem.
\section{Introduction} Let $\Sigma_g$ be an oriented surface of genus $g$ standardly embedded in the oriented $3$-sphere $\mathbf{S}^3$. Denote by $\Sigma_{g,1}$ the complement of the interior of a small disc embedded in $\Sigma_g$. The surface $\Sigma_g$ separates $\mathbf{S}^3$ into two genus $g$ handlebodies $\mathbf{S}^3=\mathcal{H}_g\cup -\mathcal{H}_g$ with opposite induced orientation. Denote by $\mathcal{M}_{g,1}$ the mapping class group of $\Sigma_{g,1},$ i.e. the group of orientation-preserving diffeomorphism of $\Sigma_g$ which are the identity on a our fixed disc modulo isotopies which again fix that small disc point-wise. The embedding of $\Sigma_g$ in $\mathbf{S}^3$ determines three natural subgroups of $\mathcal{M}_{g,1}$: the subgroup $\mathcal{B}_{g,1}$ of mapping classes that extend to the inner handlebody $\mathcal{H}_g$, the subgroup $\mathcal{A}_{g,1}$ of mapping classes that extend to the outer handlebody $-\mathcal{H}_g$ and their intersection $\mathcal{AB}_{g,1}$, which are the mapping classes that extend to $\mathbf{S}^3$. Denote by $\mathcal{V}$ the set of diffeomorphism classes of closed oriented smooth $3$-manifolds. By the theory of Heegaard splittings we know that any element in $\mathcal{V}$ can be obtained by cutting $\mathbf{S}^3$ along $\Sigma_g$ for some $g$ and gluing back the two handlebodies by some element of the mapping class group $\mathcal{M}_{g,1}.$ The lack of injectivity of this construction is controlled by the handlebody subgroups $\mathcal{A}_{g,1}$ and $\mathcal{B}_{g,1}$; J.~Singer~\cite{singer} proved that there is a bijection: \begin{align*} \lim_{g\to \infty}\mathcal{A}_{g,1}\backslash\mathcal{M}_{g,1}/\mathcal{B}_{g,1} & \longrightarrow \mathcal{V}, \\ \phi & \longmapsto S^3_\phi=\mathcal{H}_g \cup_{\iota_g\phi} -\mathcal{H}_g. \end{align*} In 1989 S. Morita, using Singer's bijection, proved the analogous result for the set of integral homology $3$-spheres $\mathcal{S}_{\mathbb{Z}}$ and the Torelli group $\mathcal{T}_{g,1}$, which is the group of those elements of $\mathcal{M}_{g,1}$ that act trivially on the first homology group of $\Sigma_{g,1}$. The above map $\phi \mapsto \mathbb{S}^3_\phi$ induces a bijection: \[ \lim_{g\to \infty}\mathcal{A}_{g,1}\backslash\mathcal{T}_{g,1}/\mathcal{B}_{g,1} \longrightarrow \mathcal{S}_{\mathbb{Z}}. \] Let $\mathcal{M}_{g,1}[d]$ denote the mod-$d$ Torelli group, that is the kernel of the canonical map: $\mathcal{M}_{g,1} \rightarrow Sp_{2g}(\mathbb{Z}/d\mathbb{Z})$. Restricting the map $\phi \mapsto \mathbb{S}^3_\phi$ to these subgroups gives us a subset $\mathcal{S}^3[d] \subset \mathcal{V}$. If we denote by $\mathcal{S}^3(d)$ the set of mod-$d$ homology spheres, then the Mayer-Viettoris exact sequence shows that for any $d \geq 2$, $ \mathcal{S}^3_\mathbb{Z} \subseteq \mathcal{S}^3[d] \subseteq \mathcal{S}^3(d)$. Moreover, if we denote by $\mathcal{S}^3_\mathbb{Q}$ the subset of rational homology spheres, then we have: \[ \bigcup_{d \geq 2} \mathcal{S}^3(d) = \mathcal{S}_\mathbb{Q} \] Our first result describes the difference between $\mathcal{S}^3[d]$ and $\mathcal{S}^3(d)$. \begin{teo} \label{teo-criteri-intro} Let $M$ be a rational homology $3$-sphere and $n$ be the cardinal of $H_1(M;\mathbb{Z})$. Then $M$ belongs to $\mathcal{S}^3[d],$ with $d\geq 2,$ if and only if $d$ divides $n-1$ or $n+1$. \end{teo} This result implies that unlike as for integral homology $3$-spheres ($d=0$) and the Torelli group, in general, $\mathcal{S}^3[d]$ does not coincide with the set $\mathcal{S}^3(d)$. More precisely: \begin{cor} The sets $\mathcal{S}^3[d]$ and $\mathcal{S}^3(d)$ only coincide for $d=2,3,4,6.$ \end{cor} Building on Singer's bijection we produce then a bijection: $$ {\displaystyle \lim_{g\to \infty}\mathcal{A}_{g,1}\backslash\mathcal{M}_{g,1}[d]/\mathcal{B}_{g,1}} \longrightarrow \mathcal{S}^3[d]. $$ From the group-theoretical point of view, the induced equivalence relation on $\mathcal{M}_{g,1}[d]$ is quite unsatisfactory. However, as for integral homology spheres (c.f. \cite[Lemma 4]{pitsch}), if we set $\mathcal{A}_{g,1}[d]=\mathcal{M}_{g,1}[d]\cap \mathcal{A}_{g,1}$ and $\mathcal{B}_{g,1}[d]=\mathcal{M}_{g,1}[d]\cap \mathcal{B}_{g,1}$, we can rewrite this equivalence relation as follows: \begin{prop} There is a bijection: $$ \lim_{g\to \infty}(\mathcal{A}_{g,1}[d]\backslash\mathcal{M}_{g,1}[d]/\mathcal{B}_{g,1}[d])_{\mathcal{AB}_{g,1}} \simeq \mathcal{S}^3[d]. $$ \end{prop} This bijection allows us to rewrite every normalized invariant $F$ of rational homology $3$-spheres with values in an arbitrary abelian group $A$, that is an invariant that is zero on the $3$-sphere $\mathbf{S}^3$, as a family of functions $(F_g)_{g\geq 3}$ from the mod-$d$ Torelli groups $\mathcal{M}_{g,1}[d]$ to the abelian group $A$ satisfying the following properties: \begin{enumerate}[i)] \item[0)] Normalization: \[F_g(Id)=0 \quad \text{where $Id$ denotes the identity of $\mathcal{M}_{g,1}[d]$}. \] \item Stability: \[F_{g+1}(x)=F_g(x) \quad \text{for every }x\in \mathcal{M}_{g,1}[d]. \] \item Conjugation invariance: \[ F_g(\phi x \phi^{-1})=F_g(x) \quad \text{for every } x\in \mathcal{M}_{g,1}[d], \; \phi\in \mathcal{AB}_{g,1}. \] \item Double class invariance: \[ F_g(\xi_a x\xi_b)=F_g(x) \quad \text{for every } x\in \mathcal{M}_{g,1}[d],\;\xi_a\in \mathcal{A}_{g,1}[d],\;\xi_b\in \mathcal{B}_{g,1}[d]. \] \end{enumerate} If we consider the associated trivial $2$-cocycles $(C_g)_{g\geq 3},$ which measure the failure of the maps $(F_g)_{g\geq 3}$ to be group homomorphisms, i.e. the maps: \begin{align*} C_g: \mathcal{M}_{g,1}[d]\times \mathcal{M}_{g,1}[d] & \longrightarrow A \\ (\phi,\psi) & \longmapsto F_g(\phi)+F_g(\psi)-F_g(\phi\psi), \end{align*} then these inherit the following properties: \begin{enumerate}[(1)] \item The $2$-cocycles $(C_g)_{g\geq 3}$ are compatible with the stabilization map. \item The $2$-cocycles $(C_g)_{g\geq 3}$ are invariant under conjugation by elements in $\mathcal{AB}_{g,1}$. \item If $\phi\in \mathcal{A}_{g,1}[d]$ or $\psi \in \mathcal{B}_{g,1}[d]$ then $C_g(\phi, \psi)=0$. \end{enumerate} Notice that there is not a one-to-one correspondence between the families of functions $(F_g)_{g\geq 3}$ and the families of $2$-cocycles $(C_g)_{g\geq 3}$. In general there is more than one invariant associated to a $2$-cocycle, for there are homomorphisms on the mod-$d$ Torelli groups that are invariants. This is akin to the Rohlin invariant for integral homology spheres, which is a $\mathbb{Z}/2\mathbb{Z}$-valued invariant and a homomorphism when viewed as a function on the Torelli groups (cf.\cite{riba1}). \begin{prop} Given $g\geq 5,$ $d\geq 3$ integers such that $4\nmid d,$ then up to a multiplicative constant, there is a unique $\mathcal{AB}_{g,1}$-invariant homomorphism $\varphi_g$ on the mod-$d$ Torelli group, which is given by the composition: \[ \xymatrix@C=12mm@R=7mm{ \varphi_g:\mathcal{M}_{g,1}[d] \ar[r]^-{Sp\; rep.}_-{eq.~\ref{ses_MCGp} } & Sp_{2g}(\mathbb{Z},d) \ar[r]^-{abel.}_-{eq.~\ref{ses_abel_d1} } & \mathfrak{sp}_{2g}(\mathbb{Z}/d) \ar[r]^-{proj.}_-{Lem~\ref{lem:spZ/dcoinv}} & \mathfrak{gl}_g(\mathbb{Z}/d) \ar[r]^-{trace} & \mathbb{Z}/d. } \] Moreover this map reassembles into an invariant of rational homology $3$-spheres $\varphi.$ \end{prop} We will show that these new invariants are non-trivial by computing their value on Lens spaces. In all what follows, given $x\in A$ an element of order $d$, we denote by $\varphi^x_g$ the composition of the homomorphism $\varphi_g$ with $\varepsilon^x:\mathbb{Z}/d\longrightarrow A$ that sends $1$ to $x.$ Our main tool to build new invariants is given by the following result, that generalizes the main result from \cite{pitsch}: \begin{teo} \label{teo_tool-intro} Given $g\geq 5,$ $d\geq 3$ integers such that $4\nmid d$ and $x\in A$ with $d$-torsion, a family of $2$-cocycles $C_g: \mathcal{M}_{g,1}[d]\times \mathcal{M}_{g,1}[d] \rightarrow A$ satisfying conditions (1)-(3) provides compatible families of trivializations $F_g+\varphi_g^x: \mathcal{M}_{g,1}[d]\rightarrow A$, that reassemble into invariants of rational homology spheres $$\lim_{g\to \infty}F_g+\varphi_g^x: \mathcal{S}^3[d]\longrightarrow A$$ if and only if the following two conditions hold: \begin{enumerate}[(i)] \item The associated cohomology classes $[C_g]\in H^2(\mathcal{M}_{g,1}[d];A)$ are trivial. \item The associated torsors $\rho(C_g)\in H^1(\mathcal{AB}_{g,1},Hom(\mathcal{M}_{g,1}[d],A))$ are trivial. \end{enumerate} \end{teo} This Theorem provides us with a bridge between the topological problem that is to find invariants of mod-$d$ homology $3$-spheres and the purely algebraic problem that is to find families of $2$-cocycles on the mod-$d$ Torelli group satisfying the conditions of the aforementioned theorem. To construct families of $2$-cocycles directly on the mod-$d$ Torelli group is not a priori easier than to construct directly invariants, but now we can take the advantage of being able to pull-back cocycles from easier to understand quotients of the mod-$d$ Torelli groups, and our most natural candidate is given by the abelianizations of these groups. For convenience in the sequel we shift from an integer $d$ to a prime number $p\geq 5$. In \cite{per}, \cite{sato_abel} independently B.~Perron and M.~Sato computed the abelianization of the mod-$p$ Torelli group getting a split short exact sequence of $\mathbb{Z}/p$-modules, which turns out to uniquely split as a sequence of $\mathcal{M}_{g,1}$-modules: \[ \xymatrix@C=7mm@R=7mm{ 0\ar[r] & \Lambda^3H_p \ar[r] & H_1( \mathcal{M}_{g,1}[p], \mathbb{Z}) \ar[r] & \mathfrak{sp}_{2g}(\mathbb{Z}/p) \ar[r]& 0. } \] In the integral case (c.f. \cite{pitsch}), one gets the Casson invariant by pulling-back a unique candidate cocycle from the $\Lambda^3 H,$ part of the abelianization of the Torelli group. Applying the same strategy in our case, we were surprised to see that the suitable families of $2$-cocycles come from the side that we did not expect: \begin{prop} \label{prop-cocy_sp-intro} The $2$-cocycles on the abelianization of the mod-$p$ Torelli group with $\mathbb{Z}/p\mathbb{Z}$-values whose pull-back to the mod-$p$ Torelli group satisfy all hypothesis of Theorem~\ref{teo_tool-intro} form a $p$-dimensional vector subspace of the vector space of $2$-cocycles on $\mathfrak{sp}_{2g}(\mathbb{Z}/p).$ \end{prop} We are able to precisely describe the new invariants produced by these $2$-cocycles: \begin{teo} \label{teo-main-intro} The unique invariants of rational homology $3$-spheres induced by families of $2$-cocycles on the abelianization of the mod-$p$ Torelli group are generated by all powers of the invariant $\varphi$ and an invariant $\mathfrak{R}$ induced by the family of functions $\mathfrak{R}_g:\mathcal{M}_{g,1}[p]\rightarrow \mathbb{Z}/p$ defined as follows: Consider $r^p:\mathbb{Z}/p^2\rightarrow\mathbb{Z}/p$ the map that sends $a\in \mathbb{Z}/p^2$, written as $a=a_0+pa_1$ with $a_0,a_1\in\lbrace 0,\ldots p-1\rbrace$, to $a_1\in \mathbb{Z}/p.$ Given $\phi \in \mathcal{M}_{g,1}[p]$, the image of $\phi$ by the symplectic representation modulo $p^3$ is a matrix $\left(\begin{smallmatrix} A & B \\ C & D \end{smallmatrix}\right)\in Sp_{2g}(\mathbb{Z}/p^3,p)$. The sub-matrix $D$ can be written as $Id+pD_1$ with $D_1$ a matrix of size $g\times g$ and coefficients in $\mathbb{Z}/p^2.$ Then if we denote by $\overline{D_1}$ the reduction modulo $p$ of $D_1$ and by $tr$ the trace map, the precise expression of our functions is given by: $$\mathfrak{R}_g(\phi)= r^p(tr\left(D_1\right))-\dfrac{1}{2}tr(\overline{D}_1^2).$$ \end{teo} From this result we are able to disprove Perron's conjecture. More precisely, we show that if the extension of the Casson invariant modulo $p$ to the mod-$p$ Torelli group given in \cite{per} by B.~Perron was a well defined invariant of rational homology spheres, then its associated $2$-cocycle would be the pull-back to $\mathcal{M}_{g,1}[p]$ of a bilinear form on the $\Lambda^3H_p$ subgroup of the abelianization of $\mathcal{M}_{g,1}[p]$ satisfying all hypothesis of Theorem \ref{teo_tool-intro}, which contradicts Proposition \ref{prop-cocy_sp-intro}. Therefore we have: \begin{cor} \label{cor-perron-intro} The extension of the Casson invariant modulo $p$ to the mod-$p$ Torelli group proposed by B. Perron is not a well defined invariant of rational homology spheres. \end{cor} \vspace{0.3cm} \textbf{Plan of this paper.} In Section 2, we give preliminary results on Heegaard splittings, symplectic representations of the handlebody subgroups, Lie algebras of arithmetic groups and some homological tools that we will use throughout all this work. We will be somewhat detailed here, for we will often rely on explicit forms of classical homological results. We include these preliminaries and discussions to save the reader from having to search through the literature. In Section 3 we study the relation between rational homology $3$-spheres and mod-$d$ Torelli groups for any integer $d\geq 2$, and prove Theorem \ref{teo-criteri-intro}. In Section~4 we study the relation between families of $2$-cocycles on the mod-$p$ Torelli group and invariants of oriented rational homology $3$-spheres and prove Theorem \ref{teo_tool-intro}. In Section~5, we study the families of $2$-cocycles on the abelianization of the mod-$p$ Torelli group whose pull-back to the mod-$p$ Torelli group satisfy the hypothesis of Theorem \ref{teo_tool-intro}. Using this we finally prove Theorem \ref{teo-main-intro} and Corollary \ref{cor-perron-intro}. Some of the arguments in the above sections rely on homological computations that are sometimes lengthy and could interrupt the flow of the arguments. We have therefore decided to postpone them to the Appendix as they could also be of independent interest. \textbf{Remark.} Most of our results depend on two integral parameters: the genus $g$ of the underlying surface and the ``depth'' $d$ of the group $\mathcal{M}_{g,1}[d]$. We usually assume $g \geq 3$ to avoid singular behavior of low-genus mapping class groups. This is usually harmless since we will strongly rely on properties that are largely insensitive to a variation of $g$ (a.k.a. stability). A more serious restriction concerns $d$. When it is just an integer, our results usually require that $d \neq 0 \text{ mod } 4$. This restriction comes from the very distinct cohomological properties shown by symplectic groups with coefficients in $\mathbb{Z}/d\mathbb{Z}$ depending on whether $d = 0 \text{ mod } 4$ or not \cite{benson}, \cite{funarp}, \cite{Putman}. When $d$ is moreover prime, we have to further restrict ourselves to $d \neq 2 \text{ and } 3$ since for these primes the map from $\mathcal{M}_{g,1}[d]$ to its abelianization has a very different cohomological behavior from other primes; these cases will be explored in a future work. \textbf{Aknowlegdments} We would like to thank Luis Paris and Louis Funar for very enlightening comments on the first stages of this work. We also would like to thank Gwénaël Massuyeau and Quentin Faes for their comments and suggestions. \section{Preliminaries}\label{sec:prel} \subsection{Heegaard splittings of $3$-manifolds}\label{subsec:heegard} Let $\Sigma_g$ be an oriented surface of genus $g$ standardly embedded in the $3$-sphere $\mathbf{S}^3$. Denote by $\Sigma_{g,1}$ the complement of the interior of a small disc embedded in $\Sigma_g$ and fix a base point $x_0$ on the boundary of $\Sigma_{g,1}$. \begin{figure}[H] \begin{center} \begin{tikzpicture}[scale=.7] \draw[very thick] (-2,-2) -- (7,-2); \draw[very thick] (-2,2) -- (7,2); \draw[very thick] (-2,2) arc [radius=2, start angle=90, end angle=270]; \draw[very thick] (-2,0) circle [radius=.4]; \draw[very thick] (4.5,0) circle [radius=.4]; \draw[very thick] (0.5,0) circle [radius=.4]; \draw[thick, dotted] (2,0) -- (3,0); \node at (-2,0) {\tiny{1}}; \node at (0.5,0) {\tiny{2}}; \node at (4.5,0) {\tiny{g}}; \draw[thick,pattern=north west lines] (7,-2) to [out=130,in=-130] (7,2) to [out=-50,in=50] (7,-2); \end{tikzpicture} \end{center} \caption{Standardly embedded $\Sigma_{g,1}$ in $\mathbf{S}^3$} \label{fig_stand_embded} \end{figure} The surface $\Sigma_g$ separates the sphere into two genus $g$ handlebodies. By the inner handlebody $\mathcal{H}_g$ we mean the one that is visible in Figure \ref{fig_stand_embded} and by the outer handlebody $-\mathcal{H}_{g}$ the complementary handlebody; in both cases we identify the handlebodies with some fixed model. We orient our sphere so that the inner handlebody has the orientation compatible with that of $\Sigma_g$; then both handlebodies receive opposite orientations whence the notation. This presents $\mathbf{S}^3$ as the union of both handlebodies glued along their boundary by some orientation-reversing diffeomorphism $\iota_g: \Sigma_{g,1} \rightarrow \Sigma_{g,1}$, and we write $\mathbf{S}^3 = \mathcal{H}_g \cup_{\iota_g}-\mathcal{H}_g$. Let $$\mathcal{M}_{g,1}=\pi_0(\text{Diff}^+(\Sigma_{g,1}, \partial \Sigma_{g,1})),$$ denote the mapping class group of $\Sigma_{g,1}$ relative to the boundary. The above decomposition of the sphere hands us out three canonical subgroups of the mapping class group: \begin{itemize} \item $\mathcal{A}_{g,1}$, the subgroup of mapping classes that are restrictions of diffeomorphisms of the outer handlebody $-\mathcal{H}_g,$ \item $\mathcal{B}_{g,1}$, the subgroup of mapping classes that are restrictions of diffeomorphisms of the inner handlebody $\mathcal{H}_g,$ \item $\mathcal{AB}_{g,1}$, the subgroup of mapping classes that are restrictions of diffeomorphisms of the $3$-sphere $\mathbf{S}^3.$ \end{itemize} It is a theorem of Waldhausen, \cite{wald} that in fact, $\mathcal{AB}_{g,1}=\mathcal{A}_{g,1}\cap\mathcal{B}_{g,1}$. We can stabilize these subgroups by gluing one of the boundary components of a two-holed torus along the boundary of $\Sigma_{g,1}$, this defines an embedding $\Sigma_{g,1} \hookrightarrow \Sigma_{g+1,1}$ and extending an element of $\mathcal{M}_{g,1}$ by the identity over the torus defines the stabilization morphism $\mathcal{M}_{g,1}\hookrightarrow \mathcal{M}_{g+1,1}$, that is known to be injective. The definition of the above subgroups is compatible with the stabilization, and we have induced injective morphisms $\mathcal{A}_{g,1} \hookrightarrow \mathcal{A}_{g+1,1}$, etc. Similarly, the gluing map $\iota_g$ is compatible with stabilization in the sense that properly chosen we may assume: $\iota_{g+1|_{\Sigma_{g,1}}} = \iota_g$. Denote by $\mathcal{V}$ the set of oriented diffeomorphism classes of closed oriented smooth 3-manifolds. Given an element $\phi \in \mathcal{M}_{g,1}$, we denote by $S^3_\phi = \mathcal{H}_g \cup_{\iota_g\phi}-\mathcal{H}_g$ the manifold obtained by gluing the handlebodies\footnote{To be more precise, to build $S^3_\phi$ one has to fix a representative element $f$ of $\phi $ and glue along $\iota_g f$. The diffeomorphism type of the manifold is independent of the diffeotopy class of $f$, hence the abuse of notation~\cite[Chap.~8]{Hirsch}.} along $\iota_g\phi$. One checks that this gives a well-defined element in $\mathcal{V}$, and that this construction is compatible with stabilization, giving rise to a well defined map \[ \lim_{g\to \infty} \mathcal{M}_{g,1} \longrightarrow \mathcal{V}, \] which by a standard Morse theory argument is surjective. If $M$ is an oriented closed $3$-manifold, to fix a diffeomorphism $M \simeq S^3_\phi$ is by definition to give a Heegaard splitting of $M$. The failure of injectivity of this map is well understood. Consider the following double coset equivalence relation on $\mathcal{M}_{g,1}:$ \begin{equation}\label{eq_rel1} \phi \sim \psi \Longleftrightarrow \exists \zeta_a \in \mathcal{A}_{g,1}\;\exists \zeta_b \in \mathcal{B}_{g,1} \text{ such that } \zeta_a \phi \zeta_b=\psi. \end{equation} This equivalence relation is again compatible with the stabilization map, which induces well-defined maps between the quotient sets for genus $g$ and $g+1$, and we have: \begin{teo}[J. Singer \cite{singer}] \label{bij_MCG_3man} The following map is well defined and is bijective: \[ \begin{array}{ccl} {\displaystyle\lim_{g\to \infty}\mathcal{A}_{g,1}\backslash \mathcal{M}_{g,1}/\mathcal{B}_{g,1}} & \longrightarrow & \mathcal{V} \\ \phi & \longmapsto & S^3_\phi. \end{array} \] \end{teo} Our first goal will be to show in Section \ref{sec:parammoddhlgysphere} that this sort of parametrization by double classes holds true for interesting subsets of $\mathcal{V}$. \subsection{The Symplectic representation}\label{subsec:symprep} Fix a basis of $H_1(\Sigma_{g,1};\mathbb{Z})$ as in Figure~\ref{fig:homology_basis}. Transverse intersection of oriented paths on $\Sigma_{g,1}$ induces a symplectic form $\omega$ on $H_1(\Sigma_{g,1};\mathbb{Z})$, even better both sets of displayed homology classes $\{ a_i \ | \ 1 \leq i \leq g\}$ and $\{ b_i \ | \ 1 \leq i \leq g \}$ form a symplectic basis, and in particular generate supplementary transverse Lagrangians $A$ and $B$. As a symplectic space we write $H_1(\Sigma_{g,1};\mathbb{Z}) = A \oplus B$. \begin{figure}[H] \begin{center} \begin{tikzpicture}[scale=.7] \draw[very thick] (-4.5,-2) -- (5,-2); \draw[very thick] (-4.5,2) -- (5,2); \draw[very thick] (-4.5,2) arc [radius=2, start angle=90, end angle=270]; \draw[very thick] (-4.5,0) circle [radius=.4]; \draw[very thick] (-2,0) circle [radius=.4]; \draw[very thick] (2,0) circle [radius=.4]; \draw[thick, dotted] (-0.5,0) -- (0.5,0); \draw[<-,thick] (1.2,0) to [out=90,in=180] (2,0.8); \draw[thick] (2.8,0) to [out=90,in=0] (2,0.8); \draw[thick] (1.2,0) to [out=-90,in=180] (2,-0.8) to [out=0,in=-90] (2.8,0); \draw[<-, thick] (-5.3,0) to [out=90,in=180] (-4.5,0.8); \draw[thick] (-3.7,0) to [out=90,in=0] (-4.5,0.8); \draw[thick] (-5.3,0) to [out=-90,in=180] (-4.5,-0.8) to [out=0,in=-90] (-3.7,0); \draw[<-,thick] (-2.8,0) to [out=90,in=180] (-2,0.8); \draw[thick] (-1.2,0) to [out=90,in=0] (-2,0.8); \draw[thick] (-2.8,0) to [out=-90,in=180] (-2,-0.8) to [out=0,in=-90] (-1.2,0); \draw[thick] (-4.5,-0.4) to [out=180,in=90] (-5,-1.2); \draw[->,thick] (-4.5,-2) to [out=180,in=-90] (-5,-1.2); \draw[thick, dashed] (-4.5,-0.4) to [out=0,in=0] (-4.5,-2); \draw[thick] (-2,-0.4) to [out=180,in=90] (-2.5,-1.2); \draw[->,thick] (-2,-2) to [out=180,in=-90] (-2.5,-1.2); \draw[thick, dashed] (-2,-0.4) to [out=0,in=0] (-2,-2); \draw[thick] (2,-0.4) to [out=180,in=90] (1.5,-1.2); \draw[->,thick] (2,-2) to [out=180,in=-90] (1.5,-1.2); \draw[thick, dashed] (2,-0.4) to [out=0,in=0] (2,-2); \node [left] at (-5,-1.2) {$b_1$}; \node [above] at (-4.5,0.8) {$a_1$}; \node [left] at (-2.5,-1.2) {$b_2$}; \node [left] at (1.5,-1.2) {$b_g$}; \node [above] at (-2,0.8) {$a_2$}; \node [above] at (2,0.8) {$a_g$}; \draw[thick,pattern=north west lines] (5,-2) to [out=130,in=-130] (5,2) to [out=-50,in=50] (5,-2); \end{tikzpicture} \end{center} \caption{Homology basis of $H_1(\Sigma_{g,1};\mathbb{Z})$} \label{fig:homology_basis} \end{figure} The symplectic form is preserved by the natural action of the mapping class group on the first homology of $\Sigma_{g,1}$ and gives rise to the symplectic representation: \[ Mod(S_g)\longrightarrow Sp_{2g}(\mathbb{Z}). \] It is known, because for instance Dehn twists project onto transvections and these generate the symplectic groups, that this map is surjective (c.f. \cite{burk}). We will usually write elements in the symplectic groups by block matrices with respect to our choice of transverse Lagrangians $A \oplus B$. \subsection{Computing the first homology group from a Heegaard splitting}\label{subsec:computeH1(M)} Fix a Heegaard splitting of $M \in \mathcal{V}$. This describes $M$ as a push-out: \[ \xymatrix{ \Sigma_{g,1} \ar@{^(->}[r] \ar@{^(->}[d]_{\iota_g f}& \mathcal{H}_g \ar[d] \\ -\mathcal{H}_{g} \ar[r] & M. } \] Observe that canonically, for any coefficient ring $R,$ $H_1(\mathcal{H}_g;R) \simeq A \otimes R$ and $H_1(-\mathcal{H}_g;R) \simeq B \otimes R$. Write \[ H_1(f;\mathbb{Z})=\left(\begin{matrix} E & F \\ G & H \end{matrix}\right), \] and consider the Mayer-Viettoris sequence associated to the push-out: \[ \xymatrix{ 0 \ar[r] & H_2(M;R) \ar[r] & H_1( \Sigma_g;R) \ar[r]^-{\varphi} & H_1(\mathcal{H}_g;R)\oplus H_1(-\mathcal{H}_g;R) \ar@{->} `r/8pt[d] `/10pt[l] `^dl[ll] `^r/3pt[dll] [dll] \\ & H_1(M;R) \ar[r] & 0 & \\ } \] Homologically, the map $\iota_g$ exchanges the basis elements $a_i$ and $-b_i$. A direct inspection shows that then $\varphi=\left(\begin{smallmatrix} Id & 0 \\ G & H \end{smallmatrix}\right).$ Therefore, \begin{align*} H_2(M;R)= & \ker\left(\varphi: H_1(\Sigma_g;R) \longrightarrow H_1(\mathcal{H}_g;R)\oplus H_1(-\mathcal{H}_g;R)\right)=\ker(H), \\ H_1(M;R)= & \coker\left(\varphi: H_1(\Sigma_g;R) \longrightarrow H_1(\mathcal{H}_g;R)\oplus H_1(-\mathcal{H}_g;R)\right)=\coker(H). \end{align*} We are particularly interested in $R$-homology spheres: \begin{defi}\label{def:hmlgyspheres} An oriented $3$-manifold $M$ is an $R$-homology $3$-sphere if there is an isomorphism\footnote{If the isomorphism exists abstractly it is easy to check that the map $M \rightarrow S^3$ that collapses the complement of any small ball embedded in $M$ induces then another such isomorphism.} : \[ H_*(M;R) \simeq H_*(\mathbf{S}^3;R). \] We denote the set of $\mathbb{Q}$-homology spheres by $\mathcal{S}_{\mathbb{Q}}$, the set of integral homology spheres by $\mathcal{S}_ \mathbb{Z}$ and the set of $\mathbb{Z}/d\mathbb{Z}$-spheres by $\mathcal{S}_d$. \end{defi} The above computation shows in particular that if a mapping class $f \in \ker H_1(-;R)$, then $\varphi = Id$ and the resulting manifold $S^3_f$ is an $R$-homology sphere. The case $R = \mathbb{Z}$ is classical and has been extensively studied. Consider the short exact sequence: \begin{equation} \label{symp_rep_ext} \xymatrix@C=7mm@R=10mm{1 \ar@{->}[r] & \mathcal{T}_{g,1} \ar@{->}[r] & \mathcal{M}_{g,1} \ar@{->}[r] & Sp_{2g}(\mathbb{Z}) \ar@{->}[r] & 1.} \end{equation} The subgroup $\mathcal{T}_{g,1}$ is known as the Torelli group, and we have just argued that performing a Heegaard splitting with gluing map $f \in \mathcal{T}_{g,1}$ gives an integral homology sphere. It is a result of S. Morita~\cite{mor}, that the converse is true: any integral homology sphere can be obtained with such a gluing map, so that Singer's map induces a bijection: \[ \begin{array}{ccl} {\displaystyle \lim_{g\to \infty}\mathcal{A}_{g,1}\backslash \mathcal{T}_{g,1}/\mathcal{B}_{g,1}} & \longrightarrow & \mathcal{S}_\mathbb{Z}, \\ \phi & \longmapsto & S^3_\phi=\mathcal{H}_g \cup_{\iota_g\phi} -\mathcal{H}_g. \end{array} \] Here $\mathcal{A}_{g,1}\backslash \mathcal{T}_{g,1}/\mathcal{B}_{g,1}$ stands for the image of the canonical map $\mathcal{T}_{g,1}\rightarrow \mathcal{A}_{g,1}\backslash \mathcal{M}_{g,1}/\mathcal{B}_{g,1}$. We wish to find the same kind of parametrization for $\mathcal{S}_\mathbb{Q}$ and $\mathcal{S}_d$ and for this we need to properly define the corresponding Torelli and handlebody subgroups for these situations. \subsection{Symplectic representation of handlebody subgroups} \label{homol_homoto_actions} By construction the action of $\mathcal{B}_{g,1}$ (resp. $\mathcal{A}_{g,1})$ on $H_1(\Sigma_{g,1};\mathbb{Z})$ preserves the Lagrangian $B$ (resp. $A)$. Accordingly, the images of these subgroups and of $\mathcal{AB}_{g,1}$ lie in the stabilizers of $B$ (resp. $A$, resp. of the pair $(A,B)$) in the symplectic groups, which we denote $Sp^A_{2g}(\mathbb{Z})$, $Sp^B_{2g}(\mathbb{Z})$ resp. $Sp^{AB}_{2g}(\mathbb{Z})$. Checking for instance on generators (see for example Griffith \cite{grif}) one proves that these images are exactly these stabilizer subgroups in $Sp_{2g}(\mathbb{Z})$, which again we write by blocks: \begin{align*} \mathcal{A}_{g,1} \twoheadrightarrow Sp_{2g}^{A}(\mathbb{Z})=& \{ \text{symplectic matrices of the form } \left(\begin{smallmatrix} * & 0 \\ * & * \end{smallmatrix} \right) \} ,\\ \mathcal{B}_{g,1} \twoheadrightarrow Sp_{2g}^{B}(\mathbb{Z})=& \left\lbrace \text{symplectic matrices of the form } \left(\begin{smallmatrix} * & * \\ 0 & * \end{smallmatrix} \right) \right\rbrace ,\\ \mathcal{AB}_{g,1} \twoheadrightarrow Sp_{2g}^{AB}(\mathbb{Z})=& \left\lbrace \text{symplectic matrices of the form } \left(\begin{smallmatrix} * & 0 \\ 0 & * \end{smallmatrix} \right) \right\rbrace. \end{align*} For any integer $g$, and any coefficient ring $R,$ let $Sym_g(R)$ denote the group of symmetric $g \times g$ matrices. In the above decompositions the diagonal blocks are invertible matrices, more precisely we have a monomorphism: \[ \begin{array}{rcl} GL_g(\mathbb{Z}) & \longrightarrow & Sp_{2g}(\mathbb{Z}) \\ G & \longmapsto & \left(\begin{smallmatrix} G & 0 \\ 0 & {}^tG^{-1} \end{smallmatrix} \right). \end{array} \] We will often use this embedding without mention. Even better, we have canonical isomorphisms: \[ Sp_{2g}^B(\mathbb{Z}) \simeq Sym_g(\mathbb{Z}) \rtimes GL_g(\mathbb{Z}), \ Sp_{2g}^A(\mathbb{Z}) \simeq GL_g(\mathbb{Z}) \ltimes Sym_g(\mathbb{Z}), \ Sp_{2g}^{AB}(\mathbb{Z})\simeq GL_g(\mathbb{Z}). \] Denote by \[ \mathcal{TA}_{g,1} = \mathcal{A}_{g,1} \cap \mathcal{T}_{g,1}, \ \mathcal{TB}_{g,1} = \mathcal{B}_{g,1} \cap \mathcal{T}_{g,1} \ \text{ and } \ \mathcal{TAB}_{g,1} = \mathcal{AB}_{g,1} \cap \mathcal{T}_{g,1} \] the kernels of the symplectic representation restricted to these three subgroups. \subsection{Modulo $d$ handlebody and Torelli groups} Let $d\geq 2$ be an integer, and let $Sp_{2g}(\mathbb{Z}/d)$ denote the symplectic group modulo $d$. It is a non-obvious fact ( cf. \cite[Thm.~1]{newman}) that mod $d$ reduction of the coefficients gives a surjective map: \[ Sp_{2g}(\mathbb{Z}) \longrightarrow Sp_{2g}(\mathbb{Z}/d). \] Composing the symplectic representation of the mapping class group with this reduction we get a short exact sequence, whose kernel is by definition the mod $d$ Torelli group: \begin{equation} \label{ses_def_M[p]} \xymatrix@C=7mm@R=7mm{1 \ar@{->}[r] & \mathcal{M}_{g,1}[d] \ar@{->}[r] & \mathcal{M}_{g,1} \ar@{->}[r] & Sp_{2g}(\mathbb{Z}/d) \ar@{->}[r] & 1 .} \end{equation} We now define quite naturally the following mod $d$ handlebody subgroups of $\mathcal{M}_{g,1}[d]:$ $$\mathcal{A}_{g,1}[d]=\mathcal{M}_{g,1}[d]\cap \mathcal{A}_{g,1},\quad\mathcal{B}_{g,1}[d]=\mathcal{M}_{g,1}[d]\cap \mathcal{B}_{g,1},\quad\mathcal{AB}_{g,1}[d]=\mathcal{M}_{g,1}[d]\cap \mathcal{AB}_{g,1},$$ The mod $d$ Torelli group and the Torelli group are closely related. Indeed, if we denote $Sp_{2g}(\mathbb{Z},d)=\ker (Sp_{2g}(\mathbb{Z})\rightarrow Sp_{2g}(\mathbb{Z}/d))$, the level $d$ congruence subgroup, the symplectic representation restricted to the mod $d$ Torelli group gives a short exact sequence \begin{equation*} \xymatrix@C=7mm@R=7mm{1 \ar@{->}[r] & \mathcal{T}_{g,1} \ar@{->}[r] & \mathcal{M}_{g,1}[d] \ar@{->}[r] & Sp_{2g}(\mathbb{Z},d) \ar@{->}[r] & 1 .} \end{equation*} The first trivial observation is that by construction: \begin{prop}\label{prop:homologySphmodd} Let $d \geq 2$ be an integer. If $\phi \in \mathcal{M}_{g,1}[d]$, then the resulting manifold $S^3_{\phi}= \mathcal{H}_g \cup_{\iota_g\phi} -\mathcal{H}_g$ is a $\mathbb{Z}/d$-homology sphere. \end{prop} To understand whether the converse of this proposition holds true, we will first discern how these handlebody subgroups act on $H_1(\Sigma_{g,1};\mathbb{Z})$. \subsection{Modulo d homology actions of handlebody groups}\label{subsec:modhandlebody} To avoid too heavy notation we will sometimes abbreviate $H:=H_1(\Sigma_{g,1};\mathbb{Z}),$ $H_d:=H_1(\Sigma_{g,1};\mathbb{Z}/d)$ and similarly $A_d$, $B_d$ for the canonical images of the Lagrangians $A$ and $B$ in $H_d$. The main difference between the action of the mapping class group on $H_d$ and its action on $H$, is that, when restricted to $\mathcal{B}_{g,1}$ the action does not induce a surjective homomorphism onto the stabilizer of the Lagrangian $B$ mod $d$. There is however a stable isomorphism as we will see. As in the integer case, writing the matrices of the symplectic group $Sp_{2g}(\mathbb{Z}/d)$ by blocks according to the decomposition $H_d=A_d\oplus B_d$, by direct inspection we have isomorphisms for the stabilizers of these Lagrangians: \begin{align*} &Sp_{2g}^A(\mathbb{Z}/d) \simeq GL_g(\mathbb{Z}/d) \ltimes Sym_g(\mathbb{Z}/d), \\ & Sp_{2g}^B(\mathbb{Z}/d) \simeq Sym_g(\mathbb{Z}/d) \rtimes GL_g(\mathbb{Z}/d) , \\ & Sp_{2g}^{AB}(\mathbb{Z}/d) \simeq GL_g(\mathbb{Z}/d). \end{align*} Let us also denote the kernels of the maps induced by reducing the coefficients mod $d$ by: \begin{align*} SL_g(\mathbb{Z},d)= & \ker\left(r_d:SL_g(\mathbb{Z})\rightarrow SL_g(\mathbb{Z}/d)\right), \\ Sym_g(d\mathbb{Z})= & \ker\left(r_d:Sym_g(\mathbb{Z})\rightarrow Sym_g(\mathbb{Z}/d)\right). \end{align*} Since the action in mod $d$ homology of $\mathcal{A}_{g,1}$ (resp. $\mathcal{B}_{g,1}$, resp. $\mathcal{AB}_{g,1})$ still stabilizes the Lagrangian $A_d$ (resp. $B_d$, resp. both Lagrangians), we have a commutative diagram: \[ \xymatrix{ 0 \ar[r] & \mathcal{TA}_{g,1}\ar[r] \ar[d] & \mathcal{A}_{g,1} \ar@{=}[d] \ar[r] & Sp^A_g(\mathbb{Z}) \ar[d]^{r_d} \ar[r] & 0 \\ 0 \ar[r] & \mathcal{A}_{g,1}[d] \ar[r] & \mathcal{A}_{g,1} \ar[r] & Sp^A_g(\mathbb{Z}/d) } \] There are of course similar diagrams for $\mathcal{B}_{g,1}$ and $\mathcal{AB}_{g,1}$. Our main obstacle in proving a Singer-type result for $\mathbb{Z}/d$-homology spheres is that in almost no case is the rightmost vertical arrow surjective. This is due to the fact that the map $GL_g(\mathbb{Z})\rightarrow GL_g(\mathbb{Z}/d)$ is not in general surjective. We now proceed to compute the image of the handlebody subgroups in $Sp_{2g}(\mathbb{Z}/d)$. For this we take advantage of the description of these stabilizer subgroups as semi-direct products. We may however, by the kernel-cokernel exact sequence, record for further reference the action in integral homology of the mod $d$ handlebody subgroups: \begin{lema} \label{lem:extensionshandelbody} Given a positive integer $d,$ the restriction of the symplectic representation to the mod d handlebody subgroups $\mathcal{A}_{g,1}[d],$ $\mathcal{B}_{g,1}[d],$ $\mathcal{AB}_{g,1}[d]$ gives us the following extensions of groups: \begin{align*} & \xymatrix@C=7mm@R=3mm{1 \ar@{->}[r] & \mathcal{TB}_{g,1} \ar@{->}[r] & \mathcal{B}_{g,1}[d] \ar@{->}[r] & SL_g(\mathbb{Z},d)\ltimes Sym_g^B(d\mathbb{Z}) \ar@{->}[r] & 1,\\ 1 \ar@{->}[r] & \mathcal{TA}_{g,1} \ar@{->}[r] & \mathcal{A}_{g,1}[d] \ar@{->}[r] & SL_g(\mathbb{Z},d)\ltimes Sym_g^A(d\mathbb{Z}) \ar@{->}[r] & 1,\\ 1 \ar@{->}[r] & \mathcal{TAB}_{g,1} \ar@{->}[r] & \mathcal{AB}_{g,1}[d] \ar@{->}[r] & SL_g(\mathbb{Z},d) \ar@{->}[r] & 1 .} \end{align*} \end{lema} In the following sections, to avoid unnecessarily cumbersome notation, we denote by $Sp_{2g}^{A}(\mathbb{Z},d)$ (resp. $Sp_{2g}^{B}(\mathbb{Z},d)$) the image of $\mathcal{A}_{g,1}[d]$ (resp. $\mathcal{B}_{g,1}[d]$) in $Sp_{2g}(\mathbb{Z},d).$ Let $R$ be a ring. Denote by $E_g(R)$ the subgroup of $SL_g(R)$ generated by the elementary matrices of rank $g$, i.e. those matrices of the form $Id + e_{ij}$ with $i \neq j$ where $e_{ij}$ is zero but for entry $(i,j)$ which is equal to $1$. Denote by $D_g$ the matrix $\left(\begin{smallmatrix} -1 & 0 \\ 0 & Id_{g-1} \end{smallmatrix}\right).$ Finally set $SL^\pm_g(\mathbb{Z}/d)= \{ A\in M_{g\times g}(\mathbb{Z}/d) \mid det(A)=\pm 1 \}$. \begin{lema}\label{lem_Sp[p]_2} Given a prime number $p$, mod-$p$ reduction of the coefficients induces a short exact sequence of groups $$ \xymatrix@C=7mm@R=13mm{1 \ar@{->}[r] & SL_g(\mathbb{Z},p) \ar@{->}[r] & GL_g(\mathbb{Z}) \ar@{->}[r]^-{r_p} & SL_g^\pm(\mathbb{Z}/p) \ar@{->}[r] & 1. } $$ \end{lema} \begin{proof} The only non-trivial fact is surjectivity. Clearly, mod-$p$ reduction induces a map $GL_g(\mathbb{Z}) \rightarrow SL_g^\pm(\mathbb{Z}/p)$, since the only invertibles in $\mathbb{Z}$ are $\pm1$. To show this is surjective, observe that for any ring $R$ we have $SL_g^{\pm}(R) = D_g\cdot SL_g(R)$. Clearly mod-$p$ reduction maps the matrix $D_g$ onto $D_g$. Finally, since $p$ is prime $SL_g(\mathbb{Z}/p)=E_g(\mathbb{Z}/p)$~\cite{green}, and clearly $r_p(E_g(\mathbb{Z})) = E_g(\mathbb{Z}/p)$. \end{proof} By \cite[Lemma 1]{newman}, for any integers $d$ and $g$ there is a short exact sequence of groups $$ \xymatrix@C=7mm@R=13mm{1 \ar@{->}[r] & Sym_g(d\mathbb{Z}) \ar@{->}[r] & Sym_g(\mathbb{Z}) \ar@{->}[r]^-{r_d} & Sym_g(\mathbb{Z}/d) \ar@{->}[r] & 1 .} $$ From Lemma~\ref{lem_Sp[p]_2} and this exact sequence we immediately get: \begin{lema}\label{lem_Sp[p]_3} Given a prime number $p$, mod-$p$ reduction of the coefficients induces a short exact sequence of groups: $$ \xymatrix@C=4mm@R=4mm{1 \ar@{->}[r] & SL_g(\mathbb{Z},p) \ltimes Sym_g(p\mathbb{Z}) \ar@{->}[r] & GL_g(\mathbb{Z})\ltimes Sym_g(\mathbb{Z}) \ar@{->}[r] & SL^\pm_g(\mathbb{Z}/p)\ltimes Sym_g(\mathbb{Z}/p) \ar@{->}[r] & 1.} $$ \end{lema} We now have, for any prime $p$, maps of short exact sequences of groups (we only picture the case $\mathcal{A}_{g,1}$, the other two are similar): \[ \xymatrix{ 0 \ar[r] & \mathcal{A}_{g,1}\ar[r] \ar[d] & \mathcal{A}_{g,1} \ar@{=}[d] \ar[r] & Sp^A_{2g}(\mathbb{Z}) \ar[d]^{r_p} \ar[r] & 0 \\ 0 \ar[r] & \mathcal{A}_{g,1}[p] \ar[r] & \mathcal{A}_{g,1} \ar[r] & SL_g^{\pm}(\mathbb{Z}/p) \ltimes Sym_g(\mathbb{Z}/p) \ar[r]& 0 } \] \begin{lema}\label{lem_B[p]} Given a prime number $p,$ the restriction of the symplectic representation modulo p to $\mathcal{A}_{g,1},$ $\mathcal{B}_{g,1}$ and $\mathcal{AB}_{g,1}$ give us the following extensions of groups: \begin{align*} & \xymatrix@C=7mm@R=3mm{1 \ar@{->}[r] & \mathcal{A}_{g,1}[p] \ar@{->}[r] & \mathcal{A}_{g,1} \ar@{->}[r] & SL_g^\pm(\mathbb{Z}/p)\ltimes Sym_g(\mathbb{Z}/p) \ar@{->}[r] & 1,\\ 1 \ar@{->}[r] & \mathcal{B}_{g,1}[p] \ar@{->}[r] & \mathcal{B}_{g,1} \ar@{->}[r] & SL_g^\pm(\mathbb{Z}/p)\rtimes Sym_g(\mathbb{Z}/p) \ar@{->}[r] & 1,\\ 1 \ar@{->}[r] & \mathcal{AB}_{g,1}[p] \ar@{->}[r] & \mathcal{AB}_{g,1} \ar@{->}[r] & SL_g^\pm(\mathbb{Z}/p) \ar@{->}[r] & 1. } \end{align*} \end{lema} Again to avoid unnecessarily cumbersome notation, we denote by $Sp_{2g}^{A\pm}(\mathbb{Z}/d)$ (resp. $Sp_{2g}^{B\pm}(\mathbb{Z}/d)$) the image of $\mathcal{A}_{g,1}$ (resp. $\mathcal{B}_{g,1}$) in $Sp_{2g}(\mathbb{Z}/d).$ Let us point out that Lemma \ref{lem_Sp[p]_2} and hence Lemmas \ref{lem_Sp[p]_3} and \ref{lem_B[p]} are not valid for a non-prime integer $d.$ This comes from the fact that $SL_g(\mathbb{Z})\rightarrow SL_g(\mathbb{Z}/d)$ is surjective if and only if $d$ is prime, because $SL_g(\mathbb{Z}/d)$ coincides with the elementary subgroup $E_g(\mathbb{Z}/d)$ if and only if $d$ is prime. Nevertheless, taking the direct limit of the above families of groups one gets that in the limit $E(\mathbb{Z}/d)=SL(\mathbb{Z}/d)$ for every positive integer $d$ (cf. \cite[Lemma~III.1.4]{Weib}) and therefore we get back our results for an arbitrary integer with the same proof, but stably. To be more precise, for any coefficient ring $R,$ set $SL_\infty^\pm(R), Sym_\infty(R)$ the direct limit of the families $\{ SL_g^\pm(R)\}_g,$ $\{ Sym_g(R)\}_g$ respectively. If we denote by $\mathcal{M}_{\infty,1}$ the direct limit of the family $\{\mathcal{M}_{g,1}\}_g$ along the stabilization map $i_{g,g+1}:\mathcal{M}_{g,1}\rightarrow \mathcal{M}_{g+1,1}.$ Then we have the following natural subgroups of $\mathcal{M}_{\infty,1}:$ \[ \begin{array}{ccc} \mathcal{A}_{\infty, 1}=\varinjlim\mathcal{A}_{g, 1}, & \mathcal{B}_{\infty, 1}=\varinjlim\mathcal{B}_{g, 1}, & \mathcal{AB}_{\infty, 1}=\varinjlim\mathcal{AB}_{g, 1}, \\ \mathcal{A}_{\infty, 1}[d]=\varinjlim\mathcal{A}_{g, 1}[d], & \mathcal{B}_{\infty, 1}[d]=\varinjlim\mathcal{B}_{g, 1}[d], & \mathcal{AB}_{\infty, 1}[d]=\varinjlim\mathcal{AB}_{g, 1}[d], \end{array} \] that fit in the following group extensions: \begin{lema}\label{lem_B[d]_3_stab} Given an integer $d$ there are short exact sequences of groups \begin{equation*} \begin{aligned} & \xymatrix@C=7mm@R=3mm{1 \ar@{->}[r] & \mathcal{B}_{\infty ,1}[d] \ar@{->}[r] & \mathcal{B}_{\infty ,1} \ar@{->}[r] & SL_\infty^\pm(\mathbb{Z}/d)\ltimes Sym_\infty(\mathbb{Z}/d) \ar@{->}[r] & 1,\\ 1 \ar@{->}[r] & \mathcal{A}_{\infty ,1}[d] \ar@{->}[r] & \mathcal{A}_{\infty ,1} \ar@{->}[r] & SL_\infty^\pm(\mathbb{Z}/d)\ltimes Sym_\infty(\mathbb{Z}/d) \ar@{->}[r] & 1,\\ 1 \ar@{->}[r] & \mathcal{AB}_{\infty ,1}[d] \ar@{->}[r] & \mathcal{AB}_{\infty,1} \ar@{->}[r] & SL_\infty^\pm(\mathbb{Z}/d) \ar@{->}[r] & 1.} \end{aligned} \end{equation*} \end{lema} \subsection{Lie algebras of arithmetic groups}\label{subsec:Liealgebras} In this section we present the Lie algebras of some arithmetic groups and related properties that we will use throughout this work. Let $d\geq 2$ be a positive integer, we denote by $\mathfrak{gl}_{g}(\mathbb{Z}/d)$, $\mathfrak{sl}_{g}(\mathbb{Z}/d)$, $\mathfrak{sp}_{2g}(\mathbb{Z}/d)$ the Lie algebras of $GL_{g}(\mathbb{Z}/d)$, $SL_{g}(\mathbb{Z}/d)$, $Sp_{2g}(\mathbb{Z}/d)$ respectively, which can be described as follows: \begin{align*} \mathfrak{gl}_g(\mathbb{Z}/d)=&\lbrace\text{additive group of } g\times g \text{ matrices with coefficients in } \mathbb{Z}/d \rbrace,\\ \mathfrak{sl}_g(\mathbb{Z}/d)=&\lbrace M\in \mathfrak{gl}_g(\mathbb{Z}/d) \mid tr(M)=0 \rbrace, \\ \mathfrak{sp}_{2g}(\mathbb{Z}/d)= & \lbrace M\in \mathfrak{gl}_{2g}(\mathbb{Z}/d) \mid {}^tM J + J M = 0 \text{ where } J = \left( \begin{smallmatrix} Id & 0 \\ 0 & -Id \end{smallmatrix} \right) \rbrace. \end{align*} From the definition of the Symplectic Lie algebra, if one writes its elements by blocks of the form $\left(\begin{smallmatrix} \alpha & \beta \\ \gamma & \delta \end{smallmatrix}\right)$ one gets that $\alpha=-\delta^t,$ $\beta=\beta^t,$ $\gamma=\gamma^t.$ Therefore there is a decomposition of $\mathbb{Z}/d$-modules: \begin{equation} \label{dec_sp} \mathfrak{sp}_{2g}(\mathbb{Z}/d)\simeq \mathfrak{gl}_g(\mathbb{Z}/d)\oplus Sym^A_g(\mathbb{Z}/d)\oplus Sym^B_g(\mathbb{Z}/d). \end{equation} where the superscript $A$ or $B$ refers to the position of the symmetric group ($A$ for position of block matrix $\beta$ and $B$ for position of block matrix $\gamma$). Moreover this is a decomposition as $GL_g(\mathbb{Z})$-modules, where $GL_g(\mathbb{Z})$ acts on $\mathfrak{sp}_{2g}(\mathbb{Z}/d)$ by conjugation of matrices of the form $\left(\begin{smallmatrix} G & 0 \\ 0 & {}^tG^{-1} \end{smallmatrix}\right)$ with $G\in GL_g(\mathbb{Z})$. More precisely $GL_g(\mathbb{Z})$ acts on $\mathfrak{gl}_g(\mathbb{Z}/d)$ by conjugation, on $Sym^A_g(\mathbb{Z}/d)$ by $G.\beta=G\beta\;{}^t G$ and on $Sym^B_g(\mathbb{Z}/d)$ by $G.\gamma={}^tG^{-1}\gamma \;G^{-1}$. The above Lie algebras are closely related to the abelianization functors. We will only explain the details for the symplectic group since this is the case of most interest to us. In \cite[ Section 1]{Lee}, R. Lee and R.H. Szczarba showed that given an integer $d\geq 2$ there is an $Sp_{2g}(\mathbb{Z})$-equivariant homomorphism \begin{align*} \alpha: Sp_{2g}(\mathbb{Z},d) & \longrightarrow \mathfrak{sp}_{2g}(\mathbb{Z}/d) \\ Id_{2g} +dA & \longmapsto A \;(\text{mod }d) \end{align*} which induces a short exact sequence \begin{equation} \label{ses_abel_d1} \xymatrix@C=7mm@R=13mm{1 \ar@{->}[r] & Sp_{2g}(\mathbb{Z},d^2) \ar@{->}[r] & Sp_{2g}(\mathbb{Z},d) \ar@{->}[r]^{\alpha} & \mathfrak{sp}_{2g}(\mathbb{Z}/d) \ar@{->}[r] & 1 .} \end{equation} For almost all values of $d$ this exact sequence computes the abelianization of the level $d$ congruence subgroup. In \cite{per}, \cite{Putman_abel}, \cite{sato_abel}, B. Perron, A. Putman and M. Sato respectively proved independently that for any $g\geq 3$ and an odd integer $d\geq 3,$ $$[Sp_{2g}(\mathbb{Z},d),Sp_{2g}(\mathbb{Z},d)]=Sp_{2g}(\mathbb{Z},d^2).$$ And for $d$ even they show that there is a short exact sequence of $Sp_{2g}(\mathbb{Z})$-modules, \begin{equation*} \xymatrix@C=7mm@R=10mm{0 \ar@{->}[r] & H_1(\Sigma_{g,1};\mathbb{Z}/2) \ar@{->}[r] & H_1(Sp_{2g}(\mathbb{Z},d);\mathbb{Z}) \ar@{->}[r] & \mathfrak{sp}_{2g}(\mathbb{Z}/d) \ar@{->}[r] & 0 .} \end{equation*} \subsection{Homological tools} \label{subsec-hom-tools} We now record for the convenience of the reader some of the homological tools that we will constantly use. \subsubsection*{Hochshild-Serre spectral sequence} Let \[ \xymatrix{ 1 \ar[r] & K \ar[r] & G \ar[r] & Q \ar[r] & 1 } \] be a group extension. Then, for any $G$-module $M$, there are two strongly convergent first-quadrant spectral sequences: \[ E^{2}_{p,q} = H_p(Q;H_q(K,M)) \Rightarrow H_{p+q}(G;M) \textrm{ the homological spectral sequence} \] and \[ E_{2}^{p,q} = H^p(Q;H^q(K,M)) \Rightarrow H^{p+q}(G;M) \textrm{ the cohomological spectral sequence}. \] \subsubsection*{Exact sequences in low homological degree} A basic application of the Hoschild-Serre spectral sequences is to produce the classical $5$-term exact sequence associated to a group extension as above. For any $G$-module $M$ there are exact sequences: \[ H_2(G;M) \rightarrow H_2(Q,M) \rightarrow H_1(K,M)_Q \rightarrow H_1(G;M) \rightarrow H_1(Q;M) \rightarrow 0 \] and \[ 0 \rightarrow H^1(Q;M) \rightarrow H^1(G;M) \rightarrow H^1(K;M)^Q \rightarrow H^2(Q;M) \rightarrow H^2(G;M). \] We will need two variants of these sequences, one weaker form and one stronger form. First recall that the morphism $H_1(K,M)_Q \rightarrow H_1(G;M)$ is induced by the inclusion $K \hookrightarrow G$, in particular we have an exact sequence: \[ H_1(K,M) \rightarrow H_1(G;M) \rightarrow H_1(Q;M) \rightarrow 0 \] which we will refer to as the ``$3$-term exact sequence". The analogous exact sequence obviously exists in cohomology. These turn to be convenient when we apply further a right-exact functor like the coinvariants in the homological case and a left exact functor, like the invariants in the cohomological case. A deeper result involves \emph{extending} the $5$-term exact sequences to the left for the homological one and to the right for the cohomological one. A lot of work has been put into this, we will use here the extension by Dekimpe-Hartl-Wauters \cite{hartl} which states that given a group extension as above there is a functorial $7$-term exact sequence in cohomology: \[ \xymatrix@C=7mm@R=5mm{ 0 \ar[r] & H^1(Q;M) \ar[r] & H^1(G;M) \ar[r] & H^1(K;M)^Q \ar[r] & H^2(Q;M) \\ \ar[r] & H^2(G;M)_1 \ar[r] & H^1(Q;H^1(K;M)) \ar[r] & H^3(Q;M^K) } \] Here $H^2(G;M)_1$ denotes the kernel of the restriction map $H^2(G;M) \rightarrow H^2(K;M)$. \subsubsection*{The Universal coefficient Theorem for p-elementary abelian groups, p odd.} \label{sec-saunders} Let $Q$ and $A$ be $p$-elementary abelian groups with $Q$ acting trivially on $A$, by the Universal Coefficient Theorem (from now on UCT for short) there is a short exact sequence of $\mathbb{Z}/p$-modules: $$ \xymatrix@C=5mm@R=13mm{ 0 \ar@{->}[r] & Ext^1_\mathbb{Z}(Q,A) \ar@{->}[r]^{i} & H^2(Q; A) \ar@{->}[r]^-{\theta} & Hom(\Lambda^2 Q;A) \ar@{->}[r] & 0 .} $$ The map $\theta$ is a kind of antisymmetrization: it sends the class of the normalized $2$-cocycle $c$ to the alternating bilinear map $(g,h) \mapsto c(g,h) - c(h,g)$. In \cite{McLane}, S. MacLane gave an effective calculation of $Ext_{\mathbb{Z}}^1(Q;A)$ by constructing a natural homomorphism \begin{equation} \label{iso-ext-hom} \nu: H^2(Q;A)\rightarrow Hom(Q,A) \end{equation} whose restriction to $Ext_{\mathbb{Z}}^1(Q;A)$ is an isomorphism as follows. Given a central extension $c$ $$ \xymatrix@C=6mm@R=13mm{ 0 \ar@{->}[r] & A \ar@{->}[r]^-{j} & G \ar@{->}[r]^-{\pi} & Q \ar@{->}[r] & 0,} $$ observe that for any lift $\tilde{x}$ of an element $x \in G$, $\tilde{x}^p \in A$, because $Q$ is a $p$-group. The homomorphism $\nu(c)\in Hom(Q,A)$ is the map that sends each element $x\in Q$ to $(\widetilde{x}\;{}^p)\in A$. The inverse of $\nu$ restricted to $Ext_{\mathbb{Z}}^1(Q;A)$ is given by functoriality. Fix an abelian extension $d\in Ext_{\mathbb{Z}}^1(A;A)$ with $\nu(d)=id$. Then for a homomorphism $f\in Hom(Q,A),$ we have that $f=f^*(id)=f^*\nu(d)=\nu(f^*d).$ Therefore the inverse of $\nu$ is given by $\nu^{-1}(f)=f^*d\in Ext_{\mathbb{Z}}^1(Q;A).$ Trivially any bilinear map $\beta$ on $Q$ with values in $A$ is a $2$-cocycle, and in particular if $\beta$ is antisymmetric, and abusing the notation $\theta(\beta) = 2\beta$. As $p\neq 2$, $2$ is invertible in $\mathbb{Z}/p,$ this gives us a canonical section of $\theta$, by sending an alternating bilinear map $\alpha$ to the extension defined by the cocycle $\frac{1}{2}\alpha$. It turns out that the associated retraction, that sends the class of a cocycle $c$ to $\nu(c-\frac{1}{2}\theta(c))$ coincides with the map $\nu: H^2(Q;A)\rightarrow Hom(Q,A)$. Indeed, $\nu(c-\frac{1}{2}\theta(c))= \nu(c)-\frac{1}{2}\nu(\theta(c))$ and since $\theta(c)$ is an antisymmetric bilinear form $\nu(\theta(c))$ is in fact zero. To see this, consider the extension with associated $2$-cocycle $\theta(c)$: $$ \xymatrix@C=6mm@R=13mm{ 0 \ar@{->}[r] & A \ar@{->}[r]^-{j} & A\times_{\theta(c)} Q \ar@{->}[r] & Q \ar@{->}[r] & 0.} $$ Here we recall that $A\times_{\theta(c)} Q$ stands for the set $A\times Q$ with group law given by the product: $$(a,g)(b,h)=(a+b+\theta(c)(g,h), g+h).$$ Then $\nu(\theta(c))$ is the homomorphism in $Hom(Q,A)$ which sends $x$ to $(0,x)^p$. Knowing that $\theta(c)$ is bilinear and antisymmetric, we compute directly: \[ (0,x)^p=\Big(\sum_{i=1}^{p-1} \theta(c)(x,ix), 0\Big)=\Big(\sum_{i=1}^{p-1} i\theta(c)(x,x), 0\Big)=(0,0)=0. \] Summing up, for an odd prime $p$ and $A$, $Q$ elementary abelian $p$-groups, we have a natural isomorphism: \begin{equation} \label{mcLane-UCT-iso} \theta\oplus \nu:\;H^2(Q;A)\rightarrow Hom(\Lambda^2 Q;A) \oplus Hom(Q,A). \end{equation} \subsubsection*{A tool to annihilate homology and cohomology groups.} Finally, a number of our computations will rely on the next two classical results. The first one allows to switch from cohomology to homology \begin{lema}[\cite{brown}, Proposition VI.7.1.] \label{lema_duality_homology} Given a finite group $G$, an integer $d$ and $M$ a $\mathbb{Z}G/d$-module, denote by $M^*$ the dual module $Hom(M,\mathbb{Z}/d)$. Then there is a natural isomorphism $H^k(G;M^*)\simeq (H_k(G;M))^*$ for every $k\geq 0$. \end{lema} and the second is a classical vanishing result: \begin{lema}[Center kills lemma (\cite{dupont}, Lemma 5.4)] \label{lem_cen_kill} Given an arbitrary group $G$ and $M$ a (left) $RG$-module ($R$ any commutative ring), if there exists a central element $\gamma\in G$ such that for some $r\in R,$ $\gamma x=rx$ for all $x\in M.$ Then $(r-1)$ annihilates $H_*(G,M).$ \end{lema} \section{Parametrization of mod $d$ homology $3$-spheres}\label{sec:parammoddhlgysphere} We now turn to our first main goal: the parametrization of $\mathbb{Z}/d$-homology spheres via the mod $d$ Torelli group. Given an integer $d\geq 2$, a Heegaard splitting with gluing map an element of the mod $d$ Torelli group is a $\mathbb{Z}/d$-homology sphere, and therefore a $\mathbb{Q}$-homology sphere. Every $\mathbb{Q}$-homology sphere can be obtained as a Heegaard splitting with gluing map an element of the mod $d$ Torelli group for an appropriate $d$. This last result was announced by B.~Perron in \cite[Prop. 6]{per}, where he stated that given a $\mathbb{Q}$-homology $3$-sphere $M^3$, if we set $n=|H_1(M^3;\mathbb{Z})|$, the cardinality of this homology group, then $M^3$ can be obtained as a Heegaard splitting with gluing map an element of the mod $d$ Torelli group for any $d$ that divides $n-1$. We shall here provide a proof of a slightly more general statement in which we allow $d$ to divide either $n-1$ or $n+1$, and show that the divisibility condition is necessary. If we specify these results to parameterize the set $\mathcal{S}^3(d)$ of $\mathbb{Z}/d$-homology spheres the situation is slightly more subtle. Let us denote by $\mathcal{S}^3[d]$ the set of those manifolds that admit a Heegaard splitting with gluing map an element of $\mathcal{M}_{g,1}[d]$ for some $g \geq 1$. As we observed in Proposition~\ref{prop:homologySphmodd}, by definition of the mod $d$ Torelli groups $\mathcal{S}^3[d] \subset \mathcal{S}^3(d)$, but as we shall see equality seldom occurs. Let us first determine some homological properties of the gluing maps of $\mathbb{Q}$-homology spheres. The next result is the classic description of matrix equivalence classes in $M_n(\mathbb{Z})$, the group of $n\times n$ matrices with integral coefficients. \begin{teo}[\cite{Gock}, Theorem 368]\label{teo:smith} Let $A\in M_{n}(\mathbb{Z})$ be given. Then there exist matrices $U,V\in GL_n(\mathbb{Z})$ and a diagonal matrix $D\in M_{n}(\mathbb{Z})$ whose diagonal entries are integers $d_1,d_2,\ldots , d_r,0,\ldots , 0,$ with $d_i \neq 0$ and $d_i|d_{i+1}$ for $i=1,2,\ldots , r-1,$ such that \[ A = UDV. \] Moreover the matrix $D$ is unique up to the sign of each entry; it is called the Smith normal form of $A$ and the integers $d_1,d_2,\ldots, d_r$ are called the \textit{invariant factors} of $A$. \end{teo} As an immediate application we have: \begin{lema}\label{lema_n_detH} Let $f\in \mathcal{M}_{g,1}$ and assume $S^3_f=\mathcal{H}_g\cup_{\iota_gf} -\mathcal{H}_g$ is a $\mathbb{Q}$-homology sphere. Let $n$ denote the cardinal of $H_1(S^3_f;\mathbb{Z})$ and write $H_1(f;\mathbb{Z})=\left(\begin{smallmatrix} E & F \\ G & H \end{smallmatrix}\right).$ Then $n=|\det(H)|.$ \end{lema} \begin{proof} By Section \ref{subsec:computeH1(M)} we know that $H_1(S^3_f;\mathbb{Z})\simeq \coker(H)$ and by Theorem~\ref{teo:smith} above, we have matrices $U,V\in GL_{2g}(\mathbb{Z})$ such that $$UHV=\left(\begin{smallmatrix} d_1 & & & & & \\ & \ddots & & & & \\ & & d_k & & & \\ & & & 0 & & \\ & & & & \ddots & \\ & & & & & 0 \end{smallmatrix}\right).$$ As a consequence, \begin{equation*} \coker(H)\simeq \mathbb{Z}/d_1\times \mathbb{Z}/d_2\times \cdots \mathbb{Z}/d_k\times \mathbb{Z}^{g-k}. \end{equation*} Since $S^3_f$ is a $\mathbb{Q}$-homology sphere, by the UCT, we have that $$0=H_1(S^3_f;\mathbb{Q})\simeq H_1(S^3_f;\mathbb{Z})\otimes \mathbb{Q}\simeq \mathbb{Q}^{g-k},\quad \text{so} \quad g=k.$$ Then \begin{equation*} \det(H)=\pm \det(UHV)=\pm \prod_{i=1}^{g}d_i\neq 0, \end{equation*} and indeed \begin{equation*} n=|H_1(S^3_f;\mathbb{Z})|= \Big|\prod_{i=1}^{g}d_i \Big| \neq 0. \end{equation*} \end{proof} We now turn to our first result describing the relation between $\mathbb{Q}$-homology spheres and elements in the mod $d$ Torelli groups. This result is inspired in \cite[Prop. 6]{per} due to B.~Perron. We remind the reader that a $\mathbb{Q}$-homology sphere has finite first homology group. \begin{teo}\label{teo_rat_homology_gen} Let $M$ be a $\mathbb{Q}$-homology sphere and $n=|H_1(M;\mathbb{Z})|$, the cardinal of this finite homology group. Then $M\in \mathcal{S}^3[d]$ for some $d \geq 2$ if and only if $d$ divides either $n-1$ or $n+1.$ \end{teo} \begin{proof} We use the notation of Lemma \ref{lema_n_detH} above. Given $d\geq 2,$ assume that $M\in \mathcal{S}^3[d].$ Fix an element $f\in \mathcal{M}_{g,1}[d]$ such that $M\cong\mathcal{H}_g\cup_{\iota_gf} -\mathcal{H}_g.$ Since $f\in \mathcal{M}_{g,1}[d],$ we know that $H_1(f;\mathbb{Z})\in Sp_{2g}(\mathbb{Z},d)$ and $\det H = 1 \text{ mod } d$. Then by Lemma \ref{lema_n_detH} we deduce that $n\equiv \pm 1 \;(\text{mod } d)$. For the converse, we assume that $d\geq 2$ divides either $n-1$ or $n+1$. By Theorem \ref{bij_MCG_3man}, there exists an element $f\in\mathcal{M}_{g,1}$ such that $M$ is homeomorphic to $\mathcal{H}_g\cup_{\iota_gf} -\mathcal{H}_g.$ By definition of $\mathcal{M}_{g,1}[d]$ we have a short exact sequence \begin{equation} \label{ses_def_MCGmodp} \xymatrix@C=7mm@R=10mm{1 \ar@{->}[r] & \mathcal{M}_{g,1}[d] \ar@{->}[r] & \mathcal{M}_{g,1} \ar@{->}[r] & Sp_{2g}(\mathbb{Z}/d) \ar@{->}[r] & 1 .} \end{equation} It is enough to show that there exist matrices $X\in Sp_{2g}^{A\pm}(\mathbb{Z}/d),$ $Y\in Sp_{2g}^{B\pm}(\mathbb{Z}/d),$ such that \begin{equation} \label{eq_XY} XH_1(f;\mathbb{Z}/d)Y=Id. \end{equation} Indeed, by Lemma~\ref{lem_B[d]_3_stab} we then know that there exists an integer $h\geq g$ and elements $\xi_a\in \mathcal{A}_{h,1},$ $\xi_b\in\mathcal{B}_{h,1}$, such that $H_1(\xi_a;\mathbb{Z}/d)=X\oplus Id_{h-g},$ $H_1(\xi_b,;\mathbb{Z}/d)=Y\oplus Id_{h-g}$, and after stabilizing $h-g$ times the map $f$ we have: \[ H_1(\xi_a f\xi_b)=Id, \] i.e. $f$ is equivalent to $\xi_a f\xi_b \in \mathcal{M}_{h,1}[d]$. We proceed to construct the matrices $X,Y$. First notice that by our hypothesis and Lemma~\ref{lema_n_detH}, $H\in SL_g^\pm(\mathbb{Z}/d).$ Consider the matrix $$X=\left(\begin{matrix} Id & A \\ 0 & Id \end{matrix}\right)\quad \text{with}, \; A=-FH^{-1}.$$ Since $H_1(f;\mathbb{Z}/d)\in Sp_{2g}(\mathbb{Z}/d),$ $(H^t)F$ is symmetric and: $$ A= -FH^{-1}=-(H^t)^{-1}H^tFH^{-1}=-(H^t)^{-1}F^tHH^{-1} = -(H^t)^{-1}F^t=-(H^{-1})^tF^t=A^t. $$ Therefore $X\in Sp_{2g}^{A\pm}(\mathbb{Z}/d).$ Finally, notice that $$\left(\begin{matrix} Id & A \\ 0 & Id \end{matrix}\right) \left(\begin{matrix} E & F \\ G & H \end{matrix}\right)= \left(\begin{matrix} E+AG & F+AH \\ G & H \end{matrix}\right)= \left(\begin{matrix} E+AG & 0 \\ G & H \end{matrix}\right)\in Sp_{2g}^{B\pm}(\mathbb{Z}/d). $$ Hence, setting $$Y=\left(\begin{matrix} E+AG & 0 \\ G & H \end{matrix}\right)^{-1}\in Sp_{2g}^{B\pm}(\mathbb{Z}/d),$$ we get the desired result. \end{proof} Letting $d$ vary arbitrarily we deduce: \begin{cor}\label{cor:mg1dcubreSQ} We have \[ \mathcal{S}^3_\mathbb{Q} = \bigcup_{d \geq 2} \mathcal{S}^3[d]. \] \end{cor} We now turn more precisely to the inclusion $\mathcal{S}^3[d] \subseteq \mathcal{S}^3(d)$, and study the difference between being a $\mathbb{Z}/d$-homology sphere and being built out of a map in the mod $d$-Torelli group. \begin{teo}\label{teo:counterexample_M[d]} The sets $\mathcal{S}^3[d]$ and $\mathcal{S}^3(d)$ coincide if and only if $d=2,3,4,6.$ \end{teo} \begin{proof} Let $M$ be a $\mathbb{Q}$-homology sphere with $n=|H_1(M;\mathbb{Z})|$ and $d$ a positive integer. By definition of $\mathcal{S}^3(d)$ and $\mathcal{S}^3[d],$ \begin{align*} M\in \mathcal{S}^3(d) & \Leftrightarrow gcd(n,d)=1 \Leftrightarrow n\in \left( \mathbb{Z}/d\right)^\times, \\ M\in \mathcal{S}^3[d] & \Leftrightarrow n\equiv \pm 1 \; (\text{mod }d). \end{align*} As usual $\left( \mathbb{Z}/d\right)^\times$ stands for the group of units in $\mathbb{Z}/d$. Then $\mathcal{S}^3(d),$ $\mathcal{S}^3[d]$ certainly coincide if $|\left(\mathbb{Z}/d\right)^\times |\leq 2.$ By the Chinese Reminder Theorem, this occurs if and only if $d=2,3,4,6.$ Finally, we show that for a fixed $d\neq 2,3,4,6,$ the sets $\mathcal{S}^3(d),$ $\mathcal{S}^3[d]$ do not coincide by providing an explicit $\mathbb{Q}$-homology sphere in $ \mathcal{S}^3(d)$ that does not belong to $\mathcal{S}^3[d]$. Take an element $u\in (\mathbb{Z}/d)^\times$ with $u\neq \pm 1.$ Consider the matrix $\left(\begin{smallmatrix} {}^tG^{-1} & 0 \\ 0 & G \end{smallmatrix}\right)\in Sp_{2g}(\mathbb{Z}/d),$ with $G\in GL_g(\mathbb{Z}/d)$ given by $$G=\left(\begin{matrix} u & 0 \\ 0 & Id \end{matrix}\right).$$ By surjectivity of the symplectic representation modulo $d$, there exists an element $f\in \mathcal{M}_{g,1}$ such that $H_1(f;\mathbb{Z}/d)=\left(\begin{smallmatrix} {}^tG^{-1} & 0 \\ 0 & G \end{smallmatrix}\right).$ Then the $3$-manifold $S^3_f = \mathcal{H}_g\cup_{\iota_gf} -\mathcal{H}_g$ provides the desired example, since by Lemma~\ref{lema_n_detH}, $|H_1(S^3_f;\mathbb{Z})|=|det(G)|=u\neq \pm 1 (\text{ mod } d)$. \end{proof} \subsection{A convenient parametrization of $\mathbb{Z}/d$-homology spheres}\label{subsec:paramhlgyspheres} Let us denote by $\mathcal{A}_{g,1}\backslash\mathcal{M}_{g,1}[d]/\mathcal{B}_{g,1}$ the image of the canonical map \[ \mathcal{M}_{g,1}[d] \longrightarrow \mathcal{A}_{g,1}\backslash\mathcal{M}_{g,1}/\mathcal{B}_{g,1}. \] Then by Singer's Theorem~\ref{bij_MCG_3man} and the definition of $\mathcal{M}_{g,1}[d]$, we have a bijection: $$ \begin{array}{ccl} {\displaystyle \lim_{g\to \infty}\mathcal{A}_{g,1}\backslash\mathcal{M}_{g,1}[d]/\mathcal{B}_{g,1}} & \longrightarrow &\mathcal{S}^3[d], \\ \phi & \longmapsto & S^3_\phi=\mathcal{H}_g \cup_{\iota_g\phi} -\mathcal{H}_g. \end{array} $$ From a group-theoretical point of view, the induced equivalence relation on $\mathcal{M}_{g,1}[d],$ which is given by: \begin{equation} \phi \sim \psi \quad\Leftrightarrow \quad \exists \zeta_a \in \mathcal{A}_{g,1}\;\exists \zeta_b \in \mathcal{B}_{g,1} \quad \text{such that} \quad \zeta_a \phi \zeta_b=\psi, \end{equation} is quite unsatisfactory, as it is not internal to the group $\mathcal{M}_{g,1}[d]$. However, as for integral homology spheres (see \cite[Lemma 4]{pitsch}), we can rewrite this equivalence relation as follows: \begin{lema} \label{lema_eqiv_coset[d]} Two maps $\phi, \psi \in \mathcal{M}_{g,1}[d]$ are equivalent if and only if there exists a map $\mu \in \mathcal{AB}_{g,1}$ and two maps $\xi_a\in \mathcal{A}_{g,1}[d]$ and $\xi_b\in\mathcal{B}_{g,1}[d]$ such that $\phi=\mu \xi_a\psi \xi_b\mu^{-1}.$ \end{lema} \begin{proof} The ''if'' part of the Lemma is trivial. Conversely, assume that $\psi=\xi_a \phi \xi_b,$ where $\psi, \phi \in \mathcal{M}_{g,1}[d].$ Applying the symplectic representation modulo $d$ to this equality we get \[ Id=H_1(\xi_a;\mathbb{Z})H_1(\xi_b;\mathbb{Z}) \quad (\text{mod } d). \] By Section \ref{homol_homoto_actions} , \begin{equation*} H_1(\xi_b;\mathbb{Z})=\left(\begin{matrix} G & 0 \\ M & {^t}G^{-1} \end{matrix}\right), \qquad H_1(\xi_a;\mathbb{Z})=\left(\begin{matrix} H & N \\ 0 & {^t}H^{-1} \end{matrix}\right), \end{equation*} for some matrices $G,H\in GL_g(\mathbb{Z})$ and ${}^tGM,H^{-1}N\in Sym_g(\mathbb{Z}),$ and hence: \begin{equation*} \left(\begin{matrix} Id & 0 \\ 0 & Id \end{matrix}\right)\equiv \left(\begin{matrix} H & N \\ 0 & {^t}H^{-1} \end{matrix}\right) \left(\begin{matrix} G & 0 \\ M & {^t}G^{-1} \end{matrix}\right)= \left(\begin{matrix} HG+NM & N^tG^{-1} \\ {}^tH^{-1}M & {^t}(HG)^{-1} \end{matrix}\right) \; (\text{mod } d). \end{equation*} In particular, $N\equiv 0 \equiv M\; (\text{mod } d)$ and $G\equiv H^{-1}\; (\text{mod } d).$ Once again, by Section~\ref{homol_homoto_actions}, we can choose a map $\mu \in \mathcal{AB}_{g,1}$ such that \[ H_1(\mu;\mathbb{Z})=\left(\begin{matrix} H & 0 \\ 0 & {^t}H^{-1} \end{matrix}\right). \] Since $N\equiv 0 \equiv M\; (\text{mod } d)$ and $G\equiv H^{-1}\; (\text{mod } d),$ the following equalities hold: \begin{align*} H_1(\mu^{-1}\xi_a;\mathbb{Z})= & \left(\begin{matrix} H^{-1} & 0 \\ 0 & {^t}H \end{matrix}\right) \left(\begin{matrix} H & N \\ 0 & {^t}H^{-1} \end{matrix}\right)=\left(\begin{matrix} Id & H^{-1}N \\ 0 & Id \end{matrix}\right)\equiv Id \; (\text{mod } d). \\ H_1(\xi_b\mu;\mathbb{Z})= & \left(\begin{matrix} G & 0 \\ M & {^t}G^{-1} \end{matrix}\right) \left(\begin{matrix} H & 0 \\ 0 & {^t}H^{-1} \end{matrix}\right)=\left(\begin{matrix} GH & 0 \\ MH & {^t}(GH)^{-1} \end{matrix}\right)\equiv Id \; (\text{mod } d). \end{align*} Therefore, $$\psi=\mu (\mu^{-1}\xi_a)\phi(\xi_b \mu)\mu^{-1},$$ where $(\mu^{-1}\xi_a)\in \mathcal{A}_{g,1}[d],$ $(\xi_b\mu)\in \mathcal{B}_{g,1}[d]$ and $\mu\in \mathcal{AB}_{g,1}.$ \end{proof} For future reference we record: \begin{prop}\label{prop:bij_M[p]} We have a bijection: $$ \begin{array}{ccl} {\displaystyle\lim_{g\to \infty}\left(\mathcal{A}_{g,1}[d]\backslash\mathcal{M}_{g,1}[d]/\mathcal{B}_{g,1}[d]\right)_{\mathcal{AB}_{g,1}} } & \longrightarrow & \mathcal{S}^3[d] \\ \phi & \longmapsto & S^3_\phi=\mathcal{H}_g \cup_{\iota_g\phi} -\mathcal{H}_g. \end{array} $$ \end{prop} \section{Invariants and trivial 2-cocycles} In this section, expanding on the work in~\cite{pitsch}, we relate the existence of invariants of elements in $\mathcal{S}^3[d]$ to the cohomological properties of the groups $\mathcal{M}_{g,1}[d]$. In~\cite{pitsch} this takes the form of a one-to-one correspondence between certain types of $2$-cocycles on the stabilized Torelli group and invariants. For $\mathcal{M}_{g,1}[d]$ there is more than one invariant associated to a given convenient $2$-cocycle, for there are homomorphisms on these groups that are invariants. This is akin to the Rohlin invariant for integral homology spheres, which is a $\mathbb{Z}/2\mathbb{Z}$-valued invariant and a homomorphism when viewed as a function on the Torelli groups (cf.\cite{riba1}). \subsection{From invariants to trivial cocycles}\label{subsec:From invariants to trivial cocycles} Let $A$ be an abelian group. Consider a normalized $A$-valued invariant: \[ F: \mathcal{S}^3[d] \rightarrow A, \] that sends $\mathbf{S}^3$ to $0.$ Precomposing $F$ with the canonical maps \[ \mathcal{M}_{g,1}[d]\longrightarrow \lim_{g\rightarrow \infty} \faktor{\mathcal{M}_{g,1}[d]}{\sim} \longrightarrow \mathcal{S}^3[d] \] we get a family of maps $F_g:\mathcal{M}_{g,1}[d]\rightarrow A$ satisfying the following properties: \begin{enumerate}[i)] \item[0)] $F_g(Id)=0,$ \item $F_{g+1}(x)=F_g(x) \quad \text{for every }x\in \mathcal{M}_{g,1}[d],$ \item $F_g(\phi x \phi^{-1})=F_g(x) \quad \text{for every } x\in \mathcal{M}_{g,1}[d], \; \phi\in \mathcal{AB}_{g,1},$ \item $F_g(\xi_a x\xi_b)=F_g(x) \quad \text{for every } x\in \mathcal{M}_{g,1}[d],\;\xi_a\in \mathcal{A}_{g,1}[d],\;\xi_b\in \mathcal{B}_{g,1}[d].$ \end{enumerate} Condition $0)$ is simply a normalization condition, it amounts to requiring that $F(S^3)=0$, which in any case is a mild assumption. Because of property $i)$, without loss of generality we can assume $g \geq 3$, this avoids having to deal with some peculiarities in the homology of low genus mapping class groups. To this family of functions we can associate a family of trivial $2$-cocycles: \begin{align*} C_g: \mathcal{M}_{g,1}[d]\times \mathcal{M}_{g,1}[d] & \longrightarrow A, \\ (\phi,\psi) & \longmapsto F_g(\phi)+F_g(\psi)-F_g(\phi\psi), \end{align*} which measure the failure of $F_g$ to be a homomorphism. The sequence of $2$-cocycles $(C_g)_{g \geq 3}$ inherits the following properties: \begin{enumerate}[(1)] \item The $2$-cocycles $(C_g)_{g \geq 3}$ are compatible with the stabilization map, in other words, for $g\geq 3$ there is a commutative triangle: \[ \xymatrix{ \mathcal{M}_{g,1}[d] \times \mathcal{M}_{g,1}[d] \ar@{->}[r] \ar[dr]_-{C_{g}} & \mathcal{M}_{g+1,1}[d] \times \mathcal{M}_{g+1,1}[d] \ar[d]^-{C_{g+1}} \\ & A} \] \item The $2$-cocycles $(C_g)_{g \geq 3}$ are invariant under conjugation by elements in $\mathcal{AB}_{g,1},$ \item If either $\phi\in \mathcal{A}_{g,1}[d]$ or $\psi \in \mathcal{B}_{g,1}[d]$ then $C_g(\phi, \psi)=0.$ \end{enumerate} Given two sequences of maps $(F_g)_{g\geq3},$ $(F_g')_{g\geq3}$ that satisfy conditions 0) - iii) and induce the same sequence of trivial 2-cocycles $(C_g)_{g\geq3},$ we have that $(F_g-F_g')_{g\geq3}$ is a sequence of homomorphisms satisfying the same conditions. As a consequence, the number of sequences $(F_g)_{g\geq3}$ satisfying conditions 0) - iii) that induce the same sequence of trivial $2$-cocycles $(C_g)_{g\geq3},$ coincides with the number of homomorphisms in $Hom(\mathcal{M}_{g,1}[d],A)^{\mathcal{AB}_{g,1}}$ compatible with the stabilization map that are zero when restricted to both $\mathcal{A}_{g,1}[d]$ and $\mathcal{B}_{g,1}[d]$. We devote the rest of this section to compute and study such homomorphisms. Observe first that since the group $A$ is abelian and has a trivial action by the mapping class group, we have isomorphisms: \begin{align*} Hom(\mathcal{M}_{g,1}[d],A)^{\mathcal{AB}_{g,1}} & = Hom(H_1(\mathcal{M}_{g,1}[d];\mathbb{Z})_{\mathcal{AB}_{g,1}}, A), \\ Hom(\mathcal{A}_{g,1}[d],A)^{\mathcal{AB}_{g,1}} & = Hom(H_1(\mathcal{A}_{g,1}[d];\mathbb{Z})_{\mathcal{AB}_{g,1}}, A), \\ Hom(\mathcal{B}_{g,1}[d],A)^{\mathcal{AB}_{g,1}}&= Hom(H_1(\mathcal{B}_{g,1}[d];\mathbb{Z})_{\mathcal{AB}_{g,1}}, A). \end{align*} Since the self-conjugation action of a group induces the identity in homology, the $\mathcal{AB}_{g,1}$-coinvariants on the right hand side of the above equalities are by Lemma~\ref{lem:extensionshandelbody} in fact computed with respect to: \[ \faktor{\mathcal{AB}_{g,1}}{\mathcal{AB}_{g,1}[d]} \simeq SL_g^\pm(\mathbb{Z}/d\mathbb{Z}). \] Similarly, the $\mathcal{AB}_{g,1}$-coinvariants of $H_1(\mathcal{T}_{g,1},\mathbb{Z}),$ $H_1(\mathcal{TA}_{g,1},\mathbb{Z}),$ $H_1(\mathcal{TB}_{g,1},\mathbb{Z})$ will be computed with respect to: \[ \faktor{\mathcal{AB}_{g,1}}{\mathcal{TAB}_{g,1}} \simeq GL_g(\mathbb{Z}). \] To summarize, we have to understand the three groups: \[ H_1(\mathcal{M}_{g,1}[d];\mathbb{Z})_{SL_g^\pm(\mathbb{Z}/d\mathbb{Z})} \quad H_1(\mathcal{A}_{g,1}[d];\mathbb{Z})_{SL_g^\pm(\mathbb{Z}/d\mathbb{Z})} \quad H_1(\mathcal{B}_{g,1}[d];\mathbb{Z})_{SL_g^\pm(\mathbb{Z}/d\mathbb{Z})} \] We first deal with the two groups on the right: \begin{prop}\label{prop:H1BpAp} For each $d\geq 2,$ and $g\geq 3$, we have isomorphisms: \[ H_1(\mathcal{A}_{g,1}[d];\mathbb{Z})_{SL_g^\pm(\mathbb{Z}/d\mathbb{Z})} \simeq 0 \simeq H_1(\mathcal{B}_{g,1}[d];\mathbb{Z})_{SL_g^\pm(\mathbb{Z}/d\mathbb{Z})}. \] \end{prop} \begin{proof} We only prove the result for $\mathcal{B}_{g,1}[d],$ since the other case is similar. Consider the short exact sequence of groups $$\xymatrix@C=7mm@R=3mm{1 \ar@{->}[r] & \mathcal{TB}_{g,1} \ar@{->}[r] & \mathcal{B}_{g,1}[d] \ar@{->}[r] & Sp_{2g}^B(\mathbb{Z},d) \ar@{->}[r] & 1.}$$ Taking $\mathcal{AB}_{g,1}$-coinvariants on the 3-term exact sequence, we get another exact sequence, $$\xymatrix@C=5mm@R=3mm{ H_1(\mathcal{TB}_{g,1};\mathbb{Z})_{GL_g(\mathbb{Z})} \ar@{->}[r] & H_1(\mathcal{B}_{g,1}[d];\mathbb{Z})_{SL_g^\pm(\mathbb{Z}/d\mathbb{Z})} \ar@{->}[r] & H_1(Sp_{2g}^B(\mathbb{Z},d);\mathbb{Z})_{GL_g(\mathbb{Z})} \ar@{->}[r] & 0.}$$ By \cite[Lemma 4.1]{riba2} and Proposition \ref{prop:com_SpB}, the first and the third groups of this sequence are zero. \end{proof} We turn to the computation of $H_1(\mathcal{M}_{g,1}[d];\mathbb{Z})_{GL_g(\mathbb{Z})}$ and show: \begin{prop}\label{prop:coinvablelevdmap} For $g\geq 3,$ $d\geq 3$ an odd integer and for $g\geq 5,$ $d\geq 2$ an even integer such that $4 \nmid d$, the trace map on the level $d$ symplectic group induces an isomorphism: \[ H_1(\mathcal{M}_{g,1}[d];\mathbb{Z})_{SL_g^\pm(\mathbb{Z}/d\mathbb{Z})} \simeq \mathbb{Z}/d. \] \end{prop} \begin{proof} We will show in Proposition~\ref{prop_iso_M[d],Sp[d]} that the symplectic representation induces an isomorphism \[ H_1(\mathcal{M}_{g,1}[d];\mathbb{Z})_{SL_g^\pm(\mathbb{Z}/d\mathbb{Z})} \simeq H_1(Sp(\mathbb{Z},d);\mathbb{Z})_{GL_g(\mathbb{Z})} \] and conclude by applying Proposition \ref{prop_iso_M[d],sp(Z/d)} and Lemma ~\ref{lem:spZ/dcoinv}. \end{proof} Before we proceed to show the isomorphism mentioned in the proof of Proposition~\ref{prop:coinvablelevdmap} we need two preliminary results. Let $\mathfrak{B}_g$ denote the Boolean algebra generated by $H_2 = H_1(\Sigma_{g,1};\mathbb{Z}/2)$ and $\mathfrak{B}_g^n$ the subspace formed by the elements of degree at most $n$ (c.f. \cite{jon_3}). \begin{lema}\label{lem:GlcoinH1Torelli} For $g \geq 4$ there is an isomorphism \[ H_1(\mathcal{T}_{g,1}; \mathbb{Z})_{GL_g(\mathbb{Z})} \simeq \mathbb{Z}/2, \] where $\mathbb{Z}/2$ is generated by the class of the element $1 \in \mathfrak{B}^2_g$. \end{lema} \begin{proof} By the fundamental result of Johnson~\cite{jon_3}, we have an extension: \[ \xymatrix{ 0 \ar[r] & \mathfrak{B}_g^2 \ar[r] & H_1(\mathcal{T}_{g,1};\mathbb{Z}) \ar[r] & \Lambda^3 H \ar[r] & 0 . } \] All the maps involved in the above short exact sequence are equivariant with respect to the conjugation action by the full mapping class group, where the action on the Boolean algebra and on $\Lambda^3 H$ is through the symplectic action on $H$. In particular we have an exact sequence: \begin{equation} \label{ses_BC} \xymatrix{ (\mathfrak{B}_g^2)_{GL_g(\mathbb{Z})} \ar[r] & H_1(\mathcal{T}_{g,1};\mathbb{Z})_{GL_g(\mathbb{Z})} \ar[r] & (\Lambda^3 H)_{GL_g(\mathbb{Z})} \ar[r] & 0. } \end{equation} First observe that $-Id \in GL_g(\mathbb{Z})$ acts by multiplication by $-1$ on $H$ and hence on $\Lambda^3 H$. Therefore, for any $w \in (\Lambda^3 H)_{GL_g(\mathbb{Z})}$, $-w = w$, and $(\Lambda^3H) _{GL_g(\mathbb{Z})}$ is a quotient of \[ \faktor{\Lambda^3 H}{2\Lambda^3 H} \simeq \faktor{\mathfrak{B}^3_g}{\mathfrak{B}^2_g} \] Hence we focus our attention on the action on $\mathfrak{B}^3_g$. Since the action of $GL_g(\mathbb{Z}) \subset Sp_{2g}(\mathbb{Z})$ on the Boolean algebra $\mathfrak{B}^3_g$ does not increase the degree we will compute coinvariants bottom up. Keep in mind that the symmetric group $\mathfrak{S}_g \subset GL_g(\mathbb{Z})$ acts on $H$ by permuting the indices of the generating set $\{a_i,b_i\}_{1 \leq i \leq g}$. \vspace{0.2cm} \begin{itemize} \item In degree 0 we only have one element $1$, and it is clearly invariant. \item In degree 1 the coinvariant module is generated by the elements $a_1,b_1$. Apply the element $G= Id + e_{21}$, to get: \[ G \cdot a_1 = a_1 +a_2 \] So in the coinvariants quotient $a_2=0$, but this is the class of $a_1$. The same computation shows that in the quotient $b_1=0$. \item In degree 2 the coinvariants module is generated by the four products $$a_1a_2,\quad a_1b_2,\quad a_1b_1 \quad\text{and}\quad b_1b_2.$$ We proceed now as before. \begin{itemize} \item Acting by $G =Id + e_{32}$ on $a_1a_2$, gives: \[ G\cdot a_1a_2 = a_1 (a_2 +a_3) = a_1a_2 + a_1a_3. \] So in the coinvariants quotient $a_1a_3 = 0 = a_1 a_2$. The same holds true for $b_1b_2$. \item Acting by $G =Id + e_{21}$ on $a_1b_2$, gives: \[ G \cdot a_1b_2 = (a_1 + a_2)(-b_1 +b_2) = -a_1b_1 + a_1b_2 - a_2b_1 + a_2b_2. \] So in the coinvariants quotient: $-a_2b_1 = 0 = a_1b_2$ \end{itemize} Thus we are left with $a_1b_1$, which will be dealt with in the end. \item In degree 3 the coinvariants module is generated by the six products $$a_1a_2a_3,\quad a_1a_2b_3,\quad a_1a_2b_2,\quad a_1b_1b_2,\quad a_1b_2b_3 \quad \textrm{and} \quad b_1b_2b_3.$$ Here is where we need $g \geq 4$. \begin{itemize} \item Acting by $G = Id + e_{41}$ on $a_1a_2a_3$, gives \[ G \cdot a_1a_2a_3 = (a_1 + a_4 )a_2 a_3 = a_1a_2a_3 + a_4a_2a_3 \] So in the coinvariants quotient $a_4a_2a_3 = 0 = a_1a_2a_3$. The action by the same element shows in the same way that in the coinvariants quotient $a_1a_2b_3 =0$, $a_1a_2b_2 =0$, and similarly $a_1b_1b_2 =0 = a_1b_2b_3 =b_1b_2b_3$. \item Acting by $G = Id + e_{21}$ on $a_1a_2b_2$, whose transpose-inverse is $Id -e_{12}$, gives: \[ G\cdot a_1a_2b_2 = (a_1 + a_2)a_2(b_2-b_1)= a_1a_2b_2 - a_1a_2b_1 + a_2b_2 -a_2b_1 \] So in the coinvariants quotient $- a_1a_2b_1 + a_2b_2 -a_2b_1 =0$, but we already know that in the quotient $ a_1a_2b_1 = 0 = a_2b_1$, so finally $a_2b_2 = 0 = a_1b_1$. \end{itemize} \end{itemize} All this shows that $(\mathfrak{B}_g^3)_ {GL_g(\mathbb{Z})}$ is $\mathbb{Z}/2$, generated by $1$. As a consequence $(\Lambda^3H) _{GL_g(\mathbb{Z})}$ is zero and by exact sequence \eqref{ses_BC} the $\mathbb{Z}/2$-vector space $(\mathfrak{B}_g^2)_{GL_g(\mathbb{Z})}$ surjects onto $H_1(\mathcal{T}_{g,1};\mathbb{Z})_{GL_g(\mathbb{Z})}$ getting that all elements of this last group have $2$-torsion. Therefore by \cite[Thm. 5.1]{jon_3} the Birman-Craggs homomorphism induces an isomorphism $H_1(\mathcal{T}_{g,1};\mathbb{Z})_{GL_g(\mathbb{Z})}\simeq (\mathfrak{B}_g^3)_{GL_g(\mathbb{Z})}.$ \end{proof} We now show a slight tweaking of \cite[Prop.~0.5]{sato_abel}: \begin{prop}\label{prop:homologyleveld} For $g\geq 4$ and $d$ even with $4\nmid d,$ there is an exact sequence \begin{equation*} \xymatrix@C=7mm@R=10mm{0 \ar@{->}[r] & \mathbb{Z}/2 \ar@{->}[r] & H_1(\mathcal{T}_{g,1};\mathbb{Z})_{Sp_{2g}(\mathbb{Z},d)} \ar@{->}[r]^-{j} & H_1(\mathcal{M}_{g,1}[d];\mathbb{Z}) \ar@{->}[r] & H_1(Sp_{2g}(\mathbb{Z},d);\mathbb{Z}) \ar@{->}[r] & 0 .} \end{equation*} \end{prop} \begin{proof} Following Sato's arguments in ~\cite{sato_abel}, the inclusion $\mathcal{M}_{g,1}[d] \hookrightarrow \mathcal{M}_{g,1}[2]$ fits into a commutative diagram with exact rows: \begin{equation*} \xymatrix@C=7mm@R=10mm{ 0 \ar@{->}[r] & \mathcal{T}_{g,1} \ar@{->}[r] \ar@{=}[d] & \mathcal{M}_{g,1}[d] \ar@{->}[d] \ar@{->}[r] & Sp_{2g}(\mathbb{Z},d) \ar@{->}[d] \ar@{->}[r] & 0 \\ 0 \ar@{->}[r] & \mathcal{T}_{g,1} \ar@{->}[r] & \mathcal{M}_{g,1}[2] \ar@{->}[r] & Sp_{2g}(\mathbb{Z},2) \ar@{->}[r] & 0. } \end{equation*} By Proposition \ref{exh_Spd2}, this diagram induces a commutative ladder with exact rows: \begin{equation*} \xymatrix@C=7mm@R=10mm{ H_2(\mathcal{M}_{g,1}[d];\mathbb{Z}) \ar[r] \ar[d] & H_2(Sp_{2g}(\mathbb{Z},d);\mathbb{Z}) \ar@{->>}[d]\ar@{->}[r] & \\ H_2(\mathcal{M}_{g,1}[2];\mathbb{Z}) \ar[r] & H_2(Sp_{2g}(\mathbb{Z},2);\mathbb{Z}) \ar@{->}[r] & } \end{equation*} \begin{equation*} \xymatrix@C=7mm@R=10mm{ \ar@{->}[r] &H_1(\mathcal{T}_{g,1};\mathbb{Z})_{Sp_{2g}(\mathbb{Z},d)} \ar@{->>}[d] \ar@{->}[r]^-{j} & H_1(\mathcal{M}_{g,1}[d];\mathbb{Z}) \ar@{->}[d] \ar@{->}[r] & H_1(Sp_{2g}(\mathbb{Z},d);\mathbb{Z}) \ar@{->>}[d]\ar@{->}[r] & 0 \\ \ar@{->}[r] & H_1(\mathcal{T}_{g,1};\mathbb{Z})_{Sp_{2g}(\mathbb{Z},2)} \ar@{->}[r] & H_1(\mathcal{M}_{g,1}[2];\mathbb{Z}) \ar@{->}[r] & H_1(Sp_{2g}(\mathbb{Z},2);\mathbb{Z}) \ar@{->}[r] & 0 .} \end{equation*} By \cite[Prop. 0.5]{sato_abel} the kernel of the map $j$ is at most $\mathbb{Z}/2$. Therefore it is enough to show that $j$ is not injective. Suppose that the map $j$ is injective. Then by exactness in the above commutative diagram the map $H_2(\mathcal{M}_{g,1}[d];\mathbb{Z}) \rightarrow H_2(Sp_{2g}(\mathbb{Z},d);\mathbb{Z})$ is surjective and by commutativity the map $H_2(\mathcal{M}_{g,1}[2];\mathbb{Z}) \rightarrow H_2(Sp_{2g}(\mathbb{Z},2);\mathbb{Z})$ is surjective too. But this implies that the map $H_1(\mathcal{T}_{g,1};\mathbb{Z})_{Sp_{2g}(\mathbb{Z},2)} \rightarrow H_1(\mathcal{M}_{g,1}[2];\mathbb{Z})$ is injective, which contradicts \cite[Prop. 0.5]{sato_abel}. \end{proof} We now finish the proof of Proposition \ref{prop:coinvablelevdmap}, by proving: \begin{prop}\label{prop_iso_M[d],Sp[d]} For $g\geq 3,$ $d\geq 3$ an odd integer and for $g\geq 5,$ $d\geq 2$ an even integer such that $4 \nmid d,$ the symplectic representation $\mathcal{M}_{g,1}[d]\rightarrow Sp_{2g}(\mathbb{Z},d)$ induces an isomorphism $$H_1(\mathcal{M}_{g,1}[d];\mathbb{Z})_{GL_g(\mathbb{Z})}\simeq H_1(Sp_{2g}(\mathbb{Z},d);\mathbb{Z})_{GL_g(\mathbb{Z})}.$$ \end{prop} \begin{proof} Restricting the symplectic representation of the mapping class group to $\mathcal{M}_{g,1}[d]$ we have a short exact sequence of groups with a compatible action of the mapping class group on the three terms, on the first two by conjugation and on the third via the symplectic representation. \begin{equation} \label{ses_MCGp} \xymatrix@C=7mm@R=10mm{1 \ar@{->}[r] & \mathcal{T}_{g,1} \ar@{->}[r] & \mathcal{M}_{g,1}[d] \ar@{->}[r] & Sp_{2g}(\mathbb{Z},d) \ar@{->}[r] & 1 }. \end{equation} The 3-term exact sequence in homology gives us: \begin{equation} \label{es_MCGpH_1} \xymatrix@C=7mm@R=10mm{ H_1(\mathcal{T}_{g,1};\mathbb{Z}) \ar@{->}[r]^-{j} & H_1(\mathcal{M}_{g,1}[d];\mathbb{Z}) \ar@{->}[r] & H_1(Sp_{2g}(\mathbb{Z},d);\mathbb{Z}) \ar@{->}[r] & 0 .} \end{equation} Taking $GL_{g}(\mathbb{Z})$-coinvariants, since the action on the level $d$ congruence subgroup factors through the symplectic group and because this is a right-exact functor we get another exact sequence: \begin{equation} \label{es_MCGpH_1_AB} \xymatrix@C=7mm@R=7mm{ H_1(\mathcal{T}_{g,1};\mathbb{Z})_{GL_g(\mathbb{Z})} \ar[r]^-{j} & H_1(\mathcal{M}_{g,1}[d];\mathbb{Z})_{GL_g(\mathbb{Z})} \ar[r] & H_1(Sp_{2g}(\mathbb{Z},d);\mathbb{Z})_{GL_g(\mathbb{Z})} \ar[r] & 1 ,} \end{equation} which by Lemma \ref{lem:GlcoinH1Torelli} becomes: \[ \xymatrix{ \mathbb{Z}/2 \ar[r]^-{j} & H_1(\mathcal{M}_{g,1}[d];\mathbb{Z})_{GL_g(\mathbb{Z})} \ar[r] & H_1(Sp_{2g}(\mathbb{Z},d);\mathbb{Z})_{GL_g(\mathbb{Z})} \ar[r] & 1 . } \] Finally, for $g\geq 3$ and $d\geq 3$ an odd integer, the five term exact sequence tells us that the map $j$ factors through $H_1(\mathcal{T}_{g,1};\mathbb{Z})_{Sp_{2g}(\mathbb{Z},d)}$ and by \cite[Prop. 6.6]{Putman}, the element $1 \in \mathfrak{B}^2_g$ is $0$ in this group. For $g\geq 5$ and $d\geq 2$ an even integer such that $4 \nmid d$, Proposition~\ref{prop:homologyleveld} asserts in particular that $1 \in \ker j$. \end{proof} Given our abelian group $A$, denote by $A_d$ the subgroup of elements of exponent $d$. For any element $x \in A_d$ let $\varepsilon^x:\mathbb{Z}/d\longrightarrow A_d; \; 1\mapsto x$, be the map that picks the element $x$. This is trivially an $\mathcal{AB}_{g,1}$-invariant homomorphisms. By Proposition~\ref{prop:coinvablelevdmap} we get: \begin{prop}\label{prop:abinv_modp} For $g\geq 3,$ $d\geq 3$ an odd integer and for $g\geq 5,$ $d\geq 2$ an even integer such that $4\nmid d,$ the $\mathcal{AB}_{g,1}$-invariant homomorphisms on the mod-$p$ Torelli group are generated by the multiples of the trace map on the $\mathfrak{gl}_g(\mathbb{Z}/d)$-block in the decomposition of $\mathfrak{sp}_{2g}(\mathbb{Z}/d)$ pulled-back to the mod-$d$ Torelli group. Formally, the map \begin{align*} A_d & \longrightarrow Hom(\mathcal{M}_{g,1}[d],A)^{\mathcal{AB}_{g,1}} \end{align*} that assigns to $x \in A_d$ the composite: \[ \xymatrix{ \varphi_g^x:\mathcal{M}_{g,1}[d] \ar[r] & Sp_{2g}(\mathbb{Z},d) \ar[r]^{\alpha}_{eq.~\ref{ses_abel_d1} }& \mathfrak{sp}_{2g}(\mathbb{Z}/d) \ar[r]^{\pi_{gl}}_{Lem~\ref{lem:spZ/dcoinv}} & \mathfrak{gl}_g(\mathbb{Z}/d) \ar[r]^- {tr} & \mathbb{Z}/d \ar[r]^{\varepsilon^x} & A_d } \] is an isomorphism. \end{prop} In view of the discussion at the beginning of this Section~\ref{subsec:From invariants to trivial cocycles}, the homomorphisms $\varphi^x_g$ are perfect candidates for defining an invariant, and all the maps above. As all the maps involved in their definition are trivially compatible with the stabilization map, we have: \begin{prop}\label{prop:stab_modp} The homomorphisms $\varphi_g^x$ defined in Proposition~\ref{prop:abinv_modp} are compatible with the stabilization map. In particular they reassemble into Cardinal($A_d$) normalized invariants, canonically labeled by the elements in $A_d$ and which we denote $\varphi^x$. \end{prop} \subsubsection{Non-triviality of the invariants $\varphi^x$}\label{subsec:invphix} We show that the invariants that appear in Proposition~\ref{prop:stab_modp} are non-trivial (apart from the one labeled by the $0$ element, which we discard). We do this by showing which Lens spaces these invariants tear apart. Observe that in the invariant $\varphi^x$ the element $x \in A_d$ carries no information from the manifold, it is cleaner to study the $\mathbb{Z}/d$-valued invariant $\varphi$ that results of taking out the map $\varepsilon^x$ from the composition that defines $\varphi^x.$ Let $p,$ $q$ be two coprime integers and let $L(p,q)$ be the associated Lens space. Since this is a $\mathbb{Q}$-homology $3$-spheres, by Theorem \ref{teo_rat_homology_gen}, we know that there exists an integer $d\geq 2$ for which $L(p,q)\in \mathcal{S}^3[d]$. Our first task is to find appropriate values for $d$. \begin{prop}\label{prop:dforLensspaces} A Lens space $L(p,q)$ is in $\mathcal{S}^3[d]$ if and only if $p\equiv \pm 1 (\text{mod } d).$ \end{prop} \begin{proof} The homology groups of $L(p,q)$ are: $$H_k(L(p,q);\mathbb{Z})=\left\{\begin{array}{rl} \mathbb{Z}, & \text{for }k=0,3, \\ \mathbb{Z}/p, & \text{for } k=1, \\ 0, & \text{otherwise.} \end{array} \right.$$ Then $|H_1(L(p,q);\mathbb{Z})|=p.$ By Theorem \ref{teo_rat_homology_gen}, $L(p,q)\in \mathcal{S}^3[d]$ if and only if $p\equiv \pm 1 (\text{mod }d).$ \end{proof} As a consequence, all Lens spaces in $\mathcal{S}^3[d]$ are of the form $L(\pm 1+dk,q)$ with $k,q\in \mathbb{Z}.$ Next we compute the values of the invariant $\varphi$ on these Lens spaces. By the classification Theorem (c.f. \cite{rolf}), two Lens spaces $L(p,q),$ $L(p',q')$ are homeomorphic if and only if $p'=\pm p$ and $q'\equiv \pm q^{\pm 1} \;(\text{mod } p)$. In particular $L(\pm 1+dk,q)$ and $L(1\pm dk,\pm dkq)$ are homeomorphic and it is enough to compute the value of the invariant $\varphi$ on a Lens space of the form $L(1+dk,dl)$, for some $k,l \in \mathbb{Z}$ with $k|l.$ By definition (c.f. \cite[Sec. 9.B]{rolf}) there is a Heegaard splitting of genus $1$ and gluing map $f\in \mathcal{M}_{1,1}$ such that the Lens space $L(1+dk,dl)$ is homeomorphic to $\mathcal{H}_1\cup_{\iota f}-\mathcal{H}_1$ with $$\Psi(f)= \left(\begin{matrix} a & dl \\ b & 1+dk \end{matrix}\right)\in Sp_{2}(\mathbb{Z}) \quad \text{with}\quad a,b\in \mathbb{Z}.$$ Since $Sp_2(\mathbb{Z})=SL_2(\mathbb{Z}),$ the reduction modulo $d$ of $\Psi(f)$ has determinant $1$ and as a consequence $a=1+dr$ for some $r\in \mathbb{Z}.$ Let $\xi_b\in\mathcal{B}_{1,1}$ such that $\Psi(\xi_b)=\left(\begin{smallmatrix} 1 & 0 \\ b & 1 \end{smallmatrix}\right)$, then $$\Psi(f\xi_b)=\left(\begin{matrix} 1+dr & dl \\ b & 1+dk \end{matrix}\right)\left(\begin{matrix} 1 & 0 \\ -b & 1 \end{matrix}\right)=\left(\begin{matrix} 1+dr-dlb & dl \\ -dkb & 1+dk \end{matrix}\right)\in SL_2(\mathbb{Z},d)$$ Therefore $f_d:=f\xi_b\in\mathcal{M}_{1,1}[d]$ and by Singer's Theorem (c.f. Theorem \ref{bij_MCG_3man}) the Lens space $L(1+dk,dl)$ is homeomorphic to $\mathcal{H}_1\cup_{\iota f_d}-\mathcal{H}_1.$ Stabilizing four times $f_d\in \mathcal{M}_{1,1}[d]$ we can consider $f_d$ as an element of $\mathcal{M}_{5,1}[d].$ Then, $$\varphi(L(1+dk,dl))=\varphi_5(f_d)=tr(\pi_{gl}\circ \alpha \circ \Psi(f_d))=-k.$$ Therefore we get the following result: \begin{prop}\label{prop:valuephiLens} The invariant $\varphi: \mathcal{S}^3[d] \rightarrow \mathbb{Z}/d$ is not trivial, it takes the value $-k$ on the Lens space $L(1+dk,q)$. \end{prop} \subsection{From trivial cocycles to invariants} Conversely, what are the conditions for a family of trivial $2$-cocycles $C_g$ on $\mathcal{M}_{g,1}[d]$ satisfying properties (1)-(3) to actually hand us out an invariant? Firstly we need to check the existence of an $\mathcal{AB}_{g,1}$-invariant trivialization of each $C_g.$ Denote by $\mathcal{Q}_{C_g}$ the set of all normalized trivializations of the cocycle $C_g:$ $$\mathcal{Q}_{C_g}=\{q:\mathcal{M}_{g,1}[d]\rightarrow A\mid q(\phi)+q(\psi)-q(\phi\psi)=C_g(\phi,\psi)\}.$$ The group $\mathcal{AB}_{g,1}$ acts on $\mathcal{Q}_g$ via its conjugation action on $\mathcal{M}_{g,1}[d].$ This action confers the set $\mathcal{Q}_{C_g}$ the structure of an affine set over the abelian group $Hom(\mathcal{M}_{g,1}[d],A).$ On the other hand, choosing an arbitrary element $q\in \mathcal{Q}_{C_g}$ the map defined as follows \begin{align*} \rho_q:\mathcal{AB}_{g,1} & \longrightarrow Hom(\mathcal{M}_{g,1}[d],A) \\ \phi & \longmapsto \phi \cdot q-q, \end{align*} induces a well-defined cohomology class $\rho(C_g)\in H^1(\mathcal{AB}_{g,1};Hom(\mathcal{M}_{g,1}[d],A)),$ called the torsor of the cocycle $C_g,$ and we have the following result, which admits a straightforward proof: \begin{prop}\label{prop_torsor} The natural action of $\mathcal{AB}_{g,1}$ on $\mathcal{Q}_{C_g}$ admits a fixed point if and only if the associated torsor $\rho(C_g)$ is trivial. \end{prop} Suppose that for every $g\geq 3$ there is a fixed point $q_g$ of $\mathcal{Q}_{C_g}$ for the action of $\mathcal{AB}_{g,1}$ on $\mathcal{Q}_{C_g}.$ Since every pair of $\mathcal{AB}_{g,1}$-invariant trivializations differ by a $\mathcal{AB}_{g,1}$-invariant homomorphism, by Proposition~\ref{prop:abinv_modp}, for every $g\geq 3$ the fixed points are exactly $q_g+\varphi_g^x$ with $x\in A_d.$ By Proposition~\ref{prop:stab_modp}, all elements of $Hom(\mathcal{M}_{g,1}[d],A)^{\mathcal{AB}_{g,1}}$ are compatible with the stabilization map. Then, given two different fixed points $q_g,$ $q'_g$ of $\mathcal{Q}_{C_g}$ for the action of $\mathcal{AB}_{g,1},$ we have that $${q_g}_{\mid\mathcal{M}_{g-1,1}[d]}-{q'_g}_{\mid\mathcal{M}_{g-1,1}[d]}=(q_g-q'_g)_{\mid\mathcal{M}_{g-1,1}[d]} ={\varphi_g^x}_{\mid\mathcal{M}_{g-1,1}[d]}=\varphi_{g-1}^x.$$ Therefore the restriction of the trivializations of $\mathcal{Q}_{C_g}$ to $\mathcal{M}_{g-1,1}[d],$ give us a bijection between the fixed points of $\mathcal{Q}_{C_g}$ for the action of $\mathcal{AB}_{g,1}$ and the fixed points of $\mathcal{Q}_{C_{g-1}}$ for the action of $\mathcal{AB}_{g-1,1}$. Given an $\mathcal{AB}_{g,1}$-invariant trivialization $q_g,$ for each $x\in A_d$ we get a well-defined map $$ q+\varphi^x= \lim_{g\to \infty}q_g+\varphi^x_g: \lim_{g\to \infty}\mathcal{M}_{g,1}[d]\longrightarrow A. $$ These are the only candidates to be $A$-valued invariants of $\mathbb{Z}/d$-homology spheres with associated family of $2$-cocycles $(C_g)_g.$ For these maps to be invariants, since they are already $\mathcal{AB}_{g,1}$-invariant, we only have to prove that they are constant on the double cosets $\mathcal{A}_{g,1}[d]\backslash \mathcal{M}_{g,1}[d]/\mathcal{B}_{g,1}[d].$ From property (3) of our cocycle we have that $\forall \phi\in \mathcal{M}_{g,1}[d],$ $\forall \psi_a\in \mathcal{A}_{g,1}[d]$ and $\forall \psi_b\in \mathcal{B}_{g,1}[d],$ \begin{equation} \label{eq_A[p],B[p]_constant} \begin{aligned} (q_g+\varphi^x_g)(\phi)-(q_g+\varphi^x_g)(\phi \psi_b)= & -(q_g+\varphi^x_g)(\psi_b) , \\ (q_g+\varphi^x_g)(\phi)-(q_g+\varphi^x_g)(\psi_a\phi )= & -(q_g+\varphi^x_g)(\psi_a). \end{aligned} \end{equation} Thus in particular, taking $\phi=\psi_a,\psi_b$ in above equations, we have that $q_g+\varphi^x_g$ with $x\in A_d,$ are homomorphisms on $\mathcal{A}_{g,1}[d],$ $\mathcal{B}_{g,1}[d].$ By Proposition~\ref{prop:H1BpAp} the homomorphisms $q_g+\varphi^x_g$ are zero on $\mathcal{A}_{g,1}[d]$, $\mathcal{B}_{g,1}[d],$ and we conclude by equalities \eqref{eq_A[p],B[p]_constant}. Summarizing, we get the following result: \begin{teo} \label{teo_cocy_p} Let $A$ an abelian group and $g\geq 5,$ $d\geq 2$ integers such that $4 \nmid d.$ For each $x\in A_d,$ a family of 2-cocycles $(C_g)_{g\geq 3}$ on $\mathcal{M}_{g,1}[d],$ with values in $A,$ satisfying conditions (1)-(3) provides a compatible family of trivializations $F_g+\varphi_g^x: \mathcal{M}_{g,1}[d]\rightarrow A$ that reassembles into a normalized invariant of $\mathbb{Q}$-homology spheres $\mathcal{S}^3[d],$ $$\lim_{g\to \infty}F_g+\varphi_g^x: \mathcal{S}^3[d]\longrightarrow A$$ if and only if the following two conditions hold: \begin{enumerate}[(i)] \item The associated cohomology classes $[C_g]\in H^2(\mathcal{M}_{g,1}[d];A)$ are trivial. \item The associated torsors $\rho(C_g)\in H^1(\mathcal{AB}_{g,1},Hom(\mathcal{M}_{g,1}[d],A))$ are trivial. \end{enumerate} \end{teo} \textbf{The case $\mathcal{M}_{g,1}[p]$ and $A=\mathbb{Z}/p$ with $p$ an odd prime.} In this particular case there is the following characterization of the torsor class $\rho(C_g):$ \begin{prop}\label{prop:torsorforprimep} The torsor class $\rho(C_g)$ is naturally an element of the group $$Hom(H_1(\mathcal{AB}_{g,1}[p])\otimes(\Lambda^3 H_p\oplus \mathfrak{sp}_{2g}(\mathbb{Z}/p)),\mathbb{Z}/p)^{\mathcal{AB}_{g,1}},$$ where $H_1(\mathcal{AB}_{g,1}[p])\otimes(\Lambda^3 H_p\oplus \mathfrak{sp}_{2g}(\mathbb{Z}/p))$ is endowed with the diagonal action and $\mathbb{Z}/p$ with the trivial one. \end{prop} \begin{proof} By Lemma \ref{lem_B[p]} we have a short exact sequence $$ \xymatrix@C=7mm@R=13mm{1 \ar@{->}[r] & \mathcal{AB}_{g,1}[p] \ar@{->}[r] & \mathcal{AB}_{g,1} \ar@{->}[r] & SL^{\pm}_g(\mathbb{Z}/p) \ar@{->}[r] & 1 .} $$ Applying the 5-term exact sequence with coefficients in $M=(\Lambda^3 H_p)^*\oplus (\mathfrak{sp}_{2g}(\mathbb{Z}/p))^*$, where the asterisk means $\mathbb{Z}/p$-dual, we get an exact sequence: $$ \xymatrix@C=7mm@R=13mm{0 \ar@{->}[r] & H^1(SL^{\pm}_g(\mathbb{Z}/p); M) \ar@{->}[r] & H^1(\mathcal{AB}_{g,1}; M) \ar@{->}[r] & H^1(\mathcal{AB}_{g,1}[p]; M)^{SL^{\pm}_g(\mathbb{Z}/p)} } $$ Next we show that $H^1(SL^{\pm}_g(\mathbb{Z}/p); M)=0$ by proving the following statements: \begin{enumerate}[a)] \item $H^1(SL^{\pm}_g(\mathbb{Z}/p); M)\rightarrow H^1(SL_g(\mathbb{Z}/p); M)$ is a monomorphism. \item $H^1(SL_g(\mathbb{Z}/p); M)=0.$ \end{enumerate} \textbf{a)} By definition we have a short short exact sequence $$ \xymatrix@C=7mm@R=13mm{1 \ar@{->}[r] & SL_g(\mathbb{Z}/p) \ar@{->}[r] & SL^{\pm}_g(\mathbb{Z}/p) \ar@{->}[r]^-{det} & \mathbb{Z}/2 \ar@{->}[r] & 1 } $$ and the statement follow then from the $5$-term exact sequence, and the fact that since $M$ is a $p$-group and $p$ is odd, $H^\ast(\mathbb{Z}/2;M) =0$ in degrees $ \geq 1$. \textbf{b)} Since $M=(\Lambda^3 H_p)^*\oplus (\mathfrak{sp}_{2g}(\mathbb{Z}/p))^*$ as $SL_g(\mathbb{Z}/p)$-modules, there is an isomorphism $$ H^1(SL_g(\mathbb{Z}/p);M)\simeq H^1(SL_g(\mathbb{Z}/p);(\Lambda^3 H_p)^*) \oplus H^1(SL_g(\mathbb{Z}/p);(\mathfrak{sp}_{2g}(\mathbb{Z}/p))^*).$$ By the proof of \cite[Prop. 5]{pitsch}, we know that $H^1(SL_g(\mathbb{Z}/p);(\Lambda^3 H_p)^*)=0.$ Next we show that $H^1(SL_g(\mathbb{Z}/p);(\mathfrak{sp}_{2g}(\mathbb{Z}/p))^*)=0.$ Since $(\mathfrak{sp}_{2g}(\mathbb{Z}/p))^*\simeq \mathfrak{sp}_{2g}(\mathbb{Z}/p)$ as $SL_g(\mathbb{Z}/p)$-modules, we have an isomorphism $$H^1(SL_g(\mathbb{Z}/p);(\mathfrak{sp}_{2g}(\mathbb{Z}/p))^*)\simeq H^1(SL_g(\mathbb{Z}/p);\mathfrak{sp}_{2g}(\mathbb{Z}/p)). $$ Now the decomposition of $SL_g(\mathbb{Z}/p)$-modules $$\mathfrak{sp}_{2g}(\mathbb{Z}/p)\simeq \mathfrak{gl}_g(\mathbb{Z}/p)\oplus Sym^A_g(\mathbb{Z}/p)\oplus Sym^B_g(\mathbb{Z}/p)$$ shows that $H^1(SL_g(\mathbb{Z}/p);\mathfrak{sp}_{2g}(\mathbb{Z}/p))$ is isomorphic to the direct sum of two copies of $H^1(SL_g(\mathbb{Z}/p);Sym_g(\mathbb{Z}/p))$ and one copy of $H^1(SL_g(\mathbb{Z}/p);\mathfrak{gl}_g(\mathbb{Z}/p))$. Notice that we have the following isomorphisms of $SL_g(\mathbb{Z}/p)$-modules: $$ \mathfrak{gl}_g(\mathbb{Z}/p)\simeq \; Hom(H_p,H_p) \simeq H_p\otimes H_p,\qquad Sym_g(\mathbb{Z}/p)\simeq \; S^2(H_p).$$ Then we have isomorphisms \begin{align*} H^1(SL_g(\mathbb{Z}/p);\mathfrak{gl}_g(\mathbb{Z}/p))\simeq & H^1(SL_g(\mathbb{Z}/p);Hom(H_p,H_p)), \\ H^1(SL_g(\mathbb{Z}/p);Sym_g(\mathbb{Z}/p))\simeq & H^1(SL_g(\mathbb{Z}/p);S^2(H_p)). \end{align*} By \cite[Thm. 5]{chih} we know that $H^1(SL_g(\mathbb{Z}/p);Hom(H_p,H_p))=0$. Next we show that $H^1(SL_g(\mathbb{Z}/p);S^2(H_p))=0$. Consider the following split short exact sequence of $SL_g(\mathbb{Z}/p)$-modules: $$ \xymatrix@C=7mm@R=13mm{0 \ar@{->}[r] & S^2(H_p) \ar@{->}[r] & H_p\otimes H_p \ar@{->}[r] & \Lambda^2 H_p \ar@{->}[r] & 0 .} $$ Then we have a cohomology long exact sequence $$ \xymatrix@C=7mm@R=13mm{0 \ar@{->}[r] & H^1(SL_g(\mathbb{Z}/p);S^2(H_p)) \ar@{->}[r] & H^1(SL_g(\mathbb{Z}/p);H_p\otimes H_p) \ar@{->}[r] & H^1(SL_g(\mathbb{Z}/p);\Lambda^2 H_p) .} $$ By \cite[Thm. 5]{chih}, $H^1(SL_g(\mathbb{Z}/p);H_p\otimes H_p)=0.$ Therefore $H^1(SL_g(\mathbb{Z}/p);S^2(H_p))=0.$ \end{proof} \section{Construction of an invariant from the abelianization of $\mathcal{M}_{g,1}[p].$ } We now want to use Theorem~\ref{teo_cocy_p} to actually get new invariants. As in the integral case (cf. \cite{pitsch}), we will lift families of $2$-cocycles on abelian quotients of $\mathcal{M}_{g,1}[p]$ with $p$ prime. There are two natural central series on any group, and in particular on $\pi_1(\Sigma_{g,1}),$ with mod-$p$ quotients. Let $\Gamma_k$ denote the lower central series of $\pi_1(\Sigma_{g,1})$ defined inductively by $$\Gamma_1=\pi_1(\Sigma_{g,1}),\qquad \Gamma_{k+1}=[\Gamma_1,\Gamma_k] \quad \forall k\geq 1.$$ We define the Zassenhauss and Stallings mod-$p$ central series respectively by \begin{equation*} \Gamma_k^Z=\prod_{ip^j\geq k} (\Gamma_i)^{p^j}, \qquad \qquad \Gamma_k^S=\prod_{i+j= k} (\Gamma_i)^{p^j}, \end{equation*} These are respectively the fastest descending series with $[\Gamma_k^Z,\Gamma_l^Z]<\Gamma_{k+1}^Z,$ $(\Gamma_k^Z)^p<\Gamma_{pk}^Z$ and $[\Gamma_k^S,\Gamma_l^S]<\Gamma_{k+1}^S,$ $(\Gamma_k^S)^p<\Gamma_{k+1}^S.$ For further information about these series we refer the interested reader to \cite{riba1}. In the same way we construct the higher Johnson homomorphisms (c.f. \cite{mor_ext}), we have induced representations: $$\rho_k^Z:\; \mathcal{M}_{g,1}\longrightarrow Aut(\Gamma/\Gamma_{k+1}^Z),\qquad \rho_k^S:\; \mathcal{M}_{g,1}\longrightarrow Aut(\Gamma/\Gamma_{k+1}^S).$$ Set $\mathcal{L}_{k+1}^Z=\Gamma^Z_{k+1}/\Gamma^Z_{k+2}$ and $\mathcal{L}_{k+1}^S=\Gamma^S_{k+1}/\Gamma^S_{k+2}.$ The restriction of $\rho_{k+1}^Z$ (resp. $\rho_{k+1}^S$) to the kernel of $\rho_k^Z$ (resp. $\rho_k^S$) give homomorphisms: \begin{equation*} \tau_k^Z: \ker(\rho_k^Z) \longrightarrow Hom(H_p,\mathcal{L}_{k+1}^Z), \qquad \tau_k^S: \ker(\rho_k^S) \longrightarrow Hom(H_p,\mathcal{L}_{k+1}^S), \end{equation*} called \textit{the Zassenhaus (resp. Stallings) mod-$p$ Johnson homomorphisms}. Notice that by definition $\ker(\rho_{1}^Z)=\ker(\rho_{1}^S)=\mathcal{M}_{g,1}[p].$ Moreover, by \cite{coop} the images of $\tau_1^Z$ and $\tau_1^S$ are respectively isomorphic to $\Lambda^3H_p$ and to the abelianization of $\mathcal{M}_{g,1}[p].$ In this work we will only use these homomorphisms for $k=1,2.$ By direct inspection, for these values of $k$ and $p\geq 5$, the group $\mathcal{L}_{k+1}^Z$ coincides with $\mathcal{L}_{k+1}\otimes \mathbb{Z}/p=:\mathcal{L}_{k+1}(H_p),$ where $\mathcal{L}_{k+1}$ stands for $\Gamma_{k+1}/\Gamma_{k+2}.$ In fact, this holds for any $k\in \mathbb{N}$ with $k+1<p.$ In order to avoid some peculiarities in the homology of low genus mapping class groups as well as some issues involving the prime numbers $2$ and $3$, in all what follows we restrict ourselves to prime numbers $p\geq 5$ and genus $g\geq 4.$ In \cite{sato_abel}, \cite{per} independently M.~Sato and B.~Perron computed that for $g\geq 4$ and $d\geq 3$ an odd integer we have an isomorphism of $\mathbb{Z}/d$-modules: $$H_1(\mathcal{M}_{g,1}[d];\mathbb{Z})\simeq \Lambda^3 H_d \oplus \mathfrak{sp}_{2g}(\mathbb{Z}/d).$$ It turns out that this decomposition holds true as $\mathcal{M}_{g,1}$-modules. Indeed, there is a commutative diagram with exact rows: \begin{equation} \label{diag-split-M[p]} \begin{aligned} \xymatrix{ 1 \ar[r] & \mathcal{T}_{g,1} \ar[d] \ar[r] & \mathcal{M}_{g,1}[p] \ar[r] \ar[d]^{\tau_1^S} \ar@{..>}[dl]_{\tau^Z_1} \ar@{..>}[dr]^{\alpha \circ \Psi} & Sp_{2g}(\mathbb{Z},p) \ar[r] \ar[d] & 1 \\ 0\ar[r] & \Lambda^3H_p \ar[r] & H_1( \mathcal{M}_{g,1}[p]; \mathbb{Z}) \ar[r] & \mathfrak{sp}_{2g}(\mathbb{Z}/p) \ar[r]& 0. } \end{aligned} \end{equation} By definition, all these maps are compatible with the action by $\mathcal{M}_{g,1}$. The equivariant map $\tau_1^Z$ induces a retraction of the bottom exact sequence, which shows our claim. Moreover the splitting as $\mathcal{M}_{g,1}$-modules is unique since different $\mathcal{M}_{g,1}$-equivariant sections differ by an element in $H^1(\mathfrak{sp}_{2g}(\mathbb{Z}/p);\Lambda^3 H_p)^{Sp_{2g}(\mathbb{Z}/p)},$ but this group is zero by the Center Kills Lemma. \subsection{Trivial cocycles in the abelianization of $\mathcal{M}_{g,1}[p]$} \label{sec-triv-cocy-abel-Mp} A family of $2$-cocycles $(B_g)_{g\geq 3}$ on $H_1(\mathcal{M}_{g,1}[p];\mathbb{Z})$ whose lift to $\mathcal{M}_{g,1}[p]$ satisfy properties (1)-(3), given in Theorem \ref{teo_cocy_p}, has the following properties: \begin{enumerate}[(1')] \item The $2$-cocycles $(B_g)_{g \geq 3}$ are compatible with the stabilization map, in other words, for $g\geq 3$ there is a commutative triangle: \[ \xymatrix{ H_1(\mathcal{M}_{g,1}[p];\mathbb{Z}) \times H_1(\mathcal{M}_{g,1}[p];\mathbb{Z}) \ar@{->}[r] \ar[dr]_-{B_{g}} & H_1(\mathcal{M}_{g+1,1}[p];\mathbb{Z}) \times H_1(\mathcal{M}_{g+1,1}[p];\mathbb{Z}) \ar[d]^-{B_{g+1}} \\ & \mathbb{Z}/p} \] \item The $2$-cocycles $(B_g)_{g \geq 3}$ are invariant under conjugation by elements in $GL_g(\mathbb{Z}),$ \item If either $\phi\in \tau_1^S(\mathcal{A}_{g,1}[p])$ or $\psi \in \tau_1^S(\mathcal{B}_{g,1}[p])$ then $B_g(\phi, \psi)=0.$ \end{enumerate} The following lemma prompts us to search families of $2$-cocycles on $\Lambda^3 H_p$ and $\mathfrak{sp}_{2g}(\mathbb{Z}/p)$ that independently satisfy conditions analogous to (1')-(3'). \begin{lema} \label{lema-sep-coc} Given an odd prime p, a family of $2$-cocycles $(B_g)_{g\geq 3}$ on $H_1(\mathcal{M}_{g,1}[p];\mathbb{Z})$ satisfies conditions (1')-(3') if and only if it can be written as the sum of a family of 2-cocycles $(B_g^\Lambda)_{g\geq 3}$ pulled-back from $\Lambda^3 H_p$ and a family of 2-cocycles $(B_g^{sp})_{g\geq 3}$ pulled-back from $\mathfrak{sp}_{2g}(\mathbb{Z}/p)$ that independently satisfy the analogous conditions. \end{lema} \begin{proof} The proof of this statement is based on the fact that the bottom short exact sequence in commutative diagram \eqref{diag-split-M[p]} has a unique splitting as $\mathcal{M}_{g,1}$-modules. The necessary condition is clear. Hence we just prove the sufficient condition. Assume that we have a family of 2-cocycles $(B_g)_{g\geq 3}$ on $H_1(\mathcal{M}_{g,1}[p];\mathbb{Z})$ that satisfies conditions (1')-(3'). Since $-Id\in GL_g(\mathbb{Z})$ acts as multiplication by $-1$ on $\Lambda^3 H_p$ and trivially on $\mathfrak{sp}_{2g}(\mathbb{Z}/p),$ property (2') the 2-cocycles $B_g$ are zero on $\Lambda^3 H_p\times \mathfrak{sp}_{2g}(\mathbb{Z}/p)$ and $\mathfrak{sp}_{2g}(\mathbb{Z}/p)\times \Lambda^3H_p.$ Then given two elements $x=x_\Lambda+x_{sp}$ and $y=y_\Lambda+y_{sp}$ in $H_1(\mathcal{M}_{g,1}[p];\mathbb{Z}),$ written according to the decomposition $\Lambda^3 H_p \oplus \mathfrak{sp}_{2g}(\mathbb{Z}/p),$ the $2$-cocycle relation give us: \begin{align*} B_g(x_\Lambda+x_{sp},y_\Lambda+y_{sp})= & B_g(x_{sp},y_\Lambda+y_{sp})+B_g(x_\Lambda,x_{sp}+y_\Lambda+y_{sp}) \\ = & B_g(x_{sp},y_{sp}+y_\Lambda)+B_g(x_\Lambda,y_\Lambda+(x_{sp}+y_{sp}))\\ = & B_g(x_{sp},y_{sp})+B_g(x_\Lambda,y_\Lambda)=B^{sp}_g(x,y)+B^\Lambda_g(x,y), \end{align*} where $B^\Lambda_g$ and $B^{sp}_g$ stand for the respective restrictions of $B_g$ to $\Lambda^3 H_p$ and to $\mathfrak{sp}_{2g}(\mathbb{Z}/p)$ pulled-back to $H_1(\mathcal{M}_{g,1}[p];\mathbb{Z}).$ Since all maps involved in commutative diagram \eqref{diag-split-M[p]} are $\mathcal{M}_{g,1}$-equivariant and compatible with the stabilization map, the families of 2-cocycles $(B_g^\Lambda)_{g\geq 3}$ and $(B_g^{sp})_{g\geq 3}$ satisfy properties (1') and (2'). Finally, for any $a\in \tau_1^S(\mathcal{A}_{g,1}[p])$ and $x_\Lambda\in \Lambda^3H_p,$ from property (3') of $B_g$ we get that $$0=B_g(a,x_\Lambda)= B_g^\Lambda(a,x_\Lambda)+ B_g^{sp}(a,x_\Lambda)=B_g^\Lambda(a_\Lambda,x_\Lambda).$$ Similarly, $B_g^\Lambda(x_\Lambda,b_\Lambda)=0$ with $b\in \tau_1^S(\mathcal{B}_{g,1}[p]).$ Therefore $B_g^\Lambda$ satisfy (3'). An analogous argument shows that $B_g^{sp}$ also satisfy (3'). \end{proof} \subsection{The images of $\mathcal{A}_{g,1}[p]$ and $\mathcal{B}_{g,1}[p]$ under the abelianization of $\mathcal{M}_{g,1}[p]$.} Our standard decomposition $H_1(\Sigma_{g,1};\mathbb{Z})=A\oplus B$ induces decompositions: $$ \Lambda^3 H_p= W_{AB}^p\oplus W_{A}^p\oplus W_{B}^p,\qquad \mathfrak{sp}_{2g}(\mathbb{Z}/p)= \mathfrak{gl}_g(\mathbb{Z}/p)\oplus Sym^A_g(\mathbb{Z}/p)\oplus Sym^B_g(\mathbb{Z}/p). $$ where $\quad W_{A}^p=\Lambda^3 A_p,\quad W_B^p=\Lambda^3 B_p,\quad W_{AB}^p=B_p\wedge (\Lambda^2 A_p)\oplus A_p \wedge (\Lambda^2 B_p).$ \begin{prop} \label{prop-im-ext} Given an integer $g\geq 3$ and an odd prime $p$, the images of $\mathcal{A}_{g,1}[p]$ and $\mathcal{B}_{g,1}[p]$ in the abelianization of the mod-$p$ Torelli group are respectively, $$ W_{AB}^p\oplus W_{A}^p\oplus \mathfrak{sl}_{g}(\mathbb{Z}/p)\oplus Sym_g^A(\mathbb{Z}/p),$$ $$ \text{and}$$ $$ W_{AB}^p\oplus W_{B}^p\oplus \mathfrak{sl}_{g}(\mathbb{Z}/p)\oplus Sym_g^B(\mathbb{Z}/p).$$ \end{prop} The first half of the computation is given by: \begin{lema} \label{lem_im_A[p],B[p]} For an integer $g\geq 3$ and an odd prime $p$, the images of $\mathcal{A}_{g,1}[p]$ and $\mathcal{B}_{g,1}[p]$ in $\bigwedge^3H_p$ are respectively $$W_A^p\oplus W_{AB}^p\quad\text{and}\quad W_B^p\oplus W_{AB}^p.$$ \end{lema} \begin{proof} We only do the proof for $\mathcal{B}_{g,1}[p],$ for $\mathcal{A}_{g,1}[p]$ the argument is analogous. Consider the following commutative diagram with exact rows: \begin{equation} \label{diag_com_B} \xymatrix@C=7mm@R=10mm{ 1 \ar@{->}[r] & \mathcal{TB}_{g,1} \ar@{->}[r] \ar@{->}[d]^{\tau_1^Z} & \mathcal{B}_{g,1} \ar@{->}[r]^-{\Psi} \ar@{->}[d]^-{\rho_2^Z} & Sp_{2g}^B(\mathbb{Z}) \ar@{->}[r] \ar@{->}[d]^{r_p} & 1\\ 0 \ar@{->}[r] & W_B^p\oplus W_{AB}^p\ar@{->}[r] & \rho_2^Z(\mathcal{B}_{g,1}) \ar@{->}[r] & Sp_{2g}^{B\pm}(\mathbb{Z}/p) \ar@{->}[r] & 1 .} \end{equation} Since $-Id$ acts as $-1$ on $W_B^p\oplus W_{AB}^p,$ by the Center kills Lemma the cohomology groups $H^i(Sp_{2g}^{B\pm}(\mathbb{Z}/p);W_B^p\oplus W_{AB}^p)$ with $i=1,2$ are zero and therefore the bottom row of the diagram \eqref{diag_com_B} splits with only one $Sp_{2g}^{B\pm}(\mathbb{Z}/p)$-conjugacy class of splittings. Composing a retraction map $r: \rho_2^Z(\mathcal{B}_{g,1}) \rightarrow W_B^p\oplus W_{AB}^p$ with $\rho_2^Z$ we get a crossed homomorphism: $$k_B: \mathcal{B}_{g,1}\longrightarrow W_B^p\oplus W_{AB}^p.$$ By commutativity of the left hand square, $k_B$ and $\tau_1^Z$ coincide on $\mathcal{TB}_{g,1}$ and by Lemma~\ref{lema_res_B} these homomorphisms coincide on $\mathcal{B}_{g,1}[p]$ as well. \end{proof} The second half of the computation is: \begin{lema}\label{lema:imA[d]B[d]sp} Given an integer $g\geq 3$ and an odd prime $p$, the images of $\mathcal{A}_{g,1}[p]$ and $\mathcal{B}_{g,1}[p]$ in $\mathfrak{sp}_{2g}(\mathbb{Z}/p)$ are respectively $$ \mathfrak{sl}_{g}(\mathbb{Z}/d)\oplus Sym_g^A(\mathbb{Z}/d) \quad \text{and}\quad \mathfrak{sl}_{g}(\mathbb{Z}/d)\oplus Sym_g^B(\mathbb{Z}/d).$$ \end{lema} As we have already seen in Lemma~\ref{lem:extensionshandelbody}, the images of $\mathcal{A}_{g,1}[p]$ and $\mathcal{B}_{g,1}[p]$ under the symplectic representation are respectively given by: $$ Sp_{2g}^A(\mathbb{Z},p)=SL_g(\mathbb{Z},p)\ltimes Sym_g^A(p\mathbb{Z}),\quad \text{and}\quad Sp_{2g}^B(\mathbb{Z},p)=SL_g(\mathbb{Z},p)\ltimes Sym_g^B(p\mathbb{Z}).$$ The restriction of $\alpha:Sp_{2g}(\mathbb{Z},p)\rightarrow \mathfrak{sp}_{2g}(\mathbb{Z}/p)$ to these groups give us: \begin{lema} \label{lema_ses_SpB} Given an integer $g\geq 3$ and an odd prime $p$, there are short exact sequences \begin{align*} & \xymatrix@C=7mm@R=10mm{1 \ar@{->}[r] & Sp_{2g}^A(\mathbb{Z},p^2) \ar@{->}[r] & Sp_{2g}^A(\mathbb{Z},p) \ar@{->}[r]^-{\alpha} & \mathfrak{sl}_{g}(\mathbb{Z}/p)\oplus Sym_g^A(\mathbb{Z}/p) \ar@{->}[r] & 1, } \\ & \xymatrix@C=7mm@R=10mm{1 \ar@{->}[r] & Sp_{2g}^B(\mathbb{Z},p^2) \ar@{->}[r] & Sp_{2g}^B(\mathbb{Z},p) \ar@{->}[r]^-{\alpha} & \mathfrak{sl}_{g}(\mathbb{Z}/p)\oplus Sym_g^B(\mathbb{Z}/p) \ar@{->}[r] & 1. } \end{align*} \end{lema} \begin{proof} The result is a direct consequence of \cite[Thm. 1.1]{Lee} and \cite[Lemma 1]{newman}, where the authors proved respectively that $\alpha$ restricted to $SL_g(\mathbb{Z},p)$ and $Sym_g(p\mathbb{Z})$ give epimorphisms $\alpha: SL_g(\mathbb{Z},p) \rightarrow \mathfrak{sl}_g(\mathbb{Z}/p)$ and $\alpha:Sym_g(p\mathbb{Z})\rightarrow Sym_g(\mathbb{Z}/p).$ \end{proof} \subsection{Candidate families of 2-cocycles to build invariants} We find the families of 2-cocycles on the abelianization of the mod-$p$ Torelli group that satisfy conditions (1')-(3'), i.e. candidates to induce an invariant. Because of Lemma \ref{lema-sep-coc} we search separately on $\Lambda^3 H_p$ and on $\mathfrak{sp}_{2g}(\mathbb{Z}/p)$. \subsubsection{2-cocycles on $\Lambda^3 H_p$.} For each $g$, the intersection form on the first homology group of $\Sigma_{g,1}$ induces a bilinear form $\omega:A\otimes B\rightarrow \mathbb{Z}/p$, which in turn induces two bilinear forms $$ J_g:W_A^p\otimes W_B^p \rightarrow \mathbb{Z}/p\quad \text{and} \quad {}^t\!J_g:W_B^p\otimes W_A^p \rightarrow \mathbb{Z}/p$$ that we extend by $0$ to degenerate bilinear forms on $$\Lambda^3H_p=W^p_A\oplus W^p_{AB}\oplus W^p_{B}.$$ Written as matrices according to the aforementioned decomposition these are: $$J_g:=\left(\begin{matrix} 0 & 0 & Id\\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{matrix}\right), \qquad {}^t\!J_g:=\left(\begin{matrix} 0 & 0 & 0\\ 0 & 0 & 0 \\ Id & 0 & 0 \end{matrix}\right).$$ We show that only multiples of $ ({}^t\!J_g)_{g\geq 3}$ satisfy conditions (1')-(3'). \begin{prop} \label{prop-ext-cocy-red} Given an integer $g\geq 3$ and an odd prime $p,$ every $2$-cocycle on $\Lambda^3H_p$ that satisfies condition (3') is a bilinear form on $\Lambda^3H_p.$ \end{prop} \begin{proof} Let $B_g$ be an arbitrary 2-cocycle on $\Lambda^3 H_p$ satisfying (3'), if we write each element $w\in \Lambda^3 H_p $ as $w=w_a+w_{ab}+w_b$ according to the decomposition $W^p_A\oplus W^p_{AB}\oplus W^p_B,$ then Lemma~\ref{lem_im_A[p],B[p]}, the cocycle relation and condition (3') imply that $$\forall v,w\in \Lambda^3H_p,\qquad B_g(v,w)=B_g(v_b,w_a).$$ Next, using again the cocycle relation and this last equality, we prove the linearity of $B_g$ on the first variable: \begin{align*} B_g(u+v,w)= & B_g(u_b+v_b,w_a) \\ = & B_g(v_b,w_a)+B_g(u_b,v_b+w_a) -B_g(u_b,v_b) \\ = & B_g(u_b,w_a)+B_g(v_b,w_a) \\ = & B_g(u,w) +B_g(v,w). \end{align*} A similar proof holds for the linearity on the second variable. \end{proof} We now compute the group of $GL_g(\mathbb{Z})$-invariant bilinear forms on $\Lambda^3 H_p.$ Consider the $Sp_{2g}(\mathbb{Z}/p)$-invariant bilinear forms: \begin{align*} \Theta_g(c_i\wedge c_j\wedge c_k\otimes c'_i\wedge c'_j\wedge c'_k) & =\sum_{\sigma\in \mathfrak{S}_3}(-1)^{\varepsilon(\sigma)}(\omega(c_i,c'_{\sigma(i)})\omega(c_j,c'_{\sigma(j)})\omega(c_k,c'_{\sigma(k)})),\\ Q_g(c_i\wedge c_j\wedge c_k\otimes c'_i\wedge c'_j\wedge c'_k) & =\omega(C(c_i\wedge c_j\wedge c_k),C(c'_i\wedge c'_j\wedge c'_k)), \end{align*} where $\varepsilon(\sigma)$ denotes the sign of the permutation $\sigma$, the map $\omega$ denotes the intersection form on $H$ and $C$ denotes the contraction map $$C(a\wedge b\wedge c)=2[\omega(b,c)a+\omega(c,a)b+\omega(a,b)c].$$ Let $\pi_A,\pi_{A^2B},\pi_{AB^2},\pi_{B}$ denote the respective projections on each component of the decomposition of $GL_g(\mathbb{Z})$-modules $\Lambda^3 H_p=W_A^p\oplus W_{A^2B}^p\oplus W_{AB^2}^p\oplus W_B^p.$ \begin{prop} \label{prop:bilin_extp} Given an odd prime $p$ and an integer $g\geq 4$, the composition of the $2$-cocycles $\Theta_g, Q_g$ with the projections $\pi_A,$ $\pi_{B^2A},$ $\pi_{A^2B},$ $\pi_B$ give $GL_g(\mathbb{Z})$-invariant bilinear forms $$\begin{array}{lll} -J_g=\Theta_g(\pi_A,\pi_B), & \Theta_g(\pi_{A^2B},\pi_{B^2A}), & Q_g(\pi_{A^2B},\pi_{B^2A}), \\ {}^t\!J_g=\Theta_g(\pi_B,\pi_A), & \Theta_g(\pi_{B^2A},\pi_{A^2B}),& Q_g(\pi_{B^2A},\pi_{A^2B}), \\ \end{array}$$ and these form a basis of $$Hom\left(\Lambda^3H_p\otimes \Lambda^3 H_p;\;\mathbb{Z}/p\right)^{GL_g(\mathbb{Z})}.$$ \end{prop} \begin{proof} Since the bilinear forms $\Theta_g,$ $Q_g$ are $Sp_{2g}(\mathbb{Z}/p)$-invariant and the projections $\pi_A,$ $\pi_{A^2B},$ $\pi_{AB^2},$ $\pi_{B}$ are $GL_g(\mathbb{Z})$-equivariant, by construction the bilinear forms given in the statement are $GL_g(\mathbb{Z})$-invariant. Because $\mathbb{Z}/p$ is a trivial $GL_g(\mathbb{Z})$-module, we have an isomorphism: $$ Hom\left(\Lambda^3H_p\otimes \Lambda^3 H_p;\;\mathbb{Z}/p\right)^{GL_g(\mathbb{Z})}\simeq Hom\left(\left(\Lambda^3H_p\otimes \Lambda^3 H_p\right)_{GL_g(\mathbb{Z})};\;\mathbb{Z}/p\right).$$ Then any $GL_g(\mathbb{Z})$-invariant bilinear form is completely determined by its values on the generators of $(\Lambda^3H_p\otimes \Lambda^3 H_p)_{GL_g(\mathbb{Z})}$ given in Proposition \ref{prop-coinv-tens-extp}. Computing the values of the given bilinear forms on these generators we get that they form a basis. \end{proof} Taking the antisymmetrization of the generators given in Proposition \ref{prop:bilin_extp} we get: \begin{cor} \label{cor-basis-antisym-extp} Given an odd prime $p$ and an integer $g\geq 4,$ the antisymmetric bilinear forms $\Theta_g$, $Q_g$ and $(J_g-{}^t\!J_g)$ form a basis of the group $$ Hom(\Lambda^3H_p\wedge\Lambda^3H_p;\mathbb{Z}/p)^{GL_g(\mathbb{Z})} .$$ \end{cor} Finally, we show: \begin{prop} \label{prop-extp-unique-coc} Given an odd prime $p$, the family of bilinear forms $({}^t\!J_g)_{g\geq 3}$ is the unique family of $2$-cocycles (up to a multiplicative constant) on $\Lambda^3 H_p$ whose pull-back along $\tau_1^Z$ on $\mathcal{M}_{g,1}[p]$ satisfies conditions (2) and (3). Moreover once we have fixed a common multiplicative constant the family of pulled-back cocycles satisfies also (1). \end{prop} \begin{proof} By Proposition \ref{prop-ext-cocy-red} any $2$-cocycle that satisfies condition~(3') is a bilinear form. By Lemma \ref{lem_im_A[p],B[p]} the $GL_g(\mathbb{Z})$-invariant bilinear forms that satisfy condition~(3') are zero on the generators of $(\Lambda^3H_p\otimes \Lambda^3 H_p)_{GL_g(\mathbb{Z})}$ given in Proposition \ref{prop-coinv-tens-extp} except on the generator $(b_1\wedge b_2 \wedge b_3)\otimes(a_1\wedge a_2 \wedge a_3),$ and hence they form a $1$-dimensional $\mathbb{Z}/p$-vector space. By construction, for each $g\geq 3$, the $GL_g(\mathbb{Z})$-bilinear form ${}^t\!J_g=\Theta_g(\pi_B,\pi_A)$ satisfies condition (3') and its value on the aforementioned generator is $3$, which is coprime with $p\geq 5.$ Therefore the family of bilinear forms $({}^t\!J_g)_{g\geq 3}$ satisfy conditions (1')-(3'). \end{proof} \subsubsection{2-cocycles on $\mathfrak{sp}_{2g}(\mathbb{Z}/p)$.} Similarly to $\Lambda^3 H_p,$ for each $g,$ the product of matrices composed with the trace map induces bilinear forms: $$ K_g:Sym^A_g(\mathbb{Z}/p)\otimes Sym^B_g(\mathbb{Z}/p) \rightarrow \mathbb{Z}/p \quad \text{and} \quad {}^t\!K_g: Sym^B_g(\mathbb{Z}/p)\otimes Sym^A_g(\mathbb{Z}/p) \rightarrow \mathbb{Z}/p,$$ that we extend by zero to degenerate bilinear forms on \begin{equation} \label{dec-sp-long-p} \mathfrak{sp}_{2g}(\mathbb{Z}/p)\simeq \mathfrak{gl}_g(\mathbb{Z}/p)\oplus Sym^A_g(\mathbb{Z}/p)\oplus Sym^B_g(\mathbb{Z}/p). \end{equation} In all what follows, given an element $z\in \mathfrak{sp}_{2g}(\mathbb{Z}/p)$ we denote $z_{gl}$, $z_a$, $z_b$ the projections of $z$ on the respective components of the above decomposition. Unlike for $2$-cocycles on $\Lambda^3 H_p$, on $\mathfrak{sp}_{2g}(\mathbb{Z}/p)$, properties (1')-(3') are not enough to ensure that a $2$-cocycle is a bilinear form. Nevertheless, \begin{prop} \label{prop-2coc-sp-gen} Given an integer $g\geq 3$ and an odd prime $p,$ every $2$-cocycle on $\mathfrak{sp}_{2g}(\mathbb{Z}/p)$ that satisfies condition (3') is a bilinear form up to an addition of a $2$-cocycle on $\mathfrak{sp}_{2g}(\mathbb{Z}/p)$ pulled-back from $\mathbb{Z}/p$ along $tr \circ \pi_{gl}.$ \end{prop} \begin{proof} Let $B'_g$ denote an arbitrary $2$-cocycle on $\mathfrak{sp}_{2g}(\mathbb{Z}/p)$ satisfying condition (3') and $B''_g$ the $2$-cocycle given by the restriction of $B'_g$ to the $\mathfrak{gl}_{g}(\mathbb{Z}/p)$ summand and then extended back by $0$ to degenerate a 2-cocycle on $\mathfrak{sp}_{2g}(\mathbb{Z}/p)$. By condition (3') the 2-cocycle $B''_g$ is zero on $\mathfrak{sl}_{g}(\mathbb{Z}/p)\times \mathfrak{gl}_{g}(\mathbb{Z}/p)$, $\mathfrak{gl}_{g}(\mathbb{Z}/p)\times \mathfrak{sl}_{g}(\mathbb{Z}/p)$ and then a pull-back of a $2$-cocycle on $\mathbb{Z}/p$ by $(tr\circ \pi_{gl}).$ Next we show that $B_g=B'_g-B''_g$ is a bilinear form. If we write each element $z\in \mathfrak{sp}_{2g}(\mathbb{Z}/p)$ as $z_{gl}+z_a+z_b$ according to the decomposition \eqref{dec-sp-long-p}, the cocycle relation together with condition (3') imply that \begin{equation*} \forall x,y\in \mathfrak{sp}_{2g}(\mathbb{Z}/p),\qquad B_g(x,y)=B_g(x_{gl}+x_b,y_{gl}+y_a). \end{equation*} Then as in the proof of Proposition \ref{prop-ext-cocy-red} by the cocycle relation and the fact that $B_g$ is zero on $\mathfrak{gl}_{g}(\mathbb{Z}/p)$ one gets that $B_g$ is a bilinear form. \end{proof} We now compute the group of $GL_g(\mathbb{Z})$-invariant bilinear forms on $\mathfrak{sp}_{2g}(\mathbb{Z}/p).$ \begin{prop} \label{prop:bilin_sp} Given an odd prime $p$ and an integer $g\geq 4$, the bilinear forms $$ \begin{aligned} T^1_g(x,y)=tr(x_{gl}y_{gl}), &\qquad T^2_g(x,y)=tr(x_{gl})tr(y_{gl}),\\ K_g(x,y)=tr(x_ay_b),& \qquad {}^t\!K_g(x,y)=tr(x_by_a). \end{aligned} $$ form a basis of $$ Hom(\mathfrak{sp}_{2g}(\mathbb{Z}/p)\otimes\mathfrak{sp}_{2g}(\mathbb{Z}/p);\mathbb{Z}/p)^{GL_g(\mathbb{Z})} .$$ \end{prop} \begin{proof} Since the trace map is $GL_g(\mathbb{Z})$-invariant, by construction the bilinear forms given in the statement are $GL_g(\mathbb{Z})$-invariant. Because $\mathbb{Z}/p$ is a trivial $GL_g(\mathbb{Z})$-module, we have an isomorphism: $$ Hom\left(\mathfrak{sp}_{2g}(\mathbb{Z}/p)\otimes\mathfrak{sp}_{2g}(\mathbb{Z}/p);\;\mathbb{Z}/p\right)^{GL_g(\mathbb{Z})}\simeq Hom\left(\left(\mathfrak{sp}_{2g}(\mathbb{Z}/p)\otimes\mathfrak{sp}_{2g}(\mathbb{Z}/p)\right)_{GL_g(\mathbb{Z})};\;\mathbb{Z}/p\right)$$ Then any $GL_g(\mathbb{Z})$-invariant bilinear form is completely determined by its values on the generators of $(\mathfrak{sp}_{2g}(\mathbb{Z}/p)\otimes\mathfrak{sp}_{2g}(\mathbb{Z}/p))_{GL_g(\mathbb{Z})}$ given in Proposition \ref{prop-coinv-tens-sp}. Computing the values of the given bilinear forms on these generators we get that they form a basis. \end{proof} Taking the antisymmetrization of the bilinear forms given in Proposition \ref{prop:bilin_sp} we get: \begin{cor} \label{cor_sp_bil_anti} Given an odd prime $p$ and an integer $g\geq 4,$ the antisymmetric bilinear form $(K_g-{}^t\!K_g)$ generates the group $$ Hom(\mathfrak{sp}_{2g}(\mathbb{Z}/p)\wedge\mathfrak{sp}_{2g}(\mathbb{Z}/p);\mathbb{Z}/p)^{GL_g(\mathbb{Z})}. $$ \end{cor} Finally, we show: \begin{prop} \label{prop_cocy-sp} Given an odd prime $p$, the families of bilinear forms $({}^t\!K_g)_{g\geq 3}$ and of $2$-cocycles on $\mathfrak{sp}_{2g}(\mathbb{Z}/p)$ lifted from $\mathbb{Z}/p$ along $tr\circ \pi_{gl}$ are the unique families of $2$-cocycles (up to linear combinations) on $\mathfrak{sp}_{2g}(\mathbb{Z}/p)$ whose pull-back along $\alpha\circ \Psi$ on $\mathcal{M}_{g,1}[p]$ satisfy conditions (2) and (3). Moreover once we have fixed a linear combination, the family of the pulled-back $2$-cocycles satisfies also (1). \end{prop} \begin{proof} By Proposition \ref{prop-2coc-sp-gen}, we only need to search the linear combinations of families of bilinear forms on $\mathfrak{sp}_{2g}(\mathbb{Z}/p)$ and of $2$-cocycles on $\mathfrak{sp}_{2g}(\mathbb{Z}/p)$ pulled-back from $\mathbb{Z}/p$ along $tr \circ \pi_{gl},$ that satisfy conditions (1')-(3'). Notice that these last families of 2-cocycles already satisfy conditions (1')-(3'), because $tr\circ \pi_{gl}:\; \mathfrak{sp}_{2g}(\mathbb{Z}/p)\rightarrow \mathbb{Z}/p$ is $GL_g(\mathbb{Z})$-invariant, sends $\mathfrak{sl}_g(\mathbb{Z}/p)\oplus Sym^A_g(\mathbb{Z}/p)\oplus Sym^B_g(\mathbb{Z}/p)$ to zero and is compatible with the stabilization map $\mathfrak{sp}_{2g}(\mathbb{Z}/p)\hookrightarrow \mathfrak{sp}_{2g+2}(\mathbb{Z}/p).$ As a consequence, the families of bilinear forms involved in the aforementioned linear combinations have to satisfy conditions (1')-(3'). By Lemma \ref{lema:imA[d]B[d]sp}, the $GL_g(\mathbb{Z})$-invariant bilinear forms that satisfy condition (3') are zero on the generators of $(\mathfrak{sp}_{2g}(\mathbb{Z}/p)\otimes \mathfrak{sp}_{2g}(\mathbb{Z}/p))_{GL_g(\mathbb{Z})}$ given in Proposition \ref{prop-coinv-tens-sp} except on the generators $n_{11}\otimes n_{11},$ $u_{11}\otimes l_{11},$ and hence they form a $2$-dimensional $\mathbb{Z}/p$-vector space. By construction, for each $g\geq 3$, the $GL_g(\mathbb{Z})$-bilinear forms ${}^t\!K_g,$ $T^2_g$ satisfy condition (3') and their values on the aforementioned generators are $(0, 1)$ and $(1,0)$ respectively. Therefore the families of bilinear forms $({}^t\!K_g)_{g\geq 3},$ $(T^2_g)_{g\geq 3}$ satisfy conditions (1')-(3'). Finally, notice that by definition $T^2_g$ is a $2$-cocycle on $\mathfrak{sp}_{2g}(\mathbb{Z}/p)$ pulled-back from $\mathbb{Z}/p$ along $tr\circ \pi_{gl}$. Therefore we are only left with the 2-cocycles given in the statement. \end{proof} \subsection{Triviality of 2-cocycles and torsors} \label{sec-triv-2coc-H1} Once we know the families of $2$-cocycles on the abelianization of the mod-$p$ Torelli group that satisfy conditions (1')-(3'), we check which of these families of 2-cocycles become trivial with trivial torsor when they are lifted to $\mathcal{M}_{g,1}[p]$, i.e. which of these lifted cocycles admit an $\mathcal{AB}_{g,1}$-invariant trivialization that can be made into an invariant. We first show that the cohomology class of the unique candidate coming from $\Lambda^3H_p$, the $2$-cocycle $(\tau_1^Z)^*({}^t\!J_g)$, is non-trivial. Then we check which $2$-cocycles that come from $\mathfrak{sp}_{2g}(\mathbb{Z}/p)$ do produce invariants of $\mathbb{Z}/p$-homology spheres. Finally we show that it is not possible to obtain a trivial $2$-cocycle as a sum of two non-trivial $2$-cocycles coming from $\Lambda^3H_p$ and from $\mathfrak{sp}_{2g}(\mathbb{Z}/p)$ respectively. \subsubsection{The 2-cocycles from $\Lambda^3H_p$.} \label{sec-2coc-estp} We first compute the group $H^2(\Lambda^3H_p;\mathbb{Z}/p)^{GL_g(\mathbb{Z})}.$ By considering the action of $-Id$ we get that $Hom(\Lambda^3H_p,\mathbb{Z}/p)^{GL_g(\mathbb{Z})}$ is zero. Since $\Lambda^3 H_p$ and $\mathbb{Z}/p$ are $p$-elementary abelian groups with $\Lambda^3 H_p$ acting trivially on $\mathbb{Z}/p$, the UCT (c.f. Section \ref{sec-saunders}) gives us a natural isomorphism: $$\theta: \; H^2(\Lambda^3H_p; \mathbb{Z}/p)^{GL_g(\mathbb{Z})} \longrightarrow Hom(\Lambda^2(\Lambda^3H_p);\mathbb{Z}/p)^{GL_g(\mathbb{Z})}.$$ Therefore by Corollary \ref{cor-basis-antisym-extp}, \begin{prop} \label{prop_H2_extp} Given an integer $g\geq 4$ and an odd prime $p$, $H^2(\Lambda^3H_p;\mathbb{Z}/p)^{GL_g(\mathbb{Z})}$ is generated by the bilinear forms $\Theta_g$, $Q_g$, ${}^t\!J_g$. \end{prop} The next proposition shows in particular that the $2$-cocycle $(\tau_1^Z)^*Q_g$ is cohomologous to $(\tau_1^Z)^*(-48\;{}^t\!J_g)$ and that this last 2-cocycle is non-trivial on $\mathcal{M}_{g,1}[p].$ \begin{prop} \label{prop-ker-im-tau} The image and the kernel of the pull-back $$(\tau_1^Z)^*:H^2(\Lambda^3H_p;\mathbb{Z}/p)^{GL_g(\mathbb{Z})}\longrightarrow H^2(\mathcal{M}_{g,1}[p];\mathbb{Z}/p)^{GL_g(\mathbb{Z})}$$ are respectively generated by the cohomology class of $(\tau_1^Z)^*(Q_g)$ and by the cohomology classes of $(Q_g+6\Theta_g)$ and $(\Theta_g-8\;{}^t\!J_g)$. \end{prop} Before proving this proposition we need some notations and a preliminary result. To make our computations easier to handle we use the Lie algebra of labeled uni-trivalent trees to encode the first quotient in the Zassenhauss filtration (c.f. \cite{levine}). Let $\mathcal{A}_k(H_p)$ (resp. $\mathcal{A}_k^r(H_p)$) be the free abelian group generated by the uni-trivalent (resp. rooted) trees with $k+2$ univalent vertices labeled by elements of $H_p$ and a cyclic order of each trivalent vertex modulo the relations $IHX$, $AS$ together with linearity of labels (c.f. \cite{levine}). We can endow $\mathcal{A}(H_p) := {\mathcal{A}_k(H_p)}_{k\geq 1}$ with a bracket operation $$[\; \cdot \; ,\; \cdot \; ]: \mathcal{A}_k(H_p)\otimes \mathcal{A}_l(H_p)\rightarrow \mathcal{A}_{k+l}(H_p)$$ given below. For labeled trees $T_1,T_2\in \mathcal{A}(H_p)$ we define: $$ [T_1,T_2]=\sum_{x,y}\omega(l_x, l_y)\;T_1-xy-T_2, $$ where the sum is taken over all pairs of a univalent vertex $x$ of $T_1$, labeled by $l_x$, and $y$ of $T_2$, labeled by $l_y$, and $T_1-xy-T_2$ is the tree given by welding $T_1$ and $T_2$ at the pair. Moreover we define the \textit{labeling map}, $$Lab:H_p\otimes \mathcal{A}_{k+1}^r(H_p)\rightarrow\mathcal{A}_k(H_p),$$ sending each elementary tensor $u\otimes T\in H_p\otimes \mathcal{A}_{k+1}^r(H_p)$ to the tree $T_u\in \mathcal{A}_k(H_p)$, which is obtained by labeling the root of $T$ by $u$, and extend it by linearity. For more detailed explanations we refer the interested reader to Levine's paper \cite{levine}. Finally, we compute $Hom(\mathcal{A}_2(H_p),\mathbb{Z}/p)^{GL_g(\mathbb{Z})}.$ Consider the homomorphisms $d_1,d_2\in Hom(\mathcal{A}_2(H_p),\mathbb{Z}/p)$ given by \begin{align*} d_1\Big(\tree{a}{b}{c}{d}\Big)= & \;2\omega(a,b)\omega(c,d)+\omega(a,c)\omega(b,d)-\omega(a,d)\omega(b,c),\\ d_2\Big(\tree{a}{b}{c}{d}\Big)= & \;\varpi(a,c)\varpi(b,d)-\varpi(a,d)\varpi(b,c), \end{align*} where $\omega$ is the intersection form and $\varpi$ is the form associated to the matrix $\left(\begin{smallmatrix} 0 & Id \\ Id & 0 \end{smallmatrix}\right)$. By direct inspection, these maps are well defined, i.e. they are zero on the IHX, AS relations of $\mathcal{A}_2(H_p).$ \begin{lema} \label{lema_hom_2sym} Given an integer $g\geq 4$ and $p$ an odd prime, the homomorphisms $d_1,d_2$ form a basis of $$Hom(\mathcal{A}_2(H_p),\mathbb{Z}/p)^{GL_g(\mathbb{Z})}.$$ \end{lema} \begin{proof} Since the intersection form $\omega $ and the form $\varpi$ associated to the matrix $\left(\begin{smallmatrix} 0 & Id \\ Id & 0 \end{smallmatrix}\right)$ are both $GL_g(\mathbb{Z})$-invariant, the homomorphisms given in the statement are $GL_g(\mathbb{Z})$-invariant. Since $\mathbb{Z}/p$ is a trivial $GL_g(\mathbb{Z})$-module, we have an isomorphism: $$ Hom\left(\mathcal{A}_2(H_p);\;\mathbb{Z}/p\right)^{GL_g(\mathbb{Z})}\simeq Hom\left((\mathcal{A}_2(H_p))_{GL_g(\mathbb{Z})};\;\mathbb{Z}/p\right).$$ Then any $GL_g(\mathbb{Z})$-invariant homomorphism is completely determined by its values on the generators of $(\mathcal{A}_2(H_p))_{GL_g(\mathbb{Z})}$ given in Proposition \ref{prop-2sym-gen}. Computing the values of the given homomorphisms on these generators we get that they form a basis. \end{proof} \begin{proof}[Proof of Proposition \ref{prop-ker-im-tau}] In the first half of the proof we show that the dimension of $\ker((\tau_1^Z)^*)$ is at least $2$ by providing two cocycles that belong to this kernel and write them in terms of the generators given in Proposition \ref{prop_H2_extp}. Recall that $Im(\tau_2^Z)\subset Hom(H_p,\mathcal{L}_{3}(H_p))$ for $p\geq 5.$ Moreover, similarly to \cite[Sec. 3.1]{pitsch4}, there are isomorphisms of $Sp_{2g}(\mathbb{Z}/p)$-modules: $$Hom(H_p,\mathcal{L}_{k+1}(H_p))\simeq H_p\otimes \mathcal{L}_{k+1}(H_p)\simeq H_p\otimes \mathcal{A}_{k+1}^r(H_p)\quad \text{and} \quad \Lambda^3 H_p\simeq \mathcal{A}_1(H_p).$$ Consider the extension of groups $\xymatrix@C=5mm@R=5mm{ 0\ar[r] & Im(\tau_2^Z)\ar[r]& \rho_3^Z(\mathcal{M}_{g,1}) \ar[r] & \rho_2^Z(\mathcal{M}_{g,1}) \ar[r] & 1 }$. If we restrict this extension to $\rho^Z_2(\mathcal{M}_{g,1}[p])=\tau_1^Z(\mathcal{M}_{g,1}[p])= \Lambda^3 H_p $ we get another extension $$\xymatrix@C=7mm@R=7mm{ 0\ar[r] & Im(\tau_2^Z)\ar[r]& \rho_3^Z(\mathcal{M}_{g,1}[p]) \ar[r]^-{\psi_{3|2}} & \Lambda^3 H_p \ar[r] & 0 }.$$ Denote $\mathcal{X}_p$ a $2$-cocycle associated to this extension. By construction its cohomology class is $Sp_g(\mathbb{Z}/p)$-invariant (c.f. \cite[Sec. III.10]{brown}). Pushing-out $\mathcal{X}_p$ by $Lab: \;Im(\tau_2^Z)\rightarrow \mathcal{A}_2(H_p)$ and subsequently by $d:\mathcal{A}_2(H_p)\rightarrow \mathbb{Z}/p$, the $GL_g(\mathbb{Z})$-invariant homomorphism $d_1$ or $d_2$ given in Lemma~\ref{lema_hom_2sym}, we get a 2-cocycle $(d\circ Lab)_*\mathcal{X}_p$ whose class belongs to $H^2(\Lambda^3H_p;\mathbb{Z}/p)^{GL_g(\mathbb{Z})}.$ In fact, this class belongs to the kernel of $(\tau_1^Z)^*:$ Since $\tau_1^Z=\psi_{3|2}\circ\rho^Z_3$, it is enough to show that the class of the 2-cocycle $(d\circ Lab)_*\mathcal{X}_p$ belongs to the kernel of $\psi_{3|2}^*.$ By construction, the cohomology class of $\psi_{3|2}^*\mathcal{X}_p$ is zero and the pull-back $\psi_{3|2}^*$ commutes with the push-out $(d\circ Lab)_*.$ Therefore we get that: $$\psi_{3|2}^*((d\circ Lab)_*\mathcal{X}_p)=(d\circ Lab)_*(\psi_{3|2}^*\mathcal{X}_p)=0.$$ Next we find the expression of the cohomology classes of $(d_1\circ Lab)_*\mathcal{X}_p$ and $(d_2\circ Lab)_*\mathcal{X}_p$ in terms of the generators of $H^2(\Lambda^3H_p;\mathbb{Z}/p)^{GL_g(\mathbb{Z})}$ given in Proposition \ref{prop_H2_extp}. For such purpose we write the image of these cohomology classes by the natural isomorphism $$\theta: \; H^2(\Lambda^3H_p; \mathbb{Z}/p)^{GL_g(\mathbb{Z})} \longrightarrow Hom(\Lambda^2(\Lambda^3H_p);\mathbb{Z}/p)^{GL_g(\mathbb{Z})}$$ in terms of the generators given in Corollary~\ref{cor-basis-antisym-extp}. By naturality of $\theta$ the antisymmetric bilinear form $\theta(Lab_*\mathcal{X}_p).$ is equal to $Lab_*\theta(\mathcal{X}_p).$ By the computations done in \cite[Thm. 3.1]{mor1} modulo $p$, this last bilinear form is the bracket $[\; \cdot \; ,\; \cdot \; ]$ of the Lie algebra of labelled uni-trivalent trees. Then, by naturality of $\theta,$ the antisymmetric bilinear form $\theta(d_*Lab_*\mathcal{X}_p)$ is equal to $d_*\theta(Lab_*\mathcal{X}_p)=d_*[\; \cdot \; ,\; \cdot \; ].$ Evaluating these elements on the generators of $(\Lambda^2(\Lambda^3H_p))_{GL_g(\mathbb{Z})}$ given in Corollary \ref{cor-coinv-ext-extp}, \[ \begin{tabular}{c|c|c|c|c|c|} \cline{2-6} & ${d_1}_*[\; \cdot \; ,\; \cdot \; ]$ & ${d_2}_*[\; \cdot \; ,\; \cdot \; ]$ & $\Theta_g$ & $Q_g$ & $(\;{}^t\!J_g-J_g)$\\ \hline \multicolumn{1}{|c|}{$(a_1\wedge a_2 \wedge a_3) \wedge (b_1\wedge b_2 \wedge b_3)$} & $3$ & $3$ & $-1$ & $0$ & $-1$\\ \hline \multicolumn{1}{|c|}{$(a_1\wedge a_2 \wedge b_2) \wedge (b_1\wedge a_2 \wedge b_2)$} & $5$ & $-1$ & $-1$ & $-4$ & $0$ \\ \hline \multicolumn{1}{|c|}{$(a_1\wedge a_2 \wedge b_2) \wedge (b_1\wedge a_3 \wedge b_3)$} & $2$ & $0$ & $0$ & $-4$ & $0$\\ \hline \end{tabular} \] From this table we get the following linear combinations in $Hom(\Lambda^2(\Lambda^3H_p);\mathbb{Z}/p)^{GL_g(\mathbb{Z})}$: $$ {d_1}_*[\; \cdot \; ,\; \cdot \; ]= -3\Theta_g-\frac{1}{2}Q_g, \qquad {d_2}_*[\; \cdot \; ,\; \cdot \; ]= \;\Theta_g-4(\;{}^t\!J_g-J_g). $$ Then by Proposition \ref{prop_H2_extp}, in $H^2(\Lambda^3H_p;\mathbb{Z}/p)^{GL_g(\mathbb{Z})}$ we have: $$ \frac{1}{2}{d_1}_*[\; \cdot \; ,\; \cdot \; ]= -\frac{3}{2}\Theta_g-\frac{1}{4}Q_g, \qquad \frac{1}{2}{d_2}_*[\; \cdot \; ,\; \cdot \; ]= \;\frac{1}{2}\Theta_g-4\;{}^t\!J_g. $$ Multiplying these two cocycles by $4$ and $2$ respectively, both invertible elements in $\mathbb{Z}/p$, we get the cocycles given in the statement. In the second half of the proof we show that the cohomology class of $(\tau_1^Z)^*(Q_g)$ is the image of a generator of $\mathbb{Z}/p=H^2(\mathcal{M}_{g,1};\mathbb{Z}/p)\hookrightarrow H^2(\mathcal{M}_{g,1}[p];\mathbb{Z}/p)$ ( c.f. Proposition~\ref{prop_inj_MGC}) and therefore is not zero; since $H^2(\Lambda^3H_p;\mathbb{Z}/p)^{GL_g(\mathbb{Z})}$ is a $3$-dimensional $\mathbb{Z}/p$-vector space, this will give us the result. In \cite{mor_ext} S. Morita gave a crossed homomorphism $k: \mathcal{M}_{g,1}\rightarrow \frac{1}{2}\Lambda^3 H$ that extends the first Johnson homomorphism $\tau_1:\mathcal{T}_{g,1}\rightarrow \Lambda^3 H.$ Using this crossed homomorphism, the intersection form $\omega$ and the contraction map $C$, in \cite{mor} S.~Morita defined a $2$-cocycle $\varsigma_g$ on $\mathcal{M}_{g,1}$ given by $$\varsigma_g(\phi, \psi)=\omega((C\circ k)(\phi),(C\circ k)(\psi^{-1})),$$ whose cohomology class is twelve times the generator of $H^2(\mathcal{M}_{g,1};\mathbb{Z})\simeq \mathbb{Z}$ (c.f. \cite{harer}) and therefore a generator of $H^2(\mathcal{M}_{g,1};\mathbb{Z}/p)$ since $p \geq 5$ is coprime with $2$ and $3.$ The restriction to $\mathcal{M}_{g,1}[p]$ of the crossed homomorphism $k$ modulo $p$ and $\tau_1^Z$ are both extensions of the first Johnson homomorphism modulo $p$ to $\mathcal{M}_{g,1}[p]$, therefore by Proposition \ref{prop_unicity-ext-johnson} these extensions coincide and hence the restriction of the $2$-cocycle $\varsigma_g$ on $\mathcal{M}_{g,1}[p]$ coincides with $-(\tau_1^Z)^*(Q_g)$. \end{proof} For future reference we single out: \begin{cor}\label{cor-extp-nontriv-cocy} For an integer $g\geq 3$ and $p \geq 5$ a prime number, the cohomology class of the 2-cocycle $(\tau_1^Z)^*(-48\;{}^t\!J_g)$ is not zero in $H^2(\mathcal{M}_{g,1}[p];\mathbb{Z}/p).$ \end{cor} \subsubsection{The 2-cocycles from $\mathfrak{sp}_{2g}(\mathbb{Z}/p)$.} We start by inspecting the pull-back of trivial $2$-cocycles on $\mathbb{Z}/p$ to $\mathfrak{sp}_{2g}(\mathbb{Z}/p)$ along $(tr\circ \pi_{gl}).$ Given a trivial $2$-cocycle on $\mathbb{Z}/p$, if we pull-back this 2-cocycle to $\mathfrak{sp}_{2g}(\mathbb{Z}/p)$ along $(tr\circ \pi_{gl})$ for each $g\geq 3$, by Proposition \ref{prop_cocy-sp} we get a family of 2-cocycles that satisfy conditions (1')-(3') with a $GL_g(\mathbb{Z})$-invariant trivialization, because $(tr\circ \pi_{gl})$ is $GL_g(\mathbb{Z})$-invariant. Pulling back further to $\mathcal{M}_{g,1}[p]$ gives a family of $2$-cocycle satisfying all properties of Theorem~\ref{teo_cocy_p} and hence gives us an invariant of rational homology $3$-spheres. Observe that the trivial $2$-cocycles on $\mathbb{Z}/p$ are exactly the coboundary of maps form $\mathbb{Z}/p$ to $\mathbb{Z}/p,$ which are formed by all polynomials of degree $p-1$ with coefficients in $\mathbb{Z}/p.$ And the map by which we lift these cocycles to $\mathcal{M}_{g,1}[p]$ is the invariant $\varphi$ given in Proposition~\ref{prop:stab_modp}. Therefore the aforementioned invariants of rational homology 3-spheres are given by all polynomials of degree $p-1$ with coefficients in $\mathbb{Z}/p$ and indeterminate the invariant $\varphi.$ We now inspect the other 2-cocycles that are candidates to produce invariants. Consider the generator of $H^2(\mathbb{Z}/p;\mathbb{Z}/p)\simeq\mathbb{Z}/p$ that corresponds to the identity by the natural isomorphism $\nu:Ext_{\mathbb{Z}}^1(\mathbb{Z}/p,\mathbb{Z}/p)\rightarrow Hom(\mathbb{Z}/p,\mathbb{Z}/p)$ (c.f. Section \ref{sec-saunders}). Explicitly, this generator is the class of the $2$-cocycle $d:\mathbb{Z}/p\times\mathbb{Z}/p\rightarrow \mathbb{Z}/p$ given by the carrying in $p$-adic numbers, \begin{equation} \label{2-cocy-d} d(x,y)=\left\lbrace\begin{array}{cc} 0, & \text{if} \quad x+y<p \\ 1, & \text{if} \quad x+y\geq p. \end{array}\right. \end{equation} We prove that: \begin{prop} \label{gen-sp-coc-GL} The group $H^2(\mathfrak{sp}_{2g}(\mathbb{Z}/p);\mathbb{Z}/p)^{GL_g(\mathbb{Z})}$ is generated by the cohomology classes of the $2$-cocycles ${}^t\!K_g$ and $(tr\circ \pi_{gl})^*d$. \end{prop} \begin{proof} Since $\mathfrak{sp}_{2g}(\mathbb{Z}/p)$ and $\mathbb{Z}/p$ are $p$-elementary abelian groups with $\mathfrak{sp}_{2g}(\mathbb{Z}/p)$ acting trivially on $\mathbb{Z}/p$, the UCT (c.f. Section \ref{sec-saunders}) gives an isomorphism: \begin{equation*} \theta\;\oplus \;\nu:\;H^2(\mathfrak{sp}_{2g}(\mathbb{Z}/p);\mathbb{Z}/p)^{GL_g(\mathbb{Z})}\longrightarrow \begin{array}{c} Hom(\Lambda^2 \mathfrak{sp}_{2g}(\mathbb{Z}/p),\mathbb{Z}/p)^{GL_g(\mathbb{Z})} \\ \oplus \\ Hom(\mathfrak{sp}_{2g}(\mathbb{Z}/p),\mathbb{Z}/p)^{GL_g(\mathbb{Z})}. \end{array} \end{equation*} We first compute the image of the class of the 2-cocycle $(tr\circ\pi_{gl})^*d$ by $\theta\oplus \nu.$ By construction $\nu(d)=id$, and by naturality of $\nu$ we get that $\nu((tr\circ\pi_{gl})^*d)=(tr\circ\pi_{gl})^*\nu(d)=(tr\circ\pi_{gl})^*id=tr\circ\pi_{gl}.$ On the other hand, since $(tr\circ\pi_{gl})^*d$ is a symmetric 2-cocycle and $\theta$ is given by the antisymmetrization of cocycles, the image of its class by $\theta$ is zero. Therefore, $$(\theta\oplus \nu)((tr\circ\pi_{gl})^*d)=(0,tr\circ\pi_{gl}).$$ We now compute the image of the class of the bilinear form ${}^t\!K_g$ by $\theta\oplus \nu.$ By definition, $\theta(\;{}^t\!K_g)=(\;{}^t\!K_g-K_g).$ On the other hand, in Section \ref{subsec-hom-tools} we proved that $\nu$ factors through the symmetrization of cocycles. Moreover, the class of any symmetric bilinear form $B$ with values in $\mathbb{Z}/p$ (with $p$ an odd prime) is zero, because there is a trivialization of $B$ given by $f(x)=\frac{1}{2}B(x,x)$. Then the image of any bilinear form by $\nu$ is zero too. Therefore, $$(\theta\oplus \nu)(\;{}^t\!K_g)=(\;{}^t\!K_g-K_g,0).$$ We conclude by Lemma \ref{lem:spZ/dcoinv} and Corollary~\ref{cor_sp_bil_anti}. \end{proof} Next we compute: \begin{prop} \label{ker_im_extp} The kernel and the image of the pull-back $$(\alpha\circ \Psi)^*:H^2(\mathfrak{sp}_{2g}(\mathbb{Z}/p);\mathbb{Z}/p)^{GL_g(\mathbb{Z})}\longrightarrow H^2(\mathcal{M}_{g,1}[p];\mathbb{Z}/p)^{GL_g(\mathbb{Z})}$$ are respectively generated by the cohomology class of ${}^t\!K_g-(tr\circ\pi_{gl})^*d$ and the image of the cohomology class of $(tr\circ\pi_{gl})^*d.$ \end{prop} \begin{proof} By Proposition \ref{prop_inj_MGC} the map $\Psi^*: H^2(Sp_{2g}(\mathbb{Z},p);\mathbb{Z}/p)\rightarrow H^2(\mathcal{M}_{g,1}[p];\mathbb{Z}/p)$ is injective. Then it is enough to compute the kernel and the image of the map \[ \alpha^*: H^2(\mathfrak{sp}_{2g}(\mathbb{Z}/p);\mathbb{Z}/p)^{GL_g(\mathbb{Z})}\rightarrow H^2(Sp_{2g}(\mathbb{Z},p);\mathbb{Z}/p)^{GL_g(\mathbb{Z})}. \] From Proposition \ref{gen-sp-coc-GL} we know that the $\mathbb{Z}/p$-vector space $H^2(\mathfrak{sp}_{2g}(\mathbb{Z}/p);\mathbb{Z}/p)^{GL_g(\mathbb{Z})}$ is $2$-dimensional. We show first that the image of the class of the $2$-cocycle $(tr\circ\pi_{gl})^*d$ by $\alpha^*$ is not zero and second that the class of the $2$-cocycle ${}^t\!K_g-(tr\circ\pi_{gl})^*d$ belongs to the kernel of $\alpha^*$. By naturality of the UCT, there is a commutative diagram with exact rows: $$ \xymatrix@C=5mm@R=7mm{ Ext^1_\mathbb{Z}(H_1(Sp_{2g}(\mathbb{Z},p);\mathbb{Z});\mathbb{Z}/p) \ar@{^{(}->}[r] & H^2(Sp_{2g}(\mathbb{Z},p); \mathbb{Z}/p) \ar@{->>}[r] & Hom(H_2(Sp_{2g}(\mathbb{Z},p);\mathbb{Z});\mathbb{Z}/p) \\ Ext^1_\mathbb{Z}(\mathfrak{sp}_{2g}(\mathbb{Z}/p);\mathbb{Z}/p) \ar@{=}[u] \ar@{^{(}->}[r] & H^2(\mathfrak{sp}_{2g}(\mathbb{Z}/p); \mathbb{Z}/p) \ar@{->}[u]_{\alpha^* } \ar@{->>}[r] & \ar@{->}[u]_{\alpha^* } Hom(\wedge^2\mathfrak{sp}_{2g}(\mathbb{Z}/p);\mathbb{Z}/p) .} $$ Since the class of the abelian $2$-cocycle $(tr\circ\pi_{gl})^*d$ belongs to $Ext^1_\mathbb{Z}(\mathfrak{sp}_{2g}(\mathbb{Z}/p);\mathbb{Z}/p),$ by commutativity of this diagram the pull-back of this $2$-cocycle to $Sp_{2g}(\mathbb{Z},p)$ is not trivial. We now show that the cohomology class of ${}^t\!K_g-(tr\circ\pi_{gl})^*d$ belongs to the kernel of $\alpha^*$ by constructing a $2$-cocycle on $\mathfrak{sp}_{2g}(\mathbb{Z}/p)$ whose lift to $Sp_{2g}(\mathbb{Z},p)$ is trivial and subsequently identifying its cohomology class with the class of ${}^t\!K_g-(tr\circ\pi_{gl})^*d$. Consider the group extension given in \cite[Lemma 3.10]{Putman}, \[ \xymatrix@C=5mm@R=5mm{0 \ar@{->}[r] & \mathfrak{sp}_{2g}(\mathbb{Z}/p) \ar@{->}[r] & Sp_{2g}(\mathbb{Z}/p^3) \ar@{->}[r] & Sp_{2g}(\mathbb{Z}/p^2) \ar@{->}[r] & 1}. \] If we restrict this extension to the group $ \mathfrak{sp}_{2g}(\mathbb{Z}/p) = \ker \big(Sp_{2g}(\mathbb{Z}/p^2) \rightarrow Sp_{2g}(\mathbb{Z}/p)\big),$ we get another extension \begin{equation} \label{ses-sp-sp} \xymatrix@C=7mm@R=7mm{0 \ar@{->}[r] & \mathfrak{sp}_{2g}(\mathbb{Z}/p) \ar@{->}[r]^-{i} & Sp_{2g}(\mathbb{Z}/p^3,p) \ar@{->}[r]^-{\alpha_{3|2}} & \mathfrak{sp}_{2g}(\mathbb{Z}/p) \ar@{->}[r] & 0.} \end{equation} Let $c$ be a $2$-cocycle associated to this extension. By construction its cohomology class is $Sp_{2g}(\mathbb{Z}/p)$-invariant (c.f. \cite[Sec. III.10]{brown}). Then the push-out $c$ by the $GL_g(\mathbb{Z})$-invariant homomorphism $(tr\circ \pi_{gl}):\mathfrak{sp}_{2g}(\mathbb{Z}/p)\rightarrow \mathbb{Z}/p$ gives a $2$-cocycle $(tr\circ \pi_{gl})_*(c)$, whose cohomology class belongs to $H^2(\mathfrak{sp}_{2g}(\mathbb{Z}/p);\mathbb{Z}/p)^{GL_g(\mathbb{Z})}.$ In fact, this cohomology class belongs to the kernel of $\alpha^*$: denote $\Psi_{p^3}$ the symplectic representation modulo $p^3.$ Since $\alpha=\alpha_{3|2} \circ \Psi_{p^3} $, it is enough to show that the class of the $2$-cocycle $(tr\circ \pi_{gl})_*(c)$ belongs to the kernel of $\alpha_{3|2}^*.$ By construction, the $2$-cocycle $\alpha_{3|2}^*(c)$ is trivial and the pull-back $\alpha_{3|2}^*$ commutes with the push-out $(tr\circ \pi_{gl})_*$. Therefore $\alpha_{3|2}^*(tr\circ \pi_{gl})_*(c)=(tr\circ \pi_{gl})_*(\alpha_{3|2}^*(c))=0.$ Next we show that $-(tr\circ \pi_{gl})_*(c)$ is cohomologous to ${}^t\!K_g-(tr\circ\pi_{gl})^*d,$ identifying the images of their classes by the isomorphism (c.f. Section~\ref{subsec-hom-tools}), \begin{equation*} \theta\;\oplus \;\nu:\;H^2(\mathfrak{sp}_{2g}(\mathbb{Z}/p);\mathbb{Z}/p)^{GL_g(\mathbb{Z})}\longrightarrow \begin{array}{c} Hom(\Lambda^2 \mathfrak{sp}_{2g}(\mathbb{Z}/p),\mathbb{Z}/p)^{GL_g(\mathbb{Z})} \\ \oplus \\ Hom(\mathfrak{sp}_{2g}(\mathbb{Z}/p),\mathbb{Z}/p)^{GL_g(\mathbb{Z})}. \end{array} \end{equation*} By the proof of Proposition \ref{gen-sp-coc-GL}, $$(\theta\oplus \nu)(\;{}^t\!K_g-(tr\circ\pi_{gl})^*d)=(\;{}^t\!K_g-K_g,-tr\circ\pi_{gl}).$$ We now compute the image of $(tr\circ \pi_{gl})_*(c)$ by $\theta\oplus \nu.$ By naturality of $\theta$, a direct computation shows that $\theta((tr\circ \pi_{gl})_* c)=(tr\circ \pi_{gl})_*\theta(c)=(tr\circ \pi_{gl})_*[\; \cdot \; ,\; \cdot \;],$ where $[\; \cdot \; ,\; \cdot \;]$ stands for the bracket of the Lie algebra $\mathfrak{sp}_{2g}(\mathbb{Z}/p)$. By Corollary \ref{cor_sp_bil_anti}, $n\theta(\;{}^t\!K_g)=(tr\circ \pi_{gl})_*\theta(c)$ for some $n\in \mathbb{Z}/p$. Evaluating these homomorphism on $l_{11}\wedge u_{11}$, we get that \[ \theta((tr\circ \pi_{gl})_*c)(l_{11}\wedge u_{11})= (tr\circ \pi_{gl})\left[\left(\begin{smallmatrix} 0 & 0 \\ e_{11} & 0 \end{smallmatrix}\right),\left(\begin{smallmatrix} 0 & e_{11} \\ 0 & 0 \end{smallmatrix}\right)\right] = (tr\circ \pi_{gl})\left(\begin{smallmatrix} -e_{11} & 0 \\ 0 & e_{11} \end{smallmatrix}\right)=-1, \] and $ (\;{}^t\!K_g-K_g)(l_{11}\wedge u_{11})=1. $ Therefore $n=-1$ and $$\theta((tr\circ \pi_{gl})_*c)=-(\;{}^t\!K_g-K_g).$$ On the other hand, if we compute the image of $c$ by the natural homomorphism $$\nu:H^2(\mathfrak{sp}_{2g}(\mathbb{Z}/p);\mathfrak{sp}_{2g}(\mathbb{Z}/p))\longrightarrow Hom(\mathfrak{sp}_{2g}(\mathbb{Z}/p),\mathfrak{sp}_{2g}(\mathbb{Z}/p)),$$ given $Id+p\widetilde{x}\in Sp_{2g}(\mathbb{Z}/p^3,p)$ a preimage of $x\in \mathfrak{sp}_{2g}(\mathbb{Z}/p)$ by $\alpha_{3|2},$ we get that $ \nu(c)(x)=i^{-1}((Id+p\widetilde{x})^p) =i^{-1}(Id+p^2\widetilde{x})=x.$ Then $\nu(c)=id$ and by naturality of $\nu,$ $$\nu((tr\circ \pi_{gl})_*c)=(tr\circ \pi_{gl})_*\nu(c)=(tr\circ \pi_{gl})_*id=tr\circ \pi_{gl}.$$ \end{proof} We now focus on the torsor of the trivial $2$-cocycle $(\alpha\circ \Psi)^*(\;{}^t\!K_g-(tr\circ \pi_{gl})^*d):$ \begin{prop} The torsor of the $2$-cocycle $(\alpha\circ \Psi)^*(\;{}^t\!K_g-(tr\circ \pi_{gl})^*d)$ is trivial. \end{prop} \begin{proof} To make the notation lighter, let $C_g$ be the $2$-cocycle $(\alpha\circ \Psi)^*(\;{}^t\!K_g-(tr\circ \pi_{gl})^*d).$ By construction the torsor class $\rho(C_g):H_1(\mathcal{AB}_{g,1}[p];\mathbb{Z})\otimes (\mathfrak{sp}_{2g}(\mathbb{Z}/p)\oplus \Lambda^3 H_p)\rightarrow \mathbb{Z}/p$ (cf. Proposition \ref{prop:torsorforprimep}) can be described as follows. Fix an arbitrary trivialization $q_g$ of $C_g$. For each tensor $f\otimes l\in \mathcal{AB}_{g,1}[p]\otimes (\mathfrak{sp}_{2g}(\mathbb{Z}/p)\oplus \Lambda^3 H_p)$, choose arbitrary lifts $\phi\in \mathcal{AB}_{g,1}[p]$ and $\lambda\in \mathcal{M}_{g,1}[p].$ Since $C_g$ is the coboundary of $q_g$, we get that \begin{align*} \rho(C_g)(f\otimes l)= & q_g(\phi \lambda\phi^{-1})-q_g(\lambda)=q_g(\phi \lambda\phi^{-1}\lambda^{-1})-C_g(\phi \lambda\phi^{-1}\lambda^{-1},\lambda)= \\ = & q_g(\phi \lambda\phi^{-1}\lambda^{-1})= q_g(\phi \lambda)-q_g(\lambda\phi) +C_g(\phi \lambda\phi^{-1}\lambda^{-1},\lambda\phi)=\\ = & q_g(\phi \lambda)-q_g(\lambda\phi) = -C_g(\phi,\lambda)+C_g(\lambda,\phi)=0, \end{align*} where the last equality follows as $C_g$ satisfies condition (3). \end{proof} Therefore, as we wanted, the $2$-cocycle $(\alpha\circ \Psi)^*(\;{}^t\!K_g-(tr\circ \pi_{gl})^*d)$ satisfies all hypothesis of Theorem \ref{teo_cocy_p} and hence induces an invariant of rational homology $3$-spheres, which we now explicitly describe. Let us first introduce a particular map that will be crucial describing our invariant. Given $a\in \mathbb{Z}/p^2,$ there exist unique $a_0,a_1\in\lbrace 0,\ldots p-1\rbrace$ such that the class of $a$ coincides with the class of $a_0+pa_1,$ because $\lbrace 1,\ldots p^2-1 \rbrace$ is a fundamental domain of $\mathbb{Z}/p^2.$ Then we define $r^p:\mathbb{Z}/p^2\rightarrow\mathbb{Z}/p$ the map that sends $a$ to $a_1$. Notice that this map is not a homomorphism. Nevertheless, given $x,y\in \mathbb{Z}/p^2$ written as $x=x_0+px_1$ and $y=y_0+py_1$ with $x_0,x_1,y_0,y_1\in \lbrace 0,\ldots p-1\rbrace,$ we have that \begin{align*} r^p(x+py)= & r^p(x_0+px_1+py_0+p^2y_1) =r^p(x_0+p(x_1+y_0))\\ = & x_1+y_0=r^p(x)+y \quad (\text{mod } p). \end{align*} Therefore, $r^p(x+py)=r^p(x)+y \quad (\text{mod } p).$ Now we came back to the description of our invariant. Given $X\in Sp_{2g}(\mathbb{Z}/p^3,p),$ written in blocks $X=\left(\begin{smallmatrix} A & B \\ C & D \end{smallmatrix}\right),$ we define a function $\overline{\mathfrak{R}}_g :Sp_{2g}(\mathbb{Z}/p^3,p) \longrightarrow \mathbb{Z}/p$ as follows: $$\overline{\mathfrak{R}}_g(X)= r^p\circ tr\left(\dfrac{D-Id}{p}\right)-\dfrac{1}{2}tr\left((\pi_{gl}\circ \alpha_{3|2}(X))^2\right).$$ Let $\mathfrak{R}_g$ denote the pull-back of $\overline{\mathfrak{R}}_g$ along the mod $p^3$ symplectic representation. The following proposition together with Theorem \ref{teo_cocy_p} show that the family of functions $(\mathfrak{R}_g)_{g\geq 3}$ reassembles into an invariant $\mathfrak{R}$ of rational homology spheres with the desired associated family of 2-cocycles. \begin{prop} \label{prop-new-inv} The function $\mathfrak{R}_g$ is $\mathcal{AB}_{g,1}$-invariant and its coboundary is the $2$-cocycle $\Psi_{p^2}^*(\;{}^t\!K_g-(tr\circ \pi_{gl})^*d).$ \end{prop} \begin{proof} Since all maps involved in $\overline{\mathfrak{R}}_g$ are $GL_{g}(\mathbb{Z})$-equivariant and $\Psi_{p^3}$ is $\mathcal{AB}_{g,1}$-equivariant, by construction the function $\mathfrak{R}_g$ is $\mathcal{AB}_{g,1}$-invariant. Observe that $\Psi_{p^2}$ can be decomposed as $\Psi_{p^2}=\alpha_{3|2}\circ\Psi_{p^3}.$ Therefore to prove the statement it is enough to show that the coboundary of $ \overline{\mathfrak{R}}_g$ is $\alpha_{3|2}^*(\;{}^t\!K_g-(tr\circ \pi_{gl})^*d).$ Let $X=\left(\begin{smallmatrix} A & B \\ C & D \end{smallmatrix}\right)$, $Y=\left(\begin{smallmatrix} E & F \\ G & H \end{smallmatrix}\right)$ be elements of $Sp_{2g}(\mathbb{Z}/p^3,p)$. Then \begin{align*} D=Id_g+pD_1, & \qquad C=pC_1, \\ H=Id_g+pH_1, & \qquad F=pF_1, \end{align*} with $D_1,H_1,C_1,F_1$ matrices with coefficients in $\mathbb{Z}/p^2$. Denote $\overline{D}_1, \overline{H}_1, \overline{C}_1, \overline{F}_1$ the reduction modulo $p$ of these matrices. The product $XY=\left(\begin{smallmatrix} A & B \\ C & D \end{smallmatrix}\right)\left(\begin{smallmatrix} E & F \\ G & H \end{smallmatrix}\right)$ is given by $\left(\begin{smallmatrix} * & * \\ * & CF+DH \end{smallmatrix}\right)$ with \begin{align*} CF+DH= & Id_g+p(D_1+H_1)+p^2(C_1F_1+D_1H_1) \\ \equiv & Id_g+p(D_1+H_1)+p^2(\overline{C}_1\overline{F}_1+\overline{D}_1\overline{H}_1) \; (mod \;p^3) \end{align*} Then we check that $$\overline{\mathfrak{R}}_g(X)+\overline{\mathfrak{R}}_g(Y)-\overline{\mathfrak{R}}_g(XY)=$$ \begin{align*} = & r^p\left(tr(D_1)\right)-\dfrac{1}{2}tr(\overline{D}_1^2)+r^p\left( tr(H_1)\right)-\dfrac{1}{2}tr(\overline{H}_1^2)+ \\ & -r^p\left(tr(D_1)+tr(H_1)+p\;tr(\overline{C}_1\overline{F}_1)+p\;tr(\overline{D}_1\overline{H}_1)\right)+\dfrac{1}{2}tr((\overline{D}_1+\overline{H}_1)^2)= \\ = & r^p( tr(D_1)) +r^p( tr(H_1))-r^p(tr(D_1)+tr(H_1))-tr(\overline{C}_1\overline{F}_1))=\\ = & d(tr(D_1),tr(H_1))-tr(\overline{C}_1\overline{F}_1) =(tr\circ \pi_{gl}\circ \alpha_{3|2})^*d(X,Y)-\alpha_{3|2}^*\;{}^t\!K_g(X,Y). \end{align*} \end{proof} \subsubsection{Mixing 2-cocycles from the abelianization of $\mathcal{M}_{g,1}[p]$.} Finally, we show that there does not exist a pair of families of $2$-cocycles from $\Lambda^3 H_p$ and $\mathfrak{sp}_{2g}(\mathbb{Z}/p)$ respectively, satisfying conditions (1')-(3'), such that their lift to $\mathcal{M}_{g,1}[p]$ is not trivial but the lift of their sum is. By Proposition \ref{prop-extp-unique-coc} and Corollary \ref{cor-extp-nontriv-cocy} it is enough to show that there does not exist a $2$-cocycle $C_g$ on $\mathfrak{sp}_{2g}(\mathbb{Z}/p)$ such that $(\alpha\circ \Psi)^*C_g$ is cohomologous to $(\tau_1^Z)^*(\;{}^t\!J_g).$ Assume that such a $2$-cocycle exists. By Proposition \ref{prop_inj_MGC} there is a commutative diagram $$ \xymatrix@C=5mm@R=12mm{ & H^2(\mathcal{M}_{g,1};\mathbb{Z}/p) \ar@{^{(}->}[d] \ar@{<-}[r]^{\Psi^*}_{\sim} & H^2(Sp_{2g}(\mathbb{Z});\mathbb{Z}/p) \ar@{^{(}->}[d] \ar@{^{(}->}[dr] & \\ & H^2(\mathcal{M}_{g,1}[p];\mathbb{Z}/p) \ar@{<-^{)}}[r]^{\Psi^*} & H^2(Sp_{2g}(\mathbb{Z},p);\mathbb{Z}/p) \ar@{->}[r] & H^2(Sp_{2g}(\mathbb{Z},p^2);\mathbb{Z}/p) \\ H^2(\Lambda^3 H_p;\mathbb{Z}/p) \ar@{->}[ur]^-{(\tau_1^Z)^*} \ar@{->}[r] & H^2(H_1(\mathcal{M}_{g,1}[p];\mathbb{Z});\mathbb{Z}/p)\ar@{->}[u] \ar@{<-}[r] & H^2(\mathfrak{sp}_{2g}(\mathbb{Z}/p);\mathbb{Z}/p) \ar@{->}[u]_-{\alpha^*} \ar@{->}[ul]_-{(\alpha\circ\Psi)^*} \ar@{->}[ur]_-{0} &. } $$ As we have seen in Section \ref{sec-2coc-estp}, the $2$-cocycle $(\tau_1^Z)^*(\;{}^t\!J_g)$ is cohomologous to the restriction of a generator of $ H^2(\mathcal{M}_{g,1},\mathbb{Z}/p)\simeq \mathbb{Z}/p$ to $\mathcal{M}_{g,1}[p]$. Then by the upper commutative square there exists a $2$-cocycle $\mu$ on $Sp_{2g}(\mathbb{Z},p)$ such that $\Psi^*(\mu)$ is cohomologous to $(\tau_1^Z)^*(\;{}^t\!J_g),$ and since $\Psi^*$ is injective, $\mu$ is cohomologous to $\alpha^*(C_g).$ But, by commutativity of the right upper triangle, $\mu$ restricted to $Sp_{2g}(\mathbb{Z},p^2)$ is not cohomologous to zero, whereas by commutativity of the right lower triangle, the $2$-cocycle $\alpha^*(C_g)$ vanishes on $Sp_{2g}(\mathbb{Z},p^2)$. Hence we get a contradiction. To sum up, we have the following result: \begin{teo} \label{teo-main} Given a prime number $p\geq 5,$ the invariants of $\mathbb{Z}/p$-homology $3$-spheres induced by families of $2$-cocycles on the abelianization of the mod-$p$ Torelli group are generated by the invariant $\mathfrak{R}$ and the powers of the invariant $\varphi.$ \end{teo} The study of these invariants will be the object of a forthcoming work. \subsection{The Perron conjecture} In \cite{per} B. Perron conjectured an extension of the Casson invariant $\lambda$ on the mod-$p$ Torelli group with values on $\mathbb{Z}/p.$ This extension consists in writing an element of the mod-$p$ Torelli group $\mathcal{M}_{g,1}[p]$ as a product of an element of the Torelli group $\mathcal{T}_{g,1}$ and an element of the subgroup $D_{g,1}[p]$, which is the group generated by $p$-powers of Dehn twists, and take the Casson invariant modulo $p$ of the element of the Torelli group. More precisely, B. Perron conjectured that \begin{conj} \label{conj2} Given $g\geq 3,$ $p\geq 5$ be a prime number and $S^3_\varphi \in \mathcal{S}^3[p]$ with $\varphi=f\cdot m,$ where $f\in \mathcal{T}_{g,1},$ $m\in D_{g,1}[p].$ Then the map $\gamma_p:\mathcal{M}_{g,1}[p] \rightarrow \mathbb{Z}/p$ given by $$\gamma_p(\varphi)=\lambda(S^3_f) \; (\text{mod }p)$$ is a well defined invariant on $\mathcal{S}^3[p].$ \end{conj} Assuming the conjecture is true we identify the associated $2$-cocycle: \begin{prop} \label{prop_obst_perron} If Conjecture \ref{conj2} is true, then the associated trivial $2$-cocycle to the function $\gamma_p$ is $(\tau_1^Z)^*(-2\;{}^t\!J_g).$ \end{prop} \begin{proof} Consider $\varphi_1,\varphi_2\in \mathcal{M}_{g,1}[p]$ with $\varphi_1=f_1\cdot m_1,$ and $\varphi_2=f_2\cdot m_2$ where $f_i\in \mathcal{T}_{g,1}$ and $m_i\in D_{g,1}[p]$ for $i=1,2.$ By \cite[Thm. 3]{pitsch}, on integral values, the trivial $2$-cocycle associated to the Casson invariant $\lambda$ is $\tau_1^*(-2\;{}^t\!J_g)$, where $\tau_1:\mathcal{T}_{g,1}\rightarrow \Lambda^3 H$ is the first Johnson homomorphism. Then the following equalities hold in $\mathbb{Z}/p:$ \begin{align*} \gamma_p(\varphi_1)+\gamma_p(\varphi_2)-\gamma_p(\varphi_1\varphi_2)= & \gamma_p(f_1m_1)+\gamma_p(f_2m_2)-\gamma_p(f_1m_1f_2m_2)= \\ = & \gamma_p(f_1)+\gamma_p(f_2)-\gamma_p(f_1f_2(f_2^{-1}m_1f_2)m_2)= \\ = & \gamma_p(f_1)+\gamma_p(f_2)-\gamma_p(f_1f_2)= \lambda (f_1)+\lambda(f_2)- \lambda(f_1f_2)=\\ = & -2\;{}^t\!J_g(\tau_1(f_1),\tau_1(f_2))=-2\;{}^t\!J_g(\tau_1^Z(f_1m_1),\tau_1^Z(f_2m_2))=\\ = & (\tau_1^Z)^*(-2\;{}^t\!J_g)(\varphi_1,\varphi_2), \end{align*} where the penultimate equality follows from the proof of \cite[Thm. 5.11]{coop}. \end{proof} But by Corollary~\ref{cor-extp-nontriv-cocy} the $2$-cocycle $(\tau_1^Z)^*(-2\;{}^t\!J_g)$ is not trivial. Therefore we get: \begin{cor} The extension of the Casson invariant modulo $p$ to the mod-$p$ Torelli group proposed by B. Perron is not a well defined invariant of rational homology spheres. \end{cor} \newpage
\section{Introduction} Condensed matter systems~\cite{add1,add2} contain both fermionic and bosonic quasiparticles. The existence of the former in electronic structures~\cite{add3,add4,add5,add6,add7,add8,add8a} has been widely predicted and verified; by contrast, the existence of topological bosonic excitations~\cite{add9,add10,add11,add12,add13} has been rarely reported. According to the dimension of the degeneracy manifold, topological semimetals can be classified into nodal-point~\cite{add14,add15,add16,add17,add18,add19,add20}, nodal-line~\cite{add21,add22,add23,add24,add25}, and nodal-surface semimetals~\cite{add26,add27,add28}. Both nodal-line and nodal-surface semimetals exhibit many intriguing phenomena~\cite{add28,add30,add31,add32}. For example, it has been predicted that the nodal lines have drumhead-like surface states that cover a finite region in the surface Brillouin zone (BZ) or torus surface states spanning over the entire BZ. Although the nodal surface cannot have an intrinsic Chern number, it can have an induced one~\cite{add33}, which can be any integer value, depending on the chiral particles in the BZ. To determine the properties of nodal lines or nodal surfaces, the line or surface should preferably have a relatively flat energy dispersion. In addition, in electronic systems, the line or surface should be close to the Fermi level. Therefore, ideal nodal semimetals (in particular, ideal nodal-surface semimetals) are still missing in electronic systems. Phonons, which are the basic emergent kind of bosons in crystalline lattices, can also display nontrivial degeneracy in their spectra. Because the Pauli exclusion principle does not apply to phonons, it provides a feasible basis for investigating bosonic excitations in a wide frequency range without the rigorous constraint of the fermion level. Researchers are currently searching for ideal topological phases in phonon systems~\cite{add9,add13,add34,add35,add36,add37,add38,add39,add40,add41,add42,add43,add44,add45}. In particular, the existence of Weyl, Dirac, triple point, nodal line phonons in the phonon spectra of several materials has been predicted, and the existence in some of them has been experimentally confirmed~\cite{add38,add45}. However, the existence of nodal-surface phonons has not been reported. \emph{A natural question is whether ideal nodal-surface phonons can exist in realistic materials.} In this paper, we answer this question affirmatively. \emph{For the first time}, based on first-principle calculations and symmetry analysis, we predict the existence of nodal-surface phonons in ternary nitridotungstate Li$_6$WN$_4$, which has been experimentally synthesized~\cite{add46} via the solid state reaction of lithium subnitride (Li$_3$N) with W in a nitrogen atmosphere. The Li$_6$WN$_4$ material has two nodal surfaces in the $k_x$= $\pi$ and $k_y$= $\pi$ planes, respectively, the existence of which is guaranteed by nonsymmorphic screw-rotational symmetry and time-reversal symmetry. Remarkably, the two nodal surfaces are ideal in that (i) the two bands forming the nodal surfaces are well separated from other bands and in that (ii) the nodal surface is approximately flat in energy, with energy variations of less than 0.25 THz (approximately 1.00 meV). These characteristics have not been observed for other proposed nodal surface materials. Moreover, the two bands that form the nodal surfaces become degenerate in the Z-A path of the $k_z$= $\pi$ planes, thereby leading to two symmetry-enforced nodal lines. Eventually, the two nodal surfaces and two nodal lines in Li$_6$WN$_4$ result in exotic nodal-lantern phonon excitations, as illustrated in Fig. \ref{fig2}(c) and Fig. \ref{figs1}. Hence, this work presents novel topological phases of phonon systems, predicts ideal material candidate, and paves the way for investigating nodal-lantern phonons in experiments. The density-functional theory~\cite{add47} was used to calculate the ground state of this material, and the GGA-PBE formalism~\cite{add48} was used for the exchange-correlation functional. In addition, the projector augmented-wave method was used for the interactions between ions and valence electrons, and the energy cutoff was set to 600 eV. A $\Gamma$-centered $k$-mesh of 5$\times$5$\times$6 size was used to sample the BZ. Moreover, lattice dynamic calculations were performed to obtain the phonon dispersion of Li$_6$WN$_4$ at equilibrium lattice constants in the PHONOPY package~\cite{add49} with density-functional perturbation theory. The topological characteristics of the [001] phonon surface states were calculated by constructing a Wannier tight-binding Hamiltonian for phonons~\cite{add50}. \begin{figure} \includegraphics[width=8.8cm]{Figure1} \caption{Crystal structure of Li$_6$WN$_4$ material with P42/nmc type structure under different viewsides. (b) Bulk BZ and high-symmetry points. \label{fig1}} \end{figure} As shown in Fig.~\ref{fig1}a, Li$_6$WN$_4$ is a tetragonal material with space group (SG) No. 137 (P42/nmc). The atomic positions are as follows: W is located at the 2a (0.25, 0.75, 0.25), N at the 8g (0.25, 0.995, 0.05), Li (1) at the 4d (0.25, 0.25, 0.338), and Li (2) at the 8f (0.537, 0.463, 0.25) Wyckoff positions. The crystal structure of Li$_6$WN$_4$ is completely relaxed according to the first-principle calculations; the computed lattice constants a = b = 6.71 {\r{A}} and c = 4.94 {\r{A}} agree well with the experimental results (a = b = 6.675 {\r{A}} and c = 4.928 {\r{A}}). The symmetry operators of Li$_6$WN$_4$ are generated via fourfold screw rotation $S_{4z}$=$\{$${C_{4z}|00\frac{1}{2}}$$\}$, twofold screw rotation $S_{2x}$ =$\{$${C_{2x}|\frac{1}{2}\frac{1}{2}0}$$\}$, spatial inversion $\{$${I|\frac{1}{2}\frac{1}{2}0}$$\}$, and time-reversal symmetry ${\cal{T}}$. Hence, Li$_6$WN$_4$ has three mirror symmetries: $M_x$, $M_y$, and $M_z$. Because we are interested in the phonon spectrum of Li$_6$WN$_4$, the spin-orbit coupling effect is neglected, indicating that the 2$\pi$ rotation equals 1 and ${\cal{T}}^2=1$. In this work, the topological signature of the phonon dispersion of Li$_6$WN$_4$ was studied. The calculated phonon band along the high-symmetry paths (see Fig.~\ref{fig1}b) is shown in Fig.~\ref{fig2}a. The absence of imaginary frequency modes in the phonon dispersion indicates that Li$_6$WN$_4$ is dynamically stable. We focused on the two phonon bands appearing in the 22.5-24.5 THz range; they are well separated from other energy bands. Evidently, the two phonon bands become twofold degenerate along the X-M-A-R-X and Z-A paths. For clarity, we divided the doubly degenerate phonon bands in the 22.5-24.5 THz range into the two regions R2 and R3, as shown in Fig.~\ref{fig2}b. The degeneracies in the R2 and R3 regions are discussed separately. First, the double degeneracies along the X-M-A-R-X path were studied (R2 in Fig.~\ref{fig2}b). All these high-symmetry paths lie in the BZ boundary, e.g., in the $k_x$= $\pi$ plane (see Fig.~\ref{fig2}c). In Fig.~\ref{fig3}a and b, we divided the A-X paths into 5 parts and selected some other symmetry points along the A-X path: b1, b2, b3, and b4. The phonon dispersion along the a1-b1-a1$^{'}$, a2-b2-a2$^{'}$, a3-b3-a3$^{'}$, and a4-b4-a4$^{'}$ paths are shown in Fig.~\ref{fig3}c and Fig. S2, respectively. Evidently, two non-degenerated phonon bands linearly cross at b1, b2, b3, and b4. In fact, the two phonon bands become degenerate in the entire $k_x$= $\pi$ plane (see the schematic diagram in Fig.~\ref{fig3}a), which leads to the creation of a nodal surface. The nodal surface is guaranteed by nonsymmorphic $S_{2x}$ symmetry and ${\cal{T}}$ symmetry because any generic point in the $k_x$= $\pi$ plane is invariant under ${\cal{T}}S_{2x}$ symmetry and ${({\cal{T}}S_{2x})}^2=-1$ in the $k_x$=$\pi$ plane. Owing to the fourfold screw rotation $S_{4z}$, there must exist another nodal surface in the $k_y$=$\pi$ plane. It should be noted that while the z-direction represents a screw rotation axis, there is no nodal surface in the $k_z$=$\pi$ plane, which can be directly inferred from the phonon dispersion along the R-Z path. This is because $S_{4z}^2$ is equivalent to a symmorphic operator and ${({\cal{T}}S_{4z}^2)}^2=1$ in the $k_z$=$\pi$ plane. However, although the existence of two nodal surfaces in the $k_x$=$\pi$ and $k_y$=$\pi$ planes is guaranteed owing to the symmetry characteristics, the energy dispersion of the surface is not constrained by these symmetries. \begin{figure} \includegraphics[width=8.0cm]{Figure2} \caption{ (a) Phonon dispersion of Li$_6$WN$_4$ along $\Gamma$-X-M-A-R-X-$\Gamma$-Z-A-R-Z paths; (b) enlarged frequencies of Li$_6$WN$_4$ with nodal surface phonons (see R2) and Weyl nodal line (WNL)-phonons (See R3);(c) Schematic diagram of nodal phonon states of R2 and R3 in 3D BZ. \label{fig2}} \end{figure} To the best of our knowledge, the existence of an ideal topological nodal-surface semimetal with a flat nodal surface state has not been reported~\cite{add26}. Fortunately, the nodal-surface phonons in Li$_6$WN$_4$ are very flat in energy with energy variations of less than 0.25 THz (approximately 1.00 meV). More importantly, the phonon band structure is ``clean" in the sense that the bands forming the surface are well separated from the other bands. Another feature of the nodal-surface phonon is that it exhibits linear dispersion along the direction normal to the surface; in addition, the linear energy range is considerable large for most points on the surface, as indicated in Fig.~\ref{fig2}b. To present these characteristics more clearly, the calculated energy dispersion for points on the surface along the transverse direction is presented in Fig.~\ref{fig3}c and Fig. \ref{figs2}c, showing the linear energy range for the path away from the surface is considerable large. \begin{figure} \includegraphics[width=8.0cm]{Figure3} \caption{ (a) Schematic diagram of nodal surface states in $k_x$=$\pi$ and $k_y$=$\pi$ planes; (b) some symmetry points of [011] plane; a1, a2, a3, and a4 and b1, b2, b3, and b4 are located at equal distances between R$^{'}$(A) and $\Gamma$(X); (c) phonon dispersion along a4-b4-a4$^{'}$ paths; (d) shape of one pair of Z-centered WNLs in $k_z$=$\pi$ plane. \label{fig3}} \end{figure} In the next step, the degeneracies along the Z-A path are discussed (see R3 in Fig.~\ref{fig2}b). This is an essential nodal line protected by $M_z$ symmetry and twofold rotation along the (110) direction. The low-energy effective Hamiltonian expanding around a generic point on the Z-A path can be written as follows~\cite{add51}: \begin{equation}\label{FNRm} \mathcal{H}=c_1+c_2 \sigma_3 (k_x-k_y)+c_3 \sigma_1 k_z, \end{equation} where $\sigma_i$ (i = 1, 2, 3) is the Pauli matrix, and the model parameter $c_i$ depends on the material and $k_{x(y)}$; the momentum is measured from the generic point on the Z-A path. To examine the nontrivial topological behavior of this nodal line, we calculate the Berry phase for a closed loop surrounding the line, expressed as: \begin{equation}\label{FNRm} P_{B}=\oint_{c} \textbf{\emph{A}}(\textbf{\emph{k}}) \cdot d \textbf{\emph{k}} \end{equation} with $\textbf{\emph{A}}(\textbf{\emph{k}})=-i\left\langle\varphi(\textbf{\emph{k}})\left|\nabla_{\textbf{\emph{k}}}\right| \varphi(\textbf{\emph{k}})\right\rangle$ the Berry connection and $\varphi(\textbf{\emph{k}})$ the periodic part of the Bloch function. According to our results, we obtain $P_{B}=\pi$. Then one knows that the nodal line along the Z-A path is topologically nontrivial, and should result in interesting surface states. As previously mentioned, owing to the $S_{4z}$ symmetry, there are two nodal lines along the diagonal and clinodiagonal directions, respectively (see Fig.~\ref{fig2}c). The shape of the nodal lines in the $k_z$=$\pi$ plane is shown in Fig.~\ref{fig3}d, where one pair of nodal lines can be clearly observed (see the white lines). According to Fig.~\ref{fig2}b, the nodal-line phonon is relatively flat in energy, and its energy variation is less than 0.3 THz (approximately 1.24 meV). Remarkably, the ideal nodal-surface phonon and ideal nodal-line phonon constitute a hitherto unobserved type of bosonic excitation, namely, a nodal-lantern phonon, as illustrated in Fig. \ref{fig2}(c) and Fig. \ref{figs1}. Furthermore, as the existence of the two nodal surfaces and two nodal lines is guaranteed by symmetry, any 3D material with SG 137 must have nodal-lantern phonons as long as two of its phonon bands are separated from the others. \begin{figure} \includegraphics[width=7.5cm]{Figure4} \caption{(a) projection of WNL onto [001] surface and some surface symmetry points $\bar{A}, \bar{A}_{1}, \bar{A}_{2}, \bar{A}_{3}, \bar{B}, \bar{B}_{1}, \bar{B}_{2}, \bar{B}_{3}$ of [001] surface; (b) schematic diagram of surface state of [001] surface. Values 0 and $\pi$ are Zak phases for lines normal to [001] surface.(c) [001] phonon surface states of $\mathrm{Li}_{6} \mathrm{WN}_{4}$ along $\bar{B}-\bar{B}_{1} $ and $\bar{B}_{2}-\bar{B}_{3}$ surface paths; \label{fig4}} \end{figure} In the next step, the phonon surface states corresponding to the nodal-lantern phonon are studied. Because the two boundaries of the BZ (i.e., the $k_{x}=\pi$ and $k_{y}=\pi$ planes) are covered by the nodal surface, the [001] surface is the only surface that can experience a clear surface state. The corresponding surface BZ and some surface symmetry points $\left(\bar{A}, \bar{A}_{1}, \bar{A}_{2}, \bar{A}_{3}, \bar{B}, \bar{B}_{1}, \bar{B}_{2}, \bar{B}_{3}\right)$ of the [001] surface are shown in Fig.~\ref{fig4}a. The calculated projected spectrum for the [001] surface along four surface paths $\bar{B}-\bar{B}_{1}$, $\bar{B}_{1}-\bar{B}_{2}$, $\bar{B}_{2}-\bar{B}_{3}$, and $\bar{B}_{3}-\bar{B}$ are shown in Fig.~\ref{fig4}c. Interestingly, evident [001] phonon surface states (highlighted by white arrows) can be found along the $\bar{B}-\bar{B}_{1}$ and $\bar{B}_{2}-\bar{B}_{3}$ surface paths. However, the phonon surface states have disappeared along the $\bar{B}_{1}-\bar{B}_{2}$ and $\bar{B}_{3}-\bar{B}$ paths. We use the Zak phase to explain this peculiar surface state. Here, the relevant Zak phase is the Berry phase along a straight line parallel to the $\Gamma$-Z direction and across the bulk BZ: \begin{equation}\label{FNRm} Z\left(k_{x}, k_{y}\right)=\sum_{n \in o c c} \oint_{c} A_{z}(\textbf{\emph{k}}) d k_{z}, \end{equation} where $A_z$ is the z-component of the Berry connection. The summation is performed for all the occupied bands. Owing to $M_z$ symmetry, the Zak phase is quantized to 0 or $\pi$, which correspond to two topologically distinct phases. A $\pi$ Zak phase generally indicates the existence of nontrivial topological surface state~\cite{add52}. Because the two essential nodal lines along the Z-A path have nontrivial $\pi$ Berry phases, their projections onto the [001] surface divides the surface BZ into four regions. Two regions have $Z$=0, and two regions have $Z$=$\pi$, as illustrated in Fig.~\ref{fig4}b. Because each region occupies a quarter of the surface BZ, the topological surface state covers exactly half the surface BZ, which is consistent with the calculated results in Fig.~\ref{fig4}c. Before closing the article, we would like to present some important remarks about the topological signatures of the Li$_6$WN$_4$ phonon dispersion: (i) Although the existence of nodal surface states in the fermionic electronic structures of realistic materials has been predicted~\cite{add26,add27,add28,add33}, the proposed nodal surface states of phonons have not been studied by other researchers. This paper presents the existence of ideal phononic nodal surface states in realistic materials \emph{for the first time}. (ii) The predicted nodal surface is ideal in that it is nearly flat in energy with energy variations of less than 0.25 THz; in addition, the two relevant phonon bands are the only ``clean" bands in the 22.5-24.5 THz range. (iii) The shape of the nodal structure in Li$_6$WN$_4$ (e.g., the nodal surface in the $k_x$=$\pi$ and $k_y$=$\pi$ planes and the nodal lines along the Z-A path) resembles that of a traditional lantern (see Fig. \ref{figs1}). We would like to point out that the nodal-lantern phonon is protected by symmetry and has never been reported before. These results can be used to investigate the entanglement between nodal-line and nodal-surface phonons. In summary, based on first-principle calculations and symmetry analysis, a new topological phase was discovered: the nodal-lantern phonons in ternary nitride Li$_6$WN$_4$ are composed of two nodal-surface phonons in the $k_x$=$\pi$ and $k_y$=$\pi$ planes and one pair of nodal-line phonons in the $k_z$=$\pi$ plane. The existence of nodal-lantern phonons in Li$_6$WN$_4$ is protected by nonsymmorphic symmetries and time-reversal symmetry. Moreover, the phonon surface states in the [001] surface of this material were investigated; according to the results, the topological surface states of the nodal-lantern phonons cover exactly half the surface BZ. The presented results extend the concept of nodal surfaces to phonon systems, propose the existence of a undiscovered type of bosonic excitations, and predict the ideal material candidate. \emph{\textcolor{blue}{Acknowledgments}} X.T. Wang is grateful for the support from the National Natural Science Foundation of China (No. 51801163) and the Natural Science Foundation of Chongqing (No. cstc2018jcyjA0765).
\section{Introduction} \PARstart{S}{cene} text detection is a fundamental and important task in computer vision since it is a key step towards scene text recognition \cite{48} and many downstream text-related applications, such as text-based video understanding \cite{10} and license plate recognition \cite{49}. Benefiting from the development of convolutional neural networks (CNNs), image scene text detection has made much progress in the last few years \cite{6,7,8,36,37}, while video scene text detection has stagnated due to not only the lack of annotated video scene text dataset but also the challenges of scale variation, blur, and low-resolution in videos. The annotation of video text instances has always been a troublesome problem, not only to mark the location of the text instance in the current frame but also to establish the consistency of the same text instance identity(ID) between frames. Currently, almost all datasets are manually labeled \cite{5,9,10}, which is expensive and time-consuming. In addition, PaddleOCR proposes to label text instances with the text detector. However, for a large number of scene text videos to be labeled, the labeling method based on the text detector is very slow and cannot label low-quality text instances exactly. In order to reduce the cost caused by data annotation and improve the efficiency of labeling, combined with the needs of video text instances annotation, we observe that the tracking algorithm based on the correlation filter \cite{11,12,44,43} is undoubtedly a good tool to assist data annotation for scene text videos. One of the main reasons is that the text instances are relatively simple to be tracked. In the past few years, only a few datasets \cite{1,2,3} are proposed for video scene text detection, while these datasets have two common disadvantages. One is that the number of datasets is not large enough, in which the number of scene text videos basically does not exceed 100. Another is that video scenes contained in these datasets are relatively single and the quality of datasets is good without any low-resolution, blurry, and other low-quality scenes. However, low-quality video scene text detection is a hard task that must be solved, because most of the videos in the security and surveillance fields are low-resolution and blurry. Based on the above observation and analysis, it is urgent and significant to propose a large-scale low-quality scene text video dataset with low-resolution and blurry scenes. \begin{figure*}[t] \centering \includegraphics[scale=0.55]{fig-intro-2.pdf} \caption{Example paired frames and annotation of Text-RBL. In the first row,`$Raw$' denotes the frames collected by our digital camera without any processing. In the second row, `$Blur$' denotes the paired blurry frames by the averaging operation. In the last row, `$4${-}$X$ $LR$' denotes the paired low-resolution frames by the 4 times bicubic down-sampling operation. Except for the annotations in the first frame, which are manually annotated, all annotations are the tracking results of the KCF \cite{11} tracker. In a video, we assign IDs to different text instances starting from the upper left corner, such as `$01$'. Best viewed in color and zoom in. } \label{fig-intro} \end{figure*} With the above motivations, different from the expensive and time-consuming manual labeling, a semi-automatic labeling strategy based on tracking for scene text video is proposed, which is more simple and effective. Specifically, for one scene text video, we only need to label the first frame manually. Then, for the subsequent frames, the fast tracker KCF \cite{11} based on the correlation filter is used for automatic and efficient annotation. In order to ensure that the annotation quality is good enough, manual checking and error-correcting steps are also designed. Benefiting from the proposed semi-automatic labeling strategy, not only the text instances can be annotated well in each frame, but also the same text instance have a consistent ID from frame to frame. Moreover, the low-quality scene text instances can even easily get the annotation in videos. Note, the premise of using a semi-automatic annotation strategy for scene text video annotation is that text instances appearing in the first frame will not be out of view and no new text instances appear in the subsequent frames. Therefore, for one scene text video randomly shot, we need to intercept it to obtain a sub-video that meets the requirements for annotation. In addition, a novel and challenging scene text video dataset named Text-RBL is proposed, containing a total of 369 videos, as shown in FIGURE \ref {fig-intro}. In order to obtain richer scene text videos, our scenarios include indoors, outdoors, day, and night. What’s more, under the consideration of the videos that need to be processed in the security and surveillance fields often appearing blurry and low-resolution, we separately process the raw text videos captured by the digital camera with two different operations to obtain the paired blurry videos and low-resolution videos. Specifically, an averaging operation often mentioned in deblurring methods \cite{16,18,41,42} with a sliding window mechanism is used to generate blurry videos, and a bicubic down-sampling operation often mentioned in super-resolution methods \cite{17,19,39,40} is used to generate low-resolution videos. The annotation of Text-RBL is completed by the proposed semi-automatic labeling strategy. In order to prove the validity of the proposed Text-RBL dataset labeled by the semi-automatic labeling strategy, a baseline model is proposed, combining the text detection and tracking into a unified framework for video scene text detection. However, it is challenging as the baseline model often drifts caused by scale variation, occlusion, and out-of-view, etc. A simple and effective failure detection scheme is designed to address this problem. In the experiment, we analyze the performance improvement of the baseline in low-quality scene text videos brought by the text detector trained with low-quality data in Text-RBL. The main contributions of this work can be summarized as follows: \begin{itemize} \item A semi-automatic labeling strategy for simple and efficient annotation in scene text videos. To our knowledge, we are the first one to integrate tracking to get semi-automatic scene text annotation. \item A paired low-quality scene text video dataset named Text-RBL, which is annotated by the semi-automatic labeling strategy. Text-RBL consists of 369 paired Raw-Blurry-LR videos with a simple averaging operation and a bicubic down-sampling strategy. \item A detailed analysis of the Text-RBL dataset with extensive experiments is provided. Text-RBL enhances favorably the text detector to better handle low-quality scene text detection. \end{itemize} The rest of this paper is organized as follows. Section \uppercase\expandafter{\romannumeral2} briefly outlines the related prior work of video scene text dataset, video scene text detection, visual object tracking. Section \uppercase\expandafter{\romannumeral3} presents the details about our proposed semi-automatic labeling strategy. We introduce Text-RBL dataset including design principle, data collection, and annotation provided by the proposed semi-automatic labeling strategy in Section \uppercase\expandafter{\romannumeral4}. In Section \uppercase\expandafter{\romannumeral5}, we introduce our baseline model used for the Text-RBL dataset. In Section \uppercase\expandafter{\romannumeral6}, we compare our model with several baselines on the Text-RBL dataset. We discuss future work in Section \uppercase\expandafter{\romannumeral7} , and conclude the paper in Section \uppercase\expandafter{\romannumeral8}. \begin{table*}[t] \centering \renewcommand\arraystretch{1.3} \setlength{\tabcolsep}{5.4mm} \smallskip\begin{tabular}{|l|l|l|l|l|} \hline Datasets & \# Videos & \# Frames & \# Instances & Time cost of annotation\\ \hline Minetto \cite{1} & 5 & 3,599 & 8,706 & - \\ IC13 \cite{2} & 28 & 15,277 & 93,934 & - \\ IC15 \cite{3} & 49 & 27,824 & - & - \\ LSVTD \cite{4} & 100 & 66,700 & 569,300 & 3500 hours \\ STVText4 \cite{5} & 106 & 161,347 & 1,419,008 & 2 months \\ \hline \textbf{Text-RBL} & \textbf{369} & \textbf{101,019} & \textbf{371,955} & \textbf{72 hours} \\ \hline \end{tabular} \caption{Statistic comparison between our Text-RBL dataset and other video scene text detection datasets.} \label{t4} \end{table*} \section{Related Work} In this section, we briefly review the related work of video scene text dataset, video scene text detection, visual object tracking. \subsection{video scene text dataset} For the task of video scene text detection, the video scene text data set is an indispensable part, which is closely related to the development of video scene text detection. However, manual labeling of video scene text is expensive and time-consuming. Since not only the location of the text instance must be marked, but the same text between different frames must have the same ID, the existing data sets are all small in data volume. For example, Minetto’s dataset \cite{1} only has five text videos. ICDAR 2013 Video Text \cite{2} provide 28 videos in total, including13 videos comprised the training set and 15 the test set. ICDAR 2015 Video Text \cite{3} is substantially updated bring the number of sequences up to 49 based on ICDAR 2013 Video Text. LSVTD \cite{4} and STVText4 \cite{5} are two relatively large-scale datasets, with 100 videos and 106 videos respectively. But the cost of manual labeling is too great, for STVText4 data annotation, Cai et al. \cite{5} invited over 200 people to conduct three rounds of cross-checking for more than two months. In this work, we propose a semi-automatic labeling strategy, which greatly reduces the time and labor costs caused by labeling. \subsection{video scene text detection} Exiting video scene text detection methods can be divided into two categories, text detection in videos and text tracking in videos. Text detection in video approaches \cite{20,21,22,23} are mainly enhancing the existing image text detector to help improve feature representation and extract text instances directly in the single frames. However, these approaches still cannot perform well due to complicated temporal characteristics, such as blur, occlusion, etc. Text tracking in video approaches \cite{24,25,26} focus on capture the temporal motion of text instances between frames. For example, Zuo et al. \cite{27} and Tian et al. \cite{28} propose to integrate tracking-by-detection based methods into the video scene text detection framework. In this work, we propose a simple baseline for video scene text detection, which fully combines the advantages of an image scene text detector and tracker. \subsection{visual object tracking} There have been great interests in visual tracking recently. Exiting main kinds of visual tracking approaches can be divided into two categories as based on deep learning \cite{29,30,46,47} and correlation filter \cite{14,13,15} approaches. Benefiting from the powerful representation of deep convolutional neural networks, visual tracking approaches based on deep learning \cite{31,32,45} has made much progress in the last few years. These trackers are usually very efficient, while the online update of the deep learning model is time-consuming. The approaches based on correlation filters are known for their fast speed since the correlation filter allows for fast run-times as computations are performed in the Fourier domain \cite{11}. Its tracking performance is okay for simple objects, but its performance is not good enough for complex objects. In this work, KCF, a fast tracker based on a correlation filter, is used to label data semi-automatically. One of the main reasons is that the text instances are relatively simple, and its annotation effect can meet our expectations. \begin{figure*}[t] \centering \includegraphics[scale=0.57]{fig-anno-2.pdf} \caption{Example raw scene text videos and annotations of our Text-RBL. The frames of each line are sampled from the same video. In each line, the first frame is the first frame of each video, which is manually labeled, and the other frames are labeled by the KCF tracker. Best viewed in color and zoom. } \label{fig-anno} \end{figure*} \section{Semi-automatic labeling strategy} Different from the time-consuming and expensive manual labeling, in order to provide consistent bounding box annotation for scene text video efficiently, a semi-automatic labeling strategy is proposed. Under the consideration of the simple enough features of the text instance, we observe that the tracker based on correlation filter can get good enough tracking results for the text instances by using , which is one of the useful tools to obtain the temporal relation of text instances. Therefore, we propose to use the KCF tracker for automatic and efficient annotation, which is a representative, effective, and fast tracker based on the correlation filter. Note, the assumption is that in one video, except for the text instances appearing in the first frame, no new text instances appear in subsequent frames nor the old text instances disappear. Specifically, given a scene text video, for the first frame, if a text instance appears in the frame, a labeler manually draws its bounding box as the most suitable up-right one to fit any visible part of the text instance, and the manually labeled feature of the text instance in the first frame is directly used to initialize the KCF tracker; for the subsequent frames, the initialized KCF tracker track the text instance until the entire video is completed. The final annotation of the text instance in this scene text video is combined with the result of manual annotation in the first frame and the tracking results with the KCF tracker in the subsequent frames. In fact, there is rarely only one text instance in a video, usually multiple text instances. For our semi-automatic labeling strategy, it does not increase too much workload. All we need to do is to manually label all the text instances in the first frame, and initialize a KCF tracker for each text instance in the subsequent frames to get the annotation. Moreover, we assign IDs to different text instances starting from the upper left corner in the first frame. Note that, such a semi-automatic labeling strategy cannot guarantee to get a box as accurate as manual labeling that the background area is minimized in the box. However, the strategy does provide a consistent annotation for video scene text, which is relatively stable and good enough. Although the above semi-automatic labeling strategy is effective in most cases, there are exceptions, especially video scene text with excessive movement. In order to ensure that the annotation quality is good enough, two extra steps including manual checking and error-correcting are designed. In the manual checking process, we do not check the annotation of every text instance in each frame, which is too time-consuming, but only check the last frame of each video. If the quality of the annotation in the last frame is not good enough, we will relabel it in the error-correcting process, even manually label it if necessary, but this is an extremely rare case. FIGURE \ref{fig-anno} shows example annotation of the proposed Text-RBL dataset. \section{The Proposed Text-RBL Dataset} We introduce a novel video scene text dataset consisting of paired Raw-Blurry-LR videos, named as Text-RBL, detailed in Table \ref{t4}. In the following, we first design principles for constructing the Text-RBL dataset in Section \uppercase\expandafter{\romannumeral4}-A. We then provide the details of data collection, including raw videos, blurry videos, and low-resolution videos in Section \uppercase\expandafter{\romannumeral4}-B. Following that, we introduce the automatic and efficient annotation benefiting from the proposed semi-automatic labeling strategy in Section \uppercase\expandafter{\romannumeral4}-C. \begin{figure}[t] \centering \includegraphics[scale=0.42]{fig-day.pdf} \caption{Illustration of video text scenes in Text-RBL. Best viewed in color and zoom in.} \label{fig-day} \end{figure} \subsection{Design Principle} Our proposed TextBlur dataset aims to offer the community a paired Raw-Blurry-LR scene test video dataset for video scene text detection. To such purpose, we follow three principles in constructing Text-RBL, including diversified scenes, efficient annotation, and comprehensive labeling. \subsubsection{Diversified scenes} A robust text detector is expected to perform consistently regardless of the scenes the text video belongs to. For this purpose, our video text scenes include not only indoor but also outdoor, not only during the day but also at night. Among them, indoor includes some shopping malls, museums, etc., and outdoor includes parks, streets, etc. \subsubsection{Efficient annotation} The annotation of video text data has always been an expensive and time-consuming task. To alleviate this problem, we use tracking for semi-automatic and efficient annotation, which will later be discussed in Section \uppercase\expandafter{\romannumeral4}-C. \subsubsection{Comprehensive labeling} In order to meet the needs of video scene text detection, a principle of Text-RBL is to provide comprehensive labeling for paired Raw-Blurry-LR scene text video, including both bounding box and text annotations. \subsection{Data Collection} Text-RBL consists of paired Raw-Blurry-LR videos in diversified scenes. Different from the existing public-available video text dataset \cite{1} that only has five real outdoor videos, our video text scenes include not only outdoor but also indoor, such as streets, museums, etc, not only in the day but also at night, as shown in FIGURE \ref{fig-day}. \begin{figure}[t] \centering \includegraphics[scale=0.37]{fig-blur.pdf} \caption{Illustration of the proposed blurring process with an averaging operation and a sliding window to generate paired Raw-Blur videos. For the $t$-th raw frame $F_t^R$ in the video, we use the N frames before and after it with itself to generate the blurry frame $F_t^B$. We empirically set $N=5$. Best viewed in color and zoom in.} \label{fig-blur} \end{figure} \subsubsection{Raw videos} All raw videos in Text-RBL are captured by a digital camera DJI Osmo Action with the size of 1920×1080 (width×height) and the frame rate of 100fps. Initially, we collect over 500 videos. Under the joint consideration of the quality videos for text detection and the design principles of Text-RBL, we pick out 369 videos eventually. Note, in order to use the semi-automatic labeling strategy more conveniently, when collecting videos we adhere to a principle: the text instances appearing in the first frame should be always in the view and no new text instances appear in the subsequent frames. \subsubsection{Blurry videos} As mentioned in conventional deblurring methods, we generate blurry frames with a simple averaging operation. The difference is that we need to generate paired Raw-Blurry videos, therefore, we additionally add a sliding window mechanism, as shown in FIGURE \ref{fig-blur}. Specifically, for the $t$-th raw frame $F_t^R$ in the video, we use the N frames before and after it combined with itself by an averaging operation to generate the blurry frame $F_t^B$. The blurring process can be mathematically formulated as: \begin{equation} F_t^B = \frac{1}{(N+1)}{\sum\limits_{i=0}^{N}}{F_{t+i-\frac{N}{2}}^R}, \end{equation} \begin{figure}[t] \centering \includegraphics[scale=0.28]{fig-LR-1.pdf} \caption{Comparison between raw frames and LR frames in TextBlur. `$Raw$' denotes the frames collected by our digital camera. `$M${-}$X$ $LR$' denotes the low-resolution frames generated by the bicubic down-sampling strategy with multiples M . We empirically set $M=4$. Best viewed in color and zoom in. } \label{fig-LR} \end{figure} \subsubsection{Low-resolution videos} In addition to generating paired Raw-Blurry videos, we also propose paired Raw-LR videos. As mentioned in traditional super-resolution methods, we simply use the bicubic down-sampling strategy to get low-resolution videos, as shown in FIGURE \ref{fig-LR}. Practically, through different downsampling multiples M, we can get the corresponding M-X LR videos. The LR process can be mathematically formulated as: \begin{equation} F_t^L = g_M(F_t^R), \end{equation} where $g_M(\cdot)$ is the bicubic down-sampling operation, and M is the parameter of downsampling multiple. $F_t^L$ is an M-X LR frame corresponding to the raw frame $F_t^R$. \begin{figure}[t] \centering \includegraphics[scale=0.45]{fig-detail.pdf} \caption{Distribution of three types.} \label{fig-detail} \end{figure} \begin{figure*}[t] \centering \includegraphics[scale=0.50]{fig-over.pdf} \caption{Overview of the proposed model for the video scene text detection task. The model consisting of a text detector and multi trackers takes a video (a sequence of frames) as input. The model puts the first frame into the text detector, and use the results to initialize the multi trackers, which are used for tracking the subsequent frames. Best viewed in color and zoom. } \label{fig-over} \end{figure*} \subsection{annotation} As described in Section \uppercase\expandafter{\romannumeral4}-B, Text-RBL consists of paired videos including raw videos, blurry videos, and low-resolution videos. For raw videos, we use the proposed semi-automatic labeling strategy, as shown in FIGURE \ref{fig-anno}, while we directly use the annotation of the raw videos to provide the corresponding annotation for paired blurry videos and low-resolution videos without additional operations. Compared with other manually labeled datasets, such as STVText4, which invites over 200 people to conduct three rounds of cross-checking for more than two months, we complete the annotation of Text-RBL in only about 72 hours with the help of the proposed semi-automatic labeling strategy, which greatly reduces the cost of annotation. In fact, it is not difficult for us to further expand Text-RBL in the future. \subsection{dataset analysis} Text-RBL contains 369 videos include 101,019 frames and 371,955 different text instances totally, with an average video length of 265 frames. The shortest video contains 34 frames, while the longest one consists of 1,245 frames. Moreover, the number of text instances in each video is different from 1 to 23. Statistics on the full dataset are provided in Table \ref{t4}. To investigate the difficulty of Text-RBL in more detail, according to the number of text instances in each video, we categorize Text-RBL into three types. The types of `easy' denotes the number of text instances in videos is below to 4. The types of `general' denotes the number of text instances in videos is between 4 to 8. When the number of text instances in videos is more than 8, these videos is defined as `hard'. As shown in FIGURE \ref{fig-detail}, `easy' and `general' make up 42\% and 44\% of the dataset respectively, and `hard' makes up the remaining 14\%. Overall, Text-RBL is not too difficult, and more difficult samples can be collected to enrich the dataset in the future. \section{Baseline Model} In this section, we introduce our baseline model to verify the rationality of the Text-RBL dataset and evaluate the effectiveness of different combinations of choices of the text detectors and trackers. An overview of the model is illustrated in FIGURE \ref{fig-over}. The model consists of two components, including the text detector and the tracker. For the first frame, we use the detection results performed by the text detector to initialize the trackers whose number is the same as the detection results. For the subsequent frames, we use the initialized multiple trackers to track the text instances to complete the video scene text detection task. \subsection{Text Detection} Given a scene text video $\{F_i\}_{i=1}^{n_{frame}}$, where $n_{frame}$ is the length of the video, we first detect the text instances in the first frame $F_1$ by the text detector D, and obtain the detection results as $\{BBox_i^1\}_{i=1}^{n_{text}}$, where $n_{text}$ is the number of text instances detection results. The text detection process can be mathematically formulated as: \begin{equation} \{BBox_i^1\}_{i=1}^{n_{text}} = D({F_1}) \end{equation} Since the detection results of the first frame are used to initialize the tracker, that is to say, the detection results should be as good as possible. Under the consideration of this, We experiment with three representative types of text detector: PSENet \cite{33}, DBNet \cite{34} and Jiang et al. \cite{35}. For these three different text detectors, we do not directly use the pre-trained base-model in the experiment but fine-tuned it on our Text-RBL dataset. \begin{algorithm} \caption{Inference algorithm of the baseline model for video scene text detection.} \label{alg:1} \begin{algorithmic}[1] \Require : Text Detector: $D$; Tracker: $T$ \State Input: videos frames $\{F_t\}$ with length $l$ \For{ $t=1$ to $l$} \If{$t==1$} \State $\{BBox_i^1\}_{i=1}^{n_{text}} = D(F_1)$ \For{$i=1$ to $n_{text}$} \State $T_i = Init(BBox_i^1)$ \EndFor \Else \For{$i=1$ to $n_{text}$} \State $BBox_i^t = T_i(F_t)$ \State Update $T_i$ \EndFor \EndIf \EndFor \State Output: detection and tracking results $\{BBox_i^t\}$ \end{algorithmic} \end{algorithm} \subsection{Text Tracking} In addition to using the text detector to get the location of the text instances in the first frame of the given video, we use the multi trackers to track text instances in the subsequent frames. Normally, the tracking process is that given the target state in the first frame of a video, the tracker predicts the target state in each subsequent frame. Therefore, for each text instance detected in the first frame, we initialize the corresponding tracker with the detection result. Since the detection result is obtained by the text detection method based on segmentation, we need to initialize the tracker with the features in the smallest bounding rectangle of the detection result. For the subsequent frames, the tracking process of the text instances can be mathematically formulated as: \begin{equation} BBox_i^t = T_i(F_t) \end{equation} where $T_i$ denotes the tracker corresponding to the $i$-$th$ text instance from the top left in the first frame. $F_t$ denotes the frame at time $t$. $BBox_i^t$ denotes the tracking result of the text instance i in the $t$-$th$ frame. Obviously, the performance of the tracker directly affects the results of the video scene text detection task. Considering the tracking speed and accuracy of the tracker, combined with the simple characteristics of text instances, we use the tracker based on a correlation filter instead of the tracker based on deep learning. We experiment with two correlation filter-based tracker: KCF \cite{11}, and SAMF \cite{13}. More experimental details will later be discussed in Section \uppercase\expandafter{\romannumeral6}. \subsection{Failure Detection Scheme} To conquer the baseline model drift problem caused by complex scene text videos (e.g., out-of-view, occlusion, and so on), a simple and effective failure detection scheme is proposed in our work, which can stop the loss in time and improve the performance further. As the location of the maximum value of the response map indicates the tracking target position, the quality of the final tracking result can be evaluated by the response map. Let $M_R^t$ denotes the maximum value of the response $R$ at $t$-$th$ frame. The maximum response value of the current frame $M_R^t$ and the difference $\Delta{M_R}$ between the maximum response value of the tracking first frame $M_R^1$ are combined to define the confidence score $S_c$ for the current frame, which can be mathematically formulated as: \begin{equation} \Delta{M_R} = M_R^t - M_R^1 \end{equation} \begin{equation} S_c=\left\{ \begin{array}{rcl} 0, & & {M_R^t < \alpha} \ and \ {\Delta M_R < \beta}\\ 1, & & {otherwise} \end{array} \right. \end{equation} where $\alpha = 0.25$ and $\beta = -0.2$. The principles of equation (6) include: (1) When $M_R^t$ is not confident and is much lower than $M_R^1$, the tracker outputs a confidence score of 0 and stop tracking the text instance in subsequent frames; (2) Otherwise, the tracker returns a confidence score of 1, which means is conducting successful tracking process. \section{Experimental Results} In this section, we first briefly introduce the Text-RBL dataset for training, validation, and testing in Section \uppercase\expandafter{\romannumeral6}-A. Then, we explain the evaluation protocols and introduce the compared baseline models in Section \uppercase\expandafter{\romannumeral6}-B and Section \uppercase\expandafter{\romannumeral6}-C, respectively. Finally, we show the comparison results on our Text-RBL dataset for performance evaluation with the effectiveness analysis in Section \uppercase\expandafter{\romannumeral6}-D. \subsection{Datasets} In all the experiments, the Text-RBL dataset is divided into three parts: 80\% for training, 10\% for validation, and 10\% for testing. Whether it’s for training, validation, or testing, each part of the Text-RBL dataset consists of paired raw videos, blurry videos, and low-resolution videos. \subsection{Evaluation protocols} As mentioned in common text detection algorithms \cite{38}, we evaluate baseline models on our proposed Text-RBL dataset in terms of Precision (denoted by P), Recall (denoted by R), and F-measure (denoted by F). Precision represents the ratio of the number of correctly detected text instances to the number of all detected text instances. Recall represents the ratio of the number of correctly detected text instances to the number of all text instances in the test dataset. F-measure measures the overall performance of text detectors, including Recall and Precision. Note that, a correctly detected text instance denotes the overlap between the detected text region and the ground truth of the detected text instance is larger than a given threshold (e.g., 0.5). \subsection{Compared models} We define the following combinations of our proposed baseline models for video scene text detection, to evaluate the importance of different text detectors and trackers: \subsubsection{Detection only} We use three representative types of text detector in each frame for evaluation: PSENet \cite{33}, DBNet \cite{34} and Jiang et al. \cite{35}. Specifically, PSENet can precisely detect text instances with arbitrary shapes, even can accurately separate text instances that are close to each other with a progressive scale expansion algorithm; DBNet proposes a Differentiable Binarization module to provide a highly robust binarization map, predicting the shrunk regions and significantly simplifying the post-processing; Jiang et al. propose that not only the novel text region representation can detect dense adjacent text of arbitrary shape flexibly, but also the proposed Polygon Expansion Algorithm can reduce the cost of time greatly which needs only one clean and efficient step. For different text detectors, we can define as: \textbf{PSENet only}, \textbf{DBNet only}, and \textbf{Jiang et al. only}. \subsubsection{Detection+tracking} For each tested video, we use the text detectors in the first frame and use the trackers in the subsequent frames, which is the full setting baseline model for evaluation. The text detectors are the same as mentioned in Section \uppercase\expandafter{\romannumeral6}-C. The trackers are KCF \cite{11}, and SAMF \cite{13}. Specifically, KCF is the first one to propose that using the diagonalization property of the circulant matrix in the Fourier space, the calculation of the matrix is transformed into the Hadamard product of the vector, which greatly reduces the amount of calculation, improves the calculation speed, and makes the algorithm meet the real-time requirements. SAMF is a variant of KCF, focusing on suggesting an effective scale adaptive scheme to tackle the problem of the fixed template size. For different combinations of text detectors and trackers, we can define as: \textbf{PSENet+KCF}, \textbf{PSENet+SAMF}, \textbf{DBNet+KCF}, \textbf{DBNet+SAMF}, \textbf{Jiang et al.+KCF}, and \textbf{Jiang et al.+SAMF}. \subsection{Performance comparison} \subsubsection{Annotation Comparison} \begin{figure*}[t] \centering \includegraphics[scale=0.4]{fig-munual.pdf} \caption{Quantitative comparison between manual annotation and semi-automatic text annotation. Best viewed in color and zoom. \label{fig-munual}} \end{figure*} \begin{table}[t] \centering \renewcommand\arraystretch{1.3} \setlength{\tabcolsep}{8.4mm} \smallskip\begin{tabular}{|l|l|} \hline Data & mIOU [\%] \\ \hline \hline Video-011 & 92.1 \\ \hline Video-060 & 88.5 \\ \hline Video-061 & 89.7 \\ \hline Video-070 & 91.6 \\ \hline Video-202 & 93.0 \\ \hline \end{tabular} \caption{Quantitative comparison between manual annotation and semi-automatic text annotation.} \label{t5} \end{table} \begin{table*}[t] \centering \renewcommand\arraystretch{1.3} \smallskip\begin{tabular}{|l|l|l|l|l|l|l|l|l|l|l|} \hline \multirow{2}*{Method} &\multirow{2}*{Train datatset}& \multicolumn{3}{c|}{Raw-1st} & \multicolumn{3}{c|}{Blurry-1st} & \multicolumn{3}{c|}{Low-resolution-1st} \\ \cline{3-11} & & P [\%] & R [\%] & F [\%] & P [\%] & R [\%] & F [\%] & P [\%] & R [\%] & F [\%]\\ \hline \hline \multirow{4}*{PSENet \cite{33}} & Raw videos & 87.05 & \textbf{93.19} & 90.01 & 82.18 & 77.25 & 79.64 & 80.85 & 92.46 & 86.27 \\ \cline{2-11} & Blurry videos & 91.26 & 91.48 & 91.37 & 90.51 & 88.25 & 89.37 & 86.59 & 86.37 & 86.48 \\ \cline{2-11} & Low-resolution videos & 89.69 & 91.00 & 90.34 & 89.33 & 73.25 & 80.49 & 86.97 & 89.29 & 88.12 \\ \cline{2-11} & Mix videos & \textbf{93.19} & \textbf{93.19} & \textbf{93.19} & \textbf{93.80} & \textbf{90.75} & \textbf{92.25} & \textbf{92.84} & \textbf{91.48} & \textbf{92.16} \\ \hline \hline \multirow{4}*{DBNet \cite{34}} & Raw videos & 91.73 & 83.70 & 87.53 & 89.52 & 70.50 & 78.88 & 91.04 & 76.64 & 83.22 \\ \cline{2-11} & Blurry videos & 93.44 & 83.21 & 88.03 & 92.12 & 76.00 & 83.29 & 91.92 & 80.29 & 85.71 \\ \cline{2-11} & Low-resolution videos & 95.39 & 85.64 & 90.26 & \textbf{94.50} & 73.00 & 82.37 & \textbf{96.66} & \textbf{84.43} & \textbf{90.13} \\ \cline{2-11} & Mix videos & \textbf{96.71} & \textbf{85.89} & \textbf{90.98} & 91.90 & \textbf{82.25} & \textbf{86.81} & 96.39 & \textbf{84.43} & 90.01 \\ \hline \hline \multirow{4}*{Jiang et al. \cite{35}} & Raw videos & 93.15 & 89.29 & 91.18 & 86.96 & 65.00 & 74.39 & 87.60 & 79.08 & 83.12 \\ \cline{2-11} & Blurry videos & \textbf{96.61} & 90.27 & 93.33 & 93.36 & 81.25 & 86.90 & \textbf{96.43} & 85.40 & 90.58 \\ \cline{2-11} & Low-resolution videos & 94.64 & 90.27 & 92.40 & 91.30 & 68.25 & 78.11 & 91.62 & 87.83 & 89.69 \\ \cline{2-11} & Mix videos & 96.20 & \textbf{92.46} & \textbf{94.29} & \textbf{95.47} & \textbf{89.50} & \textbf{92.39} & 94.22 & \textbf{91.24} & \textbf{92.71}\\ \hline \end{tabular} \caption{Performance comparison results of different trackers trained with different datasets on different testing datasets. $P$, $R$ and $F$ represent the precision, recall, and F-measure, respectively.} \label{t1} \end{table*} \begin{table*}[t] \centering \renewcommand\arraystretch{1.3} \smallskip\begin{tabular}{|l|l|l|l|l|l|l|l|} \hline \multirow{2}*{Method} &\multirow{2}*{Train datatset}& \multicolumn{3}{c|}{IC15 \cite{3}} & \multicolumn{3}{c|}{Raw-1st (Text-RBL)} \\ \cline{3-8} & & P [\%] & R [\%] & F [\%] & P [\%] & R [\%] & F [\%] \\ \hline \hline \multirow{2}*{Jiang et al. \cite{35}} & IC15 \cite{3} & 77.79 & \textbf{74.53} & 76.12 & 59.62 & 60.34 & 59.98 \\ \cline{2-8} & IC15 \cite{3} + Raw videos (Text-RBL) & \textbf{78.22} & \textbf{74.53} & \textbf{76.33} & \textbf{94.62} & \textbf{89.78} & \textbf{92.13} \\ \hline \end{tabular} \caption{Performance comparison results with IC15\cite{3}. $P$, $R$ and $F$ represent the precision, recall, and F-measure, respectively.} \label{t7} \end{table*} \begin{table*}[t] \centering \renewcommand\arraystretch{1.3} \smallskip\begin{tabular}{|l|l|l|l|l|l|l|l|l|l|l|} \hline \multirow{2}*{Detector} &\multirow{2}*{Tracker}& \multicolumn{3}{c|}{Raw-all} & \multicolumn{3}{c|}{Blurry-all} & \multicolumn{3}{c|}{Low-resolution-all} \\ \cline{3-11} & & P [\%] & R [\%] & F [\%] & P [\%] & R [\%] & F [\%] & P [\%] & R [\%] & F [\%]\\ \hline \hline \multirow{3}*{PSENet \cite{33}} & - & 92.75 & 93.25 & 93.00 & 92.30 & 90.86 & 91.58 & 93.75 & 92.74 & 93.24 \\ \cline{2-11} & KCF \cite{11} & 90.49 & 89.37 & 89.93 & 90.38 & 93.27 & 91.80 & 94.40 & 93.75 & 94.07\\ \cline{2-11} & SAMF \cite{13} & \textbf{98.75} & \textbf{97.53} & \textbf{98.14} & \textbf{94.17} & \textbf{97.18} & \textbf{95.65} & \textbf{96.96} & \textbf{96.59} & \textbf{96.77} \\ \hline \hline \multirow{3}*{DBNet \cite{34}} & - & 96.82 & 86.72 & 91.49 & 92.60 & 81.46 & 86.67 & 97.05 & 86.19 & 90.73 \\ \cline{2-11} & KCF \cite{11} & 95.21 & 88.58 & 91.77 & 95.04 & 88.28 & 91.53 & 94.71 & 92.98 & 93.84\\ \cline{2-11} & SAMF \cite{13} & \textbf{99.12} & \textbf{92.22} & \textbf{95.55} & \textbf{95.95} & \textbf{89.12} & \textbf{92.41} & \textbf{94.92} & \textbf{93.19} & \textbf{94.05}\\ \hline \hline \multirow{3}*{Jiang et al. \cite{35}} & - & 96.78 & 92.85 & 94.77 & \textbf{95.05} & 89.30 & 92.09 & \textbf{95.11} & 91.49 & 93.26 \\ \cline{2-11} & KCF \cite{11} & 93.21 & 90.03 & 91.59 & 93.57 & 91.16 & 92.53 & 94.20 & 94.45 & 94.33 \\ \cline{2-11} & SAMF \cite{13} & \textbf{97.23} & \textbf{93.91} & \textbf{95.54} & 93.95 & \textbf{91.53} & \textbf{92.73} & 94.60 & \textbf{94.85} & \textbf{94.73} \\ \hline \end{tabular} \caption{Performance comparison results of different baselines trained with mix videos on different testing datasets. $P$, $R$ and $F$ represent the precision, recall, and F-measure, respectively.} \label{t2} \end{table*} \begin{table*}[t] \centering \renewcommand\arraystretch{1.3} \smallskip\begin{tabular}{|l|l|l|l|l|} \hline \multirow{2}*{Detector} &\multirow{2}*{Tracker}& \multicolumn{3}{c|}{Raw-all}\\ \cline{3-5} & & P [\%] & R [\%] & F [\%]\\ \hline \hline \multirow{2}*{PSENet \cite{33}} & KCF w/o failure detection scheme & 90.49 & \textbf{89.37} & 89.93 \\ \cline{2-5} & KCF w/ failure detection scheme & \textbf{95.65} & 89.35 & \textbf{92.39} \\ \hline \hline \multirow{2}*{DBNet \cite{34}} & KCF w/o failure detection scheme & 95.21 & \textbf{88.58} & 91.77 \\ \cline{2-5} & KCF w/ failure detection scheme & \textbf{97.75} & \textbf{88.58} & \textbf{92.94} \\ \hline \hline \multirow{2}*{Jiang et al. \cite{35}} & KCF w/o failure detection scheme & 93.21 & \textbf{90.03} & 91.57\\ \cline{2-5} & KCF w/ failure detection scheme & \textbf{95.73} & 89.87 & \textbf{92.71}\\ \hline \end{tabular} \caption{Performance comparison results on Text-RBL with different failure detection scheme. $P$, $R$ and $F$ represent the precision, recall, and F-measure, respectively.} \label{t6} \end{table*} \begin{figure*}[t] \centering \includegraphics[scale=0.4]{fig-quality.pdf} \caption{ Qualitative evaluation of \textbf{Jiang et al. only} trained by raw vidoes and \textbf{Jiang et al.+SAMF} trained by mix videos on Text-RBL. \textbf{Jiang et al.+SAMF} performs well against \textbf{Jiang et al. only}. Best viewed in color and zoom.} \label{fig-quality} \end{figure*} To prove that the KCF tracker used in the semi-automatic text annotation strategy is sufficiently robust and stable, a comparative experiment of manual annotation and semi-automatic text annotation is provided. The evaluation metric is the calculation of mIOU, which is commonly used in the field of detection and tracking. In order to ensure the fairness and effectiveness of the experiment, we randomly select five different scene text instances from five different scene text videos for manual annotation, which contains 539 frames in total. The corresponding semi-automatic annotation is obtained by the method mentioned in Section \uppercase\expandafter{\romannumeral3}. As shown in Table \ref{t5}, regardless of any scene text instance, the results of manual annotation and the proposed semi-automatic annotation are roughly the same, and their mIOU are very high, some even as high as 93\%. This is enough to prove that the tracking based semi-automatic annotation for scene text videos is reliable. Moreover, to further analyze the gap between manual annotation and semi-automatic annotation, the results of the both annotation are visualized, as shown in FIGURE \ref{fig-munual}. Obviously, any scene text instance can get a good annotation result, whether it is manually annotated or the tracking based semi-automatic annotation strategy. The slight difference is that the semi-automatic annotation results may be slightly off the boundary of the scene text instances, but this will not cause a big adverse effect. Through qualitative and quantitative experiments, we have reasons to believe that the tracking based semi-automatic annotation strategy is trustworthy. \subsubsection{Text Detector Comparison} Whether it is \textbf{detection only} or \textbf{detection+tracking}, the text detectors play an extremely important role in video scene text detection. In order to compare the performance of different text detectors on our dataset concisely and clearly, Table \ref{t1} shows the performance of three text detectors used in the baseline models on different types of the testing dataset including raw videos, blurry videos, and low-resolution videos, which are trained with different types of training dataset also including raw videos, blurry videos, low-resolution videos, and mix videos. Mix videos are a mixture of raw videos, blurry videos, and low-resolution videos, but their numbers remain the same. Note that, the testing dataset here only contains the first frame of each video instead of the entire video, defined as raw-1st, blurry-1st, and low-resolution-1st. As shown in Table \ref{t1}, although the models trained only on raw videos performs well on the raw-1st, the performance on the blurry-1st and low-resolution-1st is not satisfactory. Notably, the F-measure of PSENet on the raw-1st is 90.01\%, however, its F-measure on the low-resolution-1st drops to 86.27\%, and its F-measure on the raw-1st is only 79.64\%. However, the models trained with challenging training data such as blurry videos and low-resolution videos can significantly improve performance on blurry-1st and low-resolution-1st. After training with mixed videos, the F-measure of PSENet boost to 93.19\%, 92.25\%, and 92.16\%, on the raw-1st, blurry-1st, and low-resolution-1st respectively. In addition to PSENet, DBNet and Jiang et al. also have similar performance improvements. The specific experimental results are shown in Table \ref{t1}. Table \ref{t7} shows the performance gain of Jiang et al. brought by Text-RBL compared with the previous dataset IC15. Especially on raw-1st, Jiang et al. trained by IC15 and raw videos of Text-RBL get large performance gains in precision (+35.0\%), recall (+29.44\%) and F-measure (+32.15\%), compared with the one only trained by IC15. Fundamentally, we observe that it is necessary to propose such a challenging video scene text dataset, which can improve the robustness of the model and enable the model to better deal with challenges such as low-resolution and blurring in real scenes. \subsubsection{Baseline Comparison} For the video scene text video task, we use the evaluation protocol to indicate the performance of each baseline with different combinations. To facilitate the distinction, we define the testing datasets here as raw-all, blurry-all, and low-resolution-all. Table \ref{t2} summarizes the main results, and all text detectors in the table are trained on the mix videos. For the same text detector, such as DBNet, \textbf{DBNet only}, \textbf{DBNet+KCF} and \textbf{DBNet+SAMF} show completely different performance, especially on challenging datasets, \textbf{DBNet+KCF} and \textbf{DBNet+SAMF} significantly advances \textbf{DBNet only} by large margins in F-measure (+4.86\% and +5.74\%, respectively) on the blurry-all. Similar conclusions can be obtained on PSENet and Jiang et al. Particularly, no matter which testing dataset or evaluation protocols is, compared with \textbf{PSENet only}, the performance of \textbf{PSENet+SAMF} is very competitive. The specific experimental results are shown in Table \ref{t2}. We analyze that compared with the text detector itself, the tracker can use the results of the first frame of text detection to better handle the deformation, blur, and low resolution of the text instances in the subsequent frames. To validate the effectiveness of the proposed failure detection scheme, we implement a control method by disabling this scheme. The compared results are shown in Table \ref{t6} . The methods with the failure detection scheme obtain large increases in precision and F-measure respectively compared with the methods without scheme. Although \textbf{PSENet+KCF} with failure detection scheme drops 0.02\% in recall, it obtains gains of +5.16\% and +2.46\% in precision and F-measure over the one without failure detection scheme respectively. In addition to PSENet, DBNet and Jiang et al. also have similar performance improvements. The specific experimental results are shown in Table \ref{t6}. \subsubsection{Speed Comparison} Although the baselines we proposed are all two-stage combined with text detection and tracking, they not only enhance the performance of video scene text detection but also greatly improves speed, which benefits from the real-time tracking performance of the tracker. The results of the speed performance comparison between different baselines are presented in Table \ref{t3}. Benefit from the fast tracking performance of KCF, \textbf{Jiang et al.+KCF} achieves a real-time speed of about 106 FPS, while the speed of \textbf{Jiang et al.+SAMF} is 5.38 FPS, and \textbf{Jiang et al. only} is only 2.73 FPS. \begin{table}[t] \centering \renewcommand\arraystretch{1.3} \setlength{\tabcolsep}{8.4mm} \smallskip\begin{tabular}{|l|l|} \hline Method & Speed \\ \hline \hline \textbf{PSENet only} & 0.71 fps \\ \hline \textbf{DBNet only} & 4.20 fps \\ \hline \textbf{Jiang et al. only} & 2.73 fps \\ \hline \textbf{Jiang et al.+KCF} & 106 fps \\ \hline \textbf{Jiang et al.+SAMF} & 5.38 fps \\ \hline \end{tabular} \caption{Speed compared on different baselines for video scene text detection.} \label{t3} \end{table} \subsubsection{Qualitative Analysis} FIGURE \ref{fig-quality} illustrates some qualitative results of \textbf{Jiang et al. only} trained by raw videos and \textbf{Jiang et al.+SAMF} trained by mix videos on Text-RBL. For each video, we present the detection results of the raw video, blurry video, and low-resolution video from top to bottom. We can find that the baseline model \textbf{Jiang et al.+SAMF} trained by mix videos on Text-RBL performs better on challenging data compared with \textbf{Jiang et al. only} trained by raw videos. On some low-quality frames, \textbf{Jiang et al. only} even can not detect any scene text instances, as shown in FIGURE \ref{fig-quality}. This once again demonstrates the validity of the proposed Text-RBL dataset. \section{Future Work} Benefiting from our proposed semi-automatic labeling strategy and paired low-quality scene text video generation method, we can easily obtain a large number of low-quality scene text videos with annotations in the future. A large number of low-quality scene text videos with annotations are very useful and urgently needed in the field of text recognition. We can use paired videos to improve the performance of the text recognition network. \section{Conclusion} In this paper, in order to release the human, material, and financial resources brought by the annotation of scene text videos, a semi-automatic labeling strategy based on tracking is proposed. The text instances in the first frame are manually labeled, which are used to initialize the trackers, and the trackers automatically label the text instances in the subsequent frames. Moreover, a novel and challenging scene text video dataset is proposed, consisting of raw videos, blurry videos, and low-resolution videos, named Text-RBL. In addition, we propose a baseline combining the text detection and tracking into a unified framework with a failure detection scheme for video scene text detection. The extensive experiments on Text-RBL demonstrate that baselines especially those trained on low-quality videos perform favorably against detection only methods not only on accuracy but also on speed. It is necessary and urgent to propose such a challenging scene text video dataset with effective annotation. \bibliographystyle{IEEEtran}
\section{Introduction} \label{sect:intro} Astronomical transient phenomena, particularly, the ones occurring in extragalactic galaxies usually indicate an extremely huge energy release as a result of catastrophic collapses of massive stars or binaries. Specifically, supernovae (SNe) are undoubtedly the most representative of such transients, which are the primary targets of many current wide-field surveys. Thanks to these modern surveys with their tight cadences, a huge diversity has appeared in the distribution of all SN-like transients in the space of peak luminosity and emission timescale. It is then discovered that some unusual fast optical transients (FOTs) can rise and decline significantly from view in a few days or weeks, which is much more rapider than the typical SNe \citep{Drout2014ApJ...794...23D,Prentice2018ApJ...865L...3P,Pursiainen2018MNRAS.481..894P,Perley2019MNRAS.484.1031P,McBrien2019ApJ...885L..23M,Chen_2020,Gillanders2020MNRAS.497..246G,Prentice2020A&A...635A.186P}. Such fast evolving behaviors indicate that these FOTs probably have origins very and even intrinsically different from normal SN explosions. In any case, within the basic framework of the stellar explosion, the short duration of FOTs could indicate that their progenitors are compact objects or ultra-stripped stars, because the explosion of these stars can naturally produce a low-mass ejecta of a short photon diffusion timescale \citep{Yu_2015}. The most famous FOT is undoubtedly the kilonova AT2017gfo, which was discovered in the follow-up observations of the gravitational wave (GW) event on 17 August 2017 and had played a crucial role in localizing and identifying the origin of the GW signal \cite[NSs; ][]{2017PhRvL.119p1101A,Andreoni2017PASA...34...69A,Arcavi2017Natur.551...64A,Chornock2017ApJ...848L..19C,Coulter2017Sci...358.1556C,Cowperthwaite2017ApJ...848L..17C,Drout2017Sci...358.1570D,Evans2017Sci...358.1565E, Kasliwal2017Sci...358.1559K,Lipunov2017ApJ...850L...1L,Nicholl2017ApJ...848L..18N,Pian2017Natur.551...67P,Smartt2017Natur.551...75S,Tanvir2017ApJ...848L..27T,Troja2017Natur.551...71T,Utsumi2017PASJ...69..101U, Valenti2017ApJ...848L..24V}. Such kilonova emission was first predicted by \cite{Li1998ApJ...507L..59L} and elaborately described by \cite{Metzger2010MNRAS.406.2650M}, as a promising electromagnetic counterpart of a GW event. Following these pioneering works, it is widely suggested that the AT2017gfo emission can be powered by the radioactive decay of heavy r-process elements synthesized during the merger of compact objects \citep{Kasen2017Natur.551...80K,Metzger2017LRR....20....3M}. However, from the detailed modeling of the AT2017gfo data, it can be found that the preconceived radioactive explanation is actually very questionable \citep{LiSZ2018ApJ...861L..12L}. Instead, an extra energy source is necessarily required, which can even be dominant over the radioactive power \citep{Yu2018ApJ...861..114Y,LiSZ2018ApJ...861L..12L}. Specifically, such an extra energy source can be provided by a remnant massive NS formed from the merger, as previously suggested by \cite{Yu2013ApJ...776L..40Y} and \cite{Metzger2014MNRAS.439.3916M}. The existence of such a post-merger massive NS in the GW170817 event has further been supported by the works of \cite{Piro2019MNRAS.483.1912P} and \cite{Ren2019ApJ...885...60R}. Fairly speaking, it is not very surprising to find a long-lasting energy engine from an FOT, since such an engine has been widely used to explain some extreme transient phenomena (see \cite{2019AIPC.2127b0024Y} for a brief review), such as superluminous SNe \citep{Woosley2010ApJ...719L.204W,Kasen_2010,Dexter_2013} and gamma-ray bursts \citep{Dai1998a,Dai1998b,Dai2004ApJ...606.1000D,Dai20061127,Yu2010ApJ...715..477Y}. Just following this knowledge, it has been previously suggested by \cite{Yu_2015} that, at least, the FOTs of an ultrahigh luminosity are very likely to be powered by a central engine, where the luminosity is too high to be explained by the radioactive scenario even though all of the explosively-ejected material is supposed to be radioactive. Generally, the nature of the central engine of an FOT could be a spinning-down neutron star (NS) or a fallback accretion onto a compact object, which can evolve from different progenitors. Recent years, the implementation of modern surveys and the discovery of AT 2017gfo has effectively promoted the discovery of a lot of luminous FOTs \citep{McBrien2019ApJ...885L..23M}, among which SN 2019bkc/ATLAS19dqr is the most rapidly declining one that was discovered by Asteroid Terrestrial-impact Last Alert System \cite[ATLAS; ][]{Tonry_2018,Chen_2020}. This source is the focus of this paper, because of its unprecedented magnitude decline after the peak. In about four days, the luminosity of SN2019bkc decayed by a half. This decline rate is very close to the situation of AT2017gfo \citep{Chen_2020,Prentice2020A&A...635A.186P}. In principle, such a rapid evolution can appear in some ultra-stripped SNe \citep{Tauris2013ApJ...778L..23T} or in the shock breakout emission of some normal or failed SNe, which are however disfavored by the un-association of SN 2019bkc with a host galaxy. Therefore, following the considerations in \cite{Yu_2015} and \cite{Yu2018ApJ...861..114Y}, here we would like to connect SN 2019bkc with a compact object progenitor and model its temporal evolution with a central engine. It is expected that an implication for the origin of SN 2019bkc could be found from the properties of the engine and the explosion ejecta. \section{Modeling the temporal evolution of SN 2019bkc} \label{sect:Mod} \subsection{Model description} For a hot explosion ejecta of a mass $M_{\rm ej}$ and a radius $R$, the bolometric luminosity of its thermal emission, which is determined by the heat diffusion in it, can be roughly estimated by \citep{Kasen_2010,Kotera2013MNRAS.432.3228K,Yu_2015} \begin{eqnarray} L_{\rm bol}\sim\frac{cE_{\rm int}}{{R_{\rm }\tau}}(1-e^{-\tau}), \end{eqnarray} where $c$ is the speed of light, $E_{\rm int}$ is the internal energy of the ejecta, and $\tau=3\kappa M_{\rm ej}/4\pi R^2$ is the optical depth with $\kappa$ being the opacity. This expression combines two asymptotic properties of the emission as $L_{\rm bol}= cE_{\rm int}/( R\tau)$ for $\tau\gg 1$ and $L_{\rm bol}= cE_{\rm int}/R$ for $\tau \ll1$. The evolution of the internal energy is simultaneously determined by the energy conversation as \begin{eqnarray} \frac{ d E_{\rm int}}{d t} = L_{\rm ce} +L_{\rm rad}- L_{\rm bol}- 4\pi R_{\rm }^2 pv_{\rm } ,\label{Eint} \end{eqnarray} where $L_{\rm ce}$ and $L_{\rm rad}$ are the heating rate due to the central engine and the radioactivity, respectively, $p=\frac{1}{3}(E_{\rm int}/{\frac{4}{3}}\pi R_{\rm }^3)$ is the radiation-dominated pressure, and $v$ is the expansion velocity of the ejecta which determines the ejecta radius by $dR=vdt$. The expansion velocity can in principle be increased, because of the increase of the kinetic energy $E_{\rm k}$ of the ejecta through the work by the pressure. For the radioactive power, if it is dominated by the decay of nickels as usual as for typical SNe, then the corresponding heating rate can be given by \citep{Colgate1980ApJ...237L..81C,Arnett1980} \begin{equation} L_{\rm rad,Ni}=M_{\rm Ni}[(\epsilon_{\rm Ni}-\epsilon_{\rm Co})e^{-t/\tau_{\rm Ni}} + \epsilon_{\rm Co}e^{-t/\tau_{\rm Co}} ], \end{equation} where $M_{\rm Ni}$ is the total mass of $^{56}$Ni, $\epsilon_{\rm Ni}=3.90\times10^{10}{\rm erg~s^{-1}g^{-1}}$ and $\epsilon_{\rm Co}=6.78\times10^{9}{\rm erg~s^{-1}g^{-1}}$, and $\tau_{\rm Ni}=8.76$ days and $\tau_{\rm Co}=111.42$ days are the lifetimes of the radioactive elements. Alternatively, if the dominant radioactive elements are r-process elements as for typical kilonovae, then we should employ \citep{Korobkin2012MNRAS.426.1940K} \begin{equation} L_{\rm rad,R}=4\times10^{18}M_{\rm ej}\left[{\frac{1}{2}}-{\frac{1}{\pi}}{\rm arctan}\left({\frac{{t-t_0}}{\sigma}}\right)\right]^{1.3}\rm erg~s^{-1},\label{Lrpro} \end{equation} with $t_0=1.3$ s and $\sigma=0.11$ s. Meanwhile, the central engine of the FOT can also have two representative natures including (i) a spinning-down NS, which is usually considered to spin at a near-Keplerian frequency and be highly magnetized, and (ii) an accretion of fallback material onto the central compact object. In the former case, the spin-down luminosity of the NS can be estimated by its magnetic dipole radiation power as usual as \citep{1983bhwd.book.....S} \begin{eqnarray} L_{\rm sd}=L_{\rm sd,i}\left(1+{\frac{t}{t_{\rm sd}}}\right)^{-2}. \label{spindown} \end{eqnarray} In the later case, as usual, we assume simply the accretion luminosity to be proportional to the accretion rate and then have \citep{Piro2011ApJ...736..108P} \begin{eqnarray} L_{\rm ac}=L_{\rm ac,\max}\left[\left({\frac{t}{t_{\rm ac}}}\right)^{-1/2}+\left({\frac{t}{t_{\rm ac}}}\right)^{5/3}\right]^{-1} \label{fallback}. \end{eqnarray} Here, the characteristic luminosity $L_{\rm sd,i}$ or $L_{\rm ac,\max}$ and timescale $t_{\rm sd}$ or $t_{\rm ac}$ are taken as free parameters in our calculations. It should be pointed out that, when we use $L_{\rm sd}$ or $L_{\rm ac}$ to determine the energy injection rate $L_{\rm ce}$ in Equation (\ref{Eint}), an extra factor of $\xi$ should be multiplied, the value of which is in principle determined by the thermalization efficiency of the energy and also influenced by the possible anisotropic distribution of the energy outflow. After the bolometric luminosity of the FOT is given, a black-body effective temperature can be given by \begin{eqnarray} T_{\rm BB}=\left(\frac{L_{\rm bol}}{4\pi R_{\rm ph}^2\sigma}\right)^{1/4}, \end{eqnarray} which is crucial for determining the radiation spectrum and then the chromatic luminosities for different filters, where $\sigma$ is the Stefan-Boltzmann constant and $R_{\rm ph}$ is the photospheric radius. Following \citet{Arnett1982ApJ...253..785A}, we define the photospheric radius by \begin{equation} R_{\rm ph}=R_{\rm }-\frac{2}{3}\lambda,\label{rph} \end{equation} where $\lambda(t)=1/\kappa\rho(t)$ is the mean free path of photons. Obviously, the motion of the photosphere due to the expansion of the ejecta is dependent on the material distribution in the ejecta (see \citealt{Liu_2018} for a general investigation). For simplicity, we adopt the single power-law density profile in our calculations. \begin{equation} \rho(r,t)=\rho(R_{\rm i},0)\left[\frac{R_{\rm i}-R_{\rm min,i}}{R_{\rm}(t)-R_{\rm min}(t)}\right]^3 x^{\rm -\delta}, \end{equation} where $R=R_{\rm i}+v_{\rm}t$ and $R_{\rm min}=R_{\rm min,i}+v_{\rm min}t$ are the outmost and inmost radius of the ejecta with $R_{\rm i}$ and $R_{\rm min,i}$ being their initial values, the dimensionless radius is defined as $x\equiv(r-R_{\min})/(R-R_{\min})$. For such a velocity distribution, the relationship between the leading velocity and the kinetic energy can be written as $v_{\rm }=(2I_{\rm M}E_{\rm k}/I_{\rm K}M_{\rm ej})^{1/2}$ with $I_{\rm M} =\frac{1}{3-\delta}$ and $I_{\rm K} =\frac{1}{5-\delta}$. Finally, when the value given by Eq. (\ref{rph}) is smaller than $R_{\min}$, we artificially take $R_{\rm ph}=R_{\min}$. \subsection{Fitting results} \begin{figure} \centering \includegraphics[scale=0.6]{ms2021-0028fig1a.eps} \includegraphics[scale=0.6]{ms2021-0028fig1b.eps} \caption{Observational constraints on the model parameters for the spinning-down NS (top) and fallback accretion (bottom) models.} \label{fig:C} \end{figure} \begin{table} \centering \caption{Parameter Values} \begin{tabular}{cccc} \hline \hline Parameters & Units & Spinning-Down NS & Fallback Accretion\\ \hline $L_{\rm ce,i}$&$\rm erg~s^{-1}$& $9.43_{-0.87}^{+0.44}\times10^{47}$ & $9.54_{-2.40}^{+0.36}\times10^{48}$ \\ $t_{\rm sd}~{\rm or}~ t_{\rm ac}$&$\rm s$ & $4.34_{-0.10}^{+0.23}\times10^{2}$ & $34.40_{-0.78}^{+6.70}$ \\ $\rm M_{\rm ej}$&$\rm M_{\odot}$ & $0.35_{-0.02}^{+0.02}$ & $0.28_{-0.02}^{+0.01}$ \\ $\kappa$&$\rm cm^2g^{-1}$ & $0.06_{-0.01}^{+0.01}$ & $0.07_{-0.01}^{+0.01}$ \\ $E_{\rm k}$&$\rm 10^{49}erg$ & $4.32_{-1.88}^{+1.20}$ & $5.62_{-0.67}^{+0.29}$ \\ $\delta$ & $-$ & $0.96_{-0.06}^{+0.03}$ & $0.99_{-0.01}^{+0.00}$ \\ \hline \end{tabular} \label{parameters} \end{table} SN 2019bkc was found to be associated with a galaxy group at redshift $\sim 0.02$ corresponding to a distance of 89.1 Mpc. This determines its peak luminosity to be around $10^{42}\rm erg ~s^{-1}$, which is comparable to that of AT 2017gfo and difficult to be accounted for by a radioactive power. On the one hand, as discussed for AT 2017gfo in \cite{LiSZ2018ApJ...861L..12L}, if the SN 2019bkc emission is purely powered by the decays of r-process elements, then its ejecta mass should be as high as $\sim\rm 1.0M_{\odot}$ by according to Equation (\ref{Lrpro}). Simultaneously, the opacity is required to be as low as $\sim 0.03\rm cm^2g^{-1}$, in order to explain the rise time of the emission on the order of a few days by the photon diffusion timescale as $t_{\rm d}=(3\kappa M_{\rm ej }/4\pi v c)^{1/2}$. However, in contrast, the typical ejecta masses due to the NS-NS or NS-BH mergers are only around $M_{\rm ej}=10^{-4}-10^{-2}\rm M_\odot$ \citep{Hotokezaka2013PhysRevD.87.024001} and the corresponding opacity is expected to reach $\sim 10-100\rm cm^2g^{-1}$ due to the synthesis of lanthanides \citep{tanaka2013ApJ...775..113T}. Therefore, the SN 2019bkc emission cannot be powered by the decays of r-process elements. On the other hand, SN 2019bkc is also unlikely to be purely powered by the decay of $^{56}$Ni. This is not only because of the unreasonably high requirement on the mass of $^{56}$Ni, which is comparable to or even higher than the total mass of the ejecta, but also because the decline time of the emission is actually shorter than the lifetime of $^{56}$Ni. Therefore, it is reasonable and necessary to invoke a central engine for explaining the emission characteristics of SN 2019bkc, which has also been previously suggested by \cite{Yoshida2019RNAAS...3..112Y}. Then, by confronting the engine model with the multi-color observational data of SN 2019bkc, we constrain the model parameters by using the Markov Chain Monte Carlo (MCMC) method \citep{GW2010CAMCS...5...65G}. After 5000 steps with 40 ``walkers", we present the parameter constraints in Fig. \ref{fig:C} for both models of a spinning-down NS and a fallback accretion. The constrained parameter values are listed in Table. \ref{parameters}. Here, besides the central engine, a radioactive power of an amount of 0.002$\rm M_{\odot}$ $^{56}$Ni is still considered, which is necessary for explaining the three late points in $i$ band \citep{Chen_2020}. For the best-fit parameters, we present the fittings of multi-color light curves of SN 2019bkc in Fig. \ref{fig:mag}. It is showed that both models can in principle be consistent with the observational data. The primary deviation of the models from the data appears in the $i$ band. The later the time is, the more serious the deviation will be. This is obviously due to the fact that the de facto emission spectrum can deviate from the black-body spectrum more and more, as the ejecta gradually becomes transparent. This complexity of the emission spectra can be clearly seen from the almost overlap between the $r$ and $i$ data. \begin{figure} \centering \includegraphics[scale=0.45]{ms2021-0028fig2a.eps} \includegraphics[scale=0.45]{ms2021-0028fig2b.eps} \caption{Fittings to the multi-color light curves of SN 2019bkc with the spinning-down NS model (left) and the fallback accretion model (right) for the best-fit parameters. The data are taken from \citep{Chen_2020} and \citep{Prentice2020A&A...635A.186P}. The time origin is set at 2019-02-26 04:48:00 UT (JD 2458540.70).} \label{fig:mag} \end{figure} Based on the fitting results, if the engine is a spinning-down NS, then we can derive the initial spin period and the dipole magnetic field of the NS to be \begin{eqnarray} P_{\rm i}=14.9 \xi^{1/2}L_{\rm sd,i,47}^{-1/2}t_{\rm sd,3}^{-1/2}\rm ms=7.4\xi^{1/2}\rm ms, \end{eqnarray} and \begin{eqnarray} B_{\rm p}=2.2\times10^{16}\xi^{1/2}L_{\rm sd,i,47}^{-1/2}t_{\rm sd,3}^{-1}\rm G=1.6\times10^{16}\xi^{1/2}\rm G, \end{eqnarray} according to the expressions of $\xi L_{\rm sd,i}=9.4\times10^{47}\rm erg~s^{-1}$ and $t_{\rm sd}=4.3\times10^{2}\rm s$. This result indicates the post-explosion NS is a millisecond magnetar as expected if $\xi \sim \mathcal O(0.1)$, which is well consistent with the previous results found in \cite{Yu_2015} for the PS1 transients. Here the value of $\xi$ could be much smaller than 1 because of the following reasons. (i) Drawing lessons from gamma-ray busts and superluminous supernovae, the wind driven by a millisecond magnetar could be highly anisotropic. The majority energy could be collimated within a small cone around the rotational axis and would not influence the thermal emission of the isotropic ejecta. (ii) The energy released from the isotropic wind component could be partially reflected back into the magnetar wind \citep{Metzger2014MNRAS.439.3916M}. (iii) The energy finally injected into the ejecta can only be absorbed and thermalized in the ejecta with a limited efficiency, which is specifically determined by the emission spectrum of the magnetar wind and the energy-dependent opacity of the ejecta \citep{Yu2019ApJ...877L..21Y}. Alternatively, if the engine is a fallback accretion, the maximum accretion rate and the total mass of the fallback material can be estimated to \begin{eqnarray} \dot{M}_{\rm ac,\max}=L_{\rm ac,\max}/c^2=5.3\times10^{-6}\xi^{-1}\rm M_{\odot}s^{-1}, \end{eqnarray} and \begin{eqnarray} M_{\rm f}\sim\dot{M}_{\rm ac,\max}t_{\rm ac} =1.8\times10^{-5}\xi^{-1}\rm M_{\odot}. \end{eqnarray} Meanwhile, the density of the fallback material before it falls back can be estimated to \begin{eqnarray} \rho_{\rm f}\sim {(G t_{\rm ac}^2)^{-1}}=1.3\times10^{4}\rm g~cm^{-3}, \end{eqnarray} since the accretion timescale can be roughly given by the freefall timescale as $t_{\rm ac}\sim (G\rho_{\rm f})^{-1/2}$. By combining the values of $M_{\rm f}$ and $\rho_{\rm f}$, we can further obtain the length-scale of the fallback material as \begin{eqnarray} R_{\rm f}\sim \left(\frac{3M_{\rm f}}{4\pi \rho_{\rm f}}\right)^{1/3}\sim 1.9\times10^8 \xi^{-1/3}\rm cm, \end{eqnarray} which is just smaller than and somewhat comparable to the typical radius $\sim 10^4$ km of white dwarfs \citep{1983bhwd.book.....S}. \section{Conclusion and Discussions} \label{sect:discussion} In this paper, we demonstrate that the fast-evolving luminous emission of SN 2019bkc can be well explained by an explosion that ejects a mass of $\sim\rm0.3M_{\odot}$ and is lastingly powered by a central engine. The progenitor of SN 2019bkc is unlikely to be a massive star, because of the deficiency of hydrogen and oxygen features in the spectra and its un-association with a host galaxy. Therefore, the ultra-stripped SN model \citep{Tauris2013ApJ...778L..23T} and the SN shock breakout model are somewhat disfavored. Then, as an alternative natural consideration, the hostlessness of SN 2019bkc could be explained by a NS-NS binary progenitor, the merger of which could lead to the formation of a massive millisecond magnetar. However, this scenario is seriously challenged and even can be ruled out by the required very high mass of the ejecta, even though the ejecta mass can be somewhat increased by a long-lived post-merger NS \citep{Radice2018ApJ...869L..35R}. In comparison, a WD-involved progenitor could be a better choice. Nevertheless, the requirements on the central engine and the ejecta mass still rule out the possibility that SN 2019bkc is a SN ``.Ia" explosion due to helium-shell detonations on the surface of a sub-Chandrasekhar mass WD \citep{Bildsten2007ApJ...662L..95B,Shen2010ApJ...715..767S}. Alternatively, SN 2019bkc could originate from the collapse/disruption of a WD, specifically, (i) an accretion-induced collapse of a WD \citep{Canal1976A&A....46..229C,Ergma1976AcA....26...69E,Dessart_2006,Yu2019ApJ...877L..21Y,Yu2019ApJ...870L..23Y}, (ii) a merger of a WD with a NS or a stellar-mass black hole \cite[BH; ][]{Metzger2012MNRAS.419..827M,McBrien2019ApJ...885L..23M}, and (iii) the tidal disruption of a WD by a BH of an intermediate mass of $\sim 10^{2.5}\rm M_{\odot}$ \citep{Kawana2020ApJ...890L..26K}. Fairly speaking, the last scenario could be most likely to generate a sufficiently heavy ejecta. However, it is not sure whether such a system can exist far away from galaxies. In view of this, the existence of a NS in the binary could still be very helpful for understanding the hostlessness of SN 2019bkc, due to the possible high kick velocity of the NS that can lead the binary system to depart from the center of the host before the final merger happens. Therefore, the merger of a WD and a NS could be the most promising origin of SN 2019bkc. After the merger, the remnant NS can have been accelerated to spin at a near-Keplerian frequency due to the accretion of material from the companion WD. Simultaneously, the magnetic field has also been amplified. Then, the transient emission can be primarily powered by the spin-down of this newborn millisecond magnetar. This possible origin of SN 2019bkc makes it similar to another FOT, SN2018kzr, which was discovered by \cite{McBrien2019ApJ...885L..23M}. Two open questions still exist. (i) It is not sure whether the WD-NS merger model can explain the Ca-rich lines in the later spectra of SN 2019bkc \citep{Prentice2020A&A...635A.186P}, in view of that very different abundances of $^{40}$Ca have been obtained in different simulations of WD-NS mergers. For example, \cite{Margalit2016MNRAS.461.1154M} found that $^{40}$Ca is the most abundant isotopes in a merger of a NS and a helium WD, the mass of which can be not much lower than 0.01$\rm M_{\odot}$. On the contrary, \cite{Zenati2019MNRAS.486.1805Z} claimed that the ejecta of a WD-NS merger should be calcium-deficient. (ii) The energy injected into the explosion ejecta from the central engine is usually considered to be in the form of high-energy photons such as X-rays that are emitted from the engine outflow. Then, after the ejecta became transparent, this high-energy emission of a luminosity of $10^{40}-10^{41}\rm erg ~s^{-1}$ for months should in principle be detected on the SN 2019bkc's distance. In other words, as argued by \cite{Prentice2020A&A...635A.186P}, the detection of possible X-ray emission can provide a test of the existence of the central engine. However, in fact, a precise prediction of this high-energy emission is actually very dependent on the shock interaction between the engine outflow and the explosion ejecta and also the uncertain shock microphysics. Sometimes, the emission of the engine outflow could be primarily in the UV band and the X-ray emission can be suppressed by an order of magnitude relative to the total power \citep[e.g., see Section 3 in][]{Yu2019ApJ...877L..21Y}. \begin{acknowledgements} The authors appreciate the anonymous reviewer for helpful comments, Ping Chen and Subo Dong for providing the data, Ziqian Liu for support in computation, and Jinping Zhu, Aming Chen, Liang-Duan Liu, and Jianfeng Liu for their discussions. This work is supported by the Ministry of Science and Technology of the People's Republic of China (2020SKA0120300) and the National Natural Science Foundation of China (Grant Nos. 11822302 and 11833003). \end{acknowledgements}
\section{Introduction} The mapping class group of a subshift was introduced in \cite{Bo02a}, and studied extensively in \cite{BoCh17} (also see \cite{ScYa21}). By embedding suitable groups as subgroups, it was in particular shown that this group is non-amenable and not residually finite. It was asked in \cite[Question~6.3]{BoCh17} whether this group is sofic. We show that solving this question would necessarily solve an open problem: If the group is shown sofic, then so is Thompson's group $V$ (and even the Brin-Thompson group $2V$), which is open. If the group is shown non-sofic, then in particular there is a non-sofic group, which is open. The embedding also shows that the mapping class group of a mixing SFT is not locally embeddable in finite groups, since $V$ is not (since it is finitely presented, infinite and simple). \begin{theorem} \label{thm:V} Thompson's group $V$ embeds in the mapping class group of the vertex shift defined by the matrix $\left[\begin{smallmatrix} 1 & 1 & 0 \\ 1 & 1 & 1 \\ 1 & 1 & 1 \\ \end{smallmatrix}\right]$. \end{theorem} This is equivalently the subshift $X \subset \{0,1,2\}^\mathbb{Z}$ with the single forbidden pattern $02$. \begin{theorem} \label{thm:2V} The Brin-Thompson group $2V$ embeds in the mapping class group of the vertex shift defined by the matrix $\left[\begin{smallmatrix} 1 & 1 & 1 & 0 & 0 & 0 \\ 1 & 1 & 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 & 1 & 1 \\ 0 & 0 & 0 & 1 & 1 & 0 \\ 0 & 0 & 0 & 1 & 1 & 1 \\ 0 & 1 & 1 & 0 & 0 & 0 \\ \end{smallmatrix}\right]$. \end{theorem} \section{Definitions} We use standard terminology and notation for words and (regular) languages. The \emph{empty word} is $\epsilon$. See \cite{LiMa95} for definitions of SFTs and vertex shifts. Briefly, a \emph{subshift} is a set of bi-infinite words (or \emph{points} or \emph{configurations}) defined by a set of forbidden finite subwords, an \emph{SFT} is one where this set is finite, and a \emph{vertex shift} is one where the words all have length $2$. A vertex shift can be seen as the set of bi-infinite paths in a graph (which we represent by its adjacency matrix). The \emph{language} of a subshift is the set of finite subwords of its configurations. An SFT is \emph{mixing} if for some $n$, for any two $u, v$ that appear in its language, also $uwv$ does, for some word $w$ with $|w| = n$. The following is Thompson's group $V$. \begin{definition} \label{def:V} Thompson's group $V$ is the group of homeomorphisms $f : \{0,1\}^\mathbb{N} \to \{0,1\}^\mathbb{N}$ such that for some $n \in \mathbb{N}$, there exists a function $F : \{0,1\}^n \to \{0,1\}^*$ such that $f(ux) = F(u)x$ for all $u \in \{0,1\}^n, x \in \{0,1\}^\mathbb{N}$. \end{definition} The following is the Brin-Thompson $2V$ \cite{Br04a}. \begin{definition} \label{def:2V} The Brin-Thompson group $2V$ is the group of homeomorphisms $f : (\{0,1\}^\mathbb{N})^2 \to (\{0,1\}^\mathbb{N})^2$ such that for some $n \in \mathbb{N}$, there exist functions $F_i : (\{0,1\}^n)^2 \to \{0,1\}^*$ such that $f((ux, vy)) = (F_1(u, v)x, F_2(u, v)y)$ for all $u,v \in \{0,1\}^n, x,y \in \{0,1\}^\mathbb{N}$. \end{definition} Let $X$ be a subshift. The \emph{mapping torus} $\mathbf{S}X$ is the quotient of $X \times \mathbb{R}$ by the equivalence relation $\cong$ defined by $(x, t) \cong (\sigma^n(x), t-n)$ for each $x \in X$, $n \in \mathbb{Z}$. Write $[x, t]$ for the equivalence class of $(x,t)$. The path components of this space are the orbits of the $\mathbb{R}$-flow $r + [x, t] = [x, t+r]$, i.e.\ the equivalence classes of the sets $\{x\} \times \mathbb{R}$. Self-homeomorphisms of $\mathbf{S}X$ map orbits onto orbits. Just like in the case of subshifts, points of the mapping torus are called \emph{points} or \emph{configurations}. Write $\mathcal{F}(X)$ for the subgroup of homeomorphisms which preserve the natural orientation of each orbit. For $f,g \in \mathcal{F}(X)$ say $f$ and $g$ are \emph{isotopic} if there exists a continuous map $h: [0,1] \times \mathbf{S}X \to \mathbf{S}X$ such that $f(x) = h(0,x)$ and $g(x) = h(1,x)$ for all $x \in \mathbf{S}X$, and $x \mapsto h(t,x)$ is in $\mathcal {F}(X)$ for all $t \in [0,1]$. The following is the Boyle-Chuysurichay mapping class group \cite{Bo02a,BoCh17}. \begin{definition} Let $X$ be a subshift. The \emph{mapping class group} $\mathrm{MCG}(X)$ is the quotient of the group $\mathcal{F}(X)$ under isotopy. \end{definition} We think of an element of the mapping torus as a concatenation (without gaps) of length-$1$ intervals labeled with a symbol from the alphabet, and the flow is the shift map on such unions. The word \emph{tile} refers to a tuple of consecutive such intervals. Concretely, tiles represent (finite subintervals of) paths in the mapping torus, whose labels traverse the corresponding cylinder in the subshift, or more abstractly the thicket of all paths traversing this cylinder. In our proofs, we refer to tiles by simply writing the word read from the labels of the intervals. When thinking of words like this, we refer to their subwords (with positions) as \emph{pieces}, with the understanding that the ``piece'' $v$ in $uvw$ refers to the geometric subtile corresponding to the word $v$, starting at coordinate $|u|$, even if $v$ appears multiple times in $uvw$. In practice, we define elements of the mapping class group by describing the ``rewrites'' that are performed in a configuration of the mapping torus. We use a discrete rule to split a configuration into a concatenation of tiles, and then use a rule to determine what tiles we replace them by. If the replacements use words of different lengths, we interpolate linearly, i.e.\ the flow over a tile is decelerated or accelerated on the image side; formally, this simply means that the cocycle of the mapping class group element takes on nontrivial values. We refer to this as \emph{distortion}. See \cite{BoCh17} and its references for more details on discretization of mapping class groups. \section{Veelike actions} \begin{definition} Let $L \subset A^*$ be a language and $G$ a group. An action $G \curvearrowright L$ is \emph{veelike} (or $G$ acts veelike) if for all $g \in G$ there exists $n \in \mathbb{N}$ such that for all $u \in A^*$ with $|u| = n$ there exists $u' \in A^*$ such that $guv=u'v$ for all $uv \in L$. \end{definition} This description determines a function $F : A^n \to A^*$ called the \emph{local rule} of $g$. \begin{theorem} \label{thm:Veelike} Suppose $G$ admits a faithful veelike action on $L \subset A^*$. Let $X \subset (A \cup \{\#\})^\mathbb{Z}$ be the smallest subshift containing every configuration of the form \[ \ldots w_{-2} \# w_{-1} \# w_0 \# w_1 \# w_2 \# \ldots \] with $w_i \in L$. Then $G$ embeds in $\mathrm{MCG}(X)$. \end{theorem} \begin{proof} Let $g \in G$, and $F : A^n \to A^*$ be the local rule for some $n \in \mathbb{N}$. For all $u \in A^*$ with $|u| \leq n$, inside every block $\#u\#$ map the piece $\#u$ onto a word $\# g \cdot u$, stretching linearly. The leftmost point of the leftmost $\#$-piece is called an \emph{anchor}. Configurations where the anchor is at the origin are not fixed (no non-trivial mapping class group element on $X$ fixes an open set if $L$ is infinite), but intuitively we think of these positions as fixed: rewrites do not touch these positions, and the linear distortion in the flow from rewrites with different word lengths does not affect them either. For $uv \in A^*$ with $\#uv$ where $|u| = n$, inside occurrences of $\#uv\#$ map the piece $\#u$ linearly onto $\# (g \cdot u)$. Note that $u$ or $g \cdot u$ may be the empty word, but this poses no problem, as the words $\# u$ and $\# (g \cdot u)$ nevertheless have positive length. Finally, fix all $A$-symbols to the left of which no anchor appears in the preceding $n+1$ steps in the flow. This rule determines a mapping class group element $\hat g \in \mathcal{F}(X)$ This mapping is clearly bijective on the flow orbits: to the right of any $\#$ we exactly simulate the action of $f$ (and when $\#$s do not appear on the left, the configuration is fixed). The map $g \mapsto \hat g$ is faithful because on the periodic flow orbit with repeating pattern $\# u$, $u \in A^*$, the action of $\hat G$ simulates the orbit of $u$ in the action of $G$. It is a homomorphism because if $g_n \circ \cdots \circ g_1 = \mathrm{id}_L$ then $\hat g_n \circ \cdots \circ \hat g_1$ performs, on the level of symbols, the identity transformation between any two $\#$s (because the $V$-action on finite-support configurations cancels) and also to the right of every rightmost $\#$-symbol. There can be a leftover distortion in the flow, but we can use the occurrences of the anchors to indeed ``anchor'' an isotopy from $\hat g_n \circ \cdots \circ \hat g_1$ to the identity map, i.e.\ our flow can act independently in the segment to the right of an anchor (up to the next anchor or until we reach content that was not reached by the rewrites), and we simply observe that the set of self-homeomorphisms of the interval $[0,r]$ fixing $0$ is path connected. \end{proof} In the case where $X$ happens to be a mixing SFT (like in our application), one need not construct the isotopy explicitly, as it is known that any mapping class group element that fixes all flow orbits is isotopic to the identity \cite[Theorem~3.19]{BoCh17}, and it is much easier to see that flow orbits are fixed than to write out the explicit formulas for the isotopy. \begin{theorem} \label{thm:VlikeV} Thompson's group V admits a faithful veelike action on the regular language $L = \epsilon + (0 + 1)^*1$. \end{theorem} \begin{proof} Let $X_0 = \{x \in \{0,1\}^\mathbb{N} \;|\; \sum_i x_i < \infty\}$. Define a map $\phi : L \mapsto X_0$ by \[ \phi(\epsilon) = 0^\mathbb{M}, \;\; \phi(w) = w 0^\mathbb{N}, \] and observe that this is a bijection. The formula $f \cdot w = \phi^{-1}(f(\phi(w)))$ defines an action of V on $L$. This action is veelike: suppose $f \in V$, and let $n \in \mathbb{N}$ and $F$ be as in Definition~\ref{def:V}. If $|w| \geq n+1$ and $w \in L$ then $w = uv1$ for some $|u| = n$. Then $f \cdot w = \phi^{-1}(f(uv10^\mathbb{N})) = \phi^{-1}(F(u)v10^\mathbb{N}) = F(u)v1$. Thus, picking the same $n$ and $u' = F(u)$ for all $u \in \{0,1\}^n$, we obtain that the action is veelike. Faithfulness is obvious. \end{proof} \section{Veelike actions on pair languages} With only small notational changes, we can generalize the previous section to ``pair languages'', i.e.\ languages of pairs of words. A \emph{pair language} is a subset of the \emph{word pairs} $A^* \times B^*$, where $A$ and $B$ are finite alphabets. Let $\alpha_n : A^* \times B^* \to A^* \times B^*$ be the prefix extraction map $\alpha_n(ux, vy) = (u, v)$ where $|u| \leq n \wedge (|u| = n \vee x = \epsilon)$, and $|v| \leq n \wedge (|v| = n \vee y = \epsilon)$. Write $A^{\leq n} = \{w \in A^* \;|\; |w| \leq n\}$. We have $\alpha_n(A^* \times B^*) = A^{\leq n} \times B^{\leq n}$. Concatenation of words pairs is performed coordinatewise. Define $\omega_n : A^* \times B^* \to A^* \times B^*$ by taking the tails after removing the $\alpha_n$-prefix, i.e.\ $\omega_n(u, v) = (u',v') \iff \alpha_n(u, v) \cdot (u', v') = (u,v)$. \begin{definition} Let $L \subset A^* \times B^*$ be a pair language and $G$ a group. An action $G \curvearrowright L$ is \emph{veelike} (or $G$ acts veelike) if for all $g \in G$ there exists $n \in \mathbb{N}$ and a \emph{local rule} $F : L \cap (A^{\leq n} \times B^{\leq n}) \to A^* \times B^*$ such that $g \cdot (u, v) = F(\alpha_n(u, v)) \cdot \omega_n(u)$, where by $F(\alpha_n(u, v))$ we mean the two components of $\psi_n(u, v)$ are given as parameters to $F$. \end{definition} Denote by $u^R$ the reversal of words, i.e.\ the function satisfying $a^R = a$ for $|a| \leq 1$ and $(u \cdot v)^R = v^R \cdot u^R$ for all words $u, v$. \begin{theorem} \label{thm:Veelike2} Suppose $G$ admits a faithful veelike action on a pair language $L \subset A^* \times B^*$ where $A \cap B = \emptyset$. Let $X \subset (A \cup B \cup \{\#, @\})^\mathbb{Z}$ be the smallest subshift containing every configuration of the form \[ \ldots u_{-1} @ v_{-1} \# u_0 @ v_0 \# u_1 @ v_1 \# u_2 @ v_2 \ldots \] with $(u_i^R, v_i) \in L$, where $(u_i, v_i) \in L$. Then $G$ embeds in $\mathrm{MCG}(X)$. \end{theorem} \begin{proof} This is exactly analogous to Theorem~\ref{thm:Veelike}. Near each occurrence of $@$, read the (beginnings of the) words $u_i$ and $v_i$ on the left and right, for $n$ steps or until another $\#$ is reached. Perform the substitution given by the local rule $F$ and interpolate linearly, the midpoint of the $@$-piece taking the role of the special fixed point. \end{proof} \begin{theorem} \label{thm:Vlike2V} The Brin-Thompson group $2V$ admits a faithful veelike action on the pair language $(\epsilon + (0 + 1)^*1)^2$. \end{theorem} \begin{proof} This is exactly analogous to the case of $V$. We simply identify a pair of words $(u, v)$ with $(\phi(u), \phi(v))$, where $\phi : L \to X_0$ is the map from the proof of Theorem~\ref{thm:VlikeV}, and conjugate the natural action of $2V$ through this bijection. \end{proof} \section{The main results} The language where $V$ acts is not just regular, but it is \emph{locally $2$-testable}, meaning the inclusion of a word depends only on its subwords and its prefixes and suffices of length $2$. In this case, the subshift in the statement of Theorem~\ref{thm:Veelike} is clearly of finite type. Now Theorem~\ref{thm:V} is a matter of composing the lemmas. We include a technical fact about the embedding, which is of symbolic dynamical interest. See \cite{BoCh17} for the definition of the Bowen-Franks representation. \begin{theorem} \label{thm:V} Thompson's V embeds in the mapping class group of the vertex shift defined by the matrix $\left[\begin{smallmatrix} 1 & 1 & 0 \\ 1 & 1 & 1 \\ 1 & 1 & 1 \\ \end{smallmatrix}\right]$. The image of this embedding is in the kernel of the Bowen-Franks representation. \end{theorem} \begin{proof} The vertex shift is simply the subshift from Theorem~\ref{thm:Veelike} when applied to the language defined in Theorem~\ref{thm:VlikeV}, if we set $\# = 2$ and columns and rows are indexed with $0,1,2$ in this order. To see that the image is in the kernel of the Bowen-Franks representation, simply observe that it is, by definition, some representation of the mapping class group by automorphisms of a finitely-generated abelian group. Finitely-generated abelian groups are residually finite, and the automorphism group of a finitely-generated residually finite group is residually finite \cite{Ba63}, so the finitely-generated infinite simple group $V$ must have a trivial representation. \end{proof} \begin{theorem} \label{thm:2V} The Brin-Thompson group $2V$ embeds in the mapping class group of the vertex shift defined by the matrix $\left[\begin{smallmatrix} 1 & 1 & 1 & 0 & 0 & 0 \\ 1 & 1 & 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 & 1 & 1 \\ 0 & 0 & 0 & 1 & 1 & 0 \\ 0 & 0 & 0 & 1 & 1 & 1 \\ 0 & 1 & 1 & 0 & 0 & 0 \\ \end{smallmatrix}\right]$. The image of this embedding is in the kernel of the Bowen-Franks representation. \end{theorem} \begin{proof} This exactly analogous to the case of $V$. Rename the symbols $0,1$ in the leftmost component of $(\epsilon + (0 + 1)^*1)^2$ from Theorem~\ref{thm:Vlike2V} to $0_A, 1_A$ and the ones in the rightmost component to $0_B, 1_B$. Now taking the dimensions to represent $0_A, 1_A, @, 0_B, 1_B, \#$ in this order, the subshift in Theorem~\ref{thm:Veelike2} is the vertex shift corresponding to this matrix. Again the fact the image is in the kernel of the Bowen-Franks representation is automatic, since $2V$ is a finitely-generated infinite simple group. \end{proof} The symbol $\#$ is not really used, but we feel this additional separator clarifies the situation. The separator $@$ inside a word pair is important, since the anchor needs to be inside a symbol that is never removed in situations where either the leftmost or rightmost word becomes empty, for linear stretching to be meaningful. \section{Discussion and questions} Given a language $L \subset A^*$, one can consider the \emph{veelike group of $L$}, the largest group that faithfully acts veelike on it, namely the group of all bijections $g : A^* \to A^*$ such that there exists $n \in \mathbb{N}$ such that for all $u \in A^*$ with $|u| = n$ there exists $u' \in A^*$ such that $guv=u'v$ for all $uv \in L$. Thompson's $V$ embeds in the veelike group of $(0+1)^*1$ by Theorem~\ref{thm:VlikeV} but this embedding is not surjective onto the veelike group, since for example the involution mapping $\epsilon \leftrightarrow 1$ (and fixing other words) does not come from Thompson's $V$. It does not seem easy to determine the soficity of the veelike group on any regular language of exponential growth, in particular that of $A^*$ seems closely related to Thompson's $V$. \begin{theorem} The mapping class group of every positive entropy sofic shift $X$ contains the veelike group of $A^*$, for every finite alphabet $A$. \end{theorem} \begin{proof} Pick mutually unbordered words $u_\#$ and $u_a$ for $a \in A$ in the language of $X$, all of the same length, so that each of these words maps to the same element of the syntactic monoid, and $u_\#^*$ (thus any concatenation of the words $u_i$) is contained in the language of $X$. The existence of such a set of words follows by standard arguments. The proof of Theorem~\ref{thm:Veelike} goes through almost directly, pretending the word $u_i$ is the corresponding letter $i$, and fixing the contents of a configuration when no $u_i$-word is nearby. There are some subtleties when the coding breaks, i.e.\ when a concatenation of $u_i$s is followed on the left or right by something other than another word $u_j \in U$. If the coding breaks on the left, we simply do not modify the configuration. If the coding breaks on the right, then we act as if this breaking point begins another $u_\#$-word. \end{proof} Due to the above discussion, although we do not know how to embed $V$, it seems likely that the soficity of the mapping class of any positive entropy sofic shift is difficult to determine. We suspect that the veelike group of every regular language of polynomial growth is sofic, and that the mapping class group of every countable sofic shift is sofic (the automorphism group of every countable sofic shift, as a topological dynamical system, is known to be amenable). \begin{question} Does Thompson's $V$ embed in the full veelike group of $A^*$ for a finite alphabet $A$? \end{question} One can ask whether the Brin-Thompson group $2V$ (or higher groups $nV$) embeds in the veelike group of $A^*$ for a finite alphabet $A$. One can of course formulate a natural notion of the veelike group of a pair language (or even an $n$-tuple language), and we do not know whether $nV$ can act faithfully on a $k$-tuple language for $k < n$. \begin{question} Does Thompson's $V$ embed in the mapping class group of a full shift? Does the Brin-Thompson $2V$? \end{question} \begin{question} Does the higher-dimensional Thompson groups $3V$ embed in the mapping class group of a mixing SFT? Higher $nV$? \end{question} \section*{Acknowledgements} We thank Mike Boyle for several useful comments and corrections on a preliminary draft. The author was supported by Academy of Finland project 2608073211. \bibliographystyle{plain}
\section{Introduction} Doped and intrinsic semiconducting single-wall carbon nanotubes (s-SWNTs) are considered as promising materials for electronics-~\cite{Bishop2020, Koo2017}, sensors-~\cite{Chen2016}, photonics-~\cite{Avouris2008, He2018, Ishii2018}, photovoltaic-~\cite{Ren2011, Kubie2018, Jain2012} and bioimaging-applications~\cite{Danne2018, Farrera2017, Pan2017}. Such broad interest can be attributed to favorable charge carrier transport properties, large exciton and trion (charged exciton) oscillator strengths and near infrared photoluminescence (PL). However, optical applications generally suffer from small photoluminescence quantum yields (PLQYs) on the order of one percent as well as from short excited state lifetimes. Both of these reflect the efficiency of non-radiative (NR) decay~\cite{Wang2004, Carlson2007, Hertel2010, Crochet2007}. This represents a particular challenge for applications which utilize the conversion of excited state energy into photons or dissociated charges and motivates research into the origins and detailed mechanisms of NR decay. Broadly speaking, the decay of excited states in extended systems can be classified as homogeneous, {\it i.e.} the same for all excited states or as inhomogeneous, {\it i.e.} dependent on the excited state localization and location. The latter is a reflection of imperfections in the real world and may become prevalent, for example when the lattice symmetry of periodic systems is broken by impurities or by interactions with an environment, as in the case of carbon nanotubes. Regardless, the NR decay of excitons and trions in carbon nanotubes has frequently been described by homogeneous models. These include couplings between bright excitons, dark excitons, trions and the ground state on the basis of unimolecular- or in the case of high excitation densities, bimolecular rate-constants~\cite{Wang2004b, Berciaud2008, Koyama2013, Nishihara2013, Akizuki2014}. Other studies have favored an inhomogeneous description, specifically regarding the mechanism of NR exciton decay \cite{Hertel2010, Eckstein2017, Ishii2019}. Such models were particularly successful in describing the dependence of fluorescence quantum yields in SWNTs on nanotube length~\cite{Miyauchi2010, Hertel2010, Ishii2015, Graf2016, Ishii2019}, the effect of impurities on PL-imaging of SWNTs~\cite{Crochet2012, Hartmann2015} or the influence of diffusive exciton transport on NR decay observed in time-domain investigations of exciton dynamics \cite{Russo2006,Langlois2015,Zhu2007,Wang2017,Eckstein2017}. Moreover, localization of excess charge carriers has also been instrumental for the interpretation of Breit-Wigner-Fano resonances in the IR spectra of doped SWNTs \cite{Lapointe2012,Eckstein2021}. Here, we present findings in favor of inhomogeneous NR decay of excitons and trions in doped s-SWNTs. The discussion thus evolves around the role of charged impurity sites for the dynamics of excitons and of trions. It a) provides evidence for excitons being scavenged by stationary impurities, b) allows to predict the dependence of the exciton PLQY on the doping level, c) shows that exciton scavenging, confinement, trion states and NR decay are associated with the same charged impurity sites and lastly d) reveals that trions are not exclusively populated by exciton scavenging but also by direct optical excitation of their manifold. \section{Discussion} Figure \ref{fig1}a) shows a waterfall plot of absorption spectra from a suspension of {\it p}-doped (6,5) s-SWNTs with doping levels increasing from top to bottom. The first subband $X_1$ exciton band at 1.239\,eV looses practically all of its oscillator strength while becoming broader, more asymmetric and shifting to higher energies by about 70\,meV before disappearing into a broad and featureless absorption background at the highest doping levels \cite{Eckstein2017, Eckstein2019}. Changes in the second subband range are considerably more subtle. The exciton $X_2$ at 2.158\,eV appears to split into two features, one of which undergoes similar blue-shift as the $X_1$ band, while the other seems to acquire most of the oscillator strength and shifts to slightly lower energies. Absorption spectra also feature a trion band $X_1^+$ at 1.058\,eV emerging at intermediate doping levels. The latter is generally considered a hallmark for the presence of excess charge carriers in doped semiconductors as is the decrease of exciton oscillator strength~\cite{Huard2000, Esser2001}. \begin{figure}[htbp] \centering \includegraphics[width=8.4 cm]{fig1.pdf} \caption{{\bf Absorption and photoluminescence of {\it p}-doped SWNTs.} {\bf a)} Waterfall plot of absorption spectra from a suspension of doped (6,5) s-SWNTs, starting with an intrinsic sample on top and ending with a degenerately doped sample at the bottom. {\bf b)} Waterfall plot with normalized photoluminescence spectra of the same sample, corresponding to the doping levels indicated by the orange spectra in {\bf a)}. {\bf c)} Change of the total PL intensity $I_{\rm PL}$ (top panel) and the relative contributions of exciton and trion signals to $I_{\rm PL}$ (bottom panel).} \label{fig1} \end{figure} The effect of doping on NR exciton and trion decay is most evident from the PL spectra of Figure \ref{fig1}b) with an expanded view of the first subband range from 0.9 to 1.4\,eV. Here, PL spectra are normalized to the same overall PL intensity to facilitate a closer inspection of changes in the shape and relative intensity of emission bands. The dramatic decrease of photoluminescence with increasing doping level can be seen in Figure \ref{fig1}c) where we have plotted the normalized total PL signal as a function of gold(III) chloride dopant concentration (upper panel). The lower panel shows the relative contributions of the trion and exciton PL to the total PL signal. In molecular systems, the simultaneous emission of light from a set of strongly coupled electronic states is excluded by Kasha's rule. This is a reflection of the short time-scale for relaxation within such a set of excited states, if compared to the decay of the lowest optically allowed state. Here, this rule is not obeyed because of the very short lifetime of the trion state (see discussion further below) and also because of the diffusion-limited relaxation of the exciton state, which effectively results in slow population transfer between excited states. Thus, exciton- and trion bands may show up simultaneously in PL spectra as seen in Figure \ref{fig1}b). Interestingly, the exciton emission band shows no significant blue shift in the doping range over which the absorption band is found to shift by 12\,meV. This is difficult to reconcile with a homogeneously broadened exciton band and we take this as further evidence of inhomogeneous doping. This interpretation is based on the notion that excitons which are more strongly confined by closely spaced impurities are also more strongly blue shifted in absorption \cite{Eckstein2019}. At the same time these excitons also decay more rapidly due to their proximity to quenching impurities, thus becoming practically imperceptible in PL spectra. The result is that PL spectra are dominated by emission from weakly confined excitons that are not blue-shifted, need more time to diffuse to a quenching site and thus have a higher probability for radiative decay. This interpretation is in line with previous findings showing that the rate of NR exciton decay is determined by the rate at which excitons diffuse to the nearest, charged impurity site \cite{Eckstein2017}. According to this view, excitons between closely spaced impurities will thus experience a greater confinement-induced blue shift while at the same time being more strongly coupled to NR decay channels at the charged impurity sites \cite{Eckstein2017, Eckstein2019, Hertel2019}. The doping-induced changes of absorption and emission spectra are summarized in Figure \ref{fig2}. This includes normalized data sets for the change of absorbance at the energy of the second subband exciton, the change of first subband exciton and trion oscillator strengths, and the change of their PL signals. Noteworthy is the clear correlation of the decrease of the $X_1$ exciton oscillator strength $f(X_1)$ with the rise of trion oscillator strength $f(X_1^+)$ seen in Figure \ref{fig2}b) and d). Exciton oscillator strengths have in the past thus also been used as proxy for assessing doping levels \cite{Eckstein2019}. The data of Figure \ref{fig2} was used for calculation of the normalized exciton PLQY as well as of the relative PLQY of the trion shown in Figure \ref{fig3}. These yields are plotted as a function of gold(III) chloride concentration (top axis) and $X_1$ exciton oscillator strength (bottom axis). The steep initial decrease of the exciton PL in Figure \ref{fig3}a) with doping- or impurity-level concentration $n_i$ then allows to assign an experimental sensitivity of the exciton PL signal to the concentration of excess charge carriers of $\Phi(f_{X_1})/\Phi_0\approx 10\, n_i\,\rm nm $. Here, $\Phi(f_{X_1})/\Phi_0$ is the normalized change of exciton PLQY. A PL change of 1\% thus corresponds to $n_i\approx 10^{-3}\,\rm nm^{-1}$. Next, we investigate the decrease of the PL quantum yield with oscillator strength seen in Figure \ref{fig3}a). To this end, we again test whether the view of an inhomogeneously doped system, with impurity sites capturing charges in the low doping regime, can account for the observed effects. The dependence of PLQYs on doping levels would then have to be modeled by the rate at which excitons diffuse to charge impurities where NR decay is most likely to occur \cite{Hertel2010}. Such diffusion-limited quenching of excitons has previously also been used to describe the dependence of PLQYs on nanotube length in intrinsic s-SWNT samples \cite{Hertel2010, Liu2011} where nanotube ends are assumed to act as quenching impurities. \begin{figure}[htbp] \centering \includegraphics[width=8.4 cm]{fig2.pdf} \caption{{\bf Overview of doping induced spectral changes.} Normalized {\bf a)} absorbance at the peak of the second subband exciton, {\bf b)} oscillator strength of the first subband exciton, {\bf c)} PL signal intensity of the first subband exciton, {\bf d)} oscillator strength of the first subband trion and {\bf e)} PL signal intensity of the first subband trion. The doping level increases from weak on the left to degenerate doping levels on the very right.} \label{fig2} \end{figure} Accordingly we here describe PLQYs in doped s-SWNTs using a similar model. The rate of NR decay is determined by the time required for excitons to diffuse to an impurity site. The distance between charged impurity sites is designated by $d_i$. This can be related to the charge carrier concentration $n_i$ by $d_i=n_i^{-1}$. Moreover we assume that impurities reduce the nanotube exciton oscillator strength by an amount proportional to the impurity size $\Delta_i$. We can then relate the oscillator strength $f_{X_1}$ to impurity distances by $f_{X_1}=d_i/(d_i+\Delta_i)$. The normalized changes of exciton PLQY can then be cast into the simple form \begin{equation} \frac{\Phi(f_{X_1})}{\Phi_0}=\left[1+\frac{d_0(1-f_{X_1})}{\Delta\, f_{X_1}}\right]^{-2} \label{eq1} \end{equation} where $d_0$ is the distance of quenching sites for intrinsic s-SWNTs and $\Phi_0$ is the PLQY of the intrinsic nanotube. The square root dependence of diffusion length on diffusion time is here reflected by the squared term on the right hand side. If we account for the stochastic distribution of impurity spacings around a mean value $\bar d_i=n_i^{-1}$ we obtain best agreement with experimental data for $d_0/\Delta_i =25\pm 4$, see red curve in Figure \ref{fig3}. Using previously reported values of the impurity size $\Delta_i$ of $\approx 4\,\rm nm$ \cite{Eckstein2017,Eckstein2019Eckstein2021}, would yield an average impurity spacing in the intrinsic s-SWNTs of $d_0\approx 100\,\rm nm$, in good agreement with previous estimates~\cite{Cognet2007, Hertel2010, Xie2012, Siitonen2010, Georgi2009}. A simple fit of equation \ref{eq1} to experimental data would yield an unlikely small value $d_0/\Delta_i =14\pm 2$. This underscores the importance of accounting for the stochastic nature of the impurity site distribution when modelling diffusion limited NR decay \cite{Liu2011}. By contrast, PL from the trion state is considerably weaker than that of the $X_1$ exciton, reaching only about 1/40 of the PL intensity from intrinsic nanotubes. This may be interpreted as an exceedingly small PLQY on the of $10^{-4}-10^{-3}$, reflecting the small fraction of photons emitted with respect to the number of photons absorbed. However, we caution that this may be misleading if considering the intrinsic PLQY of the charged impurity, because trions at impurity sites can possibly be excited indirectly through exciton scavenging as well as directly by light absorption. The above PLQY is thus only a global yield that may have limited value when trying to assess the likelihood of NR decay of a directly excited trion state. Accordingly, changes of the global trion PLQY seen in Figure \ref{fig3}b) may be affected by a number of processes such as the exciton scavenging efficiency, the competition among scavenging impurity sites, changes in the character of impurity sites with increasing doping levels, etc. \begin{figure}[htbp] \centering \includegraphics[width=8.4 cm]{fig3.pdf} \caption{{\bf Dependence of exciton and trion PLQYs on dopant concentration and exciton bleach.} {\bf a)} Normalized change of the first subband exciton PLQY and {\bf b)} relative change of the first subband trion PLQY for excitation at 568\,nm. The blue line is a guide to the eye.} \label{fig3} \end{figure} \begin{figure}[htbp] \centering \includegraphics[width=8.4 cm]{fig4.pdf} \caption{{\bf Exciton and trion dynamics.} {\bf a)} Semi-log plot of the normalized exciton photo bleach in intrinsic (solid black markers) and doped samples (brown to orange) as well as of the trion state in a moderately doped sample (blue markers). The sample was excited at 576\,nm. {\bf b)} The same as in {\bf a)} but without the trion signal and plotted as a function of $\sqrt{t}$. The linear decay in this representation here indicates that the kinetics are diffusion-limited with characteristic diffusion times of $(20.4\pm 0.4)$, $(14.1\pm 0.3)$, $(5.5\pm 0.1)$, and $(1.9\pm 0.1)$\,ps for the intrinsic and weakly doped samples respectively. {\bf c)} Semi-log plot of the trion bleach for two excitation wavelengths, resonant with the exciton at $1000\,\rm nm$ (open markers) and with the trion band at $1170\,\rm nm$ (solid markers). The linear decay in the degenerate pump-probe scheme can be characterized by a decay time of 0.49\,ps.} \label{fig4} \end{figure} For additional insights into NR exciton and trion decay we thus turn to femtosecond time-resolved pump-probe experiments which provide more direct information on excited state dynamics. Figure \ref{fig4}a) shows pump-probe traces from excitons in intrinsic and {\it p}-doped nanotubes as well as the trion decay in a moderately doped sample up to 100\,ps time-delay. The data representation in this semi-log plot clearly reveals that exciton dynamics can not be described by a monoexponential decay, contrary to predictions from band-filling models of doped SWNTs \cite{Kinder2008,Perebeinos2008,Sau2013}. In contrast, the linear decay of pump-probe traces with $\exp(-\sqrt{t/\tau_D})$ seen in Figure \ref{fig4}b), illustrates that NR exciton decay follows diffusive kinetics, with $\tau_D$ representing the diffusion time~\cite{Hertel2010, Wang2017, Bai2018}. \begin{figure}[htbp] \centering \includegraphics[width=8.4 cm]{fig5.pdf} \caption{{\bf Correlation of impurity concentrations introduced by doping, as obtained from exciton dynamics and from its bleach.} The vertical axis represents impurity concentrations $n_{q}$ obtained for {\it p-}doped (6,5) s-SWNTs using exciton dynamics and measured diffusion times. The horizontal axis represents impurity concentrations $n_c$ obtained from the exciton confinement model and the associated bleach. The linear correlation up to concentrations of about $0.015\,\rm nm^{-1}$ indicates that quenching and confining impurities are identical.} \label{fig5} \end{figure} Exciton decay in the intrinsic sample (black markers) can be characterized by a diffusion time of $(20.4\pm 0.4) \,\rm ps$. This corresponds to a diffusion length of about 150\,nm, roughly consistent with nanotube lengths or $d_0$ the intrinsic impurity spacing introduced above. Increasing slopes of pump-probe traces at higher doping levels clearly illustrate that the kinetics remain diffusive but accelerate, as spacings between quenching sites decrease accordingly. As seen for resonant excitation of the trion state, the pump-probe trace in Figure \ref{fig4}c) follows unimolecular kinetics with a characteristic rate-constant of $2.0\rm \,ps^{-1}$ (solid circles). This is in good agreement with time-resolved experiments by \citeauthor{Koyama2013,Nishihara2013} and \citeauthor{Akizuki2014}\cite{Koyama2013,Nishihara2013,Akizuki2014} For resonant excitation of the exciton, the trion still exhibits a unimolecular but somewhat slower decay. This illustrates two important effects: a) excitation at the exciton band energy leads to some indirect population of the trion state, possibly through the aforementioned exciton scavenging mechanism and b) the dynamics of the trion does not appear to be subject to a stretched recovery of the ground state, at least not to the extent that this affects the photo-bleach of the exciton band in Figure \ref{fig4}a). This has previously been interpreted in terms of a partially decoupled ground state of the trion state \cite{Eckstein2017} and is taken as further evidence of the localized nature of this manifold. Next, we use changes of the exciton energy and characteristic diffusion times to calculate impurity concentrations within the confinement- and diffusion-limited quenching-models \cite{Eckstein2017,Eckstein2019}. The confinement model relates the exciton energy shift to its confinement length $d_c$ as described by \citeauthor{Eckstein2019} \cite{Eckstein2019} The diffusion-limited quenching-model relates the NR exciton decay of Figure \ref{fig4}b) to diffusion lengths $d_q$ \cite{Eckstein2017} using an averaged diffusion coefficient $D$ of $(9\pm 2)\,\rm cm^2\,s^{-1}$ \cite{Hertel2010,Crochet2012}. The inverse of these length scales can be identified with the concentrations of additional confinement impurities $n_c$ and of additional quenching impurities $n_q$ introduced by doping. A plot of $n_q$ versus $n_c$, shown in Figure \ref{fig5} reveals a good linear correlation of the two quantities up to impurity concentrations of about $0.015\,\rm nm^{-1}$. This suggests that both types of impurities, those that are associated with exciton confinement and those which are attributed to quenching sites are in fact identical. This is taken as further evidence for the co-localization of trion states in s-SWNTs with positively or negatively charged impurities. Such trion localization is consistent with the temperature-independence of trion PL as observed by \citeauthor{Mouri2013}~\cite{Mouri2013} Deviations from the linear behavior in Figure \ref{fig5} at higher carrier concentrations likely arise from interactions between impurity sites. \section{Conclusions} In conclusion, we found that the decay of excitons and trions in doped (6,5) carbon nanotubes is dominated by non-radiative quenching at charged impurity sites which appear to be co-localized with sites of trion state formation. Evidence for this is obtained from the dependence of exciton PLQYs and exciton confinement on the doping levels as well as from pump-probe spectroscopy of excited state dynamics. The kinetics of exciton decay has been described as diffusion-limited, with the rate of diffusive transport of excitons to charged impurity sites governing the rate of energy dissipation. This is confirmed by both, the dependence of the exciton PLQY on impurity concentrations as well as by the stretched character of exciton pump-probe traces. The experiments also indicate that trions may be populated both, directly by optical excitation as well as indirectly by exciton scavenging. The relative likelihood of these two processes remains to be discovered by future experiments and their quantification will greatly benefit from improved signal-to-noise ratios in NIR pump-probe data. \section{Methods} Nanotube samples were fabricated as described previously~\cite{Eckstein2019} from organic (6,5) s-SWNT enriched suspensions of PFO-BPy polymer-stabilized (American Dye Source) CoMoCAT nanotubes (SWeNT SG 65, Southwest Nano Technologies Inc.). The s-SWNT thin-film samples used for the study of trion dynamics (Figure~4) were prepared by vacuum filtration from the same type of colloidal suspensions. Redox-chemical doping of s-SWNTs in suspension (5:1 toluene to acetonitrile solvent mixture) was achieved by titration of aliquots of gold(III) chloride (Sigma-Aldrich, $\geq$\,99.99\%) solution using the same solvent mixture, whereas s-SWNT film samples were doped by immersion into AuCl$_3$ solutions for 10 min. The description of the optical setups used for stationary and time-resolved absorption spectroscopy as well as for photoluminescence measurements (PL) can be found elsewhere \cite{Hartleb2015, Eckstein2017}. The detector setups used for near infrared time-resolved spectroscopy of the trion band were described by Shi et al. \cite{Shi2018}. \section{Acknowledgements} K. E. and T.H. acknowledge financial support by the German National Science Foundation through the DFG GRK2112 and through grant HE 3355/4-1.
\section{INTRODUCTION} Event cameras measure intensity changes in pixels and provide an asynchronous data stream at high speed (in the microseconds). This brings several potential advantages over traditional frame-based cameras such as high-dynamic range, no motion blur and low latencies. They have potential for novel robotics applications such as autonomous driving or flying robots with fast image motion or low-light settings. Significant progress has been made in developing approaches for camera motion estimation, depth reconstruction, and high dynamic image reconstruction with event-based cameras~\cite{gallego2020_evsurvey}. The measurement principle can also provide novel opportunities for 6-DoF object tracking which is still largely unexplored by the research community. In this paper, we propose a novel approach for 6-DoF object tracking with event cameras. Object pose tracking is an important perception capability in many robotics applications in dynamic scenes, for instance, for dynamic obstacle avoidance or robotic manipulation. In our tracking approach, we leverage a combination of event and frame-based camera measurements which can be obtained, for example, from event-based cameras such as the iniVation DAVIS camera that also provides intensity frame measurements, or by pairing an event camera with a frame-based camera. Our approach tracks objects with known shape which can be given by a mesh. We derive a probabilistic measurement model for the object's shape under rigid-body motion and track the motion of the object from the event stream using probabilistic inference. On a second optimization layer, we refine the tracked object poses using probabilistic direct image alignment in a window of frames captured by the camera at lower rates. We evaluate our approach on synthetic scenes with moving objects in indoor and outdoor scenarios and analyze the accuracy of our approach for 6-DoF pose tracking. We also demonstrate our approach in experiments with real data. \begin{figure*}[tb] \centering \includegraphics[width=0.49\linewidth]{figure/drawings/eventbasedtracking.pdf}\hfill \includegraphics[width=0.49\linewidth]{figure/drawings/framebasedtracking.pdf} \caption{Left: We track the motion of the object from the stream of events. We parametrize the motion using a cubic B-spline. The control poses are optimized based on a probabilistic generative event measurement model. The model predicts intensity changes using the object velocity and the intensity gradient in a reference frame. For computational efficiency, we accumulate $N$ consecutive events $e_i$ in event buffer frames. Right: We refine the object pose estimates of keyframes extracted from the images of a frame-based camera. We align the images photometrically at keypoints based on the known object shape and the estimated object poses. The latest keyframe and its estimated pose serves as reference for event-based tracking.} \label{fig:overview} \end{figure*} \section{Related Work} Event-based cameras have several potential advantages over frame-based cameras for tracking: They provide high temporal resolution in the microseconds, high dynamic range, and low power consumption~\cite{gallego2020_evsurvey}. Hence, methods for processing and interpreting event-streams have become a popular subject in computer vision and robotics research. While significant research has been devoted to localizing event cameras in a given 3D map or simultaneous localization and mapping (e.g.~\cite{kim2016_slamtracking,rebecq2017_evo}), only few works consider the problem of object tracking. Vasco et al.~\cite{vasco2017_evmodet} detect independent moving objects by tracking corners detected in event images integrated over short time windows. Mitrokhin et al.~\cite{mitrokhin2018_evmodt} estimate a warp field for the events in a time window using a 4-parameter global motion model. Using a time image representation, they segment events on moving objects which do not comply with the motion in the estimated background motion model. \cite{mitrokhin2019_evimo} train a neural network which predicts depth images, motion estimates and motion segmentation from integrated event images and their time image in a time window. Different to our tracking approach, these methods estimate the 2D motion of the object. Very recently, Dubeau et al.~\cite{dubeau2020_rgbde} extend a deep learning-based object tracker for RGB-D cameras by also incorporating events from an event camera for high-speed object tracking. In contrast to this learning-based approach, we model the measurement process in a probabilistic generative way and derive an optimization-based method which combines events and frames. This way, our approach is not limited by the variation of objects and scenes which are seen by a deep neural network during training. Some approaches for localization and mapping with event cameras have several similarities with our method. Kim et al.~\cite{kim2016_slamtracking} estimate 6-DoF camera motion, log intensity gradient and inverse depth using three decoupled probabilistic filters in real-time. Using the log intensity gradient, high-dynamic range log intensity frames can be recovered through convex optimization. The methods uses a probabilistic measurement model similar to ours which is derived from the event-generation process. For camera motion tracking, the method assumes depth and log intensity of the scene given from the other filtering steps and uses the estimates to raycast intensity changes in the camera motion estimate. These expected measurements are compared with the intensity changes detected by the events to filter the camera pose. In our approach, we also recover camera motion by coupling intensity gradient with optical flow and use a probabilistic filter to estimate the camera motion. Bryner et al.~\cite{bryner2019_eventbasedtracking} propose a method for tracking camera motion with regard to a static background which has been captured using an RGB-D camera. They also apply a variant of the generative event measurement model used in~\cite{kim2016_slamtracking} and our approach. Different to their method, we track and segment objects in the event stream. Moreover, we combine event and frame-based tracking in a two-layer optimization approach. \section{Method} We propose a novel approach which tracks the 3D motion of objects in a combined way from measurements of event and frame-based cameras. We formulate tracking as optimization using a probabilistic measurement model of the event generation process. In a second optimization thread, we refine the object poses in the image frames using direct image alignment. Fig.~\ref{fig:overview} illustrates the key steps of our method. The camera provides an asynchronous stream of event measurements together with a stream of intensity frames at a regular slower rate. We use both types of data for tracking the 6-DoF object motion. On a fast optimization layer, we fit an $SE(3)$ trajectory spline to the events measured on the object. We formulate event-based tracking as a probabilistic inference problem based on a generative model of the event measurement process. Inference is achieved by non-linear least squares to optimize the spline control poses. A second slower optimization layer refines the object poses in the intensity frames measured by the camera. To this end, we formulate the optimization again as a probabilistic inference, whereas now we measure the photometric alignment of the images using the object pose and shape in the frames. This optimization layer provides the reference object poses and intensity images for the event-based tracking layer. The event-based tracker on the other hand provides the frame-based optimization layer with initial poses of the objects in the frames and achieves higher frame-rate high-speed tracking. \subsection{Generative Event Model} We use two kinds of measurements models to explain the stochastic generative process underlying the events. \subsubsection{Intensity Change Measurement Model} Let $\mathbf{u}(t)$ be the image projection of 3D points in the scene. The image projection is changing over time due to the underlying motion of the camera or the object. Assuming the brightness of a 3D point observation in the image remains constant, the measured intensity at a corresponding pixel location at different time steps $t, t'$ stays equal, i.e. $L( \mathbf{u}(t), t ) = L( \mathbf{u}(t'), t' )$. Linearizing the log intensity image $L$ for the time using a first order Taylor approximation yields \begin{equation} L( \mathbf{u}(t+\delta t), t+\delta t ) \approx L( \mathbf{u}(t), t ) + \frac{\partial L}{\partial \mathbf{u}} \frac{\partial \mathbf{u}}{\partial t} \delta t + \frac{\partial L}{\partial t} \delta t. \end{equation} Hence, we obtain the optical flow constraint \begin{equation} \frac{\partial L}{\partial t}( \mathbf{u}(t), t ) + \nabla L( \mathbf{u}(t), t ) \dot{\mathbf{u}}(t) = 0 \end{equation} which relates the intensity change over time with the spatial intensity change and the optical flow in the image. Events measure intensity changes at pixels $\mathbf{u}$. By approximating the intensity change at a pixel \begin{equation} \Delta L( \mathbf{u}, t ) = L( \mathbf{u}, t ) - L( \mathbf{u}, t - \Delta t ) \approx \frac{\partial L}{\partial t}( \mathbf{u}(t), t ) \Delta t, \end{equation} we can rewrite the change using the optical flow constraint as $\Delta L( \mathbf{u}, t ) \approx - \nabla L(\mathbf{u}) \dot{\mathbf{u}} \Delta t$. This relation explains the intensity changes generating events by the component of the flow $\dot{\mathbf{u}}$ along the image gradient $\nabla L(\mathbf{u})$ in the time interval $\Delta t$~\cite{kim2016_slamtracking,bryner2019_eventbasedtracking}. The intensity change measurement model is \begin{equation} \label{eq:intchg_meas_model} y = C = -\nabla L(\mathbf{u}) \dot{\mathbf{u}} \Delta t + \delta, \end{equation} where $\delta \sim \mathcal{N}( 0, \mathbf{Q} )$ models measurement noise, and $C$ is the log intensity change for the event. The optical flow $\dot{\mathbf{u}}$ is determined by the camera velocity and the depth $d:=d(\mathbf{u})$ at the pixel $\mathbf{u}:=(x,y)^\top$~\cite{corke2013_rvc} \begin{multline}\arraycolsep=6pt B(\mathbf{u}) := \\ \left( \begin{array}{cccccc} -1/d & 0 & x / d & xy & -1-x^2 & y\\ 0 & -1/d & y/d & 1+y^2 & -xy & x\\ \end{array} \right). \end{multline} Since the event stream does not provide the image gradient directly, we determine the image gradient in a keyframe. The image gradient can be obtained from an intensity frame as measured for instance by a frame-based camera. In our experiments, we use the intensity frames measured concurrently with the events by a (simulated) DAVIS240C camera. The image gradient is determined by reprojecting the pixel with its raycasted depth on the object in the keyframe. \subsection{Event-based Object Tracking} We track the motion of the object using the asynchronous event stream. We choose to increase the computational efficiency and average over noisy individual event readings by buffering multiple events at the pixels over short time windows. We use a continuous SE3 spline to represent the object trajectory. The spline provides pose estimates at arbitrary continuous times with a small set of control poses which we leverage for the asynchronous event buffer frames. The spline also inherently regularizes the estimated trajectory to be smooth. We formulate a probabilistic optimization objective to fit the spline trajectory to the event stream. \subsubsection{Spline Trajectory Representation} We represent the time-continuous pose $\mathbf{T}(t) \in SE(3)$ at time $t \in \mathbb{R}^3$ with a cubic B-spline in cumulative form~\cite{patronperez2015_splinetraj}, \begin{equation} \mathbf{T}(t) = \exp\left( \log\left( \mathbf{T}_0 \right) \right) \prod_{k=1}^{K-1} \exp\left( \log\left( \mathbf{T}_{k-1}^{-1} \mathbf{T}_k \right) B_k(t) \right) \end{equation} where $\mathbf{T}_k$ are control poses at knot times $t_k$ and $B_k(t)$ are cumulative basis functions. \subsubsection{Event-based Trajectory Optimization} We optimize the spline segment of the four most recent control poses from all events in the segment. To increase computational efficiency and cancel noise due to the image discretization, we accumulate event buffer frames from the events in short time windows. \paragraph{Event Buffer Frames} We accumulate the intensity changes of $N$ consecutive events $e_0, \ldots, e_{N-1}$ in event buffer frames $F$. Events $e_i = ( x_i, y_i, \rho_i ) \in \mathcal{E}$ are generated at pixel $(x_i,y_i)$ and provide the sign $\rho_i$ of the log intensity change with magnitude $C$. Since we assume consecutive events, it holds $t_0 \leq \ldots \leq t_{N-1}$. Pixels $F( x, y )$ of the event buffer frame accumulate intensity changes \begin{equation} F( x, y ) = \sum_{\{e_i \in \mathcal{E} : (x_i,y_i) = (x,y)\}} \rho_i C. \end{equation} We refer to the time $t_0$ of the first event in the event frame buffer as its start time $t_F := t_0$ and $\Delta t_F := t_{N-1} - t_0$ is the time span of the events in the buffer. If $N$ events are accumulated, a new buffer is started. \paragraph{Trajectory Optimization} We optimize the control poses of the most recent spline segment when the segment is filled with event buffer frames, i.e. when the start time of the newest event buffer frame becomes later than the knot time $t_{K-2}$ of the second to last control pose $\mathbf{T}_{K-2}$. After optimization, we include a new control pose at a fixed time interval. The new segment shifted by a control pose is again optimized as soon as it is filled. We optimize the objective function \begin{equation} E( \mathbf{T}_{K-4}, \ldots, \mathbf{T}_{K-1} ) = E_{\mathit{data}} + \lambda_{\mathit{reg}} E_{\mathit{reg}} \end{equation} which consists of a data term $E_{\mathit{data}}$ and regularization term $E_{\mathit{reg}}$ with weighting factor $\lambda_{\mathit{reg}}$, which we derive from the maximum a posterior estimate of the control poses given the event buffer frame measurements and a regularizing prior on the object acceleration. The data log likelihood of the event buffer frames within the spline segment are determined by the probabilistic intensity change measurement in eq.~\eqref{eq:intchg_meas_model}, \begin{multline} E_{\mathit{data}} = \sum_{F \in \mathcal{F}} \sum_{\mathbf{u} \in \Omega} \frac{w_c^2}{w_c^2 + \left\| \nabla L(\mathbf{u}) \right\|_2^2} \\ \left\lVert \frac{F( \mathbf{u} )}{ \sqrt{ \sum_{\mathbf{u'} \in \Omega} \left(F( \mathbf{u}' )\right)^2 } } + \frac{\nabla L(\mathbf{u}) \dot{\mathbf{u}}(t_F) \Delta t_F}{\sqrt{ \sum_{\mathbf{u'} \in \Omega} \left( \nabla L(\mathbf{u}') \dot{\mathbf{u}'}( t_F ) \Delta t_F \right)^2 } } \right\rVert ^2 \end{multline} where $\mathcal{F}$ is the set of event buffer frames in the spline segment, $\Omega$ is the set of pixel coordinates in the image. We follow the approach of~\cite{bryner2019_eventbasedtracking} and normalize the intensity changes due to the unknown log intensity threshold $C$ of the camera in practice. Similar to~\cite{engel2018_dso}, we downweight pixels with high gradient where $w_c$ determines the strength of this factor. For evaluating the expected intensity changes $\nabla L(\mathbf{u})$, we use the last keyframe $I_{\mathit{KF}}$ and its pose from the frame-based photometric optimization layer, $\nabla_{\mathbf{u}} L(\mathbf{u}) \approx \nabla_{\mathbf{u}} L_{KF}( \tau( \mathbf{u}, \mathbf{T}(t_F) ) )$, where $L_{\mathit{KF}} = \log( I_{\mathit{KF}} )$. The event pixel location is projected to the keyframe as \begin{equation} \tau( \mathbf{u}, \mathbf{T}(t_F) ) = \pi\left( \mathbf{R}_F^{KF} \pi^{-1}\left( \mathbf{u}, d(\mathbf{u}, \mathbf{T}(t_F), \mathbf{\Phi} ) \right) + \mathbf{t}_F^{KF} \right), \end{equation} where $\pi$ and $\pi^{-1}$ project 3D coordinates to image pixels and vice versa using the known camera calibration, the latter requiring the depth at the pixel. We raycast the depth $d(\mathbf{u}, \mathbf{T}_F^{KF}, \mathbf{\Phi} )$ on the object shape in the given pose which can be differentiated for the pose as in~\cite{wang2020_directshape}. The shape is represented by the signed distance function $\mathbf{\Phi}$. 3D points in camera coordinates are transformed between the frames using the rotation $\mathbf{R}_F^{KF} \in SO(3)$ and translation $\mathbf{t}_F^{KF} \in \mathbb{R}^3$ of the $SE(3)$ transform $\mathbf{T}_F^{KF} = \mathbf{T}_{KF} \mathbf{T}(t_F)^{-1}$ determined from the object pose in the keyframe $T_{KF}$ and the spline. The acceleration prior $ E_{\mathit{reg}} = \sum_{F \in \mathcal{F}} \left\lVert \ddot{\mathbf{T}}(t_F) \right\rVert_2^2 $ favors constant velocity trajectories and is evaluated at the start times of the event buffer frames. We assume an initial guess of the object pose known with which we initialize the first four control poses. To this end, we use ground truth in our current implementation. Note that accurate frame-based object detection and pose estimation might also be used. \subsection{Keyframe-based Photometric Trajectory Optimization} A second layer optimizes for the poses of the keyframes which are used as reference for the event-based tracking. Based on the known object shape, we estimate object poses in the keyframes which best align the keyframe images photometrically. The tracked object pose from the event-based tracking layer is used to initialize the object pose in new keyframes. New keyframes are selected from the intensity frames based on thresholds on rotation and translation. We optimize the object trajectory in a window of recent keyframes and marginalize old keyframes that shift outside the window. \subsubsection{Photometric Alignment} The object pose is determined in the keyframes by photometric alignment between pairs of keyframes in the optimization window. From each keyframe, we extract ORB keypoints~\cite{rublee2011_orb} and limit computation to only those points which project within a soft silhouette mask of the object given its current pose estimate. Photometric residuals are computed at the remaining keypoints on the object to optimize for the object pose. \paragraph{Silhouette Projection} We adapt the projection function proposed by~\cite{prisacariu2012_segposerecon,dame2013_denserecon} \begin{equation} \sigma( \mathbf{\Phi}, \mathbf{u} ) = 1 - \prod_{\mathbf{p} \sim \mathcal{R}(\mathbf{u})} \frac{ \exp\left( \mathbf{\Phi}( \mathbf{p} ) \zeta \right) }{ \exp\left( \mathbf{\Phi}( \mathbf{p} ) \zeta \right) + 1} \end{equation} which projects the object shape, represented by the signed distance function $\mathbf{\Phi}$, into the image to find a smooth silhouette. The projection samples points $\mathbf{p}$ on the ray $\mathcal{R}(\mathbf{u})$ through the pixel $\mathbf{u}$ and evaluates a smooth indicator function for each point being inside or outside the object based on the signed distance function. We threshold at a specific value ($0.95$ in our experiments) and discard all ORB keypoints that project outside the object. \paragraph{Photometric Residuals} We formulate a photometric measurement model at the keypoints in each keyframe $I_i$ towards other keyframes $I_j$ \begin{equation} \label{eq:photometricerror} z = I_i( \mathbf{u} ) = I_j( \omega( \mathbf{u}, \mathbf{T}_i, \mathbf{T}_j ) ) + \epsilon \end{equation} where $\epsilon \sim \mathcal{N}( 0, \sigma_I^2 )$ is Gaussian noise and $\omega$ reprojects pixels $\mathbf{u}$ on the object from image $I$ to $I'$ based on the object shape and the poses $\mathbf{T}_i, \mathbf{T}_i$ of the keyframes. We reproject pixels through the warping function \begin{equation*} \omega( \mathbf{u}, \mathbf{T}_i, \mathbf{T}_j ) = \pi\left( \mathbf{R}_i^j \pi^{-1}( \mathbf{u}, d(\mathbf{u}, \mathbf{T}_i, \mathbf{\Phi} ) ) + \mathbf{t}_i^j \right). \end{equation*} Here, we use the $SE(3)$ transform $\mathbf{T}_i^j = \mathbf{T}_i \mathbf{T}_j^{-1}$ determined from the object poses in the frames to transform pixels. Keypoints are discarded which do not hit the object shape during raycasting for depth estimation. \subsubsection{Windowed Optimization} We formulate the optimization for the object poses in the keyframes as maximum a posteriori estimation using the probabilistic photometric measurement model \begin{equation} E\left( \{ \mathbf{T}_i \}_{i=0}^{M-1} \right) = \sum_{i=0}^{M-1} \sum_{j < i}\rho\left( I_i( \mathbf{u} ) - I_j( \omega( \mathbf{u}, \mathbf{T}_i, \mathbf{T}_j ) ) \right) \end{equation} where we determine photometric residuals from a keyframe to older keyframes, and $\rho$ is the robust Cauchy norm. For bounding the run-time complexity, the keyframe poses are optimized in a sliding window of a fixed number $W=7$ of keyframes similar to~\cite{leutenegger2015_okvis}. Information about old keyframes that drop out of the sliding window is marginalized in our probabilistic formulation. The optimization is triggered only if a new keyframe is inserted. Once the optimization converged, the last keyframe is passed to the event-based tracking layer as the new reference frame. \subsubsection{Keyframe Selection} We select the latest current frame as a new keyframe, if the translation or rotational distance travelled by the object according to the event-based tracking layer are larger than some thresholds. The pose of a new keyframe is initialized with the current tracked pose of the object by the event-based tracking. \begin{figure*}[tb] \centering \begin{subfigure}{.15\textwidth} \includegraphics[width=\linewidth]{figure/cracker_box/sliding/overlay_es.png}\\\vspace{-1.6ex} \includegraphics[width=\linewidth]{figure/cracker_box/sliding/overlay_gt.png} \end{subfigure} \begin{subfigure}{.15\textwidth} \includegraphics[width=\linewidth]{figure/cracker_box/falling/overlay_es.png}\\\vspace{-1.6ex} \includegraphics[width=\linewidth]{figure/cracker_box/falling/overlay_gt.png} \end{subfigure} \hspace{2ex} \begin{subfigure}{.15\textwidth} \includegraphics[width=\linewidth]{figure/tomato_can/dice/overlay_es.png}\\\vspace{-1.6ex} \includegraphics[width=\linewidth]{figure/tomato_can/dice/overlay_gt.png} \end{subfigure} \hspace{2ex} \begin{subfigure}{.15\textwidth} \includegraphics[width=\linewidth]{figure/audia4/turn_right4/overlay_es.png}\\\vspace{-1.6ex} \includegraphics[width=\linewidth]{figure/audia4/turn_right4/overlay_gt.png} \end{subfigure} \begin{subfigure}{.15\textwidth} \includegraphics[width=\linewidth]{figure/volkswagen/go_right4/overlay_es.png}\\\vspace{-1.6ex} \includegraphics[width=\linewidth]{figure/volkswagen/go_right4/overlay_gt.png} \end{subfigure} \caption{Estimated (top) vs. ground-truth trajectory (bottom) as image overlays for the YCB box object (left two columns: sliding, falling), the YCB can object (middle column: dice) and the two car sequences (right two columns). Time is visualized from red to blue for start to end. Our approach well recovers the ground-truth motion of the objects. } \label{fig:trajectoryoverlays} \end{figure*} \begin{figure}[tb] \centering \begin{subfigure}{.99\linewidth} \centering \includegraphics[width=0.3\linewidth]{figure/realdata/push_box/0002.png} \includegraphics[width=0.3\linewidth]{figure/realdata/push_box/0022.png} \includegraphics[width=0.3\linewidth]{figure/realdata/push_box/0052.png} \end{subfigure}\\\vspace{1ex} \begin{subfigure}{.99\linewidth} \centering \includegraphics[width=0.3\linewidth]{figure/realdata/rot_box/0002.png} \includegraphics[width=0.3\linewidth]{figure/realdata/rot_box/0022.png} \includegraphics[width=0.3\linewidth]{figure/realdata/rot_box/0037.png} \end{subfigure}\\\vspace{1ex} \begin{subfigure}{.99\linewidth} \centering \includegraphics[width=0.3\linewidth]{figure/realdata/circle_box/0002.png} \includegraphics[width=0.3\linewidth]{figure/realdata/circle_box/0040.png} \includegraphics[width=0.3\linewidth]{figure/realdata/circle_box/0102.png} \end{subfigure} \caption{Results on real data sequences with translational (top), rotational (middle) and circular motion (bottom). Left: start, right: end frame. Green shaded/axes: estimated object pose; red/blue points: positive/negative events. } \label{fig:realdataresults} \end{figure} \section{Experiments} We evaluate our approach for tracking accuracy on synthetic datasets where ground truth poses are available. We use the standard absolute trajectory (ATE) and relative pose error measures~\cite{sturm2012_iros} which evaluate the global alignment of the trajectory and drift, respectively. We evaluate RPE for $10,20,\ldots,50$\% sequence lengths of the full trajectory length in m. We obtain a single RPE measure by averaging results over all sequence lengths. Qualitative results can also be found in the supplementary video. Our synthetic sequences are generated with an event camera simulator~\cite{rebecq2018_cvsimulator} based on Blender. We generate sequences for 2 objects from the YCB set~\cite{calli2015_ycb} and 2 cars from the ShapeNet dataset~\cite{chang2015_shapenet}. For the YCB objects, we have 3 sequences each with falling, sliding and dice motion. The cars move either straight, turn left or turn right, whereas we use 3 different speed settings per sequence type. \subsection{Setup} The time span between knots in the spline is set to 15\,ms, and we set $\lambda_{\mathit{reg}} = 0.1$. The frame rate of the camera is 30\,Hz. For the YCB objects we accumulate $N=1500$ in each event buffer frame. We generate new keyframes after the object travelled a translational distance of 0.1\,m and a rotational distance of 5\,deg. The contrast weight factor $w_c$ is $0.005$. For the car objects we create the motions with 3 different speed levels. In the first level the average linear speed is about 1.25\,m/s. The second speed level is about 2.5\,m/s, and the third speed level is about 5\,m/s. The pose is initialized without noises. The translational distance of keyframes is 0.5\,m and the rotational distance is 10\,deg. We set the number of events per event buffer frame to $N=4000$. For the textureless car the contrast weight factor $w_c$ is 0.3 and for the textured one it is set to 0.1. \subsection{Results} \subsubsection{Synthetic YCB object sequences} Table~\ref{tab:accuracy_ycb} shows RPE and ATE results for the various sequences with the box and can YCB objects. The object maximum sizes are 0.3\,m and 0.45\,m. The camera is positioned above the objects. The average distance of the objects from the camera is 1.6\,m for the sequences. We observe that position and rotation of the objects are tracked by our approach at good accuracy on these sequences. Fig.~\ref{fig:trajectoryoverlays} depicts trajectory overlays of the estimates by our approach and the ground-truth. It can be seen that our approach well recovers the object motion. \begin{table*}[tb] \caption{Accuracy of trajectory estimates in relative pose (RPE) and absolute trajectory error (ATE) on YCB sequences. Our tracking approach recovers the object motion at good accuracy.} \label{tab:accuracy_ycb} \begin{center} \begin{tabular}{cccccccccc} \toprule & \multicolumn{3}{c}{transl. RMSE RPE in\,m} & \multicolumn{3}{c}{rot. RMSE RPE in\,deg} & \multicolumn{3}{c}{transl. RMSE ATE in\,m}\\ \cmidrule(lr){2-4} \cmidrule(lr){5-7} \cmidrule(lr){8-10} object & falling & sliding & dice & falling & sliding & dice & falling & sliding & dice\\ \midrule box & 0.086 & 0.056 & 0.024 & 5.196 & 5.686 & 3.840 & 0.064 & 0.028 & 0.012\\ can & 0.038 & 0.107 & 0.012 & 5.640 & 6.110 & 1.423 & 0.029 & 0.119 & 0.031 \\ \bottomrule \end{tabular} \end{center} \end{table*} \begin{table*}[tb] \caption{Accuracy of trajectory estimates in relative pose (RPE) and absolute trajectory error (ATE) on car sequences} \label{tab:accuracy_cars} \begin{center} \begin{tabular}{ccccccccccc} \toprule & &\multicolumn{3}{c}{transl. RMSE RPE in\,m} & \multicolumn{3}{c}{rot. RMSE RPE in\,deg} & \multicolumn{3}{c}{transl. RMSE ATE in\,m}\\ \cmidrule(lr){3-5} \cmidrule(lr){6-8} \cmidrule(lr){9-11} object & speed & left turn & right turn & straight & left turn & right turn & straight & left turn & right turn & straight \\ \midrule textured & 1x & 0.189 & 0.283 & 0.250 & 2.764 & 3.306 & 2.958 & 0.097 & 0.171 & 0.149\\ textured & 2x & 0.409 & 0.355 & 0.206 & 5.612 & 2.991 & 2.876 & 0.114 & 0.217 & 0.109\\ textured & 4x & 0.181 & 0.406 & 0.453 & 2.957 & 3.033 & 3.478 & 0.080 & 0.175 & 0.138\\ \midrule textureless & 1x & 0.811 & 0.450 & 0.528 & 10.816 & 6.168 & 6.245 & 0.471 & 0.224 & 0.287 \\ textureless & 2x & 0.365 & 0.648 & 0.436 & 3.717 & 4.509 & 4.069 & 0.183 & 0.235 & 0.261 \\ textureless & 4x & 0.356 & 0.551 & 0.299 & 4.195 & 6.548 & 3.077 & 0.146 & 0.231 & 0.173 \\ \bottomrule \end{tabular} \end{center} \end{table*} \begin{table*}[tb] \caption{Accuracy of trajectory estimates in RPE and ATE for purely event or frame-based tracking} \label{tab:ablation_study} \begin{center} \begin{tabular}{ccccccccccc} \toprule & &\multicolumn{3}{c}{transl. RMSE RPE in\,m} & \multicolumn{3}{c}{rot. RMSE RPE in\,deg} & \multicolumn{3}{c}{transl. RMSE ATE in\,m}\\ \cmidrule(lr){3-5} \cmidrule(lr){6-8} \cmidrule(lr){9-11} method & dataset & falling & sliding & dice & falling & sliding & dice & falling & sliding & dice \\ \midrule event-based tracking & box & 0.162 & 0.046 & 0.067 & 8.182 & 2.628 & 11.172 & 0.151 & 0.024 & 0.035 \\ event-based tracking & can & 0.045 & 0.091 & 0.039 & 5.196 & 2.745 & 3.069 & 0.021 & 0.068 & 0.027 \\ frame-based alignment & box & 0.072 & $\infty$ & $\infty$ & 7.792 & $\infty$ & $\infty$ & 0.042 & $\infty$ & $\infty$\\ frame-based alignment & can & $\infty$ & $\infty$ & $\infty$ & $\infty$ & $\infty$ & $\infty$ & $\infty$ & $\infty$ & $\infty$\\ \midrule method & dataset & left turn & right turn & straight & left turn & right turn & straight & left turn & right turn & straight \\ \midrule event-based tracking & textured 4x & 0.958 & 0.8607 & 0.833 & 15.613 & 13.590 & 4.133 & 0.701 & 0.503 & 0.785 \\ event-based tracking & textureless 4x & 1.186 & $\infty$ & 0.978 & 11.299 & $\infty$ & 10.084 & 0.807 & $\infty$ & 0.549 \\ frame-based alignment & textured 4x & 0.077 & 0.048 & 0.063 & 0.851 & 1.041 & 0.555 & 0.051 & 0.024 & 0.033\\ frame-based alignment & textureless 4x & 0.149 & 0.139 & 0.062 & 2.198 & 2.609 & 0.659 & 0.066 & 0.077 & 0.036\\ \bottomrule \end{tabular} \end{center} \end{table*} \subsubsection{Synthetic car sequences} In Table~\ref{tab:accuracy_cars} we present our RPE and ATE results for the car sequences. We use a mean SDF shape over a set of car shapes to track both cars. The maximum length of the shape is about 4.2\,m. The camera has an average distance of 8.3\,m. Again, our approach determines position and rotation of the objects at good accuracy. The textured object provides more events on the objects and hence can be tracked more accurately. For the textureless object, less events are available inside the objects (see Fig.~\ref{fig:overview}) which makes the object more difficult to track. We see a slight degradation in accuracy in both translational and rotational motion. Our approach handles varying speeds of the cars well with similar accuracy. Interestingly, it is less accurate for slow cars since less events are generated and fewer event buffer frames are available for optimizing the spline segments. We also show trajectory overlays in Fig.~\ref{fig:trajectoryoverlays} and qualitative comparisons with ground truth. \subsection{Ablation Study} We compare our approach with purely event- or frame-based variants. For pure event-based tracking, we use the latest frames within the spline as keyframe. For pure frame-based alignment, we use all frames as keyframes and initialize the pose of new keyframes based on the previous frame. In the car and YCB sequences, there are about 900 and 2500 event buffer frames per second in average, respectively. While frame-based alignment can outperform our method on the car sequences, it diverges for the can object early in the sequence. For the latter, the frame differences are too large for frame-based tracking which is alleviated by the higher rate event buffer frames. Moreover, our event-based tracking layer provides updates on the continuous spline estimate at double the time resolution. Our results demonstrate that the combination of both layers is advantageous for tracking. \subsection{Computation Time} We measure the run-time of our approach with the textureless car sequences on an Intel Xeon Silver 4112 [email protected] with 8 cores. On average our implementation requires 109.5\,ms per spline segment optimization on the event-based tracking layer. Per windowed keyframe optimization it uses 363\,ms on average. Our implementation processes the in avg. approx. 2.4\,s trajectories in 24.5\,s. Note that it has not been tuned yet e.g. through parallel processing. \subsection{Real Data} We also test our method on real data from a DAVIS240C sensor with challenging low-resolution gray scale images and noisy event measurements. In the first frame, the tracked pose is initialized with ground truth obtained by a motion capture system. Results on three sequences with translational (0.77\,s), rotational (0.54\,s) and circular motion (1.56\,s) can be seen in Fig.~\ref{fig:realdataresults} and in the supplementary video. We observe that our approach requires careful tuning and accurate initialization for this noisy data. The incremental tracking on both layers leads to drift which can make tracking fail, especially on longer sequences. The photometric alignment error in Eq.~\eqref{eq:photometricerror} is determined in patches of size 3$\times$3 around each keypoint and a keyframe window size of $W=10$ is used. Additionally, a velocity regularization term $E_{\mathit{reg},2} = \lambda_{\mathit{reg},2} \sum_{F \in \mathcal{F}} \Delta t_F \left\lVert \dot{\mathbf{T}}(t_F) \right\rVert_2^2$ is added with $\lambda_{\mathit{reg},2} = 1.6$. The term favors small velocities, if the events are sparse and an event buffer frame spans larger time intervals. We set $w_c=0.005$ for the circular motion, $w_c=0.001$ otherwise. \section{Conclusions} In this paper we present a novel model- and optimization-based approach for object tracking from events and frames. We propose a two-stage processing pipeline which on the faster layer tracks the object motion from the asynchronous event stream with regard to a reference image frame. The tracking is formulated as probabilistic inference for the object trajectory based on a generative event measurement model. We represent the trajectory continuously using a cubic B-spline which allows us to determine object pose and velocity estimates at arbitrary times on the spline for the event measurement model. The poses of the reference frames are estimated in a second optimization layer which optimizes the object poses in key frames using direct image alignment on keypoints. We evaluate our approach on synthetic sequences of typical household objects and car objects, demonstrate good tracking accuracy and analyze the combination of events and frames in an ablation study. We also report on experiments with real camera data. Current limitations of our approach include the requirement of accurate initialization, trajectory smoothness assumption by the spline and the incremental tracking which leads to drift. If accumulated drift or motion changes become too high, our tracking approach fails. In future work, we plan to scale our approach further for improved tracking on longer sequences and real event measurements. The robustness of our method could be improved, for instance, by combining it with object pose detection or by tight coupling of the event- and frame-based tracking. \bibliographystyle{IEEEtran}
\section{Introduction} In 1940, the famous celebrated mathematician Graham Higman published a theorem \cite{gh} in group algebra which is valid only for a field or an integral domain with some specific conditions. In 1999, the author noticed that this theorem can be extended to a rich class of rings called halidon rings\cite{at}. In complex analysis, $|z|=1$ is the set of all points on a circle with centre at the origin and radius $1$. The solutions of $z^{n}=1$, which are usually called the $n^{th}$ roots of unity, which can be computed by DeMoivre's theorem, will form a regular polygon with vertices as the solutions. As $n\longrightarrow \infty $ this regular polygon will become a unit circle. This is the ordinary concept of $n^{th}$ of unity in the field of complex numbers. For a ring, we need to think differently. \\ A primitive $m^{th}$ root of unity in a ring with unit element is completely different from that of in a field, because of the presence of nonzero zero divisors. So we need a separate definition for a primitive $m^{th}$ root of unity. An element $\omega $ in a ring $R$ is called a \textit{primitive} $m^{th}$ root if $m$ is the least positive integer such that $\omega^{m}=1$ and \begin{eqnarray*} \sum_{r=0}^{m-1} \omega^{r(i-j)}&=& m, \quad i= j (\ mod \ m )\\ &=& 0, \quad i\neq j (\ mod \ m ). \end{eqnarray*} More explicitly, \begin{eqnarray*} 1+ \omega^{r}+(\omega^{r})^{2}+(\omega^{r})^{3}+(\omega^{r})^{4}+......+(\omega^{r})^{m-1}&=& m, \quad r=0 \\ &=& 0, \quad 0<r\leq m-1. \end{eqnarray*} \\ A ring $R$ with unity is called a \textit{halidon} ring with index $m$ if there is a primitive $m^{th}$ root of unity and $m$ is invertible in $R$. The ring of integers is a halidon ring with index $ m=1$ and $\omega=1$. The halidon ring with index $1$ is usually called a \textit{trivial} halidon ring. The field of real numbers is a halidon ring with index $m=2$ and $\omega = -1$. The field $\mathbb{Q}$ $(i)=\{ a+ib | a,b \in$ $\mathbb{Q}$ $\}$ is a halidon ring with $\omega=i$ and $m=4$. $\mathbb{Z}_{65}$ is an example of a halidon ring with index 4 and $\omega =8$ which is not a field. In general $\mathbb{Z}_{4r^{2}+1}$ is a halidon ring with index 4 and $\omega =2r$ for each integer $r>0$. $\mathbb{Z}_{p}$ is a halidon ring with index $p-1$ for every prime $p$. Interestingly, $\mathbb{Z}_{p^{k}}$ is also a halidon ring with same index for any integer $k>0$ and it is not a field if $k>1.$ Note that if $\omega$ is a primitive $m^{th}$ root of unity, then $\omega^{-1}$ is also a primitive $m^{th}$ root of unity. \section{Preliminary results} Let $U(R)$ and $ZD(R)$ denote the unit group of $R$ and the set of zero divisors in $R$ respectively. Clearly, they are disjoint sets for a finite commutative halidon ring $R$. \begin{lemma} \label{rd3} A finite commutative ring $R$ with unity is a halidon ring with index $m$ if and only if there is a primitive $m^{th}$ root of unity $\omega$ such that $m$, $\omega^{r}-1 \in U(R)$; the unit group of $R$ for all $r=1,.., m-1$. If $m$ is a prime number it is enough to have $m$, $\omega -1 \in U(R)$. \end{lemma} \begin{proof} The proof follows from the fact that $(\omega^{r}-1)(1+ \omega^{r}+(\omega^{r})^{2}+(\omega^{r})^{3}+(\omega^{r})^{4}+......+(\omega^{r})^{m-1})=\omega^{rm}-1=0$. \end{proof} \begin{proposition} \label{rd15} Let $R$ be a finite commutative halidon ring with index $m$. Then $R=U(R)\cup ZD(R)$ with $U(R)\cap ZD(R)= \{ \}$; the empty set. \end{proposition} \begin{proof} Since $R$ is finite and $m$ is invertible in $R$, the proof is evident. \end{proof} The next theorem will give an improved necessary and sufficient conditions for a ring to be a halidon ring. \begin{theorem} \label{rd2} A finite commutative ring $R$ with unity is a halidon ring with index $m$ if and only if there is a primitive $m^{th}$ root of unity $\omega$ such that $m$, $\omega^{d}-1 \in U(R)$; the unit group of $R$ for all divisors $d$ of $m$ and $d<m$. \end{theorem} \begin{proof} If R is a finite commutative halidon ring with index $m$, then it is evident that there is a primitive $m^{th}$ root of unity $\omega$ such that $m$, $\omega^{d}-1 \in U(R)$; the unit group of $R$ for all divisor $d$ of $m$. \\ Conversely, assume that there is a primitive $m^{th}$ root of unity $\omega$ such that $m$, $\omega^{d}-1 \in U(R)$; the unit group of $R$ for all divisor $d$ of $m$. We would like to show that $\omega^{r}-1 \in U(R)$, for $r=1,2,3,...,m-1$. Let $g$ be the greatest common divisor of $r$ and $m$. Then there are integers $u$ and $v$ such that $ur+vm=g$. Using the well known geometric series, we have $$(p-1)(1+p+p^{2}+...+p^{k-1})=p^{k}-1. $$ Put $p=\omega^{r}$ and $k=u$. Then we get $ (\omega^{r}-1).a=\omega^{ru}-1$ for some $a \in R$. This means that $(\omega^{r}-1)$ divides $\omega^{ru}-1=\omega^{ru}.\omega^{vm}-1=\omega^{ru+vm}-1=\omega^{g}-1$. Now we can choose a divisor $d$ of $m$ such that $g$ divides $d$. Let $p=\omega^{g}$ and $k=\dfrac{d}{g}$. Thus we have $$ (\omega^{g}-1).b=\omega^{d}-1$$ for some $b \in R$. If $(\omega^{g}-1).c=0$, multiplying by $b$, we get $(\omega^{d}-1).c=0$. Since $(\omega^{d}-1) \in U(R)$, $c =0$. Therefore $(\omega^{g}-1)$ is not a zero divisor. Since $R$ is finite and using proposition \ref{rd15}, we get $(\omega^{g}-1)\in U(R)$. \\ Also, $(\omega^{r}-1)$ divides $\omega^{g}-1$. Therefore $(\omega^{r}-1)$ is a unit in $R$. Thus we have $(\omega^{r}-1)$ is a unit in $R$ for $r=1,2,,3..., m-1.$ By lemma \ref{rd3}, $R$ is a halidon ring with index $m$. \end{proof} The following results are stated without proof. For proofs, refer to \cite{at} and \cite{ath}. \begin{proposition} Let R be a finite commutative halidon ring with index m. Then m divides the number of nonzero zero divisors in R. \end{proposition} \begin{proposition} Let R be a commutative halidon ring with index m and let k $>$ 1 be a divisor of m. Then R is also a halidon ring with index k. \end{proposition} \begin{proposition} \label{rd12} Let I be an ideal of a halidon ring with index m. Then R/I is also a halidon with same index m. \end{proposition} The cardinality of a finite non-trivial commutative halidon ring is given by the following proposition. \begin{proposition} Let R be a finite commutative halidon ring with index m. Then $|R|$=1 (mod m). \end{proposition} \begin{example} Let $R=Z_{p^{k}}$ where p is an odd prime. Then $R$ is a halidon ring with index $m=p-1$ and $p^{k}=(1+p+p^{2}+p^{3}+...+p^{k-1})(p-1))+1=1 \ mod \ m$. $\therefore \ |R|=1 \ mod \ m$. \end{example} \begin{proposition} Let R be a finite commutative halidon ring with index $m>1$ such that U(R)=$<\omega>$, where $<\omega>$ is the cyclic group generated by $\omega$; a primitive $m^{th}$ root of unity. Then \begin{enumerate} \item $R=T\bigoplus L$, where T is a subfield of R and L is a subspace of R as a vector space over T, \item R is semisimple. \end{enumerate} \end{proposition} The next theorem will give the necessary and sufficient conditions for a non-trivial halidon ring to become a filed. \begin{theorem} \label{rd5} A ring $R$ is a finite field if and only if $R$ is a finite commutative halidon ring with index $m>1$ such that $U(R)=<\omega>$;where $<\omega>$ is the cyclic group generated by $\omega$; a primitive $m^{th}$ root of unity . \end{theorem} \begin{example} Let $R=Z_{25}$. Then $U(R)=<2>$ and $2^{20}=1$. $R$ is not a halidon ring as the index $20$ is not invertible in $R$. However, $R=Z_{5}$ is a halidon ring with index $4$, $\omega=2$ and $U(R)=<2>$ which is also a field. \end{example} Let $$u= \sum_{i=1}^{m}\alpha_{i}g_{i}$$ be an element in the group algebra $RG$ and let $$\lambda_{r}=\sum_{i=1}^{m}\alpha_{m-i+2}(\omega^{(i-1)})^{(r-1)}$$ where $\omega \in R$ is a primitive $m^{th}$ root of unity. Then $u$ is said to be \textit{depending } on $\lambda_{1},\lambda_{2},......,\lambda_{m}$. \begin{proposition} Let S be a subring with unity of a halidon ring R with index m and let $G =<g>=\{g_{1}=1,g_{2}=g,......,g_{m}=g^{m-1}\}$ be a cyclic group of order $m$ generated by $g$. Let $$u= \sum_{i=1}^{m}\alpha_{i}g_{i} \in U(RG)\cap SG$$ be depending on $\lambda_{1},\lambda_{2},......,\lambda_{m}$.Then $u^{-1} \in SG $ if and only of $\lambda=\lambda_{1}\lambda_{2}......\lambda_{m}$ is invertible in S. \end{proposition} The next theorem is about the existence of units in integral group rings which is an important area of study in group rings or group algebras. \begin{theorem} Let $\omega \in \mathbb{C} $ be a complex primitive $m^{th}$ root of unity and let $G =<g>=\{g_{1}=1,g_{2}=g,......,g_{m}=g^{m-1}\}$ be a cyclic group of order $m$ generated by $g$. Let $$u= \sum_{i=1}^{m}\alpha_{i}g_{i} \in \mathbb{C}G$$ be depending on $\lambda_{1},\lambda_{2},......,\lambda_{m}$. Let $$\lambda_{i} ^{*}=\prod_{r=1,r \neq i}^{m} \lambda_{r} $$ and $$ \lambda=\prod_{r=1}^{m} \lambda_{r} $$ Then $$u= \sum_{i=1}^{m}\alpha_{i}g_{i} \in U(\mathbb{Z}G)$$ if and only if $ \lambda = \pm 1$. If $ \lambda_{m}^{-1}=f(\omega)$; a polynomial function of $ \omega$, then \\ $u^{-1}=f(g)$. \end{theorem} \begin{remark} When we use the formula $u^{-1}=f(g)$, ensure that the use of $$ \sum_{r=0}^{m-1} \omega^{r}=0 $$ should be avoided in the calculation of $ \lambda_{i}$ or $ \lambda$ in order to make the behaviour of $ \omega $ exactly same as that of g. For an example see \cite{at}. \end{remark} \begin{theorem} \label{rd10} Let R be a commutative halidon ring with index m and let G be a cyclic group of order m. Then $RG\cong R^{m}$ as R-algebras. \end{theorem} \begin{theorem}[\textbf{Higman's Theorem} \cite{gh}, \cite{gk}] \label{rd13} Let $R$ be a commutative halidon ring with index $m$ and let $G$ be an finite abelian group of order $n$ with exponent $m$ and $n$ is a unit in $R$. Then $RG\cong R^{n}$ as $R$-algebras. \end{theorem} \section{Main Result- Maschke's Theorem} In this section, we discuss the characters of a group over halidon rings and Maschke's Theorem. Usually, the character of a group is defined over a real field $\mathbb{R}$ or a complex field $\mathbb{C}$. But, here we define character of a group over a halidon ring which need not be a field. Since the field of complex numbers is a halidon ring with any index greater than 1, all the properties of characters over halidon rings will automatically satisfied over the field of complex numbers. Now we are looking into those properties of characters of a group over a complex field which are also true over halidon rings. \\ \\ Let $R$ be a commutative halidon ring with index $m$ and let $G$ be a finite group of order $n$ with exponent $m$ such that $n$ is invertible in $R$. A homomorphism $\rho : G\rightarrow GL(k,R)$ is defined as a \textit{representation} of $G$ over $R$ of \textit{degree} $k$, where $GL(k,R)$ is the general linear group of invertible matrices of order $k$ over $R$. The \textit{character} of G is defined as a homomorphism $\chi : G\rightarrow R $ such that $\chi (g)=tr(\rho(g))$ for $\forall \ g \in G $ where $tr(\rho(g)$ is the trace of the matrix $\rho(g)$. A representation is \textit{faithful} if it is injective. When $k=1$, we call the character $\chi$ as \textit{linear} character and it is actually a homomorphism $\chi : G\rightarrow u(R) $. In the standard definition, by a \textit{linear} character $\chi$ of G, mean a homomorphism $\chi: G\rightarrow \mathbb{C}-\{0\}$. If $R=\mathbb{C}$, then $U(R)=\mathbb{C}-\{0\}$. So the linear characters are precisely $ \Gamma^{[r]}$. Thus we have the following theorem which is already known to be true for linear characters of a group over $\mathbb{C}$. \begin{theorem} Let R be a commutative halidon ring with index m and let G be a group of order n and exponent m such that n is invertible in R. Let $G^{*}$ be the set of homomorphisms $\Gamma^{[s]}$ of G into U(R), which are given by(*). Then $G^{*}$ is a group under the product $\Gamma^{[s]}\Gamma^{[t]}=\Gamma^{[s+t]}$ and $G^{*}\cong G.$ \end{theorem} \begin{proof} Refer to \cite{ath} for the proof. \end{proof} Suppose that $\rho : G\rightarrow GL(k,R)$ is a \textit{representation} of $G$ over $R$. Write $V=R^{k}$, the module of all row vectors $(\lambda_{1},\lambda_{2},...,\lambda_{k})$ with each $\lambda_{i} \in R $. For all $v \in R$ and $ g \in G$, the matrix product $$ v \rho(g),$$ of the row vector $v$ with the matrix $\rho(g)$ is a row vector in $V$. With the multiplication $vg=v \rho (g)$, $V$ becomes an $RG$-module. Refer to \cite{gj}.\\ The next theorem is the Maschke's Theorem for a cyclic group over a halidon ring. \begin{theorem} \label{rd11} Let G be a finite cyclic group of order m and let R be a commutative halidon ring with index m. Let $V=R^{m}$ be an RG-module. Then there are m irreducible RG-submodules $U_{1}, U_{_{2}},......., U_{m}$ such that $V=U_{1}\oplus U_{2} \oplus ...... \oplus U_{m}$. \end{theorem} \begin{proof} Let $\rho$ be the regular representation of $G=<g | g^{m}=1>$. Then $$ \rho (g)= cirulant (0,0,0,....,1)=\left( \begin{array}{ccccc} 0 & 0 & 0 ....& 0 & 1\\ 1 & 0 & 0 ....& 0 & 0 \\ . & . & .....& . & . \\ 0 & 0 & 0 ....& 1 & 0 \\ \end{array} \right) $$ is a square matrix of order $m$ and each row is obtained by moving one position right and wrapped around of the row above. The eigen values are $$1, \ \omega, \ \omega^{2}\ ......, \omega^{m-1},$$ where $ \omega $ is a primitive $m^{th}$ root of unity and with corresponding eigen vectors $(1, \ 1,...., \ 1), (1, \ \omega, \ \omega^{2}\ ......, \omega^{m-1}), (1, \ \omega^{2}, \ (\omega^{2})^{2}\ ......, (\omega^{m-1})^{2}), .....,$ \\ $(1, \ \omega^{m-1}, \ (\omega^{m-1})^{2}\ ......, (\omega^{m-1})^{m-1})$. \\ Let $U_{r}=span \{(1, \ \omega^{r-1}, \ (\omega^{r-1})^{2}\ ......, (\omega^{r-1})^{m-1}) \} $. Then any element $u_{r}$ of $U_{r}$ can be taken as $\lambda (1, \ \omega^{r-1}, \ (\omega^{r-1})^{2}\ ......, (\omega^{r-1})^{m-1})$ for some $\lambda \in R $. Therefore \begin{eqnarray*} ug&=&u\rho(g) \\ &=& \lambda (1, \ \omega^{r-1}, \ (\omega^{r-1})^{2}\ ......, (\omega^{r-1})^{m-1})cirulant (0,0,0,....,1) \\ &=& \lambda\omega^{r-1}(1, \ \omega^{r-1}, \ (\omega^{r-1})^{2}\ ......, (\omega^{r-1})^{m-1}) \in U_{r}. \end{eqnarray*} \\ This means that $U_{r}$ is an $RG$-submodule of $V$ for each $r=1,2,3,....m$. \\ We define $\pi_{r}: V \rightarrow V $ by $$ \pi_{r}(v)=u_{r} \in U_{r}.$$ Then $\pi_{r}^{2}=\pi_{r}$ and therefore $V=U_{1}\oplus U_{2} \oplus ...... \oplus U_{m}$. \end{proof} \begin{corollary} Let $G$ be a finite cyclic group of order $k$ and let R be a \\ commutative halidon ring with index m. Let $V=R^{k}$ be an RG-module where k $|$ m. Then there are k irreducible RG-submodules $U_{1}, U_{_{2}},......., U_{k}$ such that $V=U_{1}\oplus U_{2} \oplus ...... \oplus U_{k}$. \end{corollary} \begin{proof} Since k $|$ m, we can take m=ck. Then $\omega_{1}=\omega^{c}$ is a primitive $k^{th}$ root of unity. Applying the above theorem, the result follows. \end{proof} \begin{theorem}[\textbf{Mascheke's Theorem}] \label{rd8} Let G be a finite group of order n with exponent m, let R be a commutative halidon ring with index m and n is invertible in R. Let $V=R^{m}$ be an RG-module. If U is an RG-submodule of V, then there is an RG-submodule W such that $V=U\oplus W$. \end{theorem} \begin{proof} First choose any submodule $W_{0}$ of V such that $V=U\oplus W_{0}$. Since $V$ is a free module with rank $m$, we can find a basis $ \{v_{1}, ..., v_{p}\}$ of U. Next we have to show that this basis can be extended to a basis $ \{ v_{1}, ..., v_{p}, v_{p+1},....,v_{m} \}$ of $V$. Let $v_{p+1} \notin span\{v_{1}, ..., v_{p}\}$. Suppose that $$ \alpha_{1}v_{1}+\alpha_{2}v_{2}+.....+\alpha_{p}v_{p}+\alpha_{p+1}v_{p+1}=0.$$ Then $$\alpha_{p+1}v_{p+1}=- \alpha_{1}v_{1}-\alpha_{2}v_{2}-.....-\alpha_{p}v_{p}$$ If $\alpha_{p+1}=0$, then $ v_{1}, ..., v_{p}, v_{p+1}$ are linearly independent. \\ If $\alpha_{p+1} \in U(R)$; the unit group of $R$, then $v_{p+1} \in span\{v_{1}, ..., v_{p}\}$, which is a contradiction. So $\alpha_{p+1} \notin U(R)$. \\ If $\alpha_{p+1} \neq 0 \in ZD(R)$; the set of zero divisors of $R$, then there exists \\ a $\beta_{p+1} \neq 0 \in ZD(R)$ such that $ \alpha_{p+1}\beta_{p+1}=0$. \\ $$ \Rightarrow \quad - \beta_{p+1}\alpha_{1}v_{1}-\beta_{p+1}\alpha_{2}v_{2}-.....-\beta_{p+1}\alpha_{p}v_{p}=0$$ $ \Rightarrow \quad \beta_{p+1}\alpha_{i}=0 $ for all $i=1,2,3,...,p$. Since the above is true for all $i=1,2,3,...,p$, $ \beta_{p+1}$ must be zero. This is a contradiction as $\beta_{p+1} \neq 0 $. Therefore $\alpha_{p+1}$ must be zero. So $ v_{1}, ..., v_{p}, v_{p+1}$ are linearly independent. Continuing like this we can extend a basis $ \{v_{1}, ..., v_{p}\}$ of U to a basis $ \{ v_{1}, ..., v_{p}, v_{p+1},....,v_{m} \}$ of $V$. Then $W_{0} =span \{v_{p+1}, ..., v_{m} \}$. \\ Rest of the proof is in line with \cite{gj}. Now for all $v \in V$ there exist unique vectors $u \in U$ and $w \in W_{0}$ such that $v = u + w$. We define $\phi : V \rightarrow V$ by setting $\phi (v)=u$. Recall from algebra that if $V=U \oplus W$, and if we define $\pi: V \rightarrow V$ by $$ \pi (u + w) = u \quad for \ all \ u \ \in U, w \in W$$ then $\pi$ is an endomorphism of $V$. Moreover, $Im(\pi) =U$, $Ker(\pi) = W$ and $\pi^{2}=\pi$. With this in mind we see that $\phi$ is a projection of $V$ with kernel $W_{0}$ and image $U$. Our aim is to modify the projection $\phi$ to create an $RG$-homomorphism from $V \rightarrow V$ with image $U$.\\ Define $\tau : V \rightarrow V$ by $$ \tau(v)=\frac{1}{n}\sum_{g \in G}g^{-1} \phi(gv), \quad v \in V $$ Then $ \tau $ is an endomorphism of $V$ and $Im(\tau ) \subseteq U$. Now we will show that $ \tau $ is an $RG$-homomorphism. For $v \in V$ and $x \in G$ we have $$ \tau(xv)=\frac{1}{n}\sum_{g \in G}g^{-1} \phi(gxv) $$ As g runs through the elements of G, so does $h = gx$. Thus we have \begin{eqnarray*} \tau(xv)&=&\frac{1}{n}\sum_{h \in G}xh^{-1} \phi(hv) \\ &=& \frac{1}{n}x \left(\sum_{h \in G}h^{-1} \phi(hv)\right) \\ &=& x \tau (v)\end{eqnarray*} Thus $ \tau$ is an $RG$-homomorphism. It remains to show that $\tau$ is a projection with image $U$. To show that $\tau$ is a projection it suffices to demonstrate that $\tau^{2}=\tau$. Note that given $u \in U$ and $g \in G$, we have $gu \in U$, so $\phi(gu)=gu$. Using this we see that: \begin{eqnarray*} \tau(u)&=&\frac{1}{n}\sum_{g \in G}g^{-1} \phi(gu) \\ &=&\frac{1}{n}\sum_{g \in G}g^{-1} gu \\ &=&\frac{1}{n}\sum_{g \in G}u \\ &=&u \end{eqnarray*} Now let $v\in V$. Then $\tau(v) \in U$, so we have $\tau(\tau(v))=\tau(v)$ . We have shown that $\tau^{2}=\tau$. \end{proof} In \cite{gj}, the authors have stated the Maschke's theorem for vector spaces over the field of real numbers $\mathbb{R}$ or complex numbers $\mathbb{C}$ and provided an example where Maschke's theorem can fail(see chapter 7) if the field is not a $\mathbb{R}$ or $\mathbb{C}$. In the light of the theorem \ref{rd8}, we can still have a vector space over the field $\mathbb{Z}_{p}$; which is a halidon ring with index $m=p-1$ for prime p. By theorem \ref{rd5}, there is a primitive $m^{th}$ root of unity $\omega$ such that $U(\mathbb{Z}_{p})=<\omega>$. Let $G=C_{m}=<a : a^{m}=1>$ and let $R=\mathbb{Z}_{p}$. Note that we cannot take $G$ as $C_{p}=<a : a^{p}=1>$ as $|G|=p$ has no multiplicative inverse in $\mathbb{Z}_{p}$. Let $V=R^{2}$ and let $\{ v_{1}, v_{2} \}$ be the standard basis for $V$. We define $\sigma: G \longrightarrow GL(2,R)$ by $\sigma(a^{j})= \left( \begin{array}{cc} \omega^{j} & 0 \\ 0 & \omega^{j} \end{array} \right)$ for $j=1,2,3,....m.$. Clearly $\sigma$ is a representation of $G$. Also, $U=span \{ v_{1} \}$ is an $RG$-submodule of V. Define $W=span \{ v_{1}+v_{2}\}$, which is also an $RG$-submodule of $V$. Any element $v$ in $V$ can be written as $v=(\alpha_{1}-\alpha_{2})v_{1} + \alpha_{2}(v_{1}+v_{2})$ for some $\alpha_{1}, \alpha_{2} \in R$. If $x \in U\cap W$, then $x \in U$ and $x \in W$. So $x=\lambda_{1}v_{1}=(\lambda_{1},0)$ and $x=\lambda_{2}(v_{1}+v_{2})=(\lambda_{2}, \lambda_{2})$ for some $\lambda_{1}, \lambda_{2} \in R$. This implies $x=(0,0)$ and hence $V=U \oplus W$ as desired. \begin{definition} Let $R$ be a commutative halidon ring with index $m \ > 2 $ and let $S_{n}$ be the symmetric group on n symbols such that $|S_{n}|=m$. Let $S_{n}= \{ g_{1}, g_{2}, g_{3}, ..., g_{m}\}$ be in some order and let $ \{ e_{g_{1}}, e_{g_{2}}, e_{g_{3}}, ..., e_{g_{m}} \}$ be the standard basis for $V=R^{m}$. Define $\rho(g)(h)=e_{gh}$ for all $g, \ h \in S_{n}$. This is called the \textbf{permutation} \textbf{representation} of $S_{n}$. \end{definition} \begin{example} Let us order the elements of $S_{3}$ as follows: $$S_{3}= \{ g_{1}=id, \ g_{2}= (1,2) \ g_{3}= (1,3) \ g_{4}=(2,3) \ g_{5}=(1,2,3) \ g_{6}=(1,3,2)\}.$$ Then the composition table is given as below. \begin{center} \begin{tabular}{|c|c|c|c|c|c|c|} \hline & $g_{1}$ & $g_{2}$ & $g_{3}$ & $g_{4}$ & $g_{5}$ & $g_{6}$ \\ \hline $g_{1}$ & $g_{1}$ & $g_{2}$ & $g_{3}$ & $g_{4}$ & $g_{5}$ & $g_{6}$ \\ $g_{2}$ & $g_{2}$ & $g_{1}$ & $g_{5}$ & $g_{6}$ & $g_{3}$ & $g_{4}$ \\ $g_{3}$ & $g_{3}$ & $g_{6}$ & $g_{1}$ & $g_{5}$ & $g_{4}$ & $g_{2}$ \\ $g_{4}$ & $g_{4}$ & $g_{5}$ & $g_{6}$ & $g_{1}$ & $g_{2}$ & $g_{3}$ \\ $g_{5}$ & $g_{5}$ & $g_{4}$ & $g_{2}$ & $g_{3}$ & $g_{6}$ & $g_{1}$ \\ $g_{6}$ & $g_{6}$ & $g_{3}$ & $g_{4}$ & $g_{2}$ & $g_{1}$ & $g_{5}$ \\ \hline \end{tabular} \end{center} Let $R$ be a halidon ring with index m=6 and $V=R^{6}$ (for example, $R=Z_{49}$). Let $ \{ e_{g_{1}}, e_{g_{2}}, e_{g_{3}}, ..., e_{g_{6}} \}$ be the standard basis for $V$. The representation $\rho$ is given by $\rho(g_{i})g_{j}=e_{g_{i}g_{j}}$. Using the composition table, for example, we can see that $$\rho(g_{3})=\left( \begin{array}{cccccc} 0 & 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 1 \\ 1 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 & 0 \\ \end{array} \right)$$ Let $W_{0}=span \{ e_{g_{1}}, e_{g_{2}}, e_{g_{3}}, e_{g_{4}}, e_{g_{5}}\}$ and $U= span \{ e_{g_{1}}+ e_{g_{2}}+ e_{g_{3}}+e_{g_{4}}+e_{g_{5}}+ e_{g_{6}}\} $. Then clearly $V=W_{0}\oplus U$. We define a projection $\phi(e_{g_{i}})=0, for \ i=1,2,3,4,5$ and $\phi(e_{g_{6}})=e_{g_{1}}+ e_{g_{2}}+ e_{g_{3}}+e_{g_{4}}+e_{g_{5}}+ e_{g_{6}}.$ From the proof of Maschke's Theorem, we have $ \tau ( e_{g_{i}})=\frac{1}{6}( e_{g_{1}}+ e_{g_{2}}+ e_{g_{3}}+e_{g_{4}}+e_{g_{5}}+ e_{g_{6}} ) for \ all \ i=1,2,3,4,5,6$. Let $W=Ker \ \tau = span \{ e_{g_{1}}- e_{g_{2}}, e_{g_{2}}- e_{g_{3}}, e_{g_{3}}- e_{g_{4}}, e_{g_{4}}- e_{g_{5}}, e_{g_{5}}- e_{g_{6}}\}$. Then $wg \in W$ for all $w \in W $ and $g \in S_{3}$. Therefore $W$ is an $RS_{3}$ submodule and $V=U\oplus W$ as expected from the Maschke's Theorem. \end{example} \section{Rososhek’s problem} The Rososhek's problem is a problem related to a cryptosystem using group rings \cite{knp}. Let R be a commutative ring and G be a group. We say that an automorphism $\psi : RG \longrightarrow RG$ is \textit{standard} if it is defined by some ring automorphism $\alpha : R \longrightarrow R$ and by a group automorphism $\sigma : G \longrightarrow G$, so that $$\psi(x) = \sum_{g \in G}\alpha (a_{g})\sigma(g)$$ for every $$x =\sum_{g \in G}a_{g}g \in RG$$. \\ \textbf{Rososhek’s problem}: For which finite commutative rings R and finite groups G does the group ring $RG$ have standard automorphisms only? \\ We refer to group rings $RG$ possessing just standard automorphisms as \textit{automorphically rigid}, and the problem then consists in defining finite \textit{automorphically rigid} group rings. In \cite{knp}, the author has proved the following theorem for a finite field: \begin{theorem} Let $K$ be a finite field of characteristic $p$ and G a finite group. A group algebra $KG$is automorphically rigid if and only if one of the following conditions holds: \\ \begin{enumerate} \item G is a trivial group, i.e., G = e; \item G is a cyclic group of odd prime order q, i.e., $G = C_{q}$, q = 2, and $K = F_{p}$ is a prime field of characteristic p, with p a primitive root modulo q; \item G is a direct product of an order 2 cyclic group and a cyclic group $C_{q}$ of odd prime order q = 2, i.e., $G = C_{2} \times C_{q}$, with 2 a primitive root modulo q, and $K = F_{2}$ is a two-element field; \item $G$ is a permutation group on three symbols, i.e., $G = S_{3}$, and $K = F_{2}$ is a two-element field. \end{enumerate} \end{theorem} Still, the question remains unanswered for a finite commutative ring which is not a field. \begin{proposition} \label{rd14} Let $R=\dfrac{\mathbb{Z}_{n}[X]}{ (X^{2}-1)}$. Then the number of automorphisms of $R$, $|Aut R|$ is given by\\ \begin{eqnarray*} |Aut R| &=& 2 \ if \ n=p^{s} \ where \ s \geq 1 \ is \ an \ integer \ and \ p \ is \ an \ odd \ prime \ number \\ &=&2^{k} \ if \ n=p_{1}^{e_{1}}p_{2}^{e_{2}}p_{3}^{e_{3}}.....p_{k}^{e_{k}} \ with \ prime \ numbers \ 2<p_{1}<p_{2}<.....<p_{k}. \\ \end{eqnarray*} \end{proposition} \begin{proof} This proof is somewhat similar to example 2 in \cite{nm}. Let $x$ be the image of $X$ in $R$. Any element in $R$ can be uniquely written as $ax+b$ with $a,b \in \mathbb{Z}_{n}$. Let $\sigma \in AutR$. Then $\sigma(a)=a$ for every $a \in \mathbb{Z}_{n}$. Therefore $\sigma(x)=ax+b$ for some $a, \ b \in \mathbb{Z}_{n} $. Since $\sigma $ is an automorphism, there exists an element $px+q$ with $p, \ q \in \mathbb{Z}_{n}$ such that $x=\sigma(px+q)=p\sigma(x)+q=pax+pb+q$. then we get $pa=1$ and so $a$ must be a unit in $\mathbb{Z}_{n}$. Further, if $\sigma(x)=ax+b$ with $a \in U(\mathbb{Z}_{n})$, we must also have $0=\sigma(x^{2}-1)=\sigma(x^{2})-1=(ax+b)^{2}-1=a^{2}x^{2}+2abx+b^{2}-1=a^{2}(x^{2}-1)+2abx+a^{2}+b^{2}-1=2abx+a^{2}+b^{2}-1$. \\ Since $n$ is odd, $2ab=0\Longrightarrow b=0$ as $a \in U(\mathbb{Z}_{n})$. This implies $ a^{2}=1. $ Therefore $|AutR|$=no. of involutions in $\mathbb{Z}_{n}$. But, the number of involutions in $\mathbb{Z}_{n}$ clearly follows the statement in the proposition. Programme-3 mentioned below is useful to compute involutions in $\mathbb{Z}_{n}$. \end{proof} If $\mathbb{Z}_{n}$ is halidon ring with index $m$, then so is $\mathbb{Z}_{n}[X]$. By proposition \ref{rd12}, $\dfrac{\mathbb{Z}_{n}[X]}{ (X^{2}-1)}$ is also a halidon ring with index $m$. \begin{proposition} Let $R=\dfrac{\mathbb{Z}_{n}[X]}{ (X^{2}-1)}$ be a halidon ring with index $m$ and let $G=C_{m}$ be a cyclic group of order $m$. If $m!=2^{k} \times \phi(m)$ for some positive integer $k$, then $RG$ is automorphically rigid. \end{proposition} \begin{proof} Clearly $R$ is not a field. By theorem \ref{rd13}, $RG\cong R^{m}$. So $|AutRG|=|AutR^{m}|$. But, $AutR^{m}$ is just the collection of automorphisms which permute the positions of the elements of $R^{m}$. Thus we have $|AutR^{m}|=m!$. By proposition \ref{rd14}, we have $|AutR|=2^{k}$ for some positive integer $k$. So $m!=2^{k} \times \phi(m)$ implies $|AutRG|=|AugR|\times |AugG|$ and therefore $RG$ is automorphically rigid. \end{proof} The only solution to the above proposition is $m=2$. So one of the solutions (there may have other solutions) to the Rososhek’s problem is given by $R=\dfrac{\mathbb{Z}_{p^{s}}[X]}{ (X^{2}-1)}$ where $p$ is an odd prime, $s \geq 1$ is an integer and $\omega=p^{s}-1=-1mod p^{s} \in \mathbb{Z}_{p^{s}}$ is a primitive $m^{th}$ root of unity and $G=C_{2}$. \section{The computational aspects of halidon rings and halidon group rings} The main purpose this section is to verify Maschke's Theorem using some computer codes. The computer programme-5, is very useful to verify the Maschke's theorem for cyclic group. Throughout this section, let $R=\mathbb{Z}_{n}$ be a halidon ring with index $m$ and primitive $m^{th}$ root of unity $\omega$. Let $G =<g>=\{g_{1}=1,g_{2}=g,......,g_{m}=g^{m-1}\}$ be a cyclic group of order $m$ generated by $g$. We study the computational aspects of finding halidon rings for any integer $n>2$ and computing the units and idempotents in the halidon group ring $RG$ based on the related theorems. \begin{definition} \label{rd7} Let $p_{1},p_{2},p_{3},....,p_{k}$ be odd primes and let $\phi(x)$ be the Euler's totient function. We define the \textit{halidon function} $$\psi(n)= \begin{cases} gcd \{ \phi(p_{1}^{e_{1}}), \phi(p_{2}^{e_{2}}),\phi(p_{3}^{e_{3}}),...., \phi(p_{k}^{e_{k}})\}, & n=p_{1}^{e_{1}}p_{2}^{e_{2}}p_{3}^{e_{3}}.....p_{k}^{e_{k}} \\ 1, & n \ \text{is even}\end{cases} $$ \end{definition} \begin{proposition} Let $n$ be as in \ref{rd7}. Then the halidon function $$\psi(n)=gcd\{ p_{1}-1,p_{2}-1,p_{3}-1,....,p_{k}-1\},$$ which is independent of the exponents $e_{1},e_{2},e_{3},....,e_{k}$. \begin{proof} The proof follows immediately from the fact that $p_{1},p_{2},p_{3},....,p_{k}$ are distinct primes. \end{proof} \end{proposition} It is well-known that the \textit{carmichael function} $\lambda(n)$ is the exponent of $U(\mathbb{Z}_{n})$. The proof of the following proposition is evident. \begin{proposition} If $\lambda(n)$ is the carmichael function, then \begin{enumerate} \item $\psi(n)$ divides $\lambda(n)$, \item $\psi(n^{k})=\psi(n)$ if n is odd, \item $\psi(p_{1}p_{2}p_{3}....p_{s})=\psi(p_{1}^{d_{1}}p_{2}^{d_{2}}p_{3}^{d_{3}}.....p_{s}^{d_{s}})$ if each integer $d_{i}>0$ for $i=1,2,3,....,s$. \end{enumerate} \end{proposition} I have developed $5$ computer programme codes in c++ (Microsoft Visual Studio 2019) based on the theorems \ref{rd2}, \ref{rd9} and $2$ programmes for Discrete Fourier Transforms. The programme codes are included in the appendix. The computer programme-1 can be used to find a halidon ring $Z_{n}$ of given order $n\geq 1$. The author would like to provide its algorithm as follows: \\ ***************************** \\ ALGORITHM for Programme-1 \\ ***************************** \\ Input: n.\\ Output:$Z_{n}$ is a trivial halidon ring or not. \\ 1. If n is even, then $Z_{n}$ is a trivial halidon ring.\\ 2. Else \\ for i=1,2,...., n-1\\ for j=1,2,3,,,,,,n-1 do compute $i*j mod n$\\ if i*j mod n=1, $w\longleftarrow i$\\ 3. for i=1,2,3,,,,,, n-1 do compute $w^{i}$\\ 4. if $ w^{i} \ mod n=1 \ $, $ m\longleftarrow i$ \\ 5. compute divisors d of m and $d < m$ \\ 6. compute $w^{d}-1$ and if $w^{d}-1=1modn$ for all d, then $Z_{n}$ is a nontrivial halidon ring with index m. \\ End There are infinitely many halidon rings which are not fields. For example, using the programme-1, we can see that: \begin{enumerate} \item $\mathbb{Z}_{49}$ is halidon ring with index $m=6$ and $\omega=19$, \item $\mathbb{Z}_{2001}$ is a trivial halidon ring with index $m=2$ and $\omega=2000$, \item $\mathbb{Z}_{2501}$ is halidon ring with index $m=20$ and $\omega=8$ or $2493$, \item $\mathbb{Z}_{3601}$ is halidon ring with index $m=12$ and $\omega=1350$ or $2528$, \item $\mathbb{Z}_{10001}$ is halidon ring with index $m=8$ and $\omega=10$ or $9220$, \item $\mathbb{Z}_{100001}$ is halidon ring with index $m=10$ and $\omega=26364$ or $73728$ (running time 35 minutes). \end{enumerate} By running the same programme several times for different values of $n$, the author has come to the conclusion of the following conjecture. \begin{conjecture} If $R=\mathbb{Z}_{n}$ and $n=p_{1}^{e_{1}}p_{2}^{e_{2}}p_{3}^{e_{3}}.....p_{k}^{e_{k}}$ with primes $p_{1}<p_{2}<p_{3}<....<p_{k}$ including 2, then $R$ is a halidon ring with maximal index $m_{max}=\psi(n)$. \end{conjecture} \begin{theorem}\label{rd4} Let $$u= \sum_{i=1}^{m}\alpha_{i}g_{i} \in U(RG)$$ be depending on $\lambda_{1},\lambda_{2},......,\lambda_{m}$. Let $$v=\sum_{i=1}^{m}\beta_{i}g_{i}$$ be the multiplicative inverse of $u$ in $RG$. Then $$\beta_{i}=\frac{1}{m}\sum_{r=1}^{m} \lambda_{r}^{-1}(\omega^{i-1})^{r-1}.$$ \end{theorem} The computer programme-2 can be used to test whether a given element $u$ in $RG$ is a unit or not. If it is a unit, then the programme will give the multiplicative inverse $v$ in $RG$. \\ \textbf{Input}: $n=121,m=10,m^{-1}=109,\omega =94, a[1]=62, a[2]=21, a[3]=22, a[4]=85, a[5]=81, a[6]=95, a[7]=24,a[8]=30, a[9]=1, a[10]=65$ \\ \textbf{Output}: The multiplicative inverse of $a=62+21g+22g^{2}+85g^{3}+81g^{4}+95g^{5}+24g^{6}+30g^{7}+g^{8}+65g^{9} $ is $b=102+68g+34g^{2}+61g^{3}+73g^{4}+54g^{5}+102g^{6}+109g^{7}+18g^{8}+455g^{9} $.\\ \textbf{Input}: $n=121,m=10,m^{-1}=109,\omega =94, a[1]=72, a[2]=71, a[3]=89, a[4]=48, a[5]=54, a[6]=0, a[7]=2,a[8]=105, a[9]=25, a[10]=19$ \\ \textbf{Output}: The multiplicative inverse of $a=72+71g+89g^{2}+48g^{3}+54g^{4}+0g^{5}+2g^{6}+105g^{7}+25g^{8}+19g^{9} $ is $b=72+71g+89g^{2}+48g^{3}+54g^{4}+0g^{5}+2g^{6}+105g^{7}+25g^{8}+19g^{9} $, which is an involution.\\ \textbf{Input}: $n=121,m=10,m^{-1}=109,\omega =94, a[1]=5, a[2]=7, a[3]=2, a[4]=40, a[5]=22, a[6]=90, a[7]=20,a[8]=25, a[9]=10, a[10]=55$ \\ \textbf{Output}: The element $a=5+7g+2g^{2}+40g^{3}+22g^{4}+90g^{5}+20g^{6}+25g^{7}+10g^{8}+56g^{9} $ has no multiplicative inverse. \\ A direct calculation shows that all outputs are correct. \begin{theorem}\label{rd4} Let $$u= \sum_{i=1}^{m}\alpha_{i}g_{i} \in RG$$ be depending on $\lambda_{1},\lambda_{2},......,\lambda_{m}$. Then \begin{enumerate} \label{rd9} \item $u \in U(RG)$ if and only if each $\lambda_{i} \in U(R)$, \item $u \in E(RG)$ if and only if each $\lambda_{i} \in E(R)$, where $E(RG)$ is the set of idempotents in $RG$. \end{enumerate} More over, $|U(RG)|=|U(R)|^{|G|}$ and $|E(RG)|=|E(R)|^{|G|}$. \end{theorem} \begin{proof} The proof follows from the isomorphism $\rho(u)=(\lambda_{1},\lambda_{2},......,\lambda_{m})$ from $RG$ onto $R^{m}$. This is the isomorphism used to prove theorem \ref{rd10}. \end{proof} In order to find a unit element or an involution or an idempotent in $R$, we can use the programme-3. \textbf{Input}: n=25 \\ \textbf{Output}: Involutions are $1$ and $24$. \\ Idempotents are $0$ and $1$. \\ The units and their inverses are $(1,1), \ (2,13), \ (3,17), \ (4,19), \ (6,21), \ (7,18), \\ \ (8,22), \ (9,14), \ (11,16), \ (12,23), \ (13,2), \ (14,10), \ (16,11), \ (17,3), \ (18,7), \\ \ (9,4), \ (21,5), \ (22,20), \ (23,12)$ and $(24,24)$. \\ After finding the units and involutions in $R$, using the programme-4, we can compute the units and involutions in $RG$. \\ \textbf{Input}: $n=25, m=4, m^{-1}=19, \omega =7, l[1]=7, l[2]=3, l[3]=13, l[4]=21, l1[1]=18, l1[2]=17, l1[3]=2, l1[4]=5$ \\ \textbf{Output}: The multiplicative inverse of $a=11+17g+24g^{2}+5g^{3}$ is $b=23+12g^{2}+8g^{3} $. \\ \textbf{Input}: $n=25, m=4, m^{-1}=19, \omega =7, l[1]=1, l[2]=24, l[3]=24, l[4]=1, l1[1]=1, l1[2]=24, l1[3]=24, l1[4]=1$ \\ \textbf{Output}: The multiplicative inverse of $a=22g+4g^{3}$ is $b=22g+4g^{3} $, which is an involution. \\ All outputs can be verified through direct calculations. \\ After finding the idempotents in $R$, using the programme-5, we can compute the idempotents in $RG$. \textbf{Input}: $n=49, m=6,m^{-1}=41, \omega=19,l[1]=1,l[2]=0,l[3]=0,l[4]=0,l[5]=0,l[6]=0$ \\ \textbf{Output}: $e_{1}=41+41g+41g^{2}+41g^{3}+41g^{4}+41g^{5}$ \\ \textbf{Input}: $n=49, m=6,m^{-1}=41, \omega=19,l[1]=0,l[2]=1,l[3]=0,l[4]=0,l[5]=0,l[6]=0$ \\ \textbf{Output}: $e_{2}=41+44g+3g^{2}+8g^{3}+5g^{4}+46g^{5}$ \\ \textbf{Input}: $n=49, m=6,m^{-1}=41, \omega=19,l[1]=0,l[2]=0,l[3]=1,l[4]=0,l[5]=0,l[6]=0$ \\ \textbf{Outpu}t: $e_{3}=41+3g+5g^{2}+41g^{3}+3g^{4}+5g^{5}$ \\ \textbf{Input}: $n=49, m=6,m^{-1}=41, \omega=19,l[1]=0,l[2]=0,l[3]=0,l[4]=1,l[5]=0,l[6]=0$ \\ \textbf{Output}: $e_{4}=41+8g+41g^{2}+8g^{3}+41g^{4}+8g^{5}$ \\ \textbf{Input}: $n=49, m=6,m^{-1}=41, \omega=19,l[1]=0,l[2]=0,l[3]=0,l[4]=0,l[5]=1,l[6]=0$ \\ \textbf{Output}: $e_{5}=41+5g+3g^{2}+41g^{3}+5g^{4}+3g^{5}$ \\ \textbf{Input}: $n=49, m=6,m^{-1}=41, \omega=19,l[1]=0,l[2]=0,l[3]=0,l[4]=0,l[5]=0,l[6]=1$ \\ \textbf{Output}: $e_{6}=41+46g+5g^{2}+8g^{3}+3g^{4}+44g^{5}$ \\ Clearly $e_{1},e_{2},e_{3},e_{4},e_{5}$ and $e_{6}$ are orthogonal idempotents such that $e_{1}+e_{2}+e_{3}+e_{4}+e_{5}+e_{6}=1$. Therefore $\mathbb{Z}_{49}G=U_{1}\oplus U_{2} \oplus U_{3} \oplus U_{4} \oplus U_{5} \oplus U_{6}$ where $U_{1}=span\{41+41g+41g^{2}+41g^{3}+41g^{4}+41g^{5}\} =span\{1+g+g^{2}+g^{3}+g^{4}+g^{5}\}$, \\ $U_{2}=span\{41+44g+3g^{2}+8g^{3}+5g^{4}+46g^{5}\} =span\{1+\omega g+\omega ^{2}g^{2}+\omega^{3}g^{3}+\omega^{4}g^{4}+\omega^{5}g^{5}\}$, \\$U_{3}=span\{41+3g+5g^{2}+41g^{3}+3g^{4}+5g^{5}\} =span\{1+(\omega)^{2} g+(\omega ^{2})^{2}g^{2}+(\omega^{2})^{3}g^{3}+(\omega^{2})^{4}g^{4}+(\omega^{2})^{5}g^{5}\}$, \\ $U_{4}=span\{41+8g+41g^{2}+8g^{3}+41g^{4}+8g^{5}\} =span\{1+(\omega)^{3} g+(\omega ^{3})^{2}g^{2}+(\omega^{3})^{3}g^{3}+(\omega^{3})^{4}g^{4}+(\omega^{3})^{5}g^{5}\}$, \\$U_{5}=span\{41+5g+3g^{2}+41g^{3}+5g^{4}+3g^{5}\} =span\{1+(\omega)^{4} g+(\omega ^{4})^{2}g^{2}+(\omega^{4})^{3}g^{3}+(\omega^{4})^{4}g^{4}+(\omega^{4})^{5}g^{5}\}$, \\ $U_{6}=span\{41+46g+5g^{2}+8g^{3}+3g^{4}+44g^{5}\}=span\{1+(\omega)^{5} g+(\omega ^{5})^{2}g^{2}+(\omega^{5})^{3}g^{3}+(\omega^{5})^{4}g^{4}+(\omega^{5})^{5}g^{5}\}$, after multiplying by $6$, the inverse of $41$. This confirms the theorem \ref{rd11}. \\ \textbf{Input}: $n=65, m=4,m^{-1}=49, \omega=8,l[1]=1,l[2]=26,l[3]=40,l[4]=26$ \\ \textbf{Output}: The idempotent in $\mathbb{Z}_{65}G$ is $e=7+39g+46g^{2}+39g^{3}$.\\ A direct calculation verifies that all outputs are correct. \section{Bilinear Forms and Circulant Matrices} Let ring $R$ be a commutative halidon ring with index $m$ and primitive $m^{th}$ root of unity $\omega$. Let $G$ be a cyclic group of order $m$, generated by $g$. We define $ g_{i}=g^{i-1} $. $ \therefore g_{i}g_{j}=g_{i+j-1}$; $i=1,2,3,....,m$. By the extension theorem of Higman, we have $RG\cong R^{m}$ as $R$-algebras and the isomorphism $\rho$ is given by $$\rho\left(\sum_{i=1}^{m}\alpha_{i}g_{i}\right)=(\lambda_{1},\lambda_{2},\lambda_{3}....,\lambda_{m})$$ where $$\lambda_{i}=\sum_{r=1}^{m}\alpha_{m-r+1}(\omega^{i-1})^{r-1}.$$ Since $\{g_{i}\}$ is an $R$-basis for $RG$, $\{\rho(g_{i})\}$ is a basis for $R^{m}$ and \\ $s_{1}=\rho(g_{1})=(1,1,1,...,1)$, \\ $s_{2}=\rho(g_{2})=(1,\omega^{m-1},(\omega^{m-1})^{2},...,(\omega^{m-1})^{m-1})$,\\ $s_{3}=\rho(g_{3})=(1,\omega^{m-2},(\omega^{m-2})^{2},...,(\omega^{m-2})^{m-1})$,\\.............,\\ $s_{m}=\rho(g_{m})=(1,\omega,\omega^{2},...,\omega^{m-1})$. \\ Let $\{e_{i}\}$ be the standard basis in $R^{m}$. Then \\ $s_{1}=e_{1}+e_{2}+e_{3}+...+e_{m}$, \\ $s_{2}=e_{1}+\omega^{m-1}e_{2}+(\omega^{m-1})^{2}e_{3}+...+(\omega^{m-1})^{m-1})e_{m}$,\\ $s_{3}=e_{1}+\omega^{m-2}e_{2}+(\omega^{m-2})^{2}e_{3}+...+(\omega^{m-2})^{m-1})e_{m}$,\\......................................,\\ $s_{m}=e_{1}+\omega e_{2}+\omega^{2}e_{3}+...+\omega^{m-1})e_{m}$. \\ This gives $\left( \begin{array}{c} s_{1} \\ s_{2} \\s_{3} \\\dots \\ s_{m} \end{array} \right)$ = $\left( \begin{array}{ccccc} 1 & 1 & 1 & \dots & 1 \\ 1 & \omega^{m-1} & (\omega^{m-1})^{2} & \dots & (\omega^{m-1})^{m-1} \\ 1 & \omega^{m-2} & (\omega^{m-2})^{2} & \dots & (\omega^{m-2})^{m-1} \\ \dots & \dots & \dots & \dots & \dots \\ 1 & \omega & (\omega)^{2} & \dots & (\omega^{m-1}) \\ \end{array} \right)$ $\left( \begin{array}{c} e_{1} \\ e_{2} \\e_{3}\\ \dots \\ e_{m} \end{array} \right)$ $$s^{T}=\Phi^{*}e^{T}$$ $$\therefore \quad \quad e^{T}=\frac{1}{m}\Phi s^{T}$$ where $$\Phi=\left( \begin{array}{ccccc} 1 & 1 & 1 & ..... & 1 \\ 1 & \omega & \omega^{2} & ..... & \omega^{m-1} \\ 1 & \omega^{2} &(\omega^{2})^{2} & ..... & (\omega^{2})^{m-1}\\ . & . & . & ..... & . \\ . & . & . & ..... & . \\ . & . & . & ..... & . \\ 1 & \omega^{m-1} & (\omega^{m-1})^{2} & ..... & (\omega^{m-1})^{m-1}\\ \end{array} \right)$$ and $\Phi^{*}$ is the $\Phi$ conjugate transposed\cite{pjd}. Thus we have the following theorem. \begin{theorem} \label{r1} Let ring $R$ be commutative halidon ring with index $m$ and primitive $m^{th}$ root of unity $\omega$. Let $G$ be a cyclic group of order $m$, generated by $g$. We define $ g_{i}=g^{i-1} $ ; $i=1,2,3,....,m$ and let $\{ s_{i}\}$ be the image of $\{ g_{i}\}$ under the isomorphism $RG\cong R^{m}$ and let $\{ e_{i}\}$ be the standard basis for $R^{n}$. Then $s^{T}=\Phi^{*}e^{T}$ or $ e^{T}=\frac{1}{m}\Phi s^{T}$. \end{theorem} For each $u=(u_{1},u_{2},u_{3},...,u_{m})\in R^{m}$, we define $C_{u}=circu(u_{1},u_{2},u_{3}...,u_{m})$. Also, we define $f_{u}: R^{m} \times R^{m}\longrightarrow R$ by $$f_{u}(x,y)=<x,y>_{u}=xC_{u}y^{T}$$ for every $x=(x_{1},x_{2},x_{3}...,x_{m}),y=(y_{1},y_{2},y_{3}...,y_{m}) \in R^{m}$. We adopt some standard definitions of bilinear form for $<x,y>_{u}$. $<x,y>_{u}$ is said to $symmetric$ if $<x,y>_{u}=<y,x>_{u}$ for every $x,y \in R^{m}$. It is said to be $skewsymmetric$ if $<x,y>_{u}=-<y,x>_{u}$ for every $x,y \in R^{m}$. $<x,y>_{u}$ is said to $alternating$ if $<x,x>_{u}=0$ for every $x \in R^{m}$ \cite{sl}. \begin{theorem} \label{r2} $f_{u}$ is a bilinear form and \begin{eqnarray*} <s_{i},s_{j}>_{u}&=&m(u_{1}+u_{2}\omega^{i-1}+u_{3}(\omega^{i-1})^{2}+...+u_{m}(\omega^{i-1})^{m-1}), \\ \text{if} \ i+j=2 \ (mod \ m) \\ &=&0 \quad \quad \text{otherwise}. \end{eqnarray*} \end{theorem} \begin{proof} It is clear that $f_{u}$ is a bilinear form. \begin{eqnarray*}<e_{i},e_{j}>_{u}=e_{i}C_{u}e_{j}^{T}&=&u_{j-i+1} \quad \text{if}\quad i\leq j \\ &=&u_{m+j-i+1} \quad \text{if} \quad i >j . \end{eqnarray*}$ <s_{i},s_{j}>_{u}=<e_{1}+\omega^{m-i+1}e_{2}+(\omega^{m-i+1})^{2}e_{3}+...+(\omega^{m-i+1})^{m-1})e_{m}, \\ e_{1}+\omega^{m-j+1}e_{2}+(\omega^{m-j+1})^{2}e_{3}+...+(\omega^{m-j+1})^{m-1})e_{m}>_{u} \\ = (u_{1}+\omega^{m-j+1}u_{2}+(\omega^{m-j+1})^{2}u_{3}+...+(\omega^{m-j+1})^{m-1})u_{m})\\+ (\omega^{m-i+1})(u_{m}+\omega^{m-j+1}u_{1}+(\omega^{m-j+1})^{2}u_{2}+...+(\omega^{m-j+1})^{m-1})u_{m-1})\\ +(\omega^{m-i+1})^{2}(u_{m-1}+\omega^{m-j+1}u_{m}+(\omega^{m-j+1})^{2}u_{1}+...+(\omega^{m-j+1})^{m-2})u_{m-1}) \\ +... +(\omega^{m-i+1})^{m-1}(u_{2}+\omega^{m-j+1}u_{3}+(\omega^{m-j+1})^{2}u_{4}+...+(\omega^{m-j+1})^{m-1})u_{1})\\ \\ =u_{1}(1+\omega^{2m-i-j+2})+(\omega^{2m-i-j+2}))^{2}+...+(\omega^{2m-i-j+2}))^{m-1})\\ +u_{2}\omega^{m-i+1}(1+\omega^{2m-i-j+2})+(\omega^{2m-i-j+2}))^{2}+...+(\omega^{2m-i-j+2}))^{m-1})\\ u_{3}(\omega^{m-i+1})^{2}(1+\omega^{2m-i-j+2})+(\omega^{2m-i-j+2}))^{2}+...+(\omega^{2m-i-j+2}))^{m-1})\\ +...+ u_{m}(\omega^{m-i+1})^{m-1}(1+\omega^{2m-i-j+2})+(\omega^{2m-i-j+2}))^{2}+...+(\omega^{2m-i-j+2}))^{m-1}) \\ \\ =(1+\omega^{2m-i-j+2}+(\omega^{2m-i-j+2}))^{2}+...+(\omega^{2m-i-j+2}))^{m-1})\\ (u_{1}+u_{2}\omega^{m-j+1}+u_{3}(\omega^{m-j+1})^{2}+...+u_{m}(\omega^{m-j+1})^{m-1})\\$ \begin{eqnarray*}\omega^{2m-i-j+2}&=&1 \quad \text{if} \quad i+j=2 \ ( mod \ m) \\ &\neq& 1 \quad \text{otherwise}\end{eqnarray*} \begin{eqnarray*} \therefore <s_{i},s_{j}>_{u}&=&m(u_{1}+u_{2}\omega^{i-1}+u_{3}(\omega^{i-1})^{2}+...+u_{m}) \quad \text{if} \ i+j=2 \ ( mod \ m) \\ &=&0 \quad \quad \text{otherwise}. \end{eqnarray*} Hence the proof. \end{proof} \begin{corollary} $<s_{i},s_{j}>_{u}=0$ for all $i,j \in \{1,2,3,,,,m\}$ if and only if $u=0$. \end{corollary} \begin{proof} If $u=0$, there is nothing to prove. \\ By theorem \ref{r2}, $<s_{i},s_{j}>_{u}=0$ for all $i,j$ other than $i+j=2 \ ( mod \ m)$. So it is enough to consider $<s_{i},s_{j}>_{u}=0$ for $i+j=2 \ ( mod \ m)$. Since $m$ is invertible in $R$, $<s_{i},s_{j}>_{u}=0$ for $i+j=2 \ ( mod \ m)$ implies \\ \begin{eqnarray*} u_{1}+u_{2}+u_{3}+...+u_{m}&=&0 \\ u_{1}+u_{2}\omega+u_{3}(\omega)^{2}+...+u_{m}(\omega)^{m-1}&=&0 \\ u_{1}+u_{2}\omega^{2}+u_{3}(\omega^{2})^{2}+...+u_{m}(\omega^{2})^{m-1}&=&0 \\ ............................................................ \\ u_{1}+u_{2}\omega^{m-1}+u_{3}(\omega^{m-1})^{2}+...+u_{m}(\omega^{m-1})^{m-1}&=&0 \\ \end{eqnarray*} This can be put into the matrix form $\Phi u^{T}=0$. Since $\Phi^{-1}$ exists, $u^{T}=0$ and therefore $u=0$. \end{proof} We write $x\perp y$ if $<x,y>_{u}=0$. We define $(R^{m})^{\perp}= \{x\in R^{m} |<x,y>_{u}=0 \ \text{for all} \ y\in R^{m} \}$. We say that $<x,y>_{u}$ is $nondegenerate$ if $(R^{m})^{\perp}=\{ 0 \}$. \begin{corollary} \label{r3} $<x,y>_{u}$ is a $nondegenerate$ bilinear form if $<s_{i},s_{j}>_{u}$ $\in U(R)$ for all $i$ and $j$ such that $i+j=2 \ ( mod \ m)$. \end{corollary} \begin{proof} $ <x,y>_{u}$=$\sum_{i,j}x_{i}y_{j}<s_{i},s_{j}>_{u}=\sum_{i+j=2mod(m)}x_{i}y_{j}<s_{i},s_{j}>_{u}$ by \ref{r2}. \\ Therefore $<x,y>_{u}=x_{1}y_{1}<s_{1},s_{1}>_{u}+x_{2}y_{m}<s_{2},s_{m}>_{u}+ \\ x_{3}y_{m-1}<s_{3},s_{m-1}>_{u}+....+ x_{m}y_{2}<s_{m},s_{2}>_{u}$ \\ $<x,y>_{u}= 0 \Longrightarrow x_{1}y_{1}<s_{1},s_{1}>_{u}+x_{2}y_{m}<s_{2},s_{m}>_{u}+ \\ x_{3}y_{m-1}<s_{3},s_{m-1}>_{u}+....+ x_{m}y_{2}<s_{m},s_{2}>_{u}=0$ \\ $\Longrightarrow\left( \begin{array}{ccccc} x_{1}<s_{1},s_{1}>_{u} & x_{2}<s_{2},s_{m}>_{u} & x_{3}<s_{3},s_{m-1}>_{u} & ... & x_{m}<s_{m},s_{2}>_{u} \\ \end{array} \right)\\ \left( \begin{array}{c} y_{1} \\ y_{m} \\ y_{m1}\\ . \\ y_{2} \\ \end{array} \right) =0 $. Since this is true for all $y=(y_{1},y_{2},y_{3},...y_{m})$, \\ $\left( \begin{array}{ccccc} x_{1}<s_{1},s_{1}>_{u} & x_{2}<s_{2},s_{m}>_{u} & x_{3}<s_{3},s_{m-1}>_{u} & ..... & x_{m}<s_{m},s_{2}>_{u} \\ \end{array} \right)$ \\ =(0,0,..,0) \\ $\Longrightarrow x_{1}<s_{1},s_{1}>_{u}=0, x_{2}<s_{2},s_{m}>_{u}=0, x_{3}<s_{3},s_{m-1}>_{u} =0.. \\ x_{m}<s_{m},s_{2}>_{u}=0$ \\ $ x_{1}=x_{2}=x_{3}=...=x_{m}=0$ only when $<s_{i},s_{j}>_{u}\in U(R)$ for $i+j=2 \ (mod \ m)$. \\ Thus $(R^{m})^{\perp}=\{0\}$ and therefore $<x,y>_{u}$ is a nondegenerate bilinear form. \end{proof} \begin{corollary} Let $<x,y>_{u}$ be a nondegenerate bilinear form. Then $M=(<s_{i},s_{j}>)$ is an invertible matrix of order m. \end{corollary} \begin{proof} By theorem \ref{r2}, the matrix M can be written as \\ $M=\left( \begin{array}{cccccc} <s_{1},s_{1}>_{u} & 0 & 0 & ...&0 & 0 \\ 0 & 0 & 0 & ... & 0 & <s_{2},s_{m}>_{u} \\ 0 & 0 & 0 & ... & <s_{3},s_{m-1}>_{u}& 0 \\ ... & ... & ... & ... & ... &...\\ 0 & <s_{m},s_{2}>_{u} & 0 & ... & 0 &0\\ \end{array} \right)$ \\ Clearly $D=det \ M = \pm <s_{1},s_{1}>_{u}<s_{2},s_{m}>_{u}<s_{2},s_{m-1}>_{u}.....<s_{m},s_{2}>_{u}$ and the sign is depending on $m$. By corollary \ref{r3}, $D \in U(R)$. So $M^{-1}$ exists and $M^{-1}$ is given by \\ $M^{-1}=\left( \begin{array}{cccccc} <s_{1},s_{1}>_{u}^{-1} & 0 & 0 & ...&0 & 0 \\ 0 & 0 & 0 & ... & 0 & <s_{m},s_{2}>_{u}^{-1} \\ 0 & 0 & 0 & ... & <s_{m-1},s_{3}>_{u}^{-1}& 0 \\ ... & ... & ... & ... & ... &...\\ 0 & <s_{2},s_{m}>_{u}^{-1} & 0 & ... & 0 &0\\ \end{array} \right)$. \end{proof} \begin{corollary} Let $R=Z_{n}$ be the ring integers modulo $n$. It is a halidon ring with maximum index $m_{max}=\psi(n)$; where $\psi(n)$ is the halidon function. Then the number of nondegerate bilinear forms $<x,y>_{u}$ is $\phi(n)^{\psi(n)}$. \end{corollary} \begin{proof} By \ref{r3}, $<x,y>_{u}$ is nondegenrate if and only if $<s_{i},s_{j}>_{u}$ $\in U(R)$ for all $i$ and $j$ such that $i+j=2 \ ( mod \ m)$. Here $|U(R)|=\phi(n)$ and $m=\psi(n)$. Therefore $|<x,y>_{u}|$=$\phi(n)^{\psi(n)}$. \end{proof} \begin{theorem} Let $C=\{ C_{u}| u=(u_{1},u_{2},u_{3},...,u_{m})\in R^{m}\}$ and let G be as in theorem \ref{r1}. Then $C$ is an R-algebra. \end{theorem} \begin{proof} Let $u=(u_{1},u_{2},u_{3},...,u_{m}), v=(v_{1},v_{2},v_{3},...,v_{m})\in R^{m}$ be any two elements in $R$. Since $RG\cong R^{m}$, we can identify the elements $u$ and $v$ as $\sum_{i=1}^{m}\alpha_{i}g_{i}$ and $\sum_{i=1}^{m}\beta_{i}g_{i}$ respectively, where $$u_{i}=\sum_{r=1}^{m}\alpha_{m-r+2}(\omega^{i-1})^{r-1}.$$ and $$v_{i}=\sum_{r=1}^{m}\beta_{m-r+2}(\omega^{i-1})^{r-1}.$$ Since $R$ is a halidon ring with index $m$ and $\omega$ is a primitive $m^{th}$ root of unity, the circulant matrix $C_{u}$ can be written as $$C_{u}=\frac{1}{m}\Phi \Lambda_{u}\Phi^{*}, $$ where $$\Lambda_{u}= diag(\lambda_{1},\lambda_{2},\lambda_{3}....,\lambda_{m})$$ such that $$\lambda_{i}=\sum_{r=1}^{m}u_{i}(\omega^{(i-1)})^{(r-1)}$$ and $\Phi^{*}$ is the conjugate transposed of $\Phi$ \cite{pjd}and $\frac{1}{m}\Phi\Phi^{*}=I=\frac{1}{m}\Phi^{*}\Phi$. Clearly $\Lambda_{u}\Lambda_{v}=\Lambda_{uv}.$ \begin{eqnarray*} \therefore C_{uv}&=& \frac{1}{m}\Phi \Lambda_{uv}\Phi^{*} \\ &=& \frac{1}{m}\Phi \Lambda_{u}\Lambda_{v}\Phi^{*} \\ &=& \frac{1}{m}\Phi \Lambda_{u}\frac{1}{m}\Phi^{*}\Phi\Lambda_{v}\Phi^{*} \\ &=& (\frac{1}{m}\Phi \Lambda_{u}\Phi^{*})(\frac{1}{m}\Phi\Lambda_{v}\Phi^{*}) \\ &=& C_{u}C_{v} \\ \end{eqnarray*} We define $h:R^{m}\rightarrow C$ by $h(u)=C_{u}$; which is clearly an algebra isomorphism. $\therefore R^{m} \cong C. $ And hence the theorem. \end{proof} \begin{theorem} Let $B=\{ <x,y>_{u}|<x,y>_{u}=xC_{u}y^{T}, \text{for each} \ u\in R^{m}, x,y \in R^{m} \}$. Then $B$ is an $R$-module. \end{theorem} \begin{proof} Let $\alpha \in R$ be any element in R. Then $<x,y>_{u+v}=<x,y>_{u}+ \\ <x,y>_{v}$ and $<x,y>_{\alpha u}= \alpha<x,y>_{u}$. Therefore $B$ is an $R$-module. \end{proof} \section{Discrete Fourier Transforms} In this section, we deal with the ring of polynomials over a halidon ring which has an application in Discrete Fourier Transforms \cite{jj}. Throughout this section, let $R$ be a finite commutative halidon ring with index $m$ and $R[x]$ denotes the ring of polynomials degree less than $m$ over $R$. \begin{definition} \cite{jj} Let $\omega \in R$ be a primitive $m^{th}$ root of unity in $R$ and let $f(x)=\sum \limits_{j=0}^{m-1} f_{j}x^{j} \in R[x]$ with its coefficients vector $(f_{0},f_{1},f_{2},....,f_{m-1}) \in R^{m}$. The \textbf{Discrete Fourier Transform} (DFT) is a map $$ DFT_{\omega}: R[x]\rightarrow R^{m}$$ defined by $$DFT_{\omega}(f(x))=(f_{0}(1),f_{1}(\omega),f_{2}(\omega^{2}),....,f_{m-1}(\omega^{m-1})).$$ \end{definition}\noindent \begin{remark} Clearly $DFT_{\omega}$ is a $R$-linear map as $DFT_{\omega}(af(x)+bg(x))=aDFT_{\omega}(f(x))+bDFT_{\omega}(g(x))$ for all $ a, b \in R$. Also, if $R= \mathbb{C}$, the field of complex numbers, then $\omega=cos(\frac{2 \pi}{m})+i sin(\frac{2 \pi}{m})=e^{i\frac{2 \pi}{m}}$ and the Fourier series will become the ordinary series of sin and cos functions. \end{remark} \begin{definition} \cite{jj} The \textbf{convolution} of $f(x)=\sum \limits_{j=0}^{m-1} f_{j}x^{j}$ and $g(x)=\sum \limits_{k=0}^{m-1} g_{k}x^{k}$ in $R[x]$ is defined by $h(x)=f(x)*g(x)= \sum \limits_{l=0}^{m-1} h_{l}x^{l} \in R[x]$ where \quad $h_{l}=\sum \limits_{j+k=l \ mod \ m} f_{j}g_{k}=\sum \limits_{j=0}^{m-1} f_{j}g_{l-j}$ for $0 \leq l < m$. \end{definition} The notion of convolution is equivalent to polynomial multiples in the ring $R[x]/<x^{m}-1>$. The $l^{th}$ coefficient of the product $f(x)g(x)$ is $\sum \limits_{j+k=l \ mod \ m} f_{j}g_{k}$ and hence $$f(x)*g(x)= f(x)g(x) \ mod (x^{m}-1).$$ \begin{proposition} \cite{jj} For polynomials $f(x),g(x) \in R[x],$ $DFT_{\omega}(f(x)*g(x))=DFT_{\omega}(f(x)).DFT_{\omega}(g(x)),$ where . denotes the pointwise multiplication of vectors. \end{proposition} \begin{proof} $f(x)*g(x)= f(x)g(x) +q(x)(x^{m}-1)$ for some $q(x) \in R[x]$. \\ Replace $x$ by $\omega^{j}$, we get \\ $$f(\omega^{j})*g(\omega^{j})= f(\omega^{j})g(\omega^{j}) +0.$$ $$\therefore \quad \quad \quad DFT_{\omega}(f(x)*g(x))=DFT_{\omega}(f(x)).DFT_{\omega}(g(x)). $$ \end{proof} \begin{theorem} For a polynomial $f(x) \in R[x],$ $DFT_{\omega}^{-1}(f(x))= \frac{1}{m}DFT_{\omega^{-1}}(f(x)).$ \end{theorem} \begin{proof} The matrix of the transformation $DFT_{\omega}(f(x))$ is $$[DFT_{\omega}(f(x))]=\phi=\left( \begin{array}{ccccc} 1 & 1 & 1 & ..... & 1 \\ 1 & \omega & \omega^{2} & ..... & \omega^{m-1} \\ 1 & \omega^{2} &(\omega^{2})^{2} & ..... & (\omega^{2})^{m-1}\\ . & . & . & ..... & . \\ . & . & . & ..... & . \\ . & . & . & ..... & . \\ 1 & \omega^{m-1} & (\omega^{m-1})^{2} & ..... & (\omega^{m-1})^{m-1}\\ \end{array} \right) $$ The matrix $\phi$ is the well known Vandermonde matrix and its inverse is $\frac{1}{m}\phi^{*}$, where $\phi^{*}$ is the matrix transpose conjugated \cite{pjd}. Since $\phi$ is a square matrix and the conjugate of $\omega$ is $\omega^{-1}$, we have $DFT_{\omega}^{-1}(f(x))= \frac{1}{m}DFT_{\omega^{-1}}(f(x)).$ \end{proof} \begin{example} \label{rd6} We know that $R=Z_{49}$ is a halidon ring with index $m=6$ and $\omega=19$. Also, $\omega^{-1}=\omega^{5}=31$. Let $f(x)=2+x+2x^{2}+3x^{3}+5x^{4}+10x^{5} \in R[x].$ Then $DFT_{\omega}(f(x))$ can be expressed as \newline $ \left( \begin{array}{c} F_{0} \\ F_{1} \\ F_{2} \\ F_{3} \\ F_{4} \\ F_{5} \\ \end{array} \right)$ $=$ $\left( \begin{array}{cccccc} 1 & 1 & 1 & 1 &1 & 1 \\ 1 & \omega & \omega^{2} &\omega^{3} & \omega^{4} & \omega^{5} \\ 1 & \omega^{2} & \omega^{4} &1& \omega^{2} & \omega^{4} \\ 1 & \omega^{3} & 1 &\omega^{3} & 1 & \omega^{3} \\ 1 & \omega^{4} & \omega^{2} &1 & \omega^{4} & \omega^{2} \\ 1 & \omega^{5} & \omega^{4} &\omega^{3} & \omega^{2} & \omega \\ \end{array} \right)$ $ \left( \begin{array}{c} f_{0} \\ f_{1} \\ f_{2} \\ f_{3} \\ f_{4} \\ f_{5} \\ \end{array} \right)$ $\Rightarrow$ $ \left( \begin{array}{c} F_{0} \\ F_{1} \\ F_{2} \\ F_{3} \\ F_{4} \\ F_{5} \\ \end{array} \right)$ $=$ $ \left( \begin{array}{c} 23 \\ 24 \\ 32 \\ 44 \\ 9 \\ 27 \\ \end{array} \right)$ $ \left( \begin{array}{c} f_{0} \\ f_{1} \\ f_{2} \\ f_{3} \\ f_{4} \\ f_{5} \\ \end{array} \right)$ $=6^{-1}$$\left( \begin{array}{cccccc} 1 & 1 & 1 & 1 &1 & 1 \\ 1 & \omega^{5} & \omega^{4} &\omega^{3} & \omega^{2} & \omega \\ 1 & \omega^{4} & \omega^{2} &1& \omega^{4} & \omega^{2} \\ 1 & \omega^{3} & 1 &\omega^{3} & 1 & \omega^{3} \\ 1 & \omega^{2} & \omega^{4} &1 & \omega^{2} & \omega^{4} \\ 1 & \omega & \omega^{2} &\omega^{3} & \omega^{4} & \omega^{5} \\ \end{array} \right)$ $ \left( \begin{array}{c} F_{0} \\ F_{1} \\ F_{2} \\ F_{3} \\ F_{4} \\ F_{5} \\ \end{array} \right)$ \newline $\Rightarrow$ $ \left( \begin{array}{c} f_{0} \\ f_{1} \\ f_{2} \\ f_{3} \\ f_{4} \\ f_{5} \\ \end{array} \right)$ $=41$$\left( \begin{array}{cccccc} 1 & 1 & 1 & 1 &1 & 1 \\ 1 & 31 & 30 &48 & 18 & 19 \\ 1 & 30 & 18 &1& 30 & 18 \\ 1 & 48 & 1 &48 & 1 & 48 \\ 1 & 18 & 30 &1 & 18 & 30 \\ 1 & 19& 18 &48 & 30 & 31 \\ \end{array} \right)$ $ \left( \begin{array}{c} F_{0} \\ F_{1} \\ F_{2} \\ F_{3} \\ F_{4} \\ F_{5} \\ \end{array} \right)$ \newline If $ \left( \begin{array}{c} F_{0} \\ F_{1} \\ F_{2} \\ F_{3} \\ F_{4} \\ F_{5} \\ \end{array} \right)$ $=$ $ \left( \begin{array}{c} 23 \\ 24 \\ 32 \\ 44 \\ 9 \\ 27 \\ \end{array} \right)$, then a direct calculation gives $ \left( \begin{array}{c} f_{0} \\ f_{1} \\ f_{2} \\ f_{3} \\ f_{4} \\ f_{5} \\ \end{array} \right)$ $=$ $ \left( \begin{array}{c} 2 \\ 1 \\ 2 \\ 3 \\ 5 \\ 10 \\ \end{array} \right)$ \newline as expected. \end{example} The programme-6 and programme-7 will enable us to calculate Discrete Fourier Transform and its inverse. We can cross-check the programmes against example \ref{rd6}. \\ If $R=Z_{100001}$, $m=10$, $\omega=26364$ and $f(x)=1+2x+3x^{2}+4x^{3}+5x^{4}+6x^{5}+7x^{6}+8x^{7}+9x^{8}+x^{9} \in R[x]$, then $ \left( \begin{array}{c} F_{0} \\ F_{1} \\ F_{2} \\ F_{3} \\ F_{4} \\ F_{5} \\ F_{6} \\ F_{7} \\ F_{8} \\ F_{9} \\ \end{array} \right)$ $=$ $ \left( \begin{array}{c} 46 \\ 19019 \\ 3314 \\ 10082 \\ 48017 \\ 4 \\ 80347 \\ 18172 \\ 68413 \\ 52627 \\ \end{array} \right)$. \\ Also, we can verify the inverse DFT using the above data. \\ \section{Conclusions} The halidon rings are useful to extend the two famous theorems of Graham Higman(1940) and Maschke(1899). Since Higman's theorem and Maschke's theorem have a wide range of applications in group rings, group algebras and representation theory, there is a big scope of wider applications of halidon rings. The field of complex numbers is an infinite halidon ring with any index $m>0 $. The field of real numbers is an infinite halidon ring with index 2 and the ring integers is a trivial halidon ring with index m=1. Using the field of complex numbers, we can create infinite halidon rings of square matrices with any index $m>0$. This will open new vistas of applications in algebra and number theory. Another area of application is the coding theory on which the author is currently working with. \\ \textbf{Acknowledgment} I am very much indebted to Prof. M.I.Jinnah, Former Head of Mathematics, University of Kerala, India, for his constructive suggestions and support.
\section{Introduction} \label{sec:intro} Oriented percolation on ${\ensuremath{\mathbb Z}} ^d$ is a classical model in probability theory and statistical physics, whose behaviour is relatively well understood with many of the main advances on the subject dating back to the 1980s (see \cites{Durrett84,Liggett05,Liggett99,Hinrichsen00} for comprehensive expositions). It is also essentially equivalent to the well-known contact process, but also linked to many other models and often used as a tool in proofs. In this work we study the supercritical phase of a natural generalisation of oriented site percolation on ${\ensuremath{\mathbb Z}} ^d$ with arbitrary finite neighbourhood, which we define next. Our goal is to examine the importance of symmetry and planarity to the qualitative behaviour of oriented percolation. The generalisation is further motivated by its relations with probabilistic cellular automata and bootstrap percolation, as discussed in \cref{sec:background}. \subsection{Model} \label{subsec:model} Our model of interest is \emph{generalised oriented site percolation} (GOSP) on ${\ensuremath{\mathbb Z}} ^d$ for $d\ge 2$. The model is defined by a \emph{neighbourhood}---a finite set $X\subset {\ensuremath{\mathbb Z}} ^d\setminus\{\ensuremath{\mathbf{o} }\}$ ($\ensuremath{\mathbf{o} }$ shall denote the origin of ${\ensuremath{\mathbb Z}} ^d$) with $|X|\ge 2$ such that \begin{equation} \label{eq:orientation} \exists \ensuremath{\mathbf{u} }\in {\ensuremath{\mathbb R}} ^d,\forall \ensuremath{\mathbf{x} }\in X:\quad\<\ensuremath{\mathbf{x} },\ensuremath{\mathbf{u} }\>>0, \end{equation} which ensures the orientation of the model, and a \emph{parameter} $p\in[0,1]$. For convenience we will always assume that $\ensuremath{\mathbf{u} }=\ensuremath{\mathbf{e} }_d$, where $(\ensuremath{\mathbf{e} }_i)_{i=1}^d$ denotes the canonical basis of ${\ensuremath{\mathbb R}} ^d$ and that the group generated by $X$ is ${\ensuremath{\mathbb Z}} ^d$. This can be achieved by an invertible linear transformation of ${\ensuremath{\mathbb Z}} ^d$ and, possibly, a restriction to a sublattice. We denote by ${\ensuremath{\mathbb P}} _p$ the product Bernoulli measure of parameter $p$ on ${\ensuremath{\mathbb Z}} ^d$. The \emph{configuration} $\omega\in\Omega=\{0,1\}^{{\ensuremath{\mathbb Z}} ^d}$ is assumed to be distributed according to this measure. We endow the vertex set ${\ensuremath{\mathbb Z}} ^d$ with the locally finite translation-invariant oriented graph structure with edge set $\{(\ensuremath{\mathbf{a} },\ensuremath{\mathbf{a} }+\ensuremath{\mathbf{x} }):\ensuremath{\mathbf{a} }\in{\ensuremath{\mathbb Z}} ^d,\ensuremath{\mathbf{x} }\in X\}$ generated by $X$ (see \cref{fig:example}). We refer to this graph as ${\ensuremath{\mathbb Z}} ^d$ when $X$ is clear from the context and $\ensuremath{\mathcal G}_{X}$ otherwise. One can naturally identify $\o\in\O$ with the set of \emph{open sites} $\{\ensuremath{\mathbf{x} }\in{\ensuremath{\mathbb Z}} ^d:\omega_\ensuremath{\mathbf{x} }=1\}\subset{\ensuremath{\mathbb Z}} ^d$, all other sites being \emph{closed}. The open sites induce a subgraph of $\ensuremath{\mathcal G}_X$ by keeping all edges between open sites. We can then introduce the following variant of the natural notion of being connected in this graph. For any $\ensuremath{\mathbf{a} }, \ensuremath{\mathbf{b} }\in {\ensuremath{\mathbb Z}} ^d$ we say that \emph{$\ensuremath{\mathbf{a} }$ infects $\ensuremath{\mathbf{b} }$} (there is a path from $\ensuremath{\mathbf{a} }$ to $\ensuremath{\mathbf{b} }$) and write $\ensuremath{\mathbf{a} }\to \ensuremath{\mathbf{b} }$ for the event that there exists a sequence of open vertices $\ensuremath{\mathbf{a} }_1,\dots, \ensuremath{\mathbf{a} }_m=\ensuremath{\mathbf{b} }$ such that $\ensuremath{\mathbf{a} }_1-\ensuremath{\mathbf{a} }\in X$ and $\ensuremath{\mathbf{a} }_i-\ensuremath{\mathbf{a} }_{i-1}\in X$ for all $i\in[2,m]$. Note that we do not require for $\ensuremath{\mathbf{a} }$ to be open in order for $\ensuremath{\mathbf{a} }\to \ensuremath{\mathbf{b} }$ to occur. We make this choice so that $\ensuremath{\mathbf{a} }\to \ensuremath{\mathbf{b} }$ and $\ensuremath{\mathbf{b} }\to \ensuremath{\mathbf{c} }$ are independent for all $\ensuremath{\mathbf{a} },\ensuremath{\mathbf{b} },\ensuremath{\mathbf{c} }\in{\ensuremath{\mathbb Z}} ^d$. For any $B\subset {\ensuremath{\mathbb Z}} ^d$ we further define $\ensuremath{\mathbf{a} }\to[B]\ensuremath{\mathbf{b} }$ as $\ensuremath{\mathbf{a} }\to \ensuremath{\mathbf{b} }$ but with $\ensuremath{\mathbf{a} }_i\in B$ for $i\in[1,m]$. We write $\ensuremath{\mathbf{a} }\to[B]\infty$ for the existence of infinitely many $\ensuremath{\mathbf{b} }$ such that $\ensuremath{\mathbf{a} }\to[B]\ensuremath{\mathbf{b} }$ and similarly for $\infty\to[B]\ensuremath{\mathbf{b} }$. We further extend the notation by defining the event $C\to[B]D$ for $B,C,D\subset {\ensuremath{\mathbb Z}} ^d$ as $\exists \ensuremath{\mathbf{c} }\in C,\exists \ensuremath{\mathbf{d} }\in D$ such that $\ensuremath{\mathbf{c} }\to[B]\ensuremath{\mathbf{d} }$. We say that $C$ \emph{percolates} in $B$ if $C\to[B]\infty$. We define the \emph{order parameter} \[\theta(p)={\ensuremath{\mathbb P}} _p(\ensuremath{\mathbf{o} }\to\infty),\] the \emph{critical probability} \[{p_{\mathrm{c}}}={p_{\mathrm{c}}}(X)=\inf\{p>0:\theta(p)>0\}\] and say that \emph{there is percolation} at $p$ if $\theta(p)>0$ (by ergodicity this is equivalent to the a.s.\ existence of an infinite open path). Depending on the value of $p$, we may speak of \emph{subcritical}, \emph{critical} and \emph{supercritical} regimes. We focus on the study of the supercritical phase, where $\theta(p)>0$. It is convenient to view the last coordinate of ${\ensuremath{\mathbb Z}} ^d$ as the time in an interacting particle system. We therefore usually denote points in ${\ensuremath{\mathbb Z}} ^d$ by $(\ensuremath{\mathbf{x} },t)$ with $\ensuremath{\mathbf{x} }\in{\ensuremath{\mathbb Z}} ^{d-1}$ and $t\in{\ensuremath{\mathbb Z}} $. Let $R=\max\{t\in{\ensuremath{\mathbb Z}} :(\ensuremath{\mathbf{x} },t)\in X\}$ be the \emph{range} of $X$. Consider the slab $S_t={\ensuremath{\mathbb Z}} ^{d-1}\times({\ensuremath{\mathbb Z}} \cap [t,t+R))$ of width $R$ with normal vector $\ensuremath{\mathbf{e} }_d$, which we call \emph{time slab}, and denote $S=S_0$. Given an \emph{initial condition $A\subset S$} and a domain $B\subset{\ensuremath{\mathbb Z}} ^d$, which we omit if $B={\ensuremath{\mathbb Z}} ^{d-1}\times[R,\infty)$, the \emph{state at time $t\in{\ensuremath{\mathbb N}} $} is \[_B{\ensuremath{\xi}}^A_t=\left\{\ensuremath{\mathbf{b} }\in S:\exists \ensuremath{\mathbf{a} }\in A,\ensuremath{\mathbf{a} }\to[B] \ensuremath{\mathbf{b} }+t\ensuremath{\mathbf{e} }_d\right\},\] so $(_{{\ensuremath{\mathbb Z}} ^{d-1}\times[R,\infty)}{\ensuremath{\xi}}^{A}_t)_{t=0}^\infty=(\xi^A_t)_{t=0}^\infty$ is a Markov chain with state space $\{0,1\}^S$. For simplicity if $A=\{\ensuremath{\mathbf{o} }\}\subset S$, we write simply $\ensuremath{\mathbf{o} }$ instead of $A$. Finally, in the supercritical phase it is useful to define \[\bar{\ensuremath{\mathbb P}} _p={\ensuremath{\mathbb P}} _p(\cdot|\forall t\ge 0,{\ensuremath{\xi}}^\ensuremath{\mathbf{o} }_t\neq\varnothing).\] \subsection{Examples} \label{subsec:examples} Standard \emph{oriented percolation} in 2 dimensions (2dOP) can be defined by $X=\{(0,1),(1,1)\}$. However we will more customarily consider $X=\{(-1,1),(1,1)\}$ instead, which only spans half of ${\ensuremath{\mathbb Z}} ^2$, but we will mostly disregard this minor detail. We denote by ${p_{\mathrm{c}}^{\mathrm{OP}}}$ the critical probability of 2dOP. In higher dimensions the situation is more ambiguous and at least the choices $X=\{\ensuremath{\mathbf{e} }_i:i\in\{1,\dots,d\}\}$; $X'=\{\ensuremath{\mathbf{e} }_d+{\ensuremath{\varepsilon}} \ensuremath{\mathbf{e} }_i:i\in\{1,\dots,d-1\},{\ensuremath{\varepsilon}}\in\{-1,1\}\}$ and $X''=X'\cup \{\ensuremath{\mathbf{e} }_d\}$ for the neighbourhood could be legitimately called \emph{$d$-dimensional oriented percolation} ($d$dOP). For concreteness, we will use $d$dOP to refer to $X''$ and simply OP for generic statements. As a prototype example of neighbourhood which is not covered by the classical approach, but handled here, we retain the two-dimensional GOSP defined by $X=\{(-1,1),(0,1),(2,1)\}$ (see \cref{fig:example}). It exhibits the two main additional difficulties of GOSP w.r.t.\ 2dOP: lack of symmetry w.r.t.\ the vertical axis and the non-planarity. The latter property is witnessed by the fact that paths may jump over each other without intersecting (see \cref{fig:example}). \begin{figure} \begin{center} \begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=0.1\textwidth,y=0.05\textwidth] \foreach {\ensuremath{\xi}} in {1,...,7} {\foreach \y in {1,...,5} {\draw[->,color=gray] ({\ensuremath{\xi}},\y)--({\ensuremath{\xi}}-1,\y+1); \draw[->,color=gray] ({\ensuremath{\xi}},\y)--({\ensuremath{\xi}},\y+1); \draw[->,color=gray] ({\ensuremath{\xi}},\y)--({\ensuremath{\xi}}+2,\y+1);}} \draw[very thick, color=red] (1,1) -- (5,3) -- (5,4) -- (7,5) -- (9,6); \draw[very thick, color=green] (5,1) -- (4,2) -- (4,3) -- (6,4) -- (6,5) -- (5,6); \end{tikzpicture} \caption{The graph $\ensuremath{\mathcal G}_X$ on ${\ensuremath{\mathbb Z}} ^2$ for $X=\{(-1,1),(0,1),(2,1)\}$. The two thickened paths cross although there is no common vertex nor an edge pointing from one to the other. Here $S={\ensuremath{\mathbb Z}} \times\{0\}$, since $R=1$.\label{fig:example}} \end{center} \end{figure} \subsection{Results} \label{subsec:results} Denote by~$t^A(\ensuremath{\mathbf{x} })$ the \emph{hitting time} of~$\ensuremath{\mathbf{x} }\in\mathbb{Z}^{d-1}$ from $A$: \begin{equation}\label{eq:hittingtime} t^A(\ensuremath{\mathbf{x} }):= \min\left\{t:(\ensuremath{\mathbf{x} }, 0)\in\xi^A_t\right\}, \end{equation} and define the following subsets of~$S$: \begin{align} H^A_t&{}:= \left\{(\ensuremath{\mathbf{x} }, s)\in S: t^A(\ensuremath{\mathbf{x} })\leq t-s\right\},\label{eq:hitregion}\\ K^A_t&{}:= \left\{(\ensuremath{\mathbf{x} }, s)\in S: \xi_t^A(\ensuremath{\mathbf{x} }, s)=\xi_t^S(\ensuremath{\mathbf{x} }, s)\right\},\label{eq:coupledregion} \end{align} which we refer to as \emph{hit} and \emph{coupled regions} with initial condition $A$ respectively. We omit $A$ if it is $\ensuremath{\mathbf{o} }$. Our main result is the following. \begin{mainthm} \label{th:main} Consider a GOSP in any dimension $d\ge 2$. For any $p>{p_{\mathrm{c}}}$ there exists a deterministic convex compact set $U=U(p)\subset\mathbb R^{d-1}$ with non-empty interior such that for all~${\ensuremath{\varepsilon}}>0$, $\bar{\ensuremath{\mathbb P}} _p$-a.s., for every~$t$ large enough it holds that \begin{align} \label{eq:main:lower}H_t\cap K_t&{}\supset(((1-{\ensuremath{\varepsilon}})tU)\times[0,R))\cap{\ensuremath{\mathbb Z}} ^d,\\ \label{eq:main:upper}\xi^\ensuremath{\mathbf{o} }_t&{}\subset(((1+{\ensuremath{\varepsilon}})tU)\times[0,R))\cap{\ensuremath{\mathbb Z}} ^d.\end{align} The function $p\mapsto U(p)$ is continuous on $({p_{\mathrm{c}}},1]$ for the Hausdorff distance on non-empty compact subsets of ${\ensuremath{\mathbb R}} ^{d-1}$. Furthermore, for any open set $O\subset U$, considering the cone $C=\bigcup_{t>0}(tO\times\{t\})$, we have \begin{equation} \label{eq:restricted}{\ensuremath{\mathbb P}} _p\left(\exists \ensuremath{\mathbf{x} }\in C,\ensuremath{\mathbf{x} }\to[C]\infty\right)=1. \end{equation} \end{mainthm} Our second result provides more precise information in the near-critical regime in two dimensions. \begin{mainthm} \label{th:2d} For GOSP in two dimensions there exists $v\in{\ensuremath{\mathbb R}} $ such that \[\bigcap_{p>{p_{\mathrm{c}}}} \accentset{\circ}{U}(p)=\{v\},\] where $\accentset{\circ}{U}(p)$ is the interior of the limit shape from \cref{th:main}. \end{mainthm} \subsection{Organisation} \label{subsec:organisation} The paper is structured as follows. In \cref{sec:background} we provide the background for our work. In \cref{sec:preliminaries} we gather some preliminaries and notation. \Cref{sec:main,sec:2d} contain the proofs of \cref{th:main,th:2d} respectively. The proofs are quite long and involve numerous intermediate results of independent interest. Inevitably, some of the steps are already known or require little or no new input as compared to existing arguments for OP or for the contact process. Nevertheless, we choose to also present these steps (without their proofs), so that the new ingredients we provide can be fitted into the global strategy and the reader is not obliged to scour the vast and entangled literature for all the ``well-known'' ingredients necessary. Moreover, in order not to disturb the flow of reasoning and to single out the novel contributions, we gather them in \cref{app}. Hence, specialists aware of classical results in two and more dimensions and of more recent developments around shape theorems may be able to directly consult \cref{app}. \section{Background} \label{sec:background} We only discuss the supercritical regime, which is the focus of our work. Let us begin by emphasising that \cref{th:main,th:2d} are both known for OP and so are all intermediate results featuring in their proofs. More precisely, in the case of $d$dOP \cref{eq:main:lower,eq:main:upper} are due to \cites{Durrett83,Durrett91,Durrett82}; the continuity in \cref{th:main} was only recently established in \cite{Garet15}, based on \cites{Garet12,Garet14}; \cref{eq:restricted} was proved in \cite{Couronne04}*{Chapter 5}. Correspondingly, \cref{th:2d} for 2dOP was established in \cite{Durrett83} (see also \cites{Durrett84,Liggett05}). Following progress on OP, natural generalisations similar to GOSP have often been considered. For the sake of comparability, in the present discussion, we focus on the most restrictive interesting case: GOSP with $X\subset\{(\ensuremath{\mathbf{a} },1):\ensuremath{\mathbf{a} }\in {\ensuremath{\mathbb Z}} ^{d-1}\}$, like the example of \cref{fig:example}. These models exhibit the main difficulties inherent to GOSP and are known as \emph{percolation probabilistic cellular automata} (PPCA), 2dOP being called \emph{Stavskaya's PCA} in this context \cites{Stavskaya71,Toom01, Toom95,Toom90,Taggi15,Taggi18}. Bezuidenhout and Gray \cite{Bezuidenhout94} adapted the well-known renormalisation scheme of Bezuidenhout and Grimmett \cite{Bezuidenhout90} to show that in any dimension PPCA (and more general models) do not percolate at criticality. Their renormalisation will be the starting point of the proof of \cref{th:main}. In two dimensions an attempt at proving \cref{th:2d} and related results for PPCA (and more general models) was made by Durrett and Schonmann \cite{Durrett87}, themselves building on \cite{Durrett83}. Unfortunately, they imposed a restrictive technical assumption amounting to assuming that $X$ consists of consecutive sites. These neighbourhoods precisely lack the two main obstacles of GOSP---asymmetry and paths jumping over each other (see \cref{fig:example}). Furthermore, unaware of their work, Taggi \cites{Taggi15,Taggi18} claimed results for PPCA in two dimensions based on \cite{Durrett83}, as outlined in \cite{Durrett84}. Owing to non-planarity, his proof is only correct for neighbourhoods of consecutive sites. As we will see, \cite{Taggi15}*{Theorem 2.2} does indeed hold for all PPCA (and, more generally, GOSP), but requires a different treatment either based on higher dimensional techniques or on our enhancement of the approach of Durrett--Schonmann used to prove \cref{th:2d,th:main} respectively. Let us note that GOSP are a particular case of \emph{boostrap percolation} \cites{Morris17,Hartarsky21,Schonmann92}. As established in \cite{Hartarsky21} (see particularly Remark 5.7 there), \cref{th:main,th:2d} on GOSP can be used to obtain results for more general bootstrap percolation models, particularly in conjunction with quantitative bounds on the limit shape $U$, as discussed in the first arXiv version of the present work \cite{Hartarsky21GOSParxiv}*{Section 5.7}. Other related models and generalisations of OP, to which much of the present approach applies can be found in \cites{Durrett82,Bezuidenhout94,Durrett80,Wierman85} (also see \cites{Deshayes15}). \section{Preliminaries} \label{sec:preliminaries} \subsection{Duality} \label{subsec:duality} An important property of GOSP is that it is ``nearly'' self-dual (see \cites{Liggett05,Swart13} for background on duality). The dual of GOSP with neighbourhood $X$ can be thought of as a GOSP with paths moving ``backwards'' in time. More precisely, write $\ensuremath{\mathbf{a} }\leadsto \ensuremath{\mathbf{b} }$ if there exist $m\ge 0$ and $(\ensuremath{\mathbf{a} }_i)_{i=0}^{m}$ with $\ensuremath{\mathbf{a} }_0=\ensuremath{\mathbf{a} }$ and $\ensuremath{\mathbf{a} }_m=\ensuremath{\mathbf{b} }$ such that for all $0\le i<m$ we have $\ensuremath{\mathbf{a} }_i\in\o$ and $\ensuremath{\mathbf{a} }_{i}-\ensuremath{\mathbf{a} }_{i+1}\in X$. In other words, $\ensuremath{\mathbf{a} }\to \ensuremath{\mathbf{b} }$ iff $\ensuremath{\mathbf{b} }\leadsto \ensuremath{\mathbf{a} }$. Note that there are two differences with $\ensuremath{\mathbf{b} }\to \ensuremath{\mathbf{a} }$. Firstly, the steps are reversed: $\ensuremath{\mathbf{a} }_{i+1}-\ensuremath{\mathbf{a} }_{i}\in-X$. Secondly, for the dual connections we require that the initial site is open instead of the final one. Based on this notion we define the \emph{dual process} $(\tilde{\ensuremath{\xi}}_t^A)$ again with state space $S$ but time coordinate $-\ensuremath{\mathbf{e} }_{d}$. We draw the reader's attention to the fact that this process does not have the same law as the primal process $({\ensuremath{\xi}}_t^A)$, for instance \[\tilde\theta(p)={\ensuremath{\mathbb P}} _p(\ensuremath{\mathbf{o} }\leadsto\infty)=p{\ensuremath{\mathbb P}} _p(\ensuremath{\mathbf{o} }\to\infty)=p\theta(p).\] However, up to such minor amendments all our results apply equally well to the dual process and we will use them as needed without systematically stating them. \subsection{The contact process} \label{subsec:discretisation} OP is closely related to the \emph{contact process} (CP) \cites{Harris74,Liggett05,Liggett99}. The latter is often used to model epidemics on a graph: vertices are individuals, which can be healthy or infected. In this continuous time Markov dynamics infected individuals recover with rate~1 and transmit the infection to each neighbour with rate~$\lambda > 0$ (\emph{infection rate}). The CP admits a well-known graphical construction that is a space-time representation \cite{Liggett05}. We assign to each vertex~$\ensuremath{\mathbf{v} }$ and ordered pair~$(\ensuremath{\mathbf{u} }, \ensuremath{\mathbf{v} })$ of neighbours independent Poisson point processes~$D_\ensuremath{\mathbf{v} }$ with rate~1 and~$D_{(\ensuremath{\mathbf{u} }, \ensuremath{\mathbf{v} })}$ with rate~$\lambda$ respectively. For each atom~$t$ of~$D_\ensuremath{\mathbf{v} }$ we place a ``recovery mark'' at~$(\ensuremath{\mathbf{v} }, t)$ and for each atom of~$D_{(\ensuremath{\mathbf{u} }, \ensuremath{\mathbf{v} })}$ we draw an ``infection arrow'' from~$(\ensuremath{\mathbf{u} }, t)$ to~$(\ensuremath{\mathbf{v} }, t)$. An \emph{infection path} is a connected path moving in the increasing time direction without crossing recovery marks, but possibly jumping along infection arrows in the direction of the arrow. Starting from a set of initially infected vertices~$A$, the set of \emph{infected} vertices at time~$t$ is the set of vertices~$\ensuremath{\mathbf{v} }$ such that~$(\ensuremath{\mathbf{v} }, t)$ can be reached by an infection path from some~$(\ensuremath{\mathbf{u} }, 0)$ with~$\ensuremath{\mathbf{u} }\in A$. This representation can be thought of as a continuous time version of OP with infection paths in CP corresponding to paths in OP. Several of the results presented below are originally stated for CP but their proofs transfer to discrete models with the following very minor adaptations. Firstly, setting $\gamma=\max(\|\ensuremath{\mathbf{x} }\|/t:(\ensuremath{\mathbf{x} },t)\in X)$, we clearly have that $\ensuremath{\mathbf{o} }\to(\ensuremath{\mathbf{x} },t)$ implies $\|\ensuremath{\mathbf{x} }\|\le \gamma t$, so, just like for CP, influence can spread at most linearly in time. Secondly, since the group generated by $X$ is $\mathbb{Z}^d$, for all $n>0$ there exist a time $t$ and $\ensuremath{\mathbf{v} }\in{\ensuremath{\mathbb Z}} ^{d-1}$ such that \begin{equation}\label{eq:l} \mathbb P_p\left(\xi_t^\ensuremath{\mathbf{o} }\supset \ensuremath{\mathbf{v} }+B_n\right)>0, \end{equation} where $B_n=([-n,n)^{d-1}\times[0,R))\cap{\ensuremath{\mathbb Z}} ^d$. This is the analogue of the fact that with positive probability the CP infects an arbitrarily large box in unit time. Finally, for the CP one often needs to control the time an infection path spends at a vertex: either to ensure that it does not stay long at a vertex before jumping or that the path spends at least~$\d t$ time at a vertex during a time interval of length~$t$. The first assertion is trivial in discrete time as a path ``jumps immediately'' to the next vertex, and the discrete-analogue of the second assertion is visiting a vertex at least~$\lceil\d t\rceil$ times in a time interval of length~$t$. \section{Proof of Theorem~\ref{th:main}} \label{sec:main} Throughout \cref{sec:main,sec:2d}, proofs will usually be omitted altogether when they only require minor changes (including the ones outlined in \cref{subsec:discretisation}). Nevertheless, we provide a sketch or at least a vague idea, whenever possible. The proofs requiring new ideas are gathered in \cref{app}. The present section is structured as follows. In \cref{subsec:BG} we recall the Bezuidenhout--Grimmett renormalisation and its extension. We next derive several exponential bounds in \cref{subsec:restart} obtained based on restart arguments for later use. \Cref{subsec:shape} then completes the proof of the asymptotic shape result and its continuity from \cref{th:main}. Finally, \cref{subsec:cluster:properties} puts together all of the above with some further large deviation results to prove the percolation in restricted regions of \cref{th:main}. New ingredients needed in \cref{subsec:cluster:properties,subsec:shape,subsec:restart} are deferred to \cref{app:coupling:preliminary,app:tilting,app:LD}. \subsection{Bezuidenhout--Grimmett renormalisation} \label{subsec:BG} We begin the study of the supercritical phase by briefly describing the well-known Bezuidenhout--Grimmett (BG) renormalisation. It was first introduced in~\cite{Bezuidenhout90} for the CP on~${\ensuremath{\mathbb Z}} ^d$ (see also~\cite{Liggett99}*{Sec. I.2}) and later generalised for translation-invariant finite-range attractive\footnote{A spin system is \emph{attractive} if adding extra sites in the initial condition only makes more sites infected by it at any later time (see e.g.\ \cite{Liggett99}*{Sec. I.1.}), as in the case of GOSP.} spin systems on~${\ensuremath{\mathbb Z}} ^d$ by Bezuidenhout and Gray \cite{Bezuidenhout94}, the latter reference being the most relevant for us. It is a construction that allows us to compare GOSP and 2dOP. The main idea is to show that GOSP when restricted to a sufficiently thick two-dimensional space-time slab dominates a supercritical 2dOP, which in turn implies that if there is percolation in 2dOP, then there is percolation in this restricted region. As all the results below are already known for 2dOP, this will entail numerous consequences for GOSP. Before proceeding to the renormalisation we will need a few geometric definitions. Our basic \emph{box} is $B_n=[-n, n)^{d-1}\times[0,R)$ for natural $n$, recalling $R$ from \cref{subsec:model} (although many of our regions will be defined as subsets of ${\ensuremath{\mathbb R}} ^d$, we systematically refer to the integer points in them). For $\ensuremath{\mathbf{w} }\in\mathbb Z^{d-1}$, $h\in\mathbb Z$ and~$\ensuremath{\mathbf{v} }\in{\ensuremath{\mathbb R}} ^{d-1}$ we further introduce the \emph{block} (see \cref{fig:BGrenorm}) \begin{equation} B(\ensuremath{\mathbf{w} },h,\ensuremath{\mathbf{v} })=[0,h)(\ensuremath{\mathbf{v} },1)+\prod_{i=1}^{d-1}[-w_i,w_i)\times\{0\}\subset{\ensuremath{\mathbb R}} ^d, \label{eq:Bwhv} \end{equation} so that $B_n=B(\{n\}^{d-1},R,0)$. Note that if the model is symmetric we can always assume $\ensuremath{\mathbf{v} }=0$. Here and below we write $w_i$ for the $i$\textsuperscript{th} coordinate of $\ensuremath{\mathbf{w} }$ and similarly for other vectors. The key theorem allowing comparison between the two models is as follows. \begin{thm}\label{thm:BGrenorm1} If $p$ is such that $\theta(p)>0$, then for all~${\ensuremath{\varepsilon}}>0$ there exist positive integers $n,h$ and vectors $\ensuremath{\mathbf{w} }\in\mathbb Z^{d-1}, \ensuremath{\mathbf{v} }\in\mathbb R^{d-1}$ with~$n<w_{i}$ for all~$i$ and $h>R$ such that if~$(x, t)\in B(\ensuremath{\mathbf{w} }, h, \ensuremath{\mathbf{v} })$, then \begin{multline} {\ensuremath{\mathbb P}} _p \big(\exists (\ensuremath{\mathbf{y} }, s)\in B(\ensuremath{\mathbf{w} }, h, \ensuremath{\mathbf{v} })+7h(\ensuremath{\mathbf{v} }, 1) \pm 2w_{d-1}\ensuremath{\mathbf{e} }_{d-1} \text{ such that }\\(\ensuremath{\mathbf{x} }, t)+B_n \text{ infects }(\ensuremath{\mathbf{y} }, s)+B_n\text{ in }B(4\ensuremath{\mathbf{w} }, 8h, \ensuremath{\mathbf{v} })\big)> 1-{\ensuremath{\varepsilon}}. \label{eq:BGrenorm1} \end{multline} \end{thm} \begin{figure} \begin{center} \begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=0.6cm,y=0.5cm] \draw[->] (-9,0) -- (13,0); \draw[->] (0,-1) -- (0,10); \fill[fill=black,fill opacity=0.5] (1.33,0.87) -- (1.33,0.61) -- (1.93,0.61) -- (1.93,0.87) -- cycle; \fill[fill=black,fill opacity=0.5] (1.25,7.39) -- (1.25,7.13) -- (1.85,7.13) -- (1.85,7.39) -- cycle; \fill[fill=black,fill opacity=0.5] (6.35,7.6) -- (6.35,7.34) -- (6.95,7.34) -- (6.95,7.6) -- cycle; \draw (-2,0)-- (2,0); \draw (-1.4,1)-- (2.6,1); \draw (-8,0)-- (8,0); \draw (-3.2,8)-- (12.8,8); \draw (-3.2,8)-- (-8,0); \draw (8,0)-- (12.8,8); \draw (-1.4,1)-- (-2,0); \draw (2,0)-- (2.6,1); \draw (-1.2,8)-- (-1.8,7); \draw (-1.8,7)-- (2.2,7); \draw (2.8,8)-- (2.2,7); \draw (6.2,7)-- (10.2,7); \draw (10.2,7)-- (10.8,8); \draw (6.2,7)-- (6.8,8); \draw [->] (-8,1) -- (-7.4,1); \draw (1.33,0.87)-- (1.33,0.61); \draw (1.33,0.61)-- (1.93,0.61); \draw (1.93,0.61)-- (1.93,0.87); \draw (1.93,0.87)-- (1.33,0.87); \draw (1.25,7.39)-- (1.25,7.13); \draw (1.25,7.13)-- (1.85,7.13); \draw (1.85,7.13)-- (1.85,7.39); \draw (1.85,7.39)-- (1.25,7.39); \draw (6.35,7.6)-- (6.35,7.34); \draw (6.35,7.34)-- (6.95,7.34); \draw (6.95,7.34)-- (6.95,7.6); \draw (6.95,7.6)-- (6.35,7.6); \draw [dashed] (6,0)-- (10.2,7); \draw [dashed] (-6,0)-- (-1.8,7); \draw [dashed] (-1.4,1)-- (2.2,7); \draw [dashed] (6.2,7)-- (2.6,1); \draw [dashed] (-8,0)-- (-8,2); \draw [dashed] (-7.4,1)-- (-1.4,1); \fill [color=black] (1.63,0.61) circle (1pt); \fill [color=black] (1.55,7.13) circle (1pt); \fill [color=black] (6.65,7.34) circle (1pt); \draw [->] (-8,1) -- (-7.4,1); \begin{scriptsize} \draw (0,8) node [above right] {$8h$}; \draw (0,1) node [above right] {$h$}; \draw (8,0) node [below] {$4w$}; \draw (-8,0) node [below] {$-4w$}; \draw (2,0) node [below] {$w$}; \draw (-2,0) node [below] {$-w$}; \draw (-7.7,1.1) node [above] {$hv$}; \draw (-1.4,1)--(-1.9,1.5) node [above left] {$B(w,h,v)$}; \draw (-5.6,4)--(-6,4.4) node [above left] {$B(4w,8h,v)$}; \draw (1.63,0.7) node [below] {$(x,t)+B_n$}; \end{scriptsize} \draw[color=red,very thick] (1.7,0.75) to [curve through={(2,1.1)..(1.7,2)..(4.3,4.5)..(6.7,7)}] (6.4,7.37); \draw[color=red,very thick] (1.7,2) to [curve through={(1.3,4.5)..(2,5.5)..(1.3,7)}] (1.4,7.15); \end{tikzpicture} \caption{The event described in \cref{thm:BGrenorm1} for~$d=2$. Note that in this case~$w$ and~$v$ are one-dimensional.} \label{fig:BGrenorm} \end{center} \end{figure} In other words we can choose parameters such that when considering the truncated process in~$B(4\ensuremath{\mathbf{w} }, 8h, \ensuremath{\mathbf{v} })$ with high probability a box~$B_n$ centered at some~$(\ensuremath{\mathbf{x} }, t)$ inside the block~$B(\ensuremath{\mathbf{w} }, h, \ensuremath{\mathbf{v} })$ infects a copy of itself centered at either of the target blocks that are translates of~$B(\ensuremath{\mathbf{w} }, h, \ensuremath{\mathbf{v} })$ (see \cref{fig:BGrenorm}). The proof of this theorem being quite long and technical, we direct the interested reader to \cite{Bezuidenhout94}, where it is established in a setting essentially including GOSP. Recall that 2dOP is defined by $X=\{(-1,1),(1,1)\}$. We denote by $\z_k^{A}$ the set of (even) sites in ${\ensuremath{\mathbb Z}} ^2$ with second coordinate $k$ infected by 2dOP with initial condition $A$. We are now ready for the 2dOP comparison of \cite{Bezuidenhout90}. \begin{thm}[BG renormalisation]\label{thm:BGrenorm2} Fix $q<1$ and assume that $p$ is such that \cref{eq:BGrenorm1} holds for ${\ensuremath{\varepsilon}}>0$ sufficiently small depending on $q$ and some $n,h,\ensuremath{\mathbf{w} },\ensuremath{\mathbf{v} }$ as in \cref{thm:BGrenorm1}. Then the following holds for some $n,h,\ensuremath{\mathbf{w} },\ensuremath{\mathbf{v} }$. For any initial condition $A\subset S$ we denote \[A'=\left\{j\in2{\ensuremath{\mathbb Z}} :\exists (\ensuremath{\mathbf{x} },s)\in B(\ensuremath{\mathbf{w} },h,\ensuremath{\mathbf{v} })+2w_{d-1}j\ensuremath{\mathbf{e} }_{d-1}, (\ensuremath{\mathbf{x} },s)+B_n\subset A\right\}.\] Then there exists a coupling of 2dOP $\z^{A'}$ of parameter $q$ and GOSP ${\ensuremath{\xi}}^A$ such that for all $j\in{\ensuremath{\mathbb Z}} $ and $k$ \begin{multline*} j\in \z^{A'}_k\text{ implies that }(\ensuremath{\mathbf{x} }, 0)+B_n\subset\xi_t^A \\\text{ for some }(\ensuremath{\mathbf{x} },t)\in B(\ensuremath{\mathbf{w} },h,\ensuremath{\mathbf{v} })+7hk(\ensuremath{\mathbf{v} },1)+2w_{d-1}j\ensuremath{\mathbf{e} }_{d-1}. \end{multline*} In particular, $\theta(p)>0$. \end{thm} Informally, each site of 2dOP corresponds to a translate of the block $B(\ensuremath{\mathbf{w} }, h, \ensuremath{\mathbf{v} })$ in GOSP. We can couple the two processes so that if a site in 2dOP is in the cluster of a vertex in~$\zeta^A$, then there is a box infected by~$A$ in the block corresponding to that site in the GOSP. The proof of \cref{thm:BGrenorm2} is as in \cite{Liggett99}*{Theorem I.2.23} (also see \cite{Bezuidenhout90}). Indeed, one may construct the coupling by induction as follows. If $j\in\z_k$, then there is an infected copy of the box $B_n$ in the block corresponding to $j,k$, so we may apply the result of \cref{thm:BGrenorm1} to get that with probability $1-{\ensuremath{\varepsilon}}$ there will also be such infected boxes in the blocks corresponding to $j+1,k+1$ and $j-1,k+1$. It is easily seen (as the GOSP configuration is composed of independent variables) that the resulting process is a $1$-dependent 2dOP with parameter at least $1-{\ensuremath{\varepsilon}}$, so by a standard comparison between $1$-dependent and independent percolation \cite{Liggett97} we obtain \cref{thm:BGrenorm2} as desired. It is useful to note that the BG renormalisation concerns only certain translates of the block $B(\ensuremath{\mathbf{w} },h,\ensuremath{\mathbf{v} })$. However, we may tile ${\ensuremath{\mathbb Z}} ^d$ with disjoint blocks so that each tilted space-time slab of the form \[\bigcup_{j,k\in{\ensuremath{\mathbb Z}} }B(\ensuremath{\mathbf{w} }, h, \ensuremath{\mathbf{v} })+w_{d-1}j\ensuremath{\mathbf{e} }_{d-1}+kh(\ensuremath{\mathbf{v} }, 1)\] is formed by 14 disjoint 2dOP lattices of blocks. We may perform the couplings of all the corresponding 2dOP processes with the same GOSP simultaneously as above so that sites in different 2dOP have a finite range dependence, hence they may be made independent by \cite{Liggett97}. In total, for $A\subset S$ we can couple ${\ensuremath{\xi}}^A$ with independent 2dOP processes naturally indexed by ${\ensuremath{\mathbb Z}} ^{d-2}\times \{1,\dots, 14\}$ with initial conditions corresponding to the parts of $A$ in each of the 2dOP lattices. \subsection{Restart arguments} Recall that ${\ensuremath{\xi}}^A_t$ is the set of sites infected by $A$ at time $t$. The \emph{extinction time of $A$} is the absorption time of the chain started at $A$, that is \begin{equation}\label{eq:def:ta} \t^A=\min\left\{t\geq 0:{\ensuremath{\xi}}_t^A=\varnothing\right\}\in\{0,1,\dots\}\cup\{\infty\}.\end{equation} We say that the process started from $A$ \emph{dies out} if $\t^A<\infty$ and \emph{survives} otherwise. \label{subsec:restart}The BG renormalisation allows us to use a so-called \emph{restart argument} that can be described as follows. We let GOSP $(\xi_t^A)$ evolve until we find an infected translate of the box~$B_n$ (which by~\cref{eq:l} has a strictly positive probability, thus it happens after at most a geometrically distributed number of steps) or the process dies out. If we infect a box, we start the 2dOP process~$(\zeta_k)$ of~\cref{thm:BGrenorm2} (with appropriate initial condition) from the corresponding block coupled with~$(\xi^A_t)$. If~$(\zeta_k)$ percolates, then~$(\xi^A_t)$ percolates as well. If $(\z_k)$ dies out and~$(\xi^A_t)$ still survives, we restart the procedure. We repeat this until either the GOSP dies out or the renormalisation yields a percolating 2dOP (since the parameter $q$ of $(\zeta_k)$ is supercritical, $q>{p_{\mathrm{c}}^{\mathrm{OP}}}$, this will happen after at most a geometric number of trials). We will use this technique to transfer properties from 2dOP to GOSP. The exponential bounds we prove next in this section (like all other results) are already established for 2dOP \cite{Durrett83} and the $d$-dimensional CP \cite{Durrett91}. Recall that~$\tau^A$ is the extinction time of the set~$A$. \begin{thm}[Exponential death bounds] \label{thm:GOSPproperties} For every~$p>{p_{\mathrm{c}}}$ there exists a constant~${\ensuremath{\varepsilon}}={\ensuremath{\varepsilon}}(p)>0$ such that for all $A\subset S$ and $t\ge R$ it holds that \begin{align}\label{eq:property1} \mathbb{P}_p\left(t\le \tau^A<\infty\right)&{}\leq e^{-{\ensuremath{\varepsilon}} t}, \\\label{eq:property2} \mathbb{P}_p\left(\tau^A<\infty\right)&{}\leq e^{-{\ensuremath{\varepsilon}} |A|}. \end{align} \end{thm} The proof of \cref{thm:GOSPproperties} goes along the same lines as the proof of \cite{Liggett99}*{Theorem I.2.30}, using the restart argument. For~\cref{eq:property1}, on~$\{\tau^A<\infty\}$, we can bound~$\tau^A$ by the sum of the number of steps until we find an infected box and the survival time of the coupled 2dOP in each round. As 2dOP satisfies~\cref{eq:property1} and the required quantities of the restart argument are bounded by geometric random variables, we get the desired exponential decay. For~\cref{eq:property2} first tile~${\ensuremath{\mathbb Z}} ^d$ with the disjoint translates of the space-time slab \[T=\bigcup_{j,k\in{\ensuremath{\mathbb Z}} }B(4\ensuremath{\mathbf{w} }, 7h, \ensuremath{\mathbf{v} })+4w_{d-1}j\ensuremath{\mathbf{e} }_{d-1}+7hk(\ensuremath{\mathbf{v} }, 1)\] and consider the processes restricted to these slabs with initial conditions corresponding to the parts of~$A$ in each slab. Observe that these processes are independent and~$\tau^A$ can be bounded from below by the maximum of their extinction times. Therefore, it is enough to show the analogue of~\cref{eq:property2} for~$A\subset T$. As in~\cref{eq:l} we can show that there exists a~$t$ depending on $\ensuremath{\mathbf{w} }$ and $h$, but not on $A$, such that with strictly positive probability every vertex in~$A\subset T$ can infect a box~$B_n$ in \[t(\ensuremath{\mathbf{v} },1)+\bigcup_{j\in{\ensuremath{\mathbb Z}} }B(\ensuremath{\mathbf{w} }, h, \ensuremath{\mathbf{v} })+w_{d-1}j\ensuremath{\mathbf{e} }_{d-1}.\] Thus, (save for an exponentially unlikely event) for some $\d>0$ at least~$\delta|A|$ disjoint blocks at the same time contain an infected box. We start the 2dOP process of \cref{thm:BGrenorm2} from all these blocks. Observe that~$\{\tau^A<\infty\}$ can only happen if all the coupled 2dOP process dies, but since~\cref{eq:property2} holds for 2dOP, this has exponentially small probability in the size of~$A$. \begin{rem} \Cref{eq:property1} implies that the law of ${\ensuremath{\xi}}_t^S$ converges to the upper invariant measure of the process (corresponding to the distribution of sites $\ensuremath{\mathbf{x} }\in S$ such that $\ensuremath{\mathbf{x} }\leadsto\infty$) exponentially fast in $t$. \end{rem} The next result is the analogue of condition (a) of Lemma 5.1 in \cite{Durrett91}. \begin{thm}\label{thm:GOSPproperties2} Let~${\ensuremath{\xi}}$ and $\tilde{\ensuremath{\xi}}$ be independent primal and dual GOSP. Then for every~$p>{p_{\mathrm{c}}}$ there exist constants~${\ensuremath{\varepsilon}}, c, C>0$ and a vector $\ensuremath{\mathbf{v} }\in{\ensuremath{\mathbb R}} ^{d-1}$ depending on $p$ such that for all integer~$t>0$ and $A, B\subset S$ satisfying $\max_{\ensuremath{\mathbf{a} }\in A, \ensuremath{\mathbf{b} }\in B}\| \ensuremath{\mathbf{a} }-\ensuremath{\mathbf{b} }\|<ct$ we have \begin{equation} \label{eq:property4bis} {\ensuremath{\mathbb P}} _p\left(\xi_t^A\cap\tilde{\xi}_t^{B+(2t\ensuremath{\mathbf{v} }+\ensuremath{\mathbf{z} }_t,0)}=\varnothing, \xi_t^A\neq\varnothing, \tilde{\xi}_t^{B+(2t\ensuremath{\mathbf{v} }+\ensuremath{\mathbf{z} }_t,0)}\neq\varnothing\right)\leq Ce^{-{\ensuremath{\varepsilon}} t}, \end{equation} where $\ensuremath{\mathbf{z} }_t\in{\ensuremath{\mathbb R}} ^{d-1}\times\{0\}$ is such that $2t\ensuremath{\mathbf{v} }+\ensuremath{\mathbf{z} }_t\in{\ensuremath{\mathbb Z}} ^{d-1}$ and $\|\ensuremath{\mathbf{z} }_t\|^2\le (d-1)/4$. \end{thm} It is important to note that due to the lack of symmetry this result is more technical for GOSP than for $d$dOP. We leave the proof to \cref{app:coupling:preliminary} and only indicate that it relies mainly on the BG renormalisation, restart argument, \cref{eq:property1} and several properties known for 2dOP, which will be established below for GOSP. \begin{rem} We can use \cref{thm:GOSPproperties2} to prove that the infinite cluster is unique. Together with $\theta({p_{\mathrm{c}}})=0$ following from \cref{thm:BGrenorm1,thm:BGrenorm2}, this customarily yields that $\theta:p\mapsto\theta(p)$ is continuous on $[0,1]$. This was first established for $d$dOP in~\cite{Grimmett02}. \end{rem} Recall the hit and coupled regions of~\cref{eq:hitregion,eq:coupledregion}. \begin{thm}[At least linear growth]\label{thm:GOSPproperties3} For every~$p>{p_{\mathrm{c}}}$ there exist constants~${\ensuremath{\varepsilon}}, c>0$ and a vector $\ensuremath{\mathbf{v} }\in{\ensuremath{\mathbb R}} ^{d-1}$ depending on $p$ such that for all $t>0$ and $\ensuremath{\mathbf{x} }\in{\ensuremath{\mathbb Z}} ^{d-1}$ such that $\| \ensuremath{\mathbf{x} }-t\ensuremath{\mathbf{v} } \| <ct$ it holds that \begin{align} \mathbb{P}_p\left((\ensuremath{\mathbf{x} },0)\not\in H_t, \tau^\ensuremath{\mathbf{o} }=\infty\right)&{}\leq e^{-{\ensuremath{\varepsilon}} t}, \label{eq:property3}\\ \mathbb{P}_p\left((\ensuremath{\mathbf{x} },0)\not\in K_t, \tau^\ensuremath{\mathbf{o} }=\infty\right)&{}\leq e^{-{\ensuremath{\varepsilon}} t}. \label{eq:property5} \end{align} \end{thm} This result is also a consequence of \cref{thm:GOSPproperties2}. The proof is an adaptation of the proof of conditions~(c) and~(d) of Theorem 5.2 in~\cite{Durrett91} for the CP (see also \cite{Durrett82}). For~\cref{eq:property3} recall the definition of the dual process~$\tilde\xi$ from \cref{subsec:duality} and note that for any $0\le s\le t$ the event $\{\exists \ensuremath{\mathbf{y} }\in S,\ensuremath{\mathbf{o} }\to \ensuremath{\mathbf{y} }+s\ensuremath{\mathbf{e} }_d,(\ensuremath{\mathbf{x} },t)\leadsto \ensuremath{\mathbf{y} }+s\ensuremath{\mathbf{e} }_d\}$ is equivalent to~$\ensuremath{\mathbf{o} }\to(\ensuremath{\mathbf{x} },t)$. By a restart argument we can find a time $r$ such that $(\ensuremath{\mathbf{x} },r)\leadsto\infty$ and up to an exponentially unlikely event we can take $0\leq t-r<ct$. Then the conclusion follows from \cref{eq:property4bis} with $A=\{\ensuremath{\mathbf{o} }\}$, $B=\{(\ensuremath{\mathbf{x} }-2r\ensuremath{\mathbf{v} },0)\}$ and $t$ in the theorem equal to $r/2$. For~\cref{eq:property5} observe that for $\o\subset{\ensuremath{\mathbb Z}} ^{d-1}\times\{R,R+1,\dots\}$ \[\left\{(\ensuremath{\mathbf{x} },0)\not\in K_{2t}, \tau^\ensuremath{\mathbf{o} }=\infty\right\}=\left\{\ensuremath{\mathbf{o} }\nto(\ensuremath{\mathbf{x} }, 2t), (\ensuremath{\mathbf{x} }, 2t)\leadsto S, \ensuremath{\mathbf{o} }\to\infty\right\}.\] The conclusion then follows again from \cref{eq:property4bis} with $A=\{\ensuremath{\mathbf{o} }\}$ and $B=\{(\ensuremath{\mathbf{x} }-4t\ensuremath{\mathbf{v} },0)\}$. Finally, for completeness let us mention a consequence of the restart arguments concerning GOSP on tori. Recall that we assume that the direction $\ensuremath{\mathbf{u} }=\ensuremath{\mathbf{e} }_d$, and let ${\ensuremath{\mathbb T}} ^{d-1}_n=({\ensuremath{\mathbb Z}} /n{\ensuremath{\mathbb Z}} )^{d-1}$ denote the $(d-1)$-dimensional discrete torus of side $n$. Consider GOSP on the graph with vertex set ${\ensuremath{\mathbb T}} ^{d-1}_n\times {\ensuremath{\mathbb Z}} $ obtained as the quotient of $\ensuremath{\mathcal G}_X$. The \emph{extinction time} is defined as \[\tau^{{\ensuremath{\mathbb T}} }=\sup\left\{t\ge 0: {\ensuremath{\mathbb T}} ^{d-1}_n\times\{0,-1,-2,\dots\}\to{\ensuremath{\mathbb T}} ^{d-1}_n\times\{t\}\right\}.\] \begin{cor} \label{th:tori} For all $p<{p_{\mathrm{c}}}$ there exists $c(p)$ such that \begin{equation} \label{eq:meta:subcrit} \frac{\tau^{\ensuremath{\mathbb T}} }{\log n}\to[{\ensuremath{\mathbb P}} _p][n\to\infty]\frac{d-1}{c(p)}, \end{equation} and for all~$p>{p_{\mathrm{c}}}$ there exist~$c,C\in(0,\infty)$ such that \begin{gather} \label{eq:meta1} \frac{\t^{\ensuremath{\mathbb T}} }{{\ensuremath{\mathbb E}} _p[\t^{\ensuremath{\mathbb T}} ]}\to[(\mathrm{d})][n\to\infty]\ensuremath{\mathcal E},\\ e^{cn^{d-1}}<{\ensuremath{\mathbb E}} _p\left[\t^{\ensuremath{\mathbb T}} \right]<e^{Cn^{d-1}},\label{eq:meta2} \end{gather} for $n$ large enough, where $\ensuremath{\mathcal E}$ is the standard exponential distribution. \end{cor} \Cref{eq:meta:subcrit} follows as in~\cite{Durrett88a} (see also \cite{Liggett99}*{Theorem I.3.3}) from the subcritical result established in~\cites{Aizenman87,Menshikov86}: for all~$p<p_c$ there exists~$c(p)$ such that \begin{equation} \label{eq:subcrit} -\lim_{t\to\infty}\frac{1}{t}\log {\ensuremath{\mathbb P}} _p(\tau^\ensuremath{\mathbf{o} }\ge t)=c(p)>0. \end{equation} \Cref{eq:meta1} was proved for the CP in two dimensions in \cite{Schonmann85} (see also \cite{Durrett88b}), while in $d$ dimensions this was done in \cite{Mountford93} (also see \cite{Simonis96} for subsequent development). \Cref{eq:meta2} was proved in \cite{Durrett88a} for the two-dimensional CP and in \cite{Chen94} in $d$ dimensions. The proofs rely on \cref{thm:GOSPproperties3,thm:GOSPproperties,thm:BGrenorm2} (see \cite{Hartarsky21GOSParxiv}*{App. A.4} for a sketch following \cite{Mountford93}). Let us note that for the CP on a finite box (in our setting this corresponds to cutting the bonds crossing the boundary of a fundamental domain of the torus) in \cites{Durrett88b,Mountford99} it was established that in fact $\log{\ensuremath{\mathbb E}} _p[\t]/n^{d-1}$ converges as $n\to\infty$. However, for GOSP considering a box is either inappropriate or requires tilting the lattice first, making the result somewhat unnatural and unhandy due to the implicit definition of the tilting direction, which may even depend on $p$ as $p\to{p_{\mathrm{c}}}$. It would appear that proving the existence of the above limit on the torus is unknown even for OP and CP. \subsection{Asymptotic shape} \label{subsec:shape} With the results of~\cref{subsec:restart} at hand we are ready to prove the asymptotic shape theorem and the continuity of the limit shape, that is~\cref{eq:main:lower,eq:main:upper} and the continuity result of~\cref{th:main}. These results are known for the CP. However, certain issues arise due to the possibility that the model may have a ``drift,'' e.g.\ if the convex envelope of the neighbourhood $X$ does not intersect the line ${\ensuremath{\mathbb R}} \ensuremath{\mathbf{e} }_d$. This problem is absent if we can take $\ensuremath{\mathbf{v} }=0$ in \cref{thm:GOSPproperties3}. For simplicity, in \cref{subsec:shape} we only briefly recall the arguments used to prove the desired results under this additional assumption, leaving out the minor changes described in \cref{subsec:discretisation}. Thus, we leave the new input needed for removing the assumption $\ensuremath{\mathbf{v} }=0$ to \cref{app:tilting}. It was proved in~\cite{Durrett82} for permanent one-site growth procesess (translation invariant, attractive processes with local rules, with~$\varnothing$ absorbing state and positive probability of survival) that the exponential estimates from~\cref{eq:property1,eq:property3,eq:property5} with $\ensuremath{\mathbf{v} }=0$ imply the shape theorem: \cref{eq:main:lower,eq:main:upper}. The idea is that, given these estimates, the hitting times are subadditive, stationary and integrable. Then, using subadditive ergodic theory~\cite{Kingman73}, one can prove that for $\ensuremath{\mathbf{x} }\in{\ensuremath{\mathbb Z}} ^{d-1}$ \begin{equation}\label{eq:mu} \frac{t(n\ensuremath{\mathbf{x} })}n\to\mu(\ensuremath{\mathbf{x} }) \quad\bar{\ensuremath{\mathbb P}} _p\text{-a.s.} \end{equation} The \emph{time constant} ${\ensuremath{\mu}}(\ensuremath{\mathbf{x} })$ can be extended into a norm on~$\mathbb{R}^{d-1}$ with unit ball $U$, yielding the result for the hit region. Then we can argue that there are a lot of vertices around the boundary of the cone defined by~$U$ that are reached from the origin and by~\cref{eq:property1} survive. Using~\cref{eq:property5} we can conclude that the union of the coupled regions of these vertices eventually covers~$(1-{\ensuremath{\varepsilon}})tU$. Our next goal is to prove that the limit shape $U$ is continuous in $p$. For this, we will require a quantity called essential hitting time. It was first introduced by Garet and Marchand in~\cite{Garet12}, inspired by \cite{Kuczek89}, to prove shape theorems in a more difficult setting. Using this notion, they later proved large deviation inequalities~\cite{Garet14} and continuity of the asymptotic shape~\cite{Garet15}. We next discuss these results still under the assumption that $\ensuremath{\mathbf{v} }=0$ in \cref{thm:GOSPproperties3}. Roughly speaking (see \cite{Garet12} for the correct definition), under $\bar{\ensuremath{\mathbb P}} _p$ the \emph{essential hitting time} ${\ensuremath{\sigma}}(\ensuremath{\mathbf{x} })$ of $\ensuremath{\mathbf{x} }\in{\ensuremath{\mathbb Z}} ^{d-1}$ is a time such that $\ensuremath{\mathbf{o} }\to(\ensuremath{\mathbf{x} },{\ensuremath{\sigma}}(\ensuremath{\mathbf{x} }))\to\infty$. Crucially, the essential hitting time is nearly subadditive \cite{Garet12}*{Theorem 2}. Using this property, one can show that~$\bar{\ensuremath{\mathbb P}} _p$-a.s., as $n\to\infty$, $\sigma(n\ensuremath{\mathbf{x} })/n$ converges. Controlling the discrepancy between the essential hitting time and the hitting time \cite{Garet12}*{Proposition~17}, we can conclude that the limit is also the one of $t(n\ensuremath{\mathbf{x} })/n$. This control of~$\sigma(\ensuremath{\mathbf{x} })-t(\ensuremath{\mathbf{x} })$ further allows us to bound the moments of~$\sigma(\ensuremath{\mathbf{x} })$ under $\bar{\ensuremath{\mathbb P}} _p$ and to get exponential estimates for the essentially hit region analogous to~\cref{eq:property3} with $\ensuremath{\mathbf{v} }=0$ \cite{Garet12}*{Corollary~20 and~21}. Relying on the almost subadditivity of~$\sigma(\ensuremath{\mathbf{x} })$, one may establish large deviation results corresponding to \cite{Garet14}*{Theorems 1.1 and 1.4}, still under the assumption $\ensuremath{\mathbf{v} }=0$ to be removed in \cref{app:tilting}. \begin{thm} \label{thm:largedev} For every~$p>{p_{\mathrm{c}}}$ and every~${\ensuremath{\varepsilon}}>0$ there exist constants $c, C>0$ such that for any~$\ensuremath{\mathbf{x} }\in\mathbb{Z}^{d-1}$ and $t\ge 1$ \begin{align*} \bar{\ensuremath{\mathbb P}} _p\left(K_t\cap H_t\supset (((1-{\ensuremath{\varepsilon}})tU)\times [0,R))\cap{\ensuremath{\mathbb Z}} ^d\right)&{}\geq 1-Ce^{-ct},\\ {\ensuremath{\mathbb P}} _p\left({\ensuremath{\xi}}^\ensuremath{\mathbf{o} }_t\subset (((1+{\ensuremath{\varepsilon}})tU)\times [0,R))\cap{\ensuremath{\mathbb Z}} ^d\right)&{}\geq 1-Ce^{-ct}, \end{align*} where $U$ is as in \cref{th:main}. \end{thm} Finally, one can show the continuity of the limit shape in~\cref{th:main} as in \cite{Garet15}*{Theorem 1}, recycling much of the proof of \cref{thm:largedev}. \subsection{Percolation in restricted regions} \label{subsec:cluster:properties} Relying on the results of~\cref{subsec:restart}, we next establish large deviations for the infinite cluster density, which we then use to prove~\cref{eq:restricted} of~\cref{th:main}. \begin{thm} Let \begin{equation} \label{eq:def:Yn} Y_n:=\left|\left\{(\ensuremath{\mathbf{x} },t)\in B_n:(\ensuremath{\mathbf{x} },t)\leadsto\infty\right\}\right|/|B_n|. \end{equation} \label{thm:LD} For all $p>{p_{\mathrm{c}}}$ there exists a convex function ${\ensuremath{\varphi}}:[0,1]\to{} [0,\infty)$ such that ${\ensuremath{\varphi}}(a)=0$ if and only if $a=p\theta(p)=\tilde\theta(p)$ and for all $a<b$ in $[0,1]$, \[\lim_{n\to\infty}\frac{\log{\ensuremath{\mathbb P}} _p(Y_n\in[a, b])}{n^{d-1}}=-\inf_{x\in[a,b]}\varphi(x).\] \end{thm} Most of this result is very general and holds for any translation invariant attractive spin system, as established in \cite{Lebowitz88}. Roughly speaking, the existence of the limit follows from the fact that if several boxes have $Y_n\ge a$, then so does their union; the convexity follows similarly, asking for one box with $Y_n\ge x$ and one with $Y_n\ge y$ and considering their union. The relevance of $\tilde\theta(p)$ comes from cutting a large box into smaller ones and using attractiveness to replace boundary conditions by maximal ones, in order to enable the use of large deviations results for i.i.d.\ random variables. Indeed, the invariant measure of GOSP in a large box with infected boundary condition still infects sites ``far from the boundary'' with probability close to $\tilde\theta(p)$. This follows from the fact that the upper invariant measure of the infinite volume attractive process must dominate the (decreasing) limit of these invariant measures as the size of the box diverges (see \cite{Liggett05}*{Theorem III.2.7}). The only somewhat model-specific property is the fact that for any $a<\tilde\theta(p)$ there exists $c>0$ such that for all $n$ we have \begin{equation} \label{eq:LD:reduced} {\ensuremath{\mathbb P}} _p(Y_n\le a)\le e^{-cn^{d-1}}. \end{equation} This was established for 2dOP in \cite{Durrett88}. Unfortunately, the argument is 2-dimensional, so we provide a proof for GOSP in any dimension (and in particular $d$dOP), which appears to be novel. This is done via a new renormalisation in \cref{app:LD}, relying on \cref{thm:GOSPproperties,thm:GOSPproperties3}. \begin{rem}One can further study fluctuations of the density. For translation invariant attractive spin systems on~${\ensuremath{\mathbb Z}} ^d$ \cite{Lebowitz87} examined when, starting from the upper invariant measure, we reach a value of $Y_n$ smaller than $\tilde\theta(p)$. Later this result was extended to upper fluctuations in~\cite{Galves89} for the CP. These proofs rely on \cref{thm:LD} and can be adapted to GOSP. We also direct the reader to \cite{Couronne04}*{Chapter 5} for information regarding the properties and shape of large finite clusters and more large deviations.\end{rem} Now we are ready to prove a more geometric property of the infinite cluster,~\cref{eq:restricted} of~\cref{th:main}, establishing that percolation occurs in restricted regions. This result was proved for $d$dOP in \cite{Couronne04}*{Theorem 1.3 of Chapter 5}, but given the results available to us, we may directly retrieve it (for GOSP) from \cref{thm:GOSPproperties,thm:largedev,thm:LD} as follows. Fixing some $\ensuremath{\mathbf{u} }\in O$ and $\d>0$ small, for a site $(\ensuremath{\mathbf{x} },t)$ at distance at most $\d^2 t$ from $(t\ensuremath{\mathbf{u} },t)$ surviving for time $\d t$, by \cref{eq:property1,thm:largedev} it is likely that its coupled region contains a box of side $\d^2 t$ centered at $((1+\d)t\ensuremath{\mathbf{u} },(1+\d)t)$. By \cref{thm:LD}, it is likely that at least $\d^{2d}t^{d-1}$ sites in that box are infected by $(\ensuremath{\mathbf{x} },t)$ and, since $\d$ is small and $(\ensuremath{\mathbf{x} },t)$ is at distance of order $t$ from the boundary of $C$, this has to happen inside $C$. Finally, by \cref{eq:property2}, some of those sites is likely to survive. Repeating this procedure to infinity and recalling that the probability of failing at each step is exponentially small in $t$, we obtain \cref{eq:restricted} of \cref{th:main}, as desired. \section{Proof of Theorem~\ref{th:2d}} \label{sec:2d} In this section we assume $d=2$. In this case one can say more about GOSP based on techniques for 2dOP, for which \cite{Liggett05}*{Chapter VI} and \cite{Durrett84} are excellent references. In~\cref{sec:edge} we gather some standard preliminaries. In~\cref{subsec:DS} we introduce an alternative renormalisation technique, whose refinement enables us to prove~\cref{th:2d}. \subsection{Edge speed} \label{sec:edge} Define the \emph{right edge} of the process as \[r_t=\max\left\{x\in {\ensuremath{\mathbb Z}} : \exists y\in \{0,\dots,R-1\}, (x,y)\in{\ensuremath{\xi}}_t^{S^-}\right\},\] where $S^-=((-\infty,0]\times[0,R))\cap{\ensuremath{\mathbb Z}} ^2$ is the left half of $S$. Similarly define the \emph{left edge} $l_t$ as the minimum of $x$ above with $S^+=([0,\infty)\times[0,R))\cap{\ensuremath{\mathbb Z}} ^2$ instead of $S^-$. It is important to note that, as discussed in \cref{subsec:examples}, although the model is two-dimensional, it is \emph{not} planar and paths may jump over each other without crossing (recall \cref{fig:example}). Nevertheless, the right and left edges do retain some of their properties from the 2dOP case. \begin{thm}[Edge speed] \label{th:alpha} For any $p\in[0,1]$ there exists \[\a=\lim_{t\to\infty}\frac{{\ensuremath{\mathbb E}} _p[r_t]}{t}=\inf_{t\ge 1}\frac{{\ensuremath{\mathbb E}} _p[r_t]}{t}\in[-\infty,\infty).\] Moreover, $r_t/t\to[t\to\infty]\a$ a.s.\ and if $\a>-\infty$, then ${\ensuremath{\mathbb E}} _p\left[\left|\frac{r_t}{t}-\a\right|\right]\to[t\to\infty]0$. Similar statements hold for $\beta=\lim{\ensuremath{\mathbb E}} _p[l_t]/t$. \end{thm} The proof (and statement) is identical to \cite{Liggett05}*{Theorem VI.2.19} and is a consequence of a subadditive ergodic theorem due to Durrett \cite{Durrett80} (see particularly Theorem 6.1 thereof). The idea is to introduce a version of the right edge between time $s$ and $t$ which, contrary to $r_t$, is subadditive in an appropriate sense. We next show that the two-dimensional approach coincides with the more general one from the previous section. \begin{thm} \label{th:identification} For any $p>{p_{\mathrm{c}}}$ the limit shape $U$ from \cref{th:main} and the edge speeds $\a,\b$ from \cref{th:alpha} satisfy $U=[\b,\a]$. \end{thm} To see this, note that by \cref{thm:GOSPproperties3} with positive probability $\ensuremath{\mathbf{o} }\to\infty$ and at all times the coupled region is large enough to ensure that the right and left edges are infected by $\ensuremath{\mathbf{o} }$. We can then conclude, since \cref{th:main,th:alpha} are almost sure statements. A notable advantage of having the edge representation of the limit shape is the following result. \begin{thm} \label{th:strict:monotonicity}The right edge speed $\a$ is strictly increasing on $({p_{\mathrm{c}}},1)$. \end{thm} The proof is very similar to \cite{Durrett84}*{Eq.~(12)} and was reiterated in \cite{Durrett87} in a setting including PPCA. It proceeds in two steps. Firstly, one shows by a clever but simple algebraic manipulation that adding a vertical column of sites to any initial condition entirely on its right increases ${\ensuremath{\mathbb E}} _p[r_t]$ by at least $1$ for all $t$. This property only relies on the fact that the process is additive in the sense that ${\ensuremath{\xi}}^{A\cup B}_t={\ensuremath{\xi}}_t^{A}\cup{\ensuremath{\xi}}_t^B$ for all $A,B,t$. Secondly, one observes that if $p$ is increased by a small amount $\delta$, it may happen that the additional vertices opened by increasing it lead precisely to adding such a vertical column in ${\ensuremath{\xi}}_t$ to the right of $r_t$ (corresponding to parameter $p$). \subsection{Alternative renormalisation} \label{subsec:DS} In two dimensions it is possible to study the supercritical phase via a more elementary renormalisation scheme than the BG one. For 2dOP this approach due to Durrett and Griffeath \cite{Durrett83} is used classically to derive most of the results stated above in that setting. However, applying this renormalisation to GOSP (in two dimensions) turns out to be quite tricky. Let us first give the rough lines of the renormalisation before explaining what goes wrong for GOSP and how to address it. For 2dOP, let us assume that $p$ satisfies $\a(p)>\b(p)$. By \cref{th:alpha} we have that $r_t/t\to\a$ a.s. Moreover, one can show (see \cites{Durrett83,Durrett84}) that for all ${\ensuremath{\varepsilon}}>0$ there exists $c>0$ such that for all $t>0$ \begin{equation} \label{eq:edge:LD} {\ensuremath{\mathbb P}} _p(r_t>(\a+{\ensuremath{\varepsilon}})t)\le e^{-ct}. \end{equation} We may then establish (see \cref{fig:DS1}) that for $L$ large enough depending on ${\ensuremath{\varepsilon}}>0$, the box $B({\ensuremath{\varepsilon}} L,L,\a)$ is crossed from bottom to top by an open path with high probability, namely for ${\ensuremath{\varepsilon}}>0$ \begin{equation} \label{eq:crossing} \lim_{L\to\infty}{\ensuremath{\mathbb P}} _p\left(_{B({\ensuremath{\varepsilon}} L,L,\a)}{\ensuremath{\xi}}^{S^-}_L=\varnothing\right)=0. \end{equation} Indeed, by \cref{eq:edge:LD}, it is forbidden for the right edge to leave the box on one side; by \cref{th:alpha} the right edge at time $L$ is likely to be in the middle of the top side of the box; while if the path reaching the right edge at time $L$ leaves the box on the other side, that would imply that the path necessarily went faster than allowed by \cref{eq:edge:LD}, in order to make up for the delay (the last idea is due to Gray \cite{Durrett87}). Hence, we have that with probability close to $1$ long thin boxes with tilting $\a$ (and similarly for $\b$) are crossed. This reasoning is perfectly valid for GOSP. In order use such boxes to construct a renormalisation, one places around each renormalised vertex two of them directed by $\a$ and $\b$ and says the vertex is open if they are crossed by paths (see \cite{Durrett84}*{Fig. 7} or \cite{Durrett83}*{Fig. 1}). For 2dOP it is then clear that if the resulting renormalised 2dOP percolates, then so does the original one. Indeed, one can switch from the path in one box to another as soon as they intersect, which is necessarily the case for planar graphs such as the one associated to 2dOP. It is not hard to see that the argument remains valid for PPCA with neighbourhood consisting of consecutive sites of the form $(x,1)$. However, for GOSP with arbitrary neighbourhood $X$ it is no longer true that two paths which ``cross'' have to intersect in an open point. An attempt to remedy this was made by Durrett and Schonmann \cite{Durrett87}, whose approach will be of use to us. Yet, when restricted to PPCA, their result only applies to the ones with neighbourhood of consecutive sites as above, making it trivial (their main idea is not needed for those models). As their work is somewhat informal, we indicate that this follows from the restrictive hypothesis (H3) located at the end of Sec. 4 of \cite{Durrett87}. Improving on the approach of \cite{Durrett87} and using \cref{th:strict:monotonicity}, in \cref{app:DS} we outline how to obtain the following result. \begin{thm} \label{th:DS} If for some $p\in[0,1]$ we have $\a(p)>\b(p)$, then $\theta(p)>0$ and \begin{align*} \lim_{p'\to p-}\a(p')={}&\a(p)&\lim_{p'\to p-}\b(p')={}&\b(p). \end{align*} \end{thm} In particular, this implies $\a({p_{\mathrm{c}}})\le\b({p_{\mathrm{c}}})$. On the other hand, \cref{th:alpha} readily implies that $\a(p)\ge\b(p)$ for $p>{p_{\mathrm{c}}}$. The final ingredient for proving \cref{th:2d} is the continuity to the right of $\a$ (and $\b$), which also follows from \cref{th:alpha}, since $\a$ is the decreasing limit of the continuous non-decreasing functions ${\ensuremath{\mathbb E}} _p[r_t]$.\footnote{Indeed, ${\ensuremath{\mathbb E}} _p[r_t]$ is the limit of the polynomials ${\ensuremath{\mathbb E}} _p[\max(r_t,-M)]$ as $M\to\infty$. The limit is uniform for $p\in[p',1]$ for $p'>0$, since the negative tail of $r_t$ is bounded by a geometric variable with success rate $(p')^t$. Recalling \cref{eq:subcrit} and ${p_{\mathrm{c}}}>0$ (by comparison with branching), we further have $\a(p)=-\infty$ and $\b(p)=\infty$ for $p<{p_{\mathrm{c}}}$.} Combining these properties, we get \[\lim_{p\to{p_{\mathrm{c}}}+}\a(p)-\b(p)=0,\] which, together with \cref{th:strict:monotonicity,th:identification}, implies \cref{th:2d}. We note that in higher dimensions it is unknown whether $\bigcap_{p>{p_{\mathrm{c}}}}\accentset{\circ}{U}(p)$ is empty, a singleton or a larger set.
\section{Introduction} Historically, the design of a stabilizing controller relies on the knowledge of a mathematical model to represent the underling system. More recently, the necessity of identifying a model was reconsidered in favor of a direct data driven design, where controllers are directly synthesized from experimental data. Various efforts have been made in this direction and we refer the interested reader to \cite{hou2013model} for a survey on the topic. A direct design has the advantage that it does not suffer from modeling errors and the overall controller design is simplified by removing one step as there is no intermediate identification step. This can be especially appealing when dealing with nonlinear systems as deriving a reliable model is challenging and prone to errors. One of the main open research questions on data-driven control is how to provide stabilizing conditions for the learned controller which are provably correct. A promising result comes from behavioral system theory \cite{willems2005note}, where it has been proved that a single data trajectory obtained from one experiment can be used to represent all the input-output trajectories of a linear time-invariant system. Since \cite{coulson2019data}, which highlighted the relevance of \cite{willems2005note} for the synthesis of data-enabled predictive control, several papers have found inspiration from the paper of Willems et al. The result has been revisited through classic state-space description in \cite{depersis-tesi2020tac}, where a data driven parametrization of a closed loop system was derived and used to learn feedback controllers for unknown systems from data. Using this setting, several recent contributions have further explored the role of data in synthesis problems in multiple areas of control, including: optimal and robust control \cite{depersis-tesi2020tac}, \cite{holicki2020controller}, robust stabilization of $\mathcal{H}_2, \mathcal{H}_{\infty}$ control with noisy data \cite{depersis-tesi2020tac}, \cite{berberich2020robust}, \cite{dpt2021Aut}, \cite{van2020noisy}, \cite{berberich2019combining}, dissipativity proprieties \cite{romer2017determining}, robust set-invariance \cite{Bisoffi2020}, and the $L_2$-gain $\cite{sharf2020sample}$. The design of a data-driven stabilizing controller for nonlinear systems has been approached using various methods and for different classes of nonlinear systems \cite{novara2016data}, \cite{kaiser2017data}, \cite{lusch2018deep}, \cite{Bisoffi2020}, \cite{guo2019data}, \cite{dai2020semi}. In this paper, we focus on finding a data-driven solution to the problem of absolute stabilizability. Absolute stabilizability is the problem of enforcing the stability of the origin via feedback for a class of systems comprising a linear part and nonlinearities that satisfy a given condition. In our work we impose quadratic restrictions on the nonlinearity. The absolute stability problem was originally formulated by A.I. Lurie in \cite{lurie1957some} and solved with a Lyapunov based approach. Later in \cite{popov1958relaxing} V.M. Popov proposed a solution in the frequency domain. These two approaches were later connected by the Kalman-Yakubovich-Popov Lemma \cite{yaku} that relates an analytic property of a square transfer matrix in the frequency domain to a set of algebraic equations involving parameters of a minimal realization in time domain. To solve the absolute stabilizability problem in the case in which the system is unknwon, we start from the data driven parametrization in \cite{depersis-tesi2020tac} for a closed loop system with the addition of a nonlinear term. Then we propose a data-dependent Lyapunov-based control design assuming that a finite number of samples measuring the nonlinear term is available. One of the advantage of our formulation, compared to a model based one, is that it holds for both continuous-time and discrete-time systems providing a unified analysis and design framework for both classes of systems. We also discuss how our results can be viewed in a frequency domain stability analysis where our main result can be interpreted as a data-dependent feedback Kalman-Yakubovitch Popov Lemma \cite[Section 2.7.4]{fradkov2013nonlinear}. Finally, we discuss how to deal with different levels of prior knowledge by strengthening the assumption on the collected data. \textbf{Contribution.} Our main contributions are necessary and sufficient conditions for which a solution to the data-driven absolute stabilization problem exists. The proposed conditions can be verified directly from data by means of efficient linear programs. These conditions provide a new data based solution to the problem of absolute stabilizability for a class of uncertain nonlinear systems. \textbf{Structure.} The paper is organized as follow. The notation and problem setup is presented in Section \ref{sec:framework}. In Section \ref{sec:finite-samples-nonlin}, we present necessary and sufficient conditions under which the data-driven absolute stabilizability problem is solvable and provide the explicit expression for the controller. Finally in Section \ref{sec:relaxing}, we relax some prior knowledge about the system and derive new conditions for the problem solution. All the main results are illustrated also with practical examples. Concluding remarks are given in Section \ref{sec:concl}. \section{Framework and problem formulation} \label{sec:framework} \tikzstyle{block} = [draw, fill=white, rectangle, minimum height=3em, minimum width=6em] \tikzstyle{sum} = [draw, fill=white, circle, node distance=1cm] \tikzstyle{input} = [coordinate] \tikzstyle{input1} = [coordinate] \tikzstyle{output} = [coordinate] \tikzstyle{output2} = [coordinate] \tikzstyle{pinstyle} = [pin edge={to-,thin,black}] \begin{figure} \centering \begin{tikzpicture}[auto, node distance=2cm,>=latex'] \node [input, name=input] {}; \node [sum, right of=input] (sum) {}; \node [input1, left of=sum, node distance=1.2cm] (input1) {}; \node [block, right of=sum, node distance=3cm] (system) {\setlength\arraycolsep{2pt} $\begin{array}{rcl} x^+ &=& Ax + Bu + Lv \\ z &=& Hx \end{array}$}; \node [output, right of=system, node distance=3cm] (output) {}; \node [block, below of=system] (nonlinearity) {$v=f(t,z)$}; \node [output2, left of=nonlinearity, node distance=3cm] (output2) {}; \draw [->] (input1) -- node [name=u] {$u$}(sum); \draw [->] (sum) -- node {} (system); \draw [-] (system) -- node [name=z] {$z$}(output); \draw [->] (output) |- (nonlinearity); \draw [-] (nonlinearity) -- node [name=v] {$v$}(output2); \draw [->] (output2) -| node[pos=0.99] {$+$} node [near end] {} (sum); \end{tikzpicture} \caption{Schematic diagram of system \eqref{nonlinear.system2}.} \label{fig:diagram} \end{figure} We study the stabilization problem of a nonlinear system of the form \begin{equation}\label{nonlinear.system} x^+= Ax + Bu + \hat f(t,x) \end{equation} where $x\in \mathbb{R}^n$ is the state, $u\in \mathbb{R}^m$ is the control input, and where $\hat f(t,x):\mathbb{R}\times \mathbb{R}^n\to \mathbb{R}^n$ is a memoryless, possibly time-varying nonlinearity. The matrices $A,B$ and the map $\hat f$ are unknown. If some prior information is available regarding $\hat f$, we will model it in the form $\hat f(t, x)=L v$, $v=f(t,Hx)$, with $L$ and $H$ known matrices and $f:\mathbb{R}\times\mathbb{R}^p \to \mathbb{R}^q$. The system then becomes (see Figure \ref{fig:diagram}) \begin{equation}\label{nonlinear.system2} \setlength\arraycolsep{2pt} \begin{array}{rcl} x^+ &= & Ax + Bu + L v\\[0.1cm] z &=& Hx \\[0.1cm] v &= & f(t,z) \end{array} \end{equation} If prior information on the input matrix $L$ or $H$ is unavailable, then we set $L=I_n$, $H=I_n$, and $\hat f(t,x)=f(t,x)$. Throughout this paper, we will consider certain constraints on the admissible nonlinearities. Specifically, we will assume that the inequality \begin{equation}\label{in.asspt4-z} \begin{bmatrix} z\\ f(t,z) \end{bmatrix}^\top \begin{bmatrix} \hat Q& \hat S\\ \hat S^\top & \hat R \end{bmatrix} \begin{bmatrix} z\\ f(t,z) \end{bmatrix}\ge 0 \end{equation} holds for all the pairs $(t,z)\in \mathbb{R}\times \mathbb{R}^p$ with $z \in \text{im}\, H$, where $\hat Q=\hat Q^\top \in \mathbb{R}^{p\times p}$, $\hat S\in \mathbb{R}^{p\times q}$ and $\hat R\prec 0 \in \mathbb{R}^{q\times q}$ are known matrices (definite matrices are implicitly defined as symmetric matrices). Since $\hat R\prec 0$ the inequality \eqref{in.asspt4-z} implies $f(t,0)=0$ for all $t \in \mathbb{R}$. In the remainder, we will sometimes ask the constraint \eqref{in.asspt4-z} to be {\it regular}, by which we mean that there exists a pair $(\overline z, f(\overline t, \overline z))$ such that the inequality \eqref{in.asspt4-z} evaluated at $(\overline z, f(\overline t, \overline z))$ strictly holds. For this class of systems, a notion of stability widely studied in the literature is the so-called {\it absolute stability} which is now introduced (\emph{cf.} \cite[Definition 10.2]{khalil1996nonlinear}). \begin{definition} System \eqref{nonlinear.system2} is said to be absolutely stabilizable via linear state-feedback $u=Kx$ if there exists a matrix $K$ such that the origin of the closed-loop system \begin{equation}\label{nonlinear.system2-fb} \setlength\arraycolsep{2pt} \begin{array}{rcl} x^+ &= & (A+ BK)x + L v\\[0.1cm] z &=& Hx \\[0.1cm] v &= & f(t,z) \end{array} \end{equation} is globally uniformly asymptotically stable for any function $f$ that satisfies the inequality \eqref{in.asspt4-z}. \hspace*{\fill}~{\tiny $\blacksquare$} \end{definition} This framework covers a notable class of nonlinear systems that has appeared in several studies. \begin{enumerate} \item {\it (Lipschitz or norm bounded nonlinearities)} These are nonlinearities that satisfy \[ f(t,z)^\top f(t,z) \le \ell^2 z^\top z, \] where $\ell$ is a bound on the Lipschitz constant, which are considered in LMI-based robust stabilization of nonlinear systems \cite{vsiljak2000robust}. In the absolute stability theory literature, e.g. \cite[Section 3]{Haddad1994IJRNC}, these nonlinearities are referred to as norm-bounded nonlinearities. In this case \eqref{in.asspt4-z} holds with $\hat Q = \ell^2 I_{p}$, $\hat S= 0$ and $\hat R = -I_{q}$. \item {\it (Bounds on partial gradients)} Large Lipschitz constants might result in unfeasible conditions, and for this reason much literature is devoted to deriving less conservative Lipschitz characterizations (\cite{Zemouche2013aut} and references therein). Here, we recall a result from \cite{jin-lavaei2018cdc} that considers the nonlinear time-invariant term $\hat f(x)$ instead of $Lf(t,z)$. Under continuous differentiability of $\hat f$, and assuming that bounds $\underline{f}_{ij},\overline{f}_{ij}$ on the partial derivatives are known, namely \[ \underline{f}_{ij} \le \displaystyle\frac{\partial \hat{f}_i}{\partial x_j} \le \overline{f}_{ij} \] it holds that $\hat f(x)= L f(z)$, where $L= I_n \otimes \mathds{1}_n^\top$, $H=I_n$ and \eqref{in.asspt4-z} holds with the matrices $\hat Q, \hat S$ and $\hat R$ depending on the vectors of bounds $\overline{f},\underline{f}$. For instance, in the case $n=2$, the matrix in \eqref{in.asspt4-z} takes the form \vspace{-.3cm} {\small \begin{equation}\label{tilde.Q.Lipschitz} \left[\begin{array}{cc|cccc} \displaystyle \sum_{i=1}^2 (\overline{c}_{i1}-{c}_{i1}) & 0 & c_{11} & 0 & c_{21} & 0\\ 0 & \displaystyle \sum_{i=1}^2 (\overline{c}_{i2}-{c}_{i2}) & 0 & c_{12} & 0 & c_{22}\\ \hline \star &\star & -1 & 0 & 0 & 0 \\ \star &\star & 0 & -1 & 0 & 0 \\ \star &\star & 0 & 0 & -1 & 0 \\ \star &\star & 0 & 0 & 0 & -1 \\ \end{array} \right] \end{equation} }% where $c_{ij} = (\overline{f}_{ij}+\underline{f}_{ij})/2$ and $\overline{c}_{ij} = (\overline{f}_{ij}-\underline{f}_{ij})/2$. For additional degree of freedom, one can introduce a vector $\lambda$ of non-negative multipliers, see \cite{jin-lavaei2018cdc} for details. \item {\it (Strongly convex functions with Lipschitz gradient)} Let $\hat f(x)=\nabla g(x)$, with $\hat f(0)=0$ and $g:\mathbb{R}^n\to \mathbb{R}$ a continuously differentiable strongly convex function with parameter $m$ and having Lipschitz gradient with parameter $\ell$, with $0<m<\ell$. Then condition \eqref{in.asspt4-z} holds with $\hat Q=-2m\ell I_n$, $\hat S= (\ell+m) I_n$ and $\hat R= -2 I_n$, see \cite[Proposition 5, (3.13d)]{lessard2016analysis}. \item ({\it Sector bounded nonlinearities}) Another notable case is when the nonlinear function $f$ satisfy the sector condition $(f(t,z)-K_1 z)^\top (K_2 z-f(t,z))\ge 0$ for $(t,z)\in \mathbb{R}\times \mathbb{R}^p$, with $K=K_2-K_1\succ 0$ \cite[Definition 6.2]{khalil2002nonlinear}. In this case, inequality \eqref{in.asspt4-z} holds with $\hat Q=-K_2^\top K_1-K_1^\top K_2$, $\hat S= K_1^\top+K_2^\top$ and $\hat R=-2I_n$. \item {\it (Fully recurrent neural network)} Systems like \eqref{nonlinear.system2} with $B=0$ are also used to represent recurrent neural network, in which case $f(z)=(f(z_1)\ldots f(z_p))^\top$, $f:\mathbb{R}\to\mathbb{R}$ is a continuously differential monotone nonlinear function whose derivative $f'$ is bounded from above on the domain $\mathbb{R}$, e.g.~$f(z_i)=\tanh(z_i)$, and $z_i= H_i^\top x+ b_i$, where $H_i^\top$ is the row $i$ of the matrix of weights $H$ and $b_i$ is the entry $i$ of the vector of biases $b$. It can be shown \cite[Section IV]{barabanov2002stability} that when $b=0$ (for the case case $b\ne 0$ see \cite[Section V]{barabanov2002stability}) the condition \eqref{in.asspt4-z} holds with $\hat Q=0$, $\hat S = \Gamma$, $\hat R =-2\Gamma$, where $\Gamma$ is any symmetric matrix such that for any $i=1,2,\ldots, p$, $\gamma_{ij}<0$ for every $j\ne i$ and $\sum_{j=1}^p\gamma_{ij}>0$ for any $i$. Hence, without loss of generality, $\hat R\prec 0$. \item {\it (Norm-bound linear difference inclusion)} System \eqref{nonlinear.system2} falls into the class of the so-called norm-bound linear difference inclusion \cite[Chapter 5]{boyd1994linear}. \end{enumerate} \subsection{Problem formulation} The problem of interest is to design a control law ensuring absolute stability for the closed loop system in the event that information about the system is in the form of data samples. In this respect, we assume to collect data of the system through offline experiments. We use the notation $U_{0},X_{0}, X_1$ and $F_{0}$ to denote the data matrices \begin{subequations} \label{eq:data_matrices} \begin{align} & U_{0}:= \begin{bmatrix} u(0) & u(1) & \cdots & u(T-1) \end{bmatrix}\label{U0} \\ & X_{0}:= \begin{bmatrix} x(0) & x(1) & \cdots & x(T-1) \end{bmatrix}\label{X0} \\ & X_{1}:= \begin{bmatrix} x(1) & x(2) & \cdots & x(T) \end{bmatrix}\label{X1} \\ & F_0:=\begin{bmatrix} f(0,z(0)) & f(1,z(1)) & \cdots & f(T-1,z(T-1)) \end{bmatrix}\label{F0} \end{align} \end{subequations} We consider the following assumptions: \begin{assume}\label{assum:measurements} The matrices $U_0,X_0,X_1$ and $F_0$ are known. \hspace*{\fill}~{\tiny $\blacksquare$} \end{assume} \begin{assume}\label{assum:full-row-rank-data} The matrix \begin{equation} \label{eq:W0} W_0 := \begin{bmatrix} U_0\\ X_{0} \end{bmatrix} \end{equation} is full row-rank. \hspace*{\fill}~{\tiny $\blacksquare$} \end{assume} Before proceeding, we make some remarks. Assumption \ref{assum:measurements} means that we can collect input-state samples of the system. We note in particular that $F_0$ can be measured when the nonlinear block $f(t,Hx)$ is physically detached from the dynamical block $x^+=Ax+Bu+Lv$, as schematized in Figure \ref{fig:diagram}. Besides that, assuming that $F_0$ is known permits us to establish a clean data-based analogue of absolute stability, as well as a data-based analogue of some related results available for model-based control including the circle criterion and the feedback Kalman-Yakubovitch-Popov Lemma. Assumption \ref{assum:full-row-rank-data} deals instead with the question of richness of data. As discussed next, when this assumption holds then it is possible to express the behavior of \eqref{nonlinear.system2} under a control law $u=Kx$, with $K$ arbitrary, purely in terms of the data matrices in \eqref{eq:data_matrices}. It is known that for linear controllable systems this assumption actually reduces to a design condition that can be enforced by suitably choosing $U_0$, see \cite{willems2005note}. The question of how to design experiments so as to enforce this condition for nonlinear systems has been recently addressed in \cite{tesi20mtns}. Ways to relax this assumption will be discussed in the sequel. \section{Learning control from data}\label{sec:finite-samples-nonlin} In this section, we derive data-based conditions for absolute stability. The first step is to provide a data-based representation of the closed-loop system. Under Assumption \ref{assum:full-row-rank-data}, for any matrix $K \in \mathbb R^{m \times n}$ there exists a matrix $G \in \mathbb R^{T \times n}$ satisfying \begin{equation}\label{nonlinear.system.data-with H} \begin{bmatrix} K \\ I_n \end{bmatrix} = W_0G \end{equation} Accordingly, the behavior of \eqref{nonlinear.system2} under a control law $u=Kx$ can be equivalently expressed as \begin{equation}\label{nonlinear.system2-fb-data} \setlength\arraycolsep{2pt} \begin{array}{rcl} x^+ &= & (X_1-L F_0)G x + L v\\[0.1cm] z &= & Hx \\[0.1cm] v &= & f(t,z) \end{array} \end{equation} which follows from the chain of equalities \begin{equation}\label{nonlinear.system.data-with H} A+BK = \begin{bmatrix} B & A \end{bmatrix} \begin{bmatrix} K \\ I_n \end{bmatrix} = \begin{bmatrix} B & A \end{bmatrix} \begin{bmatrix} U_0 \\ X_0 \end{bmatrix}G \end{equation} and from $X_1=AX_0+BU_0+LF_0$. We address the absolute stabilizability problem considering quadratic Lyapunov functions $V(x)=x^\top P x$, in which case the problem becomes the one of finding two matrices $G$ and $P \succ 0$ such that \eqref{boh} holds \begin{figure*}[!t] \normalsize { \setcounter{MaxMatrixCols}{20} \begin{equation}\label{boh} \begin{bmatrix} x\\ v \end{bmatrix}^\top \begin{bmatrix} G^\top (X_1-L F_0)^\top P(X_1-L F_0)G - P & G^\top (X_1-L F_0)^\top P L\\ \star & L^\top P L \end{bmatrix} \begin{bmatrix} x\\ v \end{bmatrix}<0 \end{equation} } \hrulefill \vspace*{4pt} \end{figure*} for all $x\ne 0$ and for all $v=f(t,z)$ that satisfy \begin{equation}\label{in.asspt4-x} \begin{bmatrix} x\\ v \end{bmatrix}^\top \begin{bmatrix} Q& S\\ S^\top & R \end{bmatrix} \begin{bmatrix} x\\ v \end{bmatrix} \ge 0 \end{equation} having defined \begin{equation}\label{QSR} \begin{bmatrix} Q& S\\ S^\top & R \end{bmatrix} := \begin{bmatrix} H& 0\\ 0 & I \end{bmatrix} ^\top \begin{bmatrix} \hat Q& \hat S\\ \hat S^\top & \hat R \end{bmatrix} \begin{bmatrix} H& 0\\ 0 & I \end{bmatrix} \end{equation} The following result then holds. \begin{theorem} {\it (Data-driven absolute stabilizability)} \label{prop:absolute:stab} Consider the nonlinear system \eqref{nonlinear.system2} and let the constraint \eqref{in.asspt4-x} be {\it regular}. Suppose that Assumption \ref{assum:measurements} and \ref{assum:full-row-rank-data} hold. Then, there exist two matrices $G$ and $P\succ 0$ such that \eqref{boh} holds for all $(x,v)\ne 0$ that satisfy \eqref{in.asspt4-x} \begin{enumerate} \item ($Q\succeq 0$) if and only if there exists a $T\times n$ matrix $Y$ such that the matrix inequality \begin{equation}\label{lmi-nonl-stab-sample-nonl} \begin{bmatrix} - X_0 Y & X_0 Y S & Y^\top (X_1-L F_0)^\top & X_0 Y Q^{1/2} \\ \star & R & L^\top & 0 \\ \star & \star & - X_0 Y & 0 \\ \star & \star & \star & - I \\ \end{bmatrix}\!\! \prec 0 \end{equation} holds; \item ($Q=0$) if and only if there exists a $T\times n$ matrix $Y$ such that the matrix inequality \begin{equation}\label{lmi-nonl-stab-sample-nonl-simpler} \begin{bmatrix} - X_0 Y & X_0 Y S & Y^\top (X_1-L F_0)^\top\\ \star & R & L^\top\\ \star& \star & - X_0 Y\\ \end{bmatrix} \prec 0 \end{equation} holds; \item ($Q\preceq 0$) if there exists a $T\times n$ matrix $Y$ such that the matrix inequality \eqref{lmi-nonl-stab-sample-nonl-simpler} holds. In this case, the regularity of \eqref{in.asspt4-x} is not needed. \end{enumerate} In all the three cases, a state-feedback matrix $K$ that ensures absolute stability for the closed-loop system can be computed as $K=U_0 Y (X_0Y)^{-1}$. \end{theorem} {\it Proof.} 1) We want \eqref{boh} to hold for all $(x,v)\ne 0$ satisfying condition \eqref{in.asspt4-x}, and $G$ must additionally obey $X_0G=I_n$. We start by focusing on the relation between \eqref{boh} and \eqref{in.asspt4-x}. Note that $v=f(t,z)$ with $z=Hx$, so $v$ depends on $x$. However, this dependence can be neglected and we can equivalently ask that \eqref{boh} holds for all nonzero $(x,v) \in \mathbb{R}^n \times \mathbb{R}^q$ satisfying \eqref{in.asspt4-x}, where now $v$ is viewed as a free vector. This is because, as noted in \cite[Section 2.1.2]{kh2004stability}, for any vector $v$ satisfying \eqref{in.asspt4-x} there is a function $f(t,z)$ that satisfies \eqref{in.asspt4-x} and passes through that point. Thus, we arrived at a stability condition for which the lossless $S$-procedure applies. In particular, by \cite[Theorem 2.19]{kh2004stability} a necessary and sufficient condition to have \eqref{boh} fulfilled for all nonzero $(x,v)$ satisfying \eqref{in.asspt4-x} is that there exists a scalar $\tau\ge 0$ such that \begin{figure*}[!t] \normalsize { \begin{equation}\label{coh} \begin{bmatrix} G^\top (X_1-L F_0)^\top P(X_1-L F_0)G - P +\tau Q& G^\top (X_1-L F_0)^\top PL+\tau S\\ \star & L^\top P L+\tau R \end{bmatrix}\prec 0 \end{equation} \hrulefill } \end{figure*} \eqref{coh} holds for some $G$ and $P\succ0$, where $G$ must additionally obey $X_0G=I_n$. Without loss of generality\footnote{If $\tau=0$ the matrix inequality \eqref{boh} never holds since $L^\top P L\succeq 0$.}, let $\tau >0$, normalize the matrix $P$ ($P/\tau \to P$), and obtain \eqref{coh-norm}. \begin{figure*}[!t] \normalsize { \begin{equation}\label{coh-norm} \begin{bmatrix} G^\top (X_1-L F_0)^\top P(X_1-L F_0)G - P + Q& G^\top (X_1-L F_0)^\top PL+ S\\ \star & L^\top P L+ R \end{bmatrix}\prec 0 \end{equation} \hrulefill } \end{figure*} By Schur complement, the latter is equivalent to \begin{equation}\label{mi-in-proof-prop1} \begin{bmatrix} - P + Q& S & G^\top (X_1-L F_0)^\top\\ S^\top & R & L^\top\\ (X_1-L F_0)G & L & -P^{-1} \end{bmatrix}\prec 0 \end{equation} To prevent the simultaneous presence of $P$ and $P^{-1}$, we factorize $Q= Q^{1/2} Q^{1/2}$, apply the Schur complement another time, left- and right-multiply by ${\rm block.diag}(P^{-1}, I, I, I)$, so as to obtain \eqref{lmi-nonl-stab-sample-nonl}, where $Y=G P^{-1}$. Note in particular that, in view of this change of variable, the constraint $X_0G=I_n$ has become $X_0Y=P^{-1}$. In turn, this implies that we can substitute $P^{-1}$ with $X_0Y$, which is the reason why the LMI \eqref{lmi-nonl-stab-sample-nonl} only depends on $Y$. Finally, the relation $K=U_0G$ gives $K=U_0 Y P=U_0 Y (X_0Y)^{-1}$. 2) The arguments to prove 1) continue to hold until the matrix inequality \eqref{mi-in-proof-prop1}, which now holds without the matrix $Q$ (since $Q=0$). This allows us to directly arrive at the matrix inequality of reduced order \eqref{lmi-nonl-stab-sample-nonl-simpler}. 3) Since $Q\preceq 0$, it is straightforward to realize that \eqref{mi-in-proof-prop1} is implied by \begin{equation}\label{mi-in-proof-prop1-2} \begin{bmatrix} - P& S & G^\top (X_1-L F_0)^\top\\ S^\top & R & L^\top\\ (X_1-L F_0)G & L & -P^{-1} \end{bmatrix}\prec 0 \end{equation} Hence, \eqref{lmi-nonl-stab-sample-nonl-simpler} is a sufficient condition for \eqref{boh} to hold for all $(x,v)\ne 0$ that satisfy \eqref{in.asspt4-x}. \hspace*{\fill}~{\tiny $\blacksquare$} \begin{rem}[Relaxing Assumption \ref{assum:full-row-rank-data}] Theorem \ref{prop:absolute:stab} rests on the assumption that the matrix $W_0$ is full row rank. It is immediate to see that having $X_0$ full row rank is actually necessary since, otherwise, \eqref{lmi-nonl-stab-sample-nonl} cannot have a solution because $X_0Y$ cannot be positive definite. In contrast, \eqref{lmi-nonl-stab-sample-nonl} might have a solution even when $U_0$ is not full row rank. This happens when there exists a controller $K$ ensuring absolute stability that lies in the column space of $U_0$. In this sense, Assumption \ref{assum:measurements} guarantees that all possible controllers are evaluated. \hspace*{\fill}~{\tiny $\blacksquare$} \end{rem} \subsection{Discussion} A few points worth of discussion are in order: \subsubsection{Regularity of \eqref{in.asspt4-z} for sector bounded nonlinearities} The regularity of the constraint \eqref{in.asspt4-z} is satisfied in some notable cases. In case the nonlinearity $f(t,z)$ is decoupled, namely, $f(t,z)={\rm col}(f_1(t,z_1), \ldots, f_p(t,z_p))$, and each component satisfy a sector bound constraint, then $K_1, K_2$ are diagonal matrices and regularity of \eqref{in.asspt4-z} is guaranteed by the condition $K_2- K_1 \succ 0$, that is the interior of the sectors is non empty. \subsubsection{Exponential stabilizability} To guarantee exponential convergence of the state to the origin with decay rate $0<\rho<1$, it is enough to replace \eqref{lmi-nonl-stab-sample-nonl} with a weak matrix inequality in which the block $(1,1)$ of the matrix on the left-hand side is replaced by $- \rho X_0 Y$. In this case, the search for a solution $Y$ must be preceded by a line search on $\rho$. \subsubsection{Data-dependent Feedback Kalman-Yakubovitch-Popov Lemma} Theorem \ref{prop:absolute:stab} can be viewed as a data-dependent Feedback Kalman-Yakubovitch-Popov Lemma \cite[Section 2.7.4]{fradkov2013nonlinear}, meaning that it results in a data-dependent feedback design guaranteeing the well-known frequency domain condition of the closed-loop system. In fact, in the proof of Theorem \ref{prop:absolute:stab} we have shown that the condition \eqref{lmi-nonl-stab-sample-nonl} is equivalent to the existence of $P\succ 0$ such that \eqref{coh-norm} holds. As $Q\succeq 0$, from the block $(1,1)$ of \eqref{coh-norm} we deduce that the matrix $(X_1-L F_0)G =A+BK$ is Schur stable, hence $\det({\rm e}^{i\omega} I- A-BK)\ne 0$ for all $\omega \in \mathbb{R}$ and by the Kalman-Yakubovich-Popov lemma for discrete-time systems \cite[Theorem 2]{Rantzer1996scl}, \eqref{coh-norm} implies the frequency domain condition \begin{equation}\label{spr.freq.domain} \small \!\!\begin{bmatrix} ({\rm e}^{i\omega} I- A-BK)^{-1}L\\ I \end{bmatrix}^* \begin{bmatrix} Q& S\\ S^\top & R \end{bmatrix} \begin{bmatrix} ({\rm e}^{i\omega} I- A-BK)^{-1}L\\ I \end{bmatrix} \!\! \prec\!0 \end{equation} for all $\omega\in \mathbb{R}$, where $^*$ denotes the conjugate transpose. Hence, condition \eqref{lmi-nonl-stab-sample-nonl} leads to the existence of a gain matrix $K$ such that the frequency condition \eqref{spr.freq.domain} holds. Conversely, if $\det({\rm e}^{i\omega} I- A-BK)\ne 0$ for all $\omega \in \mathbb{R}$ and the matrix inequality holds, then by \cite[Theorem 2]{Rantzer1996scl} there exists a matrix $P=P^\top$ and a real number $\tau \ge 0$ such that \eqref{coh-norm} holds. Note however that there is no guarantee, except in special cases, that $P\succ 0$, and therefore \eqref{lmi-nonl-stab-sample-nonl}, which would require a positive definite matrix $X_0Y=P^{-1}$, cannot be concluded. \subsubsection{Passive nonlinearities} The analysis of the special case of passive nonlinearities, i.e. $z^\top f(z)\ge 0$ for all $z\in \mathbb{R}^p$, in which case $Q=0$, $S=H^\top$, $R=0$, is deferred to the next section. \subsection{Continuous-time systems} One of the features of the data-dependent representation introduced in \cite{depersis-tesi2020tac} and here adopted to deal with nonlinear systems, is that it holds for both continuous-time and discrete-time systems thus allowing for a unified analysis and design framework for both classes of systems. In this subsection we see how Theorem \ref{prop:absolute:stab} becomes in the case of continuous-time systems. Besides being of interest on its own sake, our motivation is to have a result to be used for some illustrative examples, which are more commonly found for continuous-time systems in the literature. We start with the data-dependent representation for continuous-time systems, given by \begin{equation}\label{nonlinear.system2.data.ct} \begin{array}{rl} \dot x = & (X_1-L F_0)G x + L v\\ z=&Hx\\ v=& f(t,z) \end{array} \end{equation} and \begin{equation}\label{X1-ct} X_{1}= \begin{bmatrix} \dot x(t_0) & \dot x(t_1) & \ldots & \dot x(t_{T-1}) \end{bmatrix} \end{equation} with $t_k$, $k=0,1,\ldots, T-1$, the sampling times at which measurements are taken during the off-line experiment. We assume that $f$ satisfies the standard conditions for the existence and uniqueness of the solution to the feedback interconnection, namely piece-wise continuity in $t$ and local Lipschitz property in $z$. As before, we focus on the existence of a matrix $P\succ 0$ such that \eqref{boh-ct} holds for all for all $x\ne 0$ and for all $v=f(t,z)$ that satisfy \eqref{in.asspt4-x} \begin{figure*}[!t] \normalsize { \setcounter{MaxMatrixCols}{20} \begin{equation}\label{boh-ct} \begin{bmatrix} x\\ v \end{bmatrix}^\top \begin{bmatrix} G^\top (X_1-L F_0)^\top P + P(X_1-L F_0)G & P L\\ \star & 0 \end{bmatrix} \begin{bmatrix} x\\ v \end{bmatrix}<0 \end{equation} } \hrulefill \vspace*{4pt} \end{figure*} and obtain a necessary and sufficient condition given by the existence of $P\succ 0$ such that \eqref{coh-ct} holds. \begin{figure*}[!t] \normalsize { \begin{equation}\label{coh-ct} \begin{bmatrix} G^\top (X_1-L F_0)^\top P+ P(X_1- L F_0)G + Q& PL+ S\\ \star & R \end{bmatrix}\prec 0 \end{equation} \hrulefill } \end{figure*} In case $Q \succeq 0$, similar manipulations return the inequality \begin{equation}\label{lmi-nonl-stab-sample-nonl-ct} \footnotesize \begin{bmatrix} Y^\top (X_1-L F_0)^\top+ (X_1-L F_0)Y & L+ X_0Y S & X_0Y Q^{1/2}\\ \star & R & 0\\ \star & \star & -I \end{bmatrix}\prec 0 \end{equation} and control gain $K=U_0 Y (X_0Y)^{-1}$. In the case $Q=0$, we obtain the simpler condition \begin{equation}\label{lmi-nonl-stab-sample-nonl-simpler-ct} \small \begin{bmatrix} Y^\top (X_1- L F_0)^\top+ (X_1- L F_0)Y & L+ X_0Y S\\ \star & R \\ \end{bmatrix}\prec 0, \end{equation} which is also a sufficient condition for the data-dependent absolute stabilizability of the continuous-time system when $Q\prec 0$. Hence, to summarize: \begin{theorem}{\it (Data-driven absolute stabilizability of continuous-time systems)} \label{prop:absolute:stab.CT} Consider the nonlinear continuous-time system \begin{equation}\label{nonlinear.system2-ct} \dot x= Ax + Bu + L f(t,z), \quad z=Hx \end{equation} Let Assumption \ref{assum:measurements} and \ref{assum:full-row-rank-data} hold. Let the constraint \eqref{in.asspt4-x} be {\it regular}. There exists a matrix $P \succ 0$ such that \eqref{boh-ct} holds for all $(x,v)\ne 0$ that satisfy \eqref{in.asspt4-x} \begin{enumerate} \item ($Q\succeq 0$) if and only if there exists a $T\times n$ matrix $Y$ such that the matrix inequality \eqref{lmi-nonl-stab-sample-nonl-ct} holds. \item ($Q=0$) if and only if there exists a $T\times n$ matrix $Y$ such that the matrix inequality \eqref{lmi-nonl-stab-sample-nonl-simpler-ct} holds. \item ($Q\preceq 0$) if there exists a $T\times n$ matrix $Y$ such that the matrix inequality \eqref{lmi-nonl-stab-sample-nonl-simpler-ct} holds. In this case, the regularity of \eqref{in.asspt4-x} is not needed. \end{enumerate} In all the three cases, the matrix $K$ that solves the problem is given by $K=U_0 Y (X_0Y)^{-1}$. \hspace*{\fill}~{\tiny $\blacksquare$} \end{theorem} An important special case is that of passive nonlinearities, namely $z^\top f(t,z)\ge 0$ for all $z$, which corresponds to the case where $f$ belongs to the sector $[0,\infty]$ \cite[Definition 6.2]{khalil2002nonlinear} Passive nonlinearities can be written in the form \eqref{in.asspt4-x} letting $Q=0$, $S=H^\top$ and $R=0$. Since $R=0$, this case does not directly fall in the previous analysis. However, it is an easy matter to see that, in this case, a sufficient data-dependent condition for the absolute stabilizability via linear feedback $u=Kx$ of \eqref{nonlinear.system2.data.ct} amounts to the existence of a matrix $Y$ such that \begin{equation}\label{spr.split} \begin{array}{l} X_0 Y \succ 0\\ Y^\top (X_1-L F_0)^\top+ (X_1-L F_0)Y\prec 0\\ L+ X_0Y H^\top=0 \end{array} \end{equation} If a solution to \eqref{spr.split} exists then the matrix $K$ that solves the problem is given by $K=U_0 Y (X_0Y)^{-1}$. In fact, recalling that $A+BK=(X_1-L F_0)G$, condition \eqref{spr.split} can be recognized as a data-dependent condition for the \emph{strict positive realness} \cite[Lemma 6.3]{khalil2002nonlinear} of the closed-loop system $(H,A+BK,L)$, where the constraint $(A+BK)^\top P+P(A+BK) \prec 0$, $P \succ 0$, is written in the equivalent form \[ Y^\top (X_1-L F_0)^\top+ (X_1-L F_0) Y \prec 0 \] introducing the change of variable $Y=GP^{-1}$, which implies the identity $P^{-1}=X_0 Y$ because of the constraint $X_0G=I$. Condition \eqref{spr.split}, in turn, is a sufficient condition for absolute stability under passive nonlinearities \cite[Theorem 7.1]{khalil2002nonlinear}, the so-called \emph{multivariable circle criterion}. \begin{rem} {\it (Inferring open-loop properties from data-driven design)} Condition \eqref{spr.split} is also the data-dependent version of a well-known passifiability condition \cite[Theorem 2.12]{fradkov2013nonlinear}: if $L$ is full column rank, there exists a feedback $u=Kx$ which makes the triple $(H,A+BK,L)$ state strictly passive {\em if and only if} the system defined by the triple $(H, A,B)$ is minimum phase and the matrix $HL\prec 0$. Since $H,L$ are part of our prior knowledge, the condition $HL\prec 0$ can be checked. Hence, if the inequality \eqref{spr.split} is feasible, we infer the property of the open-loop triple $(H, A,B)$ being minimum phase without explicitly knowing the matrices $A,B$ but rather relying on the data $X_0, X_1, F_0$. Using conditions for data-driven control to infer properties of an open-loop system deserves further attention in future work. \hspace*{\fill}~{\tiny $\blacksquare$} \end{rem} \begin{example}\label{exmp1} We introduce an example to illustrate the application of the results in this section. In particular, we focus on the condition \eqref{spr.split}. We consider a pre-compensated\footnote{The actual system without any inner loop will be considered in Example \ref{exmp2}.} surge subsystem of an axial compressor model, see e.g.~\cite{Arcak2003aut} \begin{equation}\label{exmp1-model} \dot x= \begin{bmatrix} \frac{9}{8} & - 1\\ 0 & 0 \end{bmatrix} x + \begin{bmatrix} 0\\ 1 \end{bmatrix} u + \begin{bmatrix} -1\\ -\beta \end{bmatrix} \varphi(x_1) \end{equation} with $\beta>9/8$ a parameter and $\varphi$ a passive nonlinearity such that $z\varphi(z)\ge 0$. Specifically, $\varphi(z)=\frac{1}{2} z^3+ \frac{3}{2} z^2+ \frac{9}{8} z$. Hence, for this example, we observe that a precise knowledge of $L$ is not required, any estimate $\hat L=\alpha \begin{bmatrix} -1 & - \beta\end{bmatrix}^\top$, with $\alpha>0$, used in \eqref{spr.split} does not affect the outcome of the design. We perform an open-loop experiment from the initial condition $x(0)= \begin{bmatrix} 2 & -1 \end{bmatrix}^\top$, with $\alpha=1$, $\beta=1.2$, under the input $u(t)=\sin t$ over the time horizon $[0,1]$ using $T=5$ evenly spaced sampling times, and collect the measurements in the matrices $U_0, X_0, X_1, F_0$: \[ \small \begin{array}{rl} U_0 =& \begin{bmatrix} 0 & 0.2474 & 0.4794 & 0.6816 & 0.8415 \end{bmatrix} \\[2mm] X_0 =& \begin{bmatrix} 2 & 1.269 & 1.3208 & 1.5113 & 1.7451\\ -1 & -2.993 & -4.3724 & -6.0225 & -8.2189 \end{bmatrix} \\[3mm] X_1 =& \begin{bmatrix} -21.25 & -5.309 & -4.6511 & -5.9817 & -8.1951\\ -29.4 & -11.428 & -12.1319 & -15.7636 & -21.2112 \end{bmatrix} \\[3mm] F_0 =& \begin{bmatrix} 12.25 & 4.8648 & 5.2547 & 6.8522 & 9.1886 \end{bmatrix} \end{array}\] Assumption \ref{assum:full-row-rank-data} holds. We replace the data matrices in \eqref{spr.split} along with $\hat L=\alpha \begin{bmatrix} -1& -\beta \end{bmatrix}^\top$, having set $\alpha = 2$ and $H=\begin{bmatrix} 1 & 0\end{bmatrix}$. We remark that the parameter $\alpha$ used in \eqref{spr.split} is different from the value used during the experiment to stress that the precise knowledge of $L$ is not needed. We solve \eqref{spr.split} with {\tt cvx} \cite{cvx} for $Y$, and obtain \[ Y = \begin{bmatrix} 1.2922 & 1.6018\\ -0.1923 & 1.0528\\ 0.5113 & -0.5863\\ 0.5192 & -1.1827\\ -1.0316 & 0.2419 \end{bmatrix} \] from which \[ K=U_0 Y (X_0Y)^{-1}=\begin{bmatrix}4.3339 & -3.7435\end{bmatrix} \] We observe that \[ \small Y^\top (X_1-L F_0)^\top+ (X_1-L F_0)Y = \begin{bmatrix} -23.6176 & -30.3340\\ -30.3340 & -39.1227 \end{bmatrix} \prec 0 \] and the entries of $\alpha L+ X_0Y H^\top$ are of order $10^{-12}$, thus $2x^\top P((A+BK)x+L f(z))=2x^\top P(A+BK)x- 2 \alpha^{-1} x^\top H^\top L f(z) <0$ for all $x$, which guarantees asymptotic stability uniformly with respect to any passive nonlinearity $f$. Finally, we observe that should the nonlinearity $f$ be time-varying, i.e. $f(t,z)$ during the experiment and different from the one appearing in the dynamics when the control is applied, the same result of uniform asymptotic stability will continue to hold as long as $z^\top f(t,z)\ge 0$ during the experiment and in the closed-loop system. \hspace*{\fill}~{\tiny $\blacksquare$} \end{example} Giving up the knowledge about $L,H$ is a difficult task. In the next section we examine one possibility based on strengthening the requirement on the collected data. \section{Relaxing some prior knowledge by strengthened data assumptions}\label{sec:relaxing} The last example has shown the difficulty to relax the knowledge about the matrices $L,H$, which influence how the nonlinearity affects the dynamics and which state variables appear in the nonlinear function. The situation dramatically changes as far as $L$ is concerned if we consider a stronger assumption on the set of available data. We also examine how to use nonlinear feedback. Specifically we use the term $f(t,z)$, measured for all time $t$, in the design of the feedback control. As remarked in Section \ref{sec:framework}, real time knowledge of $f(t,z)$ is justified in those case in which the term $f(t,z)$ appears as a physically detached block whose output can be measured. In model-based absolute stability theory, the case in which the nonlinearity $f$ is unknown but the signal $f(t,z)$ is available for on-line measurements has been considered in \cite{Arcak2003aut}. Alternatively, the term $Lf(t,z(t))$ can originate from modeling the nonlinearity via a vector of known regressors $f$ and a matrix of unknown coefficients $L$, as classically done in nonlinear adaptive control \cite{Sastry1989tac}. This is also the point of view taken in recent papers that combine sparsity-promoting techniques and machine learning \cite{Brunton2016PNAS}. Here, however, since we are not interested in estimating the dynamics but directly controlling it, we do not need to assume to know the analytic expression of $f$. If we can measure in real-time $f(t,z)$, then we can use it also in the feedback policy, along with the state $x(t)$. Hence, here we consider the case in which the system \eqref{nonlinear.system2} is controlled via the feedback \begin{equation}\label{nonlinear.feedback} u(t)= K x(t) + M f(t,z(t)), \quad z(t)=Hx(t) \end{equation} where $K,M$ are matrices to design. Again we stress that the feedback gains $K,M$ are to be designed without knowing the analytic expression of $f$ nor $A,B,L$ but only the real time measurements of the vector $x(t)$ and $f(t,z)$ The matrix $H$ must be known since it appears in the matrix $Q$ (see \eqref{QSR}), which in turn appears in the LMI conditions that we give below. Since the matrix $F_0$ in \eqref{F0} is known, along with $X_0, X_1, U_0$, we take advantage of this knowledge by revising Assumption \ref{assum:full-row-rank-data} as follows: \begin{assume}\label{assum:full-row-rank-data-rev} The matrix \[ \Psi_0:= \begin{bmatrix} X_{0}\\ F_0\\ U_0 \end{bmatrix} \] is full-row rank. \end{assume} For any matrix $\begin{bmatrix} K & M\end{bmatrix}\in \mathbb{R}^{m\times (n+q)}$, we let the matrix $G=\begin{bmatrix} G_1 & G_2\end{bmatrix}\in \mathbb{R}^{T\times (n+q)}$, where $G_1$ has $n$ columns and $G_2$ $q$ columns, satisfy \begin{equation}\label{key-identity} \begin{bmatrix} I_n & 0_{n \times q} \\ 0_{q \times n} & I_q \\ K & M \end{bmatrix} = \begin{bmatrix} X_{0}\\ F_0\\ U_0 \end{bmatrix} \begin{bmatrix} G_1 & G_2\end{bmatrix} \end{equation} Then we obtain the relation \[\begin{array}{rl} \begin{bmatrix} A & L\end{bmatrix} + B \begin{bmatrix} K & M\end{bmatrix} = &\left[\begin{array}{cc|c} A & L & B\end{array}\right] \begin{bmatrix} I_n & 0_{n \times q} \\ 0_{q \times n} & I_q \\ K & M \end{bmatrix} \\[6mm] =& \left[\begin{array}{cc|c} A & L & B\end{array}\right] \begin{bmatrix}X_0 \\ F_0 \\ \hline U_0 \end{bmatrix} \begin{bmatrix} G_1 & G_2\end{bmatrix} \\ =& X_1 \begin{bmatrix} G_1 & G_2\end{bmatrix} \end{array} \] where we have exploited the identity $X_1=A X_0 + BU_0 + L F_0$. We conclude that system \eqref{nonlinear.system2} in closed-loop with the nonlinear feedback \eqref{nonlinear.feedback} is equivalent to the nonlinear data-dependent system \begin{equation}\label{data-based-repr-nonl2} \begin{array}{rl} x^+ = & X_1 \begin{bmatrix} G_1 & G_2\end{bmatrix}\begin{bmatrix} x \\ f(t,z)\end{bmatrix} \\[0.3cm] = & X_1 G_1 x + X_1 G_2 f(t,z) \\ z = & Hx \end{array} \end{equation} with matrices $G_1, G_2$ that satisfy \eqref{key-identity}. We now study the absolute stability of such data-dependent system under the quadratic constraint assumption. For the sake of brevity, we only state the result in the case $Q\succeq 0$. The other cases are immediately obtained. As before, we address the problem considering quadratic Lyapunov functions $V(x)=x^\top P x$, so that the problem becomes the one of the existence of a symmetric positive definite matrix $P$ such that \eqref{boh-3} holds (cf.~\eqref{boh}). \begin{figure*}[!t] \normalsize { \setcounter{MaxMatrixCols}{20} \begin{equation}\label{boh-3} \begin{bmatrix} x\\ v \end{bmatrix}^\top \begin{bmatrix} G_1^\top X_1^\top PX_1 G_1 - P & G_1^\top X_1^\top P X_1 G_2\\ \star & G_2^\top X_1^\top P X_1 G_2 \end{bmatrix} \begin{bmatrix} x\\ v \end{bmatrix}<0 \end{equation} } \hrulefill \vspace*{4pt} \end{figure*} \begin{theorem} {\it (Data-driven absolute stabilizability II)} \label{prop:absolute:stab:II} Consider the nonlinear system \eqref{nonlinear.system2}. Let Assumptions \ref{assum:measurements} and \ref{assum:full-row-rank-data-rev} hold and let $Q\succeq 0$. Let the constraint \eqref{in.asspt4-z} be {\it regular}. There exists a matrix $P \succ 0$ such that \eqref{boh-3} holds for all $x\ne 0$ and for all $v=f(t,z)$ that satisfy \eqref{in.asspt4-x} if and only if there exist $T\times n$, $T\times q$ and $n\times n$ matrices $Y_1$, $Y_2$, $W$ such that the conditions \begin{equation}\label{lmi-nonl-stab-sample-nonl-revised} \begin{array}{rl} \begin{bmatrix} - W & W S & Y_1^\top X_1^\top & W Q^{1/2} \\ \star & R & Y_2^\top X_1^\top & 0 \\ \star & \star & - W & 0 \\ \star & \star & \star & -I_n \\ \end{bmatrix} &\prec 0\\[8mm] \begin{bmatrix} X_0 Y_1-W& X_0 Y_2\\ F_0 Y_1 & F_0 Y_2-I_{q} \end{bmatrix} &= 0 \end{array} \end{equation} hold. In this case, the matrices $K, M$ that solve the problem are given by $K=U_0 Y_1 W^{-1}$ and $M= U_0 Y_2$. \end{theorem} {\it Proof.} Repeating the same analysis as in the proof of Theorem \ref{prop:absolute:stab} but this time for the representation \eqref{data-based-repr-nonl2}, we obtain the counterpart of \eqref{coh}, which is \begin{equation}\label{coh2} \begin{bmatrix} G_1^\top X_1^\top P X_1 G_1 - P + Q& G_1^\top X_1^\top X_1 G_2 + S\\[2mm] \star & G_2^\top X_1^\top P X_1 G_2+ R \end{bmatrix}\prec 0 \end{equation} where $P\succ 0$ is to be determined, and we have carried out the normalization $\frac{P}{\tau}\to P$. The same manipulations that followed \eqref{coh} lead in this case to \[ \begin{bmatrix} - P & S & G_1^\top X_1^\top & Q^{1/2} \\ S^\top & R & G_2^\top X_1^\top & 0\\ \star & \star & -P^{-1} & 0 \\ \star & \star & \star & -I_p \\ \end{bmatrix}\prec 0 \] By pre- and post-multiplying the matrix above by the matrix ${\rm block.diag}(P^{-1}, I, I, I)$ we obtain \eqref{lmi-nonl-stab-sample-nonl-revised} having set $W:=P^{-1}$ $Y_1 := G_1 P^{-1} $, $Y_2 := G_2$. Isolating the equation \begin{equation}\label{sub-key-identity} \begin{bmatrix} I_n & 0_{n \times q} \\ 0_{q \times n} & I_q \end{bmatrix} = \begin{bmatrix} X_{0}\\ F_0 \end{bmatrix} \begin{bmatrix} G_1 & G_2\end{bmatrix} \end{equation} in \eqref{key-identity}, taking its transpose and multiplying it on the left by ${\rm block.diag}(P^{-1},I_p)$, we obtain \[\begin{array}{rl} \begin{bmatrix} P^{-1} & 0 \\ 0 & I_p \end{bmatrix} = & \begin{bmatrix} P^{-1} G_1^\top X_0^\top & P^{-1} G_1^\top F_0^\top \\ G_2^\top X_0^\top & G_2^\top F_0^\top \end{bmatrix}\\[3mm] = & \begin{bmatrix} Y_1^\top X_0^\top & Y_1^\top F_0^\top \\ Y_2^\top X_0^\top & Y_2^\top F_0^\top \end{bmatrix} \end{array}\] that is, the constraints \eqref{key-identity} expressed in the variables $Y_1$, $Y_2$, $W$. In particular, since $P^{-1}= X_0 Y_1$, we have $X_0 Y_1 \succ 0$. Moreover, by $\begin{bmatrix} K & M \end{bmatrix}=U_0 \begin{bmatrix} G_1 & G_2\end{bmatrix}$, we obtain $K=U_0 G_1= U_0 Y_1 P= U_0 Y_1 (X_0 Y_1)^{-1}$ and $M= U_0 Y_2$. \hspace*{\fill}~{\tiny $\blacksquare$} \begin{example}\label{exmp2} We consider a slightly revised version of Example \ref{exmp1} given by \[ \dot x= \begin{bmatrix} \frac{9}{8} & - 1\\ 0 & 0 \end{bmatrix} x + \begin{bmatrix} 0\\ 1 \end{bmatrix} u + \begin{bmatrix} -1\\ 0 \end{bmatrix} \varphi(x_1) \] where the nonlinearity $\varphi(x_1)$ is defined as before. The condition \eqref{lmi-nonl-stab-sample-nonl-revised} in the case of passive nonlinearities for continuous-time systems is obtained via straighforward modifications of \eqref{spr.split}, and return the following condition: there exist $T\times n$ and $T\times q$ matrices $Y_1$, $Y_2$ such that \begin{equation}\label{spr.split.2} \begin{array}{l} Y_1^\top X_1^\top+ X_1 Y_1\prec 0\\ X_1Y_2 + X_0 Y_1 H^\top=0\\ X_0 Y_1 \succ 0\\ X_0 Y_2 = 0 \\ F_0 Y_2 =I_p \\ F_0 Y_1 = 0 \end{array} \end{equation} We consider the same experiment as in Example \ref{exmp1}: initial condition $x(0)= \begin{bmatrix} 2 & -1 \end{bmatrix}^\top$, $\alpha=2$, and input $u(t)=\sin t$ over the time horizon $[0,1]$. We take $T=10$ evenly spaced sampling times. We collect the measurements in the matrices $U_0, X_0, X_1, F_0$, which we do not report here for the sake of brevity. It can be checked that Assumption \ref{assum:full-row-rank-data-rev} is satisfied. We obtain the solution \[ \left[\begin{array}{l|l} Y_1 & Y_2 \end{array} \right] = \left[\begin{array}{rr|r} 0.9823 & -3.5073 & -5.6005\\ -2.0064 & 8.5180 & 12.8729\\ -1.3370 & 7.1478 & 10.2375\\ 0.41465 & 3.1658 & 2.6801\\ 2.2302 & -0.2915 & -4.4256\\ 3.5496 & -3.1425 & -10.2866\\ 3.7054 & -4.8273 & -12.6223\\ 2.2325 & -4.4031 & -9.1124\\ -0.7529 & -1.5849 & -0.4900\\ -6.3569 & 3.4286 & 16.4407 \end{array} \right] \] from which we compute the feedback gains \[ K=\begin{bmatrix} 7.0779 & -3.9230 \end{bmatrix}, \quad M= -3.5130 \] and the Lyapunov matrix \[ P=(X_0 Y_1)^{-1}= \begin{bmatrix} 4.1628 & -2.0853\\ -2.0853 & 1.1872 \end{bmatrix} \] which satisfies the Lyapunov inequality \[ \small Y_1^\top X_1^\top+ X_1 Y_1 = \begin{bmatrix} -2.5259 & -2.6865\\ -2.6865 & -5.2943 \end{bmatrix} \prec 0 \] and the condition $P (L+BM)= (X_0 Y_1)^{-1} X_1 Y_2= -H^\top$. We observe that the program \eqref{spr.split.2} is able to correctly compute from data that the gain $M$ satisfies $M<-9/8$, which is a necessary condition for feedback \eqref{nonlinear.feedback} to render the closed-loop system strictly positive real \cite[Example 1]{Arcak2003aut}. \hspace*{\fill}~{\tiny $\blacksquare$} \end{example} \begin{rem} Identities \eqref{key-identity} suggest a way to renounce to the knowledge of $L$ without resorting to a nonlinear feedback involving $f(t,z)$. This can be achieved by imposing $M=0$ in \eqref{key-identity}, which amounts to adding the constraint $0=U_0 G_2$ to \eqref{lmi-nonl-stab-sample-nonl-revised}. Under such conditions, we conclude that Theorem \ref{prop:absolute:stab:II} holds when the feedback is the {\em linear} one $u=Kx$. With respect to the case where $L$ is known, the price to pay is that we need Assumption \ref{assum:full-row-rank-data-rev} instead of Assumption \ref{assum:full-row-rank-data}, which is less stringent. \hspace*{\fill}~{\tiny $\blacksquare$} \end{rem} \begin{example} To illustrate the previous remark, we consider Example \ref{exmp1} again,\footnote{We do not use the system in Example \ref{exmp2} because it cannot be stabilized by a linear feedback \cite{Arcak2003aut}.} this time however without assuming that the matrix $L$ in \eqref{exmp1-model} is known. In fact, differently from Example \ref{exmp1} where we employed \eqref{spr.split}, here we solve \eqref{spr.split.2} with the addition of $0=U_0 G_2$. We use the same data $X_0, X_1, U_0, F_0$ as in Example \ref{exmp1}. We observe that $\begin{bmatrix} X_{0}^\top & F_0^\top & U_0^\top \end{bmatrix}$ is full row rank. We obtain \[ K=U_0 Y (X_0Y)^{-1}=\begin{bmatrix}35.8066 & -2.1645\end{bmatrix} \] which makes the closed-loop matrix $A+BK$ Hurwitz, with Lyapunov matrix \[ P=(X_0 Y_1)^{-1}= \begin{bmatrix} 0.5217 & -0.0181\\ -0.0181 & 0.015 \end{bmatrix} \] which satisfies $PL+H^\top =0$. \hspace*{\fill}~{\tiny $\blacksquare$} \end{example} \section{Conclusions}\label{sec:concl} We have presented a purely data-driven solution to derive a state feedback controller to stabilize systems with quadratic nonlinearities, providing necessary and sufficient conditions for the absolute stabilizability of the closed loop system. We have discussed several variants of the results under different feedback (linear and nonlinear) and strengthened conditions on the data used for the design. To focus on the impact of the quadratic nonlinearity in the data-dependent control design, we considered noiseless data. The addition of noise should be considered in future analysis. \bibliographystyle{unsrt}
\section{Introduction} \label{sec:intro} There is much interest in determining the conditions, such as the sources of ionisation for exoplanetary atmospheres, that were present in the early solar system when life is thought to have begun on Earth \citep[at a stellar age of $\sim$1\,Gyr,][]{mojzsis_1996}. This allows us to postulate what the important factors that led to life here on Earth were. These studies can then be extended to young exoplanets around solar-type stars whose atmospheres may be characterised in the near future by upcoming missions, such as the James Webb Space Telescope \citep[JWST,][]{gardner_2006,barstow_2016}. Cosmic rays represent a source of ionisation \citep{rimmer_2013} and heating \citep{roble_1987, glassgold_2012} for exoplanetary atmospheres. In this paper we compare the contributions from two distinct populations of energetic particles: stellar cosmic rays accelerated by their host stars and Galactic cosmic rays. Galactic cosmic rays reach Earth after travelling through the heliosphere \citep[see review by][]{potgieter_2013}. These cosmic rays originate from our own Galaxy and constitute a reservoir of relativistic particles in the interstellar medium (ISM) that diffuse through the magnetised solar wind in a momentum-dependent way. The propagation of Galactic cosmic rays through the stellar winds of younger solar-type stars has previously been studied \citep{svensmark_2006,cohen_2012,rodgers-lee_2020b}. The intensity of Galactic cosmic rays that reached the young Earth ($\sim$1\,Gyr old) is thought to be much reduced in comparison to present-day observed values. This is due to the increased velocity and magnetic field strength present in the stellar wind of a young ($\sim$Gyr old) solar-type star in comparison to the present-day solar wind (assuming that the turbulence properties of the wind remain constant with stellar age). Similar to what has been estimated to occur for Galactic cosmic rays, the changing physical conditions of the stellar wind throughout the life of a Sun-like star will affect the propagation of stellar cosmic rays. The propagation of Galactic cosmic rays through the astrospheres\footnote{The more general term for the heliosphere of other stellar systems} of a number of M dwarf stars has also recently been considered \citep{herbst_2020,mesquita_2021}. Here, we investigate the intensity of solar, or more generally stellar, cosmic rays as they propagate through the wind of a solar-type star throughout the star's life, particularly focusing on the intensity at the orbital distance of Earth. Solar/stellar cosmic rays are also known as solar/stellar energetic particles. We focus on solar-type stars so that our results can also be interpreted in the context of the young Sun and the origin of life on Earth. Cosmic rays are thought to be important for prebiotic chemistry and therefore may play a role in the origin of life \citep{dartnell_2011,rimmer_2014,airapetian_2016, dong_2019}. Cosmic rays may also result in observable chemical effects in exoplanetary atmospheres by leading to the production of molecules such as $\text{NH}_4^+,\, \mathrm{H_3^+}$ and $\mathrm{H_3O^+}$ \citep{helling_2019,barth_2020}. In addition to this, cosmic rays may lead to the production of \emph{fake} biosignatures via chemical reactions involving ${\rm NO_x}$ \citep{grenfell_2013}. Biosignatures are chemical signatures that are believed to be the chemical signatures of life, such as molecular oxygen \citep{meadows_2018}. Thus, in order to interpret upcoming observations which will focus on detecting biosignatures we must constrain the contribution of cosmic rays to fake biosignatures. An interesting aspect that we focus on in this paper is the fact that the intensity and momentum of stellar cosmic rays accelerated by a solar-type star most likely increase for younger stars due to their stronger stellar magnetic fields, unlike the Galactic cosmic ray spectrum which is assumed to remain constant with time. The present day Sun, despite being an inactive star, has been inferred to accelerate particles to GeV energies in strong solar flares \citep{ackermann_2014,ajello_2014,kafexhiu_2018}. There is also evidence from cosmogenic nuclides to suggest that large solar energetic particle events occurred even in the last few thousand years \citep{miyake_2019}. Thus, it is very likely that a younger Sun would accelerate particles at a higher rate, and to higher energies, due to the stronger magnetic field strengths observed for young Sun-like stars \citep[e.g.][]{johns-krull_2007,hussain_2009,donati_2014} and at a more continuous rate due to an increased frequency of stellar flares \citep{maehara_2012,maehara_2015}. A scaled up version of a large solar energetic particle event is often assumed as representative of stellar cosmic rays around main sequence M dwarf stars or young pre-main sequence solar-type stars. The work presented in this paper builds upon this research and aims to contribute towards a clearer and broader understanding of the spectral shape and intensity of stellar cosmic rays which reach exoplanets around solar-type stars as a function of age. There has also been a significant amount of research concerning the propagation of stellar cosmic rays through the magnetospheres and atmospheres of close-in exoplanets around M dwarf stars \citep{segura_2010,tabataba-vakili_2016}, as well as comparisons with Galactic cosmic rays \citep{griessmeier_2015}. \citet{atri_2020} also investigated the surface radiation dose for exoplanets resulting from stellar cosmic ray events starting at the top of an exoplanetary atmosphere considering an atmosphere with the same composition as Earth's. Our results can be used in the future as an input for these types of studies. In this paper we compare the relative intensities of stellar and Galactic cosmic rays of different energies as a function of stellar age. This allows us to estimate the age of a solar-mass star when the intensities of stellar and Galactic cosmic rays are comparable, at a given energy. This also depends on the orbital distance being considered. Here we focus mainly on the habitable zone of a solar-mass star where the presence of liquid water may be conducive to the development of life \citep{kasting_1993}. Previous studies have estimated the intensity of Galactic cosmic rays at $\sim$1\,Gyr when life is thought to have begun on Earth. Stellar cosmic rays have separately been considered in the context of T-Tauri systems \citep{rab_2017,rodgers-lee_2017,rodgers-lee_2020, fraschetti_2018,offner_2019} and more generally in star-forming regions \citep[see][for a recent review]{padovani_2020}. \citet{fraschetti_2019} also investigated the impact of stellar cosmic rays for the Trappist-1 system. \citet{scheucher_2020} focused on the chemical effect of a large stellar energetic particle event on the habitability of Proxima Cen b. However, the propagation of stellar cosmic rays through stellar systems has not yet been investigated as a function of stellar rotation rate or at the potentially critical time when the Sun was $\sim$1\,Gyr old. We also compare the relative intensities of stellar and Galactic cosmic rays for the HR2562 system \citep{konopacky_2016} which we focused on previously in \citet{rodgers-lee_2020b}. The paper is structured as follows: in Section\,\ref{sec:form} we describe the details of our model and the properties that we have adopted for the stellar cosmic rays. In Section\,\ref{sec:results} we present and discuss our results in relation to the young Sun and the young exoplanet, HR 2562b. Finally, we present our conclusions in Section\,\ref{sec:conclusions}. \section*{Acknowledgements} DRL and AAV acknowledge funding from the European Research Council (ERC) under the European Union's Horizon 2020 research and innovation programme (grant agreement No 817540, ASTROFLOW). The authors wish to acknowledge the DJEI/DES/SFI/HEA Irish Centre for High-End Computing (ICHEC) for the provision of computational facilities and support. DRL would like to thank Christiane Helling for very helpful discussions which improved the paper. We thank the anonymous reviewer for their constructive comments. \section*{Data Availability} The output data underlying this article will be available via zenodo.org upon publication. \section{Discussion \& conclusions} \label{sec:conclusions} In this paper we have investigated the differential intensity of stellar cosmic rays that reach the habitable zone of a solar-type star as a function of stellar rotation rate (or age). We motivated a new spectral shape for stellar cosmic rays that evolves as a function of stellar rotation rate. In particular, the maximum injected stellar cosmic ray energy and total injected stellar cosmic ray power evolve as a function of stellar rotation rate. We consider stellar cosmic rays injected at the surface of the star, which would be associated with stellar flares whose solar counterpart are known as impulsive SEP events. The values for the total injected stellar cosmic ray power and the maximum stellar cosmic ray energy that we provide in this paper can be used to reproduce our injected stellar cosmic ray spectrum. We then used the results of a 1.5D stellar wind model for the stellar wind properties \citep[from][]{rodgers-lee_2020b} in combination with a 1D cosmic ray transport model to calculate the differential intensity of stellar cosmic rays at different orbital distances. Our main findings are that, close to the pion threshold energy, stellar cosmic rays dominate over Galactic cosmic rays at Earth's orbit for the stellar ages that we considered, $t_*=0.6-2.9$\,Gyr ($\Omega =1.3-4\Omega_\odot$). Stellar cosmic rays dominate over Galactic cosmic rays up to $\sim10\,$GeV energies for stellar rotation rates $>3 \Omega_\odot$, corresponding approximately to a stellar age of 600\,Myr. The differential intensities of the stellar cosmic rays increases with stellar rotation rate, almost entirely due to the increasing stellar cosmic ray luminosity. At 1\,Gyr, when life is thought to have begun on Earth, we find that high fluxes of stellar cosmic rays dominate over Galactic cosmic rays up to 4\,GeV energies. However, based on stellar flare rates, we estimate that the stellar cosmic ray fluxes may only be continuous in time up to MeV energies even for the fastest rotator cases that we consider. For momenta where the diffusive transport rate is larger than the flare rate, the flare injection cannot be treated as continuous. The transition point corresponds to $p_\mathrm{c,max} = 0.1$ and $0.4$\,GeV$/c$, or to $T_\mathrm{c,max} = 5$ and 80\,MeV, for the slow rotator/solar and young solar cases, respectively. Our results overall highlight the importance of considering stellar cosmic rays in the future for characterising the atmospheres of young close-in exoplanets. They also highlight the possible importance of stellar cosmic rays for the beginning of life on the young Earth and potentially on other exoplanets. We find for the young exoplanet HR\,2562b, orbiting its host star at 20\,au, that stellar cosmic rays dominate over Galactic cosmic rays up to $\sim4\,$GeV energies despite the large orbital distance of the exoplanet. However, these stellar cosmic ray fluxes may not be continuous in time. Our results presented in Fig.\,\ref{fig:omega}, for a stellar age of 600\,Myr ($\Omega=4\Omega_\odot$), demonstrate that low energy stellar cosmic rays ($<$GeV) move advectively as they travel out through the stellar wind from the injection region to 1\,au. In this region the low energy cosmic rays are also impacted by adiabatic losses. Beyond 1\,au the low energy cosmic rays are influenced to a greater extent by diffusion. This finding is quite interesting because the velocity of the solar wind at close distances is currently unknown. NASA's Parker Solar Probe \citep{bale_2019} and ESA's Solar Orbiter \citep{owen_2020} have only recently begun to probe the solar wind at these distances. Thus, our simulation results are sensitive to parameters of the solar wind that are only now being observationally constrained. If the solar wind is faster in this region than what we have used in our models then the fluxes of stellar cosmic rays that we calculate at larger radii will be smaller. Our results are based on a 1D cosmic ray transport model coupled with a 1.5D stellar wind model. In reality, stellar winds are not spherically symmetric. Latitudinal variations are seen in the solar wind which also depend on the solar cycle \citep[e.g.][]{mccomas_2003} and magnetic maps of other low-mass stars also show that the magnetic field structure is not azimuthally symmetric \citep[e.g.][]{llama_2013,vidotto_2014b}. Gradients in the magnetic field can lead to particle drifts which we cannot investigate with our models. Our results are based on steady-state simulations which means that effects occurring on timescales shorter than the rotation period of the star are neglected in the cosmic ray transport model. The fact that flares may also occur at positions on the stellar surface which then do not reach Earth is not taken into account in our models. It will be of great interest in the future to use 2D or 3D cosmic ray transport models in combination with 3D stellar wind models \citep[e.g.][]{kavanagh_2019,folsom_2020} to study in greater detail the stellar cosmic ray fluxes reaching known exoplanets. Our results represent some type of average behaviour that could be expected: at particular times during a stellar cycle the stellar cosmic ray production rate via flares could be increased, whereas at other times during the minimum of a stellar cycle the production rate would be lower. However, due to the present lack of observational constraints for the stellar cosmic ray fluxes in other stellar systems using a simple 1D cosmic ray transport model and a 1.5D stellar wind model is justified. Finally, it is also worth bearing in mind that the stellar cosmic rays considered here are representative of impulsive events. The stellar cosmic ray fluxes produced by CMEs are likely to be far in excess of those presented here. These fluxes would be even more transient in nature than the stellar cosmic ray fluxes presented here. In light of these findings, future modelling of stellar cosmic rays from transient flare events and gradual events appears motivated. \section{Results} \label{sec:results} In this section we investigate the evolution of the stellar cosmic ray spectrum at different orbital distances as a function of stellar rotation rate. Five parameters vary with $\Omega$ for these simulations: $B(r)$, $v(r)$, $R_\text{h}$, $L_\mathrm{CR}$ and $p_\mathrm{max}$. The value of $R_\text{h}$ does not play much of a role in our simulations since it is always much larger than the orbital distances that we are interested in. After travelling through the stellar wind, stellar cosmic rays can interact with a planet's atmosphere. If a planetary magnetic field is present this will also influence the propagation of the stellar cosmic rays through the atmosphere \citep[e.g.][]{griessmeier_2015}. Higher energy cosmic rays will be less easily deflected by an exoplanetary magnetic field. Cosmic rays with energies that are capable of reaching the surface of an exoplanet are of interest for the origin of life. For this, the pion production threshold energy of 290\,MeV should be significant. Pions produce secondary particles which can trigger particle showers \citep[as discussed in][for instance]{atri_2020}. Sufficiently energetic secondary particles, such as neutrons, can reach the surface of a planet which are known as ground level enhancements. Solar neutrons have been detected even on Earth with neutron monitors since the 1950s \citep{simpson_1951}. Thus, our aim is to determine the range of stellar rotation rates for which the differential intensity of stellar cosmic rays dominates over Galactic cosmic rays at energies above the pion threshold energy. \begin{figure*} \includegraphics[width=\textwidth]{hz_panel} \centering \caption{The differential intensity of stellar cosmic rays (blue shaded regions) and Galactic cosmic rays (green shaded regions) in the habitable zone as a function of kinetic energy. Each panel represents a different value for the stellar rotation rate. $\Omega=2.1\Omega_\odot$ corresponds to $t_*=1$\,Gyr, shown in (c), when life is thought to have begun on Earth. Also shown are the differential intensities of stellar (solid red line) and Galactic cosmic rays (red dashed line) at 20\,au, the orbital distance of HR 2562b, in panel (e). The black solid line is a fit to the \emph{Voyager 1} data for the LIS. The grey dashed line represents the pion threshold energy, 290\,MeV. See text in Section\,\,\ref{subsec:scr_omega}. } \label{fig:omega} \end{figure*} \subsection{Stellar cosmic rays as a function of stellar rotation rate (or age)} \label{subsec:scr_omega} Fig.\,\ref{fig:omega} shows the stellar cosmic ray differential intensities as a function of kinetic energy for our simulations. In each of the panels the blue shaded region represents the values of differential intensities for stellar cosmic rays present in the habitable zone for a solar-mass star. For comparison, the green shaded region shows the differential intensities for Galactic cosmic rays in the habitable zone \citep[from the simulations presented in][]{rodgers-lee_2020b}. The habitable zone of a solar-mass star evolves with stellar age which we have incorporated in the shaded regions of Fig.\,\ref{fig:omega}. We follow the formalism of \citet{selsis_2007} with the recent Venus and early Mars criteria, using the stellar evolutionary model of \citet{baraffe_1998}. At 600\,Myr the young Sun was less luminous and had an effective temperature slightly smaller than its present day value. Thus, the habitable zone at 600\,Myr was located closer to the Sun between $r \sim 0.64-1.58$\,au in comparison to the present day values of $r\sim 0.72-1.77$\,au (using the recent Venus and early Mars criteria). Given the finite resolution of our spatial grid some of the blue shaded regions in Fig.\,\ref{fig:omega} are slightly smaller than the calculated habitable zone. Finally, for comparison in each of the panels the solid black line shows the LIS values \citep[from][]{vos_2015}. The vertical grey dashed line represents the pion threshold energy at 290\,MeV. Figs.\,\ref{fig:omega}(a)-(f) show at the pion threshold energy that stellar cosmic rays dominate over Galactic cosmic rays in the habitable zone for all values of stellar rotation rate (or age) that we consider. The energy that they dominate up to differs though as a function of stellar rotation rate (given in Table\,\ref{table:sim_parameters}). For instance, at $\Omega=1.3\,\Omega_\odot$, the transition from stellar cosmic rays dominating over Galactic cosmic rays occurs at $\sim1.3\,$GeV. It increases up to $\sim13\,$GeV for $\Omega=4\,\Omega_\odot$. The stellar cosmic ray fluxes also increase in the habitable zone as a function of stellar rotation rate. At the same time, the Galactic cosmic ray fluxes decrease. The red dashed line and solid lines in Fig.\,\ref{fig:omega}(e) are the values for the differential intensities at 20\,au for Galactic and stellar cosmic rays, respectively. We previously discussed the Galactic cosmic ray differential intensities for $\Omega = 3.5\Omega_\odot$ (Fig.\,\ref{fig:omega}(e) here) in \citet{rodgers-lee_2020b} in the context of the HR2562 exoplanetary system. HR2562 is a young solar-like star with a warm Jupiter exoplanet orbiting at 20\,au. Although Galactic cosmic rays (dashed red line) represent a source of continuous cosmic ray flux, stellar cosmic rays can dominate (solid red line) at approximately the orbital distance of the exoplanet for $\lesssim$ 5\,GeV. This would happen at times of impulsive events. The solid blue line in Fig.\,\ref{fig:sketch} shows the steady-state spectrum close to the star corresponding to $\Omega = 4\Omega_\odot$. By comparing with the values for the fluxes found in the habitable zone, shown in Fig.\,\ref{fig:omega}(f), we can determine by how many orders of magnitude the stellar cosmic ray fluxes have decreased between $\sim1\,R_\odot$ and $\sim$1\,au ($\sim200\,R_\odot$). The decrease is slightly greater than 4 orders of magnitude. The decrease is the combined result of diffusive and advective processes. In Appendix\,\ref{sec:test}, we discuss the effect of the different physical processes, shown in Fig.\,\ref{fig:appendix}. Fig.\,\ref{fig:timescales_omega21} shows the timescales for the different physical processes for $\Omega = 4\Omega_\odot$. The diffusion timescales for 0.015, 0.1, 1 and 10 GeV energy cosmic rays are shown by the solid lines in Fig.\,\ref{fig:timescales_omega21} where $t_\mathrm{diff} = r^2/\kappa(r,p,\Omega)$. The magenta dots represent an estimate for the momentum advection timescale $t_\mathrm{madv}\sim 3r/v$. For $r\lesssim$1\,au, Fig.\,\ref{fig:timescales_omega21} shows that the spatial and momentum advection timescales are shorter than the diffusion timescale for cosmic rays with kinetic energies $\lesssim$GeV. These low energy cosmic rays are affected by adiabatic losses in this region and are being advected by the stellar wind, rather than propagating diffusively. Since the stellar cosmic rays are injected close to the surface of the star only the cosmic rays with kinetic energies $\gtrsim$GeV, and therefore short diffusion timescales, propagate diffusively out of this region. \begin{figure} \centering \includegraphics[width=0.5\textwidth]{tdiff_4omega} \centering \caption{Timescales for the different physical processes for the stellar wind properties corresponding to a stellar rotation rate of $\Omega = 4\Omega_\odot$, corresponding to $t_*\sim 600\,$Myr. The solid lines represent the diffusion timescale for cosmic rays with different energies. The magenta dotted line and the grey dashed line represent the momentum advection and advection timescales, respectively. For 10\,GeV cosmic rays, $t_\mathrm{madv}\lesssim t_\mathrm{diff}$ at $r\lesssim 0.03\,$au and $t_\mathrm{madv}\lesssim t_\mathrm{diff}$ at $r\lesssim 0.5\,$au for GeV energies. This illustrates the importance of adiabatic losses for the stellar cosmic rays at small orbital distances. } \label{fig:timescales_omega21} \end{figure} We also investigated the sensitivity of our results on our choice of $p_{\rm max}$ in Appendix\,\ref{subsec:pb}. Fig.\,\ref{fig:comparisons} shows the results of adopting a higher maximum cosmic ray momentum for $\Omega = 3.5\Omega_\odot$. We find that the location of the stellar cosmic ray spectral break is an important parameter to constrain and that it affects our results significantly, with the maximum energy at which stellar cosmic rays dominate Galactic cosmic rays being an increasing function of $p_\mathrm{max}$. \begin{figure} \includegraphics[width=\columnwidth]{junnormalised_036} \centering \caption{Plot of the differential intensities for different stellar rotation rates at 1\,au. The shaded red region represents different stellar rotation rates corresponding to the same stellar age, namely 600\,Myr. } \label{fig:junnormalised} \end{figure} \subsection{Differential intensities as a function of rotation rate at 1\,au} Fig.\,\ref{fig:junnormalised} shows the differential intensities of the stellar cosmic rays at 1\,au as a function of $\Omega$. The differential intensities obtained at 1\,au increase as a function of stellar rotation rate. The increase in the differential intensities is almost entirely due to the corresponding increase in $L_\text{CR}$. The red shaded region indicates the values for different stellar rotation rates with the same stellar age, $t_*=600\,$Myr. The shift in the maximum energy to higher energies with increasing stellar rotation rate can also been seen by comparing the $\Omega=1.3\Omega_\odot$ (dashed blue line) and $\Omega=4\Omega_\odot$ (dashed red line) cases. The slope of the spectrum at $10^{-2}-1$\,GeV energies becomes less steep with increasing stellar rotation and starts to turn over at slightly higher energies. \subsection{Assumption of continuous injection} \label{subsec:injection_assumption} Fig.\,\ref{fig:omega} shows that the intensities of stellar cosmic rays are greater than those of the Galactic cosmic rays at energies around the pion energy threshold for all values of stellar rotation rate that we consider. However, we must also estimate the energy up to which these stellar cosmic rays can be treated as continuous in time. In order for the stellar cosmic ray flux to be considered continuous, the rate of flare events (producing the stellar cosmic rays) must be larger than the transport rate for a given cosmic ray energy. We use $1/t_\mathrm{diff}$ at $\lesssim 1\,$au where it is approximately independent of radius as a reference value for the transport rate. We estimate the maximum stellar cosmic ray energy which can be taken as continuous by considering the relation between flare energy and flare frequency \citep[$dN/dE_\mathrm{flare}\propto E_\mathrm{flare}^{-1.8}$ from][]{maehara_2015}. First, from Fig.\,4 of \citet{maehara_2015} we can obtain the flare rate, by multiplying the flare frequency by the flare energy, as a function of flare energy. Fig.\,2 of \citet{maehara_2015} also indicates that stars with rotation periods between 5-10\,days flare approximately 10 times more frequently than slow rotators, like the Sun. Thus, as an estimate we increase the flare rate by an order of magnitude for fast rotators as a function of flare energy \citep[Fig.\,4 of][]{maehara_2015}. We determine $p_\mathrm{max}$ for a given flare energy by equating the flare energy with magnetic energy such that $E_\text{flare}\propto B^2$ \citep[similar to][]{herbst_2020b}. Therefore, using the Hillas criterion given in Eq.\,\ref{eq:hillas}, $p_\mathrm{max} \propto E_\text{flare}^{1/2}$. In Fig.\,\ref{fig:flare_rate}, we plot the flare rate (solid lines) and diffusion rates (dashed lines) as a function of momentum. The diffusive timescale for the slow rotator/$\sim$solar case is based on the stellar wind properties presented in \citet{rodgers-lee_2020b} for the present-day Sun, $\Omega=1\Omega_\odot$. For the slow rotator/solar case, this plot indicates that the maximum continuously injected cosmic ray momentum is $p_\mathrm{c,max}=0.11$\,GeV$/c$ ($T_\mathrm{c,max}=5\,$MeV). For fast rotators, it indicates that $p_\mathrm{c,max}=0.4$\,GeV$/c$ ($T_\mathrm{max}=80\,$MeV). Thus, even for our most extreme case, flare-injected stellar cosmic rays cannot be considered as continuous beyond 80\,MeV in energy. The plot has been normalised such that $\sim$GeV cosmic ray energies correspond to $E_\mathrm{flare}\sim10^{33}$erg. It is important to note that here we have determined quite low values of $p_\mathrm{c,max}$ by comparing the diffusive transport rate with the flare rate. However, a comparison of the flare rate with the chemical recombination rates in exoplanetary atmospheres may result in higher values for $p_\mathrm{c,max}$. \begin{figure} \includegraphics[width=\columnwidth]{particle_energy1} \centering \caption{Plot of flare rate \citep[flare frequency from][times $E_\mathrm{flare}$]{maehara_2015} as a function of $p_\mathrm{c,max}$ for a slow rotator like the Sun (with $P_\mathrm{rot}>20\,$days, solid blue line) and for fast rotators (with $P_\mathrm{rot}=5-10\,$days, solid green line) at 1\,au. The diffusive transport rate as a function of momentum is overplotted for $\Omega = 1\Omega_\odot$ and $\Omega = 4\Omega_\odot$ by the dashed blue and green lines, respectively. } \label{fig:flare_rate} \end{figure} \section{Test cases} \label{sec:test} We present three simulations to illustrate that the code reproduces the expected analytic results for a number of simple test cases. We isolate the effect of different physical terms in Eq.\,\ref{eq:f}, giving additional insight into the system. The test cases use the stellar wind parameters for the $\Omega = 3.5\Omega_\odot$ simulation unless explicitly stated otherwise. For all of the test simulations the same power law is injected as described in Eq.\,\ref{eq:rateb} with $p_\mathrm{max} = 1.03\,\mathrm{GeV/}c$ and $L_\mathrm{CR}=4.16\times10^{28}\,\mathrm{erg\,s^{-1}}$. The three test cases are simulations with: (a) a constant diffusion coefficient only, (b) the momentum-dependent diffusion coefficient derived from the magnetic field profile for $\Omega = 3.5\Omega_\odot$ only and (c) the diffusion coefficient used for (b) along with the spatial and momentum advection terms. These test cases are described below in more detail. The results from these tests are shown in Fig.\,\ref{fig:appendix} for $1\,$au. The first test case consisted of using a constant diffusion coefficient in momentum and space with $-v\cdot\nabla f=((\nabla \cdot v)/3) (\partial f/\partial\mathrm{ln}p)=0$ from Eq.\,\ref{eq:f} ($\kappa/\beta c = 0.07\,$au using $B=10^{-5}$G). Thus, a continuous spatial point source injection close to the origin (at $\sim1.3\,R_\odot$ in our case) with a $p^{-2}$ profile in momentum should result in a steady-state solution with the same momentum power law of $p^{-2}$ at all radii until the cosmic rays escape from the spatial outer boundary. The blue dots in Fig.\,\ref{fig:appendix} represent the cosmic ray intensities as a function of kinetic energy from the simulation at $r\sim 1\,$au. The dashed line overplot a $p^{-2}e^{-p/p_\text{max}}/\beta$ profile for comparison and show that our results match well the expected result. \begin{figure} \centering \includegraphics[width=0.5\textwidth]{fappendix_test91} \centering \caption{The differential intensity for stellar cosmic rays as a function of kinetic energy at 1\,au are shown here for a number of test cases, described in Section\,\ref{sec:test}. The blue dots are the values obtained using a constant diffusion coefficient, test case (a). The green dots represent the model with only spatial diffusion, test case (b). Finally, the magenta solid line includes all terms considered in our models, test case (c). Different power laws are shown by the dashed lines. \label{fig:appendix}} \end{figure} The second case (green dots in Fig.\,\ref{fig:appendix}) illustrates the effect of a spatially varying diffusion coefficient which also depends on momentum ($\kappa = \kappa(r,p)$, as is used in the simulations generally and using the magnetic field profile for the $\Omega = 3.5\Omega_\odot$ case). For a continuous spatial point source injection the particles now diffuse in a momentum-dependent way and the expected profile is $p^{-3}e^{-p/p_\text{max}}/\beta$. The green dashed line overplots a $p^{-3}e^{-p/p_\text{max}}/\beta$ profile for comparison and show that our results match well the expected result. Finally, we include all three terms in the transport equation which is shown by the solid magenta line in Fig.\,\ref{fig:appendix}. In comparison to the diffusion only case, the cosmic ray fluxes are decreased at 1\,au by nearly 2 orders of magnitude due to spatial and momentum advection. \section{Influence of the maximum momentum} \label{subsec:pb} Here, we investigate the sensitivity of our results on our choice of $p_\mathrm{max,\odot}$ which is used to normalise the scaling relation in Eq.\,\ref{eq:pb}. We increase $p_\mathrm{max,\odot}$ to $0.6\,\mathrm{GeV/c}$, increasing the maximum momentum to 3.3 $\mathrm{GeV}/c$ for $\Omega=3.5\Omega_\odot$. We compare the results of the simulation using this higher maximum momentum with the value adopted in the previous section. Fig.\,\ref{fig:comparisons} shows the differential intensities obtained from these simulations. The red dashed line in Fig.\,\ref{fig:comparisons} represents the results obtained using $p_\mathrm{max}=3.30\mathrm{GeV}/c$. The red dots are the same as the results shown in Fig.\,\ref{fig:junnormalised} using the lower value of $p_\mathrm{max}=1.03\mathrm{GeV}/c$. The red dash-dotted line represents the differential intensities for Galactic cosmic rays at 1\,au. The effect of changing the maximum momenta is quite significant. The higher spectral break means that stellar cosmic rays would dominate over Galactic cosmic ray fluxes up to $\sim$33\,GeV, in comparison to $\sim$10\,GeV for the lower spectral break. This increase in the intensities occurs because of the timescales for the different physical processes (shown in Fig.\,\ref{fig:timescales_omega21} for $\Omega = 4\Omega_\odot$). By increasing the spectral break to $3.3\mathrm{GeV}/c$ there are sufficient numbers of $\gtrsim$GeV energy cosmic rays that can avoid momentum losses in the innermost region of the stellar wind. \begin{figure} \includegraphics[width=0.5\textwidth]{higher_break1au_35} \centering \caption{The differential intensities for stellar (with two different spectral breaks) and Galactic cosmic rays at 1\,au are plotted for $\Omega=3.5\Omega_\odot$. The dotted lines represent the same values as in Fig.\,\ref{fig:junnormalised}. } \label{fig:comparisons} \end{figure} \section{Formulation} \label{sec:form} In this section we motivate our stellar cosmic ray spectrum as a function of stellar rotation rate. We also briefly describe the cosmic ray transport model and stellar wind model that we use \citep[previously presented in][]{rodgers-lee_2020b}. \subsection{From solar to stellar cosmic rays} The present-day Sun is the only star for which we can directly detect solar cosmic rays and determine the energy spectrum of energetic particles arriving to Earth. We use these observations of the present-day Sun to guide our estimate for the stellar cosmic ray spectrum of solar-type stars of different ages, which are representative of the Sun in the past. The shape of the energy spectrum and the overall power in stellar cosmic rays are the two quantities required to describe a stellar energetic particle spectrum (Section\,\ref{subsec:qinj}). Solar energetic particle (SEP) events can broadly be divided into two categories known as gradual and impulsive events \citep[][for instance]{reames_2013,klein_2017}. Gradual SEP events are thought to be mainly driven by the acceleration of particles at the shock fronts of coronal mass ejections (CMEs) as they propagate. These events produce the largest fluences of protons at Earth. Impulsive SEP events are associated with flares close to the corona of the Sun and while they result in lower proton fluences at Earth they occur more frequently than gradual events. The terms `gradual' and `impulsive' refer to the associated X-ray signatures. While gradual SEP events associated with CMEs produce the largest fluences of protons detected at Earth it is unclear what energies the CMEs would have and how frequently they occur for younger solar-type stars \citep{aarnio_2012, drake_2013,osten_2015}. Very large intensities of stellar cosmic rays associated with very energetic, but infrequent, CMEs may simply wipe out any existing life \citep{cullings_2006,atri_2020} on young exoplanets rather than helping to kick start it. On the other hand lower intensities of stellar cosmic rays, associated with impulsive flare events, at a more constant rate may be more of a catalyst for life \citep{atri_2016,lingam_2018,dong_2019}. In the context of the potential impact of stellar energetic particles on exoplanetary atmospheres we restrict our focus here to protons. This is because only protons can be accelerated to $\sim$GeV energies, rather than electrons which suffer from energy losses. Many white light (referring to broad-band continuum enhancement, rather than chromospheric line emission, for instance) flares have been detected by the Kepler mission \citep{koch_2010}. An increase in the frequency of super-flares (bolometric flare energies of $>10^{33}\,$erg) with increasing stellar rotation (i.e. younger stars) has also been found \citep{maehara_2015}. Some of the most energetic white light flares are from pre-main sequence stars in the Orion complex detected in the Next Generation Transit Survey \citep{jackman_2020}. Since SEP events often have associated optical and X-ray emission, the detection of very energetic white light flares from younger stars/faster rotators is presumed to lead to a corresponding increase in X-rays. Indeed, young stars are known to be stronger X-ray sources in comparison to the Sun \citep{feigelson_2002}. Therefore, it seems likely that stars younger than the Sun will also produce more stellar energetic particles than the present day Sun \citep[see][for a recent estimate of stellar proton fluxes derived using the empirical relation between stellar effective temperature and starspot temperature]{herbst_2020b}. Somewhat surprisingly, given the number of superflares detected with Kepler, there have only been a small number of stellar CME candidate events \citep{argiroffi_2019,moschou_2019,vida_2019,leitzinger_2020}. To investigate the possibility that stellar CMEs are not as frequent as would be expected by extrapolating the solar flare-CME relation \citep{aarnio_2012,drake_2013,osten_2015}, \citet{alvarado-gomez_2018} illustrated using magnetohydrodynamic simulations that a strong large-scale stellar dipolar magnetic field (associated with fast rotators) may suppress CMEs below a certain energy threshold. Another line of argument discussed in \citet{drake_2013} suggests that the solar flare-CME relationship may not hold for more active stars because the high CME rate expected for active stars (obtained by extrapolating the solar flare-CME relationship) would lead to very high stellar mass-loss rates. This has not been found for mass-loss rates inferred from astrospheric Ly$\alpha$ observations \citep{wood_2002,wood_2004,wood_2014} or from transmission spectroscopy, coupled to planetary atmospheric evaporation and stellar wind models \citep{vidotto_2017b}. At the same time the number of stars with estimates for their mass-loss rates remains small. Thus, as a first estimate for the intensity of stellar energetic particles impinging on exoplanetary atmospheres we consider flare-accelerated protons that we inject close to the surface of the star. We do not consider stellar energetic particles accelerated by shocks associated with propagating CMEs due to the current lack of observational constraints for the occurence rate and energy of stellar CMEs as a function of stellar age. Our treatment of the impulsive stellar cosmic ray events is described in the following section. Our investigation treats the injection of stellar cosmic rays as continuous in time during a given epoch of a star's life. Two key factors here that control the applicability of such an assumption are that young solar-type stars (i.e. fast rotators) are known to flare more frequently than the present-day Sun, and their associated flare intensity at a given frequency is more powerful \citep{salter_2008,maehara_2012,maehara_2015}. In order to focus on stellar cosmic rays injected at such a heightened rate and power, and thus can be treated as continuous in time, we restrict our results to stellar rotation rates greater than the rotation rate of the present-day Sun. We discuss this assumption in more detail in Section\,\ref{subsec:injection_assumption}. \subsection{Transport equation for stellar cosmic rays} To model the propagation of stellar cosmic rays from a solar-type star out through the stellar system we solve the 1D cosmic ray transport equation \citep[derived by][for the modulation of Galactic cosmic rays in the solar system]{parker_1965}, assuming spherical symmetry. We use the same numerical code as presented in \citet{rodgers-lee_2020b} which includes spatial diffusion, spatial advection and energy losses due to momentum advection of the cosmic rays. The 1D transport equation is given by \begin{equation} \frac{\partial f}{\partial t} = \nabla\cdot(\kappa\nabla f)-v\cdot\nabla f +\frac{1}{3}(\nabla\cdot v)\frac{\partial f}{\partial \mathrm{ln}p} + Q, \label{eq:f} \end{equation} \noindent where $f(r,p,t)$ is the cosmic ray phase space density, $\kappa(r,p,\Omega)$ is the spatial diffusion coefficient, $v(r,\Omega)$ is the radial velocity of the stellar wind and $p$ is the momentum of the cosmic rays (taken to be protons)\footnote{There was a typographical error in Eq.\,1 of \citet{rodgers-lee_2020b} where the $v\cdot\nabla f$ term was expressed as $\nabla \cdot(vf)$.}. $Q$ is defined as \begin{equation} Q(r_\mathrm{inj},p,\Omega)=\frac{1}{4\pi p^2}\frac{d\dot N}{d^3x\,dp}, \label{eq:q} \end{equation} which represents the volumetric injection of stellar cosmic rays per unit time and per unit interval in momentum, injected at a radius of $r_\mathrm{inj} \sim1.3R_\odot$. $\dot N=dN/dt$ is the number of particles injected per unit time. $Q$ varies as a function of stellar rotation rate, $\Omega$. The details of how we treat the injection rate are discussed in Section\,\ref{subsec:qinj}. The numerical scheme and the simulation set-up are otherwise the same as that of \citet{rodgers-lee_2020b}. We assume an isotropic diffusion coefficient, which varies spatially by scaling with the magnetic field strength of the stellar wind (and on the level of turbulence present in it) and depends on the cosmic ray momentum \citep[see Eq.\,3 of][]{rodgers-lee_2020b}. Here, for simplicity we take the level of turbulence to be independent of stellar rotation rate using the same value as motivated in \citet{rodgers-lee_2020b}. Spatial advection and the adiabatic losses of the cosmic rays depend on the velocity and divergence of the stellar wind. In the context of the modulation of {\it Galactic} cosmic rays spatial and momentum advection collectively result in the suppression of the local interstellar spectrum (LIS) of Galactic cosmic rays that we observe at Earth. For {\it stellar} cosmic rays the situation is slightly different due to their place of origin in the system. Stellar cosmic rays still suffer adiabatic losses as they travel through the stellar wind via the momentum advection term, but the spatial advective term now merely advects the stellar cosmic rays out through the solar system. Spatial advection only operates as a loss term if the stellar cosmic rays are advected the whole way through and out of the stellar system. \subsection{Stellar wind model} In our model the stellar wind of a Sun-like star is launched due to thermal pressure gradients and magneto-centrifugal forces in the hot corona overcoming stellar gravity \citep{weber_1967}. The wind is heated as it expands following a polytropic equation of state. Stellar rotation is accounted for in our model leading to (a) angular momentum loss via the magnetic field frozen into the wind and (b) the development of an azimuthal component of an initially radial magnetic field. We use the same stellar wind model as in \citet{rodgers-lee_2020b} that is presented in more detail in \citet{carolan_2019}. Our 1.5D polytropic magneto-rotator stellar wind model \citep{weber_1967} is modelled with the Versatile Advection Code \citep[VAC,][]{toth_1996,johnstone_2015a} and here we provide a brief summary of it. By providing the stellar rotation rate, magnetic field, density and temperature at the base of the wind as input parameters for the model we are able to determine the magnetic field strength, velocity and density of the stellar wind as a function of orbital distance out to 1\,au. Beyond 1\,au the properties of the stellar wind are extrapolated out to the edge of the astrosphere as discussed in Section\,2.3.2 of \citet{rodgers-lee_2020b}. The main inputs for the stellar wind model that we varied in \citet{rodgers-lee_2020b} to retrieve the wind properties of a solar-type star for different ages were (a) the stellar rotation rate itself \citep[derived from observations of solar-type stars of different ages,][]{gallet_2013}, (b) the stellar magnetic field strength \citep[using the scaling law presented in][]{vidotto_2014}, (c) the base temperature \citep[using the empirical relationship with stellar rotation rate from][]{ofionnagain_2018} and (d) the base density of the stellar wind \citep[following][]{ivanova_2003}. In the stellar wind model the base, or launching point, of the wind is chosen to be $1\,R_\odot$ for the instances in time that we investigate. Table\,\ref{table:sim_parameters} provides the stellar rotation rates/ages that we consider here. The corresponding stellar surface magnetic field strength, base density and temperature that we use are given in Table 1 of \citet{rodgers-lee_2020b}. Generally, the magnetic field strengths and velocities of the stellar wind increase with increasing stellar rotation rate. \subsection{Stellar cosmic ray spectrum} \label{subsec:qinj} We assume a continuous injection spectrum for the stellar cosmic rays such that $d\dot N/dp \propto dN/dp \propto p^{-\alpha}$. We adopt a power law index of $\alpha = 2$ which in the limit of a strong non-relativistic shock is representative of diffusive shock acceleration \citep[DSA, as first analytically derived by][]{krymskii_1977,bell_1978,blandford_1978} or compatible with acceleration due to magnetic reconnection. We relate the total injected kinetic power in stellar cosmic rays, $L_\text{CR}$ (which we define in Section\,\ref{subsubsec:pcr}), to $d\dot N/dp$ in the following way \begin{eqnarray} L_\mathrm{CR} &=& \int \limits_0^\infty \frac{d\dot N}{dp} T(p)dp \label{eq:ratea} \\ &\approx& \left.\frac{d\dot N}{dp}\right |_{2mc} \int \limits_{p_\text{0}}^{p_\mathrm{M}} \left(\frac{p}{2mc} \right)^{-\alpha} e^{(-p/p_\text{max})}T(p)dp, \label{eq:rateb} \end{eqnarray} \noindent where $m$ is the proton mass, $c$ is the speed of light and $T(p) = mc^2( \sqrt{1+(p/mc)^2} - 1 )$ is the kinetic energy of the cosmic rays. $p_\mathrm{max}$ is the maximum momentum that the cosmic rays are accelerated to which is discussed further in Section\,\ref{subsubsec:pb}. The logarithmically spaced momentum bins for the cosmic rays are given by $p_k = \mathrm{exp}\{k\times\mathrm{ln}(p_M/p_0)/(M-1) + \mathrm{ln}\,p_0\}$ for $k=0,...,M$ with $M=60$. The extent of the momentum grid that we consider ranges from $p_0=0.15\,\mathrm{GeV}/c $ to $p_{\rm M}=100\,\mathrm{GeV}/c$, respectively. We have normalised the power law in Eq.\,\ref{eq:rateb} to a momentum of $2mc$ since this demarks the part of integrand which dominates the integral (for spectra in the range $2 <\alpha < 3$ of primary interest to us). To illustrate this, following \citet{drury_1989}, Eq.\,\ref{eq:ratea} can be approximated as \begin{flalign} \int \limits_0^\infty \frac{d\dot N}{dp} T(p)dp &\approx& \left.\frac{d\dot N}{dp}\right |_{2mc} \int \limits_{p_0}^{2mc} \left(\frac{p}{2mc} \right)^{-\alpha} e^{(-p/p_\text{max})}\frac{p^{2}}{2m} dp\nonumber\\ &+& \left.\frac{d\dot N}{dp}\right |_{2mc} \int \limits_{2mc}^{p_\text{M}} \left(\frac{p}{2mc} \right)^{-\alpha} e^{(-p/p_\text{max})}pc\,dp, \label{eq:rate2} \end{flalign} which has split the integral into a non-relativistic and relativistic component given by the first and second term on the righthand side of Eq.\,\ref{eq:rate2}, respectively. Eq.\,\ref{eq:rate2} implicitly assumes that $p_0\ll2mc$. For $\alpha=2$, Eq.\,\ref{eq:rate2} can be estimated as \begin{eqnarray} L_{\rm CR}\approx \left.p^2\frac{d\dot N}{dp}\right |_{2mc}\left[1-\frac{p_\mathrm{0}}{2mc}+\mathrm{ln}\left(\frac{p_\mathrm{max}}{2mc}\right)\right] \label{eq:pinj} \end{eqnarray} Thus, considering $p_\mathrm{max}\sim 3\,\mathrm{GeV}/c$ indicates that the first and last term contribute approximately equally in Eq.\,\ref{eq:pinj}. $p^2\dfrac{d\dot N}{dp}|_{2mc}$ is chosen to normalise the integral to the required value of $L_\mathrm{CR}$. \subsubsection{Spectral break as a function of stellar rotation rate} \label{subsubsec:pb} The maximum momentum of the accelerated cosmic rays, $p_\mathrm{max}$, is another important parameter that we must estimate as a function of $\Omega$. It physically represents the maximum momentum of stellar cosmic rays that we assume the star is able to efficiently accelerate particles to. Both DSA and magnetic reconnection rely on converting magnetic energy to kinetic energy. The magnetic field strength of Sun-like stars is generally accepted to increase with increasing stellar rotation rate, or decreasing stellar age \citep{vidotto_2014,folsom_2018}. This indicates that more magnetic energy would have been available at earlier times in the Sun's life or for other stars rotating faster/younger than the present-day Sun to produce stellar cosmic rays. Therefore we evolve $p_\mathrm{max}$ as a function of stellar magnetic field strength. In our model this effectively means that the maximum injected momentum evolves as a function of stellar rotation rate. We assume that \begin{equation} p_\mathrm{max}(\Omega) = p_\mathrm{max,\odot}\left(\frac{B_*(\Omega)}{B_\mathrm{*,\odot}}\right). \label{eq:pb} \end{equation} We chose $p_\mathrm{max,\odot} = 0.2\,\mathrm{GeV}/c$, corresponding to a kinetic energy of $T_\mathrm{max}=20\,$MeV \citep[][for instance, report impulsive stellar energetic particle events with kinetic energies $\gtrsim50$\,MeV]{kouloumvakos_2015}. We also investigate the effect of assuming $p_\mathrm{max,\odot} = 0.6\,\mathrm{GeV}/c$ (corresponding to $T_\mathrm{max}=200\,$MeV). The values for $p_\mathrm{max}(\Omega)$ are given in Table\,\ref{table:sim_parameters}. The maximum value that we use is 3.3GeV$/c$ for a stellar rotation rate of $3.5\Omega_\odot$ at $t_*=600$\,Myr using $p_\mathrm{max,\odot} = 0.6\,\mathrm{GeV}/c$. In comparison, \citet{padovani_2015} estimated a maximum energy of $\sim$30\,GeV for the acceleration of protons at protostellar surface shocks for $t_*\lesssim 1\,$Myr. The maximum momentum of 3.3\,GeV$/c$ that we adopt corresponds to a surface average large-scale magnetic field of $\sim 8$\,G at 600\,Myr. If we investigated younger stellar ages when it would be reasonable to adopt an average large-scale stellar magnetic field of $\sim 80$\,G then we would also find a maximum energy of $\sim$30\,GeV. Eq.\,\ref{eq:pb} is motivated by the Hillas criterion \citep{hillas_1984} which estimates that the maximum momentum achieved at a shock can be obtained using \begin{flalign} p_\text{max}c\sim q\beta_sB_{\rm s}R_{\rm s}=\frac{1}{c}\left(\frac{v}{100{\rm \,km\,s^{-1}}}\right)\left(\frac{B}{\rm 10\,G}\right)\left(\frac{R}{10^{9}\,{\rm cm}}\right){\rm GeV}\nonumber\\ \label{eq:hillas} \end{flalign} \noindent where $\beta_s=v_s/c$ and $v_s$ is the characteristic velocity associated to the scattering agent giving rise to acceleration (eg. shock velocity or turbulence velocity), $B_{\rm s}$ is the magnetic field strength within the source, and $R_{\rm s}$ is the size of the source region. If we assume that the size of the emitting region (a certain fraction of the Sun's surface) and the characteristic velocity do not change as a function of stellar rotation rate we simply obtain $p_\text{max}\propto B_{\rm s}$ as adopted in Eq.\,\ref{eq:pb}. Indeed, high energy $\gamma-$ray observations from {\it Fermi}-LAT found that for strong solar flares the inferred proton spectrum, located close to the surface of the Sun, displays a high maximum kinetic energy break of $\gtrsim 5\,$GeV \citep{ackermann_2014,ajello_2014}. Generally, the spectral break occurs at lower kinetic energies, or momenta, for less energetic but more frequent solar flares. Since the power law break in the SEP spectrum shifts to higher energies during strong solar flares this is a good indicator that $p_\mathrm{max}$ is likely to have occurred at higher momenta in the Sun's past when solar flares were more powerful. For instance, \citet{atri_2017} uses a large SEP event as a representative spectrum for an M dwarf star which has a higher cut-off energy at approximately $\sim$GeV energies. \begin{figure} \centering \includegraphics[width=0.5\textwidth]{omega_psol} \centering \caption{Kinetic power in the solar wind, $P_\mathrm{SW}$, as a function of stellar rotation rate. The righthand side of the plot indicates the total kinetic power that we inject in stellar cosmic rays corresponding to 10\% of $P_\mathrm{SW}$. } \label{fig:omega_psol} \end{figure} \subsubsection{Total kinetic power in stellar cosmic rays} \label{subsubsec:pcr} We use the kinetic power in the stellar wind, $P_\mathrm{SW}=\dot M(\Omega)v_\infty(\Omega)^2/2$, calculated from our stellar wind model to estimate $L_\mathrm{CR}$ as a function of stellar rotation rate assuming a certain efficiency, shown in Fig.\,\ref{fig:omega_psol}. $\dot M(\Omega)$ and $v_\infty(\Omega)$ are the mass loss rate and terminal speed of the stellar wind, respectively. Here we assume that $L_\mathrm{CR}\sim 0.1P_\mathrm{SW}$ which is shown on the righthand side of Fig.\,\ref{fig:omega_psol}. Such a value is typical of the equivalent efficiency factor estimated for supernova remnants \citep[][for instance]{vink_2010}. Without further evidence to go by, we simply adopt the same value here for young stellar flares. Adopting a different efficiency of 1\% or 100\%, for instance, would change the values for the differential intensity of stellar cosmic rays presented in Section\,\ref{sec:results} by a factor of 0.1 and 10, respectively. The values that we use here are broadly in line with the value of $L_\mathrm{CR} \sim 10^{28}\mathrm{erg\,s^{-1}}$ from \citet{rodgers-lee_2017} which was motivated as the kinetic power of stellar cosmic rays produced by a T-Tauri star. \subsection{Comparison of solar, stellar and Galactic cosmic ray spectra} \label{subsubsec:sketch} \begin{figure*} \centering \includegraphics[width=0.7\linewidth]{sketch_new} \centering \caption{This sketch illustrates typical cosmic ray spectra, both solar/stellar (impulsive and gradual events) and Galactic in origin, at various orbital distances in the solar/stellar system. The solid black line represents an approximation for the LIS of Galactic cosmic rays outside of the solar system. The green line represents a typical Galactic cosmic ray spectrum observed at Earth. The blue dashed line is a typical spectrum for a gradual SEP event (averaged over the duration of the event). The spectral slope $\gamma$ at high energies is also indicated in the plot. The solid blue line is the estimate for an impulsive stellar energetic particle event spectrum that we motivate in this paper for a young solar-type star ($\sim 600$Myr old) which includes a spectral break at much higher energies than the typical present-day (gradual) SEP spectrum (blue dashed line). See Section\,\ref{subsubsec:sketch} for more details. } \label{fig:sketch} \end{figure*} We include a schematic in Fig.\,\ref{fig:sketch} which shows representative values for the differential intensity of solar and Galactic cosmic rays as a function of kinetic energy. The differential intensity of cosmic rays, $j$, is often considered (rather than the phase space density given in Eq.\,\ref{eq:f}) as a function of kinetic energy which we plot in Section\,\ref{sec:results}. These quantities are related by $j(T)=dN/dT=p^2f(p)$. Fig.\,\ref{fig:sketch} includes the estimate for our most extreme steady-state spectrum for stellar cosmic rays injected close to the stellar surface for $\Omega=4\Omega_\odot$ or $t_*=600\,$Myr (solid blue line). This is representative of an impulsive stellar energetic particle event. The spectral break occurs at $\sim$GeV energies as motivated in the previous section. The resulting spectrum at 1\,au (and other orbital distances) is presented in Section\,\ref{sec:results}. \begin{table*} \centering \caption{List of parameters for the simulations. The columns are, respectively: the age ($t_*$) of the solar-type star, its rotation rate ($\Omega$) in terms of the present-day solar value ($\Omega_\odot = 2.67\times 10^{-6}\,\mathrm{rad\,s^{-1}}$), its rotation period ($P_\mathrm{rot}$), the astrospheric radius ($R_\mathrm{h}$), the radial velocity ($v_\mathrm{1au}$) and the magnitude of the total magnetic field ($|B_\mathrm{1au}|$) at $r=1$\,au. $\dot M$ is the mass-loss rate. $L_\mathrm{CR}$ is the power we inject in stellar cosmic rays which we relate to the kinetic power in the stellar wind. The second and third last columns are the momentum and kinetic energy for the stellar cosmic rays at which the exponential break in the injected spectrum occurs. In order to reproduce our injected cosmic ray spectrum ($Q$ in Eq.\,\ref{eq:f}-\ref{eq:q}): first, the values of $L_\mathrm{CR}$ and $p_\text{max}$ given below can be used in Eq.\,\ref{eq:rateb} to determine $(\frac{d\dot N}{dp})|_{2mc}$ for a given value of $\Omega$. Then, $\frac{d\dot N}{dp}$, and therefore $Q$, can be calculated for a given value of $\Omega$. The last column gives the kinetic energy below which the stellar cosmic ray intensities dominate over the Galactic cosmic ray intensities at 1\,au.} \begin{tabular}{@{}ccccccccccccccc@{}} \hline $t_*$ &$\Omega$ &$P_\mathrm{rot}$& $R_\mathrm{h}$ & $v_\mathrm{1au}$ &$|B_\mathrm{1au}|$ & $\dot M$ & $L_\mathrm{CR}=0.1P_\mathrm{SW}$ & $p_\mathrm{max}$ & $T_\mathrm{max}$ & $T(j^\text{SCR}_\text{1\,au}=j^\text{GCR}_\text{1\,au})$\\ \hline [Gyr] & $[\Omega_\odot]$&[days] &[au] & $\mathrm{[km\,s^{-1}]}$ & [G] &[$M_\odot\,\mathrm{yr}^{-1}$] & $[\mathrm{erg\,s^{-1}}$] & $[\mathrm{GeV}/c]$ & $[\mathrm{GeV}]$ & [GeV]\\ \hline 2.9 & 1.3 & 22 & 500 & 610 &$5.4\times 10^{-5}$ & $2.8\times 10^{-13}$ & $3.30\times10^{27}$ & 0.26 & 0.04 & 1.3 \\ 1.7 & 1.6 & 17 & 696 & 660 &$7.6\times 10^{-5}$ & $5.1\times 10^{-13}$ & $6.89\times10^{27}$ & 0.38 &0.07 & 2.6 \\ 1.0 & 2.1 & 13 & 950 & 720 &$1.2\times 10^{-4}$ & $8.5\times 10^{-13}$ & $1.38\times10^{28}$ & 0.54 &0.14 & 4.1 \\ 0.6 & 3.0 & 9 & 1324 & 790 &$1.8\times 10^{-4}$ & $1.5\times 10^{-12}$ & $2.99\times10^{28}$ & 0.85 &0.33 & 8.0 \\ 0.6 & 3.5 & 8 & 1530 & 820 &$2.8\times 10^{-4}$ & $2.0\times 10^{-12}$ & $4.16\times10^{28}$ & 1.03 &0.46 & 10 \\ 0.6 & 4.0 & 7 & 1725 & 850 &$3.5\times 10^{-4}$ & $2.4\times 10^{-12}$ & $5.49\times10^{28}$ & 1.23 &0.61 & 13 \\ \hline 0.6 & 3.5 & 8 & 1530 & 820 &$2.8\times 10^{-4}$ & $2.0\times 10^{-12}$ & $4.16\times10^{28}$ & 3.30 &2.49 & 33 \\ \hline \\ \end{tabular} \label{table:sim_parameters} \end{table*} A fit to the Galactic cosmic ray LIS, constrained by the {\it Voyager\,1} observations \citep{stone_2013,cummings_2016,stone_2019} outside of the heliosphere, is denoted by the solid black line in Fig.\,\ref{fig:sketch} \citep[Eq.\,1 from][]{vos_2015}. A fit to the modulated Galactic cosmic ray spectrum measured at Earth is given by the solid green line \citep[using the modified force field approximation given in Eq.10 of][with $\phi=0.09\,$GeV]{rodgers-lee_2020b}. We also indicate the spectral slope, $\gamma=2.78$, at high energies on the plot. Note, this represents $dN/dT \propto T^{-\gamma}$ rather than $dN/dp \propto p^{-\alpha}$. The power law indices $\gamma$ and $\alpha$ are related. At relativistic energies, $\gamma = \alpha$ since $T =pc$ and at non-relativistic energies $\alpha = 2\gamma-1$. It is important to note that the measurements at Earth change a certain amount as a function of the solar cycle. Here, however we treat the LIS and the Galactic cosmic ray spectrum at Earth as constant when making comparisons with the stellar cosmic ray spectrum as a function of stellar rotation rate\footnote{ It is important to note that the Galactic cosmic ray LIS may have been different in the past. Supernova remnants are believed to be a major contributor to the Galactic component of the LIS \citep{drury_1983,drury_2012}. The star formation rate (SFR, which can be linked to the number of supernova remnants using an initial mass function) of the Milky Way in the past therefore should influence the LIS in the past. For instance, high ionisation rates (with large uncertainties) have been inferred for galaxies at high redshifts which have higher SFRs than the present-day Milky Way \citep{muller_2016, indriolo_2018}. In these studies, the inferred ionisation rate is attributed to galactic cosmic rays. Recently, using observations of the white dwarf population in the solar neighbourhood ($d<100$pc), \citet{isern_2019} reconstructed an effective SFR for the Milky Way in the past. They found evidence of a peak in star formation $\sim 2.2-2.8$\,Gyr ago, an increase by a factor of $\sim$3 in comparison to the present-day SFR. Using a sample of late-type stars, \citet{rocha-pinto_2000} also found an increase in the SFR by a factor of $\sim$2.5 approximately $2-2.5$\,Gyr ago. Since these results suggest that the SFR has been within a factor of $\sim$3 of its present-day value for the stellar ages that we focus on, we did not vary the LIS fluxes with stellar age in \citet{rodgers-lee_2020b}.}. On the other hand, the differential intensities for SEPs observed at Earth cannot be treated as constant in time. The SEP spectrum at 1\,au, shown by the blue dashed line in Fig.\,\ref{fig:sketch}, is not continuous in time for the present-day Sun. The differential intensity given by the dashed blue line represents the typical intensities of SEPs at Earth that are derived from time-averaged observations of particle fluences \citep[such as those presented in][]{mewaldt_2005}. This spectrum is representative of a gradual SEP event. This type of SEP event lasts approximately a few days. \citet{rab_2017} estimated the stellar cosmic ray spectrum for a young pre-main sequence star (shown in their Fig.\,2) representing the present-day values for a typical gradual SEP event multiplied by a factor of $10^5$ \citep[the motivation for which is given in][]{feigelson_2002}. \citet{tabataba-vakili_2016} similarly use a typical spectrum for a gradual solar energetic particle event and scale it with $1/R^2$ to 0.153\,au in order to find the values for the differential intensity of stellar cosmic rays at the location of a close-in exoplanet orbiting an M dwarf star. In both of these examples the spectral shape is held constant, whereas here it is not. The propagation of stellar cosmic rays from the star/CME through the stellar system is not the focus of either of these papers. This type of treatment for estimating the spectrum of stellar cosmic ray events at 1\,au, or other orbital distances, around younger stars (and later type stars) and the impact of the underlying assumptions are what we investigate in this paper. This can be used as a starting point towards deriving more realistic stellar cosmic ray spectra in the future that can be constrained by upcoming missions like JWST and Ariel \citep{tinetti_2018}. Transmission spectroscopy using JWST will be able to detect emission features from molecules in exoplanetary atmospheres. Stellar and Galactic cosmic rays should produce the same chemical reactions. Thus, close-in exoplanets around young and/or active stars are the best candidates to detect the chemical signatures of stellar cosmic rays as they should be exposed to high stellar cosmic ray fluxes. In comparison, the Galactic cosmic ray fluxes at these orbital distances should be negligible. \citet{helling_2019} and \citet{barth_2020} identify a number of ``fingerprint ions" whose emission, if detected in an exoplanetary atmosphere, would be indicative of ionisation by cosmic rays. These fingerprint ions are ammonium ($\mathrm{NH_4^+}$) and oxonium ($\mathrm{H_3O^+}$). \citet{barth_2020} also suggest that stellar and Galactic cosmic rays contribute (along with other forms of high energy radiation, such as X-rays) to the abundance of the following key organic molecules: hydrogen cyanide (HCN), formaldehyde ($\mathrm{CH_2O}$) and ethylene ($\mathrm{C_2H_4}$). \citet{barth_2020} indicate that $\mathrm{CH_2O}$ and $\mathrm{C_2H_4}$ may be abundant enough to possibly be detected by JWST. \subsection{Overview of the simulations} We consider 7 cosmic ray transport simulations in total for our results. Additional test case simulations are presented in Appendix\,\ref{sec:test} for physical set-ups with known analytic solutions verifying that our numerical method reproduces well these expected results. Six of the 7 simulations that we ran represent the result of varying the stellar rotation rate. The remaining simulation, for $\Omega = 3.5\Omega_\odot$, investigates the effect of increasing the value of the $p_\mathrm{max}$ which is discussed in Appendix\,\ref{subsec:pb}. The parameters for the simulations are shown in Table\,\ref{table:sim_parameters}. The values for the astrospheric radii, $R_\mathrm{h}(\Omega)$, are given in Table\,\ref{table:sim_parameters} which is the outer radial boundary. These values were derived by balancing the stellar wind ram pressure against the ram pressure of the ISM \citep[see Section 2.3.3 of][]{rodgers-lee_2020b}. The logarithmically spaced radial bins for $i=0,...,N$ are given by $r_i = \mathrm{exp}\{i\times\mathrm{ln}(r_N/r_0)/(N-1) + \mathrm{ln}\,r_0\}$ where $r_0=1\,R_\odot$ and $r_N=R_\mathrm{h}(\Omega)$ with $N=60$. \section{Introduction} \label{sec:intro} There is much interest in determining the conditions, such as the sources of ionisation for exoplanetary atmospheres, that were present in the early solar system when life is thought to have begun on Earth \citep[at a stellar age of $\sim$1\,Gyr,][]{mojzsis_1996}. This allows us to postulate what the important factors that led to life here on Earth were. These studies can then be extended to young exoplanets around solar-type stars whose atmospheres may be characterised in the near future by upcoming missions, such as the James Webb Space Telescope \citep[JWST,][]{gardner_2006,barstow_2016}. Cosmic rays represent a source of ionisation \citep{rimmer_2013} and heating \citep{roble_1987, glassgold_2012} for exoplanetary atmospheres. In this paper we compare the contributions from two distinct populations of energetic particles: stellar cosmic rays accelerated by their host stars and Galactic cosmic rays. Galactic cosmic rays reach Earth after travelling through the heliosphere \citep[see review by][]{potgieter_2013}. These cosmic rays originate from our own Galaxy and constitute a reservoir of relativistic particles in the interstellar medium (ISM) that diffuse through the magnetised solar wind in a momentum-dependent way. The propagation of Galactic cosmic rays through the stellar winds of younger solar-type stars has previously been studied \citep{svensmark_2006,cohen_2012,rodgers-lee_2020b}. The intensity of Galactic cosmic rays that reached the young Earth ($\sim$1\,Gyr old) is thought to be much reduced in comparison to present-day observed values. This is due to the increased velocity and magnetic field strength present in the stellar wind of a young ($\sim$Gyr old) solar-type star in comparison to the present-day solar wind (assuming that the turbulence properties of the wind remain constant with stellar age). Similar to what has been estimated to occur for Galactic cosmic rays, the changing physical conditions of the stellar wind throughout the life of a Sun-like star will affect the propagation of stellar cosmic rays. The propagation of Galactic cosmic rays through the astrospheres\footnote{The more general term for the heliosphere of other stellar systems} of a number of M dwarf stars has also recently been considered \citep{herbst_2020,mesquita_2021}. Here, we investigate the intensity of solar, or more generally stellar, cosmic rays as they propagate through the wind of a solar-type star throughout the star's life, particularly focusing on the intensity at the orbital distance of Earth. Solar/stellar cosmic rays are also known as solar/stellar energetic particles. We focus on solar-type stars so that our results can also be interpreted in the context of the young Sun and the origin of life on Earth. Cosmic rays are thought to be important for prebiotic chemistry and therefore may play a role in the origin of life \citep{dartnell_2011,rimmer_2014,airapetian_2016, dong_2019}. Cosmic rays may also result in observable chemical effects in exoplanetary atmospheres by leading to the production of molecules such as $\text{NH}_4^+,\, \mathrm{H_3^+}$ and $\mathrm{H_3O^+}$ \citep{helling_2019,barth_2020}. In addition to this, cosmic rays may lead to the production of \emph{fake} biosignatures via chemical reactions involving ${\rm NO_x}$ \citep{grenfell_2013}. Biosignatures are chemical signatures that are believed to be the chemical signatures of life, such as molecular oxygen \citep{meadows_2018}. Thus, in order to interpret upcoming observations which will focus on detecting biosignatures we must constrain the contribution of cosmic rays to fake biosignatures. An interesting aspect that we focus on in this paper is the fact that the intensity and momentum of stellar cosmic rays accelerated by a solar-type star most likely increase for younger stars due to their stronger stellar magnetic fields, unlike the Galactic cosmic ray spectrum which is assumed to remain constant with time. The present day Sun, despite being an inactive star, has been inferred to accelerate particles to GeV energies in strong solar flares \citep{ackermann_2014,ajello_2014,kafexhiu_2018}. There is also evidence from cosmogenic nuclides to suggest that large solar energetic particle events occurred even in the last few thousand years \citep{miyake_2019}. Thus, it is very likely that a younger Sun would accelerate particles at a higher rate, and to higher energies, due to the stronger magnetic field strengths observed for young Sun-like stars \citep[e.g.][]{johns-krull_2007,hussain_2009,donati_2014} and at a more continuous rate due to an increased frequency of stellar flares \citep{maehara_2012,maehara_2015}. A scaled up version of a large solar energetic particle event is often assumed as representative of stellar cosmic rays around main sequence M dwarf stars or young pre-main sequence solar-type stars. The work presented in this paper builds upon this research and aims to contribute towards a clearer and broader understanding of the spectral shape and intensity of stellar cosmic rays which reach exoplanets around solar-type stars as a function of age. There has also been a significant amount of research concerning the propagation of stellar cosmic rays through the magnetospheres and atmospheres of close-in exoplanets around M dwarf stars \citep{segura_2010,tabataba-vakili_2016}, as well as comparisons with Galactic cosmic rays \citep{griessmeier_2015}. \citet{atri_2020} also investigated the surface radiation dose for exoplanets resulting from stellar cosmic ray events starting at the top of an exoplanetary atmosphere considering an atmosphere with the same composition as Earth's. Our results can be used in the future as an input for these types of studies. In this paper we compare the relative intensities of stellar and Galactic cosmic rays of different energies as a function of stellar age. This allows us to estimate the age of a solar-mass star when the intensities of stellar and Galactic cosmic rays are comparable, at a given energy. This also depends on the orbital distance being considered. Here we focus mainly on the habitable zone of a solar-mass star where the presence of liquid water may be conducive to the development of life \citep{kasting_1993}. Previous studies have estimated the intensity of Galactic cosmic rays at $\sim$1\,Gyr when life is thought to have begun on Earth. Stellar cosmic rays have separately been considered in the context of T-Tauri systems \citep{rab_2017,rodgers-lee_2017,rodgers-lee_2020, fraschetti_2018,offner_2019} and more generally in star-forming regions \citep[see][for a recent review]{padovani_2020}. \citet{fraschetti_2019} also investigated the impact of stellar cosmic rays for the Trappist-1 system. \citet{scheucher_2020} focused on the chemical effect of a large stellar energetic particle event on the habitability of Proxima Cen b. However, the propagation of stellar cosmic rays through stellar systems has not yet been investigated as a function of stellar rotation rate or at the potentially critical time when the Sun was $\sim$1\,Gyr old. We also compare the relative intensities of stellar and Galactic cosmic rays for the HR2562 system \citep{konopacky_2016} which we focused on previously in \citet{rodgers-lee_2020b}. The paper is structured as follows: in Section\,\ref{sec:form} we describe the details of our model and the properties that we have adopted for the stellar cosmic rays. In Section\,\ref{sec:results} we present and discuss our results in relation to the young Sun and the young exoplanet, HR 2562b. Finally, we present our conclusions in Section\,\ref{sec:conclusions}. \section*{Acknowledgements} DRL and AAV acknowledge funding from the European Research Council (ERC) under the European Union's Horizon 2020 research and innovation programme (grant agreement No 817540, ASTROFLOW). The authors wish to acknowledge the DJEI/DES/SFI/HEA Irish Centre for High-End Computing (ICHEC) for the provision of computational facilities and support. DRL would like to thank Christiane Helling for very helpful discussions which improved the paper. We thank the anonymous reviewer for their constructive comments. \section*{Data Availability} The output data underlying this article will be available via zenodo.org upon publication. \section{Discussion \& conclusions} \label{sec:conclusions} In this paper we have investigated the differential intensity of stellar cosmic rays that reach the habitable zone of a solar-type star as a function of stellar rotation rate (or age). We motivated a new spectral shape for stellar cosmic rays that evolves as a function of stellar rotation rate. In particular, the maximum injected stellar cosmic ray energy and total injected stellar cosmic ray power evolve as a function of stellar rotation rate. We consider stellar cosmic rays injected at the surface of the star, which would be associated with stellar flares whose solar counterpart are known as impulsive SEP events. The values for the total injected stellar cosmic ray power and the maximum stellar cosmic ray energy that we provide in this paper can be used to reproduce our injected stellar cosmic ray spectrum. We then used the results of a 1.5D stellar wind model for the stellar wind properties \citep[from][]{rodgers-lee_2020b} in combination with a 1D cosmic ray transport model to calculate the differential intensity of stellar cosmic rays at different orbital distances. Our main findings are that, close to the pion threshold energy, stellar cosmic rays dominate over Galactic cosmic rays at Earth's orbit for the stellar ages that we considered, $t_*=0.6-2.9$\,Gyr ($\Omega =1.3-4\Omega_\odot$). Stellar cosmic rays dominate over Galactic cosmic rays up to $\sim10\,$GeV energies for stellar rotation rates $>3 \Omega_\odot$, corresponding approximately to a stellar age of 600\,Myr. The differential intensities of the stellar cosmic rays increases with stellar rotation rate, almost entirely due to the increasing stellar cosmic ray luminosity. At 1\,Gyr, when life is thought to have begun on Earth, we find that high fluxes of stellar cosmic rays dominate over Galactic cosmic rays up to 4\,GeV energies. However, based on stellar flare rates, we estimate that the stellar cosmic ray fluxes may only be continuous in time up to MeV energies even for the fastest rotator cases that we consider. For momenta where the diffusive transport rate is larger than the flare rate, the flare injection cannot be treated as continuous. The transition point corresponds to $p_\mathrm{c,max} = 0.1$ and $0.4$\,GeV$/c$, or to $T_\mathrm{c,max} = 5$ and 80\,MeV, for the slow rotator/solar and young solar cases, respectively. Our results overall highlight the importance of considering stellar cosmic rays in the future for characterising the atmospheres of young close-in exoplanets. They also highlight the possible importance of stellar cosmic rays for the beginning of life on the young Earth and potentially on other exoplanets. We find for the young exoplanet HR\,2562b, orbiting its host star at 20\,au, that stellar cosmic rays dominate over Galactic cosmic rays up to $\sim4\,$GeV energies despite the large orbital distance of the exoplanet. However, these stellar cosmic ray fluxes may not be continuous in time. Our results presented in Fig.\,\ref{fig:omega}, for a stellar age of 600\,Myr ($\Omega=4\Omega_\odot$), demonstrate that low energy stellar cosmic rays ($<$GeV) move advectively as they travel out through the stellar wind from the injection region to 1\,au. In this region the low energy cosmic rays are also impacted by adiabatic losses. Beyond 1\,au the low energy cosmic rays are influenced to a greater extent by diffusion. This finding is quite interesting because the velocity of the solar wind at close distances is currently unknown. NASA's Parker Solar Probe \citep{bale_2019} and ESA's Solar Orbiter \citep{owen_2020} have only recently begun to probe the solar wind at these distances. Thus, our simulation results are sensitive to parameters of the solar wind that are only now being observationally constrained. If the solar wind is faster in this region than what we have used in our models then the fluxes of stellar cosmic rays that we calculate at larger radii will be smaller. Our results are based on a 1D cosmic ray transport model coupled with a 1.5D stellar wind model. In reality, stellar winds are not spherically symmetric. Latitudinal variations are seen in the solar wind which also depend on the solar cycle \citep[e.g.][]{mccomas_2003} and magnetic maps of other low-mass stars also show that the magnetic field structure is not azimuthally symmetric \citep[e.g.][]{llama_2013,vidotto_2014b}. Gradients in the magnetic field can lead to particle drifts which we cannot investigate with our models. Our results are based on steady-state simulations which means that effects occurring on timescales shorter than the rotation period of the star are neglected in the cosmic ray transport model. The fact that flares may also occur at positions on the stellar surface which then do not reach Earth is not taken into account in our models. It will be of great interest in the future to use 2D or 3D cosmic ray transport models in combination with 3D stellar wind models \citep[e.g.][]{kavanagh_2019,folsom_2020} to study in greater detail the stellar cosmic ray fluxes reaching known exoplanets. Our results represent some type of average behaviour that could be expected: at particular times during a stellar cycle the stellar cosmic ray production rate via flares could be increased, whereas at other times during the minimum of a stellar cycle the production rate would be lower. However, due to the present lack of observational constraints for the stellar cosmic ray fluxes in other stellar systems using a simple 1D cosmic ray transport model and a 1.5D stellar wind model is justified. Finally, it is also worth bearing in mind that the stellar cosmic rays considered here are representative of impulsive events. The stellar cosmic ray fluxes produced by CMEs are likely to be far in excess of those presented here. These fluxes would be even more transient in nature than the stellar cosmic ray fluxes presented here. In light of these findings, future modelling of stellar cosmic rays from transient flare events and gradual events appears motivated. \section{Results} \label{sec:results} In this section we investigate the evolution of the stellar cosmic ray spectrum at different orbital distances as a function of stellar rotation rate. Five parameters vary with $\Omega$ for these simulations: $B(r)$, $v(r)$, $R_\text{h}$, $L_\mathrm{CR}$ and $p_\mathrm{max}$. The value of $R_\text{h}$ does not play much of a role in our simulations since it is always much larger than the orbital distances that we are interested in. After travelling through the stellar wind, stellar cosmic rays can interact with a planet's atmosphere. If a planetary magnetic field is present this will also influence the propagation of the stellar cosmic rays through the atmosphere \citep[e.g.][]{griessmeier_2015}. Higher energy cosmic rays will be less easily deflected by an exoplanetary magnetic field. Cosmic rays with energies that are capable of reaching the surface of an exoplanet are of interest for the origin of life. For this, the pion production threshold energy of 290\,MeV should be significant. Pions produce secondary particles which can trigger particle showers \citep[as discussed in][for instance]{atri_2020}. Sufficiently energetic secondary particles, such as neutrons, can reach the surface of a planet which are known as ground level enhancements. Solar neutrons have been detected even on Earth with neutron monitors since the 1950s \citep{simpson_1951}. Thus, our aim is to determine the range of stellar rotation rates for which the differential intensity of stellar cosmic rays dominates over Galactic cosmic rays at energies above the pion threshold energy. \begin{figure*} \includegraphics[width=\textwidth]{hz_panel} \centering \caption{The differential intensity of stellar cosmic rays (blue shaded regions) and Galactic cosmic rays (green shaded regions) in the habitable zone as a function of kinetic energy. Each panel represents a different value for the stellar rotation rate. $\Omega=2.1\Omega_\odot$ corresponds to $t_*=1$\,Gyr, shown in (c), when life is thought to have begun on Earth. Also shown are the differential intensities of stellar (solid red line) and Galactic cosmic rays (red dashed line) at 20\,au, the orbital distance of HR 2562b, in panel (e). The black solid line is a fit to the \emph{Voyager 1} data for the LIS. The grey dashed line represents the pion threshold energy, 290\,MeV. See text in Section\,\,\ref{subsec:scr_omega}. } \label{fig:omega} \end{figure*} \subsection{Stellar cosmic rays as a function of stellar rotation rate (or age)} \label{subsec:scr_omega} Fig.\,\ref{fig:omega} shows the stellar cosmic ray differential intensities as a function of kinetic energy for our simulations. In each of the panels the blue shaded region represents the values of differential intensities for stellar cosmic rays present in the habitable zone for a solar-mass star. For comparison, the green shaded region shows the differential intensities for Galactic cosmic rays in the habitable zone \citep[from the simulations presented in][]{rodgers-lee_2020b}. The habitable zone of a solar-mass star evolves with stellar age which we have incorporated in the shaded regions of Fig.\,\ref{fig:omega}. We follow the formalism of \citet{selsis_2007} with the recent Venus and early Mars criteria, using the stellar evolutionary model of \citet{baraffe_1998}. At 600\,Myr the young Sun was less luminous and had an effective temperature slightly smaller than its present day value. Thus, the habitable zone at 600\,Myr was located closer to the Sun between $r \sim 0.64-1.58$\,au in comparison to the present day values of $r\sim 0.72-1.77$\,au (using the recent Venus and early Mars criteria). Given the finite resolution of our spatial grid some of the blue shaded regions in Fig.\,\ref{fig:omega} are slightly smaller than the calculated habitable zone. Finally, for comparison in each of the panels the solid black line shows the LIS values \citep[from][]{vos_2015}. The vertical grey dashed line represents the pion threshold energy at 290\,MeV. Figs.\,\ref{fig:omega}(a)-(f) show at the pion threshold energy that stellar cosmic rays dominate over Galactic cosmic rays in the habitable zone for all values of stellar rotation rate (or age) that we consider. The energy that they dominate up to differs though as a function of stellar rotation rate (given in Table\,\ref{table:sim_parameters}). For instance, at $\Omega=1.3\,\Omega_\odot$, the transition from stellar cosmic rays dominating over Galactic cosmic rays occurs at $\sim1.3\,$GeV. It increases up to $\sim13\,$GeV for $\Omega=4\,\Omega_\odot$. The stellar cosmic ray fluxes also increase in the habitable zone as a function of stellar rotation rate. At the same time, the Galactic cosmic ray fluxes decrease. The red dashed line and solid lines in Fig.\,\ref{fig:omega}(e) are the values for the differential intensities at 20\,au for Galactic and stellar cosmic rays, respectively. We previously discussed the Galactic cosmic ray differential intensities for $\Omega = 3.5\Omega_\odot$ (Fig.\,\ref{fig:omega}(e) here) in \citet{rodgers-lee_2020b} in the context of the HR2562 exoplanetary system. HR2562 is a young solar-like star with a warm Jupiter exoplanet orbiting at 20\,au. Although Galactic cosmic rays (dashed red line) represent a source of continuous cosmic ray flux, stellar cosmic rays can dominate (solid red line) at approximately the orbital distance of the exoplanet for $\lesssim$ 5\,GeV. This would happen at times of impulsive events. The solid blue line in Fig.\,\ref{fig:sketch} shows the steady-state spectrum close to the star corresponding to $\Omega = 4\Omega_\odot$. By comparing with the values for the fluxes found in the habitable zone, shown in Fig.\,\ref{fig:omega}(f), we can determine by how many orders of magnitude the stellar cosmic ray fluxes have decreased between $\sim1\,R_\odot$ and $\sim$1\,au ($\sim200\,R_\odot$). The decrease is slightly greater than 4 orders of magnitude. The decrease is the combined result of diffusive and advective processes. In Appendix\,\ref{sec:test}, we discuss the effect of the different physical processes, shown in Fig.\,\ref{fig:appendix}. Fig.\,\ref{fig:timescales_omega21} shows the timescales for the different physical processes for $\Omega = 4\Omega_\odot$. The diffusion timescales for 0.015, 0.1, 1 and 10 GeV energy cosmic rays are shown by the solid lines in Fig.\,\ref{fig:timescales_omega21} where $t_\mathrm{diff} = r^2/\kappa(r,p,\Omega)$. The magenta dots represent an estimate for the momentum advection timescale $t_\mathrm{madv}\sim 3r/v$. For $r\lesssim$1\,au, Fig.\,\ref{fig:timescales_omega21} shows that the spatial and momentum advection timescales are shorter than the diffusion timescale for cosmic rays with kinetic energies $\lesssim$GeV. These low energy cosmic rays are affected by adiabatic losses in this region and are being advected by the stellar wind, rather than propagating diffusively. Since the stellar cosmic rays are injected close to the surface of the star only the cosmic rays with kinetic energies $\gtrsim$GeV, and therefore short diffusion timescales, propagate diffusively out of this region. \begin{figure} \centering \includegraphics[width=0.5\textwidth]{tdiff_4omega} \centering \caption{Timescales for the different physical processes for the stellar wind properties corresponding to a stellar rotation rate of $\Omega = 4\Omega_\odot$, corresponding to $t_*\sim 600\,$Myr. The solid lines represent the diffusion timescale for cosmic rays with different energies. The magenta dotted line and the grey dashed line represent the momentum advection and advection timescales, respectively. For 10\,GeV cosmic rays, $t_\mathrm{madv}\lesssim t_\mathrm{diff}$ at $r\lesssim 0.03\,$au and $t_\mathrm{madv}\lesssim t_\mathrm{diff}$ at $r\lesssim 0.5\,$au for GeV energies. This illustrates the importance of adiabatic losses for the stellar cosmic rays at small orbital distances. } \label{fig:timescales_omega21} \end{figure} We also investigated the sensitivity of our results on our choice of $p_{\rm max}$ in Appendix\,\ref{subsec:pb}. Fig.\,\ref{fig:comparisons} shows the results of adopting a higher maximum cosmic ray momentum for $\Omega = 3.5\Omega_\odot$. We find that the location of the stellar cosmic ray spectral break is an important parameter to constrain and that it affects our results significantly, with the maximum energy at which stellar cosmic rays dominate Galactic cosmic rays being an increasing function of $p_\mathrm{max}$. \begin{figure} \includegraphics[width=\columnwidth]{junnormalised_036} \centering \caption{Plot of the differential intensities for different stellar rotation rates at 1\,au. The shaded red region represents different stellar rotation rates corresponding to the same stellar age, namely 600\,Myr. } \label{fig:junnormalised} \end{figure} \subsection{Differential intensities as a function of rotation rate at 1\,au} Fig.\,\ref{fig:junnormalised} shows the differential intensities of the stellar cosmic rays at 1\,au as a function of $\Omega$. The differential intensities obtained at 1\,au increase as a function of stellar rotation rate. The increase in the differential intensities is almost entirely due to the corresponding increase in $L_\text{CR}$. The red shaded region indicates the values for different stellar rotation rates with the same stellar age, $t_*=600\,$Myr. The shift in the maximum energy to higher energies with increasing stellar rotation rate can also been seen by comparing the $\Omega=1.3\Omega_\odot$ (dashed blue line) and $\Omega=4\Omega_\odot$ (dashed red line) cases. The slope of the spectrum at $10^{-2}-1$\,GeV energies becomes less steep with increasing stellar rotation and starts to turn over at slightly higher energies. \subsection{Assumption of continuous injection} \label{subsec:injection_assumption} Fig.\,\ref{fig:omega} shows that the intensities of stellar cosmic rays are greater than those of the Galactic cosmic rays at energies around the pion energy threshold for all values of stellar rotation rate that we consider. However, we must also estimate the energy up to which these stellar cosmic rays can be treated as continuous in time. In order for the stellar cosmic ray flux to be considered continuous, the rate of flare events (producing the stellar cosmic rays) must be larger than the transport rate for a given cosmic ray energy. We use $1/t_\mathrm{diff}$ at $\lesssim 1\,$au where it is approximately independent of radius as a reference value for the transport rate. We estimate the maximum stellar cosmic ray energy which can be taken as continuous by considering the relation between flare energy and flare frequency \citep[$dN/dE_\mathrm{flare}\propto E_\mathrm{flare}^{-1.8}$ from][]{maehara_2015}. First, from Fig.\,4 of \citet{maehara_2015} we can obtain the flare rate, by multiplying the flare frequency by the flare energy, as a function of flare energy. Fig.\,2 of \citet{maehara_2015} also indicates that stars with rotation periods between 5-10\,days flare approximately 10 times more frequently than slow rotators, like the Sun. Thus, as an estimate we increase the flare rate by an order of magnitude for fast rotators as a function of flare energy \citep[Fig.\,4 of][]{maehara_2015}. We determine $p_\mathrm{max}$ for a given flare energy by equating the flare energy with magnetic energy such that $E_\text{flare}\propto B^2$ \citep[similar to][]{herbst_2020b}. Therefore, using the Hillas criterion given in Eq.\,\ref{eq:hillas}, $p_\mathrm{max} \propto E_\text{flare}^{1/2}$. In Fig.\,\ref{fig:flare_rate}, we plot the flare rate (solid lines) and diffusion rates (dashed lines) as a function of momentum. The diffusive timescale for the slow rotator/$\sim$solar case is based on the stellar wind properties presented in \citet{rodgers-lee_2020b} for the present-day Sun, $\Omega=1\Omega_\odot$. For the slow rotator/solar case, this plot indicates that the maximum continuously injected cosmic ray momentum is $p_\mathrm{c,max}=0.11$\,GeV$/c$ ($T_\mathrm{c,max}=5\,$MeV). For fast rotators, it indicates that $p_\mathrm{c,max}=0.4$\,GeV$/c$ ($T_\mathrm{max}=80\,$MeV). Thus, even for our most extreme case, flare-injected stellar cosmic rays cannot be considered as continuous beyond 80\,MeV in energy. The plot has been normalised such that $\sim$GeV cosmic ray energies correspond to $E_\mathrm{flare}\sim10^{33}$erg. It is important to note that here we have determined quite low values of $p_\mathrm{c,max}$ by comparing the diffusive transport rate with the flare rate. However, a comparison of the flare rate with the chemical recombination rates in exoplanetary atmospheres may result in higher values for $p_\mathrm{c,max}$. \begin{figure} \includegraphics[width=\columnwidth]{particle_energy1} \centering \caption{Plot of flare rate \citep[flare frequency from][times $E_\mathrm{flare}$]{maehara_2015} as a function of $p_\mathrm{c,max}$ for a slow rotator like the Sun (with $P_\mathrm{rot}>20\,$days, solid blue line) and for fast rotators (with $P_\mathrm{rot}=5-10\,$days, solid green line) at 1\,au. The diffusive transport rate as a function of momentum is overplotted for $\Omega = 1\Omega_\odot$ and $\Omega = 4\Omega_\odot$ by the dashed blue and green lines, respectively. } \label{fig:flare_rate} \end{figure} \section{Formulation} \label{sec:form} In this section we motivate our stellar cosmic ray spectrum as a function of stellar rotation rate. We also briefly describe the cosmic ray transport model and stellar wind model that we use \citep[previously presented in][]{rodgers-lee_2020b}. \subsection{From solar to stellar cosmic rays} The present-day Sun is the only star for which we can directly detect solar cosmic rays and determine the energy spectrum of energetic particles arriving to Earth. We use these observations of the present-day Sun to guide our estimate for the stellar cosmic ray spectrum of solar-type stars of different ages, which are representative of the Sun in the past. The shape of the energy spectrum and the overall power in stellar cosmic rays are the two quantities required to describe a stellar energetic particle spectrum (Section\,\ref{subsec:qinj}). Solar energetic particle (SEP) events can broadly be divided into two categories known as gradual and impulsive events \citep[][for instance]{reames_2013,klein_2017}. Gradual SEP events are thought to be mainly driven by the acceleration of particles at the shock fronts of coronal mass ejections (CMEs) as they propagate. These events produce the largest fluences of protons at Earth. Impulsive SEP events are associated with flares close to the corona of the Sun and while they result in lower proton fluences at Earth they occur more frequently than gradual events. The terms `gradual' and `impulsive' refer to the associated X-ray signatures. While gradual SEP events associated with CMEs produce the largest fluences of protons detected at Earth it is unclear what energies the CMEs would have and how frequently they occur for younger solar-type stars \citep{aarnio_2012, drake_2013,osten_2015}. Very large intensities of stellar cosmic rays associated with very energetic, but infrequent, CMEs may simply wipe out any existing life \citep{cullings_2006,atri_2020} on young exoplanets rather than helping to kick start it. On the other hand lower intensities of stellar cosmic rays, associated with impulsive flare events, at a more constant rate may be more of a catalyst for life \citep{atri_2016,lingam_2018,dong_2019}. In the context of the potential impact of stellar energetic particles on exoplanetary atmospheres we restrict our focus here to protons. This is because only protons can be accelerated to $\sim$GeV energies, rather than electrons which suffer from energy losses. Many white light (referring to broad-band continuum enhancement, rather than chromospheric line emission, for instance) flares have been detected by the Kepler mission \citep{koch_2010}. An increase in the frequency of super-flares (bolometric flare energies of $>10^{33}\,$erg) with increasing stellar rotation (i.e. younger stars) has also been found \citep{maehara_2015}. Some of the most energetic white light flares are from pre-main sequence stars in the Orion complex detected in the Next Generation Transit Survey \citep{jackman_2020}. Since SEP events often have associated optical and X-ray emission, the detection of very energetic white light flares from younger stars/faster rotators is presumed to lead to a corresponding increase in X-rays. Indeed, young stars are known to be stronger X-ray sources in comparison to the Sun \citep{feigelson_2002}. Therefore, it seems likely that stars younger than the Sun will also produce more stellar energetic particles than the present day Sun \citep[see][for a recent estimate of stellar proton fluxes derived using the empirical relation between stellar effective temperature and starspot temperature]{herbst_2020b}. Somewhat surprisingly, given the number of superflares detected with Kepler, there have only been a small number of stellar CME candidate events \citep{argiroffi_2019,moschou_2019,vida_2019,leitzinger_2020}. To investigate the possibility that stellar CMEs are not as frequent as would be expected by extrapolating the solar flare-CME relation \citep{aarnio_2012,drake_2013,osten_2015}, \citet{alvarado-gomez_2018} illustrated using magnetohydrodynamic simulations that a strong large-scale stellar dipolar magnetic field (associated with fast rotators) may suppress CMEs below a certain energy threshold. Another line of argument discussed in \citet{drake_2013} suggests that the solar flare-CME relationship may not hold for more active stars because the high CME rate expected for active stars (obtained by extrapolating the solar flare-CME relationship) would lead to very high stellar mass-loss rates. This has not been found for mass-loss rates inferred from astrospheric Ly$\alpha$ observations \citep{wood_2002,wood_2004,wood_2014} or from transmission spectroscopy, coupled to planetary atmospheric evaporation and stellar wind models \citep{vidotto_2017b}. At the same time the number of stars with estimates for their mass-loss rates remains small. Thus, as a first estimate for the intensity of stellar energetic particles impinging on exoplanetary atmospheres we consider flare-accelerated protons that we inject close to the surface of the star. We do not consider stellar energetic particles accelerated by shocks associated with propagating CMEs due to the current lack of observational constraints for the occurence rate and energy of stellar CMEs as a function of stellar age. Our treatment of the impulsive stellar cosmic ray events is described in the following section. Our investigation treats the injection of stellar cosmic rays as continuous in time during a given epoch of a star's life. Two key factors here that control the applicability of such an assumption are that young solar-type stars (i.e. fast rotators) are known to flare more frequently than the present-day Sun, and their associated flare intensity at a given frequency is more powerful \citep{salter_2008,maehara_2012,maehara_2015}. In order to focus on stellar cosmic rays injected at such a heightened rate and power, and thus can be treated as continuous in time, we restrict our results to stellar rotation rates greater than the rotation rate of the present-day Sun. We discuss this assumption in more detail in Section\,\ref{subsec:injection_assumption}. \subsection{Transport equation for stellar cosmic rays} To model the propagation of stellar cosmic rays from a solar-type star out through the stellar system we solve the 1D cosmic ray transport equation \citep[derived by][for the modulation of Galactic cosmic rays in the solar system]{parker_1965}, assuming spherical symmetry. We use the same numerical code as presented in \citet{rodgers-lee_2020b} which includes spatial diffusion, spatial advection and energy losses due to momentum advection of the cosmic rays. The 1D transport equation is given by \begin{equation} \frac{\partial f}{\partial t} = \nabla\cdot(\kappa\nabla f)-v\cdot\nabla f +\frac{1}{3}(\nabla\cdot v)\frac{\partial f}{\partial \mathrm{ln}p} + Q, \label{eq:f} \end{equation} \noindent where $f(r,p,t)$ is the cosmic ray phase space density, $\kappa(r,p,\Omega)$ is the spatial diffusion coefficient, $v(r,\Omega)$ is the radial velocity of the stellar wind and $p$ is the momentum of the cosmic rays (taken to be protons)\footnote{There was a typographical error in Eq.\,1 of \citet{rodgers-lee_2020b} where the $v\cdot\nabla f$ term was expressed as $\nabla \cdot(vf)$.}. $Q$ is defined as \begin{equation} Q(r_\mathrm{inj},p,\Omega)=\frac{1}{4\pi p^2}\frac{d\dot N}{d^3x\,dp}, \label{eq:q} \end{equation} which represents the volumetric injection of stellar cosmic rays per unit time and per unit interval in momentum, injected at a radius of $r_\mathrm{inj} \sim1.3R_\odot$. $\dot N=dN/dt$ is the number of particles injected per unit time. $Q$ varies as a function of stellar rotation rate, $\Omega$. The details of how we treat the injection rate are discussed in Section\,\ref{subsec:qinj}. The numerical scheme and the simulation set-up are otherwise the same as that of \citet{rodgers-lee_2020b}. We assume an isotropic diffusion coefficient, which varies spatially by scaling with the magnetic field strength of the stellar wind (and on the level of turbulence present in it) and depends on the cosmic ray momentum \citep[see Eq.\,3 of][]{rodgers-lee_2020b}. Here, for simplicity we take the level of turbulence to be independent of stellar rotation rate using the same value as motivated in \citet{rodgers-lee_2020b}. Spatial advection and the adiabatic losses of the cosmic rays depend on the velocity and divergence of the stellar wind. In the context of the modulation of {\it Galactic} cosmic rays spatial and momentum advection collectively result in the suppression of the local interstellar spectrum (LIS) of Galactic cosmic rays that we observe at Earth. For {\it stellar} cosmic rays the situation is slightly different due to their place of origin in the system. Stellar cosmic rays still suffer adiabatic losses as they travel through the stellar wind via the momentum advection term, but the spatial advective term now merely advects the stellar cosmic rays out through the solar system. Spatial advection only operates as a loss term if the stellar cosmic rays are advected the whole way through and out of the stellar system. \subsection{Stellar wind model} In our model the stellar wind of a Sun-like star is launched due to thermal pressure gradients and magneto-centrifugal forces in the hot corona overcoming stellar gravity \citep{weber_1967}. The wind is heated as it expands following a polytropic equation of state. Stellar rotation is accounted for in our model leading to (a) angular momentum loss via the magnetic field frozen into the wind and (b) the development of an azimuthal component of an initially radial magnetic field. We use the same stellar wind model as in \citet{rodgers-lee_2020b} that is presented in more detail in \citet{carolan_2019}. Our 1.5D polytropic magneto-rotator stellar wind model \citep{weber_1967} is modelled with the Versatile Advection Code \citep[VAC,][]{toth_1996,johnstone_2015a} and here we provide a brief summary of it. By providing the stellar rotation rate, magnetic field, density and temperature at the base of the wind as input parameters for the model we are able to determine the magnetic field strength, velocity and density of the stellar wind as a function of orbital distance out to 1\,au. Beyond 1\,au the properties of the stellar wind are extrapolated out to the edge of the astrosphere as discussed in Section\,2.3.2 of \citet{rodgers-lee_2020b}. The main inputs for the stellar wind model that we varied in \citet{rodgers-lee_2020b} to retrieve the wind properties of a solar-type star for different ages were (a) the stellar rotation rate itself \citep[derived from observations of solar-type stars of different ages,][]{gallet_2013}, (b) the stellar magnetic field strength \citep[using the scaling law presented in][]{vidotto_2014}, (c) the base temperature \citep[using the empirical relationship with stellar rotation rate from][]{ofionnagain_2018} and (d) the base density of the stellar wind \citep[following][]{ivanova_2003}. In the stellar wind model the base, or launching point, of the wind is chosen to be $1\,R_\odot$ for the instances in time that we investigate. Table\,\ref{table:sim_parameters} provides the stellar rotation rates/ages that we consider here. The corresponding stellar surface magnetic field strength, base density and temperature that we use are given in Table 1 of \citet{rodgers-lee_2020b}. Generally, the magnetic field strengths and velocities of the stellar wind increase with increasing stellar rotation rate. \subsection{Stellar cosmic ray spectrum} \label{subsec:qinj} We assume a continuous injection spectrum for the stellar cosmic rays such that $d\dot N/dp \propto dN/dp \propto p^{-\alpha}$. We adopt a power law index of $\alpha = 2$ which in the limit of a strong non-relativistic shock is representative of diffusive shock acceleration \citep[DSA, as first analytically derived by][]{krymskii_1977,bell_1978,blandford_1978} or compatible with acceleration due to magnetic reconnection. We relate the total injected kinetic power in stellar cosmic rays, $L_\text{CR}$ (which we define in Section\,\ref{subsubsec:pcr}), to $d\dot N/dp$ in the following way \begin{eqnarray} L_\mathrm{CR} &=& \int \limits_0^\infty \frac{d\dot N}{dp} T(p)dp \label{eq:ratea} \\ &\approx& \left.\frac{d\dot N}{dp}\right |_{2mc} \int \limits_{p_\text{0}}^{p_\mathrm{M}} \left(\frac{p}{2mc} \right)^{-\alpha} e^{(-p/p_\text{max})}T(p)dp, \label{eq:rateb} \end{eqnarray} \noindent where $m$ is the proton mass, $c$ is the speed of light and $T(p) = mc^2( \sqrt{1+(p/mc)^2} - 1 )$ is the kinetic energy of the cosmic rays. $p_\mathrm{max}$ is the maximum momentum that the cosmic rays are accelerated to which is discussed further in Section\,\ref{subsubsec:pb}. The logarithmically spaced momentum bins for the cosmic rays are given by $p_k = \mathrm{exp}\{k\times\mathrm{ln}(p_M/p_0)/(M-1) + \mathrm{ln}\,p_0\}$ for $k=0,...,M$ with $M=60$. The extent of the momentum grid that we consider ranges from $p_0=0.15\,\mathrm{GeV}/c $ to $p_{\rm M}=100\,\mathrm{GeV}/c$, respectively. We have normalised the power law in Eq.\,\ref{eq:rateb} to a momentum of $2mc$ since this demarks the part of integrand which dominates the integral (for spectra in the range $2 <\alpha < 3$ of primary interest to us). To illustrate this, following \citet{drury_1989}, Eq.\,\ref{eq:ratea} can be approximated as \begin{flalign} \int \limits_0^\infty \frac{d\dot N}{dp} T(p)dp &\approx& \left.\frac{d\dot N}{dp}\right |_{2mc} \int \limits_{p_0}^{2mc} \left(\frac{p}{2mc} \right)^{-\alpha} e^{(-p/p_\text{max})}\frac{p^{2}}{2m} dp\nonumber\\ &+& \left.\frac{d\dot N}{dp}\right |_{2mc} \int \limits_{2mc}^{p_\text{M}} \left(\frac{p}{2mc} \right)^{-\alpha} e^{(-p/p_\text{max})}pc\,dp, \label{eq:rate2} \end{flalign} which has split the integral into a non-relativistic and relativistic component given by the first and second term on the righthand side of Eq.\,\ref{eq:rate2}, respectively. Eq.\,\ref{eq:rate2} implicitly assumes that $p_0\ll2mc$. For $\alpha=2$, Eq.\,\ref{eq:rate2} can be estimated as \begin{eqnarray} L_{\rm CR}\approx \left.p^2\frac{d\dot N}{dp}\right |_{2mc}\left[1-\frac{p_\mathrm{0}}{2mc}+\mathrm{ln}\left(\frac{p_\mathrm{max}}{2mc}\right)\right] \label{eq:pinj} \end{eqnarray} Thus, considering $p_\mathrm{max}\sim 3\,\mathrm{GeV}/c$ indicates that the first and last term contribute approximately equally in Eq.\,\ref{eq:pinj}. $p^2\dfrac{d\dot N}{dp}|_{2mc}$ is chosen to normalise the integral to the required value of $L_\mathrm{CR}$. \subsubsection{Spectral break as a function of stellar rotation rate} \label{subsubsec:pb} The maximum momentum of the accelerated cosmic rays, $p_\mathrm{max}$, is another important parameter that we must estimate as a function of $\Omega$. It physically represents the maximum momentum of stellar cosmic rays that we assume the star is able to efficiently accelerate particles to. Both DSA and magnetic reconnection rely on converting magnetic energy to kinetic energy. The magnetic field strength of Sun-like stars is generally accepted to increase with increasing stellar rotation rate, or decreasing stellar age \citep{vidotto_2014,folsom_2018}. This indicates that more magnetic energy would have been available at earlier times in the Sun's life or for other stars rotating faster/younger than the present-day Sun to produce stellar cosmic rays. Therefore we evolve $p_\mathrm{max}$ as a function of stellar magnetic field strength. In our model this effectively means that the maximum injected momentum evolves as a function of stellar rotation rate. We assume that \begin{equation} p_\mathrm{max}(\Omega) = p_\mathrm{max,\odot}\left(\frac{B_*(\Omega)}{B_\mathrm{*,\odot}}\right). \label{eq:pb} \end{equation} We chose $p_\mathrm{max,\odot} = 0.2\,\mathrm{GeV}/c$, corresponding to a kinetic energy of $T_\mathrm{max}=20\,$MeV \citep[][for instance, report impulsive stellar energetic particle events with kinetic energies $\gtrsim50$\,MeV]{kouloumvakos_2015}. We also investigate the effect of assuming $p_\mathrm{max,\odot} = 0.6\,\mathrm{GeV}/c$ (corresponding to $T_\mathrm{max}=200\,$MeV). The values for $p_\mathrm{max}(\Omega)$ are given in Table\,\ref{table:sim_parameters}. The maximum value that we use is 3.3GeV$/c$ for a stellar rotation rate of $3.5\Omega_\odot$ at $t_*=600$\,Myr using $p_\mathrm{max,\odot} = 0.6\,\mathrm{GeV}/c$. In comparison, \citet{padovani_2015} estimated a maximum energy of $\sim$30\,GeV for the acceleration of protons at protostellar surface shocks for $t_*\lesssim 1\,$Myr. The maximum momentum of 3.3\,GeV$/c$ that we adopt corresponds to a surface average large-scale magnetic field of $\sim 8$\,G at 600\,Myr. If we investigated younger stellar ages when it would be reasonable to adopt an average large-scale stellar magnetic field of $\sim 80$\,G then we would also find a maximum energy of $\sim$30\,GeV. Eq.\,\ref{eq:pb} is motivated by the Hillas criterion \citep{hillas_1984} which estimates that the maximum momentum achieved at a shock can be obtained using \begin{flalign} p_\text{max}c\sim q\beta_sB_{\rm s}R_{\rm s}=\frac{1}{c}\left(\frac{v}{100{\rm \,km\,s^{-1}}}\right)\left(\frac{B}{\rm 10\,G}\right)\left(\frac{R}{10^{9}\,{\rm cm}}\right){\rm GeV}\nonumber\\ \label{eq:hillas} \end{flalign} \noindent where $\beta_s=v_s/c$ and $v_s$ is the characteristic velocity associated to the scattering agent giving rise to acceleration (eg. shock velocity or turbulence velocity), $B_{\rm s}$ is the magnetic field strength within the source, and $R_{\rm s}$ is the size of the source region. If we assume that the size of the emitting region (a certain fraction of the Sun's surface) and the characteristic velocity do not change as a function of stellar rotation rate we simply obtain $p_\text{max}\propto B_{\rm s}$ as adopted in Eq.\,\ref{eq:pb}. Indeed, high energy $\gamma-$ray observations from {\it Fermi}-LAT found that for strong solar flares the inferred proton spectrum, located close to the surface of the Sun, displays a high maximum kinetic energy break of $\gtrsim 5\,$GeV \citep{ackermann_2014,ajello_2014}. Generally, the spectral break occurs at lower kinetic energies, or momenta, for less energetic but more frequent solar flares. Since the power law break in the SEP spectrum shifts to higher energies during strong solar flares this is a good indicator that $p_\mathrm{max}$ is likely to have occurred at higher momenta in the Sun's past when solar flares were more powerful. For instance, \citet{atri_2017} uses a large SEP event as a representative spectrum for an M dwarf star which has a higher cut-off energy at approximately $\sim$GeV energies. \begin{figure} \centering \includegraphics[width=0.5\textwidth]{omega_psol} \centering \caption{Kinetic power in the solar wind, $P_\mathrm{SW}$, as a function of stellar rotation rate. The righthand side of the plot indicates the total kinetic power that we inject in stellar cosmic rays corresponding to 10\% of $P_\mathrm{SW}$. } \label{fig:omega_psol} \end{figure} \subsubsection{Total kinetic power in stellar cosmic rays} \label{subsubsec:pcr} We use the kinetic power in the stellar wind, $P_\mathrm{SW}=\dot M(\Omega)v_\infty(\Omega)^2/2$, calculated from our stellar wind model to estimate $L_\mathrm{CR}$ as a function of stellar rotation rate assuming a certain efficiency, shown in Fig.\,\ref{fig:omega_psol}. $\dot M(\Omega)$ and $v_\infty(\Omega)$ are the mass loss rate and terminal speed of the stellar wind, respectively. Here we assume that $L_\mathrm{CR}\sim 0.1P_\mathrm{SW}$ which is shown on the righthand side of Fig.\,\ref{fig:omega_psol}. Such a value is typical of the equivalent efficiency factor estimated for supernova remnants \citep[][for instance]{vink_2010}. Without further evidence to go by, we simply adopt the same value here for young stellar flares. Adopting a different efficiency of 1\% or 100\%, for instance, would change the values for the differential intensity of stellar cosmic rays presented in Section\,\ref{sec:results} by a factor of 0.1 and 10, respectively. The values that we use here are broadly in line with the value of $L_\mathrm{CR} \sim 10^{28}\mathrm{erg\,s^{-1}}$ from \citet{rodgers-lee_2017} which was motivated as the kinetic power of stellar cosmic rays produced by a T-Tauri star. \subsection{Comparison of solar, stellar and Galactic cosmic ray spectra} \label{subsubsec:sketch} \begin{figure*} \centering \includegraphics[width=0.7\linewidth]{sketch_new} \centering \caption{This sketch illustrates typical cosmic ray spectra, both solar/stellar (impulsive and gradual events) and Galactic in origin, at various orbital distances in the solar/stellar system. The solid black line represents an approximation for the LIS of Galactic cosmic rays outside of the solar system. The green line represents a typical Galactic cosmic ray spectrum observed at Earth. The blue dashed line is a typical spectrum for a gradual SEP event (averaged over the duration of the event). The spectral slope $\gamma$ at high energies is also indicated in the plot. The solid blue line is the estimate for an impulsive stellar energetic particle event spectrum that we motivate in this paper for a young solar-type star ($\sim 600$Myr old) which includes a spectral break at much higher energies than the typical present-day (gradual) SEP spectrum (blue dashed line). See Section\,\ref{subsubsec:sketch} for more details. } \label{fig:sketch} \end{figure*} We include a schematic in Fig.\,\ref{fig:sketch} which shows representative values for the differential intensity of solar and Galactic cosmic rays as a function of kinetic energy. The differential intensity of cosmic rays, $j$, is often considered (rather than the phase space density given in Eq.\,\ref{eq:f}) as a function of kinetic energy which we plot in Section\,\ref{sec:results}. These quantities are related by $j(T)=dN/dT=p^2f(p)$. Fig.\,\ref{fig:sketch} includes the estimate for our most extreme steady-state spectrum for stellar cosmic rays injected close to the stellar surface for $\Omega=4\Omega_\odot$ or $t_*=600\,$Myr (solid blue line). This is representative of an impulsive stellar energetic particle event. The spectral break occurs at $\sim$GeV energies as motivated in the previous section. The resulting spectrum at 1\,au (and other orbital distances) is presented in Section\,\ref{sec:results}. \begin{table*} \centering \caption{List of parameters for the simulations. The columns are, respectively: the age ($t_*$) of the solar-type star, its rotation rate ($\Omega$) in terms of the present-day solar value ($\Omega_\odot = 2.67\times 10^{-6}\,\mathrm{rad\,s^{-1}}$), its rotation period ($P_\mathrm{rot}$), the astrospheric radius ($R_\mathrm{h}$), the radial velocity ($v_\mathrm{1au}$) and the magnitude of the total magnetic field ($|B_\mathrm{1au}|$) at $r=1$\,au. $\dot M$ is the mass-loss rate. $L_\mathrm{CR}$ is the power we inject in stellar cosmic rays which we relate to the kinetic power in the stellar wind. The second and third last columns are the momentum and kinetic energy for the stellar cosmic rays at which the exponential break in the injected spectrum occurs. In order to reproduce our injected cosmic ray spectrum ($Q$ in Eq.\,\ref{eq:f}-\ref{eq:q}): first, the values of $L_\mathrm{CR}$ and $p_\text{max}$ given below can be used in Eq.\,\ref{eq:rateb} to determine $(\frac{d\dot N}{dp})|_{2mc}$ for a given value of $\Omega$. Then, $\frac{d\dot N}{dp}$, and therefore $Q$, can be calculated for a given value of $\Omega$. The last column gives the kinetic energy below which the stellar cosmic ray intensities dominate over the Galactic cosmic ray intensities at 1\,au.} \begin{tabular}{@{}ccccccccccccccc@{}} \hline $t_*$ &$\Omega$ &$P_\mathrm{rot}$& $R_\mathrm{h}$ & $v_\mathrm{1au}$ &$|B_\mathrm{1au}|$ & $\dot M$ & $L_\mathrm{CR}=0.1P_\mathrm{SW}$ & $p_\mathrm{max}$ & $T_\mathrm{max}$ & $T(j^\text{SCR}_\text{1\,au}=j^\text{GCR}_\text{1\,au})$\\ \hline [Gyr] & $[\Omega_\odot]$&[days] &[au] & $\mathrm{[km\,s^{-1}]}$ & [G] &[$M_\odot\,\mathrm{yr}^{-1}$] & $[\mathrm{erg\,s^{-1}}$] & $[\mathrm{GeV}/c]$ & $[\mathrm{GeV}]$ & [GeV]\\ \hline 2.9 & 1.3 & 22 & 500 & 610 &$5.4\times 10^{-5}$ & $2.8\times 10^{-13}$ & $3.30\times10^{27}$ & 0.26 & 0.04 & 1.3 \\ 1.7 & 1.6 & 17 & 696 & 660 &$7.6\times 10^{-5}$ & $5.1\times 10^{-13}$ & $6.89\times10^{27}$ & 0.38 &0.07 & 2.6 \\ 1.0 & 2.1 & 13 & 950 & 720 &$1.2\times 10^{-4}$ & $8.5\times 10^{-13}$ & $1.38\times10^{28}$ & 0.54 &0.14 & 4.1 \\ 0.6 & 3.0 & 9 & 1324 & 790 &$1.8\times 10^{-4}$ & $1.5\times 10^{-12}$ & $2.99\times10^{28}$ & 0.85 &0.33 & 8.0 \\ 0.6 & 3.5 & 8 & 1530 & 820 &$2.8\times 10^{-4}$ & $2.0\times 10^{-12}$ & $4.16\times10^{28}$ & 1.03 &0.46 & 10 \\ 0.6 & 4.0 & 7 & 1725 & 850 &$3.5\times 10^{-4}$ & $2.4\times 10^{-12}$ & $5.49\times10^{28}$ & 1.23 &0.61 & 13 \\ \hline 0.6 & 3.5 & 8 & 1530 & 820 &$2.8\times 10^{-4}$ & $2.0\times 10^{-12}$ & $4.16\times10^{28}$ & 3.30 &2.49 & 33 \\ \hline \\ \end{tabular} \label{table:sim_parameters} \end{table*} A fit to the Galactic cosmic ray LIS, constrained by the {\it Voyager\,1} observations \citep{stone_2013,cummings_2016,stone_2019} outside of the heliosphere, is denoted by the solid black line in Fig.\,\ref{fig:sketch} \citep[Eq.\,1 from][]{vos_2015}. A fit to the modulated Galactic cosmic ray spectrum measured at Earth is given by the solid green line \citep[using the modified force field approximation given in Eq.10 of][with $\phi=0.09\,$GeV]{rodgers-lee_2020b}. We also indicate the spectral slope, $\gamma=2.78$, at high energies on the plot. Note, this represents $dN/dT \propto T^{-\gamma}$ rather than $dN/dp \propto p^{-\alpha}$. The power law indices $\gamma$ and $\alpha$ are related. At relativistic energies, $\gamma = \alpha$ since $T =pc$ and at non-relativistic energies $\alpha = 2\gamma-1$. It is important to note that the measurements at Earth change a certain amount as a function of the solar cycle. Here, however we treat the LIS and the Galactic cosmic ray spectrum at Earth as constant when making comparisons with the stellar cosmic ray spectrum as a function of stellar rotation rate\footnote{ It is important to note that the Galactic cosmic ray LIS may have been different in the past. Supernova remnants are believed to be a major contributor to the Galactic component of the LIS \citep{drury_1983,drury_2012}. The star formation rate (SFR, which can be linked to the number of supernova remnants using an initial mass function) of the Milky Way in the past therefore should influence the LIS in the past. For instance, high ionisation rates (with large uncertainties) have been inferred for galaxies at high redshifts which have higher SFRs than the present-day Milky Way \citep{muller_2016, indriolo_2018}. In these studies, the inferred ionisation rate is attributed to galactic cosmic rays. Recently, using observations of the white dwarf population in the solar neighbourhood ($d<100$pc), \citet{isern_2019} reconstructed an effective SFR for the Milky Way in the past. They found evidence of a peak in star formation $\sim 2.2-2.8$\,Gyr ago, an increase by a factor of $\sim$3 in comparison to the present-day SFR. Using a sample of late-type stars, \citet{rocha-pinto_2000} also found an increase in the SFR by a factor of $\sim$2.5 approximately $2-2.5$\,Gyr ago. Since these results suggest that the SFR has been within a factor of $\sim$3 of its present-day value for the stellar ages that we focus on, we did not vary the LIS fluxes with stellar age in \citet{rodgers-lee_2020b}.}. On the other hand, the differential intensities for SEPs observed at Earth cannot be treated as constant in time. The SEP spectrum at 1\,au, shown by the blue dashed line in Fig.\,\ref{fig:sketch}, is not continuous in time for the present-day Sun. The differential intensity given by the dashed blue line represents the typical intensities of SEPs at Earth that are derived from time-averaged observations of particle fluences \citep[such as those presented in][]{mewaldt_2005}. This spectrum is representative of a gradual SEP event. This type of SEP event lasts approximately a few days. \citet{rab_2017} estimated the stellar cosmic ray spectrum for a young pre-main sequence star (shown in their Fig.\,2) representing the present-day values for a typical gradual SEP event multiplied by a factor of $10^5$ \citep[the motivation for which is given in][]{feigelson_2002}. \citet{tabataba-vakili_2016} similarly use a typical spectrum for a gradual solar energetic particle event and scale it with $1/R^2$ to 0.153\,au in order to find the values for the differential intensity of stellar cosmic rays at the location of a close-in exoplanet orbiting an M dwarf star. In both of these examples the spectral shape is held constant, whereas here it is not. The propagation of stellar cosmic rays from the star/CME through the stellar system is not the focus of either of these papers. This type of treatment for estimating the spectrum of stellar cosmic ray events at 1\,au, or other orbital distances, around younger stars (and later type stars) and the impact of the underlying assumptions are what we investigate in this paper. This can be used as a starting point towards deriving more realistic stellar cosmic ray spectra in the future that can be constrained by upcoming missions like JWST and Ariel \citep{tinetti_2018}. Transmission spectroscopy using JWST will be able to detect emission features from molecules in exoplanetary atmospheres. Stellar and Galactic cosmic rays should produce the same chemical reactions. Thus, close-in exoplanets around young and/or active stars are the best candidates to detect the chemical signatures of stellar cosmic rays as they should be exposed to high stellar cosmic ray fluxes. In comparison, the Galactic cosmic ray fluxes at these orbital distances should be negligible. \citet{helling_2019} and \citet{barth_2020} identify a number of ``fingerprint ions" whose emission, if detected in an exoplanetary atmosphere, would be indicative of ionisation by cosmic rays. These fingerprint ions are ammonium ($\mathrm{NH_4^+}$) and oxonium ($\mathrm{H_3O^+}$). \citet{barth_2020} also suggest that stellar and Galactic cosmic rays contribute (along with other forms of high energy radiation, such as X-rays) to the abundance of the following key organic molecules: hydrogen cyanide (HCN), formaldehyde ($\mathrm{CH_2O}$) and ethylene ($\mathrm{C_2H_4}$). \citet{barth_2020} indicate that $\mathrm{CH_2O}$ and $\mathrm{C_2H_4}$ may be abundant enough to possibly be detected by JWST. \subsection{Overview of the simulations} We consider 7 cosmic ray transport simulations in total for our results. Additional test case simulations are presented in Appendix\,\ref{sec:test} for physical set-ups with known analytic solutions verifying that our numerical method reproduces well these expected results. Six of the 7 simulations that we ran represent the result of varying the stellar rotation rate. The remaining simulation, for $\Omega = 3.5\Omega_\odot$, investigates the effect of increasing the value of the $p_\mathrm{max}$ which is discussed in Appendix\,\ref{subsec:pb}. The parameters for the simulations are shown in Table\,\ref{table:sim_parameters}. The values for the astrospheric radii, $R_\mathrm{h}(\Omega)$, are given in Table\,\ref{table:sim_parameters} which is the outer radial boundary. These values were derived by balancing the stellar wind ram pressure against the ram pressure of the ISM \citep[see Section 2.3.3 of][]{rodgers-lee_2020b}. The logarithmically spaced radial bins for $i=0,...,N$ are given by $r_i = \mathrm{exp}\{i\times\mathrm{ln}(r_N/r_0)/(N-1) + \mathrm{ln}\,r_0\}$ where $r_0=1\,R_\odot$ and $r_N=R_\mathrm{h}(\Omega)$ with $N=60$. \section{Test cases} \label{sec:test} We present three simulations to illustrate that the code reproduces the expected analytic results for a number of simple test cases. We isolate the effect of different physical terms in Eq.\,\ref{eq:f}, giving additional insight into the system. The test cases use the stellar wind parameters for the $\Omega = 3.5\Omega_\odot$ simulation unless explicitly stated otherwise. For all of the test simulations the same power law is injected as described in Eq.\,\ref{eq:rateb} with $p_\mathrm{max} = 1.03\,\mathrm{GeV/}c$ and $L_\mathrm{CR}=4.16\times10^{28}\,\mathrm{erg\,s^{-1}}$. The three test cases are simulations with: (a) a constant diffusion coefficient only, (b) the momentum-dependent diffusion coefficient derived from the magnetic field profile for $\Omega = 3.5\Omega_\odot$ only and (c) the diffusion coefficient used for (b) along with the spatial and momentum advection terms. These test cases are described below in more detail. The results from these tests are shown in Fig.\,\ref{fig:appendix} for $1\,$au. The first test case consisted of using a constant diffusion coefficient in momentum and space with $-v\cdot\nabla f=((\nabla \cdot v)/3) (\partial f/\partial\mathrm{ln}p)=0$ from Eq.\,\ref{eq:f} ($\kappa/\beta c = 0.07\,$au using $B=10^{-5}$G). Thus, a continuous spatial point source injection close to the origin (at $\sim1.3\,R_\odot$ in our case) with a $p^{-2}$ profile in momentum should result in a steady-state solution with the same momentum power law of $p^{-2}$ at all radii until the cosmic rays escape from the spatial outer boundary. The blue dots in Fig.\,\ref{fig:appendix} represent the cosmic ray intensities as a function of kinetic energy from the simulation at $r\sim 1\,$au. The dashed line overplot a $p^{-2}e^{-p/p_\text{max}}/\beta$ profile for comparison and show that our results match well the expected result. \begin{figure} \centering \includegraphics[width=0.5\textwidth]{fappendix_test91} \centering \caption{The differential intensity for stellar cosmic rays as a function of kinetic energy at 1\,au are shown here for a number of test cases, described in Section\,\ref{sec:test}. The blue dots are the values obtained using a constant diffusion coefficient, test case (a). The green dots represent the model with only spatial diffusion, test case (b). Finally, the magenta solid line includes all terms considered in our models, test case (c). Different power laws are shown by the dashed lines. \label{fig:appendix}} \end{figure} The second case (green dots in Fig.\,\ref{fig:appendix}) illustrates the effect of a spatially varying diffusion coefficient which also depends on momentum ($\kappa = \kappa(r,p)$, as is used in the simulations generally and using the magnetic field profile for the $\Omega = 3.5\Omega_\odot$ case). For a continuous spatial point source injection the particles now diffuse in a momentum-dependent way and the expected profile is $p^{-3}e^{-p/p_\text{max}}/\beta$. The green dashed line overplots a $p^{-3}e^{-p/p_\text{max}}/\beta$ profile for comparison and show that our results match well the expected result. Finally, we include all three terms in the transport equation which is shown by the solid magenta line in Fig.\,\ref{fig:appendix}. In comparison to the diffusion only case, the cosmic ray fluxes are decreased at 1\,au by nearly 2 orders of magnitude due to spatial and momentum advection. \section{Influence of the maximum momentum} \label{subsec:pb} Here, we investigate the sensitivity of our results on our choice of $p_\mathrm{max,\odot}$ which is used to normalise the scaling relation in Eq.\,\ref{eq:pb}. We increase $p_\mathrm{max,\odot}$ to $0.6\,\mathrm{GeV/c}$, increasing the maximum momentum to 3.3 $\mathrm{GeV}/c$ for $\Omega=3.5\Omega_\odot$. We compare the results of the simulation using this higher maximum momentum with the value adopted in the previous section. Fig.\,\ref{fig:comparisons} shows the differential intensities obtained from these simulations. The red dashed line in Fig.\,\ref{fig:comparisons} represents the results obtained using $p_\mathrm{max}=3.30\mathrm{GeV}/c$. The red dots are the same as the results shown in Fig.\,\ref{fig:junnormalised} using the lower value of $p_\mathrm{max}=1.03\mathrm{GeV}/c$. The red dash-dotted line represents the differential intensities for Galactic cosmic rays at 1\,au. The effect of changing the maximum momenta is quite significant. The higher spectral break means that stellar cosmic rays would dominate over Galactic cosmic ray fluxes up to $\sim$33\,GeV, in comparison to $\sim$10\,GeV for the lower spectral break. This increase in the intensities occurs because of the timescales for the different physical processes (shown in Fig.\,\ref{fig:timescales_omega21} for $\Omega = 4\Omega_\odot$). By increasing the spectral break to $3.3\mathrm{GeV}/c$ there are sufficient numbers of $\gtrsim$GeV energy cosmic rays that can avoid momentum losses in the innermost region of the stellar wind. \begin{figure} \includegraphics[width=0.5\textwidth]{higher_break1au_35} \centering \caption{The differential intensities for stellar (with two different spectral breaks) and Galactic cosmic rays at 1\,au are plotted for $\Omega=3.5\Omega_\odot$. The dotted lines represent the same values as in Fig.\,\ref{fig:junnormalised}. } \label{fig:comparisons} \end{figure}
\section{Applications} \label{sec:apps} In this section, we show our GPS feature can be integrated and improve many existing computer vision tasks. \subsection{Optical Flow} An obvious application for GPS is to combine it with existing optical flow models for correspondence search between frames. To show that, we integrate our feature to state-of-the-art optical flow methods PWC-Net \cite{sun2018pwc} and RAFT \cite{teed2020raft}. Both methods consist of a siamese feature extractor and a follow up network to regress the flow. We attach an additional feature extractor and pretrain it with our losses to provide GPS feature. The GPS feature is then combined with the output of the original feature extractor by element-wise mean and then fed into the remaining layers of the network. The quantitative evaluation is shown in \Autoref{tab:optical_flow_aepe}. For a fair comparison, we compare our model with their original network (pre-trained), one fine-tuned on our datasets and a version with increased capacity where we add additional feature extractors but without employing our loss functions (marked with $^*$). Both models trained on generic optical flow does not perform well on our data, which possibly imply that our datasets contain much larger pose variations compared to typical optical flow tasks and thus more challenging. Nevertheless, fine-tuning on our dataset reduces the error, and adding an additional feature extractor further improves the accuracy. In contrast, using our loss function to supervise the additional feature extractor can significantly reduce the error metrics on all the intra and inter subject test sets. This shows that while our GPS feature can be used directly via nearest neighbor search, we can significantly improve the performance if more computational budget is available to run optical flow networks. It is worth mentioning that models with our feature generalizes better to the inter-subject test set compared to other methods. Figure \ref{fig:vis_optical_flow} \todo{broken ref} shows qualitative results. \yd{Evaluate on standard benchmark.} \yd{Show number for different cases, e.g. occlusion, small/large motion.} \begin{table*}[t] \centering \begin{tabular}{|l|lll11111|} \hline \multicolumn{1}{|c|}{} & \multicolumn{6}{c|}{Intra} & \multicolumn{2}{c|}{Inter} & \cline{2-9} \multicolumn{1}{|c|}{Methods} & \multicolumn{2}{c|}{SMPL \cite{loper2015smpl}} & \multicolumn{2}{c|}{The Relightables \cite{guo2019relightables}}& \multicolumn{2}{c|}{RenderPeople \cite{renderpeople}} & \multicolumn{2}{c|}{SMPL \cite{loper2015smpl}} & \cline{2-9} \multicolumn{1}{|c|}{} & \multicolumn{1}{c|}{non} & \multicolumn{1}{c|}{all} & \multicolumn{1}{c|}{non}& \multicolumn{1}{c|}{all}& \multicolumn{1}{c|}{non} & \multicolumn{1}{c|}{all} & \multicolumn{1}{c|}{non} & \multicolumn{1}{c|}{all} & \hline PWC-Net pre-trained & \multicolumn{1}{l|}{{28.70}} & \multicolumn{1}{l|}{{39.51}} & \multicolumn{1}{c|}{{16.26}} & \multicolumn{1}{c|}{{21.44}} & \multicolumn{1}{c|}{39.33} & \multicolumn{1}{c|}{46.51} & \multicolumn{1}{c|}{45.69} & \multicolumn{1}{c|}{51.42}\\ \hline PWC-Net fine-tuned & \multicolumn{1}{c|}{4.51} & \multicolumn{1}{c|}{13.27} & \multicolumn{1}{c|}{3.57} & \multicolumn{1}{c|}{10.01} & \multicolumn{1}{c|}{9.57} & \multicolumn{1}{c|}{18.74} &\multicolumn{1}{c|}{20.06} &\multicolumn{1}{c|}{28.14} \\ \hline PWC-Net* & \multicolumn{1}{c|}{3.89} & \multicolumn{1}{c|}{12.82} & \multicolumn{1}{c|}{3.42} & \multicolumn{1}{c|}{9.39} & \multicolumn{1}{c|}{7.91} & \multicolumn{1}{c|}{16.99} & \multicolumn{1}{c|}{19.21} & \multicolumn{1}{c|}{23.77} \\ \hline PWC-Net + GPS& \multicolumn{1}{c|}{2.73} & \multicolumn{1}{c|}{10.86} & \multicolumn{1}{c|}{2.99} & \multicolumn{1}{c|}{9.01} & \multicolumn{1}{c|}{6.89} & \multicolumn{1}{c|}{14.72} & \multicolumn{1}{c|}{12.08} & \multicolumn{1}{c|}{17.92} \\ \hline \hline RAFT pre-trained & \multicolumn{1}{c|}{27.14} & \multicolumn{1}{c|}{34.48} & \multicolumn{1}{c|}{15.23} & \multicolumn{1}{c|}{19.73} & \multicolumn{1}{c|}{40.16} & \multicolumn{1}{c|}{47.63} &\multicolumn{1}{c|}{51.76} &\multicolumn{1}{c|}{57.24} \\ \hline RAFT fine-tuned & \multicolumn{1}{c|}{3.62} & \multicolumn{1}{c|}{12.30} & \multicolumn{1}{c|}{3.27} & \multicolumn{1}{c|}{11.65} & \multicolumn{1}{c|}{6.74} & \multicolumn{1}{c|}{15.90} &\multicolumn{1}{c|}{45.47} &\multicolumn{1}{c|}{53.09} \\ \hline RAFT* & \multicolumn{1}{c|}{3.24} & \multicolumn{1}{c|}{12.82} & \multicolumn{1}{c|}{2.79} & \multicolumn{1}{c|}{11.39} & \multicolumn{1}{c|}{5.62} & \multicolumn{1}{c|}{14.79} & \multicolumn{1}{c|}{57.82} & \multicolumn{1}{c|}{66.04} \\ \hline RAFT + GPS& \multicolumn{1}{c|}{2.13} & \multicolumn{1}{c|}{10.12} & \multicolumn{1}{c|}{2.27} & \multicolumn{1}{c|}{10.52} & \multicolumn{1}{c|}{3.95} & \multicolumn{1}{c|}{12.68} & \multicolumn{1}{c|}{10.76} & \multicolumn{1}{c|}{17.61} \\ \hline \hline \end{tabular} \caption{Quantitative evaluation on dense human correspondence via SOTA optical flow networks - PWC-Net \cite{sun2018pwc} and RAFT \cite{teed2020raft}. Models pre-trained for generic optical flow datasets do not perform well since our data contains large motion and challenging occlusion. On both architecture, integrating with our GPS feature achieve the best performance. See text for the $^*$ models. \yd{add a column for finetune and assign yes or no to each.}\yd{Bold the best.}} \label{tab:optical_flow_aepe} \vspace{-0.1in} \end{table*} \begin{table}[t] \begin{tabular}{|l|lll|} \hline \multicolumn{1}{|c}{Methods} & \multicolumn{3}{|c|}{Accuracy} \\ \cline{2-4} \multicolumn{1}{|c|}{} & \multicolumn{1}{c|}{5 cm} & \multicolumn{1}{c|}{10 cm}& \multicolumn{1}{c|}{20 cm} \\ \hline SMPLify~\cite{bogo2016keep} & \multicolumn{1}{l|}{20.73} & \multicolumn{1}{l|}{40.05} & 54.23 \\ \hline DP ResNet-101 FCN \cite{guler2018densepose} & \multicolumn{1}{l|}{43.05} & \multicolumn{1}{l|}{65.23} & 74.17 \\ \hline DP ResNet-101 FCN* \cite{guler2018densepose} & \multicolumn{1}{l|}{51.32} & \multicolumn{1}{l|}{75.50} & 85.76 \\ \hline SlimDP HG - 1 stack & \multicolumn{1}{l|}{49.89} & \multicolumn{1}{l|}{74.04} & 82.98\\ \hline SlimDP HG - 2 stack & \multicolumn{1}{l|}{52.23} & \multicolumn{1}{l|}{76.50} & 84.99\\ \hline SlimDP HG - 8 stack & \multicolumn{1}{l|}{56.04} & \multicolumn{1}{l|}{79.63} & 87.55\\ \hline Our ResNet-101 FCN & \multicolumn{1}{l|}{49.09} & \multicolumn{1}{l|}{73.12} & 84.51 \\ \hline Our ResNet-101 FCN* & \multicolumn{1}{l|}{53.01} & \multicolumn{1}{l|}{76.77} & 87.70 \\ \hline Our HG - 1- stack & \multicolumn{1}{l|}{50.50} & \multicolumn{1}{l|}{75.57} & 87.18 \\ \hline \end{tabular} \caption{Quantitative evaluation for dense human pose regression on DensePose COCO dataset \cite{guler2018densepose}. Following previous work \cite{guler2018densepose}, we assume ground truth bounding box is given and calculate percentage of pixels with error smaller than thresholds. We also compare models train w/ and w/o background. \yd{Waiting for numbers.}} \label{tab:geodesic_error} \end{table} \subsection{Dense Human Pose Regression} An interesting byproduct of the GPS feature is that it automatically maps features extracted from different subjects to the same embedding, and thus applications such as dense human pose regression \cite{guler2018densepose}, directly benefit from this approach. To fully show the effect of the GPS feature, we pretrain a GPS feature extractor on our dataset, attach two more MLP layers, and finetune on DensePose-COCO dataset \cite{guler2018densepose} to regress the UV coordinates. To make sure the model capacity is comparable with other methods, we use the backbone of previous methods for feature extraction, i.e. an FCN in DensePose \cite{guler2018densepose}, and Hourglass in Slim DensePose \cite{neverova2019slim} \todo{missing numbers for these, check later}. To compare strictly on the matching accuracy, we adopt the same evaluation setup as DensePose and Slim Densepose, where ground truth bounding box is given; percentages of pixels with geodesic error less than certain thresholds are taken as the metric; and evaluate on DensePose MSCOCO benchmark \cite{guler2018densepose}. Table \ref{tab:geodesic_error} shows the comparison with previous work. When considering the same network capacity, our method achieves consistently better performance than previous methods. Note that the UV coordinates are estimated via only two layers of MLP, which indicates the GPS feature is effective at aligning different subjects. Figure \todo{figure} shows a qualitative comparisons with DensePose by warping one image to the other using the correspondence built using UV space or our feature space \yd{still missing} \todo{comment this when fig appears}. Note that DensePose does not preserve details on regions that are not continuous in their UV parameterization, in particular on the face. In contrast, our method learns a smooth high dimensional feature space that produces in general reasonable dense correspondences across subjects, leading to more visually appealing warping results. \begin{table*}[] \centering \begin{tabular}{|l|lll1111111|} \hline \multicolumn{1}{|c|}{Methods} & \multicolumn{1}{c}{AP} & \multicolumn{1}{c}{AP_{50}} & \multicolumn{1}{c}{AP_{75}}& \multicolumn{1}{c}{AP_M}& \multicolumn{1}{c}{AP_L}& \multicolumn{1}{c}{AR}& \multicolumn{1}{c}{AR_{50}}& \multicolumn{1}{c}{AR_{75}}& \multicolumn{1}{c}{AP_M}& \multicolumn{1}{c|}{AP_L} \\ \hline DensePose (ResNet-101) & \multicolumn{1}{c|}{51.8} & \multicolumn{1}{c|}{83.7} & \multicolumn{1}{c|}{56.3}& \multicolumn{1}{c|}{42.2}& \multicolumn{1}{c|}{53.8}& \multicolumn{1}{c|}{61.1}& \multicolumn{1}{c|}{ 88.9}& \multicolumn{1}{c|}{66.4}& \multicolumn{1}{c|}{45.3}& \multicolumn{1}{c|}{52.1}\\ \hline Ours & \multicolumn{1}{c|}{54.9} & \multicolumn{1}{c|}{90.3} & \multicolumn{1}{c|}{61.3}& \multicolumn{1}{c|}{50.8}& \multicolumn{1}{c|}{54.9}& \multicolumn{1}{c|}{64.2}& \multicolumn{1}{c|}{94.6}& \multicolumn{1}{c|}{70.8}& \multicolumn{1}{c|}{52.8}& \multicolumn{1}{c|}{61.3} \\ \hline \end{tabular} \caption{Multi-person dense pose evaluation. We show standard metrics on DensePose benchmark. As bounding box detection is out of scope of this paper, we use the bounding box predicted from DensePose \cite{} and replace the UV regression model to ours. \yd{Numbers need to be verified.}} \label{tab:densepose} \vspace{-0.1in} \end{table*} \subsection{Occlusion Detection} Occlusion detection is important for many applications such as stereo matching where often in real scenarios it is preferable to invalidate non-valid matches rather than hallucinate wrong disparity hypotheses. As shown in previous section, the distance map of GPS feature can be used to indicate occluded pixels. Here we further improve the occlusion detection performance by adding an additional layer in the output of the PWC-Net to regress an occlusion mask. The regression part of the PWC-Net takes the cost-volume as input, which is a reasonable measurement of the feature distance. The precision recall curve of occlusion detection is shown in Fig. \todo{xxx} \yd{still missing}, and the mean averaged error and average precision are shown in Tab. \ref{tab:pred_occlusion}. Again, using our GPS feature achieves the best accuracy, compared to a pre-trained and a fined-tuned PWC-Net with increased capacity. Similarly, when we compare to other correspondence search methods such as SDC-Net \cite{schuster2019sdc} and Wei \etal \cite{wei2016dense}, our approach outperforms both the baselines. \begin{table*}[t] \centering \begin{tabular}{|l|lll11111|} \hline \multicolumn{1}{|c|}{Methods} & \multicolumn{6}{c|}{Intra} & \multicolumn{2}{c|}{Inter} & \cline{2-9} \multicolumn{1}{|c|}{} & \multicolumn{2}{c|}{SMPL} & \multicolumn{2}{c|}{Holodeck}& \multicolumn{2}{c|}{RenderPeople} & \multicolumn{2}{c|}{SMPL} & \cline{2-9} \multicolumn{1}{|c|}{} & \multicolumn{1}{c|}{MAE} & \multicolumn{1}{c|}{AP} & \multicolumn{1}{c|}{MAE}& \multicolumn{1}{c|}{AP}& \multicolumn{1}{c|}{MAE} & \multicolumn{1}{c|}{AP} & \multicolumn{1}{c|}{MAE} & \multicolumn{1}{c|}{AP} & \hline SDC-Net \cite{schuster2019sdc}& \multicolumn{1}{c|}{null} & \multicolumn{1}{c|}{56.40} & \multicolumn{1}{c|}{null} & \multicolumn{1}{c|}{48.17} & \multicolumn{1}{c|}{null} & \multicolumn{1}{c|}{58.38} & \multicolumn{1}{c|}{null} & \multicolumn{1}{c|}{28.98} \\ \hline Wei \etal \cite{wei2016dense}& \multicolumn{1}{c|}{null} & \multicolumn{1}{c|}{32.20} & \multicolumn{1}{c|}{null} & \multicolumn{1}{c|}{25.78} & \multicolumn{1}{c|}{null} & \multicolumn{1}{c|}{34.13} & \multicolumn{1}{c|}{null} & \multicolumn{1}{c|}{32.25} \\ \hline Ours& \multicolumn{1}{c|}{null} & \multicolumn{1}{c|}{71.20} & \multicolumn{1}{c|}{null} & \multicolumn{1}{c|}{56.08} & \multicolumn{1}{c|}{null} & \multicolumn{1}{c|}{67.65} & \multicolumn{1}{c|}{null} & \multicolumn{1}{c|}{69.33} \\ \hline \hline PWC-Net pre-trained & \multicolumn{1}{c|}{0.1181} & \multicolumn{1}{c|}{90.25} & \multicolumn{1}{c|}{0.1094} & \multicolumn{1}{c|}{85.16} & \multicolumn{1}{c|}{0.1790} & \multicolumn{1}{c|}{87.06} & \multicolumn{1}{c|}{0.3243} & \multicolumn{1}{c|}{72.18} \\ \hline PWC-Net* & \multicolumn{1}{c|}{0.1023} & \multicolumn{1}{c|}{92.20} & \multicolumn{1}{c|}{0.1109} & \multicolumn{1}{c|}{85.33} & \multicolumn{1}{c|}{0.1631} & \multicolumn{1}{c|}{89.32} &\multicolumn{1}{c|}{0.3720} &\multicolumn{1}{c|}{63.06}\\ \hline PWC-Net + GPS Feature& \multicolumn{1}{c|}{0.0875} & \multicolumn{1}{c|}{94.93} & \multicolumn{1}{c|}{0.1037} & \multicolumn{1}{c|}{87.67} & \multicolumn{1}{c|}{0.1380} & \multicolumn{1}{c|}{91.38} & \multicolumn{1}{c|}{0.3210} & \multicolumn{1}{c|}{80.91} \\ \hline \end{tabular} \caption{Quantitative evaluation of occlusion detection. We show the mean average error and average precision for the occlusion detection on four test sets. If using feature distance directly as a measurement, our method significantly outperform other learning based descriptors. If combined with optical flow network, using our GPS feature can further improve over original architecture with similar capacity. \yd{bold the best, add up/down next to the metric showing which direction is better.}} \label{tab:pred_occlusion} \vspace{-0.1in} \end{table*} \subsection{Nonrigid Tracking and Fusion} Existing nonrigid tracking/fusion systems~\cite{newcombe2015dynamicfusion,dou2016fusion4d,dou2017motion2fusion} have challenges when tracking fast motions. Such a system typically employs the ICP alike method, and it requires a good initialization on the non-rigid deformation parameters to extract reliable point to point correspondences, which are in turn used to refine the deformation in an iterative manner. Human body movements such as waving arms would easily break above requirement when performed too fast. Whereas high speed cameras \cite{need4speed,twinfusion} could mitigate this behavior, here we show that GPS is also an effective way to improve the results without the need of custom hardware. The correspondences from our learned human surface features on color images provides additional constraints for the nonrigid tracking system, and it helps to rescue ICP failures. To demonstrate that, we provide correspondence built across $4$ color images as additional initialization for the nonrigid deformation along with the ICP. As shown in Fig. \ref{fig:nonrigid_tracking_comparison}, the standard dynamic fusion system fails quickly under fast motion, whereas successfully track the deformation with our correspondences. \begin{figure} \center \includegraphics[ width=8cm]{./figs/nonrigid-tracking-with-corrs.png} \caption{Nonrigid Tracking Comparison. \emph{top}) tracking without learned correspondences; \emph{bottom}) tracking with learned correspondences. \yd{Add color image?} } \label{fig:nonrigid_tracking_comparison} \end{figure} \subsection{4D Scan Alignment and Compression} The correspondence can align the geometry and texture map (i.e. UV space) of 4D scans. This may potentially benefit the compression. \todo{finish this, show results or remove paragraph}. \subsection{Morphing} \todo{Describe results and refer to Fig \ref{fig:vis_inter}} \begin{figure} \center \includegraphics[width=8cm]{./figs/inter_flow_result.jpg} \caption{Morphing results on inter-subject data. We show the correspondence between different persons, and the warping of the 2nd image to the 1st image. Compared to DensePose using non-continuous UV space for correspondence, our warping results contain less artifacts due to the smooth feature space. \yd{missing densepose warping results}} \label{fig:vis_inter} \end{figure} Morphing is a powerful technique to create smooth animation between images. The vital key to successful image morphing is to create a map that aligns corresponding image elements. \cite{liao2014automating,liao2014semi}. With GPS feature, one can directly establish pixels correspondences to create a smoother video transition. \todo{finish this, show images} \todo{we promised AP for occlusions detection in the main paper} \todo{We promised more in the wild results, perhaps comparisons with DensePose?} \section{Conclusion} We presented a deep learning approach to build HumanGPS, a robust feature extractor for finding human correspondences between images. The learned embedding is enforced to follow the geodesic distances on an underlying 3D surface representing the human shape. By proposing novel loss terms, we show that the feature space is able to map human body parts to features that preserve their semantic. Hence, the method can be applied to both intra- and inter-subject correspondences. We demonstrate the effectiveness of HumanGPS via comprehensive experimental results including comparison with the SOTA methods, ablation studies, and generalization studies on real images. In future work, we will extend HumanGPS to work with more object categories and remove the dependency of a foreground segmentation step. \section{Experiments} In this section, we evaluate the GPS features using multiple datasets and settings. In particular, we compare our approach to other state-of-the-art methods for correspondence search and show its effectiveness for both intra- and inter-subjects problems. Additional evaluations and applications, such as dynamic fusion \cite{newcombe2015dynamicfusion} and image-based morphing \cite{liao2014semi,liao2014automating}, can be found in the supplementary materials. \subsection{Data Generation} \label{sec:scans} Since it would be very challenging to fit 3D geometry on real images, we resort to semi-synthetic data, where photogrammetry or volumetric capture systems are employed to capture subjects under multiple viewpoints and illumination conditions. In particular, we generate synthetic renderings using SMPL~\cite{SMPL:2015}, RenderePeople~\cite{renderpeople}, and The Relightables~\cite{guo2019relightables}. These 3D assets are then used to obtain correspondences across views and geodesic distances on the surface. As demonstrated by the previous work~\cite{saito2020pifuhd,zhu2020simpose}, training on captured models generalizes well on real images in the wild. A similar idea has been used to create a fully synthetic dataset for optical flow~\cite{dosovitskiy2015flownet}, but in this work we focus on human images with larger camera viewpoints and body pose variations. All the details regarding the data generation can be found in the supplementary material. \subsection{Dense Matching with Nearest Neighbor Search} We first evaluate the capability of the GPS features in building dense pixel-wise matches via nearest neighbor search (\Autoref{sec:gps_explain}). \vspace{2mm} \noindent\textbf{Baseline Methods.} We compare to two state-of-the-art descriptor learning methods that use different supervision for the learning. 1) SDC-Net~\cite{schuster2019sdc}: The SDC-Net extracts dense feature descriptors with stacked dilated convolutions, and is trained to distinguish correspondences and non-matching pixels by using threshold hinge triplet loss~\cite{bailer2017cnn}. 2) Wei~\etal~\cite{wei2016dense}: This method learns to extract dense features from a depth image via classification tasks on over-segmentations. For fair comparison, we over segment our human models and rendered the segmentation label to generated the training data, i.e. over-segmentation label map. The network is trained with the same classification losses but takes color images as the input. \vspace{2mm} \noindent\textbf{Data and Evaluation Metrics.} For each source of human scans introduced in~\Autoref{sec:scans}, we divide the 3D models into train and test splits, and render image pairs for training and testing respectively. Additionally, we also generate a testing set using SMPL to quantitatively evaluate inter subjects performances since the SMPL model provides cross-subject alignment, which can be used to extract inter-subject correspondence ground truth. As for evaluation metrics, we use the standard average end-point-error (AEPE) between image pairs, computed as the $\ell_2$ distance between the predicted and ground-truth correspondence pixels on the image. \begin{figure} \center \includegraphics[width=8.5cm]{./figs/inter_data.pdf} \caption{Inter-subject correspondences and warp fields. Note how our approach correctly preserves the shape of the reference Frame 1 while plausibly warping the texture from Frame 2.} \label{fig:vis_inter} \vspace{-15pt} \end{figure} \vspace{2mm} \noindent\textbf{Performance on Intra-Subject Data.} We first evaluate our method for intra-subject correspondences. All the methods are re-trained on three training sets and tested on each test split respectively. The dense correspondence accuracy of our approach and two state-of-art methods on the each test sets are shown in \Autoref{tab:aepe} (Intra-Subject). Our method consistently achieves significantly lower error on both non-occluding and all pixels in all three datasets. \Autoref{fig:vis_search_flow} (row 1-3) shows the qualitative results of the correspondences built between two images, visualized as flow where hue and saturation indicates the direction and magnitude (See \Autoref{fig:teaser} for color legend). Our method generates much smooth and accurate correspondences compared to other methods and makes less mistakes for ambiguous body parts, {\em e.g.}, hands. \paragraph{Performance on Inter-Subject Data.} We also compare our approach on inter-subject data although no explicit cross-subject correspondences are provided during the training. The results are shown in~\Autoref{tab:aepe} (Inter-Subject). SDC-Net \cite{schuster2019sdc} does not generalize to inter-subject data since the triplet loss only differentiates positive and negative pairs and does not learn any human prior. Wei~\etal~\cite{wei2016dense} shows some generalization thanks to the dense classification loss but the average end-point-error is much higher compared to our approach. Comparatively, our method generalizes well to the inter-subject with error slightly higher, but roughly comparable to the intra-subject SMPL test set. \Autoref{fig:vis_search_flow} (row 4) shows qualitative results of inter-subject correspondences. Again our method significantly outperforms other methods. In~\Autoref{fig:vis_inter} we show additional examples where we also build an image warp using the correspondences to map one person to another: notice how we preserve the shape of the body while producing a plausible texture. More results are presented in supplementary materials. \paragraph{Occluded Pixels} As mentioned in \Autoref{sec:method}, our feature space learns to preserve the surface geodesic distance, which is a measurement of the likelihood of the correspondence. If a pixel cannot find a matching that is close enough in the feature space, it is likely that the pixel is not visible ({\em i.e.}, occluded) in the other view. Inspired by this, we retrieve a visibility mask via the distance of each pixel to the nearest neighbor in the other image, {\em i.e.}, $d_{nn}= \min_{\mathbf{q}\in \mathbf{I}_2}d(\mathbf{p},\mathbf{q}), \forall \mathbf{p} \in \mathbf{I}_1$. Specifically, the visibility is defined as $1-d_{nn}$ for SDC-Net and our method using cosine distance, and $\tfrac{1-d_{nn}}{2000}$ for Wei \etal using $\ell_2$ distance. \Autoref{fig:vis_search_flow} (Right) visualizes the visibility map, {\em i.e.}, dark pixels are occluded. Our method effectively detects occluded pixel more accurately than the other methods. More details can be found in supplementary material. \begin{figure} \center \includegraphics[width=8cm]{./figs/ablation_study.pdf} \caption{Distance maps on intra- and inter- subjects, using models trained with different loss functions. We visualize the feature distance between the pixel in the left image (marked with a red dot) to all the pixels in the image on the right. The closest correspondence is marked with a blue dot. Our full loss provides the best feature space with less ambiguity, {\em e.g.}, between left and right hand. } \label{fig:activation_map} \vspace{-15pt} \end{figure} \begin{table*}[t] \centering \vspace{-3mm} \begin{tabular}{l||cc|cc|cc||cc} \hline \multirow{3}{*}{\qquad Methods} & \multicolumn{6}{c||}{Intra-Subject} & \multicolumn{2}{c}{Inter-Subject}\tabularnewline \cline{2-9} & \multicolumn{2}{c|}{\quad SMPL \cite{loper2015smpl} \quad} & \multicolumn{2}{c|}{Relightables \cite{guo2019relightables}} & \multicolumn{2}{c||}{RenderPeople \cite{renderpeople}} & \multicolumn{2}{c}{SMPL \cite{loper2015smpl}}\tabularnewline \cline{2-9} & non & all & non & all & non & all & non & all\tabularnewline \hline PWC-Net \cite{sun2018pwc} & 4.51 & 13.27 & 3.57 & 10.01 & 9.57 & 18.74 & 20.06 & 28.14\tabularnewline PWC-Net* & 3.89 & 12.82 & 3.42 & 9.39 & 7.91 & 16.99 & 19.21 & 23.77\tabularnewline PWC-Net + GPS & \textbf{2.73} & \textbf{10.86} & \textbf{2.99} & \textbf{9.01} & \textbf{6.89} & \textbf{14.72} & \textbf{12.08} & \textbf{17.92}\tabularnewline \hline RAFT \cite{tf-raft}& 3.62 & 12.30 & 3.27 & 11.65 & 6.74 & 15.90 & 45.47 & 53.09\tabularnewline RAFT* & 3.24 & 12.82 & 2.79 & 11.39 & 5.62 & 14.79 & 57.82 & 66.04\tabularnewline RAFT + GPS & \textbf{2.13} & \textbf{10.12} & \textbf{2.27} & \textbf{10.52} & \textbf{3.95} & \textbf{12.68} & \textbf{10.76} & \textbf{17.61}\tabularnewline \hline \end{tabular} \vspace{1mm} \caption{Quantitative evaluation on dense human correspondences via SoTA optical flow networks - PWC-Net \cite{sun2018pwc} and RAFT \cite{teed2020raft}. On both architecture, integrating with our GPS feature achieve the best performance. See text for the $^*$ models. } \label{tab:optical_flow_aepe} \vspace{-15pt} \end{table*} \subsection{Ablation Study} In this section, we study the effect of each loss term for learning the GPS features. We add $L_s, L_d, L_{cd}$ gradually into the training and show the performance of correspondences through nearest neighbor search in \Autoref{tab:aepe} (bottom half). For reference, we also train our feature extractor with losses from SDC-Net~\cite{schuster2019sdc} and Wei~\etal \cite{wei2016dense} for a strict comparison on the loss only (see ``Ours+triplet'' and ``Ours+classify''). Training with our loss is more effective than the baseline methods, and the error on all the test sets, both intra- and inter-subject, keeps reducing with new loss terms added in. This indicates that all the loss terms contributes the learning of GPS feature, which is consistent with our analysis (\Autoref{sec:loss}) that the loss terms improve the embeddings from different aspects. To further analyse the effect of each loss term, we visualize the feature distance from one pixel in frame 1 (marked by a red dot) to all the pixels in frame 2 (red dot is the ground-truth correspondence) in \Autoref{fig:activation_map}. The blue dots show the pixel with lowest feature distance, {\em i.e.}, the predicted matching. Training with $L_s$ does not produce clean and indicative distance maps. Adding $L_d$ improves the performance, but the feature is still ambiguous between visually similar parts, {\em e.g.}, left and right hand. In contrast, the feature trained with all the losses produces the best distance map, and multi-scale supervision further improves the correspondence accuracy as shown in~\Autoref{tab:aepe} (last row). \begin{figure} \center \includegraphics[width=\linewidth]{./figs/real_data.jpg} \caption{Results on real images. HumanGPS generalizes in the wild and provides accurate correspondences across subjects. The correspondences (column 5) successfully warp frame 2 to frame 1 for both intra- and inter-subject cases (column 6).} \label{fig:vis_real} \vspace{-15pt} \end{figure} \subsection{Generalization to Real Images} \label{sec:realimg} Our model is fully trained on semi-synthetic data acquired with high-end volumetric capture systems ({\em e.g.}, RenderPeople~\cite{renderpeople} and The Relightables~\cite{guo2019relightables}), which help to minimize the domain gap. In this section, we assess how our method performs on real data. To our knowledge, there is no real dataset with ground-truth dense correspondences for evaluation. Thus, we compute the cycle consistency across frames on videos in the wild. Specifically, given three frames from a video, we calculate correspondences among them, cascade matching $\mathbf{I}_1$$\rightarrow$$\mathbf{I}_2$ and $\mathbf{I}_2$$\rightarrow$$\mathbf{I}_3$ and measure the average end-point-error (AEPE) to the ones calculated directly with $\mathbf{I}_1$$\rightarrow$$\mathbf{I}_3$. We collected 10 videos of moving performers. The avg. cycle consistency errors of SDC-Net, Wei~\etal and ours are $17.53$, $22.19$, and $12.21$ respectively. Also, we show the qualitative results on real images from~\cite{tang2019neural}. As shown in \Autoref{fig:vis_real}, our method generalizes reasonably to the real data, producing an accurate feature space, correspondences, as well as warped images using the correspondences. For additional results and evaluation on annotated sparse keypoints, please see~\Autoref{fig:teaser} and the supplementary material. \subsection{HumanGPS with End-to-end Networks} In this section, we show that our HumanGPS features can be integrated with state-of-art end-to-end network architectures to improve various tasks. \vspace{2mm} \noindent\textbf{Integration with Optical Flow.} We integrate our features to the state-of-the-art optical flow methods PWC-Net~\cite{sun2018pwc} and RAFT~\cite{teed2020raft}. Both methods consist of a siamese feature extractor and a follow-up network to regress the flow. We attach an additional feature extractor and pre-train it with our losses to learn our GPS features. The GPS features are then combined with the output of the original feature extractor by element-wise average and then fed into the remaining layers of the network to directly regress a 2D flow vector pointing to the matching pixel in the other image. The quantitative evaluation is presented in~\Autoref{tab:optical_flow_aepe}. All the methods are trained on our training sets. To compare under the same model capacity, we also train both methods with the additional feature extractor but without our loss functions (marked with $^*$). Our GPS features benefits the correspondence learning on both SOTA architectures consistently over all test sets. We also train PWC-Net to output an additional layer to predict the occlusion mask, and again the model trained with GPS features consistently outperforms all the baselines (see supplementary materials). \vspace{2mm} \noindent\textbf{Integration with DensePose.} Our GPS features automatically maps features extracted from different subjects to the same embedding, and thus can benefit cross-subject tasks like dense human pose regression~\cite{guler2018densepose}. To show this, we pre-train a GPS feature extractor on our datasets, attach two more MLP layers, and fine-tune on DensePose-COCO dataset \cite{guler2018densepose} to regress the UV coordinates. To make sure the model capacity is comparable with other methods, we use the backbone of previous methods for feature extraction, {\em i.e.}, a ResNet-101 FCN in DensePose \cite{guler2018densepose}, and Hourglass in Slim DensePose \cite{neverova2019slim}. To focus on the matching accuracy, we adopt their same evaluation setup, where ground truth bounding box is given; percentages of pixels with geodesic error less than certain thresholds are taken as the metric; and evaluate on DensePose MSCOCO benchmark \cite{guler2018densepose}. \Autoref{tab:geodesic_error} shows the comparison with previous work. Following DensePose~\cite{guler2018densepose}, we also train our model with their network backbone on full image and only foreground (marked as *). Our method consistently achieves better performance than previous methods on various setting with different network backbones. Note that the UV coordinates are estimated via only two layers of MLP, which indicates that the GPS features are already effective at mapping different subjects to the same embedding. Please see supplementary material for qualitative results. \begin{table}[t] \begin{tabular}{llll} \hline \multicolumn{1}{c}{Methods} & \multicolumn{3}{c}{Accuracy} \\ \cline{2-4} \multicolumn{1}{c}{} & \multicolumn{1}{c}{5 cm} & \multicolumn{1}{c}{10 cm}& \multicolumn{1}{c}{20 cm} \\ \hline DP ResNet-101 FCN \cite{guler2018densepose} & \multicolumn{1}{l}{43.05} & \multicolumn{1}{l}{65.23} & 74.17 \\ DP ResNet-101 FCN* \cite{guler2018densepose} & \multicolumn{1}{l}{51.32} & \multicolumn{1}{l}{75.50} & 85.76 \\ SlimDP HG - 1 stack \cite{neverova2019slim} & \multicolumn{1}{l}{49.89} & \multicolumn{1}{l}{74.04} & 82.98\\ \hline Our ResNet-101 FCN & \multicolumn{1}{l}{49.09} & \multicolumn{1}{l}{73.12} & 84.51 \\ Our ResNet-101 FCN* & \multicolumn{1}{l}{53.01} & \multicolumn{1}{l}{76.77} & 87.70 \\ Our HG - 1 stack & \multicolumn{1}{l}{50.50} & \multicolumn{1}{l}{75.57} & 87.18 \\ \hline \end{tabular} \vspace{1mm} \caption{Quantitative evaluation for dense human pose regression on DensePose COCO dataset~\cite{guler2018densepose}. Following~\cite{guler2018densepose}, we assume ground-truth bounding box is given and calculate percentage of pixels with error smaller than thresholds. We also compare models trained on full image and only foreground (marked by $^*$).} \label{tab:geodesic_error} \vspace{-15pt} \end{table} \section{Introduction} Finding correspondences across images is one of the fundamental problems in computer vision and it has been studied for decades. With the rapid development of digital human technology, building dense correspondences between human images has been found to be particularly useful for many applications, such as non-rigid tracking and reconstruction \cite{dou2016fusion4d,dou2017motion2fusion,newcombe2015dynamicfusion,du2019montage4d}, neural rendering \cite{tewari2020state}, and appearance transfer \cite{zanfir2018human,wu2019m2e}. Traditional approaches in computer vision extract image features on local keypoints and generate correspondences between points with similar descriptors after performing a nearest neighbor search, {\em e.g.}, SIFT \cite{lowe1999object}. More recently, deep learning methods \cite{long2014convnets,yi2016lift,schuster2019sdc,gaurmanifold}, replaced hand-crafted components with full end-to-end pipelines. Despite their effectiveness on many tasks, these methods often deliver sub-optimal results when performing dense correspondences search on humans, due to the high variation in human poses and camera viewpoints and visual similarity between body parts. As a result, the existing methods either produce sparse matches, {\em e.g.}, skeleton joints \cite{openpose}, or dense but imprecise correspondences \cite{guler2018densepose}. In this paper, we propose a deep learning method to learn a \textbf{Geodesic PreServing (GPS)} feature taking RGB images as input, which can lead to accurate dense correspondences between human images through nearest neighbor search (see \Autoref{fig:teaser}). Differently from previous methods using triplet loss \cite{schuster2019sdc,hoffer2015deep}, {\em i.e.} hard binary decisions, we advocate that the feature distance between pixels should be inversely correlated to their likelihood of being correspondences, which can be intuitively measured by the geodesic distance on the 3D surface of the human scan (\Autoref{fig:core_idea}). For example, two pixels having zero geodesic distance means they project to the same point on the 3D surface and thus a match, and the probability of being correspondences becomes lower when they are apart from each other, leading to a larger geodesic distance. While the geodesic preserving property has been studied in 3D shape analysis~\cite{shamai2017geodesic,kokkinos2012intrinsic,moreno2011deformation}, e.g., shape matching, we are the first to extend it for dense matching in image space, which encourages the feature space to be strongly correlated with an underlying 3D human model, and empirically leads to accurate, smooth, and robust results. To generate supervised geodesic distances on the 3D surface, we leverage 3D assets such as RenderPeople \cite{renderpeople} and the data acquired with The Relightables \cite{guo2019relightables}. These high quality 3D models can be rigged and allow us to generate pairs of rendered images from the same subject under different camera viewpoints and body poses, together with geodesic distances between any locations on the surface. In order to enforce soft, efficient, and differentiable constraints, we propose novel single-view and cross-view dense geodesic losses, where features are pushed apart from each other with a weight proportional to their geodesic distance. We observe that the GPS features not only encode local image content, but they also have a strong semantic meaning. Indeed, even without any explicit semantic annotation or supervision, we find that our features automatically differentiate semantically different locations on the human surface and it is robust even in ambiguous regions of the human body ({\em e.g.}, left hand vs. right hand, torso vs. back). Moreover, we show that the learned features are consistent across different subjects, {\em i.e.}, the same semantic points from other persons still map to a similar feature, without any inter-subject correspondence data provided during the training. In summary, we propose to learn an embedding that significantly improves the quality of the dense correspondences between human images. The core idea is to use the geodesic distance on the 3D surface as an effective supervision and combine it with novel loss functions to learn a discriminative feature. The learned embeddings are effective for dense correspondence search, and they show remarkable intra- and inter-subjects robustness without the need of any cross-subject annotation or supervision. We show that our approach achieves state-of-the-art performance on both intra- and inter-subject correspondences and that the proposed framework can be used to boost many crucial computer vision tasks that rely on robust and accurate dense correspondences, such as optical flow, human dense pose regression \cite{guler2018densepose}, dynamic fusion \cite{newcombe2015dynamicfusion} and image-based morphing \cite{liao2014semi,liao2014automating}. \begin{figure} \center \includegraphics[width=8cm]{./figs/methods.pdf} \caption{Core idea: we learn a mapping from RGB pixels to a feature space that preserves geodesic properties of the underlying 3D surface. The 3D geometry is only used in the training phase. } \label{fig:core_idea} \vspace{-15pt} \end{figure} \section{Method} \label{sec:method} \begin{figure*} \center \includegraphics[width=18cm]{./figs/pipeline.pdf} \caption{Learning Human Geodesic PreServing Features. We train a neural network to extract features from RGB images. The learned embedding reflects the geodesic distance among pixels projected on the 3D surface of the human and can be used to build accurate dense correspondences. We train our feature extractor with a combination of consistency loss, sparse ordinal geodesic loss and dense intra/cross view geodesic loss: see text for details.} \label{fig:pipeline} \vspace{-15pt} \end{figure*} In this section, we introduce our deep learning method for dense human correspondences from RGB images (\Autoref{fig:pipeline}). The key component of our method is a feature extractor, which is trained to produce a Geodesic PreServing (GPS) feature for each pixel, where the distance between descriptors reflects the geodesic distance on surfaces of the human scans. We first explain the GPS feature in detail and then introduce our novel loss functions to exploit the geodesic signal as supervision for effective training. This enhances the discriminative power of the feature descriptors and reduces ambiguity for regions with similar textures. \subsection{Geodesic PreServing Feature} \label{sec:gps_explain} Our algorithm starts with an image $\mathbf{I} \in \mathbb{R}^{H\times W \times 3}$ of height $H$ and width $W$, where we first run an off-the-shelf segmentation algorithm \cite{deeplabv3} to detect the person. Then, our feature extractor takes as input this image and maps it into a high-dimensional feature map of the same spatial resolution $\mathbf{F} \in \mathbb{R}^{H\times W \times C}$, where $C=16$ in our experiments. The dense correspondences between two images $\mathbf{I}_1, \mathbf{I}_2$ can be built by searching for the nearest neighbor in the feature space, \ie, $\text{corr}(\mathbf{p})= \argmin_{\mathbf{q}\in \mathbf{I}_2}d(\mathbf{p},\mathbf{q}), \forall \mathbf{p} \in \mathbf{I}_1$, where $d$ is a distance function defined in the feature space, and $\text{corr}(\mathbf{p})$ is the correspondence for the pixel $\mathbf{p}$ from $\mathbf{I}_1$ to $\mathbf{I}_2$. In our approach, we constrain the feature for each pixel to be a unit vector $\|\mathbf{F}_\mathbf{I}(\mathbf{p})\|_2=1, \forall \mathbf{p} \in \mathbf{I}$ and use the cosine distance $d(\mathbf{p},\mathbf{q}) = 1 - \mathbf{F}_{\mathbf{I}_1}(\mathbf{p})\cdot \mathbf{F}_{\mathbf{I}_2}(\mathbf{q})$. Since images are 2D projections of the 3D world, ideally $\mathbf{F}$ should be aware of the underlying 3D geometry of the human surface and be able to measure the likelihood of two pixels being a correspondence. We find that the geodesic distance on a 3D surface is a good signal of supervision and thus should be preserved in the feature space, \ie, $d(\mathbf{p}, \mathbf{q})\propto g(\mathbf{p},\mathbf{q}), \forall \mathbf{p},\mathbf{q}\in (\mathbf{I}_1, \mathbf{I}_2)$, where $g(\mathbf{p},\mathbf{q})$ is the geodesic distance between the projection of two pixels $\mathbf{p},\mathbf{q}$ to 3D locations on the human surface (\Autoref{fig:core_idea}). \vspace{2mm} \noindent\textbf{Network Architecture.} Theoretically, any network architecture producing features in the same spatial resolution of the input image could be used as backbone for our feature extractor. For the sake of simplicity, we utilize a typical 7-level U-Net~\cite{unet} with skip connections. To improve the capacity without significantly increasing the model size, we add residual blocks inspired by~\cite{zhang2018road}. More details can be found in supplementary materials. \subsection{Loss Functions} \label{sec:loss} Our model uses a pair of images as a single training example. These images capture the same subjects under different camera viewpoints and body poses. Both images are fed into the network and converted into feature maps. Multiple loss terms are then combined to compute the final loss function that is minimized during the training phase. \vspace{2mm} \noindent\textbf{Consistency Loss.} The first loss term minimizes the feature distance between ground truth corresponding pixels: $L_c(\mathbf{p})=\sum d(\mathbf{p}, \text{corr}(\mathbf{p}))$. Note however, that training with only $L_c$ will lead to degenerative case where all the pixels are mapped to the same feature. \vspace{2mm} \noindent\textbf{Sparse Ordinal Geodesic Loss.} To prevent this degenerative case, previous methods use triplet loss \cite{schuster2019sdc,tripletloss} to increase the distance between non-matching pixels, \eg $d(\mathbf{p}, \text{corr}(\mathbf{p}))\ll d(\mathbf{p},\mathbf{q}), \forall \mathbf{q} \ne \text{corr}(\mathbf{p})$. Whereas the general idea makes sense and works decently in practice, this loss function penalizes all the non-matching pixels equally without capturing their relative affinity, which leads to non-smooth and imprecise correspondences. An effective measurement capturing the desired behavior is the geodesic distance on the 3D surface. This distance should be $0$ for corresponding pixels and gradually increase when two pixels are further apart. To enforce a similar behavior in the feature space, we extend the triplet loss by randomly sampling a reference point $\mathbf{p}_r$ and two target points $\mathbf{p}_{t_1}, \mathbf{p}_{t_2}$, and defining a sparse ordinal geodesic loss: \vspace{-3mm} \begin{equation} L_s = \log(1+\exp(s\cdot(d(\mathbf{p}_r,\mathbf{p}_{t_1})-d(\mathbf{p}_r,\mathbf{p}_{t_2}))), \end{equation} where $s=\operatorname{sgn}(g(\mathbf{p}_r, \mathbf{p}_{t_2})-g(\mathbf{p}_r,\mathbf{p}_{t_1}))$. This term encourages the order between two pixels with respect to a reference pixel in feature space to be same as measured by the geodesic distance on the surface, and as a result, a pair of points physically apart on the surface tends to have larger distance in feature space. \vspace{2mm} \noindent\textbf{Dense Geodesic Loss.} $L_s$ penalizes the order between a randomly selected pixels pair, which, however, does not produces an optimal GPS feature. One possible reason is due to the complexity of trying to order all the pixels, which is a harder task compared to the original binary classification method proposed for the triplet loss. In theory, we could extend $L_s$ to order all the pixels in the image, which unfortunately is non-trivial to run efficiently during the training. Instead, we relax the ordinal loss and define a dense version of the geodesic loss between one randomly picked pixel $\mathbf{p}_r$ to all the pixels $\mathbf{p}_t$ in the image: \begin{equation} L_{d} = \sum_{\mathbf{p}_t\in \mathbf{I}} \log\left(1+\exp(g(\mathbf{p}_r,\mathbf{p}_t)-d(\mathbf{p}_r,\mathbf{p}_t)\right). \\ \end{equation} This loss, again, pushes features between non-matching pixels apart, depending on the geodesic distance. It does not explicitly penalize the wrong order, but it is effective for training since all the pixels are involved in the loss function and contribute to the back-propagation. \vspace{2mm} \noindent\textbf{Cross-view Dense Geodesic Loss.} The features learned with the aforementioned loss terms produces overall accurate correspondence, but susceptible to visually similar body parts. For example in \Autoref{fig:activation_map} (top row), the feature always matches the wrong hand, since it does not capture correctly the semantic part due to the presence of large motion. To mitigate this issue, we extend $L_d$ and define it between pairs of images such that: given a pixel $\mathbf{p}_1$ on $\mathbf{I}_1$ and $\mathbf{p}_2$ on $\mathbf{I}_2$: \begin{equation} L_{cd} = \sum_{\mathbf{p}_2 \in \mathbf{I}_2} \log\left(1+\exp(g(\text{corr}(\mathbf{p}_1),\mathbf{p}_2)-d(\mathbf{p}_1,\mathbf{p}_2)\right). \\ \end{equation} At its core, the intuition behind this loss term is very similar $L_d$, except that it is cross-image and provides the network with training data with high variability due to viewpoint and pose changes. We also tried to add a cross-view sparse ordinal geodesic loss but found it not improving. \begin{figure*}[t] \begin{center} \includegraphics[width=\linewidth]{./figs/search_flow_compare.pdf} \end{center} \vspace{-0.15in} \caption{Dense correspondences (visualized as optical flow) built via nearest neighbor search and the predicted visibility masks. Our results are more accurate, smooth, and free from obvious mistakes when compared to other methods. On the right, we show the visibility probability map obtained via the distance to the nearest neighbor. Note that our feature successfully captures occluded pixels ({\em i.e.}, dark pixels) in many challenging cases. The method is effective for both intra-subjects (rows 1-3) and inter-subjects (row 4).} \label{fig:vis_search_flow} \vspace{-0.1in} \end{figure*} \vspace{2mm} \noindent\textbf{Total Loss.} The total loss function is a weighted sum of the terms detailed above $L_t = w_cL_c+w_sL_s+w_dL_d+w_{cd}L_{cd}$. The weights are set to $1.0$, $3.0$, $5.0$, $3.0$ for $w_c, w_s, w_d, w_{cd}$ respectively. The weight for each term is chosen empirically such that the magnitude of gradients from each loss is roughly comparable. To encourage robustness across different scales, we compute this loss at each intermediate level of the decoder, and down-weight the loss to $\frac{1}{8}$. As demonstrated in our ablation studies, we found this increases the overall accuracy of the correspondences. Our whole system is implemented in TensorFlow 2.0 \cite{abadi2016tensorflow}. The model is trained with batch size of 4 using ADAM optimizer. The learning rate is initialized at $1 \times 10^{-4}$ and reduces to $70\%$ for every 200K iterations. The whole training takes 1.6 millions iterations to converge. \section*{Supplementary} In this supplementary material, we provide details about our semi-synthetic dataset, our network architecture to learn the human geodesic preserving feature space, and additional experimental results. Please see the additional webpage for video demos. \section{Semi-synthetic Data} As described in the main paper Section 4.1, our method relies on high quality 3D assets for training. To ensure high diversity and variation in our training set, we created synthetic datasets merging multiple state-of-art acquisition systems. Start from a 3D human scan, we render a pair of images from two different camera viewpoint and ground truths measurements, including 2D correspondences, geodesic distance between pixels and visibility masks. Examples of generated data are shown in \Autoref{fig:dataset}. In each example, we show the input pair of images, the ground truth correspondences with visibility mask, and the geodesic distance map w.r.t. one pixel (marked in red). Row 1-3 shows intra-subject data, and Row 4 shows inter subject data. \begin{figure*} \centering \includegraphics[width=\linewidth]{./supp_fig/data.pdf} \caption{Examples of our semi-synthetic data. From left to right, we show: a pair of the images, the ground truth correspondences, visibility mask, and the geodesic distance map w.r.t. one pixel (marked in red). Rows 1-3 show intra-subject data, and Row 4 shows inter subject data. Please refer to the color legend on the top left for the correspondence direction and magnitude. } \label{fig:dataset} \end{figure*} \subsection{3D Assets and Candidate Pose} We collected 3D assets and candidate body poses from various sources to ensure good diversity and high realism. \vspace{2mm} \noindent\textbf{SMPL.} We use the SMPL body model~\cite{loper2015smpl} and $900$ aligned texture maps from SURREAL~\cite{varol2017learning}. These models are less realistic compared to other sources but provide good diversity. Following SURREAL~\cite{varol2017learning}, we randomly sample shape parameters from the distribution of CAESAR subjects~\cite{robinette2002civilian}, and collect pose parameters by fitting SMPL model using MoSh~\cite{loper2014mosh} to the motion capture data from CMU MoCap database~\cite{CMUMoCap} which contains 2.6K sequences from 23 high-level action categories. \vspace{2mm} \noindent\textbf{RenderPeople.} Additionally, we acquired $25$ rigged 3D human scans from RenderPeople~\cite{renderpeople}, whose models contains different clothing and hair styles, and the texture map are much more detailed than SURREAL. For each human scans, we animate them using pose sequence collected from Mixamo~\cite{Mixamo}, which includes 27K different poses. \vspace{2mm} \noindent\textbf{The Relightables~\cite{guo2019relightables}.} We also use $60$ high-fidelity posed human models captured using The Relightables~\cite{guo2019relightables} system, since their renderings have higher photorealism compared to the other sources. To minimize rendering artifacts, we do not animate these models and keep them in the original configuration. \subsection{Camera Setup and Pose Selection} We use the pinhole camera model with a resolution of $256\times384$ and a focal length of $500$ pixels. We randomly sample a pair of camera centers in range [1.5, 3.6] meters away from the person, and control the angle between the camera facing directions no large than $60$ degree to produce reasonable overlaps between views. Note this is already much larger camera variations compared to typical optical flow datasets~\cite{humanflow, ranjan2020learning}. For the pose, we randomly sample from the pose pool for SMPL and RenderPeople, respectively and, as mentioned above, we fixed the poses for The Relightables scans. \subsection{Ground truth} We generate three kinds of ground truths measurements: 1) 2D correspondences, 2) visibility mask, 3) geodesic distance between pixels. We first render warping fields from one camera to the UV space and from UV space to the other camera. The correspondences and visibility mask between two rendered image can be obtained by cascading two warping operations. For geodesic distance on 3D surfaces, we adopt the exact method proposed by Mitchell \etal \cite{mitchell1987discrete}. In order to represent surface in a 2D image, we render a triangle index image and a barycentric coordinates image so that each pixel corresponds to a point in the piece-wise linear surface. Given a pixel as the source, we compute geodesic distances to all of the rest pixels in parallel and store them in a distance image to support our novel dense geodesic loss. In total, we generate $280K/2.7K$, $795K/2.9K$, $42K/1.8K$ for training/testing splits from SMPL \cite{SMPL:2015}, RenderePeople \cite{renderpeople}, and The Relightables \cite{guo2019relightables} respectively. Note that inter-subject ground truth correspondences are not available using 3D assets from either RenderePeople \cite{renderpeople} or The Relightables \cite{guo2019relightables}, since it is non-trivial to align high-fidelity 3D scans from different subjects. Therefore, we generate $2.2$K cross-subject images from SMPL \cite{SMPL:2015} for inter-subject evaluation purposes only (i.e. no training). Indeed, we tried to add some inter-subject data from SMPL into the training stage, but we found that it did not significantly improve the performances on test cases \section{Network Architecture} In this section, we introduce our detailed network architecture, including the feature extractor mentioned in main paper Section 3.1 and used in Section 4.2. We also describe how to integrate it with end-to-end architectures for optical flow and DensePose \cite{guler2018densepose}. \subsection{Feature Extractor} The architecture of our feature extractor is shown in~\Autoref{fig:feature_extractor}. It is 7-level residual U-Net with skip connections. We use residual block to extract feature, and the feature channels of each level are set as $16$, $32$, $64$, $96$, $128$, $128$, $196$. In the decoder, bilinear sampling is applied to increase the spatial resolution, and we add a $1$ $\times$ $1$ convolution layer followed by a normalization layer after each residual block to produce HumanGPS feature for each level. \begin{figure*} \centering \includegraphics[width=\linewidth]{./supp_fig/res-unet.pdf} \caption{Proposed architecture. Our method relies on a U-Net, with multiple ResNet blocks and skip connections. C and S are the channel number and stride for the convolution layers.} \label{fig:feature_extractor} \vspace{0.30in} \end{figure*} \subsection{PWC-Net + GPS} As shown in \Autoref{fig:pwc-net}, we attach our HumanGPS feature extractor along with the original feature extractor of PWC-Net. For each level we fuse the features from both feature extractors to obtain the input to the cost volume module. When fusing the feature, HumanGPS feature is passed to two $1$ $\times$ $1$ convolution layers with ReLU as activation function, then the original flow feature and HumanGPS feature are fused by element-wise mean. \subsection{RAFT + GPS} \Autoref{fig:raft} shows the architecture of RAFT$+$GPS. Similar to PWC-Net$+$GPS, a HumanGPS feature extractor is added to the original RAFT framework. The feature from the original feature extractor and our HumanGPS feature extractor are fused before constructing 4D cost volume. Unlike PWC-Net which computes the cost volume in a pyramid, RAFT constructs 4D cost volume at 1/8 resolution, thus we resize the HumanGPS feature map to 1/8 resolution via a stride convolution, then pass it through two $1$ $\times$ $1$ convoluton layers. Then two feature maps are fused by element-wise mean. \subsection{DensePose + GPS} We use DensePose \cite{guler2018densepose,neverova2019slim} backbones to extract our GPS feature. To extend our method for UV coordinates regression, we first take the feature from the second last convolution layer; feed it into a normalization layer, and train the whole network with our loss. We then feed the feature before the normalization layer into two fully connected layers with $128$ channels, and a regressor to predict the part probability and UV coordinates in each of the $24$ parts respectively. \begin{figure*} \centering \includegraphics[width=\linewidth]{./supp_fig/pwc-net.pdf} \caption{Proposed end-to-end architecture for optical flow. We fuse our GPS feature with the original feature extractor from PWC-Net \cite{sun2018pwc}. As showed in the main paper, this substantially improves the performance even when compared to a PWC-Net with a larger capacity.} \label{fig:pwc-net} \vspace{0.20in} \end{figure*} \begin{figure*} \centering \includegraphics[width=\linewidth]{./supp_fig/raft.pdf} \caption{Proposed end-to-end architecture for optical flow. We fuse our GPS feature with the original feature extractor from RAFT \cite{teed2020raft}. As showed in the main paper, this substantially improves the performance even when compared to a RAFT with a larger capacity.} \label{fig:raft} \vspace{0.20in} \end{figure*} \begin{table*}[t] \centering \begin{tabular}{l||cc|cc|cc||cc} \hline \multirow{3}{*}{\qquad \qquad Methods} & \multicolumn{6}{c||}{Intra-Subject} & \multicolumn{2}{c}{Inter-Subject}\tabularnewline \cline{2-9} & \multicolumn{2}{c|}{ SMPL \cite{loper2015smpl} } & \multicolumn{2}{c|}{Relightables \cite{guo2019relightables}} & \multicolumn{2}{c||}{RenderPeople \cite{renderpeople}} & \multicolumn{2}{c}{SMPL \cite{loper2015smpl}}\tabularnewline \cline{2-9} & non & all & non & all & non & all & non & all\tabularnewline \hline Ours + triplet & 9.14 & 24.34 & 13.18 & 25.59 & 16.84 & 29.80 & 21.08 & 30.75\tabularnewline Ours + classify & 9.73 & 25.80 & 15.97 & 33.03 & 18.33 & 34.03 & 11.21 & 25.72\tabularnewline Ours + $L_c$ + $L_s$ & 8.17 & 19.31 & 14.61 & 21.45 & 14.51 & 24.21 & 12.02 & 24.51\tabularnewline Ours + $L_c$ + $L_d$ & 7.67 & 18.72 & 12.46 & 20.58 & 13.21 & 23.22 & 9.99 & 19.85\tabularnewline Ours + $L_c$ + $L_s$ + $L_d$ & 7.50 & 18.00 & 12.24 & 19.30 & 12.41 & 22.73 & 9.19 & 18.61\tabularnewline Ours + $L_c$ + $L_d$ + $L_{cd}$ & 7.53 & 18.17 & 12.12 & 19.09 & 12.38 & 22.99 & 9.27 & 19.23\tabularnewline Ours + Full & 7.32 & 17.57 & 11.50 & 19.12 & 12.29 & 22.48 & 8.57 & \textbf{17.87}\tabularnewline Ours + Full + Multi-scale & \textbf{7.12} & \textbf{17.51} & \textbf{11.24} & \textbf{18.95} & \textbf{11.91} & \textbf{22.12} & \textbf{8.49} & 17.99\tabularnewline \hline feature=8 & {9.34} & {19.77} & {14.25} & {20.62} & {14.68} & {24.46} & {11.81} & {20.43}\tabularnewline feature=16 (Ours) & {7.12} & {17.51} & {11.24} & {18.95} & {11.91} & {22.12} & {8.49} & 17.99\tabularnewline feature=32 & {6.87} & {17.45} & {10.96} & \textbf{18.77} & {11.64} & {22.05} & \textbf{8.44} & \textbf{17.73}\tabularnewline feature=64 & \textbf{6.78} & \textbf{16.93} & \textbf{10.83} & 18.82 & \textbf{11.58} & \textbf{21.99} & {8.63} & {18.13}\tabularnewline \hline \end{tabular} \vspace{1mm} \caption{Quantitative evaluation for correspondences search. We report the average end-point-error (EPE) of non-occluded (marked as non) and all pixels (marked as all) on four test sets created from different sources of 3D assets. We report the results for both intra and inter-subjects.} \label{tab:aepe} \vspace{-0.15in} \end{table*} \begin{figure*} \centering \includegraphics[width=\linewidth]{./supp_fig/intra_result.pdf} \caption{Comparison on intra-subject data. We compare to SDC-Net \cite{schuster2019sdc} and Wei \etal \cite{wei2016dense}. Our method shows consistently better performance on both correspondence (left) and occlusion detection (right). The top and bottom are sampled from the 20\% of the test cases with the smallest and largest error respectively.} \label{fig:intra_search_correspondence} \end{figure*} \begin{figure*} \centering \includegraphics[width=\linewidth]{./supp_fig/inter_results.pdf} \caption{Comparison on inter-subject data. We compare to SDC-Net \cite{schuster2019sdc} and Wei \etal \cite{wei2016dense}. Our method shows consistently better performance on both correspondence (left) and occlusion detection (right). The top and bottom are sampled from the 20\% of the test cases with the smallest and largest error respectively.} \label{fig:inter_search_correspondence} \end{figure*} \section{Additional Evaluations} In this section, we show more experimental results to evaluate our Human GPS feature for dense human correspondence. \subsection{Correspondence and Visibility Map} \Autoref{fig:intra_search_correspondence}, \Autoref{fig:inter_search_correspondence} show more examples of our predicted correspondences and visibility maps for intra and inter-subject cases respectively. In each figure, we sort all the test cases according to the error metric of our method and randomly pick four from the top and bottom 20\% respectively. This gives a demonstration of the full spectrum of the quality on the test set. Our method works consistently well on both easy (the top four) and hard (the bottom four) cases, and outperforms other methods \cite{wei2016dense,schuster2019sdc} on the visual quality of both the predicted correspondences and visibility maps. There are some regions where all the methods performs equally poorly, however these are mostly occluded regions as shown in the visibility map. Depending on the application, it might be more preferred to mark these pixels as no available matching rather than hallucinate continuous and implausible correspondences. \subsection{Warping via Correspondence} \label{sec:warping} To qualitatively evaluate the correspondences, we show in \Autoref{fig:warping} the warping results of frame 1 using the texture of the frame 2, leveraging the predicted correspondence field. Our method produces more visually appealing and semantically correct warping results compared to DensePose \cite{guler2018densepose}, where we used the predicted UV coordinates to establish correspondences. \subsection{Additional Ablation Study} \label{sec:ablation} In paper Section 4.3, we studied the effect of each loss term for learning the GPS feature by gradually adding $L_s, L_d, L_{cd}$. In~\Autoref{tab:aepe}, we provide more quantitative evaluations on using other combinations of loss terms in training the models, which consistently support that all the loss terms contributes the learning of GPS feature. It should be noted, the behavior of our losses is substantially different from that of a triplet loss. While the triplet loss penalizes all the non-matching pixels equally (i.e., further apart compared to the matched pixel), the dense geodesic loss, instead, pushes features between non-matching pixels apart proportionally to the surface geodesic distance with respect to the reference pixel. The geodesic distance provides important supervision for network to learn the affinity, i.e., likelihood of matching, between pixels, and hence yields smooth and discriminative feature space. This is also empirically demonstrated in~\Autoref{tab:aepe} between (Ours+triplet) and (Ours+$L_d$+$L_d$), which shows using consistency + dense geodesic loss achieves better results than using triplet loss. In~\Autoref{tab:aepe} bottom part, we also report the impact of feature number on the correspondence accuracy. The performance is mostly saturated at feature number=16, though slightly better performance can be achieved with more computation. \begin{figure*} \centering \includegraphics[width=18cm]{./supp_fig/warping.pdf} \caption{Cross-subject warping results. The left section shows two reference frames. The middle section shows our GPS feature, correspondences, and the warped result of frame 1 using the texture of frame 2. The right section shows the results of DensePose (DP) \cite{guler2018densepose}.} \label{fig:warping} \end{figure*} \subsection{Real-world Image Results} We also evaluate our HumanGPS feature on sparse 2D joint ground truth annotated in Human3.6M~\cite{ionescu2013human3}. Specifically, we build correspondences across video frames using extracted HumanGPS features and measure the average end-point-error (AEPE) to the ground-truth correspondence between sparse 2D joints. The AEPE of SDC-Net, Wei et al. and ours is 19.72, 29.50 and 14.33. Our method consistently outperforms the previous methods in real data. \Autoref{fig:real_image_results} shows more results of our method on real images. Although we use semi-synthetic data for training, our method generalizes well onto various real images in the wild. It worth mentioning that, often, the foreground computation using off-the-shelf segmentation algorithms~\cite{deeplabv3} may not be accurate, nevertheless, our method is robust against minor errors in practice. Given our exhaustive evaluation, we expect these results to hold true for generic datasets. \begin{figure*} \centering \includegraphics[width=18cm]{./supp_fig/real_data_supp.pdf} \caption{In-the-wild results. For each pair of images, we show the GPS feature, the established correspondences, and the warped result.} \label{fig:real_image_results} \end{figure*} \begin{table*}[t] \centering \begin{tabular}{l||c|c|c||c} \hline \multirow{2}{*}{\qquad Methods} & \multicolumn{3}{c||}{Intra-Subject} & Inter-Subject\tabularnewline \cline{2-5} \cline{3-5} \cline{4-5} \cline{5-5} & SMPL \cite{loper2015smpl} & The Relightables \cite{guo2019relightables} & RenderPeople \cite{renderpeople} & SMPL \cite{loper2015smpl}\tabularnewline \hline SDC-Net \cite{schuster2019sdc} & 56.40 & 48.17 & 58.38 & 28.98\tabularnewline Wei \etal \cite{wei2016dense} & 32.20 & 25.78 & 34.13 & 32.25\tabularnewline Ours & \textbf{71.20} & \textbf{56.08} & \textbf{67.65} & \textbf{69.33}\tabularnewline \hline PWC-Net \cite{sun2018pwc} & 90.25 & 85.16 & 87.06 & 72.18\tabularnewline PWC-Net{*} & 92.20 & 85.33 & 89.32 & 63.06\tabularnewline PWC-Net + GPS & \textbf{94.93} & \textbf{87.67} & \textbf{91.38} & \textbf{80.91}\tabularnewline \hline \end{tabular} \caption{Quantitative evaluation of occlusion detection. We show the average precision for the occlusion detection on three intra-subject test sets and one inter-subject test set. Methods on the top half directly use feature distance for occlusion detection (see the main paper Section 4.2 for details), and methods in the bottom half use optical flow architecture to regress the occlusion mask. Our feature shows good skill in occlusion detection directly via feature distance, and further improves PWC-Net on this task. Please see the main paper for explanation of the model with $^*$.} \label{tab:occlusion_detection_ap} \vspace{-0.1in} \end{table*} \begin{table*}[htb] \center \begin{tabular}{l||ccc|ccc} \hline \multirow{2}{*}{\qquad Architectures} & \multicolumn{3}{c|}{DensePose \cite{guler2018densepose,neverova2019slim}} & \multicolumn{3}{c}{HumanGPS}\tabularnewline \cline{2-7} \cline{3-7} \cline{4-7} \cline{5-7} \cline{6-7} \cline{7-7} & 5cm & 10cm & 20cm & 5cm & 10cm & 20cm\tabularnewline \hline ResNet-101 FCN \cite{guler2018densepose} & 43.05 & 65.23 & 74.17 & 49.09 & 73.12 & 84.51\tabularnewline ResNet-101 FCN{*} \cite{guler2018densepose} & 51.32 & 75.50 & 85.76 & 53.01 & 76.77 & 87.18\tabularnewline HG Stack-1 \cite{neverova2019slim} & \multicolumn{1}{c}{49.89} & 74.04 & 82.98 & 50.50 & 75.57 & 87.18\tabularnewline HG Stack-2 \cite{neverova2019slim}& 52.23 & 76.50 & 84.99 & 52.91 & 77.21 & 88.50\tabularnewline HG Stack-8 \cite{neverova2019slim}& 56.04 & 79.63 & 87.55 & 55.41 & 79.76 & 89.44\tabularnewline \hline \end{tabular} \vspace{1mm} \caption{Quantitative evaluation for dense human pose regression on DensePose COCO dataset \cite{guler2018densepose}. Following previous work \cite{guler2018densepose}, we assume ground truth bounding box is given and calculate percentage of pixels with error smaller than thresholds. All the models are trained on images with background, except the one marked with $^*$, which is trained on image with white background following DensePose \cite{guler2018densepose} for comparison. } \label{tab:densepose_single_metric} \end{table*} \subsection{Occlusion Detection} In the main paper Section 4.2, we show the qualitative results of our occlusion detection. Here we quantitatively evaluate the occlusion detection, following standard evaluation protocol adopted by object detection~\cite{girshick2014rich}. We detect occluded pixel as the set of pixels with the visibility score under a threshold. By varying a threshold on the distances, we calculate precision (i.e. percentage of predicted pixels that are truly occluded) and recall (i.e. percentage of occluded pixels that are detected). Finally we report the average precision as the area under the precision-recall curve. \Autoref{tab:occlusion_detection_ap} (Top) shows the comparison to other feature descriptor methods \cite{wei2016dense,schuster2019sdc}. SDC-Net \cite{schuster2019sdc} shows better occlusion detection performance, while Wei \etal \cite{wei2016dense} generalize better to inter-subject data. Overall, our method performs the best over all intra and inter-subject test sets. In \Autoref{tab:occlusion_detection_ap} (Bottom), we also show the performance of occlusion detection from neural network architecture designed for optical flow. Taking PWC-Net \cite{sun2018pwc} as example, integrating our HumanGPS feature achieves the best average precision compared to the original PWC-Net even with the augmented encoder. Please check main paper Section 4.5 for explanation of the $^*$ version. \subsection{Evaluation on Human Optical Flow Dataset} In the main paper Section 4.5, we showed that our method can improve the human correspondences on our test sets when combined with optical flow network. Here we further evaluate on public human optical flow dataset proposed by Ranjan~\etal~\cite{humanflow,ranjan2020learning}. Compared with our dataset, they only use SMPL models for data generation, and their camera and pose variations between each pair of images are much smaller than the ones we generated. Note that optical datasets usually contains only small motion and consider both foreground and background, which are not the focus and strength of our approach. Similar as the experiment setup of the main paper, we augment PWC-Net \cite{sun2018pwc} with an augmented feature extractor and apply loss function to supply HumanGPS feature. The average end-point error on Single-Human Optical Flow dataset (SHOF) \cite{ranjan2020learning} is shown in \Autoref{tab:optical_flow}. The PWC-Net integrated with HumanGPS achieves the best performance compared to original PWC-Net with and without augmented feature extractor. This indicates that our method not only provide correspondences for large motion, but it is also effective when the small motion assumption holds. This evaluation is done on both foreground and background, which shows it is straightforward to extend our method on full images without the dependency on segmentation methods. \begin{table}[!hb] \center \begin{tabular}{lcc} \hline \qquad Method & Finetune & AEPE\tabularnewline \hline PWC-Net & No & 0.2185\tabularnewline PWC-Net & Yes & 0.2185\tabularnewline PWC-Net{*} & Yes & 0.1411\tabularnewline PWC-Net + GPS & Yes & \textbf{0.1239}\tabularnewline \hline \end{tabular} \caption{Evaluate on Single-Human Optical Flow dataset (SHOF) \cite{ranjan2020learning}. Our method achieve the best performance over all. Please see the main paper for explanation of the model with $^*$. } \label{tab:optical_flow} \end{table} \subsection{Additional Comparisons with DensePose} In main paper Section 4.5, we showed that using GPS feature can achieve competitive dense human pose regression performance. Here we show comparisons using additional network backbones in \Autoref{tab:densepose_single_metric}. Same as the setup in the main paper Section 4.5, we adopt the same evaluation setup as DensePose \cite{guler2018densepose}, where ground truth bounding box is given; percentages of pixels with geodesic error less than certain thresholds are taken as the metric; and evaluate on DensePose MSCOCO benchmark \cite{guler2018densepose}. Directly regressing UV from our GPS feature using only 2 layers of MLP consistently achieves competitive performance compared to previous work using similar backbone \cite{guler2018densepose,neverova2019slim}, which indicates the effectiveness of our feature in telling cross-subject correspondences. We also evaluate parametric model fitting based methods \cite{bogo2016keep}. Their errors are $20.73$, $40.05$, $54.23$ for $5$cm, $10$cm, and $20$cm respectively, which is much worse than our method. \begin{figure}[htb] \center \includegraphics[width=8.5cm]{./figs/flow_error_fig.jpg} \caption{Quantitative comparison of non-rigid tracking with learned correspondences. (a) reference geometry; (b) target geometry; non-rigid alignment without (c) and with (d) our learned correspondences. Surface errors are coded as per-pixel colors.} \label{fig:nonrigid_tracking_numeric_comparison} \end{figure} \section{Applications} In this section, we show how our dense human correspondence benefits various applications. \subsection{Nonrigid Tracking and Fusion} \begin{figure}[htb] \center \includegraphics[width=8cm]{./supp_fig/nonrigid-fusion.pdf} \caption{Nonrigid Fusion Comparison. We improve the non-rigid tracking using correspondence extracted via our HumanGPS feature from the color image (top and middle). In the bottom, we show the fusion results without and with our correspondence. The standard dynamic fusion system fails quickly under fast motion, whereas successfully tracks the deformation with our correspondences. } \label{fig:nonrigid_tracking_comparison} \end{figure} Existing nonrigid tracking/fusion systems~\cite{newcombe2015dynamicfusion,dou2016fusion4d,dou2017motion2fusion} have challenges when tracking fast motions. Such a system typically employs the ICP alike method, and it requires a good initialization on the non-rigid deformation parameters to extract reliable point to point correspondences, which are in turn used to refine the deformation in an iterative manner. Human body movements such as waving arms would easily break above requirement when performed too fast. Whereas high speed cameras \cite{need4speed,twinfusion} could mitigate this behavior, here we show that HumanGPS is also an effective way to improve the results without the need of custom hardware. The correspondences from GPS feature on color images provides additional constraints for the nonrigid tracking system, and it helps to rescue ICP failures. To demonstrate that, we provide correspondence built across $6$ color images as additional initialization for the nonrigid deformation along with the ICP. The tracking algorithm takes a reference mesh and deforms it non-rigidly to align with a sequence of the target geometry. As shown in \Autoref{fig:nonrigid_tracking_numeric_comparison}, the final target geometry (b) demonstrates large pose difference from the reference (a). Traditional non-rigid tracking algorithms (c) fail in such a case, while such large deformation can be correctly estimated benefiting from our learned correspondences (d). In addition, non-rigid fusion algorithms such as Motion2Fusion~\cite{dou2017motion2fusion} improve reconstruction accuracy with learned correspondences. This algorithm takes $6$ depth images from different view point and runs non-rigid warping between canonical and live frames. The warping function is solved with additional constraints of learned correspondences from each view point and non-rigid motion is estimated with more accuracy. As shown in \Autoref{fig:nonrigid_tracking_comparison}, the standard dynamic fusion system fails quickly under fast motion, whereas successfully track the deformation with our correspondences. Please see the supplementary webpage for video demo. \subsection{Morphing} \begin{figure}[htb] \center \includegraphics[width=8cm]{./supp_fig/morphing2.pdf} \caption{Morphing results based on HumanGPS. The leftmost and rightmost columns show two input images of intra- or inter-subjects. We compute the dense correspondence maps and generate the morphed frames in-between. See the supplementary webpage for more results.} \label{fig:vis_morphing} \end{figure} Morphing is a powerful technique to create smooth animation between images. A crucial component to successful image morphing is to create a map that aligns corresponding image elements. \cite{liao2014automating,liao2014semi}. With GPS feature, one can directly establish pixels correspondences to create a smoother video transition between intra- and inter- subjects. Please refer to Fig. \ref{fig:vis_morphing} for example morphed results and the supplementary webpage for more morphing videos. } \end{document} \section{Related Work} In this section, we discuss current approaches in the literature for correspondence search tasks. \vspace{2mm} \noindent\textbf{Hand-Crafted and Learned Descriptors.} Traditional approaches that tackle the matching problem between two or more images typically rely on feature descriptors \cite{lowe2004distinctive,surf,daisy,rublee2011orb} extracted on sparse keypoints, which nowadays are still popular for Structure-From-Motion or SLAM systems when computational budget is limited. More recently, machine learning based feature extractors are proposed for image patches by pre-training on classification tasks \cite{long2014convnets}, making binary decision on pairs \cite{han2015matchnet,zagoruyko2015learning,patchCollider} or via a triplet loss \cite{yi2016lift,balntas2016pn,mishchuk2017working,tian2017l2,luo2018geodesc,hoffer2015deep}. Recently, Schuster \etal \cite{schuster2019sdc} proposed an architecture with stacked dilated convolutions to increase the receptive field. These methods are designed for generic domain and do not incorporate domain specific knowledge, \textit{e.g.}, human body in our case. When the domain is given, a unified embedding can be learned to align objects within a category to enforce certain semantic properties \cite{gaurmanifold,Thewlisnips,Thewlis19a,wang2019normalized}. The resulting intra-domain correspondences are arguably better than previous approaches. While most of methods are built purely on RGB images, 3D data are used to either as the input \cite{wei2016dense}, provide cycle consistency \cite{zhou2016learning}, or create normalized label space \cite{wang2019normalized}. In contrast, our method is designed specifically for human correspondences, takes only color images as input, and enforces informative constraints from the 3D geometry according to the geodesic distance on the human surface. \vspace{2mm} \noindent\textbf{Direct Regression of Correspondences.} Orthogonal approaches to correspondence search aim at regressing directly the matches between images. Examples of this trend are optical flow methods that can estimate dense correspondences in image pairs. Early optical flow methods are often built with hand-crafted features and formulated as energy minimization problems based on photometric consistency and spatial smoothness~\cite{horn1981determining,brox2004high,wedel2009structure}. More recently, deep learning methods have become popular in optical flow \cite{dosovitskiy2015flownet,hui2018liteflownet,hur2019iterative,teed2020raft} and stereo matching \cite{yi2018learning,chang2018pyramid,zbontar2016stereo}, where they aim at learning end-to-end correspondences directly from the data. PWC-Net~\cite{sun2018pwc} and LiteFlowNet~\cite{hui2018liteflownet} incorporate ideas from traditional methods and present a popular design using a feature pyramid, warping and a cost volume. IRR-PWC~\cite{hur2019iterative} and RAFT~\cite{teed2020raft} present iterative residual refinements, which lead to state-of-the-art performance. These methods aim at solving the generic correspondence search problem and are not designed specifically for human motion, which could be large and typically non-rigid. \vspace{2mm} \noindent\textbf{Human Correspondences.} There are plenty of works studying sparse human correspondences by predicting body keypoints describing the human pose in images \cite{papandreou,papandreou2018personlab,openpose}. For dense correspondences, many works rely on an underlying parametric model of a human, such as SMPL \cite{SMPL:2015}, and regress direct correspondences that lie on the 3D model. This 3D model shares the same topology across different people, hence allowing correspondences to be established \cite{xiang2019monocular,guler2018densepose,zhu2020simpose}. DensePose \cite{guler2018densepose} is the first method showing that such correspondences are learnable given a sufficiently large training set, although it requires heavy labor to guarantee the labeling quantity and quality. Follow up work reduces the annotation workload using equivariance \cite{neverova2019slim} or simulated data \cite{zhu2020simpose}, and extend DensePose to enable pose transfer across subjects \cite{denseposetransfer}. Differently from previous approaches, we show how to learn human specific features directly from the data, without the need of explicit annotations. Our approach learns an embedding from RGB images that follows the geodesic properties of an underlying 3D surface. Thanks to this, the proposed method can be applied to full body images, performs robustly to viewpoint and pose changes, and surprisingly generalizes well across different people without using any inter-subject correspondences during the training.
\section*{Appendix}} In the appendix, we first visualize more adversarial examples generated by various attacks. Then we provide more results for our methods integrated with DIM, TIM or SIM on the other three normally trained models, \ie Inc-v4, IncRes-v2 and Res-101. \section{Visualizations on Adversarial Examples} \label{app:sec:adv} We visualize eight randomly selected benign images and their corresponding adversarial examples crafted by various attacks in Figure \ref{app:fig:adv_images}. The adversarial examples are crafted on Inc-v3 model, using MI-FGSM, NI-FGSM, VMI-FGSM and VNI-FGSM, respectively. It can be observed that these crafted adversarial examples are human-imperceptible. \section{More Attacks with Input Transformations} \label{app:sec:attack} Here we further provide the attack results of our methods with input transformations on the other three models, \ie Inc-v4, IncRes-v2 and Res-101. The results are depicted in Figure \ref{app:fig:dim} for DIM, Figure \ref{app:fig:tim} for TIM and Figure \ref{app:fig:sim} for SIM. Our methods can improve the transferability of these input transformations remarkably, especially against the adversarially trained models. The results are consistent with the results of adversarial examples crafted on Inc-v3 model. \input{adv_illustration} \input{appendix_three_models_results} \section{Introduction} Deep Neural Networks (DNNs) are known to be vulnerable to adversarial examples \cite{szegedy2014intriguing, goodfellow2015FGSM}, which are indistinguishable from legitimate ones by adding small perturbations, but lead to incorrect model prediction. In recent years, it has garnered an increasing interest to craft adversarial examples \cite{moosavi2016deepfool, carlini2017cw, kurakin2017IFGSM, athalye2018obfuscated, li2019nattack}, because it not only can identify the model vulnerability \cite{carlini2017cw, athalye2018obfuscated}, but also can help improve the model robustness \cite{goodfellow2015FGSM, madry2018pgd, tramer2018ensemble, zhang2019theoretically}. Moreover, adversarial examples also exhibit good transferability across the models \cite{papernot2017practical, liu2017delving}, \ie the adversaries crafted for one model can still fool other models, which enables black-box attacks in the real-world applications without any knowledge of the target model. \input{adv_images} In the white-box setting that the attacker can access the architecture and parameters of the target model, existing adversarial attacks have exhibited great effectiveness \cite{kurakin2017IFGSM, carlini2017cw, athalye2018obfuscated} but with low transferability, especially for models equipped with defense mechanisms \cite{tramer2018ensemble, xie2018mitigating,liao2018defense, naseer2020NRP}. To address this issue, recent works focus on improving the transferability of adversarial examples by advanced gradient calculation (\eg Momentum, Nesterov's accelerated gradient, \etc) \cite{dong2018boosting, lin2020nesterov}, attacking multiple models \cite{liu2017delving}, or adopting various input transformations (\eg random resizing and padding, translation, scale, admix, \etc) \cite{xie2019improving, dong2019evading, lin2020nesterov, wang2021Admix}. However, there still exists a big gap between white-box attacks and transfer-based black-box attacks with regard to attack performance. In this work, we propose a novel variance tuning iterative gradient-based method to enhance the transferability of the generated adversarial examples. Different from existing gradient-based methods that perturb the input in the gradient direction of the loss function, or momentum iterative gradient-based methods that accumulate a velocity vector in the gradient direction, at each iteration our method additionally tunes the current gradient with the gradient variance in the neighborhood of the previous data point. The key idea is to reduce the variance of the gradient at each iteration so as to stabilize the update direction and escape from poor local optima during the search process. Empirical results on the standard ImageNet dataset demonstrate that, compared with state-of-the-art momentum-based adversarial attacks \cite{dong2018boosting, lin2020nesterov}, the proposed method could achieve significantly higher success rates for black-box models, meanwhile maintain similar success rates for white-box models. For instance, the proposed method improves the success rates of the momentum based attack \cite{dong2018boosting} for more than $20\%$ using adversarial examples generated on the Inc-v3 model \cite{szegedy2016inceptionv3}. The adversarial examples crafted by various attacks are illustrated in Figure~\ref{fig:adv_images}. To further demonstrate the effectiveness of our method, we combine variance tuning with several gradient-based attacks for ensemble models \cite{liu2017delving} and integrate these attacks with various input transformations \cite{xie2019improving, dong2019evading, lin2020nesterov}. Extensive experiments show that our integrated method could remarkably improve the attack transferability. In addition, we compare our attack method with the state-of-the-art attack methods \cite{dong2018boosting,xie2019improving,dong2019evading,lin2020nesterov} against nine advanced defense methods \cite{liao2018defense, xie2018mitigating, xu2018BitReduction, guo2018countering, liu2019FD, jia2019comdefend, cohen2019certified, naseer2020NRP}. Our integrated method yields an average success rate of $67.0\%$, which outperforms the baselines by a large margin of $17.5\%$ in the single model setting, and an average success rate of $90.1\%$, which outperforms the baselines by a clear margin of $6.6\%$ in the multi-model setting. \section{Related Work} Let $x$ be a benign image, $y$ the corresponding true label and $f(x;\theta)$ the classifier with parameters $\theta$ that outputs the prediction result. Let $J(x,y;\theta)$ denote the loss function of classifier $f$ (\eg the cross-entropy loss). We define the adversarial attack as finding an example $x^{adv}$ that satisfies $\|x-x^{adv}\|_p < \epsilon$ but misleads the model prediction, $f(x;\theta)\neq f(x^{adv};\theta)$. Here $\|\cdot\|_p$ denotes the $p$-norm distance and we focus on $p=\infty$ to align with previous works. \subsection{Adversarial Attacks} Numerous adversarial attack methods have been proposed in recent years, including gradient-based methods \cite{goodfellow2015FGSM, kurakin2017IFGSM, madry2018pgd, dong2018boosting,lin2020nesterov}, optimization-based methods \cite{szegedy2014intriguing, carlini2017cw}, score-based methods \cite{ilyas2018black, li2019nattack} and decision-based methods \cite{brendel2018decision, chen2020boosting}. In this work, we mainly focus on the attack transferability and provide a brief overview on two branches of transfer-based attacks in this subsection. \subsubsection{Gradient-based Attacks} The first branch focuses on improving the transferability of gradient-based attacks by advanced gradient calculation. \textbf{Fast Gradient Sign Method (FGSM).} FGSM \cite{goodfellow2015FGSM} is the first gradient-based attack that crafts an adversarial example $x^{adv}$ by maximizing the loss function $J(x^{adv}, y; \theta)$ with a one-step update: \begin{equation*} x^{adv}=x+\epsilon \cdot \text{sign}(\nabla_x J(x, y; \theta)), \end{equation*} where $\nabla_x J(x, y; \theta)$ is the gradient of loss function \wrt $x$ and $\text{sign}(\cdot)$ denotes the sign function. \textbf{Iterative Fast Gradient Sign Method (I-FGSM).} I-FGSM \cite{kurakin2017IFGSM} extends FGSM to an iterative version with a small step size $\alpha$: \begin{gather} \label{eq:ifgsm} x_{t+1}^{adv} = x_t^{adv} + \alpha \cdot \text{sign}(\nabla_{x_t^{adv}} J(x_t^{adv}, y; \theta)), \\ x_0^{adv} = x. \nonumber \end{gather} \textbf{Momentum Iterative Fast Gradient Sign Method (MI-FGSM).} MI-FGSM \cite{dong2018boosting} integrates the momentum into I-FGSM and achieves much higher transferability: \begin{gather} g_{t+1} = \mu \cdot g_t + \frac{\nabla_{x_t^{adv}}J(x_t^{adv}, y; \theta)}{\|\nabla_{x_t^{adv}}J(x_t^{adv}, y; \theta)\|_1}, \label{eq:momentum}\\ x_{t+1}^{adv} = x_t^{adv} + \alpha \cdot \text{sign}(g_{t+1}), \nonumber \end{gather} where $g_0 = 0$ and $\mu$ is the decay factor. \textbf{Nesterov Iterative Fast Gradient Sign Method (NI-FGSM).} NI-FGSM~\cite{lin2020nesterov} adopts Nesterov's accelerated gradient \cite{Nesterov1983}, and substitutes $x_t^{adv}$ in Eq. \eqref{eq:momentum} with $x_t^{adv} + \alpha \cdot \mu \cdot g_t$ to further improve the transferability of MI-FGSM. \subsubsection{Input Transformations} The second branch focuses on adopting various input transformations to enhance the attack transferability. \textbf{Diverse Input Method (DIM).} DIM \cite{xie2019improving} applies random resizing and padding to the inputs with a fixed probability, and feeds the transformed images into the classifier for the gradient calculation to improve the transferability. \textbf{Translation-Invariant Method (TIM).} TIM \cite{dong2019evading} adopts a set of images to calculate the gradient, which performs well especially for black-box models with defense mechanisms. To reduce the calculation on gradients, Dong \etal \cite{dong2019evading} shift the image within small magnitude and approximately calculate the gradients by convolving the gradient of untranslated images with a kernel matrix. \textbf{Scale-Invariant Method (SIM).} SIM \cite{lin2020nesterov} introduces the scale-invariant property and calculates the gradient over a set of images scaled by factor $1/2^i$ on the input image to enhance the transferability of the generated adversarial examples, where $i$ is a hyper-parameter. Note that different input transformations, DIM, TIM and SIM, can be naturally integrated with gradient-based attack methods. Lin \etal \cite{lin2020nesterov} have shown that the combination of these methods, denoted as Composite Transformation Method (CTM), is the current strongest transfer-based black-box attack method. In this work, the proposed variance tuning based method aims to improve the transferability of the gradient-based attacks (\eg MI-FGSM, NI-FGSM), and can be combined with various input transformations to further improve the attack transferability. \subsection{Adversarial Defenses} In contrast, to mitigate the threat of adversarial examples, various adversarial defense methods have been proposed. One promising defense method is called \textit{adversarial training} \cite{goodfellow2015FGSM, kurakin2017adversarial, madry2018pgd} that injects the adversarial examples into the training data to improve the model robustness. Tram{\`e}r \etal \cite{tramer2018ensemble} propose \textit{ensemble adversarial training} by augmenting the training data with perturbations transferred from several models, which can further improve the robustness against transfer-based black-box attacks. However, such adversarial training methods, as one of the most powerful and extensively investigated defense methods, often result in high computation cost and are difficult to be scaled to large-scale datasets and complex neural networks~\cite{kurakin2017adversarial}. Guo \etal \cite{guo2018countering} utilize a set of image transformations (\eg JPEG compression, Total Variance Minimization, \etc) on the inputs to eliminate adversarial perturbations before feeding the images to the models. Xie \etal \cite{xie2018mitigating} adopt random resizing and padding (R\&P) on the inputs to mitigate the adversarial effect. Liao \etal \cite{liao2018defense} propose to train a high-level representation denoiser (HGD) to purify the input images. Xu \etal \cite{xu2018BitReduction} propose two feature squeezing methods: bit reduction (Bit-Red) and spatial smoothing to detect adversarial examples. Feature distillation (FD) \cite{liu2019FD} is a JPEG-based defensive compression framework against adversarial examples. ComDefend \cite{jia2019comdefend} is an end-to-end image compression model to defend adversarial examples. Cohen \etal \cite{cohen2019certified} adopt randomized smoothing (RS) to train a certifiably robust ImageNet classifier. Naseer \etal \cite{naseer2020NRP} design a neural representation purifier (NRP) model that learns to purify the adversarially perturbed images based on the automatically derived supervision. \section{Methodology} For the methodology section, we first introduce our motivation, then provide a detailed description of the proposed method. In the end, we formulize the relationship between existing transfer-based attacks and the proposed method. \subsection{Motivation} Given a target classifier $f$ with parameters $\theta$ and a benign image $x \in \mathcal{X}$ where $x$ is in $d$ dimensions and $\mathcal{X}$ denotes all the legitimate images, the adversarial attack aims to find an adversarial example $x^{adv} \in \mathcal{X}$ that satisfies: \begin{equation} f(x;\theta) \neq f(x^{adv};\theta) \quad \text{ s.t. } \quad \|x - x^{adv}\| < \epsilon. \label{eq:attack_goal} \end{equation} For white-box attacks, we can regard the attack as an optimization problem that searches an example in the neighborhood of $x$ so as to maximize the loss function $J$ of the target classifier $f$: \begin{equation} x^{adv} = \argmax_{\|x'-x\|_p<\epsilon} J(x',y;\theta). \end{equation} Lin \etal~\cite{lin2020nesterov} analogize the adversarial example generation process to the standard neural model training process, where the input $x$ can be viewed as parameters to be trained and the target model can be treated as the training set. From this perspective, the transferability of adversarial examples is equivalent to the generalization of the normally trained models. Therefore, existing works mainly focus on better optimization algorithms (\eg MI-FGSM, NI-FGSM) \cite{kurakin2017IFGSM, dong2018boosting, lin2020nesterov} or data augmentation (\eg ensemble attack on multiple models or input transformations) \cite{liu2017delving, xie2019improving, dong2019evading, lin2020nesterov, wang2021Admix} to improve the attack transferability. In this work, we treat the iterative gradient-based adversarial attack as a stochastic gradient decent (SGD) optimization process, in which at each iteration, the attacker always chooses the target model for update. As presented in previous works~\cite{roux2012stochastic, shalev2013stochastic, johnson2013accelerating}, SGD introduces large variance due to the randomness, leading to slow convergence. To address this issue, various variance reduction methods have been proposed to accelerate the convergence of SGD, \eg SAG (stochastic average gradient) \cite{roux2012stochastic}, SDCA (stochastic dual coordinate ascent) \cite{shalev2013stochastic}, and SVRG (stochastic variance reduced gradient) \cite{johnson2013accelerating}, which adopt the information from the training set to reduce the variance. Moreover, Nesterov's accelerated gradient \cite{Nesterov1983} that boosts the convergence, is beneficial to improve the attack transferability~\cite{lin2020nesterov}. Based on above analysis, we attempt to enhance the adversarial transferability with the gradient variance tuning strategy. The major difference between our method and SGD with variance reduction methods (SGDVRMs)~\cite{roux2012stochastic, shalev2013stochastic, johnson2013accelerating} is three-fold. First, we aim to craft highly transferable adversaries, which is equivalent to improving the generalization of the training models, while SGDVRMs aim to accelerate the convergence. Second, we consider the gradient variance of the examples sampled in the neighborhood of input $x$, which is equivalent to the one in the parameter space for training the neural models but SGDVRMs utilize variance in the training set. Third, our variance tuning strategy is more generalized and can be used to improve the performance of MI-FGSM and NI-FGSM. \input{algorithm} \subsection{Variance Tuning Gradient-based Attacks} Typical gradient-based iterative attacks (\eg I-FGSM) greedily search an adversarial example in the direction of the sign of the gradient at each iteration, as shown in Eq.~\eqref{eq:ifgsm}, which may easily fall into poor local optima and ``overfit'' the model \cite{dong2018boosting}. MI-FGSM \cite{dong2018boosting} integrates momentum into I-FGSM for the purpose of stabilizing the update directions and escaping from poor local optima to improve the attack transferability. NI-FGSM \cite{lin2020nesterov} further adopts Netserov's accelerated gradient \cite{Nesterov1983} into I-FGSM to improve the transferability by leveraging its looking ahead property. We observe that the above methods only consider the data points along the optimization path, denoted as $x_0^{adv}=x, x_1^{adv}, ..., x_{t-1}^{adv}, x_t^{adv}, ..., x_T^{adv} = x^{adv}$. In order to avoid overfitting and further improve the transferability of the adversarial attacks, we adopt the gradient information in the neighborhood of the previous data point to tune the gradient of the current data point at each iteration. Specifically, for any input $x \in \mathcal{X}$, we define the gradient variance as follows. \begin{definition} \textbf{Gradient Variance. } Given a classifier $f$ with parameters $\theta$ and loss function $J(x,y;\theta)$, an arbitrary image $x \in \mathcal{X}$ and an upper bound $\epsilon '$ for the neighborhood, the gradient variance can be defined as: $$V_{\epsilon '}^g(x) = \mathbb{E}_{\|x' -x\|_p<\epsilon '} [\nabla_{x'} J(x', y; \theta)] \nonumber - \nabla_{x} J(x, y; \theta).$$ \end{definition} We simply use $V(x)$ to denote $V_{\epsilon '}^g(x)$ without ambiguity in the following and we set $\epsilon ' = \beta \cdot \epsilon$ where $\beta$ is a hyper-parameter and $\epsilon$ is the upper bound of the perturbation magnitude. In practice, however, due to the continuity of the input space, we cannot calculate $\mathbb{E}_{\|x' -x\|_p<\epsilon '} [\nabla_{x'} J(x', y; \theta)]$ directly. Therefore, we approximate its value by sampling $N$ examples in the neighborhood of $x$ to calculate $V(x)$: \begin{equation} V(x) = \frac{1}{N}\sum_{i=1}^N \nabla_{x^i} J(x^i, y; \theta) - \nabla_{x} J(x, y; \theta). \label{eq:variance} \end{equation} Here $x^i = x + r_i, \ r_i \sim U[-(\beta \cdot \epsilon)^d, (\beta \cdot \epsilon)^d]$, and $U[a^d, b^d]$ stands for the uniform distribution in $d$ dimensions. After obtaining the gradient variance, we can tune the gradient of $x_t^{adv}$ at the $t$-th iteration with the gradient variance $V(x_{t-1}^{adv})$ at the ($t-1$)-th iteration to stabilize the update direction. The algorithm of variance tuning MI-FGSM, denoted as VMI-FGSM, is summarized in Algorithm \ref{alg:VMI-FGSM}. Note that our method is generally applicable to any gradient-based attack method. We can easily extend VMI-FGSM to variance tuning NI-FGSM (VNI-FGSM), and integrate these methods with DIM, TIM and SIM as in \cite{lin2020nesterov}. \input{relation} \input{tables/gradient_attack_transferability} \subsection{Relationships among Various Attacks} This work focuses on the transferability of adversarial attacks derived from FGSM. Here we summarize the relationships among these attacks, as illustrated in Figure \ref{fig:relation}. If the factor $\beta$ for the upper bound of neighborhood is set to $0$, VMI-FGSM and VNI-FGSM degrade to MI-FGSM and NI-FGSM, respectively. If the decay factor $\mu=0$, both MI-FGSM and NI-FGSM degrade to I-FGSM. If the iteration number $T=1$, I-FGSM degrades to FGSM. Moreover, we can integrate the above attacks with various input transformations, \ie DIM, TIM, SIM, to obtain more powerful adversarial attacks and these derived methods follow the same discipline \section{Experiments} To validate the effectiveness of the proposed variance tuning based attack method, we conduct extensive experiments on standard ImageNet dataset \cite{russakovsky2015imagenet}. In this section, we first specify the experimental setup, then we compare our method with competitive baselines under various experimental settings and quantify the attack effectiveness on nine advanced defense models. Experimental results demonstrate that our method can significantly improve the transferability of the baselines in various settings. Finally, we provide further investigation on hyper-parameters $N$ and $\beta$ used for variance tuning. \subsection{Experimental Setup} \textbf{Dataset.} We randomly pick 1,000 clean images pertaining to the 1,000 categories from the ILSVRC 2012 validation set \cite{russakovsky2015imagenet}, which are almost correctly classified by all the testing models as in \cite{dong2018boosting, lin2020nesterov}. \textbf{Models.} We consider four normally trained networks, including Inception-v3 (Inc-v3) \cite{szegedy2016inceptionv3}, Inception-v4 (Inc-v4), Inception-Resnet-v2 (IncRes-v2) \cite{szegedy2017inception} and Resnet-v2-101 (Res-101) \cite{he2016resnet} and three adversarially trained models, namely Inc-v3$_{ens3}$, Inc-v3$_{ens4}$ and IncRes-v2$_{ens}$ \cite{tramer2018ensemble}. Besides, we include nine advanced defense models that are robust against black-box adversarial attacks on the ImageNet dataset, \ie HGD \cite{liao2018defense}, R\&P \cite{xie2018mitigating}, NIPS-r3 \footnote{\url{https://github.com/anlthms/nips-2017/tree/master/mmd}}, Bit-Red \cite{xu2018BitReduction}, JPEG \cite{guo2018countering}, FD \cite{liu2019FD}, ComDefend \cite{jia2019comdefend}, RS \cite{cohen2019certified} and NRP \cite{naseer2020NRP}. For HGD, R\&P, NIPS-r3 and RS, we adopt the official models provided in corresponding papers. For all the other defense methods, we adopt Inc-v3$_{ens3}$ as the target model. \textbf{Baselines.} We take two popular momentum based iterative adversarial attacks as our baselines, \ie MI-FGSM \cite{dong2018boosting} and NI-FGSM \cite{lin2020nesterov}, that exhibit better transferability than other white-box attacks \cite{goodfellow2015FGSM, kurakin2017IFGSM, carlini2017cw}. In addition, we integrate the proposed method with various input transformations, \ie DIM \cite{xie2019improving}, TIM \cite{dong2019evading}, SIM and CTM \cite{lin2020nesterov}, denoted as VM(N)I-DI-FGSM, VM(N)I-TI-FGSM, VM(N)I-SI-FGSM and VM(N)I-CT-FGSM respectively, to further validate the effectiveness of our method. \textbf{Hyper-parameters.} We follow the attack setting in \cite{dong2018boosting} with the maximum perturbation of $\epsilon = 16$, number of iteration $T=10$ and step size $\alpha=1.6$. For MI-FGSM and NI-FGSM, we set the decay factor $\mu = 1.0$. For DIM, the transformation probability is set to $0.5$. For TIM, we adopt the Gaussian kernel with kernel size $7 \times 7$. For SIM, the number of scale copies is $5$ (\ie $i=0,1,2,3,4$). For the proposed method, we set $N=20$ and $\beta=1.5$. \input{transformation_res} \input{tables/scale_diversity_transformation_gradient_attack_transferability} \input{tables/multiple_models_gradient_attack_transferability} \input{tables/defense_models} \subsection{Attack a Single Model} We first perform four adversarial attacks, namely MI-FGSM, NI-FGSM, the proposed variance tuning based methods VMI-FGSM and VNI-FGSM, on a single neural network. We craft adversarial examples on normally trained networks and test them on all the seven neural networks we consider. The \textit{success rates}, which are the misclassification rates of the corresponding models on adversarial examples, are shown in Table \ref{tab:singleModel}. The models we attack are on rows and the seven models we test are on columns. We can observe that VMI-FGSM and VNI-FGSM outperform the baseline attacks by a large margin on all the black-box models, while maintain high success rates on all the white-box models. For instance, if we craft adversarial examples on Inc-v3 model in which all the attacks can achieve $100\%$ success rates in the white-box setting, VMI-FGSM yields $71.7\%$ success rate on Inc-v4 and $32.8\%$ success rate on Inc-v3$_{ens3}$, while the baseline MI-FGSM only obtains the corresponding success rates of $43.6\%$ and $13.1\%$, respectively. This convincingly validates the high effectiveness of the proposed method. We also illustrate several adversarial images generated on Inc-v3 model by various attack methods in Appendix \ref{app:sec:adv}, showing that these generated adversarial perturbations are all human imperceptible but our method leads to higher transferability. \subsection{Attack with Input Transformations} Several input transformations, \eg DIM, \cite{dong2019evading}, TIM \cite{xie2019improving} and SIM \cite{lin2020nesterov}, have been incorporated into the gradient-based adversarial attacks, which are effective to improve the transferability. Here we integrate our methods into these input transformations and demonstrate the proposed variance tuning strategy could further enhance the transferability. We report the success rates of black-box attacks in Figure \ref{fig:transformation}, where the adversarial examples are generated on Inc-v3 model. The results for adversarial examples generated on other three models are reported in Appendix \ref{app:sec:attack}. The results show that the success rates against black-box models are improved by a large margin with the variance tuning strategy regardless of the attack algorithms or the white-box models to be attacked. In general, the methods equipped with our variance tuning strategy consistently outperform the baseline attacks by $10\% \sim 30\%$. Lin \etal \cite{lin2020nesterov} have shown that CTM, the combination of DIM, TIM and SIM, could help the gradient-based attacks achieve great transferability. We also combine CTM with our method to further improve the transferability. As depicted in Table \ref{tab:DI-TI-SIM}, the success rates could be further improved remarkably on various models, especially against adversarially trained models, which further demonstrates the high effectiveness and generalization of our method. \subsection{Attack an Ensemble of Models} \label{sec:ensembel} Liu \etal \cite{liu2017delving} have shown that attacking multiple models simultaneously could improve the transferability of the generated adversarial examples. In this subsection, we adopt the ensemble attack method in \cite{dong2018boosting}, which fuses the logit outputs of different models, to demonstrate that our variance tuning method could further improve the transferability of adversarial attacks in the multi-model setting. Specifically, we attack the ensemble of four normally trained models, \ie Inc-v3, Inc-v4, IncRes-v2 and Res-101 by averaging the logit outputs of the models using various attacks with or without input transformations. As shown in Table \ref{tab:ensembleModels}, our methods (VMI-FGSM, VNI-FGSM) could significantly enhance the transferability of the baselines more than $25\%$ for MI-FGSM and $30\%$ for NI-FGSM on the adversarially trained models. Even though the attacks with CTM could achieve good enough transferability, our methods (VMI-CT-FGSM, VNI-CT-FGSM) could further improve the transferability significantly. In particular, VNI-CT-FGSM achieves the success rates of $92.3\% \sim 95.5\%$ against three adversarially trained models, indicating the vulnerability of current defense mechanisms. Besides, in the white-box setting, our methods could still maintain similar success rates as the baselines. \input{parameters} \subsection{Attack Advanced Defense Models} To further validate the effectiveness of the proposed method in practice, except for the normally trained models and adversarially trained models, we also evaluate our methods on nine extra models with advanced defenses, including the top-3 defense methods in the NIPS competition (HGD (rank-1) \cite{liao2018defense}, R\&P (rank-2) \cite{xie2018mitigating} and NIPS-r3 (rank-3)), and six recently proposed defense methods, namely Bit-Red \cite{xu2018BitReduction}, JPEG \cite{guo2018countering}, FD \cite{liu2019FD}, ComDefend \cite{jia2019comdefend}, RS \cite{cohen2019certified} and NRP \cite{naseer2020NRP}. Since MI-CT-FGSM and NI-CT-FGSM exhibit the best transferability among the existing attack methods~\cite{lin2020nesterov}, we compare our methods with the two attacks with adversarial examples crafted on Inc-v3 model and the ensemble models as in Section \ref{sec:ensembel}, respectively. The results are shown in Table \ref{tab:defense}. In the single model setting, the proposed methods achieve an average success rate of $66.5\%$ for VMI-CT-FGSM and $67.0\%$ for VNI-CT-FGSM, which outperforms the baseline attacks for more than $13.5\%$ and $17.5\%$ respectively. In the multi-model setting, our methods achieve an average success rate of $88.9\%$ for VMI-CT-FGSM and $90.1\%$ for VNI-CT-FGSM, which outperforms the baseline attacks for more than $3.8\%$ and $6.6\%$ respectively. Note that in the multi-model setting, our methods achieve the success rates of more than $77\%$ against the defense model with Randomize Smoothing (RS) \cite{cohen2019certified} that provides certified defense. And our methods achieve the success rates of more than $83\%$ against the defense model with Neural Representation Purifier (NRP) which is a recently proposed powerful defense method and exhibits great robustness against DIM and DI-TIM \cite{naseer2020NRP}, raising a new security issue for the development of more robust deep learning models. \subsection{Ablation Study on Hyper-parameters} We conduct a series of ablation experiments to study the impact of two hyper-parameters of the proposed variance tuning, $N$ and $\beta$. All the adversarial examples are generated on Inc-v3 model without input transformations, which achieve success rates of $100\%$ for different values of the two parameters in the white-box setting. \textbf{On the upper bound of neighborhood.} In Figure \ref{fig:beta}, we study the influence of the neighborhood size, determined by parameter $\beta$, on the success rates in the black-box setting where $N$ is fixed to $20$. When $\beta = 0$, VMI-FGSM and VNI-FGSM degrade to MI-FGSM and NI-FGSM, respectively, and achieve the lowest transferability. When $\beta = 1/5$, although the neighborhood is very small, our variance tuning strategy could improve the transferability remarkably. As we increase $\beta$, the transferability increases and achieves the peak for normally trained models when $\beta = 3/2$ but it is still increasing against the adversarially trained models. In order to achieve the trade-off for the transferability on normally trained models and adversarially trained models, we choose $\beta = 3/2$ in our experiments. \textbf{On the number of sampled examples in the neighborhood.} We then study the influence of the number of sampled examples $N$ on the success rates in the black-box setting ($\beta$ is fixed to $3/2$). As depicted in Figure \ref{fig:number}, when $N=0$, VMI-FGSM and VNI-FGSM also degrade to MI-FGSM and NI-FGSM, respectively, and achieve the lowest transferability. When $N=20$, the transferability of adversarial examples is improved significantly and the transferability increases slowly when we continually increase $N$. Note that we need $N$ forward and backward propogations for gradient variance at each iteration as shown in Eq.~\ref{eq:variance}, thus a bigger value of $N$ means a higher computation cost. To balance the transferability and computation cost, we set $N=20$ in our experiments. In summary, $\beta$ plays a key role in improving the transferability while $N$ exhibits little impact when $N>20$. In our experiments, we set $\beta=3/2$ and $N=20$. \section{Conclusion} In this work, we propose a variance tuning method to enhance the transferability of the iterative gradient-based adversarial attacks. Specifically, for any input of a neural classifier, we define its gradient variance as the difference between the mean gradient of the neighborhood and its own gradient. Then we adopt the gradient variance of the data point at the previous iteration along the optimization path to tune the current gradient. Extensive experiments demonstrate that the variance tuning method could significantly improve the transferability of the existing competitive attacks, MI-FGSM and NI-FGSM, while maintain similar success rates in the white-box setting. The variance tuning method is generally applicable to any iterative gradient-based attacks. We employ our method to attack ensemble models and then integrate with advanced input transformation methods (\eg DIM, TIM, SIM) to further enhance the transferability. Empirical results on nine advanced defense models show that our integrated method could reach an average success rate of at least $90.1\%$, outperforming the state-of-the-art attacks for $6.6\%$ on average, indicating the insufficiency of current defense techniques. \section*{Acknowledgements} This work is supported by National Natural Science Foundation (62076105) and Microsft Research Asia Collaborative Research Fund (99245180). {\small \bibliographystyle{ieee_fullname}
\section{Introduction} \IEEEPARstart{T}{he} guessing entropy associated to a (positive descending) probability distribution $\mathbf{p}=\left(p_1,\,p_2,\,\dots,\,p_n\right)$ with ${p}_1\geq \dots \geq {p}_n>0$ is the expected value of the random variable $G\left(\mathbf{p}\right)$ given by $\mathbb{P}\left[G\left(\mathbf{p}\right)=i\right]={p}_i$ ($i=1,\ldots,n$), i.e., $\mathbb{E}\left[G\left(\mathbf{p}\right)\right]=\sum_{i=1}^n i {p}_i$. It corresponds to the minimal average number of binary questions required to guess the value of a random variable distributed according to $\mathbf{p}$~\cite{massey1994guessing}. J. Massey has provided a well-known relation between guessing entropy and the Shannon entropy $H\left(\mathbf{p}\right)=-\sum_{i=1}^n {p}_i\log {p}_i$ which reads~\cite{massey1994guessing} $\mathbb{E}\left[G\left(\mathbf{p}\right)\right]\geq 2^{H\left(\mathbf{p}\right)-2}+1$ when $H\left(\mathbf{p}\right)\geq 2$ bits. Massey's inequality has been recently improved in various ways, yet all known refinements share the same shape. For instance, in an ISIT paper, Popescu and Choudary~{\cite{popescu2019refinement}} proved \begin{align*} \mathbb{E}\left[G\left(\mathbf{p}\right)\right] \geq & 2^{H\left(\mathbf{p}\right)+2{p}_n-2}+1-{p}_n\\ \geq & 2^{H\left(\mathbf{p}\right)+{p}_n-2}+1-\frac{1}{2}{p}_n\\ \geq & 2^{H\left(\mathbf{p}\right)-2}+1, \end{align*} subject to the same condition $H\left(\mathbf{p}\right)\geq 2$ bits as in the Massey inequality. Meanwhile, Rioul's inequality~\cite{note}, published in a CHES paper~{\cite{de2019best}} states that for all values of $H\left(\mathbf{p}\right)\geq 0$, \begin{equation} \mathbb{E}\left[G\left(\mathbf{p}\right)\right] > \frac1e 2^{H\left(\mathbf{p}\right)},\label{eq:rioul} \end{equation} which refines Massey's inequality when $H\left(\mathbf{p}\right)\geq \log\frac{e}{1-e/4}$. Finally, in an Entropy paper, Tanasescu and Popescu~\cite{tuanuasescu2020exploiting} found that under the same condition as in Massey's inequality, \begin{align*} \mathbb{E}\left[G\left(\mathbf{p}\right)\right]\geq&\sup_{\alpha\in\left[0,1/2\right]} 2^{H\left(\mathbf{p}\right)+\frac{h\left(\alpha\right)}{1-\alpha}{p}_n-2}+1 -\frac{\alpha}{1-\alpha}{p}_n\label{eq:gap} \\ \geq &2^{H\left(\mathbf{p}\right)+2{p}_n-2}+1 -{p}_n> 2^{H\left(\mathbf{p}\right)-2}+1\nonumber. \end{align*} The authors of~\cite{tuanuasescu2020exploiting} hinted that a similar refinement can be found for inequality~\eqref{eq:rioul}. In this paper, we optimize exponential relations between the guessing and Shannon entropies, i.e., lower bounds of the form $\mathbb{E}\left[G\left(\mathbf{p}\right)\right]\geq a\cdot b^{H\left(\mathbf{p}\right)} + c$ valid when the Shannon entropy lies above a given threshold. We arrive at an improved Rioul's inequality~\cite{rioul2021variations} by an additive constant of $1/2$, which is asymptotically optimal among other global lower bounds depending only on the Shannon entropy as $H\left(\mathbf{p}\right)\rightarrow \infty$. Then, using the techniques of~\cite{popescu2019refinement,tuanuasescu2020exploiting} we further refine this inequality for finite support distributions allowing us to increase the multiplicative constant depending on the smallest probability $p_n$. Finally, we apply our results to side-channel attack evaluation, where guessing entropy is a key metric~\cite{mazumdar2013constrained,choudary2017efficient,carre2020persistent}, comparing our results to the best on the market and showing that under certain conditions the Shannon entropy is indeed a precious quantifier of guessing entropy. \section{The Asymptotically Optimal Massey-Like Inequality} In this section we consider bounds of the form $\mathbb{E}\left[G\left(\mathbf{p}\right)\right]\geq a\cdot b^{H\left(\mathbf{p}\right)} + c$ with $a > 0$ and seek to determine the optimal coefficients $a,\,b,\,c$ prioritizing the asymptotic shape as $H\left(\mathbf{p}\right)\rightarrow \infty$ holding whenever $H\left(\mathbf{p}\right)$ is larger then a given threshold. \begin{theorem} The optimal Massey-like inequality $\mathbb{E}\left[G\left(\mathbf{p}\right)\right]\geq a\cdot b^{H\left(\mathbf{p}\right)}+c$ as $H\left(\mathbf{p}\right)\rightarrow \infty$ is Rioul's improved inequality~\cite{rioul2021variations} \begin{equation} \mathbb{E}\left[G\left(\mathbf{p}\right)\right]\geq \frac{1}{e}2^{H\left(\mathbf{p}\right)}+\frac{1}{2},\label{ineq:rioulimproved} \end{equation} which holds for all values of $H\left(\mathbf{p}\right)\geq 0$. \end{theorem} \begin{proof} Following Massey's approach~\cite{massey1994guessing}, finding the best lower bound on guessing entropy is equivalent with the statement that among all probability distributions with guessing entropy $\mu>1$, the maximal Shannon entropy is attained by the geometric distribution with mean $\mu$, that is, \begin{equation*} H\left(\mathbf{p}\right)\leq \log\left(\mu-1\right)-\mu\log\left(1-1/\mu\right) \end{equation*} where $\log()$ denotes logarithm to base 2. The inequality is actually strict when $\mathbf{p}$ has finite length, but the upper bound can be approached as closely as desired. We seek bounds of the form $\mathbb{E}\left[G\left(\mathbf{p}\right)\right]\geq a\cdot b^{H\left(\mathbf{p}\right)}+c$, i.e. $H\left(\mathbf{p}\right)\leq \log_b\frac{\mu-c}{a}$. In order for this to be valid for all $\mu$, we should necessarily have \begin{equation*} \log_b\frac{\mu-c}{a}\geq\log\left(\mu-1\right)-\mu\log\left(1-1/\mu\right). \end{equation*} In particular, as $\mu\rightarrow \infty$, the expression on the left has asymptotic \begin{equation*} \log_b\frac{\mu-c}{a}=\log_b \mu-\log_b{a}-\frac{c\log_b e}{\mu}+o\left(1/\mu\right), \end{equation*} while the expression on the right has asymptotic \begin{equation*} \log\left(\mu-1\right)-\mu\log\left(1-1/\mu\right)=\log\mu+\log e-\frac{\log e}{2\mu}+o\left(1/\mu\right). \end{equation*} As a consequence we necessarily have $\log_b\mu\geq \log\mu$, i.e. $\log b\leq 1$ or $b\leq 2$, so that the optimal (maximum) value of $b$ is $b=2$. Next, we should have $-\log a\geq \log e$, i.e. $a\leq 1/e$, so that the optimal (maximum) value of $a$ is $1/e$. Finally, we should have $-c\log e\geq -\left(\log e\right)/2$, i.e. $c\leq 1/2$, so that the optimal (maximum) value of $c$ is $c=1/2$. The asymptotically optimal bound then writes \begin{equation} \log\left(\mu-1/2\right)+\log e\geq\log\left(\mu-1\right)-\mu\log\left(1-1/\mu\right) \label{asymptopt} \end{equation} which readily gives~\eqref{ineq:rioulimproved} when $\mu$ or $H(\mathbf{p})$ tend to infinity. A simple proof of~\eqref{ineq:rioulimproved} for all values of $H(\mathbf{p})>0$ can be found in~\cite{rioul2021variations}, but one can also prove directly that~\eqref{asymptopt} holds for all values of $\mu>1$ as follows. The first and second-order derivatives of the difference $f(\mu)=\ln\left(\mu-1/2\right)+1-\ln\left(\mu-1\right)+\mu\ln\left(1-1/\mu\right)$ between the two sides of~\eqref{asymptopt} (expressed in natural units) are \begin{align*} f'(\mu) &=\frac{1}{\mu-1/2}+\ln\bigl(1-\frac1\mu\bigr)\\ f''(\mu)&=-\frac1{(\mu-1/2)^2}+\frac1{\mu(\mu-1)} = \frac1{4\mu(\mu-1)(\mu-1/2)^2}. \end{align*} It follows that $f''>0$, so that $f'$ is increasing while also vanishing as $\mu\to+\infty$, hence $f'<0$ for all $\mu>1$. As a consequence, $f$ is decreasing for all $\mu>1$. Therefore, since~\eqref{asymptopt} holds when $\mu\to+\infty$, it also holds for all $\mu>1$. \end{proof} We conclude this section by remarking that the obtained optimal inequality~\eqref{ineq:rioulimproved} only improves~\eqref{eq:rioul} by an additive constant $1/2$. Rioul's strengthened inequality~\cite{rioul2021variations} now writes \begin{equation} \mathbb{E}\left[G\left(\mathbf{p}\right)\right]\geq \frac{1}{e}2^{H\left(\mathbf{p}\right)}+\frac{1}{2}.\tag{\ref{ineq:rioulimproved}} \end{equation} It is further generalized to scalable R\'{e}nyi entropies in~\cite{rioul2021variations}. \section{Refinement for Finite Support Distributions} In this section we find a new relation between the Shannon and guessing entropy, dependent on the minimal probability of a given distribution, further refining Rioul's improved inequality~\eqref{ineq:rioulimproved}. We begin with a direct improvement following the technique of~\cite{popescu2019refinement,tuanuasescu2020exploiting}. \begin{lemma} {For any positive descending probability distribution $\mathbf{p}\in\mathbb{R}^n$ such that $H\left(\mathbf{p}\right)\geq 1$ bit, we have}\label{rem:Rioul} \begin{align*} \mathbb{E}\left[G\left(\mathbf{p}\right)\right] \geq & \sup_{\alpha\in\left[0,1/2\right]} \frac{1}{e}2^{H\left(\mathbf{p}\right)+{p}_nh\left(\alpha\right)}-\alpha{p}_{n}+\frac{1}{2}\\ \geq & \frac{1}{e}2^{H\left(\mathbf{p}\right)+{p}_n}-\frac{1}{2}{p}_{n}+\frac{1}{2}\geq \frac{1}{e}2^{H\left(\mathbf{p}\right)}+\frac{1}{2}. \end{align*} \end{lemma} \begin{proof} Consider a positive decreasing distribution $\mathbf{p}=\left(p_1,\,p_2,\,\dots,\,p_n\right)$ with $H\left(\mathbf{p}\right)\geq 2$. Following the approach in~\cite{popescu2019refinement} we construct the new probability distribution $\mathbf{q}=\left(p_1,\,p_2,\,\dots,\,p_{n-1},\,\left(1-\alpha\right){p}_n,\,\alpha{p}_n\right)$, which is decreasing and strictly positive if and only if $\alpha\in\left(0,\,1/2\right]$. From the grouping property of entropy, $H\left(\mathbf{q}\right)=H\left(\mathbf{p}\right)+{p}_n h\left(\alpha\right)$, and moreover $\mathbb{E}\left[G\left(\mathbf{q}\right)\right]=\mathbb{E}\left[G\left(\mathbf{p}\right)\right]+\alpha{p}_{n}$. Then \begin{align} \mathbb{E}\left[G\left(\mathbf{p}\right)\right] =& \mathbb{E}\left[G\left(\mathbf{q}\right)\right] - \alpha p_n \geq \frac{1}{e}2^{H\left(\mathbf{q}\right)}-\alpha{p}_{n}+\frac{1}{2}\label{eq:halp_rioul}\\ =& \frac{1}{e}2^{H\left(\mathbf{p}\right)+{p}_nh\left(\alpha\right)}-\alpha{p}_{n}+\frac{1}{2}.\nonumber \end{align} {The first inequality follows taking the {supremum} over $\alpha$ in eq.~{\eqref{eq:halp_rioul}}, the second by substituting $\alpha=1/2$. To justify the third, we use $2^x>1+x\ln2$ for $x=p_n$ obtaining} \begin{align*} \frac{1}{e}2^{H\left(\mathbf{p}\right)+{p}_n}-\frac{1}{2}{p}_{n} \geq& \frac{1}{e}2^{H\left(\mathbf{p}\right)} \left( 1+ {p}_n\ln\,2\right) -\frac{1}{2}{p}_{n}\\ =& \frac{1}{e}2^{H\left(\mathbf{p}\right)} + \left(\frac{2^{H\left(\mathbf{p}\right)}\ln 2}{e}-\frac{1}{2}\right) p_n, \end{align*} {where $p_n$'s coefficient is positive whenever $H\left(\mathbf{p}\right)\geq \log \frac{e}{2\ln2}$. This ends the proof.} \end{proof} We can further refine this lemma using the techniques of~\cite{popescu2019refinement,tuanuasescu2020exploiting} as follows. \begin{theorem} For any positive descending probability distributions $\mathbf{p}\in\mathbb{R}^n$ such that $H\left(\mathbf{p}\right)\geq 1$, we have\label{thm:RioulGen} \begin{align*} \mathbb{E}\left[G\left(\mathbf{p}\right)\right] \geq & \sup_{\alpha\in\left[0,1/2\right]} \frac{1}{e}2^{H\left(\mathbf{p}\right)+\frac{h\left(\alpha\right)}{1-\alpha}{p}_n}+\frac{1}{2}-\frac{\alpha}{1-\alpha}{p}_{n}\\ \geq& \frac{1}{e}2^{H\left(\mathbf{p}\right)+\frac{1}{2}{p}_n}+\frac{1}{2}-{p}_{n}\geq \frac{1}{e}2^{H\left(\mathbf{p}\right)}+\frac{1}{2}. \end{align*} \end{theorem} \begin{proof} Given the initial decreasing $\mathbf{p}$, we construct a sequence of probability distributions $\left\{\mathbf{Q}_k\right\}$, recursively defined using the procedure in the previous proof. We begin by fixing an arbitrary parameter $\alpha\in\left[0,1/2\right]$ as above. Denoting by $Q_{k,i}$ the $i$\textsuperscript{th} component of the sequence $\mathbf{Q}_k$, we define the terms of the list $\left\{\mathbf{Q}_k\right\}$ as follows. We let the support of the first term coincide with $\mathbf{p}$, i.e. $\mathbf{Q}_{0}=\left(p_0,\,p_1,\,\dots,\,p_n,\,0,\,0,\,\dots,\,0,\,\dots\right)$, and we define the other terms by recurrence: \begin{align*} \mathbf{Q}_{k+1}=&\left(Q_{k,0},\,Q_{k,1},\,\dots,\,Q_{k,n+k-1},\,\right.\\ &\left.\left(1-\alpha\right)Q_{k,n+k},\,\alpha Q_{k,n+k},\,0,\,0,\,\dots,\,0,\,\dots\right). \end{align*} and at each step of the construction we have the inequality \begin{align*} \mathbb{E}\left[G\left({\mathbf{Q}_k}\right)\right] =&\mathbb{E}\left[G\left({\mathbf{Q}_{k+1}}\right)\right] -\alpha{Q}_{k,n+k}\\ \geq& \frac{2^{H\left(\mathbf{Q}_{k+1}\right)}}{e}-\alpha{Q}_{k,n+k} > \frac{2^{H\left(\mathbf{\mathbf{Q}_k}\right)}}{e}+\frac{1}{2}. \end{align*} After the first $k$ steps of the construction we find {\small{\begin{align*} \mathbb{E}\left[G\left(\mathbf{p}\right)\right] =&\mathbb{E}\left[G\left({\mathbf{Q}_{k}}\right)\right]-{p}_n\alpha\frac{1-\alpha^k}{1-\alpha}\\ =&\mathbb{E}\left[G\left({\mathbf{Q}_{k}}\right)\right] + \sum_{j=0}^{k-1} \left(\mathbb{E}\left[G\left({\mathbf{Q}_{j}}\right)\right] - \mathbb{E}\left[G\left({\mathbf{Q}_{j+1}}\right)\right]\right)\\ \geq&\frac{1}{2}2^{H\left(\mathbf{Q}_{k}\right)}+\frac{1}{2} + \sum_{j=0}^{k-1} \left(\mathbb{E}\left[G\left({\mathbf{Q}_{j}}\right)\right] - \mathbb{E}\left[G\left({\mathbf{Q}_{j+1}}\right)\right]\right)\\ >&\frac{1}{e}2^{H\left(\mathbf{Q}_{k-1}\right)}+\frac{1}{2} + \sum_{j=0}^{k-2} \left(\mathbb{E}\left[G\left({\mathbf{Q}_{j}}\right)\right] - \mathbb{E}\left[G\left({\mathbf{Q}_{j+1}}\right)\right]\right)\\ >&\dots > \frac{1}{e}2^{H\left(\mathbf{Q}_0\right)}+\frac{1}{2}=\frac{1}{e}2^{H\left(\mathbf{p}\right)}+\frac{1}{2}, \end{align*}}} where the tightest of the enumerated bounds is {\small{\begin{align*} \mathbb{E}\left[G\left(\mathbf{p}\right)\right]\geq& \frac{1}{e}2^{H\left(\mathbf{Q}_{k}\right)}+\frac{1}{2} + \sum_{j=0}^{k-1} \left(\mathbb{E}\left[G\left({\mathbf{Q}_{j}}\right)\right] - \mathbb{E}\left[G\left({\mathbf{Q}_{j+1}}\right)\right]\right)\\ =&\frac{1}{e}2^{H\left(\mathbf{p}\right)+{p}_nh\left(\alpha\right)\frac{1-\alpha^{k}}{1-\alpha}}+\frac{1}{2} -{p}_n\alpha\frac{1-\alpha^k}{1-\alpha}, \end{align*}}} which as we have shown increases with $k$ up to the limit \begin{align*} \mathbb{E}\left[G\left(\mathbf{p}\right)\right]\geq \frac{1}{e}2^{H\left(\mathbf{p}\right)+{p}_n\frac{h\left(\alpha\right)}{1-\alpha}}+\frac{1}{2} -{p}_n\frac{\alpha}{1-\alpha} \end{align*} valid for any $\alpha\in\left[0,1/2\right]$. The first desired inequality now follows taking \emph{supremum} over the last equation, the second by substituting $\alpha=1/2$ and the third by noting that all bounds in the sequence are greater than the last one $\frac{1}{e}2^{H\left(\mathbf{p}\right)}+\frac{1}{2}$. \end{proof} \section{Application to Side-Channel Analysis} The improvements shown in previous sections can be very useful in the evaluation of side-channel attacks. In this context, Choudary and Popescu~\cite{ches17} presented a new approach, based on mathematical bounds of the guessing entropy~\cite{massey1994guessing}, to bound the guessing entropy remaining after a side-channel attack for very large cryptographic keys (or other secret data). They showed that their method works for keys of up to 1024 bytes and beyond, working in constant time and memory, which none of the other methods could do. This provided a great improvement for security evaluations of cryptographic devices. We remark here that all bounds from this paper are highly computationally scalable, because they are based on the Shannon entropy, which is additive i.e. $H\left(\otimes_i\mathbf{P}_i\right)=\sum_iH\left(\mathbf{P}_i\right)$ for any probability distributions $\mathbf{P}_1,\,\mathbf{P}_2,\,\dots,\,\mathbf{P}_n$~\cite{cover1999elements}. \subsection{Evaluation of bounds} In this context of security evaluations, it is interesting to evaluate the accuracy of different bounds for the guessing entropy in different settings. In this section, we analyse the bounds derived in the preceding sections, along with those presented at CHES 2017~\cite{ches17}, using lists of probabilities obtained from the application of Template Attacks~\cite{chari03} on side-channel traces. For easier comparison and future reference, we used the same data as in the CHES 2017 paper: A simulated dataset (MATLAB generated power consumption from the execution of the AES S-box) and a real dataset (power traces from the execution of AES in the AES hardware engine of an AVR XMEGA microcontroller). For our analysis we have focused on three interesting cases: 1) application of the bounds on single lists of probabilities -- this is equivalent to attacking a single key byte in side-channel attack evaluations; 2) application of the bounds on the combination of two bytes -- this is interesting to observe the scalability of the bounds; 3) application of the bounds on the combination of all 16 AES bytes -- this represents a complete attack on the full AES key and hence is a representative scenario of a full-fledged security evaluation. \begin{figure}[htb!] \includegraphics[width=1.7in]{figures/gmbounds_pgp_all_ta_simdata_mvnpdf_b1_r100_zl.pdf} \includegraphics[width=1.7in]{figures/gmbounds_pgp_all_ta_polar_mvnpdf_b1_r100.pdf} \caption{ \label{fig:bounds1b} Bounds for the simulated (left) and real (right) datasets, when targeting a single subkey byte. These are averaged results over 100 experiments. } \end{figure} \subsection{Evaluation on a single byte} We show the bounds for a single key byte on the simulated and real datasets in Figure~\ref{fig:bounds1b}. Here we can see that while the CHES lower bound is tighter when the guessing entropy is low (below 4 bits), in the other (most) cases Rioul's lower bound is better. Furthermore, we can see that Theorem 1 provides a better (tighter) lower bound than Rioul's lower bound and Theorem 2 in turn provides an even better lower bound than Theorem 1. An interesting artifact appears when the guessing entropy decreases below two bits ($\log(G(\mathbf{p}))=1$), where the Massey inequality (and the ones in ISIT 2019~\cite{popescu2019refinement}) does not necessarily hold (considering for example geometric distributions with $p_1\geq 1/2$). In this case, most bounds seem to be tighter than the CHES 2017~\cite{ches17} lower bound. Meanwhile, bounds based on Rioul's inequality all continue to hold in this regime, owing to the fact that it does not impose preconditions on the minimal value of $H(\mathbf{p})$ \begin{figure}[htb!] \includegraphics[width=1.7in]{figures/gmbounds_pgp_all_ta_simdata_mvnpdf_b1_b2_r100_zl.pdf} \includegraphics[width=1.7in]{figures/gmbounds_pgp_all_ta_polar_mvnpdf_b1_b2_r100.pdf} \caption{ \label{fig:bounds2b} Bounds for the simulated (left) and real (right) datasets, when targeting two subkey bytes. These are averaged results over 100 experiments. } \end{figure} \subsection{Evaluation on two bytes} We show the bounds when targetting two key bytes on the simulated and real datasets in Figure~\ref{fig:bounds2b}. Here we see again that Rioul's bound is tight when the guessing entropy is higher, but then the CHES lower bound becomes tighter, as the guessing entropy decreases. We can also confirm here that Theorem 1 provides a better (tighter) lower bound than Rioul's lower bound. However, in this case Theorem 2 provides numerically similar results to Theorem 1, just as the ISIT 2019 lower bound provides numerically similar results to Massey's lower bound. These results are due to the fact that these bounds only differ pairwise in a term containing the minimum probability in the combined list and this minimum becomes zero (or almost zero) when combining two (or more) lists of probabilities in our experiments, which is just a particularity of such experiments. \begin{figure}[htb] \includegraphics[width=1.7in]{figures/gmbounds_pgp_all_ta_simdata_mvnpdf_allbytes_r100_zl.pdf} \includegraphics[width=1.7in]{figures/gmbounds_pgp_all_ta_polar_mvnpdf_allbytes_r100.pdf} \caption{ \label{fig:bounds16b} Bounds for the simulated (left) and real (right) datasets, when targeting all the 16 AES key bytes. These are averaged results over 100 experiments. } \end{figure} \subsection{Evaluation on all 16 bytes} Finally, we show the bounds when targeting all the 16 bytes of the full AES key on the simulated and real datasets in Figure~\ref{fig:bounds16b}. We did not plot the actual value of the guessing entropy in this case, because it is not possible to compute it: it would require the iteration over (and sorting of) a list of $2^{128}$ elements. Hence, in this case the computationally efficient bounds compared in this paper become very valuable. From the figure we see again that when the guessing entropy is very high (e.g. above 120 bits), all the lower bounds presented in this paper are tighter than the CHES 2017 lower bound. However, as soon as the guessing entropy decreases below 120 bits, the CHES 2017 lower bound becomes closer to the upper bound than the other lower bounds. We can also confirm here that Rioul's lower bound is a better (tighter) lower bound than Massey's lower bound. However, in this case we observe that Theorem 1 and 2 provide numerically similar results to Rioul's lower bound. Nevertheless, we are impressed by the scalability of such bounds, thanks to the easy computation of the Shannon entropy of product distributions. \section{Conclusion} In this paper, the asymptotically optimal Massey-like inequality is determined as an improved Rioul's inequality by an additive constant of $1/2$. Then, using the techniques of~\cite{popescu2019refinement,tuanuasescu2020exploiting}, this inequality is further refined for finite support distributions allowing us to increase the multiplicative constant depending on the smallest probability $p_n$. Finally, the results are applied to the task of side-channel attack evaluation and compared to the best on the market. It is shown that under certain conditions, the Shannon entropy is in fact a precious quantifier of guessing entropy because it is computationally scalable thanks to its additivity property. For future work we are very interested in further results based on other (additive) entropies, such as R\'{e}nyi entropies where other guessing bounds are already investigated~\cite{rioul2021variations} past their original use in moment inequalities~\cite{arikan1996inequality,sason2018improved,kuzuoka2019conditional} and other derived problems such as guessing with limited (or no) memory~\cite{huleihel2017guessing}. \section*{Acknowledgment} This work was partially supported the Romanian Ministry of Education and Research, CNCS -- UEFISCDI, project number PN-III-P1-1.1-TE-2019-2245, within PNCDI III.
\section*{Contents} \@starttoc{toc}} \makeatother \makeatletter \def\@biblabel#1{#1.} \makeatother \makeatletter \let\Thebibliography=\thebibliography \renewcommand{\thebibliography}[1]{\def\@mkboth##1##2{}\Thebibliography{#1} \addcontentsline{toc}{section}{References} \frenchspacing \setlength{\@topsep}{0pt \setlength{\itemsep}{0pt}% \setlength{\parskip}{0pt plus 2pt}% } \makeatother \makeatletter \def\mdots@{\mathinner.\nonscript\!.% \ifx\next,.\else\ifx\next;.\else\ifx\next..\else \nonscript\!\mathinner.\fi\fi\fi} \let\ldots\mdots@ \let\cdots\mdots@ \let\dotso\mdots@ \let\dotsb\mdots@ \let\dotsm\mdots@ \let\dotsc\mdots@ \def\vdots{\vbox{\baselineskip2.8{$p\mspace{1mu}$}@ \lineskiplimit\z@ \kern6{$p\mspace{1mu}$}@\hbox{.}\hbox{.}\hbox{.}\kern3{$p\mspace{1mu}$}@}} \def\ddots{\mathinner{\mkern1mu\raise8.6{$p\mspace{1mu}$}@\vbox{\kern7{$p\mspace{1mu}$}@\hbox{.}}% \raise5.8{$p\mspace{1mu}$}@\hbox{.}\raise3{$p\mspace{1mu}$}@\hbox{.}\mkern1mu}} \makeatother \makeatletter \def\@seccntformat#1{\csname the#1\endcsname.\quad} \makeatother \makeatletter \long\def\@makecaption#1#2{% \vskip\abovecaptionskip \sbox\@tempboxa{ #1. #2}% \ifdim \wd\@tempboxa >\hsize #1. #2\par \else \global \@minipagefalse \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% \fi \vskip\belowcaptionskip} \makeatother \makeatletter \renewcommand\section{\@startsection {section}{1}{\z@}% {-3.5ex \@plus -1ex \@minus -.2ex}% {2.3ex \@plus.2ex}% {\normalfont\Large\bfseries\boldmath}} \renewcommand\subsection{\@startsection{subsection}{2}{\z@}% {-3.25ex\@plus -1ex \@minus -.2ex}% {1.5ex \@plus .2ex}% {\normalfont\large\bfseries\boldmath}} \renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}% {-3.25ex\@plus -1ex \@minus -.2ex}% {1.5ex \@plus .2ex}% {\normalfont\normalsize\bfseries\boldmath}} \renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}% {3.25ex \@plus1ex \@minus.2ex}% {-1em}% {\normalfont\normalsize\bfseries\boldmath}} \renewcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}% {3.25ex \@plus1ex \@minus .2ex}% {-1em}% {\normalfont\normalsize\bfseries\boldmath}} \makeatother \newcommand{\authortitle}[2]{\author{#1}\title{#2}\markboth{#1}{#2}} \newcommand{\auth}[2]{{#1, #2.}} \def\auth{\auth} \newcommand{\art}[6]{{\sc #1, \rm #2, \it #3\/ \bf #4 \rm (#5), \mbox{#6}.}} \newcommand{\book}[3]{{\sc #1, \it #2, \rm #3.}} \newcommand{{\rm and }}{{\rm and }} \newcommand{\artnopt}[6]{{\sc #1, \rm #2, \it #3\/ \bf #4 \rm (#5), \mbox{#6}}} \newcommand{\artprep}[3]{{\sc #1, \rm #2, \rm #3.}} \newcommand{\artin}[3]{{\sc #1, \rm #2, in #3.}} \newcommand{\arttoappear}[3]{{\sc #1, \rm #2, to appear in \it #3}} \RequirePackage{amsthm} \newtheoremstyle{descriptive}% {\topsep} {\topsep} {\rmfamily} {} {\bfseries} {.} { } {} \newtheoremstyle{propositional}% {\topsep} {\topsep} {\itshape} {} {\bfseries} {.} { } {} \newtheoremstyle{remarkstyle}% {\topsep} {\topsep} {\rmfamily} {} {\itshape} {.} { } {} \theoremstyle{propositional} \newtheorem{thm}{Theorem}[section] \newtheorem{lem}[thm]{Lemma} \newtheorem{prop}[thm]{Proposition} \newtheorem{cor}[thm]{Corollary} \theoremstyle{descriptive} \newtheorem{defi}[thm]{Definition} \newtheorem{remark}[thm]{Remark} \newtheorem{example}[thm]{Example} \makeatletter \renewenvironment{proof}[1][\proofname]{\par \pushQED{\qed}% \normalfont \trivlist \item[\hskip\labelsep \itshape #1\@addpunct{.}]\ignorespaces }{% \popQED\endtrivlist\@endpefalse } \makeatother \newcommand{\setminus}{\setminus} {\catcode`p =12 \catcode`t =12 \gdef\eeaa#1pt{#1}} \def\accentadjtext#1{\setbox0\hbox{$#1$}\kern \expandafter\eeaa\the\fontdimen1\textfont1 \ht0 } \def\accentadjscript#1{\setbox0\hbox{$#1$}\kern \expandafter\eeaa\the\fontdimen1\scriptfont1 \ht0 } \def\accentadjscriptscript#1{\setbox0\hbox{$#1$}\kern \expandafter\eeaa\the\fontdimen1\scriptscriptfont1 \ht0 } \def\accentadjtextback#1{\setbox0\hbox{$#1$}\kern -\expandafter\eeaa\the\fontdimen1\textfont1 \ht0 } \def\accentadjscriptback#1{\setbox0\hbox{$#1$}\kern -\expandafter\eeaa\the\fontdimen1\scriptfont1 \ht0 } \def\accentadjscriptscriptback#1{\setbox0\hbox{$#1$}\kern -\expandafter\eeaa\the\fontdimen1\scriptscriptfont1 \ht0 } \def\itoverline#1{{\mathsurround0pt\mathchoice {\rlap{$\accentadjtext{\displaystyle #1} \accentadjtext{\vrule height1.593pt} \overline{\phantom{\displaystyle #1} \accentadjtextback{\displaystyle #1}}$}{#1}} {\rlap{$\accentadjtext{\textstyle #1} \accentadjtext{\vrule height1.593pt} \overline{\phantom{\textstyle #1} \accentadjtextback{\textstyle #1}}$}{#1}} {\rlap{$\accentadjscript{\scriptstyle #1} \accentadjscript{\vrule height1.593pt} \overline{\phantom{\scriptstyle #1} \accentadjscriptback{\scriptstyle #1}}$}{#1}} {\rlap{$\accentadjscriptscript{\scriptscriptstyle #1} \accentadjscriptscript{\vrule height1.593pt} \overline{\phantom{\scriptscriptstyle #1} \accentadjscriptscriptback{\scriptscriptstyle #1}}$}{#1}}}} \def\itunderline#1{{\mathsurround0pt\mathchoice {\rlap{$\underline{\phantom{\displaystyle #1} \accentadjtextback{\displaystyle #1}}$}{#1}} {\rlap{$\underline{\phantom{\textstyle #1} \accentadjtextback{\textstyle #1}}$}{#1}} {\rlap{$\underline{\phantom{\scriptstyle #1} \accentadjscriptback{\scriptstyle #1}}$}{#1}} {\rlap{$\underline{\phantom{\scriptscriptstyle #1} \accentadjscriptscriptback{\scriptscriptstyle #1}}$}{#1}}}} \def\vint{\mathop{\mathchoice% {\setbox0\hbox{$\displaystyle\intop$}\kern 0.22\wd0% \vcenter{\hrule width 0.6\wd0}\kern -0.82\wd0}% {\setbox0\hbox{$\textstyle\intop$}\kern 0.2\wd0% \vcenter{\hrule width 0.6\wd0}\kern -0.8\wd0}% {\setbox0\hbox{$\scriptstyle\intop$}\kern 0.2\wd0% \vcenter{\hrule width 0.6\wd0}\kern -0.8\wd0}% {\setbox0\hbox{$\scriptscriptstyle\intop$}\kern 0.2\wd0% \vcenter{\hrule width 0.6\wd0}\kern -0.8\wd0}}% \mathopen{}\int} \newcommand{\nabla}{\nabla} \newcommand{\displaystyle}{\displaystyle} \DeclareMathOperator{\Div}{div} \DeclareMathOperator{\cp}{cap} \newcommand{\partial}{\partial} \newcommand{\bdry}{\partial} \newcommand{_{\rm loc}}{_{\rm loc}} \newcommand{\noindent}{\noindent} \newcommand{\gtrsim}{\gtrsim} \newcommand{\lesssim}{\lesssim} \newcommand{{\mathcal A}}{{\mathcal A}} \newcommand{{\mathcal B}}{{\mathcal B}} \newcommand{\alpha}{\alpha} \newcommand{\lambda}{\lambda} \newcommand{\kappa}{\kappa} \newcommand{\Omega}{\Omega} \newcommand{\varepsilon}{\varepsilon} \newcommand{{$p\mspace{1mu}$}}{{$p\mspace{1mu}$}} \newcommand{\mathbf{R}}{\mathbf{R}} \newcommand{\bar{u}}{\bar{u}} \newcommand{\tilde{u}}{\tilde{u}} \newcommand{\hat{u}}{\hat{u}} \newcommand{\tilde{v}}{\tilde{v}} \newcommand{\tilde{f}}{\tilde{f}} \newcommand{\bar{f}}{\bar{f}} \newcommand{\hat{f}}{\hat{f}} \newcommand{\widetilde{w}}{\widetilde{w}} \newcommand{\widetilde{F}}{\widetilde{F}} \newcommand{\widetilde{E}}{\widetilde{E}} \newcommand{\itoverline{G}}{\itoverline{G}} \newcommand{\itoverline{B}}{\itoverline{B}} \newcommand{{\,\overline{\!B'}}}{{\,\overline{\!B'}}} \renewcommand{\phi}{\varphi} \newcommand{{\widetilde{\phi}}}{{\widetilde{\phi}}} \newcommand{{\itoverline{\phi}}}{{\itoverline{\phi}}} \newcommand{W^{1,p}}{W^{1,p}} \newcommand{L^{1,p}}{L^{1,p}} \newcommand{H^{1,p}}{H^{1,p}} \newcommand{W^{1,p}\loc}{W^{1,p}_{\rm loc}} \newcommand{H^{1,p}\loc}{H^{1,p}_{\rm loc}} \newcommand{\ensuremath{\mathchoice{\quad \Longleftrightarrow \quad}{\Leftrightarrow}}{\ensuremath{\mathchoice{\quad \Longleftrightarrow \quad}{\Leftrightarrow}} {\Leftrightarrow}{\Leftrightarrow}} \def{\mathsurround0pt$'$}{{\mathsurround0pt$'$}} \numberwithin{equation}{section} \newenvironment{ack}{\medskip{\it Acknowledgement.}}{} \begin{document} \authortitle{Jana Bj\"orn and Abubakar Mwasa} {Behaviour at infinity for solutions of a mixed boundary value problem via inversion} \title{Behaviour at infinity for solutions of a mixed nonlinear elliptic boundary value problem via inversion} \author{ Jana Bj\"orn \\ \it\small Department of Mathematics, Link\"oping University, \it\small SE-581 83 Link\"oping, Sweden \\ \it \small <EMAIL>, ORCID\/\textup{:} 0000-0002-1238-6751 \\ \\ Abubakar Mwasa \\ \it\small Department of Mathematics, Link\"oping University, \it\small SE-581 83 Link\"oping, Sweden\/{\rm ;} \\ \it\small Department of Mathematics, Busitema University, \it\small P.O.Box 236, Tororo, Uganda \\ \it \small <EMAIL>, <EMAIL>, ORCID\/\textup{:} 0000-0003-4077-3115 } \date{} \maketitle \noindent{\small \begin{abstract} \noindent We study a mixed boundary value problem for the quasilinear elliptic equation $\Div{\mathcal A}(x,\nabla u(x))=0$ in an open infinite circular half-cylinder with prescribed continuous Dirichlet data on a part of the boundary and zero conormal derivative on the rest. We prove the existence and uniqueness of bounded weak solutions to the mixed problem and characterize the regularity of the point at infinity in terms of {$p\mspace{1mu}$}-capacities. For solutions with only Neumann data near the point at infinity we show that they behave in exactly one of three possible ways, similar to the alternatives in the Phragm\'en--Lindel\"of principle. \end{abstract} } \bigskip \noindent {\small \emph{Key words and phrases}: continuous Dirichlet data, existence and uniqueness of solutions, mixed boundary value problem, Phragm\'en--Lindel\"of trichotomy, quasilinear elliptic equation, regularity at infinity, Wiener criterion. } \medskip \noindent {\small Mathematics Subject Classification (2020): Primary: 35J25. Secondary: 35J62, 35B40. } \section{Introduction} The \emph{Dirichlet problem} on a nonempty open set $\Omega\subset\mathbf{R}^n$ entails finding a function $u$ which solves a certain partial differential equation in $\Omega$ with the prescribed boundary data $u=f$ on $\bdry\Omega$. When the boundary data $g:\bdry\Omega\to\mathbf{R}$ are taken as the normal derivative $\bdry u/\bdry \nu=g$, the problem is called a \emph{Neumann problem}. More general directional derivatives, such as the conormal derivative $Nu$ considered below, are also possible. In this paper, we study a \emph{mixed boundary value problem} for the quasilinear equation \begin{equation} \label{eq-divA} \Div{\mathcal A}(x,\nabla u(x))=0, \end{equation} where a Dirichlet condition is prescribed on a part of the boundary, while the rest carries the zero conormal derivative \[ Nu(x):= {\mathcal A}(x,\nabla u(x))\cdot \nu(x) = 0, \] where $\nu(x)$ is the unit outer normal at $x$. Equation \eqref{eq-divA} is considered in an infinite circular half-cylinder and the vector-valued function ${\mathcal A}$ satisfies the standard ellipticity conditions with a parameter $p>1$. The {$p\mspace{1mu}$}-Laplace equation $\Div(|\nabla u|^{p-2}\nabla u)=0$ is included as a special case. We prove the existence and uniqueness of bounded continuous weak solutions to the above mixed boundary value problem with continuous Dirichlet boundary data $f$ on a closed set $F\subset \bdry G$, which can be bounded or unbounded. More precisely, if $f\in C(F)$ is such that (for unbounded $F$) \begin{equation} \label{eq-lim-at-infty-intro} f(\infty):=\lim_{F\ni x\to\infty}f(x) \quad \text{exists and is finite,} \end{equation} then there exists a unique bounded continuous weak solution $u$ of \eqref{eq-divA} with zero conormal derivative on $\bdry G\setminus F$ and such that \begin{equation*} \lim_{x\to x_0}u(x)=f(x_0) \quad \text{for all $x_0\in F$ outside a set of $C_p$-capacity zero,} \end{equation*} see Theorem~\ref{thm-uniq-sol} and Remark~\ref{rem-bdd-F0}. Moreover, $u$ is H\"older continuous at all points in the Neumann boundary $\bdry G\setminus F$. For Dirichlet data of Sobolev type, existence and uniqueness in the Sobolev sense are proved in Theorem~\ref{thm-ex-Sob}. We also characterize the regularity of the point at infinity by a \emph{Wiener type criterion}. Roughly speaking, if the Dirichlet boundary $F$ is sufficiently thick at $\infty$ in terms of a variational {$p\mspace{1mu}$}-capacity adapted to the mixed problem, then for every $f\in C(F)$ satisfying~\eqref{eq-lim-at-infty-intro}, the unique solution of the above mixed problem satisfies \begin{equation} \label{eq-reg-intro} \lim_{x\to \infty}u(x)=f(\infty). \end{equation} Conversely, thickness of $F$ at $\infty$ is also necessary in order for \eqref{eq-reg-intro} to hold for all $f\in C(F)$, see Theorem~\ref{thm-Breg-infty}. On the other hand, if $F$ is bounded, i.e.\ when only the Neumann condition is used in a proximity of the point at infinity, then we show in Theorem~\ref{thm-cases} that each solution $u$ of equation~\eqref{eq-divA} with zero conormal derivative near $\infty$ behaves in one of the following three ways as $x\to\infty$: \begin{enumerate} \renewcommand{\theenumi}{\textup{(\roman{enumi})}}% \renewcommand{\labelenumi}{\theenumi} \item \label{intro-i} The solution has a finite limit $\displaystyle u(\infty):=\lim_{x\to\infty} u(x)$. \item \label{intro-ii} The solution tends roughly linearly to either $\infty$ or $-\infty$. \item \label{intro-iii} The solution changes sign and approaches both $\infty$ and $-\infty$, i.e.\ \[ \limsup_{x\to\infty} u(x)=\infty \quad \text{and} \quad \liminf_{x\to\infty} u(x)=-\infty. \] \end{enumerate} Similar trichotomy results at $\infty$ for solutions of the Neumann problem for the linear uniformly elliptic equation $\Div(A(x)\nabla u)=0$ were obtained in Ibragimov--Landis~\cite{IbrLan97},~\cite{IbrLan98}, Lakhturov~\cite{Lakh} and Landis--Panasenko~\cite{LanPanas}. For (sub/super)so\-lu\-tions of various PDEs in unbounded domains with only Dirichlet data, similar alternative behaviour is often referred to as Phragm\'en--Lindel\"of principle and has been extensively studied. See e.g.\ Gilbarg~\cite{Gilbarg}, Hopf~\cite{Hopf}, Horgan--Payne~\cite{HorgPay1},~\cite{HorgPay2}, Jin--Lancaster~\cite{JinLanc2000},~\cite{JinLanc2003}, Lindqvist~\cite{Lindqvist}, Lundstr\"om~\cite{Lundstr}, Quintanilla~\cite{Quintanilla}, Serrin~\cite{Serrin} and Vitolo~\cite{Vitolo}. Compared with pure Dirichlet and Neumann problems, the literature on mixed boundary value problems is less extensive, especially in unbounded domains. Mixed problems are sometimes called \emph{Zaremba problems}, mainly in the Russian literature, since they were first considered for the Laplace equation $\Delta u=0$ by Zaremba~\cite{ZarProb} in 1910. For linear uniformly elliptic equations of the type $\Div(A(x)\nabla u)=0$, they were studied by e.g.\ Ibragimov~\cite{IbrDokl},~\cite{IbrSbor}, Kerimov~\cite{KerimovInfty},~\cite{KerimovWien} and Novruzov~\cite{Novruzov}. A~mixed problem for linear equations of nondivergence type was considered in Cao--Ibragimov--Nazarov~\cite{CaoIbrNaz} and Ibragimov--Nazarov~\cite{IbrNaz}. Existence of weak solutions for mixed and Neumann problems for linear operators in very general unbounded domains was recently obtained using an exhaustion with bounded domains by Chipot~\cite{Chipot} and Chipot--Zube~\cite{ChipZube}. Wi\'sniewski~\cite{Wisn10},~\cite{Wisn16} studied the decay at infinity of solutions to mixed problems with coefficients approaching the Laplace operator in unbounded conical domains. On the other hand, nonexistence Liouville type results for mixed problems of the form $-\Delta u =f(u)$ in various unbounded domains were obtained in Damascelli--Gladiali~\cite{DamGlad}. A priori estimates, unique solubility and traces for linear elliptic systems of divergence type in Ahlfors regular cylindrical domains with Dirichlet and Neumann data independent of the last variable were obtained in Auscher--Egert~\cite{AuschEg} by the so-called DB-approach adapted from the upper half-space. All the above papers deal with linear operators. We point out that even for $p=2$, equation~\eqref{eq-divA} considered here can be nonlinear. This happens for example when ${\mathcal A}(x,q):=a(q/|q|)q$, where $a$ is a sufficiently smooth strictly positive scalar function on the unit sphere; see Example~\ref{ex-nonlin-p=2}. In Kerimov--Maz{\mathsurround0pt$'$} ya--Novruzov~\cite{KMV}, the regularity of the point at infinity for the Zaremba problem for the Laplace equation $\Delta u=0$ in an infinite half-cylinder was characterized by means of a Wiener type criterion. A similar problem for certain weighted linear elliptic equations was studied in Bj\"orn~\cite{JB} and more recently for the {$p\mspace{1mu}$}-Laplace equation in Bj\"orn--Mwasa~\cite{BM}. The results in this paper partially extend the ones in~\cite{KMV}, \cite{JB} and \cite{BM} to general quasilinear elliptic equations of the form~\eqref{eq-divA}, but we also address other properties of the solutions. In order to achieve our results, we make use of the change of variables introduced in Bj\"orn~\cite{JB}, and later adopted by Bj\"orn--Mwasa~\cite{BM}, to transform the infinite half-cylinder $G$ and the quasilinear elliptic equation~\eqref{eq-divA} into a unit half-ball and a degenerate elliptic equation \begin{equation} \label{eq-B-xi} \Div{\mathcal B}(\xi,\nabla\tilde{u}(\xi))=0, \end{equation} with the $A_p$-weight $w(\xi)=|\xi|^{p-n}$, see Section~\ref{sect-cyl-ball}. After the above transformation, we are able to eliminate the Neumann data by reflecting the unit half-ball and equation~\eqref{eq-B-xi} to the whole unit ball, leaving only the Dirichlet data. This is done in Section~\ref{sect-pro-ope-B}. In Section~\ref{sect-existence}, we then use tools for Dirichlet problems from Heinonen--Kilpel\"ai\-nen--Martio~\cite{HKM} and Bj\"orn--Bj\"orn--Mwasa~\cite{BBM} to prove the existence and uniqueness of continuous weak solutions to the mixed boundary value problem for~\eqref{eq-divA} in the cylinder, with zero conormal derivative and continuous Dirichlet data. In Section~\ref{sect-Wiener}, we show that regularity at infinity for the mixed problem for~\eqref{eq-divA} is equivalent to the regularity of the origin for the Dirichlet problem for~\eqref{eq-B-xi}. This can in turn be characterized in terms of weighted {$p\mspace{1mu}$}-capacities using a Wiener criterion, provided by~\cite[Theorem~21.30]{HKM} and Mikkonen~\cite{M}. This Wiener criterion for~\eqref{eq-B-xi} is then transferred back to the cylinder to characterize the regularity at infinity for~\eqref{eq-divA} by means of a variational {$p\mspace{1mu}$}-capacity adapted to the cylinder. Finally, in Section~\ref{Sect-remov}, we use estimates from~\cite[Sections~6 and~7]{HKM} for capacitary potentials and singular solutions of~\eqref{eq-B-xi} to prove the above Phragm\'en--Lindel\"of type trichotomy \ref{intro-i}--\ref{intro-iii}. \begin{ack} J.~B. was partially supported by the Swedish Research Council grant 2018-04106. A.~M. was supported by the SIDA (Swedish International Development Cooperation Agency) project 316-2014 ``Capacity building in Mathematics and its applications'' under the SIDA bilateral program with the Makerere University 2015--2020, contribution No.\ 51180060. \end{ack} \section{Notation and preliminaries} \label{sect-pre-not} Let $G= B'\times (0,\infty)\subset \mathbf{R}^n$ be an open infinite circular half-cylinder, where \[ B'=\{x'\in\mathbf{R}^{n-1}:|x'|<1\} \] is the unit ball in $\mathbf{R}^{n-1}$. Points in $\mathbf{R}^n=\mathbf{R}^{n-1}\times \mathbf{R}$, $n\geq 2$, are denoted by $x=(x',x_n)=(x_1,\cdots,x_{n-1}, x_n)$. Let $F$ be a closed subset of the closure $\itoverline{G}$ of $G$. Assume that $F$ contains the base $B'\times \{0\}$ of $G$. We consider the following mixed boundary value problem \begin{equation} \label{mixed-bvp} \begin{cases} \Div{\mathcal A}(x,\nabla u)=0, &\text{in } G\setminus F,\\ u=f,& \text{on } F_0:=F\cap\bdry(G\setminus F),\text{ (Dirichlet data)}, \\ Nu:= {\mathcal A}(x,\nabla u)\cdot \nu =0 &\text{on } \bdry G\setminus F, \text{ (generalized Neumann data)}, \end{cases} \end{equation} where $Nu$ is the conormal derivative, $\nu$ is the unit outer normal of $G$ and $\bdry G$ denotes the boundary of $G$. Let $1<p<\infty$ be fixed. The mapping ${\mathcal A}: \itoverline{G} \times \mathbf{R}^n\to \mathbf{R}^n$ in \eqref{mixed-bvp} is assumed to satisfy the standard ellipticity and boundedness conditions: \begin{itemize} \item ${\mathcal A}(\cdot,q)$ is measurable for all $q\in \mathbf{R}^n$, \item ${\mathcal A}(x,\cdot)$ is continuous for a.e.\ $x\in \itoverline{G}$, \item There are constants $0<\alpha_1\le \alpha_2<\infty$ such that for all $q, q_1, q_2\in \mathbf{R}^n$, $0\ne\lambda\in\mathbf{R}$ and a.e.\ $x\in \itoverline{G}$, \begin{align} {\mathcal A}(x,q) \cdot q &\ge \alpha_1 |q|^p, \label{eq-ell-A} \\ |{\mathcal A}(x,q)| &\le \alpha_2 |q|^{p-1}, \label{eq-bdd-A} \\ {\mathcal A}(x,\lambda q) & = \lambda |\lambda|^{p-2} {\mathcal A}(x,q), \label{eq-homog-A} \end{align} and \begin{equation} ({\mathcal A}(x,q_1)-{\mathcal A}(x,q_2))\cdot(q_1-q_2) >0 \quad\text{when }q_1\neq q_2. \label{eq-monot-A} \end{equation} \end{itemize} The quasilinear elliptic equation $\Div{\mathcal A}(x,\nabla u)=0$ and the conormal derivative in~\eqref{mixed-bvp} will be considered in the weak sense as follows. \begin{defi} \label{defi-weak-divA} A function \[ u\inW^{1,p}_{\rm loc}(\itoverline{G} \setminus F) := \{u|_{\itoverline{G}\setminus F}: u \in W^{1,p}_{\rm loc}(\mathbf{R}^n\setminus F)\}, \] is a \emph{weak solution} of the equation $\Div{\mathcal A}(x,\nabla u)=0$ in $G\setminus F$ with \emph{zero conormal derivative} on $\partial G\setminus F$ if the integral identity \begin{equation} \label{eq-weak-sol-divA} \int_{G\setminus F} {\mathcal A}(x,\nabla u) \cdot \nabla\phi\, dx=0 \end{equation} holds for all $\phi \in C_0^{\infty}(\mathbf{R}^n\setminus F)$, where $\cdot$ denotes the scalar product in $\mathbf{R}^n$ and $C_0^{\infty}(\Omega)$ is the space of all infinitely many times continuously differentiable functions with compact support in $\Omega\subset\mathbf{R}^n$. \end{defi} \begin{remark} If the whole boundary $\bdry G$ is contained in $F$, then there is no Neumann condition and the mixed boundary value problem reduces to a purely Dirichlet problem. \end{remark} As usual, the local space $W^{1,p}_{\rm loc}(\Omega)$ (and later $H^{1,p}_{\rm loc}(\Omega,w)$) consists of those functions $u$ which belong to $W^{1,p}(\Omega')$ (resp.\ $H^{1,p}(\Omega',w)$) for all $\Omega'\Subset\Omega$, where $\Omega'\Subset\Omega$ means that $\overline{\Omega'}$ is a compact subset of $\Omega$. As mentioned in the introduction, equation~\eqref{eq-divA} can be nonlinear even for $p=2$, as illustrated by the following example. \begin{example} \label{ex-nonlin-p=2} For $p=2$ and $x,q\in\mathbf{R}^n$, let \begin{equation} \label{eq-def-A} {\mathcal A}(x,q) = \begin{cases} 0 & \text{if } q=0, \\ a\bigl( \frac{q}{|q|} \bigr) q & \text{if } q\ne0, \end{cases} \end{equation} where the scalar function $a$ is strictly positive and continuous on the unit sphere $\bdry B(0,1)$ in $\mathbf{R}^n$ and such that \begin{equation} \label{eq-a/a} \frac{a(\theta')}{a(\theta)} > \frac{1-\sin\alpha}{1+\sin\alpha} \quad \text{for any $\theta,\theta'\in\bdry B(0,1)$ with $\theta\cdot \theta'= \cos\alpha >0$,} \end{equation} where $\alpha=\alpha(\theta,\theta')$ is the acute angle between $\theta$ and $\theta'$. Then ${\mathcal A}$ satisfies the ellipticity conditions~\eqref{eq-ell-A}--\eqref{eq-monot-A}. Indeed, the only nontrivial verification is that of~\eqref{eq-monot-A}. For this, we can clearly assume that $|q|=1$ and \[ 0<a(\theta')\le a(\theta), \quad \text{where } \theta=q \text{ and } \theta'=\frac{q'}{|q'|}. \] Condition~\eqref{eq-monot-A} then means that the angle between the vectors $q'-q$ and $\frac{a(\theta')}{a(\theta)}q'-q$ is strictly less than $\frac{\pi}{2}$. Since $a(\theta')/a(\theta)\le1$, a geometric consideration shows that this is clearly satisfied if $\alpha\ge\frac{\pi}{2}$ or if \[ \alpha<\frac{\pi}{2} \text{ and } |q'|\le \frac{1}{\cos\alpha}. \] So assume that $\alpha<\frac{\pi}{2}$ and $|q'|>1/\cos\alpha$. Aplying the cosine theorem to the triangles spanned by the vectors $q$ and $q'$, or by \[ q \text{ and } q'':=\frac{a(\theta')}{a(\theta)}q', \] respectively, as well as to the triangle spanned by $q'-q$ and $q''-q$, we see that the angle between $q'-q$ and $q''-q$ is $<\frac{\pi}{2}$ if and only if \[ |q|^2 + |q'|^2 -2|q|\,|q'| \cos\alpha + |q|^2 + |q''|^2 -2|q|\,|q''| \cos\alpha > |q'-q''|^2. \] Since $|q|=1$, this is equivalent to \[ 1 - \biggl( 1+\frac{a(\theta')}{a(\theta)} \biggr) |q'| \cos\alpha + \frac {a(\theta')}{a(\theta)} |q'|^2 >0, \] i.e. \[ \frac{a(\theta')}{a(\theta)} > \frac{|q'|\cos\alpha -1}{|q'|(|q'|-\cos\alpha)}. \] Maximizing the right-hand side over $|q'|> 1/\cos\alpha$, we find that its maximum is attained when \[ |q'|=\frac{1+\sin\alpha}{\cos\alpha} \quad \text{and equals } \frac{1-\sin\alpha}{1+\sin\alpha}. \] This justifies the requirement~\eqref{eq-a/a}. A concrete example of a function satisfying~\eqref{eq-a/a} is $a(\theta)=e^{\theta\cdot q_0}$, for any fixed vector $q_0\in\mathbf{R}^n$ with $|q_0|<1/\sqrt2$. Indeed, with this choice, \[ \frac{a(\theta')}{a(\theta)} = e^{(\theta'-\theta)\cdot q_0} > 1 - \frac{|\theta'-\theta|}{\sqrt2}, \] while \[ |\theta'-\theta|^2 = 2 - 2\theta\cdot \theta' = 2 - 2\cos\alpha \le 2\sin^2 \alpha, \] from which~\eqref{eq-a/a} readily follows. Clearly, a modification of~\eqref{eq-def-A} and~\eqref{eq-a/a} can be made so that ${\mathcal A}(x,q)$ and $a(x,\theta)$ also depend on $x\in\mathbf{R}^n$. \end{example} Throughout the paper, unless otherwise stated, $C$ will denote any positive constant whose real value is not important and need not be the same at each point of use. It can even vary within a line. By $a\lesssim b$, we mean that there exists a positive constant $C$, independent of $a$ and $b$, such that $a\leq Cb$. Similarly, $a\gtrsim b$ means $b\lesssim a$, while $a\simeq b$ stands for $a\lesssim b\lesssim a$. \section{Transformation of the half-cylinder} \label{sect-cyl-ball} In this section, the quasilinear elliptic operator $\Div{\mathcal A}(x,\nabla u)$ in $G$ is shown to correspond to a weighted quasilinear elliptic operator on the unit half-ball. We will use the following change of variables introduced in Bj\"orn~\cite[Section~3]{JB}. Let $\kappa>0$ be a fixed constant. Define the mapping \[ T:\mathbf{R}^n \longrightarrow T(\mathbf{R}^n) = \mathbf{R}^n\setminus\{(\xi',\xi_n)\in \mathbf{R}^n: \xi'=0 \text{ and }\xi_n\leq 0\} \] by $T(x',x_n)=(\xi',\xi_n)$, where \begin{equation} \label{eq-def-xi-from-x} \xi'= \frac{2e^{-\kappa x_n} x'}{1+|x'|^2} \quad \text{and} \quad \xi_n=\frac{e^{-\kappa x_n}(1-|x'|^2)}{1+|x'|^2}. \end{equation} We will use $x=(x',x_n)$ for points in $\itoverline{G}$ and $\xi=(\xi',\xi_n)=(\xi_1,\ldots,\xi_{n-1},\xi_n)\in \mathbf{R}^n$ for points in the space transformed by $T$. Note that \begin{align*} T(G) &= \{\xi\in\mathbf{R}^n: |\xi|<1\text{ and } \xi_n>0\}, \\ T(\itoverline{G}) &= \{\xi\in\mathbf{R}^n: 0<|\xi|\le1\text{ and } \xi_n\ge0\} \end{align*} are the open and the closed upper unit half-ball, respectively, with the origin $\xi=0$ removed. From \eqref{eq-def-xi-from-x} it is easy to see that \[ |\xi|=|T(x)|=e^{-\kappa x_n} \to 0 \quad\text{as } x_n \to \infty, \] that is, the point at infinity for the half-cylinder $G$ corresponds to the origin $\xi=0$ in $T(G)$. The mapping $T$ is a smooth diffeomorphism between $\mathbf{R}^n$ and $T(\mathbf{R}^n)$, see Bj\"orn--Mwasa~\cite[Lemma~3.1]{BM}. A direct calculation shows that the inverse mapping $T^{-1}$ of $T$ is given by \begin{equation*} x'= \frac{\xi'}{|\xi|+\xi_n} \quad \text{and} \quad x_n=-\frac{1}{\kappa}\log|\xi|. \end{equation*} In the following lemma we show how the operator $\Div{\mathcal A}(x,\nabla u)$ on the half-cylinder is transformed under $T$ to the unit half-ball, cf.~\cite[Section~3]{BM}. \begin{lem} \label{lem-int-id-Ball} Let $u,v\in W^{1,p}(\Omega)$ for some open set $\Omega\subset G$ and let $\tilde{u}= u\circ T^{-1}$ and $\tilde{v}= v\circ T^{-1}$. Then for any measurable set $A\subset \Omega$, \begin{equation} \label{eq-divA-to-B} \int_{A} {\mathcal A}(x,\nabla u)\cdot\nabla v\, dx =\int_{T(A)} {\mathcal B}(\xi,\nabla\tilde{u})\cdot\nabla \tilde{v} \,d\xi, \end{equation} where ${\mathcal B}$ is for $\xi=Tx\in T(\itoverline{G})$ and $q\in\mathbf{R}^n$ defined by \begin{equation} \label{eq-def-B} {\mathcal B}(\xi,q)= |J_T(x)|^{-1} dT(x){\mathcal A}(x,dT^*(x)q). \end{equation} \end{lem} Here, $J_T(x) = \det(dT(x))$ denotes the Jacobian of $T$ at $x$ and $dT^*(x)$ is the transpose of the differential $dT(x)$ of $T$ at $x$, seen as $(n\times n)$-matrices. In~\eqref{eq-def-B}, both $q$ and ${\mathcal A}(x,dT^*(x)q)$ are regarded as column vectors for the matrix multiplication to make sense. \begin{proof} First, we rewrite the scalar product on the left-hand side of \eqref{eq-divA-to-B} using matrix multiplication as \[ {\mathcal A}(x, \nabla u) \cdot\nabla v =(\nabla v)^*{\mathcal A}(x,\nabla u), \] where both ${\mathcal A}(x, \nabla u)$ and $\nabla v$ are seen as column vectors. Using the change of variables $\xi=T(x)$, together with the chain rule \begin{equation*} \nabla u(x)=dT^*(x)\nabla \tilde{u}(\xi), \quad \text{where }\xi=T(x), \end{equation*} we get \begin{align*} &\int_{A}(\nabla v)^* {\mathcal A}(x,\nabla u) \,dx \\ & \quad \quad \quad = \int_{T(A)}(dT^*(x)\nabla\tilde{v})^*{\mathcal A}(x, dT^*(x)\nabla\tilde{u})|J_T(x)|^{-1} \,d\xi \\ &\quad \quad \quad =\int_{T(A)}|J_T(x)|^{-1}dT(x){\mathcal A}(x, dT^*(x)\nabla\tilde{u})\cdot\nabla\tilde{v} \,d\xi\\ &\quad \quad \quad =\int_{T(A)}{\mathcal B}(\xi,\nabla\tilde{u})\cdot\nabla\tilde{v}\,d\xi. \qedhere \end{align*} \end{proof} In view of the integral identity \eqref{eq-weak-sol-divA}, Lemma~\ref{lem-int-id-Ball} shows that the quasilinear equation (\ref{eq-divA}) on $G\setminus F$ will be transformed by $T$ into the equation \begin{equation} \label{eq-div-B} \Div {\mathcal B}(\xi,\nabla \tilde{u})=0 \quad \text{on } T(G\setminus F), \end{equation} with a proper interpretation of the function spaces and the zero Neumann condition. To prove the fundamental properties of the transformed operator ${\mathcal B}(\xi,\nabla\tilde{u})$, we will need the following estimates from Bj\"orn--Mwasa~\cite[Lemma~3.3]{BM}. \begin{lem} \label{lem-JB} There exist constants $C_1,C_2>0$ such that if $x,y\in B'\times\mathbf{R}$ and $x_n\le y_n$, then \begin{equation*} C_1e^{-\kappa y_n}|x-y|\le |T(x)-T(y)|\le C_2e^{-\kappa x_n}|x-y|. \end{equation*} In particular, if $x\in B'\times\mathbf{R}$ and $q\in\mathbf{R}^n$ then \[ |dT^*(x)q|\simeq |dT(x)q|\simeq e^{-\kappa x_n}|q| \quad \text{and}\quad |J_{T}(x)|\simeq e^{-\kappa nx_n}, \] where the comparison constants in $\simeq$ depend on $\kappa$, but are independent of $x$ and $q$. \end{lem} \section{Properties of \texorpdfstring{$\Div {\mathcal B}(\xi,\nabla \tilde{u})$}{Div B(x,grad u)} and removing the \penalty-10000 Neumann data} \label{sect-pro-ope-B} In order to apply the theory of degenerate elliptic equations developed in Heinonen--Kilpel\"ainen--Martio~\cite{HKM}, we need to first show that the mapping ${\mathcal B}$ in~\eqref{eq-div-B} satisfies ellipticity assumptions similar to \eqref{eq-ell-A}--\eqref{eq-monot-A}. \begin{thm} \label{thm-B-ellipt-bdd} The mapping ${\mathcal B}:T(\itoverline{G})\times\mathbf{R}^n\to\mathbf{R}^n$, defined by \eqref{eq-def-B}, satisfies for all $q\in\mathbf{R}^n$ and a.e.\ $\xi\in T(\itoverline{G})$ the following ellipticity and boundedness conditions \[ {\mathcal B}(\xi,q)\cdot q \gtrsim \widetilde{w}(\xi)|q|^p \quad \text{and} \quad |{\mathcal B}(\xi,q)| \lesssim \widetilde{w}(\xi)|q|^{p-1}, \] where $\widetilde{w}(\xi)=|\xi|^{p-n}$ is a weight function and the comparison constants in $\gtrsim$ and $\lesssim$ are independent of $\xi$ and $q$. \end{thm} \begin{proof} From \eqref{eq-def-B}, we have that for all $q\in\mathbf{R}^n$ and a.e.\ $\xi=Tx\in T(\itoverline{G})$, \begin{align*} {\mathcal B}(\xi,q)\cdot q &=|J_T(x)|^{-1}dT(x){\mathcal A}(x,dT^*(x)q)\cdot q\\ &=|J_T(x)|^{-1}{\mathcal A}(x,dT^*(x)q)\cdot (dT^*(x)q). \end{align*} Now applying \eqref{eq-ell-A} together with Lemma~\ref{lem-JB}, we get that \[ {\mathcal B}(\xi,q)\cdot q \gtrsim e^{\kappa nx_n}|dT^*(x)q|^p\simeq e^{-\kappa(p-n)x_n}|q|^p=\widetilde{w}(\xi)|q|^p, \] which completes the proof of the first part. For the second part, we have using \eqref{eq-def-B}, \eqref{eq-bdd-A} and Lemma~\ref{lem-JB} that \begin{align*} |{\mathcal B}(\xi,q)|&=|J_T(x)|^{-1}|dT(x){\mathcal A}(x,dT^*(x)q)| \simeq |J_T(x)|^{-1}e^{-\kappa x_n}|{\mathcal A}(x,dT^*(x)q)| \\ &\lesssim e^{(n-1)\kappa x_n} |dT^*(x)q|^{p-1} \simeq e^{-\kappa(p-n)x_n}|q|^{p-1}= \widetilde{w}(\xi)|q|^{p-1}.\qedhere \end{align*} \end{proof} \begin{thm}\label{thm-monot} The mapping ${\mathcal B}:T(\itoverline{G})\times\mathbf{R}^n\to\mathbf{R}^n$, defined by \eqref{eq-def-B}, satisfies for a.e.\ $\xi\in T(\itoverline{G})$ and all $q_1,q_2\in\mathbf{R}^n$ the monotonicity condition \[ ({\mathcal B}(\xi,q_1)-{\mathcal B}(\xi,q_2))\cdot(q_1-q_2)>0 \quad\text{when }q_1\neq q_2. \] \end{thm} \begin{proof} Using \eqref{eq-def-B}, we have for all $q_1,q_2\in\mathbf{R}^n$, \begin{align*}\label{eq-monot} &({\mathcal B}(\xi,q_1)-{\mathcal B}(\xi,q_2))\cdot(q_1-q_2)\\ &\qquad=|J_T(x)|^{-1}((dT(x){\mathcal A}(x,dT^*(x)q_1)-dT(x){\mathcal A}(x,dT^*(x)q_2))\cdot(q_1-q_2))\\ &\qquad=|J_T(x)|^{-1}(({\mathcal A}(x,dT^*(x)q_1)-{\mathcal A}(x,dT^*(x)q_2))\cdot(dT^*(x)q_1-dT^*(x)q_2)). \end{align*} Since $|J_T(x)|^{-1}>0$, we have by~\eqref{eq-monot-A} that the last expression is always nonnegative. Moreover, it is zero if and only if $dT^*(x)q_1=dT^*(x)q_2$, implying that $q_1=q_2$ as $dT^*(x)$ is invertible. \end{proof} It is clear from Theorems~\ref{thm-B-ellipt-bdd} and~\ref{thm-monot}, together with the homogeneous condition~\eqref{eq-homog-A}, that the assumptions (3.4)--(3.7) in Heinonen--Kilpel\"ainen--Martio~\cite{HKM} are satisfied for ${\mathcal B}$ with the weight function $\widetilde{w}(\xi)=|\xi|^{p-n}$, $\xi\in\mathbf{R}^n\setminus\{0\}$. Moreover, ${\mathcal B}(\xi,q)$ is measurable in $\xi$ and continuous in $q$. The weight $\widetilde{w}(\xi)$ belongs to the Muckenhoupt $A_p$ class and the associated measure $d\mu(\xi)=\widetilde{w}(\xi)\,d\xi$ is doubling and supports a {$p\mspace{1mu}$}-Poincar\'e inequality on $\mathbf{R}^n$. Such weights are suitable for the study of partial differential equations and Sobolev spaces, see \cite[Chapters~15 and~20]{HKM} for a detailed exposition. We follow \cite[Chapters~1 and~3]{HKM} giving the following definitions. \begin{defi} For an open set $\Omega\subset\mathbf{R}^n$, the weighted Sobolev space $H^{1,p}_0(\Omega,\widetilde{w})$ is the completion of $C_0^\infty(\Omega)$ with respect to the norm \[ \|u\|_{H^{1,p}(\Omega,\widetilde{w})}:=\biggl(\int_{\Omega} \bigl( |u(\xi)|^p +|\nabla u(\xi)|^p \bigr) \widetilde{w}(\xi)\,d\xi \biggr)^{1/p}. \] Similarly, $H^{1,p}(\Omega,\widetilde{w})$ is the completion of the set \[ \{\phi\in C^{\infty}(\Omega): \|\phi\|_{H^{1,p}(\Omega,\widetilde{w})} <\infty\} \] in the $H^{1,p}(\Omega,\widetilde{w})$-norm. \end{defi} If the weight $\widetilde{w}\equiv1$, then the symbol $\widetilde{w}$ is dropped and in this case we have the usual Sobolev space $W^{1,p}(\Omega)$. \begin{defi} A function $u\inH^{1,p}\loc(\Omega,\widetilde{w})$ in an open set $\Omega\subset\mathbf{R}^n$ is said to be a \emph{weak solution} of the equation $\Div{\mathcal B}(\xi,\nabla u)=0$ if for all functions $\phi\in C_0^\infty(\Omega)$, the following integral identity holds \begin{equation} \label{int-B} \int_{\Omega}{\mathcal B}(\xi,\nabla u)\cdot\nabla\phi\,d\xi=0. \end{equation} \end{defi} To use the tools developed in Heinonen--Kilpel\"ainen--Martio~\cite{HKM} for Dirichlet problems, the part of the boundary, $T(\bdry G\setminus F)$, where the zero conormal derivative is prescribed, will be removed. This will be done by a reflection in the hyperplane \[ \{\xi\in\mathbf{R}^n:\xi_n=0\}. \] By a reflection, we mean the mapping $P:\mathbf{R}^n\to\mathbf{R}^n$ defined by \[ P\xi=P(\xi',\xi_n)=(\xi',-\xi_n). \] Let $D$ be the open set consisting of $T(G\setminus F)$ together with $PT(G\setminus F)$ and $T(\bdry G\setminus F)$, i.e. \[ D=B(0,1)\setminus \widetilde{F}, \quad\text{where } \widetilde{F}=T(F)\cup PT(F)\cup\{0\}. \] The point at infinity in $G$ corresponds to the origin $\xi=0$ in $B(0,1)$. Note that $\widetilde{F}$ is closed and that the base $B'\times\{0\}$ of $G$ is mapped onto the upper unit half-sphere $\{\xi\in\bdry B(0,1):\xi_n>0\}$. By assumption, the base $B'\times\{0\}\subset F$ and so the whole boundary $\bdry D\subset\widetilde{F}$ carries the Dirichlet condition. Extend ${\mathcal B}(\xi,q)$ from $T(\itoverline{G})$ to the reflected half-ball $PT(\itoverline{G})$ by \begin{equation} \label{eq-TG--PTG} {\mathcal B}(\xi,q)= \begin{cases} P{\mathcal B}(P\xi,Pq) & \text{if }\xi_n<0,\\ 0 & \text{if } \xi=0.\end{cases} \end{equation} The standard ellipticity and monotonicity assumptions for ${\mathcal B}$ still hold after the extension from $T(\itoverline{G})$ to $PT(\itoverline{G})$. With this reflection, we will now be able to eliminate the Neumann boundary data on $T(\bdry G\setminus F)$ so that only the Dirichlet data on $\bdry D$ remain. In Theorem~\ref{thm-G-TG}, we will show that $u\inW^{1,p}\loc(\itoverline{G}\setminus F)$ is a weak solution of the equation \eqref{eq-divA} in $G\setminus F$ with zero conormal derivative on $\bdry G\setminus F$ if and only if the symmetric reflection of $u\circ T^{-1}$ is a weak solution of \eqref{eq-div-B} in $D$. We shall use the function spaces identified in Bj\"orn--Mwasa~\cite{BM}. \begin{lem} \label{lem-intG-T} {\rm (\cite[Lemma~4.6]{BM})} Assume that $u\in L^1_{\rm loc}(U)$ with the distributional gradient $\nabla u \in L^1_{\rm loc}(U)$ for some open set $U\subset B'(0,R)\times\mathbf{R}$ and let $\tilde{u}=u\circ T^{-1}$. Then for any measurable set $A\subset U$, \begin{align*} \int_{A}|\nabla u|^p\,dx &\simeq \int_{T(A)}|\nabla \tilde{u}|^p \widetilde{w} \,d\xi, \\ \int_{A}|u|^p e^{-p\kappa x_n}\,dx &\simeq \int_{T(A)}|\tilde{u}|^p \widetilde{w} \,d\xi, \nonumber \end{align*} with comparison constants depending on $R$ but independent of $A$ and $u$. \end{lem} \begin{prop} \label{prop-Wploc-Hploc} Let $u\in W^{1,p}\loc(\itoverline{G}\setminus F)$. Then the function \begin{equation} \label{eq-def--ut} \tilde{u}(\xi',\xi_n)= \begin{cases} (u\circ T^{-1})(\xi',\xi_n) &\text{if } \xi\in T(\itoverline{G}\setminus F),\\ (u\circ T^{-1})(\xi',-\xi_n) &\text{if } \xi\in PT(G\setminus F), \end{cases} \end{equation} belongs to $H^{1,p}\loc(D,\widetilde{w})$. Conversely, if $\tilde{v}\inH^{1,p}\loc(D,\widetilde{w})$, then $\tilde{v}\circ T\inW^{1,p}\loc(\itoverline{G}\setminus F)$. \end{prop} \begin{proof} By the definition of $W^{1,p}\loc(\itoverline{G}\setminus F)$, we can assume that $u\inW^{1,p}\loc(\mathbf{R}^n\setminus F)$. Then $u\inW^{1,p}(U)$ for every $U\Subset\mathbf{R}^n\setminus F$. To show that $\tilde{u}\inH^{1,p}_{\rm loc}(D,\widetilde{w})$, let $B\Subset D$ be a ball. Assume without loss of generality that $B$ is centred in $T(\itoverline{G}\setminus F)$ and set $U:=T^{-1}(B)$. Choose a sequence $u_j\in C^\infty(\mathbf{R}^n\setminus F)$ such that $u_j\to u$ in $W^{1,p}(U)$. In particular, $u_j$ are Lipschitz on $U$. Define $\tilde{u}_j:=u_j\circ T^{-1}$ restricted to $B\cap T(\itoverline{G})$. By Lemma~\ref{lem-JB}, the functions $\tilde{u}_j$ are Lipschitz. Their extensions across the hyperplane $\xi_n=0$ to the whole $B$, by the reflection $\tilde{u}_j(\xi)=\tilde{u}_j(P\xi)$, are still Lipschitz. Lemma~\ref{lem-intG-T} implies that $\tilde{u}$ can be approximated in the $H^{1,p}(B,\widetilde{w})$-norm by these Lipschitz extensions, that is \[ \|\tilde{u}_j-\tilde{u}\|_{H^{1,p}(B,\widetilde{w})}\lesssim \|u_j-u\|_{W^{1,p}(U)}\to0\quad \text{as }j\to\infty. \] Hence, $\tilde{u}\inH^{1,p}(B, \widetilde{w})$. Since $B$ was arbitrary, we have that $\tilde{u}\inH^{1,p}\loc(D,\widetilde{w})$. Conversely, let $V\Subset\mathbf{R}^n\setminus F$. Then $T(V)\Subset D$ and hence $\tilde{v}\inH^{1,p}(T(V),\widetilde{w})$. By Lemma~\ref{lem-intG-T} and the fact that $e^{-p\kappa x_n }\simeq1$ on $V$, we have that $\tilde{v}\circ T$ belongs to $W^{1,p}(V)$. Since $V$ was arbitrary, we get that $\tilde{v}\circ T\inW^{1,p}\loc(\itoverline{G}\setminus F)$. \end{proof} \begin{thm} \label{thm-G-TG} Let $u\inW^{1,p}\loc(\itoverline{G}\setminus F)$ be a weak solution of the equation \begin{equation} \label{eq-DivA-G-F} \Div{\mathcal A}(x,\nabla u)=0 \quad \text{in $G\setminus F$} \end{equation} with zero conormal derivative on $\bdry G\setminus F$, that is, the integral identity \eqref{eq-weak-sol-divA} holds for all $\phi\in C_0^\infty(\mathbf{R}^n\setminus F)$. Let $\tilde{u}$ be as in \eqref{eq-def--ut}. Then $\tilde{u}\inH^{1,p}\loc(D,\widetilde{w})$ is a weak solution of the equation \begin{equation} \label{eq-DivB} \Div{\mathcal B}(\xi,\nabla \tilde{u})=0\quad\text{in }D. \end{equation} Conversely, if $\bar{u}\inH^{1,p}\loc(D,\widetilde{w})$ is a weak solution of~\eqref{eq-DivB} such that $\bar{u}=\bar{u}\circ P$, then $\bar{u}\circ T\inW^{1,p}\loc(\itoverline{G}\setminus F)$, with $\bar{u}$ restricted to $T(\itoverline{G}\setminus F)$, is a weak solution of the equation~\eqref{eq-DivA-G-F} with zero conormal derivative on $\bdry G\setminus F$. \end{thm} \begin{proof} The fact that $\tilde{u}\inH^{1,p}\loc(D,\widetilde{w})$ follows from Proposition~\ref{prop-Wploc-Hploc}. To prove the first implication, let ${\itoverline{\phi}}\in C_0^\infty(D)$ be an arbitrary test function. Clearly, ${\itoverline{\phi}}\circ T|_{\itoverline{G}\setminus F}$ is a restriction of a function from $C_0^\infty(\mathbf{R}^n\setminus F)$. In Lemma~\ref{lem-int-id-Ball}, replace $v,\tilde{v}$ and $A$ with ${\itoverline{\phi}}\circ T, {\itoverline{\phi}}$ and $G\setminus F$, respectively. Lemma~\ref{lem-int-id-Ball} and the integral identity \eqref{eq-weak-sol-divA} then give \begin{equation} \label{eq-int-TG=G=0} \int_{T(G\setminus F)} {\mathcal B}(\xi,\nabla\tilde{u})\cdot\nabla {\itoverline{\phi}} \,d\xi =\int_{G\setminus F}{\mathcal A}(x,\nabla u)\cdot\nabla({\itoverline{\phi}}\circ T)\,dx= 0. \end{equation} Now the change of variables $\zeta=P\xi$, together with \eqref{eq-TG--PTG} and the fact that $\tilde{u}=\tilde{u}\circ P$, yields \begin{equation} \label{eq-int-PTG=TG} \int_{PT(G\setminus F)} {\mathcal B}(\xi,\nabla\tilde{u})\cdot\nabla{\itoverline{\phi}} \,d\xi = \int_{T(G\setminus F)} {\mathcal B}(\xi,\nabla \tilde{u})\cdot\nabla ({\itoverline{\phi}}\circ P) \,d\xi, \end{equation} cf.\ \cite[Lemma~6.1]{BM}. Since ${\itoverline{\phi}}\circ P \in C_0^\infty(D)$, we see as in \eqref{eq-int-TG=G=0} that the last integral is zero. Adding the left-hand sides of \eqref{eq-int-TG=G=0} and \eqref{eq-int-PTG=TG} shows that $\tilde{u}$ is a weak solution of \eqref{eq-DivB}. Conversely, first we recall from \cite[Lemma~3.11]{HKM} that if $\bar{u}$ is a weak solution of \eqref{eq-DivB}, then the integral identity \eqref{int-B} holds for all test functions in $H^{1,p}_0(D,\widetilde{w})$ with compact support in $D$. Let $\phi\in C_0^\infty(\mathbf{R}^n\setminus F)$ be an arbitrary test function. Define \begin{equation*} {\widetilde{\phi}}(\xi',\xi_n):= \begin{cases} (\phi\circ T^{-1})(\xi',\xi_n) &\text{if } \xi\in T(\itoverline{G}),\\ (\phi\circ T^{-1})(\xi',-\xi_n) &\text{if } \xi\in PT(G),\\ 0 &\text{otherwise.} \end{cases} \end{equation*} Note that ${\widetilde{\phi}}={\widetilde{\phi}}\circ P$ and that ${\widetilde{\phi}}$ has compact support in $D$. Proposition~\ref{prop-Wploc-Hploc} therefore implies that ${\widetilde{\phi}}\inH^{1,p}_0(D,\widetilde{w})$. Since $\bar{u}=\bar{u}\circ P$, the integral identity~\eqref{int-B}, tested with ${\widetilde{\phi}}$, gives \begin{equation*} \int_{T(G\setminus F)} {\mathcal B}(\xi,\nabla\bar{u})\cdot\nabla {\widetilde{\phi}} \,d\xi +\int_{PT(G\setminus F)} {\mathcal B}(\xi,\nabla\bar{u})\cdot\nabla {\widetilde{\phi}} \,d\xi =\int_D{\mathcal B}(\xi,\nabla\bar{u})\cdot\nabla{\widetilde{\phi}}\,d\xi=0. \end{equation*} Observe that the integrals on the left-hand side are the same as in \eqref{eq-int-PTG=TG} with $\tilde{u},{\itoverline{\phi}}$ replaced by $\bar{u},{\widetilde{\phi}}$ and are thus equal. It follows that \[ \int_{T(G\setminus F)} {\mathcal B}(\xi,\nabla\bar{u})\cdot\nabla {\widetilde{\phi}} \,d\xi=0. \] Replacing $u,v,\tilde{v}$ and $A$ in Lemma~\ref{lem-int-id-Ball} by $\bar{u}\circ T,\phi,{\widetilde{\phi}}$ and $G\setminus F$, respectively, we then get \[ \int_{G\setminus F} {\mathcal A}(x,\nabla(\bar{u}\circ T))\cdot\nabla \phi \,dx =\int_{T(G\setminus F)} {\mathcal B}(\xi,\nabla\bar{u})\cdot\nabla {\widetilde{\phi}} \,d\xi=0. \] Since $\phi$ was chosen arbitrarily, we conclude that $\bar{u}\circ T$ is a weak solution of \eqref{eq-DivA-G-F} with zero conormal derivative, as in Definition~\ref{defi-weak-divA}. Lastly, Proposition~\ref{prop-Wploc-Hploc} shows that $\bar{u}\circ T\inW^{1,p}\loc(\itoverline{G}\setminus F)$. \end{proof} \begin{remark} \label{rem-cont-sol} The weak solution $\tilde{u}$ can be modified on a set of measure zero, so that it becomes H\"older continuous in $D$, see Heinonen--Kilpel\"ainen--Martio~\cite[Theorems~3.70 and~6.6]{HKM}. Hence, for the corresponding continuous representative of $u$, the limit \[ \lim_{G\setminus F\in x\to x_0}u(x) \] exists and is finite for every $x_0$ on the Neumann boundary $\bdry G\setminus F$. Moreover, $u$ is H\"older continuous at $x_0$, by Lemma~\ref{lem-JB}. \end{remark} \section{Existence and uniqueness of the solutions} \label{sect-existence} In this section, we shall prove the existence and uniqueness of weak solutions to the equation $\Div{\mathcal A}(x,\nabla u)=0$ in $G\setminus F$ with zero conormal derivative on $\bdry G\setminus F$ and continuous Dirichlet data. We shall also show that the solution attains its continuous Dirichlet data except possibly on a set of Sobolev $C_p$-capacity zero. Recall that $F$ is a closed subset of $\itoverline{G}$, which contains the base $B'\times\{0\}$, and that the Dirichlet boundary data $f$ are prescribed on $F_0:=F\cap\bdry(G\setminus F)$. \begin{defi} Let $K\subset\mathbf{R}^n$ be a compact set. The Sobolev $(p,\widetilde{w})$-capacity of $K$ is \begin{equation*} C_{p,\widetilde{w}}(K)=\inf_v\int_{\mathbf{R}^n}(|v|^p+|\nabla v|^p)\widetilde{w}\,dx, \end{equation*} where the infimum is taken over all $v\in C_0^\infty(\mathbf{R}^n)$ (or equivalently, all continuous $v\inH^{1,p}_0(\mathbf{R}^n,\widetilde{w})$) such that $v\ge 1$ on $K$, see Heinonen--Kilpel\"ainen--Martio~\cite[Section~2.35 and~Lemma~2.36]{HKM}. \end{defi} The capacity $C_{p,\widetilde{w}}$ can be extended to general sets as a Choquet capacity, see \cite[Chapter~2]{HKM}. In particular, for all Borel sets $E\subset\mathbf{R}^n$, \begin{equation} \label{eq-Cp-choq} C_{p,\widetilde{w}}(E)=\sup\{C_{p,\widetilde{w}}(K):K\subset E\text{ compact}\}. \end{equation} We also say that a property holds \emph{$C_{p,\widetilde{w}}$-quasieverywhere} if the set where it fails has zero $C_{p,\widetilde{w}}$-capacity. If $\widetilde{w}\equiv1$, then we have the usual Sobolev $C_p$-capacity. The following lemma shows that $T$ preserves sets of zero capacity. \begin{lem} \label{lem-Cpw=Cp=0} Let $E\subset \itoverline{G}$. Then $C_p(E)=0$ if and only if $C_{p,\widetilde{w}}(T(E))=0$. \end{lem} \begin{proof} The fact that if $C_{p,\widetilde{w}}(T(E))=0$ then $C_p(E)=0$ follows from Lemma~6.6 in Bj\"orn--Mwasa~\cite{BM}. Conversely, assume that $C_p(E)=0$. Replacing $E$ by a Borel set $E_0\supset E$ with zero capacity, we can assume that $E$ is a Borel set. Let $K\subset T(E)$ be compact. Then $T^{-1}(K)\subset E$ is compact and hence $C_p(T^{-1}(K))=0$. For $\varepsilon>0$, choose $\phi\in C^\infty_0(\mathbf{R}^n)$ such that $\phi\ge 1$ on $T^{-1}(K)$ and $\|\phi\|_{W^{1,p}(\mathbf{R}^n)}<\varepsilon$. Multiplying $\phi$ by a suitable cut-off function, we can assume that $\phi(x)=0$ when $x_n\le-1$. Define \begin{equation*} {\widetilde{\phi}}(\xi',\xi_n):= \begin{cases} (\phi\circ T^{-1})(\xi',\xi_n) &\text{if } \xi\in T({\,\overline{\!B'}}\times\mathbf{R}),\\ (\phi\circ T^{-1})(\xi',-\xi_n) &\text{if } \xi\in PT(B'\times\mathbf{R}),\\ 0 &\text{if }\xi=0. \end{cases} \end{equation*} Then ${\widetilde{\phi}}$ is Lipschitz continuous, by Lemma~\ref{lem-JB}, belongs to $H^{1,p}_0(\mathbf{R}^n,\widetilde{w})$ and is such that ${\widetilde{\phi}}\ge1$ on $K$. Using Lemma~\ref{lem-intG-T} and the fact that $\phi(x)=0$ when $x_n\le-1$, we have \[ \|{\widetilde{\phi}}\|_{H^{1,p}(\mathbf{R}^n,\widetilde{w})} \simeq \|{\widetilde{\phi}}\|_{H^{1,p}(T(B'\times\mathbf{R}),\widetilde{w})} \lesssim \|\phi\|_{W^{1,p}(B'\times\mathbf{R})}\le\|\phi\|_{W^{1,p}(\mathbf{R}^n)}<\varepsilon, \] with comparison constants independent of $\phi$ and $\varepsilon$. Letting $\varepsilon\to 0$, gives that $C_{p,\widetilde{w}}(K)=0$ and hence \eqref{eq-Cp-choq} concludes the proof. \end{proof} The following existence and uniqueness theorem is the main result of this section. Note that there may also exist unbounded solutions. \begin{thm} \label{thm-uniq-sol} Assume that $F_0$ is unbounded and let $f\in C(F_0)$ be such that \[ f(\infty):=\lim_{F_0\ni x\to\infty}f(x) \quad \text{exists and is finite}. \] Then there exists a unique bounded continuous weak solution $u\inW^{1,p}\loc(\itoverline{G}\setminus F)$ of the mixed problem for the equation $\Div{\mathcal A}(x,\nabla u)=0$ in $G\setminus F$ with zero conormal derivative on $\bdry G\setminus F$ and such that \begin{equation} \label{eq-limu=f} \lim_{G\setminus F\ni x\to x_0}u(x)=f(x_0) \quad \text{for $C_{p}$-quasievery $x_0\in F_0$.} \end{equation} \end{thm} \begin{remark} \label{rem-bdd-F0} The proof below shows that the conclusion of Theorem~\ref{thm-uniq-sol} holds also when $F_0$ is bounded. Moreover, since the origin has $(p,\widetilde{w})$-capacity zero, the solution $u$ is then independent of the value $f(\infty)$ assigned to $\xi=0$, \end{remark} \begin{proof} Define \begin{equation} \label{eq-def--ft} \tilde{f}(\xi):= \begin{cases} (f\circ T^{-1})(\xi) &\text{if } \xi\in T(F_0),\\ (f\circ (PT)^{-1})(\xi) &\text{if } \xi\in PT(F_0\cap G),\\ f(\infty) &\text{if } \xi=0.\end{cases} \end{equation} Then $\tilde{f}\in C(\bdry D)$. By Bj\"orn--Bj\"orn--Mwasa~\cite[Theorem~3.12]{BBM}, there exists a unique bounded continuous weak solution $\bar{u}\inH^{1,p}_{\rm loc}(D,\widetilde{w})$ of the equation \eqref{eq-DivB} such that \begin{equation} \label{eq-limub=ft} \lim_{D\ni\xi\to\xi_0}\bar{u}(\xi)=\tilde{f}(\xi_0) \quad \text{for $C_{p,\widetilde{w}}$-quasievery $\xi_0\in \bdry D$,} \end{equation} i.e.\ for all $\xi_0\in \bdry D\setminus Z$ for some set $Z\subset\bdry D$ with $C_{p,\widetilde{w}}(Z)=0$. Note that \eqref{eq-TG--PTG} holds in $D$ and $\tilde{f}=\tilde{f}\circ P$. So \eqref{eq-limub=ft} gives \[ \lim_{D\ni\xi\to\xi_0}\bar{u}(P\xi)=\lim_{D\ni\xi\to P\xi_0}\bar{u}(\xi)=\tilde{f}(P\xi_0)=\tilde{f}(\xi_0) \] for all $\xi_0\in \bdry D\setminus P(Z)$. That is, $\bar{u}\circ P$ also satisfies~\eqref{eq-limub=ft} and $\bar{u}\circ P\inH^{1,p}\loc(D,\widetilde{w})$. Since $\phi\circ P\in C_0^\infty(D)$ if and only if $\phi\in C_0^\infty(D)$, the change of variables $\zeta=P\xi$ together with~\eqref{eq-TG--PTG} shows that the integral identity \eqref{int-B} holds for $\bar{u}\circ P$ as well. Thus $\bar{u}\circ P$ is also a bounded continuous weak solution of~\eqref{eq-DivB} in $D$, satisfying~\eqref{eq-limub=ft}. By the uniqueness in \cite[Theorem~3.12]{BBM}, we conclude that $\bar{u}=\bar{u}\circ P$. Define $u:=\bar{u}\circ T$, with $\bar{u}$ restricted to $T(\itoverline{G}\setminus F)$. Theorem~\ref{thm-G-TG} shows that $u$ is a continuous weak solution of $\Div{\mathcal A}(x,\nabla u)=0$ in $G\setminus F$ with zero conormal derivative, as in Definition~\ref{defi-weak-divA}. Since $\bar{u}$ satisfies \eqref{eq-limub=ft}, it then follows that $u$ satisfies \eqref{eq-limu=f} for every $x_0\in F_0\setminus Z_0$, where $Z_0:=T^{-1}(Z\cap T(\itoverline{G}))$ with $C_p(Z_0)=0$ by Lemma~\ref{lem-Cpw=Cp=0}. To prove the uniqueness, suppose that $v\inW^{1,p}\loc(\itoverline{G}\setminus F)$ is a bounded continuous weak solution of the equation $\Div{\mathcal A}(x,\nabla u)=0$ satisfying \eqref{eq-limu=f} for all $x_0\in F_0\setminus Z'_0$ with $C_p(Z'_0)=0$. Let $\tilde{v}$ be as in \eqref{eq-def--ut} with $u$ replaced by $v$. Then by Theorem~\ref{thm-G-TG}, $\tilde{v}$ is a continuous weak solution of~\eqref{eq-DivB}. Since $v$ satisfies \eqref{eq-limu=f}, it follows that $\tilde{v}$ satisfies \eqref{eq-limub=ft} for each $\xi_0\in\bdry D\setminus Z'$, where $Z':=T(Z'_0)\cup PT(Z'_0)\cup\{0\}$. Now we have that $C_{p,\widetilde{w}}(T(Z'_0))=0$ by Lemma~\ref{lem-Cpw=Cp=0}, and so $C_{p,\widetilde{w}}(PT(Z'_0))=0$, by reflection. The origin $0$ has zero $(p,\widetilde{w})$-capacity by \cite[Lemma~7.6]{BM}, and it follows by subadditivity that $C_{p,\widetilde{w}}(Z')=0$. By \cite[Theorem~3.12]{BBM}, the solution of \eqref{eq-DivB} satisfying~\eqref{eq-limub=ft} is unique, in other words $\tilde{v}=\bar{u}$ and so $v=u$. \end{proof} The following definition is adopted from Bj\"orn--Mwasa~\cite{BM}. \begin{defi} \label{def-L-space-ka} The space $L^{1,p}_{\kappa}(G\setminus F)$ consists of all measurable functions $v$ on $G\setminus F$ such that the norm \[ \|v\|_{L^{1,p}_\kappa(G\setminus F)} = \biggl( \int_{G\setminus F} \bigl( |v(x)|^p e^{-p\kappa x_n} +|\nabla v(x)|^p \bigr) \,dx \biggr)^{1/p} < \infty, \] where $\nabla v=(\partial_1v,\cdots,\partial_nv)$ is the distributional gradient of $v$. The space $L^{1,p}_{\kappa,0}(\itoverline{G}\setminus F)$ is the completion of $C_0^{\infty}(\mathbf{R}^n\setminus F)$ in the above $L^{1,p}_\kappa(G\setminus F)$-norm. \end{defi} Note that the space $L^{1,p}_\kappa(G\setminus F)$ is contained in $W^{1,p}\loc(\itoverline{G}\setminus F)$. The following result generalizes~\cite[Theorem~6.3]{BM} to elliptic divergence type equations. \begin{thm} \label{thm-ex-Sob} Let $f\in L^{1,p}_\kappa(G\setminus F)$. Then there exists a unique continuous weak solution $u\in L^{1,p}_\kappa(G\setminus F)$ of the equation $\Div{\mathcal A}(x,\nabla u)=0$ in $G\setminus F$ with zero conormal derivative on $\bdry G\setminus F$ and such that \(u-f\inL^{1,p}_{\kappa,0}(\itoverline{G}\setminus F)\). \end{thm} \begin{proof} Let $\tilde{f}$ be defined as in \eqref{eq-def--ut}, with $u$ replaced by $f$. Then $\tilde{f}\inH^{1,p}(D,\widetilde{w})$, by \cite[Proposition~5.3]{BM}. By \cite[Theorems~3.17 and~3.70]{HKM}, there exists a unique continuous weak solution $\tilde{u}\inH^{1,p}(D,\widetilde{w})$ of the degenerate equation~\eqref{eq-DivB} such that \(\tilde{u}-\tilde{f}\inH^{1,p}_0(D,\widetilde{w})\). Since ${\mathcal B}(\xi,Pq)=P{\mathcal B}(P\xi,q)$ by \eqref{eq-TG--PTG}, we infer from \cite[Corollary~6.2]{BM} (with ${\mathcal A}(\xi,q)$ in~\cite{BM} replaced by ${\mathcal B}(\xi,q)$) that $\tilde{u}=\tilde{u}\circ P$. By Theorem~\ref{thm-G-TG}, $u:=\tilde{u}\circ T$ (with $\tilde{u}$ restricted to $T(G\setminus F)$) is a weak solution of $\Div{\mathcal A}(x,\nabla u)=0$ in $G\setminus F$ with zero conormal derivative on $\bdry G\setminus F$. Moreover, $u\inL^{1,p}_\kappa(G\setminus F)$ by \cite[Proposition~5.3]{BM} and $u-f\inL^{1,p}_{\kappa,0}(\itoverline{G}\setminus F)$ by \cite[Proposition~5.5]{BM}. To prove the uniqueness, suppose that $v\inL^{1,p}_{\kappa}(G\setminus F)$ is a continuous weak solution of the equation $\Div{\mathcal A}(x,\nabla u)=0$ in $G\setminus F$ with zero conormal derivative on $\bdry G\setminus F$ and \(v-f\inL^{1,p}_{\kappa,0}(\itoverline{G}\setminus F)\). Let $\tilde{v}$ be as in \eqref{eq-def--ut}, with $u$ replaced by~$v$. Theorem~\ref{thm-G-TG} then implies that $\tilde{v}$ satisfies the equation~\eqref{eq-DivB}. Moreover, \cite[Proposition~5.5]{BM} shows that $\tilde{v}-\tilde{f}\inH^{1,p}_0(D, \widetilde{w})$. From the uniqueness of solutions to \eqref{eq-DivB} we thus get that $\tilde{v}=\tilde{u}$, and so $v=u$. \end{proof} \section{Boundary regularity at infinity} \label{sect-Wiener} We saw in Remark~\ref{rem-cont-sol} that weak solutions of the equation $\Div{\mathcal A}(x,\nabla u)=0$ with zero conormal derivative are continuous in $G\setminus F$ and at the Neumann boundary $\bdry G\setminus F$. Moreover, if the Dirichlet boundary data $f$ are continuous on $F_0$, then the solution is continuous at $F_0$, except possibly for a set of Sobolev $C_p$-capacity zero. We now study continuity at the point at infinity. We follow Bj\"orn--Mwasa~\cite[Section~8]{BM} giving the following definition. \begin{defi} \label{def-reg-infty} Assume that $F$ is unbounded. We say that the point at $\infty$ is \emph{regular} for the mixed problem~\eqref{mixed-bvp} for the equation $\Div{\mathcal A}(x,\nabla u)=0$ in $G\setminus F$ with zero conormal derivative on $\bdry G\setminus F$ if for all Dirichlet boundary data $f\in C(F_0)$ with a finite limit \begin{equation} \label{eq--f(infty)} \lim_{F_0\ni x\to\infty} f(x) =:f(\infty), \end{equation} the unique bounded continuous weak solution $u$ of~\eqref{mixed-bvp}, provided by Theorem~\ref{thm-uniq-sol}, satisfies \begin{equation} \label{eq-reg--infty} \lim_{G\setminus F\ni x\to \infty} u(x) =f(\infty). \end{equation} \end{defi} Remark~\ref{rem-bdd-F0} shows that the point at infinity is always irregular when $F_0$ is bounded. Note that due to the conormal derivative condition, the regularity at $\infty$ in Definition~\ref{def-reg-infty} differs from the usual notion of boundary regularity for the Dirichlet problem in unbounded domains, as in e.g.\ Heinonen--Kilpel\"ainen--Martio~\cite[Section~9.5]{HKM}. The following is our first step in characterizing the regularity of the point at infinity for the mixed problem~\eqref{mixed-bvp}. \begin{prop} \label{prop-reg-0-infty} The point at $\infty$ is regular for the mixed problem~\eqref{mixed-bvp} for the equation $\Div{\mathcal A}(x,\nabla u)=0$ in $G\setminus F$ if and only if the origin $0\in\partial D$ is regular with respect to the equation \begin{equation} \label{eq-divB-inD} \Div{\mathcal B}(\xi,\nabla\tilde{u}(\xi))=0 \quad \text{in } D, \end{equation} where ${\mathcal B}$ is as in \eqref{eq-def-B}. \end{prop} Before the proof of Proposition~\ref{prop-reg-0-infty}, we give the definition below, see \cite[Section~9.5]{HKM}. \begin{defi} A point $\xi_0\in\bdry D$ is regular for the equation~\eqref{eq-divB-inD} if \begin{equation*} \lim_{D\ni\xi\to\xi_0}\bar{u}(\xi)=\bar{f}(\xi_0)\quad\text{for all }\bar{f}\in C(\bdry D), \end{equation*} where $\bar{u}$ is the Perron solution of \eqref{eq-divB-inD} with the boundary data $\bar{f}$, as in \cite[Section~9.1]{HKM}. \end{defi} Note that $\bar{f}$, being continuous, is resolutive, i.e.\ the upper and the lower Perron solutions coincide and are equal to the Perron solution $\bar{u}$, see \cite[Theorem~9.25]{HKM}. Moreover, by Bj\"orn--Bj\"orn--Mwasa~\cite[Theorem~3.12]{BBM}, the Perron solution $\bar{u}$ is the only bounded continuous weak solution of~\eqref{eq-divB-inD} that attains the boundary values $\bar{f}$ $C_{p,\widetilde{w}}$-quasieverywhere on $\bdry D$ in the sense of \eqref{eq-limub=ft}. \begin{proof}[Proof of Proposition~\ref{prop-reg-0-infty}] Assume that $0\in\bdry D$ is a regular point with respect to \eqref{eq-divB-inD}. Let $f\in C(F_0)$ be such that the limit in \eqref{eq--f(infty)} exists and is finite. Let $u$ be the unique bounded continuous weak solution of $\Div{\mathcal A}(x,\nabla u)=0$ in $G\setminus F$ with zero conormal derivative, provided for $f$ by Theorem~\ref{thm-uniq-sol}. Define $\tilde{u}$ and $\tilde{f}$ as in \eqref{eq-def--ut} and \eqref{eq-def--ft}, respectively. Then by Theorem~\ref{thm-G-TG}$, \tilde{u}$ is a bounded continuous weak solution of $\Div{\mathcal B}(\xi,\nabla\tilde{u})=0$ in $D$ and attains the boundary values $\tilde{f}$ $C_{p,\widetilde{w}}$-quasieverywhere on $\bdry D$. Note that $\tilde{f}\in C(\bdry D)$. Thus, by \cite[Theorem~3.12]{BBM}, $\tilde{u}$ is the Perron solution of~\eqref{eq-divB-inD} with the boundary data $\tilde{f}$. Since $0\in\bdry D$ is regular, we have that \[ \lim_{G\setminus F\ni x\to \infty} u(x) =\lim_{D\ni\xi\to0}\tilde{u}(\xi)=\tilde{f}(0)=f(\infty). \] Thus, $u$ satisfies \eqref{eq-reg--infty} and so $\infty$ is regular for the mixed problem for the equation $\Div{\mathcal A}(x,\nabla u)=0$ in $G\setminus F$. Conversely, assume that $\infty$ is regular for the mixed problem~\eqref{mixed-bvp} and let $\bar{f}\in C(\bdry D)$. The function $\bar{f}$ is not necessarily symmetric, so we consider \[ \bar{f}_1=\min\{\bar{f},\bar{f}\circ P\} \quad \text{and} \quad \bar{f}_2=\max\{\bar{f},\bar{f}\circ P\}, \] which are symmetric, i.e.\ $\bar{f}_j=\bar{f}_j\circ P$, $j=1,2$. Let $\bar{u}$ and $\bar{u}_j$ be the Perron solutions of \eqref{eq-divB-inD} with boundary data $\bar{f}$ and $\bar{f}_j$, respectively. Define $u_j:=\bar{u}_j\circ T$, $j=1,2$, with $\bar{u}_j$ restricted to $T(\itoverline{G}\setminus F)$. Then by Theorem~\ref{thm-G-TG}, $u_j$ are bounded continuous weak solutions of the mixed problem~\eqref{mixed-bvp} satisfying \eqref{eq-limu=f} with boundary data $f_j:=\bar{f}_j\circ T|_{F_0}$. Note that $f_j$ are continuous on $F_0$ and that the limits \[ \lim_{F_0\ni x\to\infty}f_j(x)=f_j(\infty) \quad \text{exist and are finite}. \] Since $\infty$ is regular for~\eqref{mixed-bvp}, the solutions $u_j$ satisfy \[ \lim_{G\setminus F\ni x\to\infty}u_j(x)=f_j(\infty) =\bar{f}(0). \] It now follows that \[ \lim_{D\ni \xi\to0}\bar{u}_j(\xi)=\bar{f}(0). \] But $\bar{f}_1\le\bar{f}\le\bar{f}_2$ and thus $\bar{u}_1\le\bar{u}\le\bar{u}_2$ by the definition of Perron solutions. We conclude that \[ \lim_{D\ni \xi\to0}\bar{u}(\xi)=\bar{f}(0), \] and so $0\in\bdry D$ is regular for the equation \eqref{eq-divB-inD}. \end{proof} Regular points with respect to $\Div{\mathcal B}(\xi,\nabla\tilde{u}(\xi))=0$ in $D$ are characterized by the \emph{Wiener criterion}, see Heinonen--Kilpel\"ainen--Martio~\cite[Theorem~21.30\,(i)$\ensuremath{\mathchoice{\quad \Longleftrightarrow \quad}{\Leftrightarrow}$(v)]{HKM} and Mikkonen~\cite{M}. Note that the definitions for regularity of a point $\xi\in\bdry D$ with respect to \eqref{eq-divB-inD} in terms of both Sobolev and Perron solutions are equivalent, see \cite[Theorem~9.20]{HKM}. Recall that $D=B_1\setminus\widetilde{F}$, where $\widetilde{F}=T(F)\cup PT(F)\cup\{0\}$. Note that the ball $B_r:=\{\xi\in\mathbf{R}^n:|\xi|<r\}$ in $B_1$ corresponds to the truncated cylinder \begin{equation*} G_t:=\{x\in\itoverline{G}:x_n>t\}={\,\overline{\!B'}}\times(t,\infty)\quad\text{with } t=-\frac{1}{\kappa}\log r\ge0 \end{equation*} in $\itoverline{G}$ and that $G_t$ contains the lateral boundary but not its base $B'\times\{t\}$. With the above notation, we see that $G_{2t}$ and $G_{t-1}$ correspond to $B_{r^2}$ and $B_{2r}$, respectively. We follow \cite[Section~7]{BM} giving the following definition. \begin{defi} Let $K\subset G_{t-1}$ be a compact set, where $t\ge1$. The \emph{{\rm(}Neumann\/{\rm)} variational {$p\mspace{1mu}$}-capacity} of $K$ with respect to $G_{t-1}$ is \begin{equation*} \cp_{p,G_{t-1}}(K)= \inf_v \int_{G_{t-1}}|\nabla v|^p\,dx, \end{equation*} where the infimum is taken over all functions $v\in C_0^\infty(\mathbf{R}^n)$ satisfying $v\ge1$ on $K$ and $v=0$ on $\itoverline{G}\setminus G_{t-1}$. \end{defi} Just as $C_{p,\widetilde{w}}$, the capacity $\cp_{p,G_{t-1}}$ is also a Choquet capacity. This was proved in \cite[Section~7]{BM}, even though we only need $\cp_{p,G_{t-1}}$ for compact sets here. In \cite[Section~8]{BM}, the Wiener criterion from \cite[Section~6.16]{HKM} is rewritten in terms of $\cp_{p,G_{t-1}}$ and we thus get the following criterion for the boundary regularity at $\infty$ for the mixed boundary value problem \eqref{mixed-bvp}. \begin{thm} \label{thm-Breg-infty} The point at $\infty$ is regular for the mixed boundary value problem \eqref{mixed-bvp} in $G\setminus F$ if and only if the following condition holds \begin{equation} \label{eq-B-infty} \int_1^\infty\cp_{p,G_{t-1}}(F\cap(\itoverline{G}_t\setminus G_{2t}))^{1/(p-1)}\,dt=\infty. \end{equation} \end{thm} The proof follows from \cite[Section~8]{BM}, with Proposition~\ref{prop-reg-0-infty} playing the role of Lemma~8.2 in \cite{BM}. See Examples~8.7 and~8.8 in \cite{BM} for concrete sets satisfying or failing the Wiener condition~\eqref{eq-B-infty}. \section{General behaviour of the solutions at \texorpdfstring{$\infty$}{oo}} \label{Sect-remov} Our aim in this section is to show a Phragm\'en--Lindel\"of type trichotomy for the solutions of the equation $\Div{\mathcal A}(x,\nabla u)=0$ in $G$ with zero conormal derivative $C_p$-quasieverywhere on $\bdry G\cap G_t$. We start by showing that sets of Sobolev $C_p$-capacity zero are removable for the solutions. Recall that $F$ is a closed subset of $\itoverline{G}$. For compact subsets of $G$, the following removability result is just \cite[Theorem~7.36]{HKM}. Using the transformation $T$, we can remove also parts of the lateral Dirichlet boundary and change them into the Neumann boundary. This will make it possible to study the behaviour of the solutions at $\infty$. Recall that $G_t:=\{x\in\itoverline{G}:x_n>t\}$ is the truncated cylinder containing its lateral boundary but not its base $B'\times\{t\}$. \begin{lem} \label{lem-remov} Assume that for some $t\ge0$, the set $E:=F\cap G_t$ satisfies $C_p(E)=0$. Let $u\inW^{1,p}\loc(\itoverline{G}\setminus F)$ be a continuous weak solution of $\Div{\mathcal A}(x,\nabla u)=0$ in $G\setminus F$ with zero conormal derivative on $\bdry G\setminus F$. Assume that $u$ is bounded in the set $(G_t\setminus G_\tau) \setminus F$ for every $\tau>t$. Then $u$ can be extended to $E$ as a continuous weak solution in $(G\setminus F)\cup E$ with zero conormal derivative on $\bdry G\setminus (F\setminus G_t)$. \end{lem} \begin{proof} Set $\widetilde{E}:=T(E)\cup PT(E)$. By Lemma~\ref{lem-Cpw=Cp=0}, the set $T(E)$ has Sobolev $(p,\widetilde{w})$-capacity zero. By reflection, we have $C_{p,\widetilde{w}}(\widetilde{E})=0$. As in~\eqref{eq-def--ut}, define \begin{equation} \label{eq-def-ut} \tilde{u}(\xi',\xi_n)= \begin{cases} (u\circ T^{-1})(\xi',\xi_n) &\text{if } \xi\in T(\itoverline{G}\setminus F),\\ (u\circ T^{-1})(\xi',-\xi_n) &\text{if } \xi\in PT(G\setminus F). \end{cases} \end{equation} Then by Theorem~\ref{thm-G-TG}, $\tilde{u}$ is a continuous weak solution of $\Div{\mathcal B}(\xi, \nabla\tilde{u})=0$ in $D$, which is bounded in $D\cap (B_r\setminus B_\rho)$ for every $\rho>0$, where $r=e^{-\kappa t}$. Note that $\widetilde{E}\setminus B_\rho$ is relatively closed in $B_r\setminus B_\rho$. Since $C_{p,\widetilde{w}}(\widetilde{E})=0$, we have by Heinonen--Kilpel\"ainen--Martio~\cite[Theorem~7.36]{HKM} that $\tilde{u}$ can be extended to $\widetilde{E}$ so that it is a continuous weak solution in $B_r\setminus B_\rho$ for every $\rho>0$, and thus also in $D\cup (B_r\setminus \{0\})$. The desired extension of $u$ is then given by $\tilde{u}\circ T$. \end{proof} Removability and behaviour of the solutions at $\infty$ are addressed in the rest of the section. The following two lemmas provide suitable lower and upper bounds for the solutions. \begin{lem} \label{lem-max-Gt} Assume that for some $t\ge0$, the set $E:=F\cap G_t$ is empty. Let $u\inW^{1,p}\loc(\itoverline{G}\setminus F)$ be a weak continuous solution of $\Div{\mathcal A}(x,\nabla u)=0$ in $G\setminus F$ with zero conormal derivative on $\bdry G\setminus F$. Then $u$ is bounded in the set $G_{t'}\setminus G_\tau$ for every $\tau>t'>t$. If, moreover, $u(x)\le0$ when $x_n=t$, then either $u\le0$ in $G_t$ or there exist $A>0$ and $\tau_0>t$ such that for all $\tau\ge \tau_0$, \begin{equation*} \max_{x_n=\tau}u(x)\ge A(\tau -t). \end{equation*} \end{lem} \begin{proof} Define $\tilde{u}$ as in \eqref{eq-def-ut}. Then by Theorem~\ref{thm-G-TG}, $\tilde{u}\inH^{1,p}\loc(D,\widetilde{w})$ is a continuous weak solution of $\Div{\mathcal B}(\xi,\nabla\tilde{u}(\xi))=0$ in $D$. In particular, since $E$ is empty, $\tilde{u}\inH^{1,p}\loc(B_r\setminus\{0\},\widetilde{w})$ is a continuous weak solution in $B_r\setminus\{0\}$, where $r=e^{-\kappa t}$. This immediately implies the boundedness of $u$ in $G_{t'}\setminus G_\tau$ for every $\tau>t'>t$. Next, if $u(x)\le0$ when $x_n=t$, then $\tilde{u}(\xi_0)\le 0$ for all $\xi_0\in\bdry B_r$. Hence, by \cite[Theorem~7.40]{HKM}, we have that either $\tilde{u}\le0$ in $B_r\setminus\{0\}$ or \begin{equation} \label{Ineq-cap-Br} \liminf_{\rho\to0}(\cp_{p,\widetilde{w}}(B_{\rho},B_r))^{1/(p-1)}\max_{\bdry B_{\rho}}\tilde{u}>0, \end{equation} where $\cp_{p,\widetilde{w}}$ is the variational capacity associated with the weight $\widetilde{w}$, as in \cite[Chapter~2]{HKM}. Inequality \eqref{Ineq-cap-Br} reveals that there exist constants $a>0$ and $r_0>0$ such that for all $0<\rho\le r_0$, we have \begin{equation} \label{Ineq-cap-m} \max_{\bdry B_{\rho}}\tilde{u}\ge a(\cp_{p,\widetilde{w}}(B_{\rho},B_r))^{1/(1-p)}. \end{equation} By Bj\"orn--Mwasa~\cite[Lemma~7.6]{BM}, we have for all $\rho<r$, \[ (\cp_{p,\widetilde{w}}(B_{\rho},B_r))^{1/(1-p)} \gtrsim \log\frac{r}{\rho} =\kappa(\tau-t),\quad\text{where }\tau=-\frac{1}{\kappa}\log\rho>t \] and the constant in $\gtrsim$ depends only on $n$ and $p$. Substituting in \eqref{Ineq-cap-m} and using the definition~\eqref{eq-def-ut} of $\tilde{u}$, concludes the proof. \end{proof} \begin{lem} \label{lem-est-with-pot} Assume that for some $t\ge0$, the set $E:=F\cap G_t$ is empty. Let $u\inW^{1,p}\loc(\itoverline{G}\setminus F)$ be a weak continuous solution of $\Div{\mathcal A}(x,\nabla u)=0$ in $G\setminus F$ with zero conormal derivative on $\bdry G\setminus F$. Assume that $u\ge 0$ in $G_t$. Then there exists $A_0\ge0$ such that for all $\tau\ge t+\tfrac{1}{\kappa}\log2$, \[ \max_{x_n=\tau}u(x) \le A_0(\tau-t). \] \end{lem} \begin{proof} Define $\tilde{u}$ as in~\eqref{eq-def-ut}. As in the proof of Lemma~\ref{lem-max-Gt}, $\tilde{u}$ is a continuous weak solution of $\Div{\mathcal B}(\xi,\nabla\tilde{u}(\xi))=0$ in $B_r\setminus\{0\}$, where $r=e^{-\kappa t}$. For $0<\rho<\frac{1}{2} r$, let $\tilde{v}$ be the potential of $\itoverline{B}_\rho$ in $B_r$, i.e.\ the continuous weak solution of $\Div{\mathcal B}(\xi,\nabla\tilde{v})=0$ in $B_r\setminus \itoverline{B}_\rho$ with boundary values $1$ on $\itoverline{B}_\rho$ and $0$ on $\bdry B_r$. Then by Heinonen--Kilpel\"ainen--Martio~\cite[Lemma~6.21]{HKM}, there exists $c>0$ such that \[ \tilde{v}(\xi)\ge c\biggl(\frac{\cp_{p,\widetilde{w}}(B_\rho,B_r)}{\cp_{p,\widetilde{w}}(B_{r/2},B_r)}\biggr)^{1/(p-1)} \quad\text{for all }\xi\in \itoverline{B}_{r/2}. \] From \cite[Lemma~7.6]{BM} and \cite[Theorem~2.18]{HKM}, we thus have for all $\xi\in \itoverline{B}_{r/2}$ that \begin{equation} \label{eq-vt-potent} \tilde{v}(\xi)\gtrsim \cp_{p,\widetilde{w}}(B_\rho,B_r)^{1/(p-1)}\gtrsim \Bigl(\log \frac{r}{\rho}\Bigr)^{-1}=\frac{1}{\kappa(\tau-t)}, \end{equation} where $\tau=-\frac{1}{\kappa}\log\rho>t$ and the constants in $\gtrsim$ depend only on $c$, $n$ and $p$. Let $m_\rho$ be the minimum of $\tilde{u}$ on the sphere $\bdry B_\rho$. Using the boundary values of $\tilde{v}$ and $\tilde{u}$ on both $\bdry B_\rho$ and $\bdry B_r$, it follows from the comparison principle \cite[Lemma~3.18]{HKM} and from \eqref{eq-vt-potent} that \begin{equation*} \tilde{u}\ge m_\rho\tilde{v} \gtrsim \frac{m_\rho}{\tau-t} \quad\text{in } \itoverline{B}_{r/2}\setminus\itoverline{B}_\rho. \end{equation*} The Harnack inequality for $\tilde{u}$ on the sphere $\bdry B_\rho$ then gives for any fixed $\xi_0\in\bdry B_{r/2}$ that \[ \max_{x_n=\tau} u(x) = \max_{\bdry B_\rho}\tilde{u}(x) \lesssim m_\rho \lesssim \tilde{u}(\xi_0)(\tau-t), \] where the constants in $\lesssim$ depend only on ${\mathcal A}$, $\kappa$, $n$ and $p$. \end{proof} We are now ready to conclude the paper with the following trichotomy for the solutions of the mixed problem at $\infty$, when $F$ is negligible near $\infty$. \begin{thm} \label{thm-cases} Assume that for some $t\ge0$, the set $E:=F\cap G_t$ is such that $C_p(E)=0$. Let $u\inW^{1,p}\loc(\itoverline{G}\setminus F)$ be a weak continuous solution of $\Div{\mathcal A}(x,\nabla u)=0$ in $G\setminus F$ with zero conormal derivative on $\bdry G\setminus F$. Assume that $u$ is bounded in the set $(G_t\setminus G_\tau) \setminus F$ for every $\tau>t$. Then there exist constants $\tau_0>t$, $M$, $M_0$ and $A_0\ge A\ge0$, such that exactly one of the following holds. \begin{enumerate} \renewcommand{\theenumi}{\textup{(\roman{enumi})}}% \renewcommand{\labelenumi}{\theenumi} \item \label{it-i} The solution $u$ is bounded in $G_{\tau_0}$ and the limit\/ \[ \lim_{G\setminus F\ni x\to\infty} u(x)=:u(\infty) \] exists and is finite. Moreover, for some $\alpha\in(0,1]$ and all $x\in G_{\tau_0}$, \begin{equation} \label{eq-u-holder} |u(x)-u(\infty)|\lesssim e^{-\kappa\alpha x_n}. \end{equation} \item \label{it-ii} The solution $u$ tends roughly linearly either to $\infty$ or to $-\infty$, i.e.\ either \begin{equation} \label{eq-u-lin-to-infty} M+A\tau \le u(x',\tau) \le M_0+A_0\tau \quad \text{for all $x'\in B'$ and $\tau\ge\tau_0$,} \end{equation} or \eqref{eq-u-lin-to-infty} holds for $-u$ in place of $u$. \item \label{it-iv} The solution changes sign and approaches both $\infty$ and $-\infty$. More precisely, \[ \displaystyle\max_{x_n=\tau}u(x)\ge M+A\tau \text{ and } \displaystyle\min_{x_n=\tau}u(x)\le M_0-A\tau \quad \text{for all $\tau\ge \tau_0$.} \] \end{enumerate} \end{thm} \begin{proof} By Lemma~\ref{lem-remov}, we can assume that $E$ is empty. Define $\tilde{u}$ as in~\eqref{eq-def-ut}. Then by Theorem~\ref{thm-G-TG}, the function $\tilde{u}$ is a continuous weak solution of $\Div{\mathcal B}(\xi, \nabla\tilde{u})=0$ in $B_r\setminus\{0\}$, where $r=e^{-\kappa t}$. Let $r'\le\tfrac12r$. By the continuity of the solution $\tilde{u}$ in $B_r\setminus\{0\}$, there exist constants $m',M'$ such that $m'\le \tilde{u}(\xi)\le M'$ for all $\xi\in\bdry B_{r'}$. Hence, it follows from the definition of $\tilde{u}$ that $m'\le u(x)\le M'$ when $x_n=t':=-\frac{1}{\kappa}\log r'>t$. Applying the second part of Lemma~\ref{lem-max-Gt} to $G_{t'}$ with $u$ replaced by $u-M'$ and $m'-u$, respectively, shows that there exist $A'>0$ and $\tau_0>t'$ such that the following two statements hold: \begin{enumerate} \renewcommand{\theenumi}{\textup{(\alph{enumi})}}% \renewcommand{\labelenumi}{\theenumi} \item \label{it-M'} $u\le M'$ in $G_{t'}$ or $\displaystyle\max_{x_n=\tau}u(x)\ge M'+A'(\tau-t')$ for all $\tau\ge\tau_0$, \item \label{it-m'} $u\ge m'$ in $G_{t'}$ or $\displaystyle\min_{x_n=\tau}u(x)\le m'-A'(\tau-t')$ for all $\tau\ge\tau_0$. \end{enumerate} Combining the first two alternatives in \ref{it-M'} and \ref{it-m'} gives \ref{it-i}, while the second alternatives give \ref{it-iv}. Since $C_{p,\widetilde{w}}(\{0\})=0$, we can in the bounded case \ref{it-i} use \cite[Theorem~7.36]{HKM} and extend $\tilde{u}$ to $0$ so that it becomes a continuous weak solution of $\Div{\mathcal B}(\xi, \nabla\tilde{u})=0$ in $B_r$. By \cite[Theorem~6.6]{HKM}, $\tilde{u}$ is H\"older continuous at the origin, which shows that \eqref{eq-u-holder} holds. The remaining alternatives will lead to case~\ref{it-ii}. If $u\ge m'$ in $G_{t'}$ and \[ \max_{x_n=\tau}u(x)\ge M'+A'(\tau-t') \quad \text{for all $\tau\ge\tau_0$,} \] then using the Harnack inequality for $\tilde{u}-m'$ on the sphere $\bdry B_\rho$ with $\rho=e^{-\kappa\tau}$, we see that for some $C>0$ independent of~$\tau\ge\tau_0$, \[ \min_{x_n=\tau}(u-m') \ge C \max_{x_n=\tau}(u-m') \ge C(M'-m'+A'(\tau-t')). \] This proves the lower bound in \eqref{eq-u-lin-to-infty}, while the upper bound follows from Lemma~\ref{lem-est-with-pot} applied to $u-m'$. The second case of \ref{it-ii}, i.e.\ \eqref{eq-u-lin-to-infty} for $-u$, follows in a similar way by combining $u\le M'$ with the second alternative in \ref{it-m'}. \end{proof} We finish by giving a concrete example illustrating the cases in Theorem~\ref{thm-cases}. \begin{example} Let $G=(-1,1)\times(0,\infty)\subset\mathbf{R}^2$ and $F=[-1,1]\times\{0\}$. The linear function $u(x_1,x_2)=ax_2+b$, where $a,b\in\mathbf{R}$, satisfies $\Delta u=0$ in $G$ and $\bdry u/\bdry\nu=0$ on the lateral boundary $\bdry G\setminus F$. The cases \ref{it-i} and \ref{it-ii} follow if $a=0$, $a>0$ and $a<0$, respectively. Also, consider the function \[ u(x_1,x_2)= e^{\frac{\pi}{2} x_2}\sin\frac{\pi}{2} x_1, \] which is easily verified to satisfy $\Delta u=0$ in $G$. Then \ref{it-iv} is achieved when $\sin\tfrac\pi2 x_1$ attains its maximum and minimum at $[-1,1]$, respectively. \end{example}
\section{Introduction} The concept of inertial frame is a fundamental concept of physics. The opinion of the author is that not enough attention has been paid to such a significant concept, not only in textbooks, but also in the scientific literature. In the scientific and philosophical literature, many issues related to the concept of inertial frame have been addressed, but, as far as the author is aware, a systematic analysis of this concept has not been made. DiSalle's article (\cite{sep-spacetime-iframes}) in the Stanford Encyclopedia of Philosophy gives an overview of the historical development of the concept of an inertial frame as an essential part of the historical development of physics. Thus, DiSalle's article is complementary to this article in its purpose and content. In this article, the concept of inertial frame of reference is analysed only within the framework of classical physics and special theory of relativity. This analysis could contribute to the analysis that has yet to be done: the analysis of the concept of inertial frame of reference in general relativity and especially in quantum physics. The first part of this article identifies the basic properties of inertial frames in classical physics and special theory of relativity. The second part of the article gives a definition of inertial frame from which most other properties of inertial frames follow or this definition makes them plausible. \section{Analysis} \subsection{Newton} In Philosophiæ Naturalis Principia Mathematica, one of Newton's goal is to describe absolute motion. This description also includes relative motion:\footnote{English translation: \cite{Principia}} \begin{quote} \small Absolute, true and mathematical time, of itself, and from its own nature flows equably without regard to anything external, and by another name is called duration: relative, apparent and common time, is some sensible and external (whether accurate or unequable) measure of duration by the means of motion, which is commonly used instead of true time ... Absolute space, in its own nature, without regard to anything external, remains always similar and immovable. Relative space is some movable dimension or measure of the absolute spaces; which our senses determine by its position to bodies: and which is vulgarly taken for immovable space ... Absolute motion is the translation of a body from one absolute place into another: and relative motion, the translation from one relative place into another ... \end{quote} \noindent In this description Newton assumes that the geometry of absolute space is Euclidean geometry. With his first law, the law of inertia, Newton describes the absolute motion of the body: \begin{quote} \small Every body perseveres in its state of rest, or of uniform motion in a right line, unless it is compelled to change that state by forces impressed thereon. \end{quote} \noindent The same is true for the other two Newton laws. However, Newton shows that these laws also apply to reference frames that move uniformly with respect to the absolute frame. \begin{quote} \small The motions of bodies included in a given space are the same among themselves, whether that space is at rest, or moves uniformly forwards in a right line without any circular motion. \end{quote} \noindent Today we call these frames inertial frames. Newton assumes that Euclidean geometry applies to them as well as to absolute space. Newton's description of space and time provides a clear basis for his laws. These are absolute laws of absolute motion. But over time it has become clear that such an approach is untenable because it invokes ``phantoms'': absolute space and absolute time.\footnote{``In brief, Newton’s absolute space is a phantom that should never be made the basis of an exact science.'' (\cite{Lange})} However, inertial frames remain as frames in which these laws apply. But how to define them when absolute space and absolute time are gone? Furthermore, from Newton we inherit the hypothesis that the centre of mass of the world rests in the absolute frame (Book 3 Hypothesis I), so that the centre of mass of the solar system, since it is far from other masses, moves uniformly relative to the centre of the world.\footnote{ Immediately after Hypothesis I Newton makes a stronger claim, Proposition XI, that the centre of mass of the solar system also rests in absolute space. However, the assumptions stated in the proof are incomplete for such a conclusion.} Thus, we can connect an inertial frame with the centre of mass of the solar system. This system can be well experimentally approximated by the requirement that fixed stars have a constant position in it. When we refer to the solar system as a reference frame below, we will mean this frame. Now, inertial frames can be defined as frames that move uniformly or are at rest relative to this frame. Experiments show that, with some limitations, Newton's laws as well as Euclidean geometry are valid in such frames. \subsection{Lange} The first constructive critiques of Newton's conception of inertial frame based on the concepts of absolute space and absolute time appear in the second half of the 19th century. Lange (\cite{Lange}) gives the following description of an inertial frame:\footnote{ English translation: \cite{Pfister}} \begin{quotation} \small Definition I. An ``inertial system''\footnote{The terms ``inertial system'' and ``inertial timescale'' come from Lange.} is any coordinate system of the kind that in relation to it three points $ P $, $ P' $ , $ P'' $, projected from the same space point and then left to themselves – which, however, may not lie in one straight line – move on three arbitrary straight lines $ G $, $ G' $, $ G'' $ (e.g., on the coordinate axes) that meet at one point. Theorem I.\footnote{In Lange's text, the word \textit{theorem} has the meaning of a postulate.} In relation to an inertial system the path of an arbitrary fourth point, left to itself, is likewise rectilinear. Definition II. An ``inertial timescale'' is any timescale in relation to which one point, left to itself (e.g., P), moves uniformly with respect to an inertial system. Theorem II. In relation to an inertial timescale any other point, left to itself, moves uniformly in its inertial path. \end{quotation} Lange defines a coordinate inertial frame as a frame in which three free particles released from a single point move in non-collinear straight lines. His definition assigns an experimentally verifiable condition but is not constructive in the sense that it does not give how to construct such a frame. Lange then postulates that all free particles in such a frame move in straight lines. Inertial time is defined as the time at which such a particle travels the same distance at the same time. This is the global time of an inertial frame and requires a measure in the geometry of the space of the inertial frame. Lange assumes Euclidean geometry. Again, the definition gives an experimentally verifiable condition but does not give a construction of such a time. Lange postulates that any other free particle travels the same distance in the same inertial time. The premise of the whole description is the existence of free particles and our ability to identify them. Lange gives a successful analysis of the assumptions of Newton's first law. However, the basis of his approach is to single out the frame of measuring space and time according to how things will look in it, as a frame in which the motion of a free particle is the simplest -- it is a uniform motion along a straight line. As Wheeler would say: ``Time is defined so that motion looks simple.''(\cite{Wheeler}). Although Lange assumes the concept of a straight line and Euclidean geometry, we could add to his analysis that space is defined so that a free particle moves along a straight line. In the same spirit is another analysis of the concept of inertial frame given by Thomson (\cite{Thomson}). He defines an inertial frame as a frame in which the bodies affected by the forces move according to Newton's laws and expresses the law of inertia as the assertion to the existence of such a frame. So, here too, an inertial frame is determined by how things will look in it. \subsection{Modern textbooks} Modern textbooks of classical mechanics (not including the special theory of relativity) generally define an inertial frame in one of the following ways that we can relate to Newton's and Lange-Thomson's approach. \begin{enumerate} \item \textit{The empirical approach}. An inertial frame is a frame that moves uniformly with respect to the solar system. It is postulated that Newton's laws apply in this frame (it is sufficient to postulate this for one such frame). \item \textit{The convenient approach}. An inertial frame is a frame in which Newton laws apply. Most often only the first law of inertia is mentioned, and the others are postulated. It is also postulated that the solar system is such a frame, as well as frames that move uniformly relative to it (it is enough to postulate it only for the solar system). \end{enumerate} Although the concept of inertial frame is a fundamental concept, as a rule it is not analysed in modern textbooks of classical mechanics -- the textbooks start from the concept in the development of mechanics. The internal structure of an inertial frame is not analysed, especially the mechanism of measuring space and time in such a frame. It is simply assumed, more often implicitly than explicitly, that space is Euclidean, and time is global. The empirical approach does not analyse why Newton laws would be valid in an inertial frame but states it as an experimentally confirmed statement. In the convenient approach, Newton laws are valid by definition. However, this definition is practically useless because, for example, we should examine the motions of all free particles with all velocities in all directions to determine whether Newton's first law is valid. This definition of inertial frame makes the term empirically unverifiable and does not show us how to construct such a frame. Therefore, as far as inertial frames are concerned, modern textbooks are a step backwards compared to Newton and Lange. Newton, using the concepts of absolute space and time, explains why his laws apply in inertial frames (because these frames move uniformly relative to absolute space) and why the solar system is inertial (it moves uniformly with respect to the centre of the world which is the absolute frame). Lange, in addition to bringing to light the important concept of inertial time, gives an empirically verifiable definition of inertial frame including inertial time in it. In addition to the assumptions about an inertial frame that its space is Euclidean, time is global and absolute, and that Newton's laws apply, modern textbooks of classical mechanics sometimes assume, more often implicitly than explicitly, that in an inertial frame space is homogeneous and isotropic and time homogeneous and directed. There is no explanation as to why this would be the case (often it is not explained clearly enough what that means). Among the exceptions, the well-known Landau-Lifshitz textbook (\cite{Landau}) should be singled out -- they define inertial frame using symmetries. In search of a frame ``in which the laws of mechanics take their simplest form'' they opt for a frame ``in which space is homogeneous and isotropic and time is homogeneous''. Such a frame they call inertial. Apart from the claim that such a frame ``can always be chosen'' and that ``there is not one but an infinity of inertial frames moving, relative to one another, uniformly in a straight line'', it is not stated how to operationally find such a frame. Furthermore, they assume Euclidean geometry and global time in such a frame. From this definition they derive Newton's first law, Lagrangian of a free particle, restrictions on the form of Lagrangian of a closed system, and conservation laws, thus showing that such a definition of inertial frame is very powerful. The Landau-Lifshitz approach, which emphasizes the symmetries of space and time in an inertial frame, also belongs to convenient approaches that characterize an inertial frame as the frame in which the laws of mechanics are the simplest. Unlike this type of definitions that determine an inertial frame by how mechanical processes look in such a frame, a definition can be found in textbooks according to which an inertial frame is defined by its inherent property: it is a frame such that there are no external forces acting on it. However, neither such a description is sufficiently precise nor are the corresponding consequences drawn from the definition. For a typical example, we can cite a passage from Wikipedia (\cite{wiki}): \begin{quote} \small In classical physics and special relativity, an inertial frame of reference is a frame of reference that is not undergoing acceleration. In an inertial frame of reference, a physical object with zero net force acting on it moves with a constant velocity (which might be zero) -- or, equivalently, it is a frame of reference in which Newton's first law of motion holds. An inertial frame of reference can be defined in analytical terms as a frame of reference that describes time and space homogeneously, isotropically, and in a time-independent manner. Conceptually, the physics of a system in an inertial frame have no causes external to the system. \end{quote} \noindent If we understand the first statement as a definition of an inertial frame, we have a typical situation in this approach: various properties of an inertial frame are listed, and they are in no way related to the definition. \subsection{The special theory of relativity} The special theory of relativity has brought key improvements in the conception of inertial frame. In his groundbreaking work (\cite{Einstein}) Einstein starts from the established concept of inertial frame: it is a frame in which ``the equations of mechanics hold good''. Thus, he accepts all classical assumptions, first of all Euclidean geometry which he considers realized by means of an extended solid body and rigid rods. However, in this paper, Einstein introduces two essential innovations related to inertial frames. The first is the generalization of the principle of relativity: not only are the laws of classical mechanics the same in all inertial frames, but all the laws of physics are the same in all inertial frames. Another innovation is the analysis of the concept of time in an inertial frame. Einstein starts from the fact that time is measured locally -- with the same clock. He assumes that in an inertial frame at each point in space we can have identical clocks that we need to synchronize to get the global time of the inertial frame. Einstein describes the synchronization of clocks at different places $ A $ and $ B $ in an inertial frame as follows:\footnote{English translation: \cite{Lorentz}} \begin{quotation} \small \noindent We have so far defined only an ``$ A $ time'' and a ``$ B $ time''. We have not defined a common ``time'' for $ A $ and $ B $, for the latter cannot be defined at all unless we establish by definition\footnote{This part of the translation is wrong and should read: ''\ldots and the latter can now be determined by establishing by definition\ldots''(J.D.Norton).} that the ``time'' required by light to travel from $ A $ to $ B $ equals the ``time'' it requires to travel from $ B $ to $ A $. Let a ray of light start at the ``$ A $ time'' $t_A$ from $ A $ towards $ B $, let it at the ``$ B $ time'' $t_B$ be reflected at $ B $ in the direction of $ A $, and arrive again at $ A $ at the ``$ A $ time'' $t'_A$. In accordance with definition the two clocks synchronize if \begin{displaymath}t_B-t_A=t'_A-t_B. \end{displaymath} We assume that this definition of synchronism is free from contradictions, and possible for any number of points; and that the following relations are universally valid:— \begin{enumerate} \item If the clock at $ B $ synchronizes with the clock at $ A $, the clock at $ A $ synchronizes with the clock at $ B $. \item If the clock at $ A $ synchronizes with the clock at $ B $ and also with the clock at $ C $, the clocks at $ B $ and $ C $ also synchronize with each other. \end{enumerate} Thus with the help of certain imaginary physical experiments we have settled what is to be understood by synchronous stationary clocks located at different places, and have evidently obtained a definition of ``simultaneous'', or ``synchronous'', and of ``time''. The ``time'' of an event is that which is given simultaneously with the event by a stationary clock located at the place of the event, this clock being synchronous, and indeed synchronous for all time determinations, with a specified stationary clock. In agreement with experience we further assume the quantity \begin{displaymath}\frac{2{\rm AB}}{t'_A-t_A}=c, \end{displaymath} \noindent to be a universal constant — the velocity of light in empty space. It is essential to have time defined by means of stationary clocks in the stationary system, and the time now defined being appropriate to the stationary system we call it ``the time of the stationary system''. \end{quotation} In short, Einstein a) gave the definition of synchronization of two clocks by light, b) postulated that all clocks of an inertial frame can be consistently synchronized in the sense that synchronization of two clocks is an equivalence relation with exactly one equivalence class, c) that once synchronized clocks remain synchronized, and d) that the two-way speed of light (the speed measured on the same stationary clock) is the universal constant of an inertial frame. Having thus obtained the global time of an inertial frame (``stationary system'', in Einstein's words), Einstein can define the concept of one-way velocity in an inertial frame and state his second postulate (the light principle): \begin{quote} \small Any ray of light moves in the ``stationary'' system of co-ordinates with the determined velocity $ c $, whether the ray be emitted by a stationary or by a moving body. Hence \begin{displaymath}{\rm velocity}=\frac{{\rm light\ path}}{{\rm time\ interval}} \end{displaymath} where time interval is to be taken in the sense of the definition in § 1.\footnote{Einstein refers here to ``the time of the stationary system'' previously described.} \end{quote} Although Einstein, with his generalized principle of relativity and the light principle based on the analysis of the concept of time in an inertial frame, revolutionized physics, some things remained insufficiently clarified in the key part of his article quoted above: \begin{enumerate \item The problem of the conventionality of the definition of synchronization (\cite{Reichenbach}). Every definition of synchronization which is of the form $t_{\rm B} = t_{\rm A} + \varepsilon (t'_{\rm A}-t_{\rm A})$, where $0 < \epsilon <1$, is in accordance with the principle of causality. Is Einstein’s choice $\varepsilon = \dfrac{1}{2}$ physically different from other choices or is it just a pleasant convention with no physical significance? This problem has generated controversy that is still present today (\cite{Anderson, Jammer, sep-spacetime-convensimul}). \item The problem of consistent synchronization (in Einstein's sense) of all clocks. What properties of light are needed to achieve this? In particular, what is the role of the postulate of the constancy of the two-way speed of light in clock synchronization? \item The problem of possible circularity. Light signals are used for synchronization in order to express the light principle about light with the help of such synchronized clocks. For example, from the very definition of synchronization it follows that the one-way speed of light in opposite directions is the same. If we add to this the postulate of the constancy of the two-way speed of light, we get the light principle as a consequence of synchronization and not as an additional postulate. Thus, although Einstein introduces the clock synchronization procedure to articulate the light principle, in his work it remains unclear which properties of light are required for synchronization. The problem of circularity also occurs at a deeper conceptual level because Einstein uses clock synchronization to define the global time of an inertial frame. However, he describes an inertial frame as a frame in which ``the equations of mechanics hold good''. These laws contain the law of inertia, which presupposes the global time of an inertial frame in its formulation, and which Einstein's clock synchronization has yet to establish. \end{enumerate} In \cite{Minkowski}, Hermann Minkowski gave the formulation of the special theory of relativity in terms of a certain structure in the space of events. In short, the Minkowski event space is a 4-dimensional affine space in which worldlines of free particles and light are special types of straight lines (timelike and lightlike straight lines), and in which the metric tensor is given that is directly related to light signalling and time measurement by means of free-moving clocks. It is an elegant mathematical reformulation of the special theory of relativity that does not introduce essentially new elements into the concept of an inertial frame. We can understand Minkowski space as the structure in the event space generated by the structure of an inertial frame in a way that is invariant to the choice of an inertial frame. The light principle and the principle of relativity are automatically built into this structure (the principle of relativity as a condition on the physical laws that they must be formulated in terms of Minkowski space). Conversely, inertial frames can be understood as decompositions of Minkowski space to which the structure of Minkowski space is isomorphically transferred. In such a decomposition the space of an inertial frame is still Euclidean and the decomposition itself corresponds to Einstein's clock synchronization (\cite{Malament}). However, in Minkowski's formulation the inherent property of an inertial frame becomes more visible. Namely, the worldlines of free particles are timelike straight lines in that space, so each inertial frame is identified as a class of all mutually parallel timelike straight lines. If we imagine that each such straight line is a worldline of a free particle, and not a particle acted upon by forces in equilibrium, then an inertial frame is a class of all free material particles that are at rest with each other. Thus, an inertial frame in this space of events naturally appears as a frame by which we can identify all events and whose main feature is that it is free, that its elements do not enter any interactions. \subsection{The general theory of relativity and quantum physics} Here we will dwell only on some general observations on the possibility of extending the above analysis to general relativity and quantum physics. As is well known, the general theory of relativity sets physical limits on the classical concept of an inertial frame. Regardless of how we describe an inertial frame, the essential concept is the concept of free particle, the concept that is incompatible with the ubiquity of gravity and must be reformulated into the notion of a free-falling particle. Thus, the classical concept of inertial frame can only be realized approximately, within a limited space and time. Nevertheless, it is the key idealization of the general theory of relativity, the ``infinitesimal'' element of which the whole theory is composed. Note that even in the general theory of relativity, inertial frames have a natural inherent description: they are free-falling frames. Although inertial frames are an essential element of quantum description of the world, they are rarely explicitly mentioned in quantum physics textbooks. If they are mentioned, they are not analysed, but their properties from classical (non-quantum) physics are simply transferred. In Bohr's approach (\cite{Howard,Tanona}), they are a macroscopic element that is an integral part of the quantum description of the world and is usually related to macroscopic measuring instruments. In such an approach, the classical concept of an inertial system retains its importance. However, in other approaches the concept loses its meaning. For example, in the approach described in (\cite{Aharonov,Angelo_2011}) an inertial frame itself must be a quantum mechanical system. Then some classical properties of an inertial frame must be reformulated. For example, the property that it is a frame in which free particles move uniformly in straight lines is transformed into the property that the expected value of the position of a free particle changes uniformly along a straight line -- the property that is difficult to verify experimentally. On the other hand, the characterization that an inertial frame is a frame on which nothing acts still makes sense. Furthermore, in quantum physics, space and time symmetries can be attributed to an inertial frame, as well as the principle of relativity. However, the quantum mechanical properties of an inertial frame make the basic purpose of such a frame problematic -- to identify when and where something happened. What kind of such identification does quantum physics enable, that is, what kind of structure does it bring into the space of events? In particular, what geometry does it introduce into the space of an inertial frame? These are the key unanswered questions (\cite{Penrose}): \begin{quote} \small I do not believe that a real understanding of the nature of elementary particles can ever be achieved without a simultaneous deeper understanding of the nature of space-time itself. \end{quote} \subsection{Properties of an inertial frame} After this review, let us summarize which properties are attributed to inertial frames: \begin{enumerate \item A frame in which the centre of mass of the solar system is at rest and in which the fixed stars have a constant position is an inertial frame. \item The space and time of an inertial frame are such that free particles in it move uniformly in straight lines. In general, it is a frame in which Newton's laws apply. \item An inertial frame is a frame in which the laws of physics have the simplest form. \item An inertial frame is a frame on which there are no external forces. Or even more restrictively, it is a frame composed of free particles (there are no external or internal interactions) that are at rest with each other. \item The space of an inertial frame is Euclidean. \item The space of an inertial frame is homogeneous and isotropic, and time is homogeneous and directed. \item The time of an inertial frame is local, the local times can be synchronized and so the global time of an inertial frame can be obtained. \item Frames which move uniformly in straight lines relative to an inertial frame are inertial frames and there are no other inertial frames. \item The principle of relativity: The laws of physics are the same in all inertial frames. \item The light principle: The speed of light in vacuum is the same in all inertial frames, regardless of the mode of light formation. \end{enumerate} \section{Definition and consequences} \subsection{Definition of the concept of inertial frame} For a successful definition of a property, it is not enough that, in addition to formal correctness, the definition is only extensionally correct -- objects that have the defined property are precisely those objects that we want to single out from some multitude of objects. Such is, for example, Plato's definition of man as a two-legged animal without feathers. The most important criterion that the definition should meet is to be intensionally correct -- to single out objects according to some of their essential properties. Unlike the first two criteria, we are not yet able to give this third most important criterion a sufficiently precise form.\footnote{The criterion of extensional correctness has as precise a form as it is clear to us on an extensional level which objects we want to single out.} But this does not mean that in particular cases we cannot distinguish better from worse definitions. Of course, in the choice of a definition, the criteria of precision (how precise the terms we use to define a new term) and effectiveness (how effectively we can examine whether an object has a defined property) are important, too. Of the properties listed in the previous section, inertial frames are characterized in an extensional sense by properties 1) together with 8), and properties 2), 3) 4) and 6). Criterion 1) plus 8) is an experimental determination. Thus, its meaning is poor, and we cannot relate it to other properties of an inertial frame. We can only postulate them independently. Criteria 2), 3) and 6) identify an inertial frame by how physical processes look in it. These are external characterizations of an inertial frame that cannot explain its other properties. In addition, these criteria are not operational -- they do not show how to find such a frame. Criterion 3), in addition to being imprecise (what does it mean to have the simplest form?), provides no basis for identifying such frames. Since we do not know all the laws of physics, we cannot know in which frame they have the simplest form. Moreover, it is possible that some laws have the simplest form in one type of frame and other laws in another type of frame. Criterion 2) is clear because it is limited to Newton's laws. But accepting this criterion would mean an unnecessary limitation of the concept of an inertial frame to classical Newtonian physics. The necessary universality can be obtained only if criterion 2) is limited to the description of the motion of a free particle. The main purpose of the reference frame is to identify where and when something happened, and the requirement that in an inertial frame a free particle moves rectilinearly and uniformly, is precisely the requirement for the space and time of the frame. But such a requirement is too weak to be related to other properties of an inertial frame. If we want to reinforce it with other requirements for space and time, primarily space and time symmetries, then we come to criterion 6). However, an inertial frame must have inherent physical characteristics that affect what the laws of physics look like in it and not to be adjusted so that in it those laws have a certain form. Furthermore, this second approach only makes sense if we can formulate physical laws independently of the concept of a reference frame, which is operationally questionable. This is true for space and time symmetries, too. Such an external characterization only makes sense if we can describe this space and time structure independently of the concept of reference frame. For example, in \cite{Brehme} inertial frames are defined as frames that are isomorphic to the Minkowski space. However, the structure of Minkowski space is operationally derived from the structure of inertial frames, so this definition is only an elegant mathematical solution until we give Minkowski space a direct physical interpretation. This interpretation must explain why physical laws must be formulated in Minkowski space, that is, why they must have space and time symmetries, as well as satisfy the principle of relativity. However, even if we were to achieve such a definition of an inertial frame, structurally we would obtain a characterization of an inertial frame that it is a frame that (due to an isomorphism) has the structure of a Minkowski space. But again, it is an external characterization that does not tell us why an inertial frame would have such a space and time structure. Also, the definition would not be operational. Criterion 4) is the only inherent criterion, a criterion that mentions the properties of the reference frame itself. While the aforementioned characterizations identify an inertial frame by how we describe physics in it, this characterization determines an inertial frame by what happens to the frame itself. Thus, in terms of intensional correctness, it is the best criterion. It is also an operational criterion, unlike criteria 2) 3) and 6). In addition, it is very powerful. When we clarify the basic idea that an inertial frame is a free frame, a frame on which nothing acts, we will get a definition of inertial frame from which almost all the remaining listed properties of an inertial frame can be derived or at least made plausible. For properties that cannot be related to the concept of inertial frame, it will be shown that there are good reasons why, by their nature, they do not fall under the concept. Therefore, we will take criterion 4) to define inertial frame. We will call \textit{reference frame} any frame that allows us to identify events spatially and temporally. The same reference frame can provide multiple coordinate systems for the identification. For example, the Euclidean space is a reference frame for determining position, and various coordinate systems for identification can be defined in it. Thus, we will distinguish a reference frame from the coordinate reference frame that can be built in it. An inertial frame will be a special type of a reference frame. The condition that there are no external forces on an inertial frame is too weak. If we look at a solid body that is not affected by external forces, it can rotate. This rotation is registered by the appearance of internal tensions in the body. However, the condition that we do not allow internal forces in an inertial frame is too strong. Since an inertial frame must provide spatial and temporal determination of events, it must contain certain measuring instruments. Therefore, we will allow the existence of localized closed parts within which there is an interaction, but not the existence of a non-localized interaction, such as interactions caused by rotation, that could disrupt the symmetries of an inertial frame. This does not preclude the existence of large-scale solid bodies in an inertial frame, because in the absence of external forces and rotation we can ignore internal tensions in the body. There can only be isolated and localized interactions. Since an inertial frame serves to determine the space and time coordinates of an event, it must also have the ability to determine that its parts are at rest relative to each other. Only localized deviations from rest in closed processes that serve to measure space and time are allowed. Based on the above considerations, we define \textit{inertial frame} as a reference frame such that the following holds: \begin{enumerate \item There are no external forces on the frame. \item Interactions within the frame are possible only in localized and closed parts of the frame. \item Parts of the frame are at rest, except for possible localized deviations from rest. \end{enumerate} The precision of this definition is limited by the precision of the terms used in it, but we will show that it is precise enough to be usable. This definition does not follow from Newton's description of inertial frames as frames that move uniformly relative to the absolute frame. The law of inertia states that free frames move uniformly relative to the absolute frame, but the reverse is not true: frames that move uniformly relative to the absolute frame do not have to be free -- these include frames that are affected by forces in equilibrium. Likewise, this definition does not follow from the standard definition of an inertial frame as a frame in which free particles move uniformly in a straight line or are at rest. Parts of such a frame are at rest in the frame but this does not mean that they are free -- this includes parts that are affected by external or internal non-localized forces that are in equilibrium. This definition of inertial frame is one of the standard definitions of inertial frame, somewhat more precise here than usual. It is suggested by Newton's approach and by the standard definition through the observation of a free particle, but it is more restrictive than these definitions, as shown in the previous paragraphs. Such a definition occurs naturally from the aspect of event space (whether it has a Galilean structure or a Minkowski structure), as well as from the aspect of general relativity, where it corresponds to free-falling reference frames, if we localize them in space and time enough. The most important term on which the definition of an inertial frame rests is the concept of interaction. Thus, for the definition to be operational, it assumes that we know what kind of interactions exist. However, other definitions are based on this same concept, too. For example, the same assumption lies behind the concept of a free particle in Newton’s first law. Ultimately, we can understand this definition as a working definition, which changes every time we discover new interactions. If we assume that the interactions decrease with distance then we can consider that any frame that is far enough away from other bodies and in which there are no non-localized interactions is approximately inertial. Thus, the solar system (a system in which the centre of mass is at rest, and which has a constant direction with respect to fixed stars) can be considered inertial. Since external actions as well as rotation cause non-localized tensions, we can experimentally check whether a reference frame is inertial with an appropriate system of accelerometers and gyroscopes. For Einstein, an inertial frame is tied to the extended rigid body. If there are no external actions on the rigid body and it does not rotate, then its parts are free and in a constant mutual position, so it determines an inertial frame. A free observer with a clock and theodolite, which sends light signals around and measures the time of sending and receiving signals also forms an inertial frame. Of course, the definition of inertial frame formulated here is an idealization in relation to which we can estimate how much the actual frame of reference corresponds to an inertial one. As already mentioned, the most significant restriction on the realization of such frames is set by the general theory of relativity, but also by quantum physics. \subsection{Space and time symmetries of an inertial frame} Since an inertial frame is free, the space of this frame is homogeneous and isotropic. Any inhomogeneity and non-isotropy would mean the existence of external forces or an unnecessary internal symmetry breaking (e.g., to choose a different unit of measure in each direction). Likewise, any time inhomogeneity would mean the presence of external forces or unnecessary internal symmetry breaking, so such a space is also time homogeneous. These inherent symmetries of an inertial frame can be extended to measurements of space and time but also to the description of all closed processes in such a frame. By definition, a \textit{closed system} has no interaction with the environment, so the events in it are independent of the space and time in which it is located. When such a system is observed from an inertial frame in which all points, directions and time moments are equal, then in an inertial frame such a system can be described in such a way that it has the specified symmetries. Thus, we can set \textit{the symmetry principle} of describing physical processes in an inertial frame: \textit{In an inertial frame the laws of physics for closed systems have space homogeneity and isotropy as well as time homogeneity}. This principle derives not only from how physical processes take place but also from how we can describe them in an inertial frame. Note, we do not have to describe a closed physical process that way. But an inertial frame gives us the ability to describe them that way, and it is to be expected that such a description is the best in every respect. I would also note that it makes sense to state this principle even before we have an elaborate structure of space and time. Moreover, we can and must (if we want to exploit the advantages of an inertial frame) apply it to the very determination of the geometry of space and the structure of time in an inertial frame. The approach to the description of physical processes in which we try to preserve the original symmetries of an inertial frame I will call \textit{the inertial frame approach}\label{ifa}. \subsection{Space and time of an inertial frame} The simplest closed system is a system composed of one (massive) particle -- it is a free particle. The ray of light, if we assume the absence of ether, is also a simple closed system. Each closed periodic process, i.e., the process that returns to the initial state, including the initial position, determines the local measurement of time at that place. This is the general definition of \textit{local clock}. It could be an atomic clock. It can also be a free particle or light that bounces off something and returns to its starting position (Langevin clock). For a unit of time we can take some standardized process, for example a free particle created in the standard way that bounces off something or a light particle created in the standard way that bounces off something, if we assume that it is a closed system (that there is no ether). Here we do not have to assume that no matter how we create light it always gives the same unit of time (the light principle). Due to space and time symmetries, all closed periodic processes must measure the same time up to the choice of the unit of measure and their operation is independent of position, orientation, and elapsed time. Let us show more precisely that this is so. Let us have two closed periodic processes (two clocks) $ C_1 $ and $ C_2 $ to measure time. In general, the relation between the times $ t_1 $ and $ t_2 $ of the duration of a process measured by the clocks $ C_1 $ and $ C_2 $ is a continuous function $ f $: $ t_2 = f (t_1) $. We will show that this function is a direct proportion: $t_2 = a\cdot t_1$, for some $a>0$. For this purpose, we will consider the time $ a $ of the duration of the periodic process $ C_1 $ measured on the clock $ C_2 $. Measured on the clock $ C_1 $ it is equal to 1. Thus $ a = f (1) $. Measuring by clock $ C_2 $ the duration of $ n $ consecutive $ C_1 $ processes, due to time homogeneity, will give $na= f(n)$.This means that if measuring any process with the clock $ C_1 $ yields fraction $ \dfrac{n}{m} $ then the measurement with the clock $ C_2 $ will yield $ \dfrac{n}{m}a = f(\dfrac{n}{m}) $. Because of the continuity of the function $ f $, this means that $ x \cdot a = f(x) $, for any positive real number $ x $. Thus, the function $ f $ is a direct proportion. By adding spatial symmetries to this, we have shown that \textit{all clocks at all points of an inertial frame are equal}. Since free particles or rays of light, assuming the absence of ether, are the simplest examples of closed systems, their trajectories must be the simplest examples of curves in the space of an inertial frame. Due to the homogeneity and isotropy of space, such a trajectory must have the same spatial characteristics at each location. So, it is natural to take these paths to define \textit{straight lines} in the space of an inertial frame. Distances can always be measured by the same standardized periodic process by which we locally define time -- by means of a standardized free particle or a standardized light (assuming no ether). If since the sending of the standardized free particle (or light) from the point $ A $, its rejection from the point $ B $ and its return to the point $ A $ the elapsed time $ t $ is measured on the clock in $ A $, then we can take that time for the measure of distance. But due to the isotropy of space, it is more natural to take half of that time to measure \textit{distance}: $d(A,B) = \dfrac{t}{2}$. This does not change anything significantly because the measurement is always determined up to the multiplicative factor. Note that in this way we can also check an important element of the definition of inertial frame, that the parts of the frame are at rest. After the reflection of a particle or light, there is a displacement of the body from which the reflection is made. However, in an inertial frame, such localized deviations from rest are allowed by definition, provided that this shift is subsequently reversed. \textit{Due to space and time symmetries, any choice of standardized free particles or standardized light (assuming no ether) gives the same geometry up to the unit of measure}. Locally, we can make these measurements more conveniently using rigid rods. Due to space and time symmetries, such a measuring instrument, as well as the measuring system generated by it, can be reproduced at any point and in all directions. And, due to the symmetries, this leads to the same geometry. The geometry of the space of an inertial frame, the geometry in which the paths of free particles and light rays are straight lines, and in which the distance measurement is based on the described measurement of elapsed local time, is homogeneous and isotropic -- all points are equal and all directions are equal. Although scale symmetry is not generally valid for closed processes, we will show that it is valid for the geometry of an inertial frame. We will show that Thales's basic proportionality theorem holds: for the lengths of the segments marked in the figure below it holds that if $ x' = \alpha x $ and $ y '= \alpha y $ then $ z' = \alpha z $. \begin{figure} \begin{center} \includegraphics[scale = 0.15]{slika0} $ x=\overline{AB},\ y=\overline{AB'},\ z=\overline{BB'},\ x'=\overline{AC},\ y'=\overline{AC'},\ z'=\overline{CC'}$ \end{center} \caption{Thales's proportionality theorem} \end{figure} \noindent This is due to the equality of all clocks in an inertial system. Let $ x $, $ y $ and $ z $ lengths be measured using a periodic closed process $ C_1 $ to which a unit measure is equal to $ c_1 $: $x = t_xc_1$, $y = t_yc_1$ and $z = t_zc_1$. Imagine another periodic closed process $ C_2 $ such that its unit of measure is equal to $c_2 = \alpha c_1$. Measuring $ x'$ and $ y' $ with the clock $ C_2 $ gives the same numerical value as measuring $ x $ and $ y $ with the clock $ C_1 $: $x' = t_xc_2$ and $y' = t_yc_2$. Since the geometry is determined by measuring time, and all clocks are equal, just as the numbers measured with the clock $ C1 $ determine the triangle $ x-y-z $, so the same numbers measured with the clock $ C_2 $ determine the triangle $ x'-y'-z' $. That's why it has to be $z' = t_zc_2$. Therefore, $z'=\alpha z$. This proves Thales's theorem. In \cite{Cu3} it is shown that from the assumptions of homogeneity, isotropy and scale symmetry of space axioms of Euclidean geometry can be obtained. This means that the geometry of an inertial frame is Euclidean geometry. The symmetries of space and time solve both the problem of clock synchronization (including the question of conventionality) as well as the problem of possible circularity of the description. Using free particles or light, we can synchronize clocks in an inertial frame with the same procedure we used to determine the measurement of distances -- we send a standardized free particle or light (assuming no ether) from one clock to the next and back. Symmetries give us the freedom to choose the means of synchronization. We can use any standardized free particle (we standardize the way of generating its motion) or a standardized ray of light, assuming that the light is a closed system (that there is no ether). If we assume that the motion of light is independent of the source of origin (the light principle), then we do not have to standardize light at all. \textit{Due to the above symmetries, whatever standardized process we use, we will always get the same clock synchronization} (if we synchronize them in one way, we will find for every other way, that it gives the same synchronization). If we synchronized the clock $ B $ with the clock $ A $ and that the synchronized clocks will remain synchronized, we will denote $ A \textrm { sinc } B $. Even before synchronization, time homogeneity of an inertial frame tells us something about the connection of the time read by the clocks at the places $ A $ and $ B $. If we sent the standard signal from the clock at $ A $ in the moments $ t_1 $ and $ t'_1 $, and the clock at $ B $ received them in the moments $ t_2 $ and $ t'_2 $, then the difference in elapsed time is on both clocks same: $ t'_1-t_1 = t'_2-t_2 $. This is equivalent to the condition that the difference in signal travel time read on the $ B $ clock on arrival and on the $ A $ clock on departure is always the same: $ t_2-t_1 = t'_2-t'_1 $. We will call this property of clocks \textit{time homogeneity of clocks} in an inertial frame. \begin{figure} \begin{center} \includegraphics[scale = 0.7]{slika1} $t'_1-t_1 = t'_2-t_2 $ $ t_2-t_1 = t'_2-t'_1 $ \end{center} \caption{time homogeneity of clocks} \end{figure} If we look at all possible synchronizations that are in accordance with the principle of causality, they are of the form $ t_ {2} = t_ {1} + \varepsilon (t_1, A,B)(t_3-t_1) $, $ 0 <\varepsilon (t_1,A,B) <1 $, where $ t_1 $ is the time read on the clock at $ A $ when sending the signal from $ A $, $ t_2 $ is the time read on the clock at $ B $ when the signal arrives at $ B $, and $ t_3 $ is the time read on the clock at $ A $ when the signal returns to $ A $. Due to the time homogeneity, $ \varepsilon (t_1, A,B) $ must not depend on $ t_1 $ and due to space symmetries it must not depend on $ A $ and on the direction towards $B$ -- it must be the same number $\varepsilon$ for all points. In particular, it must be the same number to synchronize the clock at $ A $ with the clock at $ B $. We can get this synchronization by reflecting the previously described signal once again back to the point $ B $ where its arrival will be read at the moment $ t_4 $ on the clock at $ B $. \begin{figure} \begin{center} \includegraphics[scale = 0.7]{slika2} \end{center} \caption{Synchronizing clocks} \end{figure} \noindent Synchronizing the clock at $ B $ with the clock at $ A $ gives $$t_{2} = t_{1} + \varepsilon (t_3-t_1)$$ \noindent To get the relationship $ t_3 $ with $ t_2 $ and $ t_4 $, we will eliminate $ t_1 $ in the above relationship using time homogeneity of the clocks: $$t_3-t_1 = t_4 - t_2$$ \noindent We will get $$t_{3} = t_{2} + (1-\varepsilon) (t_4-t_2)$$ \noindent Due to space isotropy, it must be $ 1- \varepsilon = \varepsilon $, or $ \varepsilon = \dfrac{1}{2} $. The conclusion is that the symmetries of an inertial frame require that the synchronization relation is symmetric, that is, that $\varepsilon = \dfrac{1}{2}$. Other choices would break the symmetry. Thus, the concept of inertial frame leads to Einstein’s clock synchronization and not some other synchronization. This choice is not just a matter of convention, but it is part of the inertial frame approach (page \pageref{ifa}) to the study of nature. The situation is the same as when setting symmetry conditions on physical laws. So here too, an inertial frame allows us to choose Einstein's synchronization, and we must certainly take advantage of this in the study of nature -- to keep the symmetries of inertial frame, and so to choose Einstein synchronization. In what follows, we will mean by synchronization precisely this symmetrical Einstein synchronization. It is not difficult to show that time homogeneity of clocks is equivalent to the condition that once synchronized clocks remain synchronized, and the symmetry of a synchronization relation is equivalent to the condition that $\varepsilon = \dfrac{1}{2}$. With Einstein's synchronization, we can synchronize all clocks with one clock in a symmetrical way. However, due to space and time symmetries of an inertial frame, we will get the same result no matter what clock we take for the synchronizing clock. Thus, an inertial frame realizes Einstein's assumption of consistency of synchronization. We can show this in more detail. It follows from the isotropy of space that if we send a signal from point $ A $ so that it comes to point $ B $, it bounces to point $ C $, from where it bounces back to point $ A $, the time $t_{\leftarrow}$ to return to point $ A $ (measured at the clock at $ A $) will be equal to the time $t_{\rightarrow}$ it takes for the signal to go around these points in the opposite direction: from $ A $ through $ C $ and $ B $ back to $ A $ (measured at the clock at $ A $). This condition was considered by Reichenbach and called the roundabout axiom (\cite{Reichenbach}). \begin{figure} \begin{center} \includegraphics[scale = 0.7]{slika3} $ t_{\leftarrow} = t_{\rightarrow}$ \end{center} \caption{the roundabout axiom} \end{figure} \noindent It is easy to show (\cite{Reichenbach,Mac}) that, assuming time homogeneity of clocks, the circular isotropy of the synchronization signal is equivalent to the transitive property of Einstein synchronization. Thus, synchronization is also a transitive relation. So, we got that synchronization is an equivalence relation (reflexivity is trivial -- each clock is synchronized with itself). Since we can synchronize all other clocks with one clock, this means that this equivalence relation has only one class, that is, that \textit{we have a consistent synchronization of all clocks in the sense that every two clocks of an inertial frame are synchronized.} We can now say that after the described synchronization procedure, all clocks of an inertial frame show the same time -- the \textit{global time of the inertial frame}. This time is an inertial time because it follows from the invariance of synchronization to the choice of a standardized particle or light for the synchronisation procedure that the time satisfies the Lange condition: a free particle travels the same distance at the same time. Now that we have measures of space and time in an inertial frame, we can measure in it the (one-way) velocities of all free particles as well as the light produced in all possible ways. Note that in this system of choice of units of space and time, a standardized free particle or standardized light has a velocity equal to 1 (both two-way and one-way velocity) -- during time $ t $ it travels the distance $ t $. Of course, we can have another system of measurement of distances. If the system respects the symmetries of an inertial frame, we will get the same geometry. Only the unit of measurement of distance will be different. Such is, for example, the standard system of measurement with rigid rods. We see that \textit{Einstein synchronization of an inertial frame can be obtained without the use of light and so independently, without any circularity, the light postulate can be set}. Even if we choose one standardized light for the synchronization procedure (assuming that there is no ether, i.e., that the light is a closed system), this does not mean that every light, regardless of the conditions of its origin, has the same two-way speed as the standard light. The light principle, that every light has the same two-way speed $C$, is an additional postulate that goes beyond the concept of an inertial frame -- it does not follow from it. The one-way light principle is then a consequence of the two-way light principle and clock synchronization. Of course, that speed is the same in all inertial frames. If we also use light to measure distance, this speed is equal to 1. We see that a proper understanding of an inertial frame solves all the synchronization problems that arise in Einstein’s article. A nice logical analysis of the synchronization problem and the role of light in it without assumptions of space and time symmetries can be found in \cite{Mac,Min}. Let us point out at the end that this concept of inertial frame says nothing about the direction of time. The existence of the direction of time is ubiquitous and inertial frames only inherits this property. Thus, this property is independent of the concept of inertial frame. \subsection{The principle of relativity} Since free particles move in an inertial frame uniformly in straight lines, and an inertial frame is a frame composed of free particles with a constant relative position, inertial frames also move uniformly in a straight line (in the sense that all its parts move uniformly in parallel straight lines while maintaining their mutual position) relative to a given inertial frame. Thus, all inertial frames are in relative uniform motion with each other. As already stated, the reversal is not valid. If a frame of reference moves uniformly in a straight line relative to an inertial frame, this does not mean that it is inertial, i.e., that its parts move freely. Such motion can also occur in the presence of external forces that are mutually in equilibrium. Their presence disturbs space and time symmetries of the frame and all previous analysis and the one that follows loses its basis. Here, this conception of inertial frame differs from the standard one according to which any frame that moves uniformly relative to an inertial frame is also an inertial frame. The considerations we have applied to establish space and time symmetries of a closed physical process in an inertial frame, can also be applied to establish the possibility of the description in an inertial frame of a closed process that is invariant to the choice of an inertial frame. By definition, a closed system has no interaction with the environment, so the events in it are independent of an inertial frame from which we observe it. Since inertial frames do not differ in the way of observing a closed system then such a system can be described in a way invariant to the choice of an inertial frame. Thus, we can establish \textit{the principle of relativity} of the description of physical processes in an inertial frame: \textit{The laws of physics for a closed system are invariant to the transition from one inertial frame to another}. This principle, as well as the principles of space and time symmetries, derives not only from how physical processes take place but also from how we can describe them in an inertial frame. I repeat, we do not have to describe a closed physical process like that. But inertial frames give us the ability to describe them that way, and it is to be expected that such a description is the best in every respect. I think that with these considerations I have supplemented Geroch in \cite{EinsteinP}, page 179, who says, among other things: \begin{quote} \small The principle of relativity, then, hides within itself a subtle distinction—between what is and what is not taken as a law of physics. Indeed, it could be argued that a better perspective is to regard the principle of relativity, not as a general principle of nature at all, but rather as a guideline for distinguishing between those phenomena that are to be taken as “laws of physics” and those that are not. Phenomena that have the same description in every frame -- that is, phenomena that are compatible with the principle of relativity -- are to be accorded the status of physical laws, while phenomena that have different descriptions in different frames are to be regarded as merely specific phenomena. This is not a purely philosophical distinction: It can have consequences as to how physics is conducted. \end{quote} It is not sufficiently known that the principle of relativity follows from space and time symmetries of inertial frames (see, for example, the proof in \cite {Rindler}, page 40). It follows directly from this result that the principle of relativity is founded in the same way as space and time symmetries. \section{Conclusion} Although the definition of the concept of inertial frame formulated here may seem insufficiently precise and ``fragile'', we see that it leads to a very robust and powerful properties of inertial frames. It ensures the existence of space and time symmetries of an inertial frame, as well as the principle of relativity. These symmetries together with the principle of relativity place certain restrictions on the possible laws of physics that guide us in finding them. Also, powerful conservation laws follow from them. Thanks to the symmetries of an inertial frame, all clocks are equivalent to each other (robustness!) -- they define the same time up to a unit of measure. Symmetries also ensure time homogeneity of the clocks at various locations in an inertial frame, which is equivalent to the condition that once synchronized clocks remain synchronized. Also, symmetries ensure that we use free particles or light (assuming that once the light is emitted it is a closed system -- no ether) to synchronize the clocks, and again in a robust way -- no matter which procedure we choose to synchronize we will always get the same synchronization -- Einstein clock synchronization. Likewise, no matter which procedure we choose to measure space, we always get the same space geometry -- Euclidean geometry. From the concept of inertial frame defined herein, we derived or at least made plausible all the enumerated properties of inertial frames with the following exceptions, which have been shown to remain clearly separated from the concept of inertial frame: \begin{enumerate \item Although all inertial frames move uniformly with each other, it is not necessary that a frame of reference that moves uniformly relative to an inertial frame is also an inertial frame. \item The speed of light in vacuum is the same in all inertial frames, regardless of how it is formed (the light principle). \item Time has a direction. \end{enumerate} \bibliographystyle{abbrvnat}
\section{Introduction} Recovering 3D representations from multi-view 2D images is one of the core tasks in computer vision. Recently, significant progress has been made with the emergence of neural radiance fields methods (e.g., NeRF~\cite{nerf}), which represents a scene as a continuous 5D function and uses volume rendering to synthesize new views. Although NeRF and its follow-ups~\cite{mvsnerf, liu2020neural, martin2020nerf, wang2021ibrnet, zhang2020nerf++} achieve an unprecedented level of fidelity on a range of challenging scenes, most of these methods rely heavily on knowing the accurate camera poses, which is yet a long-standing but challenging task. The conventional camera pose estimation process suffers in challenging scenes with repeated patterns, varying lighting, or few keypoints, and building on these methods adds additional uncertainty to the NeRF training process. To explore the possibilities of alleviating the dependence on accurate camera pose information, recently, iNeRF~\cite{yen2020inerf} and NeRF$--$~\cite{wang2021nerf} attempt to optimize camera pose along with other parameters when training NeRF. While certain progress has been made, both of them can only optimize camera poses when relatively short camera trajectories with reasonable camera pose initialization are available. It is worth noting that, NeRF$--$ is limited to roughly forward-facing scenes, the focus of iNeRF is camera pose estimation but not radiance field estimation, and it assumes a trained NeRF which in turn requires known camera poses as supervision. When greater viewpoint uncertainty presents, camera poses estimation is extremely challenging and prone to falling into local minima. To this end, we propose \textbf{GNeRF}, a novel algorithm that can estimate both camera poses and neural radiance fields when the cameras are initialized at random poses in complex scenarios. Our algorithm has two phases: the first phase gets coarse camera poses and radiance fields with adversarial training; the second phase refines them jointly with a photometric loss. Taking the use of Generative Adversarial Networks (GANs) into the realm of camera poses estimation, we extend the NeRF model to jointly optimize 3D representation and camera poses in complex scenes with large displacements. Instead of directly propagating the photometric loss back to the camera pose parameters, which is sensitive to challenging conditions (e.g., less texture and varying lighting) and apt to fall into local minima, we propose a hybrid and iterative optimization scheme. Our learning pipeline is fully differentiable and end-to-end trainable, allowing our algorithm to perform well in the challenging scenes where COLMAP-based~\cite{schonberger2016structure} methods suffer from challenges such as repeated patterns, low textures, noise, even in the extreme cases when the input views are a collection of gray masks, as shown in Fig.~\ref{fig:fig_1_teaser}. In addition, our method can predict new poses of images belonging to the same scene through the trained inversion network without tedious per-scene pose estimation (e.g., COLMAP-like methods) or time-consuming gradient-based optimization (e.g., iNeRF and NeRF$--$). We experiment with our GNeRF on a variety of synthetic and natural scenes. We demonstrate results on par with COLMAP-based NeRF methods in regular scenes; more impressively, our method outperforms the baselines in cases with less texture that are regarded as extremely challenging before. \section{Related Works} \myparagraph{Neural 3D Representations} Classic approaches largely rely on discrete representations such as meshes~\cite{gkioxari2019mesh}, voxel grids~\cite{choy20163d, tatarchenko2017octree, wu20153d}, point clouds~\cite{fan2017point}. Recent neural continuous implicit fields are gaining increasing popularity, due to their capability of representing a high level of details~\cite{mescheder2019occupancy, park2019deepsdf, peng2020convolutional}. But these methods need costly 3D annotations. To bridge the gap between 2D information and 3D representations, differential rendering tackles such integration for end-to-end optimization by obtaining useful gradients of the rendering process~\cite{zhang2021stnerf, liu2019learning, nerf, saito2019pifu, sun2021neural}. Liu~\etal\cite{liu2019learning} proposes the first usage of neural implicit surface representations in differentiable rendering. Mildenhall~\etal\cite{nerf} proposes differentiable volume rendering and achieves more view-consistent reconstructions of the scene. However, they all assume accurate camera poses as a prerequisite. Recently, several methods attempt to reduce dependence on precomputed camera poses. Adding noise to the ground- truth camera poses, IDR~\cite{yariv2020multiview} produces accurate 3D surface reconstruction by simultaneously learning 3D representation and camera poses. Adding random offset to ground-truth camera poses, iNeRF~\cite{yen2020inerf} performs pose estimation by inverting a trained neural radiance field. Initializing camera poses to the identity matrix, NeRF$--$~\cite{wang2021nerf} demonstrates satisfactory novel view synthesis results in forward-facing scenes by optimizing camera parameters and radiance field jointly. In contrast to these methods, our method does not depend on camera pose initialization and is not sensitive to challenging scenes with less texture and repeated patterns. \myparagraph{Pose Estimation} Traditional techniques typically rely on Structured-from-Motion (SfM)~\cite{andrew2001multiple, faugeras2001geometry, schonberger2016structure, wu2013towards} which extracts local descriptor (e.g., SIFT~\cite{lowe2004distinctive}), performs matching to find 2D-3D correspondence, estimates candidate poses, and then chooses the best pose hypothesis by RANSAC~\cite{fischler1981random}. Other retrieval-based methods~\cite{chum2007total, irschara2009structure, philbin2007object, sivic2003video} find images similar to the query image and establish the 2D-3D correspondence efficiently by matching the query image against the database images. Recently, deep learning-based methods attempt to regress the camera pose directly from 2D images without the need of tracking. PoseNet~\cite{kendall2015posenet} is the firstly end-to-end approach that adopts a modified truncated GoogleNet as pose regressor. Different architectures~\cite{naseer2017deep, walch2017image, wu2017delving} or pose losses~\cite{brahmbhatt2018geometry, kendall2017geometric} are utilized which lead to a significant improvement. Auxiliary tasks such learning relative pose estimation~\cite{radwan2018vlocnet++, valada2018deep} or semantic segmentation~\cite{radwan2018vlocnet++} lead to a further improvement. For a better generalization of the network, hybrid pose learning methods shift the learning towards local or related problems: \cite{balntas2018relocnet, laskar2017camera} propose to regress the relative pose of a query image to the known poses based on image retrieval. These learning-based methods require large labeled training data, SSV~\cite{mustikovela2020self} proposes to estimate viewpoints from unlabeled images via self-supervision. Although great progress has been made, it still needs abundant training images. Our method belongs to learning-based methods but is trained per scene in a self-supervised manner. \myparagraph{3D-Aware Image Synthesis} Generative adversarial nets, or more generally the paradigm of adversarial learning, have led to significant progress in various image synthesis tasks~\cite{karras2019style, mirza2014conditional, shaham2019singan}. But these methods operate on 2D space of pixels, ignoring the 3d structure of our natural scene. 3D-aware image synthesis correlates 3D model with 2D images, enabling explicit modification of 3D model~\cite{chan2020pi, chen2020free, henzler2019escaping, nguyen2018rendernet, nguyen2019hologan, niemeyer2020giraffe, schwarz2020graf}. Earlier 3D-aware image synthesis methods like RenderNet~\cite{nguyen2018rendernet} introduce rendering convolutional networks with a projection unit that can render 2D images from 3D shapes. PLATONICGAN~\cite{henzler2019escaping} uses a voxel-based representation and a family of differentiable rendering layers to discover the 3D structure of an object from an unstructured collection of 2D images. HoloGAN~\cite{nguyen2019hologan} introduces deep voxels representation and learns it also without any 3D shapes supervision. For these methods, the combination of differentiable rendering layers and implicit 3D representation can lead to entangled latent variables and destroy multi-view consistency. The most recent and relevant to ours are GRAF~\cite{schwarz2020graf}, GIRAFFE~\cite{niemeyer2020giraffe} and pi-GAN~\cite{chan2020pi}, with the expressiveness of NeRF, these methods allow disentangled shape, appearance modification of the generated objects. However, these methods require abundant data and focus on simplistic objects (e.g., faces, cars) instead of photo-realistic and complex scenes. Conversely, our method can handle complex real scenes with limited data by learning a coarse generative network with limited data and refining it with photometric constraints. \begin{figure*}[t] \begin{center} \includegraphics[width=1.0\linewidth]{./fig/architecture.png} \end{center} \vspace{-0.2in} \caption{$\textbf{The pipeline of GNeRF.}$ Our pipeline learns the radiance fields and camera poses jointly in two phases. In phase A, we randomly sample poses from a predefined poses sampling space and generate corresponding images with the NeRF (G) model. The discriminator (D) learns to classify real and fake image patches. The inversion network (E) takes in the fake image patches and learns to output their poses. Then, with the inversion network's parameters frozen, we optimize the pose embeddings of real images in the dataset. In phase B, we utilize the photometric loss to refine radiance fields and pose embeddings jointly. We follow a hybrid and iterative optimization strategy of the pattern `A $\rightarrow$ AB$\dots$AB $\rightarrow$ B' in the training process. } \label{fig:pipeline} \end{figure*} \section{Preliminary} We first introduce the basic camera and scene representation, as well as notations for our method in this section. \vspace{-7mm} \paragraph{Camera Pose} Formally, we represent the camera pose/extrinsic parameters based on its position/location in 3D space and its rotation from a canonical view. For the camera position, we simply adopt a 3D embedding vector in Euclidean space, denoted as $\mathbf{t} \in \mathbb{R}^3$. For the camera rotation, the widely-used representations such as quaternions and Euler angles are discontinuous and difficult for neural networks to learn. Following the seminal work~\cite{zhou2019continuity}, we use a continuous 6D embedding vector $\mathbf{r} \in \mathbb{R}^6$ to represent 3D rotations, which is more suitable for learning. Concretely, given a rotation matrix $\mathbf{R} = \begin{bmatrix}\mathbf{a}_1 & \mathbf{a}_2 & \mathbf{a}_3\end{bmatrix}\in \mathbb{R}^{3\times 3}$, we compute the rotation vector $\mathbf{r}$ by dropping the last column of the rotation matrix. From the 6D pose embedding vector, we can also recover the original rotation matrix using a Gram-Schmidt-like process, in which the last column is computed by a generalization of the cross product to three dimension~\cite{zhou2019continuity}. \vspace{-3mm} \paragraph{NeRF Scene Representation} We adopt the NeRF~\cite{nerf} framework to represent the underlying 3D scene and image formation, which encodes a scene as continuous volumetric radiance field of color and density. Specifically, given a 3D location $\mathbf{x}\in \mathbb{R}^3$ and 2D viewing direction $\mathbf{d} \in [-\pi,\pi]^2$ as inputs, the NeRF model defines a 5D vector-valued function $F_{\Theta}:(\mathbf{x}, \mathbf{d}) \rightarrow(\mathbf{c}, \sigma)$ based on an MLP network, where its outputs are an emitted color $\mathbf{c} \in \mathbb{R}^3$ and volume density $\sigma$, and $\Theta$ are network parameters. To render an image from a NeRF model, the NeRF model follows the classical volume rendering principles~\cite{kajiya1984ray}. For each scene, the NeRF framework learns a separate neural representation network with a dataset of RGB images of the scene, the corresponding camera poses and intrinsic parameters, and scene bounds. Concretely, given a dataset of calibrated RGB images $\mathcal{I} = \{I_1, I_2, \cdots, I_n\}$ of a single scene, the corresponding camera poses $\Phi = \{\phi_1, \phi_2, \cdots, \phi_n\}$ and a differentiable volume renderer $G$, the NeRF model optimizes the continuous volumetric scene function $F_{\Theta}$ by a photometric loss as below, \begin{align} \mathcal{L}_{N}(\Theta,\Phi) = \frac{1}{n}\sum_{i=1}^{n} \|I_i - \hat{I}_i\|^2_2, \quad \hat{I}_i = G(\phi_i;F_{\Theta}) \label{nerf} \end{align} \section{Methods} Our goal is to learn a NeRF model $F_{\Theta}$ from $n$ uncalibrated images $\mathcal{I}$ of a single scene without knowing their camera poses. To this end, we treat the camera poses $\Phi$ of those images as values of a latent variable, and propose an iterative learning strategy that jointly estimates the camera poses and learns the NeRF model. As the overview of our approach in Fig.~\ref{fig:pipeline} illustrates, the key ingredient of our method is a novel NeRF estimation strategy based on an integration of an adversarial loss and an inversion network (Phase A). This enables us to generate a coarse estimate of the implicit scene representation $F_{\Theta}$ and the camera poses $\Phi$ from a learned inversion network. Given the initial estimate, we utilize photometric loss to refine the NeRF scene model and those camera poses (Phase B). Interestingly, our pose-free NeRF estimation process can also further improve the refined scene representation and camera poses. Additionally, we develop a regularized NeRF optimization step that refines the NeRF scene model and those camera poses. Consequently, our learning algorithm also iterates over the NeRF estimation and optimization step to further overcome local minima between the two phases (AB...AB). In the following, we first present our pose-free NeRF estimation procedure in Sec~\ref{sec:gan}, and then introduce the regularized and iterative NeRF optimization step in Sec~\ref{sec:iterative_step}. The training strategy is detailed in Sec~\ref{sec:training} and model architecture is detailed in Sec~\ref{sec:implementation}. \subsection{Pose-free NeRF Estimation}\label{sec:gan} As the initial stage of our method, in phase A, we do not have a reasonable camera pose estimation for each image or a pre-trained radiance field. Our goal for this stage is to predict a rough pose for each image and also learn a rough radiance field of the scene. As shown in the left part of Fig.~\ref{fig:pipeline}, we use adversarial learning to achieve the goals. Our architecture contains two parts: a generator $G$ and a discriminator $D$. Taking a random camera pose $\phi$ as input, the generator $G$ will synthesize the image observed at the view by querying the neural radiance field and performing NeRF-like volume rendering. The set of synthesized images from many sampled camera poses will be decomposed into patches and compared against the set of real patches by the discriminator $D$. The fake and real patches are sampled via the dynamic patch sampling strategy which will be described in Sec~\ref{sec:training}. $G$ and $D$ are trained adversarially, as is done by the classical GAN work~\cite{goodfellow2014generative}. This adversarial training allows us to roughly learn the radiance field and estimate camera poses at random initialization. Formally, we minimize a distribution distance between the real image patches $P_d(I)$ from the training set $\mathcal{I}$ and the generated image patches $P_g(I|\Theta)$, which are defined as below: \begin{align} \Theta^* &= \arg\min_{\Theta}{Dist}\left(P_g(I|\Theta)||P_d(I)\right)\\ P_g(I|\Theta) &= \int_{\phi} G(\phi;F_\Theta) P(\phi) d\phi \end{align} To minimize the distribution distance, we adopt the following GAN learning framework based on an adversarial loss $\mathcal{L}_A$ defined as follows: \begin{align} \min_\Theta\max_\eta \mathcal{L}_A(\Theta,\eta) = &\mathbb{E}_{I\sim P_d}[\log(D(I;\eta))]\nonumber \\+&\mathbb{E}_{\hat{I}\sim P_g}[\log(1-D(\hat{I};\eta))] \end{align} where $\eta$ are the network parameters of the discriminator $D$ and $\mathbb{E}$ denotes expectation. Along with the two standard components, we train an inversion network $E$ that maps image patches to the corresponding camera poses. We train the inversion network with the pairs of randomly sampled camera poses and generated image patches. The image patches are deterministically sampled from original images via a static sampling strategy which will be described in Sec~\ref{sec:training}. The inputs of the inversion network are these image patches, and the outputs are the corresponding camera poses. Formally, we denote the parameters of the inversion network $E$ as $\theta_{E}$, and its loss function can be written as, \begin{align} \mathcal{L}_{E}(\theta_{E}) = \mathbb{E}_{\phi\sim P(\phi)} \left[\|E(G(\phi; F_\Theta);\theta_E) - \phi\|^2_2\right] \end{align} We note that the inversion network is trained in a self-supervised manner, which exploits the synthetic image patches and their corresponding camera poses as the training data. With the increasingly better-trained generator, the inversion network would be able to predict camera poses for real image patches. After the overall training is converged, we apply the inverse network to generate camera pose estimates $\{\phi_i^{'}=E(I_i), I_i\in \mathcal{I}\}$ for the training set $\mathcal{I}$. \subsection{Regularized Learning Strategy}\label{sec:iterative_step} After the pose-free NeRF estimation step, we obtain an initial NeRF model and camera pose estimates for the training images. Due to the sparse sampling of the input image patches and the constrained capability of the inversion network, neither the NeRF representation nor the estimated camera poses $\Phi'=\{\phi_i^{'}\}$ are accurate enough. However, they provide a good initialization for the overall training procedure. This allows us to introduce a refinement step for the NeRF model and camera poses, phase B, as illustrated in the right part of Fig.~\ref{fig:pipeline}. Specifically, this phase optimizes the pose embedding and the NeRF model by minimizing the photometric reconstruction error $\mathcal{L}_N(\Theta,\Phi)$ as defined in Eqn.~\ref{nerf}. We note that existing work like iNeRF and NeRF$--$ can search a limited scope in the pose space during NeRF optimization. However, the pose optimization problem in the standard NeRF model is highly non-convex, and hence their results strongly depend on camera pose initialization and are still insufficient for our challenging test scenarios. To mitigate this issue, we propose a regularized learning strategy (AB $\dots$AB) by interleaving the pose-free NeRF estimation step (phase A) and the NeRF refinement step (phase B) to further improve the quality of the NeRF model and pose estimation. Such a design is based on our empirical findings that the pose-free NeRF estimation can also improve NeRF model and camera poses from the refinement step. This strategy regularizes the gradient descent-based model optimization by the pose prediction from the learned inversion network. Intuitively, with the adversarial training of the NeRF model, the domain gap between synthesized fake images and true images is narrowing, so those pose predictions provide a reasonable and effective constraint for the joint radiance fields and pose optimization. Formally, we define a hybrid loss function $\mathcal{L}_R$ that combines the photometric reconstruction errors and an L2 loss penalizing the deviation from the predictions of the inversion network, which can be written as below, \begin{align} \mathcal{L}_R(\Theta,\Phi)= \mathcal{L}_N(\Theta,\Phi) + \frac{\lambda}{n}\sum_{i=1}^n \| E(I_i; \theta_E) - \phi_i \|^2_2 \label{hybrid_optimization} \end{align} where $\lambda$ is the weighting coefficient and $\mathcal{L}_N(\Theta,\Phi)$ is the photometric loss defined in Eqn.~\ref{nerf}. \begin{table*}[t] \centering \begin{tabular}{*{14}{c}} \toprule \multirow{2}{*}{Data} & \multirow{2}{*}{Scene} & \multicolumn{4}{c}{$\uparrow$ PSNR} & \multicolumn{4}{c}{$\uparrow$ SSIM} & \multicolumn{4}{c}{$\downarrow$ LPIPS} \\ \cmidrule(lr){3-6}\cmidrule(lr){7-10}\cmidrule(lr){11-14} && \multicolumn{1}{c}{\textbf{C+n}} & \multicolumn{1}{c}{\textbf{C+r}} & \multicolumn{1}{c}{Ours} & \multicolumn{1}{c}{\textbf{G+n}} & \multicolumn{1}{c}{\textbf{C+n}} & \multicolumn{1}{c}{\textbf{C+r}} & \multicolumn{1}{c}{Ours} & \multicolumn{1}{c}{\textbf{G+n}} & \multicolumn{1}{c}{\textbf{C+n}} & \multicolumn{1}{c}{\textbf{C+r}} & \multicolumn{1}{c}{Ours} & \multicolumn{1}{c}{\textbf{G+n}} \\ \midrule \multirow{6}{*}{\rotatebox[origin=c]{90}{\parbox[c]{1cm}{\centering Synthetic-NeRF}}} & Chair & 33.75&32.70&31.30&32.84 &0.97&0.95&0.94&0.97 &0.03&0.05&0.08&0.04 \\ & Drums &22.39&23.42&24.30&26.71 &0.91&0.88&0.90&0.93 &0.10&0.13&0.13&0.07 \\ & Hotdog &25.14&33.59&32.00&29.72 &0.96&0.97&0.96&0.95 &0.05&0.03&0.07&0.04 \\ & Lego &29.13&28.73&28.52&31.06 &0.93&0.92&0.91&0.95 &0.06&0.08&0.09&0.04 \\ & Mic &26.62&31.58&31.07&34.65 &0.96&0.97&0.96&0.97 &0.04&0.03&0.06&0.02 \\ & Ship &27.49&28.04&26.51&28.97 &0.88&0.86&0.85&0.82 &0.16&0.18&0.21&0.15 \\ \midrule \multirow{4}{*}{\rotatebox[origin=c]{90}{\parbox[c]{1cm}{\centering DTU}}} & Scan4 &22.05&24.23&22.88&25.52 &0.69&0.72&0.82&0.78 &0.32&0.20&0.37&0.18 \\ & Scan48 &6.718&10.40&23.25&26.20 &0.52&0.62&0.87&0.90 &0.65&0.60&0.21&0.21 \\ & Scan63 &27.80&26.61&25.11&32.19 &0.90&0.90&0.90&0.93 &0.21&0.19&0.29&0.24 \\ & Scan104 &10.52&13.92&21.40&23.35 &0.48&0.55&0.76&0.82 &0.60&0.59&0.44&0.36 \\ \bottomrule \end{tabular} \caption{\textbf{Quantitative comparison among COLMAP-based NeRF~\cite{nerf} (C+n), COLMAP-based NeRF with additional refinement (C+r), NeRF with ground-truth poses(G+n), and ours on the Synthetic-NeRF~\cite{nerf} dataset and DTU~\cite{jensen2014large} dataset. } We report PSNR, SSIM and LPIPS metrics to evaluate novel view synthesis quality. Our method without posed camera generates novel views on par with COLMAP-based NeRF and is more robust to challenging scene where COLMAP-based NeRF fails. } \label{compare_1} \end{table*} \begin{figure*}[t] \begin{center} \includegraphics[width=1.0\linewidth]{./fig/results_compar_vis_all.jpg} \end{center} \vspace{-0.1in} \caption{\textbf{Qualitative comparison between COLMAP-based NeRF (C+n) and ours on novel view synthesis quality on Synthetic-NeRF~\cite{nerf} dataset and DTU~\cite{jensen2014large} dataset. } `GT' means ground-truth images.} \label{fig:campare_vis_all} \end{figure*} \subsection{Training}\label{sec:training} Initially, we set all camera extrinsics to be an identity matrix. In phase A, we sample camera poses $\phi$ randomly from the prior pose distribution. In the Synthetic-NeRF dataset, the cameras are uniformly distributed at the upper hemisphere and towards the origin. In practice, we compute the rotation matrix directly from the camera position and the lookat point. In the DTU dataset, the cameras are uniformly distributed at the upper hemisphere with an azimuth range of $[0, 150]$, and the lookat point is distributed at a gaussian distribution $\mathcal{N}(0, 0.01^2)$. We analyze how the mismatch of prior pose distribution influences the performance in the supplement material. To train the generative radiance field, we follow a similar patch sampling strategy as GRAF~\cite{schwarz2020graf} for computation and memory efficiency. Specifically, for the GAN training process, we adopt a dynamic patch sampling strategy, as is illustrated in the lower left part of Fig.~\ref{fig:pipeline}. Each patch is sampled within the image domain with a fixed size of $16 \times 16$ but dynamic scale and random offset. For the pose optimization process, we adopt a static patch sampling strategy, as is illustrated in the upper left part of Fig.~\ref{fig:pipeline}. Each patch is uniformly sampled across the whole image domain with a fixed size of $64 \times 64$. This sampling strategy uniquely represents the whole image with a sparse patch with which we estimate the corresponding camera pose. We also scale the camera intrinsics at the beginning to maximize the receptive field and progressively increase it to the original value to concentrate on fine details. In practice, these strategies bring great benefits to the stability of the GAN training process. \subsection{Implementation Details}\label{sec:implementation} We adopt the network architecture of the original NeRF~\cite{nerf} and its hierarchical sampling strategy to our generator. The numbers of sampled points of both coarse sampling and importance sampling are set to $64$. Differently, because the GAN training only narrows the distribution of real patches and fake patches (``coarse'' and ``fine''), we utilize the same MLPs in hierarchical sampling strategy to ensure the pose spaces of ``coarse'' and ``fine'' networks are aligned. For a fair comparison, we increase the dimension of the MLPs from the original 256 to 360 to keep the overall parameters unchanged. The discriminator network follows GRAF~\cite{schwarz2020graf}, in which instance normalization~\cite{ulyanov2016instance} over features and spectral normalization~\cite{miyato2018spectral} over weights are applied. We borrow the Vision Transformer Network~\cite{dosovitskiy2020image} to build our inversion network, whose last layer is modified to output a camera pose. We use RMSprop~\cite{kingma2013auto} algorithm to optimize the generator and the discriminator with learning rates of 0.0005 and 0.0001, respectively. As for the inversion network and camera poses, we use Adam~\cite{kingma2014adam} algorithm with learning rates of 0.0001 and 0.005. \section{Experiments} Here we compare our method with other approaches which require camera poses or a coarse camera initialization on view synthesis task and evaluate our method in various scenarios. We run our experiments on a PC with Intel i7-8700K CPU, $32$GB RAM, and a single Nvidia RTX TITAN GPU, where our approach takes 30 hours to train the network on a single scene. \subsection{Performance Evaluations} \paragraph{Novel View Synthesis Comparison} We firstly compare novel view synthesis quality on the Synthetic-NeRF~\cite{nerf} and DTU~\cite{jensen2014large} datasets with three other approaches: Original NeRF~\cite{nerf} with precalibrated camera poses from COLMAP~\cite{schonberger2016structure}, denoted by \textbf{C+n}; Original NeRF with precalibrated camera poses from COLMAP but jointly refined via gradient descent, denoted by \textbf{C+r}; Original NeRF with ground-truth camera poses, denoted by \textbf{G+n}. We report the standard image quality metrics Peak Signal-to-Noise Ratio (PSNR), SSIM~\cite{wang2004image} and LPIPS~\cite{zhang2018unreasonable} to evaluate image perceptual quality. For evaluation, we need to estimate the camera poses of the test view images. Since our method can predict poses of new images, the camera poses of test view are directly estimated by our well-trained model. Conversely, for the COLMAP-based methods, we need to estimate the camera poses of images in the training set and test set together to keep them lie in the same space. We note that the COLMAP produces more accurate poses estimation with more input images, so for fair evaluation, we only choose a limited number of test images. The selection is based on maximizing their mutual angular distance between views so that test samples can cover different perspectives of the object as much as possible. For the Synthetic-NeRF dataset, we follow the same split as the original but randomly sample eight images from test set for testing. The COLMAP is incapable to register the images with the resolution of $[400, 400]$ as shown in the supplement material, so we provide COLMAP with 108 images of $800\times800$ for camera registration which COLMAP performs much better. The training image resolution for all the methods is $400 \times 400$. For the DTU dataset, we use four representative scenes, on each of which we take every 8-th image as test images and take the rest 43 images for training. The input image resolution is $500 \times 400$. The scene selection is based on consideration of diversity: synthetic scenes (Synthetic-NeRF); real scenes with rich textures (scan4 and scan63); real scenes with less texture (scan48 and scan104). As in Fig.~\ref{fig:campare_vis_all}, we show{\tiny } the visualization comparison with methods on the Synthetic-NeRF and DTU datasets. Our method outperforms the \textbf{C+n} in challenging scenes, e.g., scan48, scan104, lego, and drums while achieving similar results on regular scenes with enough keypoints. These challenging scenes do not have enough keypoints for pose estimation, so make NeRF which needs precise poses as input fail to synthesis good results. We also show the quantitative performance of all the three methods in Tab.~\ref{compare_1} on the Synthetic-NeRF and DTU datasets. We notice that our method outperforms the \textbf{C+n} in those challenging scenes. For other scenes, our method generates satisfactory results on par with the COLMAP-based NeRF methods. \textbf{C+r} have a better performance than \textbf{C+n}'s. However, limited by the poor pose initialization, \textbf{C+r} can not produce the same performance as ours in some challenging scenes. \begin{table}[t] \centering \begin{tabular}{*{4}{c}} \toprule Methods & Scan48 & Scan97 & Scan104 \\ \midrule IDR(masked)~\cite{yariv2020multiview} & 21.17 & 17.42 & 12.26 \\ Ours(masked) & 20.40 & 19.40 & 19.81 \\ Ours & 25.71 & 24.52 & 25.70 \\ \bottomrule \end{tabular} \caption{\textbf{Quantitiative rendering quality comparison between IDR and ours on DTU~\cite{jensen2014large} dataset. }The evaluation metric is PSNR.} \label{compare_2} \end{table} \begin{figure}[t] \begin{center} \includegraphics[width=1.0\linewidth]{./fig/results_compar_vis_4.jpg} \end{center} \vspace{-0.1in} \caption{\textbf{Qualitative rendering quality comparison between IDR~\cite{yariv2020multiview} and ours on DTU dataset. }} \label{fig:compare_vis_idr} \end{figure} Additionally, to further demonstrate our architecture's ability to learn the high-quality 3D representation without camera poses, we also compare with the state-of-the-art 3D surface reconstruction method, IDR~\cite{yariv2020multiview}, by comparing the rendering quality. Note that the IDR method requires image masks and noisy camera initializations, while our method does not need them. We follow the same setting of optimizing the model and camera extrinsics jointly on 49 training images of each scene and report the mean PSNR as evaluation metrics. We report the PSNR computed on the whole image and within the mask, which is the same evaluation protocol as IDR. The qualitative and quantitative results are in Tab.~\ref{compare_2} and Fig.~\ref{fig:compare_vis_idr}. It can be seen that our volume-rendering-based method produces more natural images, while IDR produces results with more artifacts and fewer fine details. \vspace{-3mm} \paragraph{Camera Poses Comparison} We evaluate the accuracy of camera poses estimation on the Synthetic-NeRF dataset which contains several relatively challenging scenes with repeated patterns or less texture. The camera model of COLMAP is SIMPLE PINHOLE with shared intrinsics, $f = 1111.111$, $cx = 400$, $cy = 400$. For COLMAP, the input image size is $800\times800$ and the number is $108$, while for our method, the input image size is $400\times400$ and the number is $100$. We note that COLMAP produces more accurate estimates with more input images. In Tab.~\ref{cam_pose_tab}, we report the mean translation and rotation difference on the train set computed with the ATE toolbox~\cite{zhang2018tutorial}. Our method outperforms the COLMAP~\cite{schonberger2016structure} on the drums and lego scenes which have less texture and repeated patterns. However, on the other scenes, which still contain enough reliable keypoints, our method is not accurate as the COLMAP. \subsection{Ablation Study} \begin{table}[t] \centering \begin{tabular}{*{5}{c}} \toprule \multirow{2}{*}{Scene} & \multicolumn{2}{c}{COLMAP~\cite{schonberger2016structure}} & \multicolumn{2}{c}{Ours} \\ \cmidrule(lr){2-3}\cmidrule(lr){4-5} & \multicolumn{1}{c}{$\downarrow$ Rot(deg)} & \multicolumn{1}{c}{$\downarrow$ Trans} & \multicolumn{1}{c}{$\downarrow$ Rot(deg)} & \multicolumn{1}{c}{$\downarrow$ Trans} \\ \midrule Chair & 0.119 & 0.006 & 0.363 & 0.018 \\ Drums & 9.985 & 0.522 & 0.204 & 0.010 \\ Hotdog & 0.542 & 0.024 & 2.349 & 0.122 \\ Lego & 7.492 & 0.332 & 0.430 & 0.023 \\ Mic & 0.746 & 0.047 & 1.865 & 0.031 \\ Ship & 0.191 & 0.010 & 3.721 & 0.176 \\ \bottomrule \end{tabular} \caption{\textbf{Quantitative camera poses accuracy comparison between COLMAP and ours on Synthetic-NeRF~\cite{nerf} dataset.} We report the mean camera rotation difference (Rot) and translation difference (Trans) over the training set. } \label{cam_pose_tab} \end{table} In Tab.~\ref{ablation_tab_1} and Fig.~\ref{fig:ablation_fig_1}, we show an ablation study over different components of our model. Our full architecture of the combination of adversarial training, inversion network, and photometric loss achieves the best performance. Without either the adversarial loss or the inversion network, the model is incapable to learn correct geometry; without the photometric loss, the model is only capable to get coarse radiance fields. \begin{table}[t] \centering \begin{tabular}{cccccc} \toprule \multicolumn{1}{c}{Adver} & \multicolumn{1}{c}{Inver} & \multicolumn{1}{c}{Photo} & \multicolumn{1}{c}{$\uparrow$ PSNR} & \multicolumn{1}{c}{$\downarrow$ Rot(deg)} & \multicolumn{1}{c}{$\downarrow$ Trans} \\ \midrule & \checkmark & \checkmark & 19.31 & 108.22 & 2.53 \\ \checkmark & & \checkmark & 13.82 & 132.85 & 3.05 \\ \checkmark & \checkmark & & 20.60 & 5.91 & 0.24 \\ \checkmark & \checkmark & \checkmark & 31.30 & 0.36 & 0.02 \\ \bottomrule \end{tabular} \caption{\textbf{Ablation study.} We report PSNR, camera rotation difference (Rot), and translation difference (Trans) of the full model (the last row) and three configurations by removing the adversarial loss (Adver), the inversion network (Inver), and the photometric loss (Photo), respectively. Removing adversarial loss and inversion network prevents the model from learning reasonable camera poses. Removing photometric loss prevents the model from getting accurate camera poses.} \label{ablation_tab_1} \end{table} \begin{figure}[t] \begin{center} \includegraphics[width=1.0\linewidth]{./fig/ablation_study_1.png} \end{center} \vspace{-0.1in} \caption{\textbf{Ablation study.} We visualize novel view RGB images and depth maps of the four different configurations. } \label{fig:ablation_fig_1} \end{figure} \begin{table}[t] \centering \begin{tabular}{ccccc} \toprule \multicolumn{1}{c}{A, B} & \multicolumn{1}{c}{A, AB...AB, B} & \multicolumn{1}{c}{$\uparrow$ PSNR} & \multicolumn{1}{c}{$\downarrow$ Rot(deg)} & \multicolumn{1}{c}{$\downarrow$ Trans} \\ \midrule \checkmark & & 29.23 & 0.592 & 0.034 \\{\tiny } & \checkmark & 31.30 & 0.363 & 0.018 \\ \bottomrule \end{tabular} \caption{\textbf{Optimization schemes analysis.} We compare two optimization schemes: `A, B' and `A, AB...AB, B'. The additional iterative optimization step enables our model to achieve much better results.}. \label{ablation_tab_2} \end{table} \begin{figure}[t] \begin{center} \includegraphics[width=1.0\linewidth]{./fig/ablation_study_2.jpg} \end{center} \vspace{-0.1in} \caption{\textbf{Optimization schemes analysis.} On the left, we visualize the projection of camera poses on $xy$-plane of the obtained image from the two optimization schemes. On the right, we show depth maps of the view in the circled camera region and two detailed parts (yellow and purple insets) of them. } \label{fig:ablation_tab_2} \end{figure} In Tab.~\ref{ablation_tab_2} and Fig.~\ref{fig:ablation_tab_2}, we analyze different optimization schemes. We represent Phase A and Phase B as A and B respectively. Our adopted iterative optimization scheme on the pattern `A, AB...AB, B' achieves much higher image quality and camera pose accuracy than that of `A, B'. In Fig.~\ref{fig:ablation_tab_2}, the iterative optimization scheme gets much finer geometry along the edge, and the estimated camera poses align much closer to the ground-truth camera poses. These results demonstrate that the iterative learning strategy can further help overcome local minima. \section{Discussion and Conclusion} \myparagraph{Discussion} First, our method does not depend on camera pose initialization, but it does require a reasonable camera pose sampling distribution. For different datasets, we rely on a camera sampling distribution not far from the true distribution to alleviate the difficulties for radiance field estimation. This could potentially be mitigated by learning the underlying pose sampling space automatically. A promising future direction would be combining global appearance distribution optimization (our approach) and local feature matching (pose distribution estimator) for the appearance and geometric reconstruction in an end-to-end manner. This combination potentially preserves our capability to challenging cases and relax to more general scenes without accurate distribution prior. Secondly, jointly optimizing camera poses and scene representation is a challenging task and opt to fall in local minima. Although in real datasets, we achieve good novel view synthesis quality on par with NeRF if the accurate camera poses present, our optimized camera poses are still not so accurate as of the COLMAP when there are sufficient amount of reliable keypoints. This may be due to that our inversion network, which maps images to camera poses, could only take in image patches with limited size for computation efficiency. This might be fixed by importance sampling. \myparagraph{Conclusion} We have presented GNeRF, a GAN-based framework to reconstruct neural radiance fields and estimate camera poses when the camera poses are completely unknown and scene conditions can be complicated. Our framework is fully differentiable and end-to-end trainable. Specifically, our first phase enables GAN-based joint optimization for the 3D representation and the camera poses, and our hybrid and iterative scheme by interleaving the first and second phases would further refine the results robustly. Extensive experiments demonstrate the effectiveness of our approach. Impressively, our approach has demonstrated promising results on those scenes with repeated patterns or even low textures, which have been regarded as extremely challenging before. We believe our approach is a critical step towards the more general neural scene modeling goal using less human-crafted priors. \section*{Acknowledgements} We would like to thank the anonymous reviewers for their detailed and constructive comments which were helpful in refining the paper. This work was supported by NSFC programs (61976138, 61977047), the National Key Research and Development Program (2018YFB2100500), STCSM (2015F0203-000-06) and SHMEC (2019-01-07-00-01-E00003) {\small \bibliographystyle{ieee_fullname}
\section{Introduction} \label{} Human pose estimation refers to predict the specific location of human keypoints from an image. It is a fundamental yet challenging task for many computer vision applications like intelligent video surveillance and human-computer interaction. However, due to illumination, occlusion and flexible body poses, human pose estimation is still difficult, especially for locating invisible keypoints. In recent years, due to the development of deep convolutional neural networks (CNNs)~\cite{xiao2018simple,zhu2019rotated}, there has been significant progress on the problem of human pose estimation. Newly proposed methods mainly use CNNs to predict the heatmaps of body joints. However, it will be very tough for purely CNN-based methods to regress accurate heatmaps in the face of severely occluded body parts, which are caused by surrounding people or backgrounds that are very similar to body parts. In contrast, people can always get accurate results for occluded joints by resorting to the local features and surrounding information in the image. For example, after getting the position of a knee joint, we can infer the position of corresponding ankle joint on the basis of the connection between knees and ankles, and vice versa. Moreover, even for extremely occluded body, we can distinguish reasonable and unreasonable poses and infer potential poses. During the process of inferring the location of invisible joints, the dependence correlation of human body joints has played an important role, which is also pointed out in~\cite{zhang2019human}. However, the complexity of pose estimation methods will become much higher if we directly add a new module to capture joints dependence. Considering recent success of Generative Adversarial Networks (GANs)~\cite{goodfellow2014generative}, we propose a GAN based human pose estimation framework to explore the dependence relationship among different joints while maintaining the original inference complexity. Specifically, since the internal connection of body joints can be regarded as a graph structure, we design a new graph structure network based on the graph neural network. The pose heatmaps from the generator $G$ are used as the input of pose discriminator $D$, whose goal is to determine whether the input pose is geometrically reasonable. In learning, the generator based CFN is trained to deceive the discriminator that its results are all reasonable. In other words, the generator is guided to learn the dependence correlation of the human body joints integrated in $D$ network. Once converged, the generator $G$ will successfully learn the internal dependence of body joints. To evaluate the proposed approach, we conduct experiments on three public datasets for human pose estimation, \emph{i.e}\onedot} \def\Ie{\emph{I.e}\onedot, LSP, MPII and COCO. The experimental results show that our method has obtained more plausible pose predictions compared to previous methods. In a word, our main contributions can be summarized as follows: \noindent{\bf (i)} We propose to use graph structure to model the relationship of body joints. Specifically, we regard the nodes in graph structure as human joints representation and the edges as the dependence relations of human joints. Through message pass among nodes, the complex relations of joints can be captured. \noindent{\bf (ii)} Our model is based on adversarial learning and can be trained end-to-end. Since the discriminator is not needed during testing, the complexity of pose estimation does not increase. Experiments on three public datasets show the effectiveness of our method. \section{Related Work}\label{} This section will review some related works on human pose estimation, graph structure network and generative adversarial network. \subsection{Human Pose Estimation} Along with the introduction of CNN, human pose estimation based on CNN~\cite{liang2017limb,wang2019deep} has attracted an increasing attention. The mainstream methods for body joints detection can be divided into two kinds. One is directly regressing joints' locations~\cite{fan2015combining,carreira2016human} while the other is producing joints heatmaps, where the location with the maximum value is selected as the predicted results~\cite{tompson2015efficient,sun2019deep}. DeepPose, one of the earliest CNN-based method proposed by Toshev \emph{et al}\onedot~\cite{toshev2014deeppose}, regresses location of joints with a two-steps CNN. In order to further improve performance, Fan \emph{et al}\onedot~\cite{fan2015combining} explore the relationship between global features and local features. To encompass both input and output spaces, Carreira \emph{et al}\onedot~\cite{carreira2016human} iteratively refine prediction results by concatenating the image with the body joint predictions from the previous steps. Tompson \emph{et al}\onedot~\cite{tompson2015efficient} generate heatmaps by using the multiple resolution convolutional networks to fuse the features, and employ the post-processing by using Markov Random Field (MRF). Due to its excellent performance, hourglass Network~\cite{newell2016stacked} has become a main framework, which is a bottom-up and top-down architecture with residual blocks. SimpleBaseline Network~\cite{xiao2018simple} estimates heatmaps by integrating a few deconvolutional layers on a backbone network in a much simpler way. Carissimi \emph{et al}\onedot~\cite{carissimi2018filling} consider missing joints as noise in the input and use an autoencoder-based solution to enhance the pose prediction. Zhao \emph{et al}\onedot~\cite{zhao2020perceiving} design an occlusion aware network to predict both heatmaps and visible values of joints simultaneously, so as to grasp the degree of occlusion of a pose and set a much fairer score. Like the SimpleBaseline network, our generator $G$ is also a fully convolutional network with ``conv-deconv'' architecture. However, our network integrates the multi-stage features of the backbone network into the deconvolutional layers through skip layers connection. Here, we use the ResNet as our backbone. However, our method is not restricted to the ResNet. And newly proposed network architecture can be easily used to further improve the performance. \subsection{Graph Structure Network} The dependence correlation of human joints is very important in human pose estimation. In most of traditional methods for human pose estimation, graphical model, especially a tree-structure model is used to capture the relationship among human joints~\cite{yang2012articulated}. Recently, this graphical model is combined with convolution neural networks. Chu \emph{et al}\onedot~\cite{chu2016structured} propose a structured feature learning model to capture the relation of joints on feature maps. Zhao \emph{et al}\onedot~\cite{zhao2019semantic} design a new method which operates on regression tasks with graph-structured data to predict 3D human pose from 2D joints as well as image features. Liu \emph{et al}\onedot~\cite{liu2019feature} design the Graphical ConvLSTM to enable the intermediate convolutional feature maps to perceive the graphical long short-term dependency among different body parts. To process the graph-structured data, Graph Neural Network (GNN) is first proposed in~\cite{scarselli2008graph}. Different from CNN, which is suitable for the data in the Euclidean space, GNN mainly deals with the data from non-Euclidean domains. Current GNN methods generally follow two directions. One direction is the spectral domain~\cite{defferrard2016convolutional,levie2018cayleynets}, where the neural networks are applied to the whole graph. The other line is spatial domain~\cite{niepert2016learning,zhang2019human}, where the neural networks are applied recurrently on each node of the graph. The state of each node is updated according to its previous state and information aggregating from neighboring nodes. Recently, the Gated Graph Neural Network (GGNN)~\cite{li2015gated} has been widely used in some computer vision tasks. The GGNN adopts Gated Recurrent Units~\cite{cho2014learning} and unrolls the recurrence for a fixed number of steps $T$ to update the hidden state of the nodes. The final GGNN computes gradients by using the backpropagation through temporal algorithm. Compared with~\cite{zhang2019human}, our work is based on GAN and the complexity of inference does not increase. \subsection{Generative Adversarial Network} Generative Adversarial Networks(GANs)~\cite{goodfellow2014generative} have been widely studied in many computer vision tasks, such as image super-resolution~\cite{zhao2019simultaneous}, image inpainting~\cite{jiao2019multi}, style transfer~\cite{fang2020identity}, and human pose estimation~\cite{wandt2019repnet,peng2018jointly}. For example, RepNet~\cite{wandt2019repnet} uses an adversarial training method to learn a mapping from a distribution of 2D poses to a distribution of 3D poses. Peng \emph{et al}\onedot~\cite{peng2018jointly} apply adversarial network to human pose estimation to jointly optimize data augmentation and network training. Human pose estimation can been regarded as a image-to-heatmap translation problem, which can be well implemented by our proposed framework. Different from previous GANs, we use the internal structure of human joints to construct a graph and incorporate GGNN into the discriminator model to distinguish the reasonable poses from unreasonable prediction results. \begin{figure}[t!] \begin{center} \includegraphics[width=0.96\linewidth]{framework} \end{center} \vspace{-7mm} \caption{The overall framework of proposed method. The upper part is the generator with CFN and the lower part is the discriminator with GSN.} \label{fig:framework} \end{figure} \section{Our Method}\label{} Our human pose estimation framework consists of two parts: a generator and a discriminator, which are shown in upper part and bottom part of Figure~\ref{fig:framework} respectively. Our generator is a cascade feature network, which aims at regressing pose heatmaps in a skip layer connection way. Specifically, it takes a RGB image as input and produce a heatmap for each joint. Each value in a heatmap of a joint denotes the likelihood that the corresponding joint locates at that coordinate. Therefore, we take the coordinate corresponding to the maximum value in a heatmap as the final location of this joint. The size of predicted heatmaps is $N \times H \times W$, where $N$, $H$, $W$ represent respectively the channel size, the height and the width. The specific value of $N$ depends on the dataset. For MPII and LSP, $N$ is equal to $16$ and $14$, respectively. And due to the pooling, the height and width of heatmaps is a quarter of the original image size. In other words, if the size of images is $256 \times 256$, $H$ and $W$ will be 64. Generally, the generator network can be trained like a normal deep convolution network. However, it is possible to generate human pose estimations with very low confidence or even wrong estimation results. Therefore, we introduce the discriminator network $D$ into the whole framework to make the generator network correct poor estimations. To capture the internal structure dependence of human body, we design a graph neural network based on the gated graph neural network. Its inputs are heatmaps generated by the generator network or ground-truth heatmaps. The discriminator will produce a $N$-dimension vector in the range of $[$0$,$1$]$, whose value represents the joint localization quality of an input. Through adversarial learning between $G$ and $D$, the generator network $G$ will learn the dependence of human joints and output better pose prediction. \subsection{Cascade Feature Network (CFN)} \label{word:CFN} Inspired by the successful idea in the previous human pose estimation~\cite{chen2018cascaded,xiao2018simple}, we also integrate cascade features through an encoding-decoding process. In the encoding process, features generated by different layers have different semantic levels. As described in~\cite{jiao2019multi}, lower level features focus on local semantic information while the upper level features focus on global semantic information. If we integrate these heatmaps to the decoding process, it will help to distinguish different body joints so as to improve the accuracy of final prediction. In order to effectively combine features at different semantic levels, we utilize a cascade feature network (CFN) shown in the upper part of Figure~\ref{fig:framework}. Specifically, a $1\times1$ convolution layer with the step size of 1 and without padding is used to change the channel of coarse prediction feature maps generated in the encoding stage. Then, the resulted features are combined with the corresponding image features in the decoding stage by element-wise addition. The combined feature maps are sent to the next stage of decoding. The final predicted results are obtained through the last $1 \times 1$ convolution layer, which is used as a linear classifier to map features to heatmaps. Considering that the visibility of each human joint in images is different, we employ the following loss function for CFN: \begin{equation} \label{eq:mse_loss} L_{\mbox{G}} = \frac{1}{N}\sum_{n=1}^{N}v_{n}\big \| X_{n}-Y_{n} \big \|, \end{equation} where $\big \| \cdot \big \|$ represents the Euclidean distance. $N$, $v_{n}\in {\big \{ 0,1 \big \}}$ represent respectively the number of joints and the visibility of the $n$-th pose joint. $X_{n}\in \mathbb{R}^{64\times 64}$, $Y_{n}\in \mathbb{R}^{64\times 64}$ represent respectively the predicted heatmap and the ground-truth heatmap for the $n$-th joint. \subsection{Graph Neural Network (GNN)}\label{word:GNN} Before detailing the specific architecture of discriminator, we first introduce graph neural network (GNN), which is the most important module in our discriminator. GNN is more and more used in computer vision, especially in processing the data with graph structure. Obviously, the human keyjoints can be regarded as a natural graph structure. Therefore, we adopt a graph structure to effectively integrate the internal dependence of pose joints. Here, we introduce our constructed GNN for human pose estimation. The input of GNN is a graph, which can be expressed as $Graph = \big \{V, E\}$, where $V$ and $E$ represent the set of nodes and edges in a graph respectively. Each node $v\in V$ represents a body joint while an edge represents the relationship between two nodes. Moreover, a node is associated with a hidden state vector $i_{n}$, which is gradually updated in the GNN. When updating the hidden state vector of node $v$ at time step $t$, the input is the combination of its current state vector $i_{n}^{t}$ and the information $j_{n}^{t}$ passed from its neighboring nodes $M_{n}$. The overall process of GNN can be expressed as: \begin{align} \label{eq:lm_loss} j_{n}^{t} &= {\mbox{F}}(i_{m}^{t-1}\mid m\in M_{n}), \\ i_{n}^{t} &= {\mbox{H}}(i_{n}^{t-1},j_{n}^{t}), \end{align} where $F$ and $H$ represent respectively the function to collect information from neighboring nodes and to update hidden state information of a node. \noindent{\bf Graph Construction.} The node connection of a graph determines information of which nodes will be collected for a specific node. Intuitively, it is simple and convenient to construct the graph for pose estimation in the way of full connection to pass information among nodes with one step, but this will destroy the internal spatial connection of body joints. Therefore, we build a tree-based graph structure to retain the relationship of neighboring joints as shown in Figure~\ref{fig:framework}. And note that the information passing in this graph is bidirectional. \noindent{\bf Graph Propagation.} Before learning the current hidden state of each node, it needs to obtain the information passed from the neighboring nodes by using the function $F$. We formulate the collecting process as following: \begin{equation} \label{eq:lm_loss2} j_{n}^{t}=\sum _{n^{'}\in \Omega_n } W_{n, n^{'}}i_{n}^{t-1}, \end{equation} where $\Omega_n$ is a set of all neighboring nodes of the $n$-th node, $W_{n, n^{'}}$ is the convolution weight of the edge between nodes $n$ and $n^{'}$. Next we need to update the state vector. In this paper, we adopt the gated graph neural network with GRU~\cite{li2015gated} to fully explore the dependence information of body joints. Specifically, after aggregating the information from neighboring nodes of the $n$-th node, the hidden state of $n$-th node is updated through GRU. The whole process can be represented as follows: \begin{equation} \begin{aligned} \label{eq:lm_loss3} z_{n}^{t} &=\sigma (W_{n}^{z}j_{n}^{t} + U_{n}^{z}i_{n}^{t-1}), \\ r_{n}^{t} &=\sigma (W_{n}^{r}j_{n}^{t} + U_{n}^{r}i_{n}^{t-1}), \\ \tilde{h}_{n}^{t} &=tanh(W_{n}^{h}j_{n}^{t} + U_{n}^{h}(r_{n}^{t}\odot i_{n}^{t-1})), \\ i_{n}^{t} &=(1-z_{n}^{t})\odot i_{n}^{t-1} + z_{n}^{t}\odot \tilde{h}_{n}^{t}, \end{aligned} \end{equation} where $W_{n}^{z}, W_{n}^{r}, W_{n}^{h}, U_{n}^{z}, U_{n}^{r}, U_{n}^{h}$ are the convolution weights to be learned in the graph network, $\sigma$ denotes the $sigmoid$ function. \subsection{Discriminator Network}\label{} When some body parts are seriously occluded, it will be difficult to produce a reasonable prediction only through the network in the section~\ref{word:CFN}. However, human can get more accurate results by observing the surrounding joints and local features of the image. In order to further dig out the dependence relationship of human body joints, we design a discriminator $D$ as shown in the bottom part of Figure~\ref{fig:framework}. The function of discriminator $D$ is to distinguish the right poses from the wrong poses, which do not satisfy the geometric relationship of human body. In contrast to previous work~\cite{chen2017adversarial}, we apply the gated graph neural network in discriminator $D$. As described in the section~\ref{word:GNN}, graph neural network can infer more reasonable joint information by using the internal dependence of human body joints. Here, the discriminator $D$ takes the pose heatmap as input, which can be the results predicted from the generator or the ground-truth. The discriminator aims at predicting whether the pose is reasonable or not. Specifically, the output of $D$ is a $N \times 1$ vector, each value of which represents the rationality of corresponding body joint location in the input. Therefore, the output value of $D$ is in the range of $[$0$, $1$]$. The closer the value of the vector is to $1$, the more reasonable the body joint location is, and vice versa. The objective function for learning discriminator $D$ is defined as follows: \begin{equation} \begin{aligned} \label{eq:bce_loss} \quad L_{\mbox{D}} = \mathbb{E}[\mathrm{log} D(Y)] +\mathbb{E}[\mathrm{log} (1-D(X))], \end{aligned} \end{equation} where $\mathbb{E}$ is the BCE loss. $D(X)$ and $D(Y)$ represent respectively the output of $D$ when given the predicted heatmaps $X$ and ground-truth heatmaps $Y$. \subsection{Training Details}\label{} This section will give the training process of our overall framework. Unlike some GAN based methods, we do not pretrain $G$ or $D$. After randomly initializing all the parameters, we train $G$ and $D$ alternatively following the general training process of GAN. Specifically, $G$ is trained for $3$ times then $D$ is trained for $1$ time. In the process of training $D$, we take the ground-truth heatmaps $Y$ as the input of $D$ and train $D$ to learn this is the reals. At the same time, we take the heatmaps $X$ generated by $G$ as the input of $D$ and train $D$ to learn this is the fakes. In the process of training $G$, $G$ is directly optimized to deceive $D$ through GAN. In other words, the $D$ will deem the heatmaps generated by current $G$ as the reals. Following the previous method~\cite{chen2017adversarial}, we mix the L2 loss of the generator with the BCE loss of the discriminator as the whole loss function. Therefore, the final objective function is defined as follows: \begin{equation} \label{eq:sum_loss} \arg \min_{G} \max_{D} L_{G} + \alpha L_{D}, \end{equation} where $\alpha $ is a hyper parameter to balance the L2 loss and the BCE loss. It is set to $0.01$ through experiments. Obviously, if $\alpha $ is equal to $0$, it means that the discriminator is not used to supervise the learning of $G$. \section{Experiments}\label{} \noindent{\bf Datasets.} To evaluate the proposed method, we conduct experiments on three public benchmark datasets for human pose estimation, \emph{i.e}\onedot} \def\Ie{\emph{I.e}\onedot, extended Leeds Sports Poses (LSP)~\cite{johnson2010clustered}, MPII human pose~\cite{andriluka20142d} and COCO Keypoint Challenge~\cite{lin2014microsoft}. The extended LSP dataset contains 11000 training images and 1000 testing images. For the MPII dataset, there are around 25000 images with 40000 annotated human poses, where 28000 human poses are used to train and 11000 human poses are used to test. Following the previous methods~\cite{chen2017adversarial,zhang2019human}, we also use the same setting to divide the MPII training poses into training set and validation set. Our models are only trained on COCO train2017 dataset (includes $57000$ images and $150000$ person instances) with no extra data involved, validation is studied on the val2017 set(includes $5000$ images). \noindent{\bf Implementation Details.} Our proposed model is implemented in Pytorch $1.0.0$. All experiments are run on a server with an Nvidia GEFORCE GTX 1080Ti GPU. We use Adam as the optimizer. For both benchmarks, the batch size is set to $64$ and the maximum epoch number is $140$. The learning rate is initialized to $0.001$ and reduced by $10$ times at $90$-th and $130$-th epochs. We crop the region of interest of each image based on the annotated person location from the dataset and warp it to the size of $256 \times 256$ for fair comparison with other methods. Data augmentation are adopted during training, such as random horizontal flipping, random rotation ($\pm 30$ degrees) and random scaling ($0.75$-$1.25$). Because the LSP contains less training data, we augment the training data of LSP with the MPII training images following \cite{insafutdinov2016deepercut,chen2017adversarial}. The backbone network is ResNet-$50$ if not specially indicated in our experiments. \noindent{\bf Evaluation Criteria.} We evaluate experimental results for the LSP dataset by using the Percentage Correct Keypoints (PCK) \cite{yang2012articulated}, which represents the percentage of correct detection. A joint location is believed to be correct if it falls within a normalized distance of the ground-truth. For the MPII dataset, we adopt the PCKh score \cite{andriluka20142d}, which uses a fraction of the head size to normalize the distance. For the COCO dataset, we use the official evaluation metric~\cite{lin2014microsoft} that reports the OKS-based AP (average precision) in the experiments, where the OKS (object keypoints similarity) is calculated from the distance between predicted joints and ground truth joints normalized by scale of the person. \begin{table} \caption{The Comparison of PCK @0.2 on the LSP dataset.} \label{tab:lsp} \setlength{\tabcolsep}{10pt}{ \resizebox{0.96\textwidth}{!}{ \begin{tabular}{ccccccccc} \toprule Model&Head&Sho&Elb&Wri&Hip&Kne&Ank&Mean\\ \midrule Belagiannis \emph{et al}\onedot \cite{belagiannis2017recurrent} & 95.2 & 89.0 & 81.5 & 77.0 & 83.7 & 87.0 & 82.8 & 85.2\\ Lifshitz \emph{et al}\onedot \cite{lifshitz2016human} & 96.8 & 89.0 & 82.7 & 79.1 & 90.9 & 86.0 & 82.5 & 86.7\\ Pishchulin \emph{et al}\onedot \cite{pishchulin2016deepcut} & 97.0 & 91.0 & 83.8 & 78.1 & 91.0 & 86.7 & 82.0 & 87.1\\ Insafutdinov \emph{et al}\onedot \cite{insafutdinov2016deepercut} & 97.4 & 92.7 & 87.5 & 84.4 & 91.5 & 89.9 & 87.2 & 90.1\\ Yang \emph{et al}\onedot \cite{yang2017learning} & 98.3 & 94.5 & 92.2 & 88.9 & 94.4 & 95.0 & 93.7 & 93.9\\ Zhang \emph{et al}\onedot \cite{zhang2019human} & \bf 98.4 & 94.8 & 92.0 & 89.4 & 94.4 & 94.8 & 93.8 & 94.0\\ \hline Our Model & 97.8 & \bf 95.5 & \bf 94.4 & \bf 92.9 & \bf 94.7 & \bf 95.6 & \bf 94.3 & \bf 95.1\\ \bottomrule \end{tabular}}} \end{table} \subsection{Quantitative Results} \label{} \noindent{\bf Results on LSP.} Table~\ref{tab:lsp} lists the comparison between our method and previous methods, which are evaluated with PCK scores at a normalized distance of $0.2$. Following previous methods~\cite{yang2017learning}, the MPII training set is also added to the training set of extended LSP. From this table, we can see that our proposed approach outperforms all the previous methods. Compared with the previous best method~\cite{zhang2019human}, the performance improvement is $1.1\%$. In particular, for some more challenging body parts such as wrist, ankle, we achieves $3.5\%$, and $0.5\%$ improvement compared to this method respectively. \begin{table}[t!] \caption{The Comparison of PCKh @0.5 on the MPII validation set.} \label{tab:mpii} \setlength{\tabcolsep}{10pt}{ \resizebox{0.96\textwidth}{!}{ \begin{tabular}{cccccccccc} \toprule Model&Backbone&Head&Sho&Elb&Wri&Hip&Kne&Ank&Mean\\ \midrule Hourglass~\cite{newell2016stacked} & $-$ & 96.0 & \bf 96.3 & 90.3 & 85.4 & 88.8 & 85.0 & 81.9 & 89.2\\ SimpleBaseline~\cite{xiao2018simple} & ResNet-$152$ & 97.0 & 95.9 & 90.3 & 85.0 & 89.2 & 85.3 & 81.3 & 89.6\\ LFP~\cite{yang2017learning} & $-$ & 96.8 & 96.0 & 90.4 & 86.0 & 89.5 & 85.2 & 82.3 & 89.6\\ DLCM~\cite{tang2018deeply} & $-$ & 95.6 & 95.9 & \bf90.7 & \bf 86.5 & \bf 89.9 & 86.6 & 82.5 & 89.8\\ AL~\cite{ryou2019anchor} & $-$ & 96.5 & 96.0 & 90.5 & 86.0 & 89.2 & \bf 86.8 & \bf 83.7 & \bf 89.9\\ PGCN~\cite{bin2020structure} & ResNet-$50$ & $-$ & $-$ & $-$ & 83.6 & $-$ & $-$ & 80.8 & 88.9\\ \hline Our Model & ResNet-$50$ & 96.4 & 95.3 & 89.1 & 84.2 & 89.1 & 84.8 & 80.4 & 89.0\\ Our Model & ResNet-$152$ & \bf 97.1 & 95.9 & 90.4 & 85.1 & 89.1 & 85.8 & 81.5 & 89.8\\ \bottomrule \end{tabular}}} \end{table} \noindent{\bf Results on MPII.} This subsection compares the performance of the MPII dataset between our method and some previous methods. The PCKh score at a normalized distance of $0.5$ is used to evaluate the performance. For simplicity, we directly use the PCKh scores in~\cite{sun2019deep}. Table~\ref{tab:mpii} shows the final results on MPII validation set. As shown in this table, our method obtains the PCKh score of $89.8\%$ on the MPII validation set, which is comparable to previous methods. \begin{table}[t!] \caption{Comparison with the 8-stage Hourglass~\cite{newell2016stacked}, CPN~\cite{chen2018cascaded}, SimpleBaseline~\cite{xiao2018simple}, ECSN~\cite{su2019multi} and PGCN~\cite{bin2020structure} on the COCO val2017 dataset. Their results are cited from~\cite{chen2018cascaded,xiao2018simple,su2019multi,bin2020structure}. OHKM means the model training with the Online Hard Keypoints Mining.} \label{tab:coco} \setlength{\tabcolsep}{20pt}{ \resizebox{1\textwidth}{!}{ \begin{tabular}{ccccc} \toprule Method&Backbone&Input Size&OHKM&AP\\ \midrule $8$-stage Hourglass & $-$ & $256\times192$ & $\times$ & 66.9\\ $8$-stage Hourglass & $-$ & $256\times256$ & $\times$ & 67.1\\ CPN & ResNet-$50$ & $256\times192$ & $\times$ & 68.6\\ CPN & ResNet-$50$ & $384\times288$ & $\times$ & 70.6\\ CPN & ResNet-$50$ & $256\times192$ & $\checkmark$ & 69.4\\ CPN & ResNet-$50$ & $384\times288$ & $\checkmark$ & 71.6\\ SimpleBaseline & ResNet-$50$ & $256\times192$ & $\times$ & 70.4\\ SimpleBaseline & ResNet-$50$ & $384\times288$ & $\times$ & 72.2\\ ECSN & ResNet-$50$ & $256\times192$ & $\checkmark$ & 72.1\\ ECSN & ResNet-$50$ & $384\times288$ & $\checkmark$ & 73.8\\ PGCN & ResNet-$50$ & $256\times192$ & $\times$ & 71.1\\ PGCN & ResNet-$50$ & $384\times288$ & $\times$ & 72.9\\ \hline SimpleBaseline with CFN & ResNet-$50$ & $256\times192$ & $\times$ & 72.2\\ Our overall method & ResNet-$50$ & $256\times192$ & $\times$ & 72.8\\ SimpleBaseline with CFN & ResNet-$50$ & $384\times288$ & $\times$ & 73.8\\ Our overall method & ResNet-$50$ & $384\times288$ & $\times$ & \bf 74.4\\ \bottomrule \end{tabular}}} \end{table} \noindent{\bf Results on COCO.} Table~\ref{tab:coco} shows our result with the 8-stage Hourglass~\cite{newell2016stacked}, CPN~\cite{chen2018cascaded}, SimpleBaseline~\cite{xiao2018simple}, ECSN~\cite{su2019multi} and PGCN~\cite{bin2020structure} on COCO validation set. The human detection AP reported in Hourglass, CPN, ECSN and PGCN is $55.3$. The human detection AP of ours is the same $56.4$ as SimpleBaseline. Compared with Hourglass~\cite{newell2016stacked}, both methods use an input size of $256\times192$ and no Online Hard Keypoints Mining(OHKM) involved, our method has an improvement of $5.9$ AP. CPN~\cite{chen2018cascaded}, SimpleBaseline~\cite{xiao2018simple}, ECSN~\cite{su2019multi}, PGCN~\cite{bin2020structure} and our method use the same backbone of ResNet-$50$. When OHKM is not used, our method outperforms CPN by $4.2$ AP for the input size of $256\times192$ and $3.8$ AP for the input size of $384\times288$. Compared with SimpleBaseline, our method outperforms $2.4$ AP for the input size of $256\times192$ and $2.2$ AP for the input size of $384\times288$. When OHKM is used in CPN, our method outperforms CPN by $2.8$ AP for both input sizes. Compared with ECSN, our method outperforms $0.7$ AP for the input size of $256\times192$, and $0.6$ AP for the input size of $384\times288$. Compared with PGCN, our method outperforms $1.7$ AP for the input size of $256\times192$, and $1.5$ AP for the input size of $384\times288$. Therefore, we can conclude that our method has comparable results but is simpler. \begin{figure}[t!] \begin{center} \includegraphics[width=0.92\linewidth]{vis2} \end{center} \vspace{-8mm} \caption{Sample estimation results on the MPII test set. The first row: original images. The second row: results by SimpleBaseline~\cite{xiao2018simple}. The third row: results by our overall method. (a) and (b) represent results for different poses.} \label{fig:vis2} \end{figure} \begin{figure}[t!] \begin{center} \includegraphics[width=0.96\linewidth]{vis3} \end{center} \vspace{-5mm} \caption{More examples show our approach on the MPII test set. The first row: results by SimpleBaseline~\cite{xiao2018simple}. The second row: results by SimpleBaseline with CFN. The third row: results by our overall method.} \label{fig:vis3} \end{figure} \begin{figure}[t!] \begin{center} \includegraphics[width=0.96\linewidth]{vis4} \end{center} \vspace{-5mm} \caption{Failure examples on the MPII test set. The first row: results by SimpleBaseline~\cite{xiao2018simple}. The second row: results by our overall method.} \label{fig:vis4} \end{figure} \subsection{Qualitative Comparisons} \label{} In this section, we give the qualitative comparison between our method and the SimpleBaseline~\cite{xiao2018simple}. Figure~\ref{fig:vis2} provides some examples of our model and SimpleBaseline on the MPII test set. We can see that it is difficult for the SimpleBaseline to generate reasonable body poses with large deformation and occlusion. However, our method gets more reasonable human pose. This may be because of the semantic information and the internal dependence of body joints learned in the adversarial training process. For example, the associated knee joints can help to infer the precise location of ankles in our model as shown in {col. 4-6} of Figure~\ref{fig:vis2}. In (a) of Figure~\ref{fig:vis2}, SimpleBaseline produces some weird joints' location, especially for the joints on body limbs. Although SimpleBaseline has learned most of features about body joints, it may locate some body joints to the surrounding area rather than the right one without the joints dependence learned. In (b) of Figure~\ref{fig:vis2}, some body limbs are invisible due to self-occlusion and other-occlusion. In these examples, SimpleBaseline fails to produce reasonable poses. In contrast, our method successfully predicts the correct body position even under some difficult situations. This may be because of the graph structure introduced into the discriminator. Figure~\ref{fig:vis3} shows more examples generated on the MPII test set. In (a) of Figure~\ref{fig:vis3}, although adding CFN module to the baseline can reduce the number of the weird joints' location generated by the baseline, there are still some wrong joints' location. And adding overall method to the baseline may locate some body joints to the right one with the joints dependence learned. In (b) of Figure~\ref{fig:vis3}, when some body limbs are invisible due to self-occlusion and other-occlusion, adding CFN to baseline can not solve the problem of the weird joints' location generated by baseline. On the contrary, our method still solves this problem very well. Figure~\ref{fig:vis4} shows some failure examples generated by our method on the MPII test set. As shown in Figure~\ref{fig:vis4}, our method may fail in some very challenging examples with larger deformation, overlap and occlusion. In some examples, human can not recognize the right pose at a glance. Even if our method fails in these cases, it gets a more reasonable poses than SimpleBaseline. \begin{table}[t!] \caption{Effect of each component of our method on the MPII validation set.} \label{tab:ablation} \setlength{\tabcolsep}{10pt}{ \resizebox{0.96\textwidth}{!}{ \begin{tabular}{ccccc} \toprule Model&CFN&Discriminator&GSN &Mean PCKh\\ \midrule \setlength{\arraycolsep}{20pt} SimpleBaseline~\cite{xiao2018simple} & $\times$ & $\times$ & $\times$ & 88.53\\ SimpleBaseline~\cite{xiao2018simple} with CFN & $\checkmark$ & $\times$ & $\times$ & 88.74\\ SimpleBaseline~\cite{xiao2018simple} with a Discriminator & $\times$ & $\checkmark$ & $\times$ & 88.64\\ SimpleBaseline~\cite{xiao2018simple} with GSN & $\times$ & $\checkmark$ & $\checkmark$ & 88.80\\ Our overall method & $\checkmark$ & $\checkmark$ & $\checkmark$ & \bf 89.02\\ \bottomrule \end{tabular} } } \end{table} \subsection{Ablation Study}\label{} To show the influence of each component of our method, we conduct ablation study. Since the ground-truth location of MPII test part is not available, we report the PCKh 0.5 score on the validation set of MPII dataset. In all experiments, the flip test is used. \noindent{\bf Cascade Feature Network.} To evaluate the effect of CFN, we conduct two experiments using SimpleBaseline with and without a CFN. Both of the two models are trained only using the same L2 loss defined in Eq.~\eqref{eq:mse_loss}. In other words, there is no discriminators (\emph{i.e}\onedot} \def\Ie{\emph{I.e}\onedot, no GAN). As shown in the first two rows of Table~\ref{tab:ablation}, the mean PCKh score on the MPII validation set is improved by $0.21\%$ compared to the SimpleBaseline model. We think this is caused by gathering the feature of previous layers of the ResNet-$50$ to the deconvolutional layers. This manifests that the cascade feature assists the network in better understanding of the poses. \noindent{\bf Graph Structure Network.} In this paper, we design a graph structure in the discriminator. So a question is the performance improvement is from GAN or the graph structure. To answer this question, we conduct an experiment only using a discriminator without graph structure. In detail, the discriminator consists of only two fully connected layers. Its PCKh score is shown in the third row of Table~\ref{tab:ablation}. From this table, we can find the score is increased by $0.11\%$ compared to the SimpleBaseline model. This shows the performance can be improved by adding a simple discriminator to the SimpleBaseline. Moreover, we also investigate the effect of discriminator including the GSN. As shown in the Table~\ref{tab:ablation}, the PCKh on MPII validation set is 88.80\%, which is respectively $0.27\%$ and $0.16\%$ higher than that of SimpleBaseline model and SimpleBaseline with a discriminator. This indicates that the discriminator with GSN is more helpful to promote the performance. In our mind, this is due to that the GSN can fully explore the internal geometric dependence of pose joints and reduce unreasonable pose estimation. \begin{figure}[t!] \begin{center} \includegraphics[width=0.96\linewidth]{ablation} \end{center} \vspace{-7mm} \caption{PCKh score of the wirst, hip, knee and ankle joints for different combination of components in our method.} \label{fig:ablation} \end{figure} According to the above, adding CFN or a discriminator with GSN separately in the SimpleBaseline can improve the accuracy of human pose estimation. As shown in the last line of Table~\ref{tab:ablation}, using them simultaneously results in an increase of $0.5\%$, which is higher than only using one module. Moreover, we also compare the PCKh score of wrist, hip, knee, ankle, whose localization difficulty is the largest in all human joints due to occlusion and higher freedom. As shown in Figure~\ref{fig:ablation}, for these four parts, our method achieves $0.99\%$, $0.67\%$, $0.83\%$ and $0.76\%$ improvement compared with the SimpleBaseline~\cite{xiao2018simple} respectively. This validates that the GSN capturing dependence of human joints can help to alleviate the occlusion problem. \begin{table}[t!] \caption{The compare the effect of the hyper parameter $\alpha $ on the performance on the MPII validation set.} \label{tab:alpha} \setlength{\tabcolsep}{35pt}{ \resizebox{1\textwidth}{!}{ \begin{tabular}{ccccc} \toprule $\alpha $ & $0.01$ & $0.1$ & $0.5$ & $1$\\ \midrule Mean & 89.02 & 88.83 & 88.79 & 88.51\\ \bottomrule \end{tabular}}} \end{table} We also compare the effect of the hyper parameter (\emph{i.e}\onedot} \def\Ie{\emph{I.e}\onedot, variable $\alpha $) on the performance on the MPII validation set. As shown in Table~\ref{tab:alpha}, the performance reaches the best at $\alpha $ = $0.01$. It begins to degrade with the increase of $\alpha $. So, we set $\alpha$ to $0.01$. \begin{table}[t!] \caption{The Analysis of the invisible human joints on the MPII validation set.} \label{tab:mpii_abla} \setlength{\tabcolsep}{10pt}{ \resizebox{0.96\textwidth}{!}{ \begin{tabular}{ccccc} \toprule Model & Num. of Invisible Joints & PCKh of Wrist & PCKh of Ankle & Mean\\ \midrule \setlength{\arraycolsep}{10pt} SimpleBaseline \cite{xiao2018simple} & $\geq$ 2 & 85.27 & 76.21 & 90.57\\ Our overall method & $\geq$ 2 & \bf86.11 & \bf 77.67 & \bf90.92\\ SimpleBaseline \cite{xiao2018simple} & $\geq$ 4 & 85.38 & 66.27 & 91.31\\ Our overall method & $\geq$ 4 & \bf 87.11 & \bf72.62 & \bf 91.74\\ \bottomrule \end{tabular} } } \end{table} \noindent{\bf Analysis of the Invisible Human Joints.} In order to further show the effect of our method on the prediction of seriously occluded pose, we subdivide the validation set according to the number of invisible joints. Specifically, the number of samples with more than two invisible joints is 828, while the number of samples with more than four occluded joints is 489. Note that we do not train a new model, just compare the performance on these subsets of the MPII validation set. The results are shown in table~\ref{tab:mpii_abla}. Although the location prediction of joints becomes more difficult with the increase of invisible joints, our method obtains better performance compared with the SimpleBaseline~\cite{xiao2018simple}. For the challenging body parts such as wrists and ankles, we achieve $0.84\%$ and $1.46\%$ improvement respectively compared to the SimpleBaseline when the number of invisible joints is bigger than $2$. Moreover, when the minimum number of invisible joints increases from $2$ to $4$, the performance gain becomes larger. These results indicate that our method can improve the pose estimation accuracy especially when some joints are occluded. \section{Conclusions} \label{} In this work, we propose a generative adversarial network consisting of CFN and GSN for human pose estimation. The CFN, which employs skip layers to combine features with different semantic information, is used as a generator to produce the location of human joints. Considering that the internal dependence correlation of human joints can be regarded as a natural graph structure, we develop a discriminator injected with a graph structure to effectively capture the dependence correlation of pose joints. Through adversarial learning, the generator can grasp the dependence of human joints, so the generator can produce pose estimation results with smaller error. Although we need to train the generator $G$ and the discriminator $D$, we only need the generator $G$ during testing. Therefore, the inference complexity of our method do not increase. To show the effectiveness of our model, we have done experiments and ablation studies on three widely used datasets, \emph{i.e}\onedot} \def\Ie{\emph{I.e}\onedot LSP, MPII and COCO. Currently, our graph is a tree-based structure, which may not completely capture the complex relationship of human joints, like the symmetric constraints. Therefore, we can design different graph structures, even dynamic structures to further improve the performance of human pose estimation. On the other hand, our model obtains better performance through injecting a graph structure. As a result, this model can be extended to other tasks including 3D human pose estimation, face landmark detection and semantic segmentation, where internal structure plays an important role. \section*{Acknowledgements} \label{} This work was supported by the National Natural Science Foundation of China (No.61876152), the Ministry of Science and Technology Foundation funded project under Grant 2020AAA0106900, the National Natural Science Foundation of China (No.61902321, No.U19B2037), the China Postdoctoral Science Foundation funded project under Grant 2019M653746, and the Fundamental Research Funds for Central Universities of China under Grant 31020182019gx007. \section{Introduction} \file{elsarticle.cls} is a thoroughly re-written document class for formatting \LaTeX{} submissions to Elsevier journals. The class uses the environments and commands defined in \LaTeX{} kernel without any change in the signature so that clashes with other contributed \LaTeX{} packages such as \file{hyperref.sty}, \file{preview-latex.sty}, etc., will be minimal. \file{elsarticle.cls} is primarily built upon the default \file{article.cls}. This class depends on the following packages for its proper functioning: \begin{enumerate} \item \file{pifont.sty} for openstar in the title footnotes; \item \file{natbib.sty} for citation processing; \item \file{geometry.sty} for margin settings; \item \file{fleqn.clo} for left aligned equations; \item \file{graphicx.sty} for graphics inclusion; \item \file{txfonts.sty} optional font package, if the document is to be formatted with Times and compatible math fonts; \item \file{hyperref.sty} optional packages if hyperlinking is required in the document. \end{enumerate} All the above packages are part of any standard \LaTeX{} installation. Therefore, the users need not be bothered about downloading any extra packages. Furthermore, users are free to make use of \textsc{ams} math packages such as \file{amsmath.sty}, \file{amsthm.sty}, \file{amssymb.sty}, \file{amsfonts.sty}, etc., if they want to. All these packages work in tandem with \file{elsarticle.cls} without any problems. \section{Major Differences} Following are the major differences between \file{elsarticle.cls} and its predecessor package, \file{elsart.cls}: \begin{enumerate}[\textbullet] \item \file{elsarticle.cls} is built upon \file{article.cls} while \file{elsart.cls} is not. \file{elsart.cls} redefines many of the commands in the \LaTeX{} classes/kernel, which can possibly cause surprising clashes with other contributed \LaTeX{} packages; \item provides preprint document formatting by default, and optionally formats the document as per the final style of models $1+$, $3+$ and $5+$ of Elsevier journals; \item some easier ways for formatting \verb+list+ and \verb+theorem+ environments are provided while people can still use \file{amsthm.sty} package; \item \file{natbib.sty} is the main citation processing package which can comprehensively handle all kinds of citations and works perfectly with \file{hyperref.sty} in combination with \file{hypernat.sty}; \item long title pages are processed correctly in preprint and final formats. \end{enumerate} \section{Installation} The package is available at author resources page at Elsevier (\url{http://www.elsevier.com/locate/latex}). It can also be found in any of the nodes of the Comprehensive \TeX{} Archive Network (\textsc{ctan}), one of the primary nodes being \url{http://www.ctan.org/tex-archive/macros/latex/contrib/elsevier/}. Please download the \file{elsarticle.dtx} which is a composite class with documentation and \file{elsarticle.ins} which is the \LaTeX{} installer file. When we compile the \file{elsarticle.ins} with \LaTeX{} it provides the class file, \file{elsarticle.cls} by stripping off all the documentation from the \verb+*.dtx+ file. The class may be moved or copied to a place, usually, \verb+$TEXMF/tex/latex/elsevier/+, or a folder which will be read by \LaTeX{} during document compilation. The \TeX{} file database needs updation after moving/copying class file. Usually, we use commands like \verb+mktexlsr+ or \verb+texhash+ depending upon the distribution and operating system. \section{Usage}\label{sec:usage} The class should be loaded with the command: \begin{vquote} \documentclass[<options>]{elsarticle} \end{vquote} \noindent where the \verb+options+ can be the following: \begin{description} \item [{\tt\color{verbcolor} preprint}] default option which format the document for submission to Elsevier journals. \item [{\tt\color{verbcolor} review}] similar to the \verb+preprint+ option, but increases the baselineskip to facilitate easier review process. \item [{\tt\color{verbcolor} 1p}] formats the article to the look and feel of the final format of model 1+ journals. This is always single column style. \item [{\tt\color{verbcolor} 3p}] formats the article to the look and feel of the final format of model 3+ journals. If the journal is a two column model, use \verb+twocolumn+ option in combination. \item [{\tt\color{verbcolor} 5p}] formats for model 5+ journals. This is always of two column style. \item [{\tt\color{verbcolor} authoryear}] author-year citation style of \file{natbib.sty}. If you want to add extra options of \file{natbib.sty}, you may use the options as comma delimited strings as arguments to \verb+\biboptions+ command. An example would be: \end{description} \begin{vquote} \biboptions{longnamesfirst,angle,semicolon} \end{vquote} \begin{description} \item [{\tt\color{verbcolor} number}] numbered citation style. Extra options can be loaded with\linebreak \verb+\biboptions+ command. \item [{\tt\color{verbcolor} sort\&compress}] sorts and compresses the numbered citations. For example, citation [1,2,3] will become [1--3]. \item [{\tt\color{verbcolor} longtitle}] if front matter is unusually long, use this option to split the title page across pages with the correct placement of title and author footnotes in the first page. \item [{\tt\color{verbcolor} times}] loads \file{txfonts.sty}, if available in the system to use Times and compatible math fonts. \item[] All options of \file{article.cls} can be used with this document class. \item[] The default options loaded are \verb+a4paper+, \verb+10pt+, \verb+oneside+, \verb+onecolumn+ and \verb+preprint+. \end{description} \section{Frontmatter} There are two types of frontmatter coding: \begin{enumerate}[(1)] \item each author is connected to an affiliation with a footnote marker; hence all authors are grouped together and affiliations follow; \item authors of same affiliations are grouped together and the relevant affiliation follows this group. An example coding of the first type is provided below. \end{enumerate} \begin{vquote} \title{This is a specimen title\tnoteref{t1,t2}} \tnotetext[t1]{This document is a collaborative effort.} \tnotetext[t2]{The second title footnote which is a longer longer than the first one and with an intention to fill in up more than one line while formatting.} \end{vquote} \begin{vquote} \author[rvt]{C.V.~Radhakrishnan\corref{cor1}\fnref{fn1}} \ead{<EMAIL>} \author[rvt,focal]{K.~Bazargan\fnref{fn2}} \ead{<EMAIL>} \author[els]{S.~Pepping\corref{cor2}\fnref{fn1,fn3}} \ead[url]{http://www.elsevier.com} \end{vquote} \begin{vquote} \cortext[cor1]{Corresponding author} \cortext[cor2]{Principal corresponding author} \fntext[fn1]{This is the specimen author footnote.} \fntext[fn2]{Another author footnote, but a little more longer.} \fntext[fn3]{Yet another author footnote. Indeed, you can have any number of author footnotes.} \address[rvt]{River Valley Technologies, SJP Building, Cotton Hills, Trivandrum, Kerala, India 695014} \address[focal]{River Valley Technologies, 9, Browns Court, Kennford, Exeter, United Kingdom} \address[els]{Central Application Management, Elsevier, Radarweg 29, 1043 NX\\ Amsterdam, Netherlands} \end{vquote} The output of the above TeX source is given in Clips~\ref{clip1} and \ref{clip2}. The header portion or title area is given in Clip~\ref{clip1} and the footer area is given in Clip~\ref{clip2}. \vspace*{6pt} \deforange{blue!70} \src{Header of the title page.} \includeclip{1}{132 571 481 690}{els1.pdf} \deforange{orange} \deforange{blue!70} \src{Footer of the title page.} \includeclip{1}{122 129 481 237}{els1.pdf} \deforange{orange} \pagebreak Most of the commands such as \verb+\title+, \verb+\author+, \verb+\address+ are self explanatory. Various components are linked to each other by a label--reference mechanism; for instance, title footnote is linked to the title with a footnote mark generated by referring to the \verb+\label+ string of the \verb=\tnotetext=. We have used similar commands such as \verb=\tnoteref= (to link title note to title); \verb=\corref= (to link corresponding author text to corresponding author); \verb=\fnref= (to link footnote text to the relevant author names). \TeX{} needs two compilations to resolve the footnote marks in the preamble part. Given below are the syntax of various note marks and note texts. \begin{vquote} \tnoteref{<label(s)>} \corref{<label(s)>} \fnref{<label(s)>} \tnotetext[<label>]{<title note text>} \cortext[<label>]{<corresponding author note text>} \fntext[<label>]{<author footnote text>} \end{vquote} \noindent where \verb=<label(s)>= can be either one or more comma delimited label strings. The optional arguments to the \verb=\author= command holds the ref label(s) of the address(es) to which the author is affiliated while each \verb=\address= command can have an optional argument of a label. In the same manner, \verb=\tnotetext=, \verb=\fntext=, \verb=\cortext= will have optional arguments as their respective labels and note text as their mandatory argument. The following example code provides the markup of the second type of author-affiliation. \begin{vquote} \author{C.V.~Radhakrishnan\corref{cor1}\fnref{fn1}} \ead{<EMAIL>} \address{River Valley Technologies, SJP Building, Cotton Hills, Trivandrum, Kerala, India 695014} \end{vquote} \begin{vquote} \author{K.~Bazargan\fnref{fn2}} \ead{<EMAIL>} \address{River Valley Technologies, 9, Browns Court, Kennford, Exeter, UK.} \end{vquote} \begin{vquote} \author{S.~Pepping\fnref{fn1,fn3}} \ead[url]{http://www.elsevier.com} \address{Central Application Management, Elsevier, Radarweg 43, 1043 NX Amsterdam, Netherlands} \end{vquote} \begin{vquote} \cortext[cor1]{Corresponding author} \fntext[fn1]{This is the first author footnote.} \fntext[fn2]{Another author footnote, this is a very long footnote and it should be a really long footnote. But this footnote is not yet sufficiently long enough to make two lines of footnote text.} \fntext[fn3]{Yet another author footnote.} \end{vquote} The output of the above TeX source is given in Clip~\ref{clip3}. \vspace*{12pt} \deforange{blue!70} \src{Header of the title page..} \includeclip{1}{132 491 481 690}{els2.pdf} \deforange{orange} The frontmatter part has further environments such as abstracts and keywords. These can be marked up in the following manner: \begin{vquote} \begin{abstract} In this work we demonstrate the formation of a new type of polariton on the interface between a .... \end{abstract} \end{vquote} \begin{vquote} \begin{keyword} quadruple exiton \sep polariton \sep WGM \PACS 71.35.-y \sep 71.35.Lk \sep 71.36.+c \end{keyword} \end{vquote} \noindent Each keyword shall be separated by a \verb+\sep+ command. \textsc{pacs} and \textsc{msc} classifications shall be provided in the keyword environment with the commands \verb+\PACS+ and \verb+\MSC+ respectively. \verb+\MSC+ accepts an optional argument to accommodate future revisions. eg., \verb=\MSC[2008]=. The default is 2000.\looseness=-1 \section{Floats} {Figures} may be included using the command, \verb+\includegraphics+ in combination with or without its several options to further control graphic. \verb+\includegraphics+ is provided by \file{graphic[s,x].sty} which is part of any standard \LaTeX{} distribution. \file{graphicx.sty} is loaded by default. \LaTeX{} accepts figures in the postscript format while pdf\LaTeX{} accepts \file{*.pdf}, \file{*.mps} (metapost), \file{*.jpg} and \file{*.png} formats. pdf\LaTeX{} does not accept graphic files in the postscript format. The \verb+table+ environment is handy for marking up tabular material. If users want to use \file{multirow.sty}, \file{array.sty}, etc., to fine control/enhance the tables, they are welcome to load any package of their choice and \file{elsarticle.cls} will work in combination with all loaded packages. \section[Theorem and ...]{Theorem and theorem like environments} \file{elsarticle.cls} provides a few shortcuts to format theorems and theorem-like environments with ease. In all commands the options that are used with the \verb+\newtheorem+ command will work exactly in the same manner. \file{elsarticle.cls} provides three commands to format theorem or theorem-like environments: \begin{vquote} \newtheorem{thm}{Theorem} \newtheorem{lem}[thm]{Lemma} \newdefinition{rmk}{Remark} \newproof{pf}{Proof} \newproof{pot}{Proof of Theorem \ref{thm2}} \end{vquote} The \verb+\newtheorem+ command formats a theorem in \LaTeX's default style with italicized font, bold font for theorem heading and theorem number at the right hand side of the theorem heading. It also optionally accepts an argument which will be printed as an extra heading in parentheses. \begin{vquote} \begin{thm} For system (8), consensus can be achieved with $\|T_{\omega z}$ ... \begin{eqnarray}\label{10} .... \end{eqnarray} \end{thm} \end{vquote} Clip~\ref{clip4} will show you how some text enclosed between the above code looks like: \vspace*{6pt} \deforange{blue!70} \src{{\ttfamily\color{verbcolor}\expandafter\@gobble\string\\ newtheorem}} \includeclip{2}{1 1 453 120}{jfigs.pdf} \deforange{orange} The \verb+\newdefinition+ command is the same in all respects as its\linebreak \verb+\newtheorem+ counterpart except that the font shape is roman instead of italic. Both \verb+\newdefinition+ and \verb+\newtheorem+ commands automatically define counters for the environments defined. \vspace*{12pt} \deforange{blue!70} \src{{\ttfamily\color{verbcolor}\expandafter\@gobble\string\\ newdefinition}} \includeclip{1}{1 1 453 105}{jfigs.pdf} \deforange{orange} The \verb+\newproof+ command defines proof environments with upright font shape. No counters are defined. \vspace*{6pt} \deforange{blue!70} \src{{\ttfamily\color{verbcolor}\expandafter\@gobble\string\\ newproof}} \includeclip{3}{1 1 453 65}{jfigs.pdf} \deforange{orange} Users can also make use of \verb+amsthm.sty+ which will override all the default definitions described above. \section[Enumerated ...]{Enumerated and Itemized Lists} \file{elsarticle.cls} provides an extended list processing macros which makes the usage a bit more user friendly than the default \LaTeX{} list macros. With an optional argument to the \verb+\begin{enumerate}+ command, you can change the list counter type and its attributes. \begin{vquote} \begin{enumerate}[1.] \item The enumerate environment starts with an optional argument `1.', so that the item counter will be suffixed by a period. \item You can use `a)' for alphabetical counter and '(i)' for roman counter. \begin{enumerate}[a)] \item Another level of list with alphabetical counter. \item One more item before we start another. \begin{enumerate}[(i)] \item This item has roman numeral counter. \item Another one before we close the third level. \end{enumerate} \item Third item in second level. \end{enumerate} \item All list items conclude with this step. \end{enumerate} \end{vquote} \vspace*{12pt} \deforange{blue!70} \src{List -- Enumerate} \includeclip{4}{1 1 453 185}{jfigs.pdf} \deforange{orange} Further, the enhanced list environment allows one to prefix a string like `step' to all the item numbers. Take a look at the example below: \begin{vquote} \begin{enumerate}[Step 1.] \item This is the first step of the example list. \item Obviously this is the second step. \item The final step to wind up this example. \end{enumerate} \end{vquote} \deforange{blue!70} \src{List -- enhanced} \includeclip{5}{1 1 313 83}{jfigs.pdf} \deforange{orange} \vspace*{-18pt} \section{Cross-references} In electronic publications, articles may be internally hyperlinked. Hyperlinks are generated from proper cross-references in the article. For example, the words \textcolor{black!80}{Fig.~1} will never be more than simple text, whereas the proper cross-reference \verb+\ref{tiger}+ may be turned into a hyperlink to the figure itself: \textcolor{blue}{Fig.~1}. In the same way, the words \textcolor{blue}{Ref.~[1]} will fail to turn into a hyperlink; the proper cross-reference is \verb+\cite{Knuth96}+. Cross-referencing is possible in \LaTeX{} for sections, subsections, formulae, figures, tables, and literature references. \section[Mathematical ...]{Mathematical symbols and formulae} Many physical/mathematical sciences authors require more mathematical symbols than the few that are provided in standard \LaTeX. A useful package for additional symbols is the \file{amssymb} package, developed by the American Mathematical Society. This package includes such oft-used symbols as $\lesssim$ (\verb+\lesssim+), $\gtrsim$ (\verb+\gtrsim+) or $\hbar$ (\verb+\hbar+). Note that your \TeX{} system should have the \file{msam} and \file{msbm} fonts installed. If you need only a few symbols, such as $\Box$ (\verb+\Box+), you might try the package \file{latexsym}. Another point which would require authors' attention is the breaking up of long equations. When you use \file{elsarticle.cls} for formatting your submissions in the \verb+preprint+ mode, the document is formatted in single column style with a text width of 384pt or 5.3in. When this document is formatted for final print and if the journal happens to be a double column journal, the text width will be reduced to 224pt at for 3+ double column and 5+ journals respectively. All the nifty fine-tuning in equation breaking done by the author goes to waste in such cases. Therefore, authors are requested to check this problem by typesetting their submissions in final format as well just to see if their equations are broken at appropriate places, by changing appropriate options in the document class loading command, which is explained in section~\ref{sec:usage}, \nameref{sec:usage}. This allows authors to fix any equation breaking problem before submission for publication. \file{elsarticle.cls} supports formatting the author submission in different types of final format. This is further discussed in section \ref{sec:final}, \nameref{sec:final}. \section{Bibliography} Three bibliographic style files (\verb+*.bst+) are provided --- \file{elsarticle-num.bst}, \file{elsarticle-num-names.bst} and \file{elsarticle-harv.bst} --- the first one for the numbered scheme, the second for the numbered with new options of \file{natbib.sty} and the last one for the author year scheme. In \LaTeX{} literature, references are listed in the \verb+thebibliography+ environment. Each reference is a \verb+\bibitem+ and each \verb+\bibitem+ is identified by a label, by which it can be cited in the text: \verb+\bibitem[Elson et al.(1996)]{ESG96}+ is cited as \verb+\citet{ESG96}+. \noindent In connection with cross-referencing and possible future hyperlinking it is not a good idea to collect more that one literature item in one \verb+\bibitem+. The so-called Harvard or author-year style of referencing is enabled by the \LaTeX{} package \file{natbib}. With this package the literature can be cited as follows: \begin{enumerate}[\textbullet] \item Parenthetical: \verb+\citep{WB96}+ produces (Wettig \& Brown, 1996). \item Textual: \verb+\citet{ESG96}+ produces Elson et al. (1996). \item An affix and part of a reference: \verb+\citep[e.g.][Ch. 2]{Gea97}+ produces (e.g. Governato et al., 1997, Ch. 2). \end{enumerate} In the numbered scheme of citation, \verb+\cite{<label>}+ is used, since \verb+\citep+ or \verb+\citet+ has no relevance in the numbered scheme. \file{natbib} package is loaded by \file{elsarticle} with \verb+numbers+ as default option. You can change this to author-year or harvard scheme by adding option \verb+authoryear+ in the class loading command. If you want to use more options of the \file{natbib} package, you can do so with the \verb+\biboptions+ command, which is described in the section \ref{sec:usage}, \nameref{sec:usage}. For details of various options of the \file{natbib} package, please take a look at the \file{natbib} documentation, which is part of any standard \LaTeX{} installation. \subsection*{Displayed equations and double column journals} Many Elsevier journals print their text in two columns. Since the preprint layout uses a larger line width than such columns, the formulae are too wide for the line width in print. Here is an example of an equation (see equation 6) which is perfect in a single column preprint format: \bigskip \setlength\Sep{6pt} \src{See equation (6)} \deforange{blue!70} \includeclip{4}{134 391 483 584}{els1.pdf} \deforange{orange} \noindent When this document is typeset for publication in a model 3+ journal with double columns, the equation will overlap the second column text matter if the equation is not broken at the appropriate location. \vspace*{6pt} \deforange{blue!70} \src{See equation (6) overprints into second column} \includeclip{3}{61 531 532 734}{els-3pd.pdf} \deforange{orange} \pagebreak \noindent The typesetter will try to break the equation which need not necessarily be to the liking of the author or as it happens, typesetter's break point may be semantically incorrect. Therefore, authors may check their submissions for the incidence of such long equations and break the equations at the correct places so that the final typeset copy will be as they wish. \section{Final print}\label{sec:final} The authors can format their submission to the page size and margins of their preferred journal. \file{elsarticle} provides four class options for the same. But it does not mean that using these options you can emulate the exact page layout of the final print copy. \lmrgn=3em \begin{description} \item [\texttt{1p}:] $1+$ journals with a text area of 384pt $\times$ 562pt or 13.5cm $\times$ 19.75cm or 5.3in $\times$ 7.78in, single column style only. \item [\texttt{3p}:] $3+$ journals with a text area of 468pt $\times$ 622pt or 16.45cm $\times$ 21.9cm or 6.5in $\times$ 8.6in, single column style. \item [\texttt{twocolumn}:] should be used along with 3p option if the journal is $3+$ with the same text area as above, but double column style. \item [\texttt{5p}:] $5+$ with text area of 522pt $\times$ 682pt or 18.35cm $\times$ 24cm or 7.22in $\times$ 9.45in, double column style only. \end{description} Following pages have the clippings of different parts of the title page of different journal models typeset in final format. Model $1+$ and $3+$ will have the same look and feel in the typeset copy when presented in this document. That is also the case with the double column $3+$ and $5+$ journal article pages. The only difference will be wider text width of higher models. Therefore we will look at the different portions of a typical single column journal page and that of a double column article in the final format. \vspace*{2pc} \begin{center} \hypertarget{bsc}{} \hyperlink{sc}{ {\bf [Specimen single column article -- Click here]} } \vspace*{2pc} \hypertarget{bsc}{} \hyperlink{dc}{ {\bf [Specimen double column article -- Click here]} } \end{center} \newpage \vspace*{-2pc} \src{}\hypertarget{sc}{} \deforange{blue!70} \hyperlink{bsc}{\includeclip{1}{121 81 497 670}{els1.pdf}} \deforange{orange} \newpage \src{}\hypertarget{dc}{} \deforange{blue!70} \hyperlink{bsc}{\includeclip{1}{55 93 535 738}{els-3pd.pdf}} \deforange{orange} \end{document}
\section{Introduction} \label{intro} Despite deep neural networks impressive success in many real-world problems, they suffer from instability under test-time adversarial noise. Training the network based on the adversarial samples in each mini-batch, which is known as ``Adversarial training" (AT) \cite{madry2018}, has been empirically established as a general and effective approach to remedy this issue. Multi-step gradient-based maximization of the loss function with respect to the norm-bounded perturbations is often used to craft the adversarial samples in AT. This method is known as Projected Gradient Descent (PGD) attack and results in reasonably well generalization of the adversarially trained networks under many strong attacks \cite{carlini2017towards}, under the same/similar threat models. The iterative process, however, makes this method very slow and sometimes infeasible in case of large datasets and models. Fast Gradient Sign Method (FGSM) \cite{Goodfellow2015ExplainingAH}, which is the single-step PGD, is much faster but results in poor generalization under the stronger multi-step PGD attack. Recently, few attempts have been made to address the generalization issues of FGSM \cite{wong2020fast}. ``Fast," introduced FGSM-RS, an extended version of FGSM by adding a random uniform noise prior to applying FGSM. Although this method can noticeably improve vanilla FGSM-trained networks, it suffers from an unknown phenomenon called “catastrophic overfitting” \cite{wong2020fast}. This refers to a sudden and drastic drop of the adversarial test accuracy, under a stronger PGD attack, at a single epoch, although the training robust accuracy under FGSM continues to go up. That is, a large gap between FGSM and PGD losses can be seen after this epoch. At a first look, this event can be seen as an overfitting to the FGSM attack due to the weakness of FGSM attack \cite{wong2020fast}, but the suddenness of this failure warrants the need for deeper explanations. Following this track, understanding catastrophic overfitting, and improving the FGSM training has recently gained attention \cite{li2020towards, kim2020understanding, vivek2020single, vivek2020regularizers, andriushchenko2020understanding}. \cite{li2020towards} noticed that by inspecting the test robust accuracy at the mini-batch resolution, catastrophic overfitting happens even in successful runs of FGSM training. They hypothesized that the initial random noise in FGSM-RS serves as a way to recover from such drops in the model robustness, but because of the noise randomness, this recovery may fail with a non-zero probability. According to this hypothesis, they proposed to use PGD training as a better recovery mechanism whenever overfitting happens. They were able to mitigate the issue with only a 2-3 times training slowdown compared to training with FGSM, which is indeed fascinating. However, this method does not take a step toward explaining why the overfitting happens. Another downside is that the attacks like PGD are multi-step and cannot be parallelized to run as fast as single-step attacks on current computational units. As another solution, \cite{vivek2020regularizers} proposed to regularize the difference in network logits for the FGSM and iterative-FGSM perturbed inputs to be close to zero in a few mini-batches. They have empirically shown that such a regularization could prevent gradient masking. On the other hand, \cite{kim2020understanding} takes another perspective and points out that due to FGSM perturbations always lying on the boundaries of the $\ell_\infty$ ball, the network loss faces the so-called ``boundary distortion." This distortion makes the loss surface highly curved, and consequently results in the model becoming non-robust against smaller perturbations. Therefore, they proposed to evaluate the loss at various multiples of the FGSM direction, where multiples are between 0 and 1 and use the smallest multiple that results in misclassification. Among the most insightful attempts, GradAlign \cite{andriushchenko2020understanding} hypothesized that large variations of the input gradient around a sample cause the FGSM direction to be noisy and irrelevant, and consequently result in poor attack quality and overfitting. They backed up their hypothesis by theoretically showing that the angle between local input gradients is upper-bounded prior to the training for an appropriate Gaussian weight initialization. This partly explains why it takes a few epochs before catastrophic overfitting occurs. Based on this explanation, they proposed to regularize the optimization by constraining such variations to be small. This proved to be effective in a lot of cases where FGSM fails. However, the mentioned regularization requires a sequential procedure called ``double-backpropagation," and increases the training time by a factor of 2-3 compared to the vanilla FGSM-training. Furthermore, neither of the explanations in earlier work fully characterize such an event, e.g. why such drops in the robust generalization occur so quickly. In this paper, we hypothesize and support that tiny input gradients play a key role in catastrophic overfitting. Our intuition is that due to the incontinuity of the ``sign" function in FGSM, elements of the input gradient that are close to zero could cause drastic change in the attack and large weight updates in two consecutive epochs. This tends to take place later in the training, as it has been empirically observed that adversarially robust models yield sparser input gradients, resulting in many close to zero gradient elements later in training. Based on this explanation, in crafting the FGSM attacks, we propose to zero out the input gradient elements whose absolute values are below a certain threshold. As an alternative solution, we propose to zero out gradient elements that have inconsistent signs across multiple random starts. We observe that such simple remedies prevent catastrophic overfitting and result in competitive robust accuracies. Our proposed scheme, as opposed to the prior work, does not have any significant train-time overhead, or could else be parallelized. In addition, we notice that based on our theoretical insight about large sudden weight updates, regularizing second derivative of the loss, which is implicitly done in GradAlign, could help to avoid overfitting. This also highlights the generality of our insights. Our contributions are summarized below: \begin{itemize} \item a more comprehensive explanation of catastrophic overfitting; \item two simple yet effective remedies based on our explanation to avoid this issue; \item competitive adversarial accuracy on various datasets under no significant train-time overhead, considering the possibility of parallelization. \end{itemize} \section{Causes of Catastrophic Overfitting} \label{section-2} In this section, we provide some theoretical insights into why catastrophic overfitting happens, and why it is sudden and is often observed in later epochs of training. We then back up our hypothesis with some numerical results. \subsection{Theoretical Insights} Let $f(x, W)$ represent a classification hypothesis (e.g. a deep neural network) with adjustable parameters $W$ and input $x$, and $g(x, W) := \ell(f(x, W), y)$ be the loss function, with $y$ as the ground-truth label that is used in training (e.g. cross-entropy loss). Further let $\eta_i = \epsilon \sgn \nabla_x g(x_i, W)$ be the FGSM attack on the data point $x_i$. So $x^\prime_i = x_i + \alpha \eta_i$ represents the adversarial example by FGSM, where $\alpha$ is the FGSM step size. We are implicitly solving the following optimizing during the FGSM training: \begin{equation} \min_W \sum_{i} g(x^\prime_i, W) \end{equation} A necessary condition for the optimizer of this loss in the local minimum is the following: \begin{equation} \label{Suff_cond} \begin{split} \nabla_W & \sum_i g(x^\prime_i, W) \\ & = \sum_{i} \alpha \left\{\nabla_W \eta_i\right\} \bigg\rvert_{(x_i, W)} .\left\{\nabla_x g \right\} \bigg\rvert_{(x^\prime_i, W)} \\ & ~~~~~~~~~~~~~ + \nabla_W g \bigg\rvert_{(x^\prime_i, W)} \\ & = {\bf 0} \end{split} \end{equation} But note that, \begin{equation} \label{grad_eta} \nabla_W \eta_i = \epsilon \left\{ \nabla_{W, x} g \right\} . \left\{ \diag(\delta(\nabla_x g)) \right\} \bigg\rvert_{(x_i, W)}, \end{equation} where $\delta(.)$ is the Dirac delta function. Assume that for the $i$-th training sample, there exists some element $j$ such that: \begin{itemize} \item $\text{(A1):} ~~~ [\nabla_x g]_j\big\rvert_{(x_i, W)} = 0$, \item $\text{(A2):} ~~~ [\nabla_x g]_j \big\rvert_{(x^\prime_i, W)} \neq 0$, and \item $\text{(A3)}: ~ [\nabla_{W, x}g]^{(j)}\big\rvert_{(x_i, W)} \neq {\bf 0}$, \end{itemize} where $[a]_j$ and $[B]^{(j)}$ denote the $j$-th element of the vector $a$, and the $j$-th column of the matrix $B$, respectively. Under (A1), the $j$-th column of $\nabla_W \eta_i$, denoted as $[\nabla_W \eta_i]^{(j)}$, would be an $\infty$ multiple of a non-zero vector ($[\nabla_{W, x} g]^{(j)}$), according to the Eq. \ref{grad_eta}, assumption (A3), and due to the delta function being infinite at zero. In addition, note that the first term in left-hand side of Eq. \ref{Suff_cond} is a weighted summation of column vectors, each with the size of weights: \begin{equation} \label{weighted_sum} \left\{\nabla_W \eta_i\right\} \bigg\rvert_{(x_i, W)}.\left\{\nabla_x g \right\} \bigg\rvert_{(x^\prime_i, W)} = \sum_k [\nabla_W \eta_i]^{(k)} [\nabla_x g]_k \end{equation} Therefore, as $[\nabla_W \eta_i]^{(j)}$ is an $\infty$ multiple of a non-zero vector and $[\nabla_x g]_k \neq 0$, according to (A2), the summation in Eq. \ref{weighted_sum} would contain a multiple of $\infty$. The term $\nabla_W g$ is the weight update that is made during FGSM adversarial training, and according to the Eq. \ref{Suff_cond} is negative of the weighted sum in Eq. \ref{weighted_sum}. Therefore, once getting close to a local minimum in the weight space, the network may experience a huge weight update, which corresponds to the mentioned $\infty$ multiple of $[\nabla_{W, x} g]^{(j)}$ at $x_i$. A simple way to break (A1) and (A2) is to force the input gradients change smoothly, which is implicitly achieved in GradAlign. Properly clipping the gradient updates of the network's weights might be a way to prevent catastrophic overfitting from happening. Although we do not investigate gradient clipping in our work, we include some initial results in Appendix~\ref{appendix-c5} for future research. The other possibility to mitigate the issue is to zero out tiny input gradients so that the training would not encounter large weight updates close to the local optima. Also motivated by this explanation, we could design the attack based on various random starts and zeroing elements of the attack that are changing across various random starts. This helps to ensure that $\eta_i$ would probably not change too much after the weight update, that is, $\nabla_W \eta_i$ would probably remain small. We will next empirically validate this insight by some experiments on the CIFAR-10 dataset. \subsection{Numerical Results} \begin{figure}[!ht] \vskip 0.2in \begin{center} \centerline{ \includegraphics[width=\columnwidth]{sheet1.png}} \centerline{ \includegraphics[width=\columnwidth]{sheet2.png}} \centerline{ \includegraphics[width=\columnwidth]{sheet3.png}} \caption{MSE difference of weights, related to three kernels in the convolution layers of the model, before and after updating the model in each epoch (blue), and the test adversarial accuracy of the model (red). The model is trained on the CIFAR-10 dataset with batch size = 128, $\epsilon$ = 8/255, and FGSM-alpha = 2.} \label{weight_update} \end{center} \vskip -0.2in \end{figure} Motivated by the explained insights, we tried to observe the trend of a few statistics during the training of a Preact ResNet-18 model on CIFAR-10, specifically exactly at the step when the catastrophic overfitting happens. Here, we use the same default setting for training that is provided in \cite{wong2020fast}. We observe the $\ell_2$ norm of difference in parameters of the model before and after updating the model in an epoch. Interestingly, a huge significant change in parameters is seen exactly at the same epoch that catastrophic overfitting happens. Fig. \ref{weight_update} displays the weight update of three parameters of the network, indicating a huge weight update exactly simultaneous to the drop of test adversarial accuracy of the model. Another observation is the significant change in the FGSM perturbations of a mini-batch before and after catastrophic overfitting, which is shown at top of Fig. \ref{attack_difference}. The jump in the perturbation difference is in accordance with our hypothesis that once the FGSM-trained model gets close to the convergence, the derivative of FGSM perturbations could increase sharply. Due to the idea that tiny elements of the gradient bring about the drastic change of the model, we try to verify that whether ignoring small gradients in FGSM could change this observation or not. To achieve this, we test the difference between FGSM perturbations of a mini-batch in two consecutive epochs when zeroing tiny elements of the input gradient. Specifically, we changed the 35\% lower quantile of the absolute input gradients to zero and acquired the perturbation difference by this modified gradient. MSE based on the difference of perturbations of the same mini-batch in this setting is shown at the bottom of Fig. \ref{attack_difference}. Clearly, in this case, the drastic change of perturbations is prevented. This intuition can help us to propose our new methods based on the single-step attack that is potentially safe from catastrophic overfitting. \begin{figure}[ht] \vskip 0.2in \begin{center} \centerline{ \includegraphics[width=\columnwidth]{delta_diff_vanilla.png}} \centerline{ \includegraphics[width=\columnwidth]{images/delta_diff_q35__1_.png}} \caption{MSE based on the difference in batch perturbations of each two consecutive epochs (blue), and test adversarial accuracy of the model (red). The top diagram refers to training by FGSM-RS. The bottom diagram refers to training by the method that is similar to FSM-RS, but with zeroing 35\% lower quantile of absolute gradients. The model is trained on the CIFAR-10 dataset with batch size = 128, $\epsilon$ = 8/255, and FGSM-alpha = 2.} \label{attack_difference} \end{center} \vskip -0.2in \end{figure} \section{Proposed Method} \label{method} According to the given insights, we expect that huge weight updates be avoided by zeroing the tiny gradients; or instead zeroing elements of attack that are not the same across different random starts. Next, we describe these methods in more detail. \subsection{ZeroGrad} Let $\delta$ be the perturbation that is designed based on FGSM. We propose to take $\bar{\delta} := \delta \odot \mathbb{I}(|\nabla_x g| \geq t)$, where $\mathbb{I}(.)$ is the indicator function, $\odot$ is the element-wise product, and $t$ is a threshold. To make selection of $t$ easier, we propose to adapt $t$ to the sample and use the lower $q$-quantile of the absolute value of the input gradient for each sample. We note that as long as $t$ is small, the loss function would not change too much compared to the original FGSM attack: \begin{equation} \begin{split} g(x+\bar{\delta}) & \approx g(x) + \bar{\delta}^\top \nabla_x g \\ & \geq g(x) + \delta^\top \nabla_x g - \epsilon \sum_{|[\nabla_x g]_i| \leq t} | [\nabla_x g]_i | \\ & \geq \underbrace{ g(x) + \delta^\top \nabla_x}_{\approx g(x+\delta)} - \epsilon d q t, \end{split} \end{equation} where $d$ is the input dimension, and $t$ is assumed to the be the quantile threshold as described earlier. Therefore, the new perturbation $\bar{\delta}$ is still adversarial for small $t$. By tuning the threshold and zeroing out the lower gradients, we are able to avoid catastrophic overfitting altogether without sacrificing too much accuracy as shown in section \ref{experiments}. The pseudo code for this method is shown in Alg. \ref{alg:zerograd}. \begin{algorithm}[tb] \caption{ZeroGrad} \label{alg:zerograd} \begin{algorithmic} \STATE {\bfseries Input:} number of epochs $T$, maximum perturbation $\epsilon$, quantile value $q$, step size $\alpha$, dataset of size $M$, network $f_{\theta}$ \STATE {\bfseries Output:} Robust network $f_{\theta}$ \FOR{$t=1$ {\bfseries to} $T$} \FOR{$i=1$ {\bfseries to} $M$} \STATE $\delta \sim \Uniform([-\epsilon, \epsilon]^d)$ \STATE $\nabla_{\delta} \leftarrow \nabla_{\delta} \ell (f_{\theta}(x_i + \delta), y_{i})$ \STATE $\nabla_{\delta} [\nabla_{\delta} < \quantile(|\nabla_{\delta}|, q)] \leftarrow 0$ \STATE $\delta \leftarrow \delta + \alpha \cdot \sgn(\nabla_{\delta})$ \STATE $\delta \leftarrow \max(\min(\delta, \epsilon), -\epsilon)$ \STATE // Update network parameters with some optimizer \STATE $\theta \leftarrow \theta - \nabla_{\theta} \ell (f_{\theta}(x_i + \delta), y_{i})$ \ENDFOR \ENDFOR \end{algorithmic} \end{algorithm} \subsection{MultiGrad} We try to tackle the problem of zeroing out \emph{problematic} gradient elements by identifying the \emph{fragile} ones in a different way. While it does seem that these fragile gradients are generally of small magnitude, we have no reason to believe that all gradients of small magnitude are fragile. Thus it would seem that in the process of zeroing out all gradients below a certain threshold, we are eliminating perturbations that are not necessarily contributing to catastrophic overfitting, and losing some robustness as a result. As is the sake of the name, these fragile gradients easily change their sign as we move in the $\epsilon$ ball around our sample. Let $\delta_1, \delta_2, \ldots, \delta_k$ be $k$ different FGSM-RS perturbations corresponding to $k$ random starting positions. Let $A$ be the set of indices of the input gradient elements where these perturbations \emph{all} agree on the same sign: \begin{equation} \begin{split} A=\{i | \ 1\leq\ i\ \leq\ d ,\ [\sgn(\delta_{1})]_i \ = ~ & [\sgn(\delta_{j})]_i \ \\ &\forall : 1 < j \leq k\} \end{split} \end{equation} We define $\bar{\delta}^\prime$ as the perturbation that is equal to $\delta_{1}$ for the elements that are corresponding to the indices of $A$, and equal to zero for the rest. Details of the algorithm is given in the Alg. \ref{alg:multigrad}. \begin{algorithm}[tb] \caption{MultiGrad} \label{alg:multigrad} \begin{algorithmic} \STATE {\bfseries Input:} number of epochs $T$, maximum perturbation $\epsilon$, number of samples $N$, step size $\alpha$, dataset of size $M$, network $f_{\theta}$ \STATE {\bfseries Output:} Robust network $f_{\theta}$ \FOR{$t=1$ {\bfseries to} $T$} \FOR{$i=1$ {\bfseries to} $M$} \STATE $\nabla_{\delta_{1..N}} \leftarrow {\bf 0}$ \FOR{$j=1$ {\bfseries to} $N$ (in parallel)} \STATE $\delta_j \sim \Uniform([-\epsilon, \epsilon]^d)$ \STATE $\nabla_{\delta_j} \leftarrow \nabla_{x} \ell (f_{\theta}(x_i + \delta_j), y_{i})$ \ENDFOR \STATE $\omega \leftarrow \frac{1}{N} \sum_{j=1}^{N} \sgn(\nabla_{\delta_j})$ \STATE $\nabla_{\delta} \leftarrow 0$ \STATE $\nabla_{\delta} [|\omega|==1] \leftarrow \nabla_{\delta_1}$ \STATE $\delta \leftarrow \alpha \cdot \sgn(\nabla_{\delta})$ \STATE $\delta \leftarrow \max(\min(\delta, \epsilon), -\epsilon)$ \STATE // Update network parameters with some optimizer \STATE $\theta \leftarrow \theta - \nabla_{\theta} \ell (f_{\theta}(x_i + \delta), y_{i})$ \ENDFOR \ENDFOR \end{algorithmic} \end{algorithm} \section{Experiments} \label{experiments} In this section, we demonstrate the effectiveness of our proposed methods on CIFAR-10, CIFAR-100, and SVHN datasets. We compare ZeroGrad and MultiGrad with Fast (FGSM-RS) and GradAlign, based on the standard test accuracy, and robust test accuracy. For each method, the standard deviation and the average of the test accuracies are calculated by training the models using two random seeds. {\bfseries Attacks and models.} To report the robust accuracy of our models on the test data, we attack the models with the PGD adversarial attack with 50 steps, 10 restarts, and step size $\alpha=2/255$. We also evaluate our methods based on AutoAttack \cite{croce2020reliable} to make sure that our methods do not suffer from the gradient obfuscation (Appendix~\ref{appendix-a}). The network that is used for training is Preact ResNet-18 \cite{he2016identity}. The results for training with WideResNet-34 are also available in the Appendix~\ref{appendix-c1}, which have better accuracies compared to training with Preact ResNet-18, but the training is much slower. {\bfseries Learning rate schedules.} There are two types of learning rate schedules that are used for our experiments. The first one is the \emph{cyclical learning rate schedule} \cite{smith2017cyclical}, which helps us get a faster convergence with a fewer number of epochs. We set the cyclical learning rate schedule to reach its maximum learning rate when half of the epochs are passed. The other one is \emph{one-drop learning rate schedule}, which starts with a fixed learning rate and decreases it by a factor of 10 in the last few epochs. For example, if we want to train for 52 epochs and the initial learning rate is 0.1, we drop the learning rate to 0.01 in the 50-th epoch. The reason for stopping the training a few epochs after the drop of the learning rate is to prevent the normal overfitting of the model to the training data \cite{rice2020overfitting}. If the training continues after the learning rate drop, the robust training loss keeps on decreasing but the robust test loss would increase. Note that if the training continues after the learning rate drop, catastrophic overfitting does not happen using ZeroGrad with suitable $q$ or MultiGrad with $N=3$. But it results in worse robust test accuracy due to the general overfitting in adversarial training, which is different from catastrophic overfitting. The one-drop learning rate is not used in the experiments reported in this section. But results with this learning rate schedule are provided in Appendix~\ref{appendix-c3}, as it enables the model to achieve better accuracy if it is trained for more epochs. {\bfseries Setup for our proposed methods.} For the ZeroGrad method, we use different values of $q$ based on the dataset, size of the network, and $\epsilon$. But we always use the FGSM step size $\alpha=2.0$, which is the maximum possible step size for this method. For the MultiGrad method, we usually use three random samples ($N=3$) because it seems to be enough in most cases. The step size that we use for the MultiGrad method is $\alpha=1.0$. This is the maximum possible step size because in this method we add the final perturbation to the clean sample itself, unlike the ZeroGrad method that starts from a random point in the $\epsilon$ $\ell_\infty$-ball around the clean sample. More analysis on hyperparameters of our methods are available in Appendix~\ref{appendix-b}. \begin{table}[t] \caption{Standard and PGD-50 accuracy on the CIFAR-10 dataset with $\epsilon=8/255$ for different training methods. All models are trained with the cyclical learning rate schedule for 30 epochs.} \label{cifar10-ep8-table} \vskip 0.15in \begin{center} \begin{small} \begin{sc} \begin{tabular}{lcccr} \toprule Method & Standard Acc. & PGD-50 Acc.\\ \midrule ZeroGrad (q=0.35) & 81.61$\pm$ 0.24& 47.55$\pm$ 0.05\\ MultiGrad (N=3) & 81.38$\pm$ 0.30& {\bfseries 47.85$\pm$ 0.28}\\ FGSM-RS ($\alpha=1.25$) & 84.32$\pm$ 0.08& 45.10$\pm$ 0.56\\ GradAlign & 81.00$\pm$ 0.37& 47.58$\pm$ 0.24\\ \midrule PGD-2 & 82.15$\pm$ 0.48& 48.43$\pm$ 0.40\\ PGD-10 & 81.88$\pm$ 0.37& {\bfseries 50.04$\pm$ 0.79}\\ \bottomrule \end{tabular} \end{sc} \end{small} \end{center} \vskip -0.1in \end{table} \subsection{CIFAR-10 Results} For the CIFAR-10 dataset, we use the cyclic learning rate with a maximum learning rate of 0.2 and 30 epochs to be able to compare the results of our methods to the accuracies that are reported for the previously proposed methods. The results for maximum perturbation size $\epsilon=8/255$ are shown in Table~\ref{cifar10-ep8-table}. It seems that larger perturbation sizes like $\epsilon=16/255$, are not valid for the CIFAR-10 dataset, and can completely change labels of the perturbed images \cite{tramer2020fundamental}. However, we also investigated our methods on $\epsilon=16/255$ to see how it performs (see Appendix~\ref{appendix-c2}). Note that our methods can be trained for a higher number of epochs. For example, with appropriate settings, we can train our models for 200 epochs with the piecewise learning rate schedule without encountering catastrophic overfitting. The results for training with more epochs, which lead to better accuracies are available in Appendix~\ref{appendix-c3}. \subsection{CIFAR-100 Results} To train our models on the CIFAR-100 dataset, we again use the cyclic learning rate with a maximum learning rate of 0.2 and 30 epochs of training. The models are trained with maximum perturbation size $\epsilon=8/255$. As can be seen in Table~\ref{cifar100-ep8-table}, our methods are able to outperform other models that are trained using single-step adversarial attacks. We keep in mind that although the difference between the robust accuracy of our methods and the GradAlign method might not be much, the main contribution of our methods is that they provide simplicity, speed, and high robust accuracy at the same time. \begin{table}[t] \caption{Standard and PGD-50 accuracy on the CIFAR-100 dataset with $\epsilon=8/255$ for different training methods. All models are trained with the cyclical learning rate schedule for 30 epochs.} \label{cifar100-ep8-table} \vskip 0.15in \begin{center} \begin{small} \begin{sc} \begin{tabular}{lcccr} \toprule Method & Standard Acc. & PGD-50 Acc.\\ \midrule ZeroGrad (q=0.45) & 53.70$\pm$ 0.23& 25.08$\pm$ 0.07\\ MultiGrad (N=3) & 53.32$\pm$ 0.35& {\bfseries 25.31 $\pm$ 0.03}\\ FGSM-RS ($\alpha$=1.25) & 49.33$\pm$ 0.57& 0.00$\pm$ 0.00\\ FGSM-RS ($\alpha$=1.0)& 56.94$\pm$ 0.25& 23.78$\pm$ 0.41\\ GradAlign & 51.92$\pm$ 0.18& 24.52$\pm$ 0.10\\ \midrule PGD-2 & 52.45$\pm$ 0.12& 26.72$\pm$ 0.02\\ PGD-10 & 51.29$\pm$ 0.30& {\bfseries 26.79$\pm$ 0.14}\\ \bottomrule \end{tabular} \end{sc} \end{small} \end{center} \vskip -0.1in \end{table} \subsection{SVHN Results} For our experiments on SVHN, we had a slightly different approach. As observed before, the SVHN dataset behaves in peculiar ways, and it seems that it requires a higher quantile for ZeroGrad to be able to prevent \emph{catastrophic overfitting}, i.e. $q =0.7$. We hypothesize that this is due to a large portion of the SVHN images not being relevant to the object of interest i.e. the house number, and therefore having much smaller gradients. Furthermore, a model trained on this dataset reaches relatively high test accuracies early in the training and then begins to get worse over the remaining epochs. While this phenomenon still remains unexplained to us and could be of interest for further research, it seems that early stopping does not hinder the \emph{maturity} of the model when trained with our methods. Hence we conduct the experiments in the following way. We train the model for 15 epochs using a cyclic learning rate schedule and we record the robust accuracy on a validation set every epoch. Once training is finished, we test the model with the highest recorded validation accuracy with PGD-50 with 10 restarts on the test set and report the results, which are shown in Table 3. \begin{table}[t] \caption{Standard and PGD-50 accuracy on the SVHN dataset with $\epsilon=8/255$ for different training methods. } \label{SVHN-ep8-table} \vskip 0.15in \begin{center} \begin{small} \begin{sc} \begin{tabular}{lcccr} \toprule Method & Standard Acc. & PGD-50 Acc.\\ \midrule ZeroGrad (q=0.7) & 88.36 $\pm$ 0.63 & 39.42 $\pm$ 1.92 \\ MultiGrad (N=3) & 90.25$\pm$ 0.74 & {\bfseries 43.66$\pm$1.06}\\ FGSM-RS ($\alpha$=0.875) & 92.25$\pm$ 0.01& 38.73$\pm$ 0.07\\ GradAlign & 92.36$\pm$ 0.47& 42.08$\pm$ 0.25\\ \midrule PGD-2 & 92.68$\pm$ 0.45& 47.28$\pm$ 0.26\\ PGD-10 & 91.92$\pm$ 0.40& {\bfseries 52.08$\pm$ 0.49}\\ \bottomrule \end{tabular} \end{sc} \end{small} \end{center} \vskip -0.1in \end{table} \subsection{Training Time} Without a doubt, one of the main motivations for the FGSM-based attacks is to be fast. Therefore, it is worth mentioning this aspect of our proposed methods. The running time for one epoch of training with ZeroGrad is almost equal to the FGSM-RS method \cite{wong2020fast}, since no extra computational overhead is needed in this approach, except for calculating the thresholds. For MultiGrad with the number of random samples $N=3$, the running time is double the running time of FGSM-RS. However, the strength of this method is that calculating the gradients for the random samples can be done in parallel, and by using multiple GPUs, we can reduce the training time. Note that this parallelization is not possible while training with multi-step adversarial attacks like PGD. So approaches like \cite{li2020towards} can not reduce the training time as much as FGSM-RS \cite{wong2020fast}. In addition, GradAlign is more than two times slower than FGSM-RS and also cannot be parallelized \cite{andriushchenko2020understanding}. The half-precision calculation technique \cite{micikevicius2017mixed}, which leads to nearly two times speedup in FGSM training, can also be used to speed up our methods without having a considerable effect on the standard or robust accuracy of our models. The reported results in our experiments are without using the half-precision technique. The type of GPUs and other system specifications are inconsistent across papers and does not make much sense to compare the reported ones. In our experiments, by using T4 GPU, the training time of different methods for 30 epochs, using half-precision \cite{micikevicius2017mixed} on CIFAR-10 is: FGSM-RS: 22.5, ZeroGrad: 22.6, MultiGrad: 43.9 (non-parallelized), GradAlign: 87.9, PGD-2: 33.8, PGD-10: 124.2 minutes. \subsection{Perceptually Aligned Gradients by MultiGrad} As seen before, adversarially trained models seem to have meaningful gradients with respect to the input image and align well with the human perception \cite{tsipras2018robustness}. The gradient is of larger values on the pixels relating to the object of interest, i.e. the foreground. We show that after applying the MultiGrad algorithm, the resulting \emph{gradient} preserves this property, which is non-trivial. The results acquired from applying the MultiGrad (N=3) algorithm to various images, pertaining to a Preact ResNet18 model trained on FGSM-RS (before overfitting) can be seen in Fig.~\ref{gradient pictures}. We observed that final gradients acquired from MultiGrad algorithm is also aligned with the perceptually relevant features. This confirms that during this algorithm, valuable gradients have been saved, and it only zeros out fragile gradients, which are mostly non-relevant pixels. \begin{figure}[ht] \vskip 0.2in \includegraphics[scale=0.7]{images/car1_img.png} \includegraphics[scale=0.7]{images/dog1_img.png} \includegraphics[scale=0.7]{images/car2_img.png} \includegraphics[scale=0.7]{images/frog2_img.png} \\ \\ \includegraphics[scale=0.7]{images/car1_g.png} \includegraphics[scale=0.7]{images/dog1_g.png} \includegraphics[scale=0.7]{images/car2_g.png} \includegraphics[scale=0.7]{images/frog2_g.png} \\ \\ \includegraphics[scale=0.7]{images/car1_c.png} \includegraphics[scale=0.7]{images/dog1_c.png} \includegraphics[scale=0.7]{images/car2_c.png} \includegraphics[scale=0.7]{images/frog2_c.png} \\ \caption{ The first row are the input images, the second row are the gradients with respect to the images, and the third row are the gradients that are acquired after applying MultiGrad. As can be seen, the second and third rows are nearly identical and closely related to the foreground object, which shows that Multigrad zeros gradient only in the irrelevant pixels.} \label{gradient pictures} \end{figure} \section{Ablation studies} In this section, we discuss the effects of hyperparameters that are used in our proposed methods. We mention a rationale and rule of thumb for choosing hyperparameters for a new problem and also introduce a practical technique for adjusting hyperparameters. Finally, we test whether the benefits of the proposed methods originate mainly from lowering the attack $\ell_2$ norm. Additional experiments about the settings of the two suggested methods are available in the Appendix. \subsection{Hyperparameters selection} Each of the suggested methods has one main hyperparameter that needs to be adjusted. In ZeroGrad, $q$ is used to determine the threshold for zeroing the gradients based on the lower $q$-quantile of the absolute value of the loss input gradient. The suitable choice of $q$ is related to the given problem and dataset. As mentioned in the previous sections, by zeroing, we are ignoring the small gradients that have less importance, i.e. not relevant to the main object of interest in the sample. This appears to be related to the given task, i.e. what percentage of pixels have no/little information about predicting the output. Therefore, the dataset can give us some hints about the percentage of pixels that are informative. Our estimation about the average percentage of such pixels in the images of our dataset provides us a clue to choose the appropriate $q$. This reasoning can also be used in MultiGrad for choosing $N$, the number of random samples. In this regard, a high percentage of irrelevant and less important parts, is a sign for a larger $q$ in ZeroGrad, or the higher number of samples needed to check their agreement on the same sign in MultiGrad. For example, SVHN dataset contains real-world images that have few digits as a house number and a usually large portion as background. Through inspecting the images, we realize that many of the pixels have no considerable information about the class label of the images in this dataset. Confirming this point, we observe in our experiments that for SVHN dataset, larger $q$ and higher $N$ is needed to prevent catastrophic overfitting, especially in comparison with CIFAR-10 and CIFAR-100 datasets. \subsection{Adjusting the Hyperparameter by Rolling Back} In addition to the initial estimation of hyperparameters according to the learning problem and the dataset, it is possible to adjust hyperparameters by a rolling back approach. We can choose an approximate $q_0$ in the beginning, and start adversarial training using ZeroGrad with $q_0$. We save checkpoints during training to make rolling back possible. Once faced by the catastrophic overfitting phenomenon, we stop the training, increase the chosen $q$ hyperparameter and adjust it to $q_1$, which is larger than $q_0$. We then continue the training with the ZeroGrad algorithm, resuming from a saved checkpoint at the epoch right before catastrophic overfitting. We tested this idea on CIFAR-10, and successfully trained the model for more than 100 epochs without overfitting, starting from $q_0$ equal to 0.25 and increasing it to 0.45 during the experiment. \subsection{Mean perturbation size} One may argue that zeroing certain elements of the input gradients, results in lower $\| \delta \|_2$, and similar results could effectively be obtained by lowering the FGSM step size. We note that lowering the perturbation $\ell_2$ norm has earlier been shown to be helpful in avoiding catastrophic overfitting \cite{andriushchenko2020understanding}. To investigate this further, we compare different methods based on their average perturbation $\ell_1$ norm. We compare our proposed techniques with simply reducing the FGSM step size $\alpha$ to decrease the perturbation size during training on the CIFAR-10 dataset. The results that are reported in Table~\ref{mean-pert-table}, are calculated based on the whole training set samples once at the beginning of the training in the second epoch, and once at the end of the training in 52-nd epoch. All different methods either have a fixed perturbation size during the training, or their perturbation size decreases as the model gets more robust to the adversarial attacks. It can be seen that by reducing the FGSM-RS step size to 1.0, the perturbation size would be less than both of our proposed methods, but its PGD-50 test robust accuracy would be 45.44\%, which is less than what our methods can achieve, which is 47.85\%. Overall, FGSM-RS cannot reach a test robust accuracy close to our methods with any value of the FGSM step size $\alpha$. So what our methods are doing is not simply reducing the perturbation size. \begin{table}[t] \caption{$\ell_1$ perturbation norm (multiplied by 255) at the second and the 52-nd epochs during training with one-drop learning rate schedule for 52 epochs. The training is done on the CIFAR-10 dataset with $\epsilon=8/255$, and FGSM step size of 2 for ZeroGrad and 1 for MultiGrad.} \label{mean-pert-table} \vskip 0.15in \begin{center} \begin{small} \begin{sc} \begin{tabular}{lcccr} \toprule Method & 2nd epoch & 52nd epoch\\ \midrule ZeroGrad (q=0.35) & 6.52 & 6.49\\ MultiGrad (N=3) & 7.15 & 6.13\\ FGSM-RS ($\alpha=1.0$) & 5.96 & 5.95\\ FGSM-RS ($\alpha=1.25$) & 6.81 & 6.78\\ GradAlign & 7.89 & 7.89\\ PGD-2 & 7.21 & 6.67\\ PGD-10 & 7.52 & 7.16\\ \bottomrule \end{tabular} \end{sc} \end{small} \end{center} \vskip -0.1in \end{table} \section{Conclusion and Future Work} A number of recent work tried to understand FGSM and FGSM-RS adversarial training, its unknown phenomenon, ``catastrophic Overfitting," and also suggest solutions for preventing this from happening. However, existing explanations do not tell any acceptable answer to some questions about some aspects of this phenomenon like its suddenness. Furthermore, the previously suggested solutions usually suffer from the increased training time, contrasting with the aim of less computational cost by using single-step attacks in adversarial training. In this work, we aimed to present a more comprehensive explanation for catastrophic overfitting. Our hypothesis highlights the role of tiny and fragile input gradients in the training with fast gradient sign method. Based on this intuition, we proposed two simple effective methods. Our empirical results show that our methods prevent catastrophic overfitting, and achieve competitive adversarial accuracy with no significant train-time overhead. A more comprehensive study of why the large weight update is corrupting adversarial robustness remains as a subject of future work. This could potentially result in more useful insights, and lead to further advance single-step attacks for the adversarial training.
\section{Introduction} \label{sc:intro} Many swimming microorganisms propel themselves by periodically beating the active slender appendages on the cell surfaces. These slender appendages are known as cilia or flagella depending on their lengths and distribution density. Eukaryotic flagella, such as the ones in mammalian sperm cells and algae cells, are often found in small numbers, whereas ciliated swimmers such as {\em Paramecium} and {\em Opalina} present more than hundreds of cilia densely packed on the cell surfaces~\citep{Brennen1977, Witman1990}. Besides the locomotion function for microswimmers, cilia inside mammals serve various other functions such as mucociliary clearance in the airway systems and transport of egg cells in fallopian tubes~(see \citet{Satir2007}, and reference therein). Cilia are also found to be critical in transporting cerebrospinal fluid in the third ventricle of the mouse brain~\citep{Faubel2016} and in creating active flow environments to recruit symbiotic bacteria in a squid-vibrio system~\citep{Nawroth2017}. Owing to the small length scale of cilia, the typical Reynolds number is close to zero. In this regime, inertia is negligible and the dynamics are dominated by the viscous effects. As a result, many effective swimming strategies familiar to our everyday life become futile. For example, waving a rigid tail back-and-forth will not generate any net motion over one period. This is known as the time reversibility, or the `scallop theorem', which states that a reciprocal motion cannot generate net motion~\citep{Purcell1977}. Microswimmers therefore need to go through non-time-reversible shape changes to overcome and exploit drag~\citep{Lauga2009Hydrodynamics}. Ciliated microswimmers break the time-reversibility on two levels. On the individual level, each cilium beats in an asymmetric pattern: during the effective stroke, the cilium pushes the fluid perpendicular to the cell surface like a straight rod, and then moves almost parallel to the cell surface in a curly shape during the recovery stroke, in preparation for the next effective stroke. On the collective level, neighboring cilia beat with a small phase difference that produces traveling waves on the cell surface, namely the metachronal wave. Existing evidence suggests that the optimal ciliated swimmers exploit the asymmetry on the collective level more than that on the individual level~\citep{Michelin2010Efficiency, Guo2014}. In this paper, we study the (hydrodynamic) swimming efficiency of ciliated microswimmers of an arbitrary axisymmetric shape. Specifically, the swimming efficiency is understood as the ratio between the `useful power' against the total power. The useful power could be computed as the power needed to drag a rigid body of the same shape as the swimmer with the swim speed while the total power is the rate of energy dissipation through viscous stresses in the flow to produce this motion~\citep{Lighthill1952Squirming}. The goal of this paper is to find the {optimal} ciliary motion that maximizes the swimming efficiency for an arbitrary axisymmetric microswimmer. Studies of ciliated microswimmers can be loosely classified into two types of models. One type is known as the sublayer models in which the dynamics of each cilium is explicitly modeled, either theoretically~\citep{Brennen1977, Blake1974} or numerically~\citep{Gueron1992, Gueron1993, Guirao2007spontaneous, Osterman2011, Eloy2012kinematics, elgeti2013emergence, Guo2014, ito2019swimming, omori2020swimming}. The other type is known as the {\em envelope model}~{(commonly known as the {\em squirmer model} if the slip profile is time-independent)}, which takes advantage of the densely-packing nature of cilia, and traces the continuous envelope formed by the cilia tips. The envelope model has been extensively applied to study the locomotion of both single and multiple swimmers (e.g., see~\citet{Lighthill1952Squirming, Blake1971spherical, ishikawa2006hydrodynamic, ishikawa2008coherent, Michelin2010Efficiency, vilfan2012optimal, brumley2015metachronal, elgeti2015physics, guo2021optimal, nasouri2021minimum}), as well as the nutrient uptake of microswimmers (e.g.,~\citet{magar2003nutrient, magar2005average, Michelin2011Optimal, michelin2013unsteady}). {While originally developed for spherical swimmers, the envelope model has been generalized to spheroidal swimmers (e.g.,~\citet{ishimoto2013squirmer, theers2016modeling}).} In particular, in a seminal work, \citet{Michelin2010Efficiency} studied the optimal beating stroke for a spherical swimmer using the envelope model. Specifically, the material points on the envelope were assumed to move tangentially on the surface in a time-periodic fashion, hence the swimmer retains the spherical shape. The flow field, power loss, swimming efficiency as well as their sensitivities, thereby, were computed explicitly using spherical harmonics. Their optimization found that the envelope surface deforms in a wave-like fashion, which significantly breaks the time-symmetry at the organism level similar to the metachronal waves observed in biological microswimmers. Since most biological microswimmers do not have spherical shapes, there is a need for extending the previous work to more general geometries. Such an extension, however, is hard to carry out using semi-analytical methods. Therefore, in this paper, we develop a computational framework for optimizing the ciliary motion of a microswimmer with arbitrary axisymmetric shape. We employ the envelope model, wherein, the envelope is restricted to move tangential to the surface so the shape of the microswimmer is unchanged during the beating period. We use a boundary integral method to solve the forward problem and derive an adjoint-based formulation for solving the optimization problem. The paper is organized as follows. In Section~\ref{sc:formulation}, we introduce the optimization problem, derive the sensitivity formulas and discuss our numerical solution procedure. In Section~\ref{sc:results}, we present the optimal unconstrained and constrained solutions for microswimmers of various shape families. Finally, in Section~\ref{sc:conclusion}, we discuss our conclusions and future directions. \section{Problem Formulation} \label{sc:formulation} \subsection{Model} Consider an axisymmetric microswimmer whose boundary $\Gamma$ is obtained by rotating a generating curve $\gamma$ of length $\ell$ about $\boldsymbol{e}_3$ axis, as shown in Figure~\ref{fig:schem}(a). We adopt the classic envelope model~\citep{Lighthill1952Squirming} and assume that the ciliary tips undergo time-periodic {\em tangential} movements along the generating curve. Let $s=\alpha(s_0,t)$ be the ciliary tip's arclength coordinate on the generating curve $\gamma$ at time $t$ for a cilium rooted at $s_0$. The tangential slip velocity of this material point in its body-frame is thus \begin{equation}\label{eq:dispvelo} u^\mathrm{S}(s, t)= u^\mathrm{S}(\alpha(s_0, t), t)= \partial_t \alpha(s_0, t). \end{equation} \begin{figure} \centerline{\includegraphics{./Fig1.pdf}} \caption[]{(a) Schematic of the microswimmer geometry. The shape is assumed to be axisymmetric, obtained by rotating the generating curve $\gamma$ about the $\boldsymbol{e}_3$ axis. The tip of the cilium rooted at $s_0$ at time $t$ is given by $s=\alpha(s_0,t)$. (b) Illustration of the algorithm for computing the slip velocity at the quadrature points $u^\mathrm{S}(s_q,t)$. We first compute the ``tip'' position and the corresponding tip velocities (open blue circles) of cilia rooted at the $N_q$ quadrature points $s_q$ (closed blue circles). We then obtain the slip velocities at sample points uniformly distributed along the generating curve (open red squares) by a cubic interpolation. The slip velocity at any arclength (black curve) are then obtained by a high-order B-spline interpolation from the sample points. We have reduced the number of quadrature and sample points in this figure (compared to values used in the numerical experiments) to avoid visual clutter. } \label{fig:schem} \end{figure} In addition to the time-periodic condition, the ciliary motion $\alpha$ needs to satisfy two more conditions to avoid singularity~\citep{Michelin2010Efficiency}. First, the slip velocities should vanish at the poles \begin{equation}\label{eq:Sbc} \alpha(0,t) = 0 \quad\text{ and } \quad \alpha(\ell,t) = \ell, \quad \forall~ t\in\mathbb{R}^+, \end{equation} and second, $\alpha$ should be a monotonic function, that is, \begin{equation}\label{eq:Sbijective} \partial_{s_0} \alpha(s_0,t) > 0, \quad \forall~ (s_0,t)\in [0,\ell]\times\mathbb{R}^+. \end{equation} The last condition ensures the slip velocity is unique at any arclength $s$; in other words, crossing of cilia is forbidden. While in reality, cilia do cross, this condition is enforced to ensure validity of the continuum model. In the viscous-dominated regime, the flow dynamics is described by the incompressible Stokes equations at every instance of time \begin{equation}\label{eq:stokes} -\mu\nabla^2\boldsymbol{u} + \nabla p = \boldsymbol{0},\quad \nabla\cdot\boldsymbol{u} = 0, \end{equation} where $\mu$ is the fluid viscosity, $p$ and $\boldsymbol{u}$ are the fluid pressure and velocity fields respectively. In the absence of external forces and imposed flow field, the far-field boundary condition is simply \begin{equation} \label{eq:far-bc} \lim_{\boldsymbol{x}\rightarrow\infty}\boldsymbol{u}(\boldsymbol{x},t) = \boldsymbol0. \end{equation} The free-swimming microswimmer also needs to satisfy the no-net-force and no-net-torque conditions. Owing to the axisymmetric assumption, the no-net-torque condition is satisfied by construction, and the no-net-force condition is reduced to one scalar equation \begin{equation}\label{eq:nonetforce} \int_\Gamma \boldsymbol{f}(\boldsymbol{x},t)\cdot\boldsymbol{e}_3\mathrm{d}\Gamma=2\pi\int_\gamma {f}_3(\boldsymbol{x},t)\, x_1\mathrm{d}s= 0, \end{equation} where $x_1$ is the $\boldsymbol{e}_1$ component of $\boldsymbol{x}$, $\boldsymbol{f}$ is the active force density the swimmer applied to the fluid (negative to fluid traction) and $f_3$ is its $\boldsymbol{e}_3$ component. Given any ciliary motion $\alpha(s_0,t)$ that satisfies \eqref{eq:Sbc} \& \eqref{eq:Sbijective}, there is a unique tangential slip velocity ${u}^{\mathrm{S}}(s,t)$ defined by \eqref{eq:dispvelo}. Such a slip velocity propels the microswimmer at a translational velocity $U(t)$ in the $\boldsymbol{e}_3$ direction, determined by \eqref{eq:nonetforce}. Its angular velocity as well as the translational velocities in the $\boldsymbol{e}_1$ and $\boldsymbol{e}_2$ directions are zero by symmetry. Consequently, the boundary condition on $\gamma$ is given by \begin{equation}\label{eq:bc} \boldsymbol{u}(\boldsymbol{x}(s),t) = {u}^{\mathrm{S}}(s,t)\boldsymbol\tau(s)+{U}(t)\boldsymbol{e}_3, \end{equation} where $\boldsymbol\tau$ is the unit tangent vector on $\gamma$. Thereby, the instantaneous power loss $P(t)$ can be written as \begin{align} P(t) &= \int_\Gamma \boldsymbol{f}(\boldsymbol{x},t) \cdot \boldsymbol{u}(\boldsymbol{x}, t) \, \mathrm{d}\Gamma \notag\\ &= 2\pi\left[ \int_\gamma \boldsymbol{f}(s,t) \cdot \boldsymbol{\tau}(s) u^\mathrm{S}(s,t)\, x_1 \, \mathrm{d}s + U(t)\int_\gamma \boldsymbol{f}(s,t) \cdot \boldsymbol{e}_3\, x_1 \, \mathrm{d}s \right]. \end{align} The second term on the right-hand-side is zero provided that the no-net-force condition~\eqref{eq:nonetforce} is satisfied. Following \citet{Lighthill1952Squirming}, we quantify the performance of the microswimmer by its swimming efficiency $\epsilon$, defined as \begin{equation}\label{eq:efficiency} \epsilon = \frac{C_D \langle{U}\rangle^2}{\langle{P}\rangle}, \end{equation} where ${P}=P(t)$ and ${U}=U(t)$ are the instantaneous power loss and swim speed, $\langle \cdot \rangle$ denotes the time-average over one period, and $C_D$ is the drag coefficient defined as the total drag force of towing a rigid body of the same shape at a unit speed along $\boldsymbol{e}_3$ direction. The coefficient $C_D$ depends on the given shape $\gamma$ only; for example, $C_D = 6\pi\mu a$ in the case of a spherical microswimmer with radius $a$. In our simulations, we normalize the radius of the microswimmer to unity, and the period of the ciliary motion to $2\pi$. It is worth noting that the swimming efficiency~\eqref{eq:efficiency} is size and period independent, thanks to its dimensionless nature. The Reynolds number of a ciliated microswimmer of radius $100\mu \text{m}$ and frequency $30$Hz submerged in water can be estimated as $\mathrm{Re} \sim 10^{-4} $, confirming the applicability of Stokes equations. \subsection{Numerical algorithm for solving the forward problem} Before stating the optimization problem, we summarize our numerical solution procedure for the governing equations (\ref{eq:stokes}) -- (\ref{eq:bc}). By the quasi-static nature of the Stokes equation~\eqref{eq:stokes}, the flow field $\boldsymbol{u}(\boldsymbol{x},t)$ can be solved independently at any given time, and the time-averages can be found using standard numerical integration techniques (e.g., trapezoidal rule). Here we adopt a boundary integral method (BIM) at every time step. A similar BIM implementation was detailed in our recent work~\citet{guo2021optimal} which studied the optimization of {\em time-independent} slip profiles. The main procedures are summarized below. We use the single-layer potential {\em ansatz}, which expresses the velocity as a convolution of an unknown density function $\boldsymbol{\mu}$ with the Green's function for the Stokes equations: \begin{align} \boldsymbol{u}(\boldsymbol{x}) &= \frac{1}{8\pi}\int_\Gamma \left(\frac{1}{|\boldsymbol{r}|} \mathbf{I} + \frac{\boldsymbol{r} \otimes \boldsymbol{r} }{|\boldsymbol{r}|^3}\right) \, \boldsymbol{\mu}(\boldsymbol{y}) \, \mathrm{d}\Gamma(\boldsymbol{y}), \quad\text{where}\quad \boldsymbol{r} = \boldsymbol{x} - \boldsymbol{y}.\label{u:SL} \end{align} The force density can then be evaluated as a convolution of $\boldsymbol{\mu}$ with the (negative of) traction kernel: \begin{align} \boldsymbol{f}(\boldsymbol{x}) &=\frac{1}{2}\boldsymbol{\mu}\left(\boldsymbol{x}\right) + \frac{3}{4\pi}\int_{\Gamma} \left(\frac{\boldsymbol{r} \otimes \boldsymbol{r} }{|\boldsymbol{r}|^5}\right) (\boldsymbol{r}\cdot\boldsymbol{n}(\boldsymbol{x}))\boldsymbol{\mu}\left(\boldsymbol{y}\right)\mathrm{d}\Gamma\left(\boldsymbol{y}\right). \label{f:SL} \end{align} We convert these weakly singular boundary integrals into convolutions on the generating curve $\gamma$ by performing an analytic integration in the orthoradial direction, and apply a high-order quadrature rule designed to handle the $log-$singularity of the resulting kernels~\citep{veerapaneni2009numerical}. {The Stokes flow problem defined at any time $t$ by equations~\eqref{eq:stokes} --~\eqref{eq:bc} is then recast as the BIM system for the unknowns $\boldsymbol{\mu}$ and $U(t)$ obtained by substituting~\eqref{u:SL} in~\eqref{eq:bc} and~\eqref{f:SL} in~\eqref{eq:nonetforce}. The numerical solution method consists in discretizing $\gamma$ into $N_p$ non-overlapping panels, each panel supporting the nodes of a 10-point Gaussian quadrature rule. The single-layer operator is approximated in Nystr\"om fashion, by collocation at the $N_q=10 N_p$ quadrature nodes, while the values of $\boldsymbol{\mu}$ are sought at the same quadrature nodes.} {The resulting BIM system is} \renewcommand{\arraystretch}{1.5} \begin{equation}\label{eq:fullsys} \begin{bmatrix} \mathcal{S} & -\mathcal{B} \\ \mathcal{C}& 0 \end{bmatrix} \begin{bmatrix} \boldsymbol{\mu}\\ {U(t)} \end{bmatrix} = \begin{bmatrix} {\boldsymbol{u}^{\mathrm{S}}}\\ {0} \end{bmatrix}, \end{equation} where {the vectors $\boldsymbol{\mu}=\boldsymbol{\mu}(s_q,t)$ and $\boldsymbol{u}^{\mathrm{S}}=\boldsymbol{u}^{\mathrm{S}}(s_q,t)$ are the unknown density and the given slip velocity at all quadrature nodes $s_q$,} $\mathcal{S}$ is the axisymmetric single-layer potential operator (which is fixed for a given shape $\gamma$), $\mathcal{B}$ is the column vector reproducing $\boldsymbol{e}_3$ at each quadrature node, $\mathcal{C}$ is the row vector such that $\mathcal{C}[\boldsymbol{\mu}] = \int_\Gamma \boldsymbol{f}(\boldsymbol{x})\cdot\boldsymbol{e}_3 \mathrm{d}\Gamma$ is the total traction force in the $\boldsymbol{e}_3$ direction. The algorithm to obtain the slip velocity at the quadrature nodes at a given time $\boldsymbol{u}^\mathrm{S}(s_q,t)$ is summarized in Figure~\ref{fig:schem}(b). Specifically, we start by computing the corresponding ciliary tip position $s=\alpha(s_q,t)$ and the slip velocity $u^\mathrm{S}(s,t)$ from \eqref{eq:dispvelo}. These tip positions $s$ can be highly nonuniform, depending on the form of $\alpha$, which could be difficult for the forward solver. To circumvent this difficulty and to find a smooth representation of the slip velocities on the quadrature points, we first find the slip velocities at $N_s$ sample points uniformly distributed along the generating curve by interpolating $u^\mathrm{S}(s,t)$ (we use the routine \texttt{PCHIP} in MATLAB); the slip velocities at the quadrature nodes $u^\mathrm{S}(s_q,t)$ are then in turn interpolated from the $N_s$ sample points using high-order B-spline bases. An alternative approach could be to follow the position and the slip velocity of each material point. In other words, one can use $\boldsymbol{u}^\mathrm{S}(s,t)$ directly on the right-hand-side of \eqref{eq:fullsys}, which will bypass the interpolation steps mentioned above. However, it requires re-assembly of the matrix $\mathcal{S}$ at every time step, significantly increasing the computational cost. \subsection{Optimization problem} The goal of this work is to find the optimal ciliary motion for a given arbitrary axisymmetric shape, that is, the ciliary motion $\alpha^{\star}(s_0,t)$ that maximizes the swimming efficiency $\epsilon$: \begin{equation}\label{eq:unconstrained} \alpha^{\star}=\argmax_{\alpha\in\mathcal{A}}\epsilon(\alpha), \end{equation} where $\mathcal{A}$ is the space of all possible time-periodic ciliary motion satisfying \eqref{eq:Sbc} \& \eqref{eq:Sbijective}. It is, however, not easy to define and manipulate finite-dimensional parametrizations of $\alpha$ that remain in that space. To circumvent this difficulty, we follow the ideas in \citet{Michelin2010Efficiency} and represent $\alpha$ in terms of a time-periodic function $\psi(x,t)$, such that \begin{equation}\label{eq:aux} \alpha(s_0,\psi) = \frac{\ell\int_0^{s_0}{[\psi(x,t)]^2\mathrm{d}x}}{\int_0^{\ell}{[\psi(x,t)]^2\mathrm{d}x}}, \end{equation} where $\ell$ is the total length of the generating curve $\gamma$. Note that $\alpha$ is also (implicitly) a function of time $t$, through $\psi = \psi(x,t)$. It is easy to verify that $\alpha$ given by~\eqref{eq:aux} satisfies the boundary conditions \eqref{eq:Sbc} and the monotonicity requirement \eqref{eq:Sbijective} for any choice of $\psi$. Conversely, for any $\alpha$ satisfying \eqref{eq:Sbc} and \eqref{eq:Sbijective}, there is at least one $\psi$ that provides $\alpha$. As a result, the optimization problem is recast as finding \begin{equation} \psi^{\star} = \argmax_{\psi} \epsilon(\psi), \label{opt:unc} \end{equation} where $\psi(\cdot,t)$ is only required to be square-integrable over $[0,\ell]$ for any $t$. We use a quasi-Newton BFGS method \citep{nocedal2006numerical} to optimize the ciliary motion {\em via} $\psi$, which requires repeated evaluations of efficiency sensitivities with respect to perturbations of $\psi$. The sensitivities of power loss and swim speed are derived using an adjoint-based method, while the efficiency sensitivity is found using the quotient rule thereafter. The adjoint-based method exhibits a great advantage against the traditional finite difference method when finding the sensitivities, as regardless of the dimension of the parameter space, the objective derivatives with respect to all design parameters can here be evaluated on the basis of \emph{one} solve of the forward problem for each given ciliary motion $\alpha$. The derivations are detailed below. \subsection{Sensitivity analysis} We start by finding the sensitivities in terms of the slip profile $u^\mathrm{S}$. The sensitivities in terms of the auxiliary unknown $\psi$ will be found subsequently by a change of variable. {As the concept of adjoint solution in general rests on duality considerations, we recast the forward flow problem in weak form for the purpose of finding the sought sensitivities of power loss and swim speed, even though the numerical forward solution method used in this work does not directly exploit that weak form. Specifically, we} recast the forward problem \eqref{eq:stokes} -- \eqref{eq:bc} in mixed weak form (see, e.g., \citet[Chap. 6]{brezzi1991mixed}). That is, find $(\boldsymbol{u}, p, \boldsymbol{f}, U) \in \boldsymbol{\mathcal{V}}\times\mathcal{P}\times\boldsymbol{\mathcal{F}}\times\mathbb{R},$ such that \begin{equation}\label{eq:weak} \begin{array}{lrl} \text{(a)} \, & a(\boldsymbol{u}, \boldsymbol{v}) - b(\boldsymbol{v},p) - b(\boldsymbol{u},q) - \langle \boldsymbol{f}, \boldsymbol{v}\rangle_{\Gamma} = 0 \hspace{.25in}& \forall (\boldsymbol{v},q) \in \boldsymbol{\mathcal{V}}\times\mathcal{P}\\ \text{(b)} \, & \langle \boldsymbol{g}, \boldsymbol{e}_3\rangle_\Gamma U + \langle \boldsymbol{g}, u^\mathrm{S} \boldsymbol{\tau} \rangle_\Gamma - \langle \boldsymbol{g}, \boldsymbol{u}\rangle_\Gamma = 0 \hspace{.25in}& \forall \boldsymbol{g} \in \boldsymbol{\mathcal{F}}\\ \text{(c)} \, & \langle \boldsymbol{f}, \boldsymbol{e}_3\rangle_\Gamma = 0\hspace{.25in} & \end{array} \end{equation} where the bilinear forms $a$ and $b$ are defined by \begin{equation} a(\boldsymbol{u}, \boldsymbol{v}) := \int_\Omega 2\mu \boldsymbol{D}[\boldsymbol{u}]:\boldsymbol{D}[\boldsymbol{v}]\, \mathrm{d} V, \hspace{.25in} b(\boldsymbol{v},q) := \int_\Omega q\, \text{div}\,\boldsymbol{v}\, \mathrm{d}V, \end{equation} and $\boldsymbol{D}[\boldsymbol{u}] := (\boldsymbol{\nabla u}+\boldsymbol{\nabla}^{T}\boldsymbol{u})/2$ is the strain rate tensor. $\langle \cdot, \cdot \rangle_\Gamma$ is a short-hand for the inner product on $\Gamma$. For example, $\langle \boldsymbol{f}, \boldsymbol{v}\rangle_\Gamma = \int_\Gamma \boldsymbol{f} \cdot \boldsymbol{v}\, \mathrm{d}\Gamma$. Similarly, with a slight abuse of notation, the power loss functional could be written as $P(u^\mathrm{S}) := \langle \boldsymbol{f}, u^\mathrm{S}\boldsymbol{\tau} + U\boldsymbol{e}_3 \rangle_\Gamma$, where $U := U(u^\mathrm{S})$ is the swim speed functional. The Dirichlet boundary condition~(\ref{eq:bc}) is (weakly) enforced explicitly through~(\ref{eq:weak}\,b), rather than being embedded in the velocity solution space $\boldsymbol{\mathcal{V}}$, as this will facilitate the derivation of slip derivative identities; {this is in fact our motivation for using the mixed weak form~\eqref{eq:weak}.} Condition~(\ref{eq:weak}\,c) is the no-net-force condition~\eqref{eq:nonetforce}. First-order sensitivities of functionals at $u^\mathrm{S}$ are defined as directional derivatives, by considering perturbations of $u^\mathrm{S}$ of the form \begin{equation} u^\mathrm{S}_{\eta} = u^\mathrm{S} + \eta \nu \label{uS:pert} \end{equation} for some $\nu$ in the slip velocity space and $\eta\in\mathbb{R}$. Then, the directional (or G\^ateaux) derivative of a functional $J(u^\mathrm{S})$ in the direction $\nu$, denoted by $J'(u^\mathrm{S};\nu)$, is defined as \begin{equation} J'(u^\mathrm{S};\nu) = \lim_{\eta\to0} \frac{1}{\eta}\left( J[u_{\eta}^\mathrm{S}]-J[u^\mathrm{S}] \right). \label{dJ:def} \end{equation} For the power loss functional, we obtain (since the derivative of ${u}^\mathrm{S}$ in the above sense is $\nu$) \begin{equation} P'(u^\mathrm{S};\nu) = \langle \boldsymbol{f}',{u}^\mathrm{S}\boldsymbol{\tau} + U\boldsymbol{e}_3 \rangle_{\Gamma} + \langle \boldsymbol{f},\nu\boldsymbol{\tau} \rangle_{\Gamma} + \langle \boldsymbol{f},\boldsymbol{e}_3 \rangle_{\Gamma}U', \label{dJW:def} \end{equation} where $\boldsymbol{f}'$ and $U'$ are the derivatives of the active force $\boldsymbol{f}$ and swim speed $U$ solving problem~\eqref{eq:weak}, {considered as functionals on the slip velocity $u^\mathrm{S}$}: \begin{equation} \boldsymbol{f}' = \lim_{\eta\to0} \frac{1}{\eta}\left( \boldsymbol{f}[u_{\eta}^\mathrm{S}]-\boldsymbol{f}[u^\mathrm{S}] \right), \qquad U' = \lim_{\eta\to0} \frac{1}{\eta}\left( U[u_{\eta}^\mathrm{S}]-U[u^\mathrm{S}] \right). \end{equation} Differentiating the weak formulation \eqref{eq:weak} of the forward problem with respect to $u^\mathrm{S}$ leads to the weak formulation of the governing problem for the derivatives $(\boldsymbol{u}', \boldsymbol{f}', p', U')$ of the solution $(\boldsymbol{u}, \boldsymbol{f}, p, U)$ \begin{equation} \begin{aligned} \text{(a) \ }&& a(\boldsymbol{u}',\boldsymbol{v}) - b(\boldsymbol{u}',q) - b(\boldsymbol{v},p') - \langle \boldsymbol{f}',\boldsymbol{v} \rangle_{\Gamma} &=0 &\qquad& \forall(\boldsymbol{v},q)\in\boldsymbol{\mathcal{V}}\times\mathcal{P} \\ \text{(b) \ }&& \langle \nu\boldsymbol{\tau},\boldsymbol{g}\rangle_{\Gamma} + U'\langle \boldsymbol{e}_3,\boldsymbol{g}\rangle_{\Gamma} - \langle \boldsymbol{u}',\boldsymbol{g} \rangle_{\Gamma} &= 0 && \forall\boldsymbol{g}\in\boldsymbol{\mathcal{F}} \\ \text{(c) \ }&& \langle \boldsymbol{f}',\boldsymbol{e}_3 \rangle_{\Gamma} &= 0 \end{aligned} \label{slip:der:weak} \end{equation} Here we have assumed without loss of generality that the test functions in~\eqref{eq:weak} verify $\boldsymbol{v}' = \boldsymbol{0}$, $\boldsymbol{g}' = \boldsymbol{0}$, and $q' = 0$, which is made possible by the absence of boundary constraints in $\boldsymbol{\mathcal{V}}$. At first glance, evaluating $P'(u^\mathrm{S};\nu)$ in a given perturbation $\nu$ appears to rely on solving the derivative problem~\eqref{slip:der:weak}. However, a more effective approach allows to bypass the actual evaluation of ${\boldsymbol{f}}'$. Let the adjoint problem be defined by \begin{equation} \begin{aligned} \text{(a) \ }&& a(\hat{\boldsymbol{u}},\boldsymbol{v}) - b(\hat{\boldsymbol{u}},q) - b(\boldsymbol{v},\hat{p}) - \langle\hat{\boldsymbol{f}},\boldsymbol{v}\rangle_{\Gamma} &= 0 &\qquad& \forall(\boldsymbol{v},q)\in\boldsymbol{\mathcal{V}}\times\mathcal{P}, \\ \text{(b) \ }&& \langle \boldsymbol{e}_3,\boldsymbol{g}\rangle_{\Gamma} - \langle \hat{\boldsymbol{u}},\boldsymbol{g}\rangle_{\Gamma} &= 0 && \forall\boldsymbol{g}\in\boldsymbol{\mathcal{F}}, \end{aligned} \label{adj:weak} \end{equation} i.e. $(\hat{\boldsymbol{u}},\hat{p})$ are the flow variables induced by prescribing a unit velocity $\boldsymbol{e}_3$ on $\Gamma$. For later convenience, we let $F_0$ denote the (nonzero) net force exerted on $\Gamma$ by the adjoint flow: \begin{equation} F_0 := \langle \hat{\boldsymbol{f}},\boldsymbol{e}_3 \rangle_{\Gamma}. \label{F0:def} \end{equation} Problem~\eqref{adj:weak} in strong form is defined by equations~\eqref{eq:stokes} -- \eqref{eq:bc} with $U=1,\,u^\mathrm{S}=0$. In fact, $F_0$ takes the same value as the drag coefficient $C_D$ in \eqref{eq:efficiency}. Then, combining the derivative problem~\eqref{slip:der:weak} with the forward problem~\eqref{eq:weak} or the adjoint problem~\eqref{adj:weak} with appropriate choices of test functions allows to derive expressions of $P'(u^\mathrm{S};\nu)$ and $U'(u^\mathrm{S};\nu)$ which do not involve the forward solution derivatives. Specifically, set the test functions to $(\boldsymbol{v},q,\boldsymbol{g})=(\boldsymbol{u}',p',\boldsymbol{f}')$ in equations~(\ref{eq:weak}a,b) of the forward problem and $(\boldsymbol{v},q,\boldsymbol{g})=({\boldsymbol{u}},{p},{\boldsymbol{f}})$ in equations~(\ref{slip:der:weak}a,b) of the derivative problem. Then, the combination $(\ref{slip:der:weak}a)+(\ref{slip:der:weak}b)-(\ref{eq:weak}a)-(\ref{eq:weak}b)$ is evaluated, to obtain \begin{equation} \langle \boldsymbol{f}',{u}^\mathrm{S}\boldsymbol{\tau} + U\boldsymbol{e}_3 \rangle_{\Gamma} = \langle \boldsymbol{f},\nu\boldsymbol{\tau} \rangle_{\Gamma} + \langle \boldsymbol{f},\boldsymbol{e}_3 \rangle_{\Gamma}U'. \label{aux1:alt} \end{equation} Substituting \eqref{aux1:alt} into \eqref{dJW:def}, and recalling the no-net-force condition~\eqref{eq:nonetforce}, we have \begin{equation} \boxed{ P'(u^\mathrm{S};\nu) = 2\langle \boldsymbol{f},\nu\boldsymbol{\tau} \rangle_{\Gamma} ={4\pi}\int_\gamma (\boldsymbol{f} \cdot \boldsymbol{\tau}) \, \nu x_1 \, \mathrm{d}s.} \label{dJPL:exp:alt} \end{equation} Likewise, setting the test functions to $(\boldsymbol{v},q,\boldsymbol{g})=(\boldsymbol{u}',p',\boldsymbol{f}')$ in the adjoint problem~\eqref{adj:weak} and $(\boldsymbol{v},q,\boldsymbol{g})=(\hat{\boldsymbol{u}},\hat{p},\hat{\boldsymbol{f}})$ in equations~(\ref{slip:der:weak}a,b) of the derivative problem~\eqref{slip:der:weak}, then evaluating $(\ref{slip:der:weak}a)+(\ref{slip:der:weak}b)-(\ref{adj:weak}a)-(\ref{adj:weak}b)$, yields \begin{equation} 0 = \langle \hat{\boldsymbol{f}},\nu\boldsymbol{\tau} \rangle_{\Gamma} + \langle \hat{\boldsymbol{f}},U'\boldsymbol{e}_3 \rangle_{\Gamma} - \langle \boldsymbol{f}',\boldsymbol{e}_3 \rangle_{\Gamma} = \langle \hat{\boldsymbol{f}},\nu\boldsymbol{\tau} \rangle_{\Gamma} + F_0U'. \label{aux2:alt} \end{equation} Note that $\langle \boldsymbol{f}',\boldsymbol{e}_3 \rangle_{\Gamma} = 0$ according to (\ref{slip:der:weak}c). Rearranging terms in \eqref{aux2:alt}, we have \begin{equation} \boxed{ U'(u^\mathrm{S};\nu) = -\frac{1}{F_0}\langle \hat{\boldsymbol{f}},\nu\boldsymbol{\tau} \rangle_{\Gamma} = - \frac{2\pi}{F_0} \int_\gamma (\hat{\boldsymbol{f}}\cdot \boldsymbol{\tau}) \, \nu x_1\, \mathrm{d}s.} \label{dU:exp} \end{equation} The sensitivity formulas \eqref{dJPL:exp:alt} \& \eqref{dU:exp}, however, are not practically applicable in this form to the current optimization problem, because the constraints~\eqref{eq:Sbc} \& \eqref{eq:Sbijective} are not easy to enforce on parametrizations of the unknown slip profiles $u^\mathrm{S}$. For this reason, we rewrite the quantities of interest as functionals of $\psi$, and the connection between $\psi$ and $\alpha$ is given by \eqref{eq:aux}. Specifically, the slip profile is \begin{equation} u^\mathrm{S}(s,t) = \partial_{t}\alpha(s_0,\psi) = \partial_\psi\alpha(s_0,\psi;\dot{\psi}) = \partial_\psi\alpha\left( \beta(s,\psi),\psi;\dot{\psi} \right) = v^\mathrm{S}(s,\psi), \label{disp:velo:psi} \end{equation} where $\dot{\psi} := \partial_t \psi$, and $\beta(s,\psi)$ is the inverse function of $\alpha$, i.e., $s_0 = \beta(s,\psi)$. The average power loss and swim speed functionals are written as \begin{equation} \langle\mathbb{P}\rangle(\psi) := \langle P \rangle(u^\mathrm{S}), \quad \langle \mathbb{U}\rangle(\psi):= \langle U\rangle(u^\mathrm{S}) \qquad \text{with \ } u^\mathrm{S}(s,t) = v^\mathrm{S}(s,\psi). \label{Jbb:def} \end{equation} On applying the change of variables $s = \alpha(s_0, \psi)$ in the integrals \eqref{dJPL:exp:alt} \& \eqref{dU:exp} and average over one period, we obtain \begin{align} \boxed{ \langle\mathbb{P}\rangle'(\psi;\hat{\psi}) = 2 \int_0^{2\pi} \int_\gamma \boldsymbol{f}(\alpha)\cdot\boldsymbol{\tau}(\alpha)\,x_1(\alpha)\, v^\mathrm{S}{}'(s,\psi;\hat{\psi}) \, \partial_s\alpha \, \mathrm{d}s_0 \,\mathrm{d}t,} \label{Jbb'} \\ \boxed{ \langle \mathbb{U}\rangle'(\psi;\hat{\psi}) = -\frac{1}{F_0} \int_0^{2\pi} \int_\gamma \hat{\boldsymbol{f}}(\alpha)\cdot\boldsymbol{\tau}(\alpha)\,x_1(\alpha)\,v^\mathrm{S}{}'(s,\psi;\hat{\psi}) \, \partial_s\alpha\, \mathrm{d}s_0 \, \mathrm{d}t,} \end{align} where $v^\mathrm{S}{}'(s, \psi; \hat{\psi})$ is the directional derivative of $u^\mathrm{S}$ with respect to $\psi$ and in the direction $\hat{\psi}$. Specifically, we can show that \begin{multline}\label{eq:vprimeds} v^\mathrm{S}{}'(s,\psi;\hat{\psi}) \, \partial_s\alpha(s_0,\psi) \mathrm{d}s_0 = \left\{ \partial_s\alpha(s_0,\psi)\,\left[ \partial^2_\psi \alpha \left( s_0,\psi;\hat{\psi},\dot{\psi}\right) + \partial_\psi \alpha \left( s_0,\psi;\dot{\hat{\psi}} \right)\,\right] \right. \\ \left. -\partial_{\psi s}\alpha\left( s_0,\psi;\dot{\psi} \right)\; \partial_{\psi}\alpha\left( s_0,\psi;\hat{\psi} \right) \right\} \mathrm{d}s_0. \end{multline} The derivation and the explicit expression of each term in~\eqref{eq:vprimeds} are given in the Appendix. Finally, the efficiency sensitivity in terms of $\psi$ readily follows by the quotient rule \begin{equation}\label{eq:effsense} \epsilon'(\psi;\hat\psi) = C_D\frac{2\langle\mathbb{U}\rangle \langle\mathbb{U}\rangle'\langle\mathbb{P}\rangle - \langle\mathbb{U}\rangle^2\langle\mathbb{P}\rangle'}{\langle\mathbb{P}\rangle^2}. \end{equation} \subsection{Constraints on surface displacement} The unconstrained optimization problem~\eqref{opt:unc} introduced above has the tendency to converge to unphysical/unrealistic strokes, where each cilium effectively `covers' the entire generating curve. For a more realistic model, we should add a constraint on the length of the cilium. To this end, and again following \citet{Michelin2010Efficiency}, we {replace the initial unconstrained optimization problem~\eqref{opt:unc} with the penalized optimization problem} \begin{equation} \psi^{\star} = \argmax_{\psi} E(\psi), \qquad E(\psi) = \epsilon(\psi) - C(\psi) \label{opt:pen} \end{equation} where the (non-negative) {penalty term} $C(\psi)$, defined as \begin{equation}\label{eq:penalty} C(\psi) = \int_0^{\ell} H({A}(\psi) - c) \mathrm{d}s_0, \end{equation} {serves to incorporate the kinematical constraint $A(\psi)\leq c$ in the optimization problem.} The functional ${A}(\psi)$ in~\eqref{eq:penalty} is a measure of the amplitude of the displacement of individual material points for the stroke (through $\alpha$), and $c$ is a threshold parameter to bound $A(\psi)$ (a smaller $c$ corresponding to a stricter constraint). $H$ is {a smooth non-negative penalty function defined by} \begin{equation} H(u) = \Lambda_1\left[1+\tanh \left(\Lambda_2{u}\right)\right]u^2, \label{H:def} \end{equation} {which for large enough $\Lambda_2$ approximates $u\mapsto 2\Lambda_1 u^2 Y(u)$ ($Y$ being the Heaviside unit step function). The multiplicative parameter $\Lambda_1$ then serves to tune the severity of the penalty incurred by violations of the constraint $A(\psi)\leq c$.} We use $\Lambda_1 = 10^4$ and $\Lambda_2 = 10^{4}$ in our numerical simulations unless otherwise mentioned. The optimization results are not sensitive to the choice of $\Lambda_1$ and $\Lambda_2$. A small caveat of the penalty function~\eqref{H:def} is that it has a (small) bump at $\Lambda_2 u \approx -1.109$. This bump would occasionally trap the optimizations into local extrema that have significantly lower efficiencies, depending on the initial guesses. Perturbing $\Lambda_2$ for such cases helps to alleviate the problem. The physically most relevant definition of ${A}$ would be the actual displacement amplitude of an individual point, i.e., $\Delta s= [\alpha_\text{max}(s_0) - \alpha_\text{min}(s_0)]/2$. The strong nonlinearity of this measure, however, is not appropriate for the computation of the gradient. Following \citet{Michelin2010Efficiency}, we measure the displacement by its variance in time: \begin{equation}\label{eq:variance} {A}(\psi) = \langle (\alpha(s_0,\psi) - \langle\alpha\rangle(s_0))^2\rangle. \end{equation} The maximum displacement $\Delta s_\text{max} = \max_{s_0}(\Delta s)$ will be found post-optimization for the optimal ciliary motion $\alpha^{\star}$ to better illustrate our results in Section~\ref{sc:results}. {Like the initial problem~\eqref{opt:unc}, the penalized problem~\eqref{opt:pen} is solvable using unconstrained optimization methods, and we again adopt a quasi-Newton BFGS algorithm} to optimize the ciliary motion. Applying the chain rule to the penalty functional $C(\psi)$, we obtain the derivative of the penalty term in the direction of $\hat\psi$ as \begin{equation}\label{eq:pensense} C'(\psi; \hat\psi) = \int_0^\ell H'({A}(\psi) - c) {A}'(\psi; \hat\psi) \mathrm{d}s_0. \end{equation} The derivative of the penalized objective functional $E(\psi)$ is therefore \begin{equation} E'(\psi;\hat{\psi}) = \epsilon'(\psi;\hat{\psi}) - C'(\psi;\hat{\psi}), \label{E':expr} \end{equation} where $\epsilon'$ and $C'$ are given by equations \eqref{eq:effsense} and \eqref{eq:pensense}, respectively. \section{Results and discussion} \label{sc:results} \subsection{Parametrization} We parametrize $\psi(s_0,t)$ such that \begin{equation} \psi(s_0,t) = \sum_{k=1}^m \xi_k(t) B_k(s_0), \end{equation} where $B_k$ are the 5th order B-spline basis functions and their coordinates $\xi_k(t)$ are expanded as trigonometric polynomials $\xi_k(t) = {a_{0k}}/{2} + \sum_{j=1}^n [a_{jk} \cos jt + b_{jk} \sin jt]$ to ensure time-periodicity. Taken together, we have \begin{equation} \psi(s_0,t) = \sum_{k=1}^m \bigg[\frac{a_{0k}}{2}+ \sum_{j=1}^n (a_{jk} \cos jt + b_{jk} \sin jt)\bigg] B_k(s_0) \label{param:def} \end{equation} so that the finite-dimensional optimization problem seeks optimal values for the $m(2n+1)$ coefficients $a_{0k}$, $a_{jk}$ and $b_{jk}$. The initial guesses are chosen to be low frequency waves with small wave amplitudes. To obtain such initial waves, the coefficients of the zeroth Fourier mode $a_{0k}/2$ are randomly chosen from a uniform distribution within $[0,1]$, the first Fourier modes $a_{1k} $ and $b_{1k}$ are randomly chosen from a uniform distribution within $[0,0.01]$, and the coefficients for higher order Fourier modes $j>1$ are set to 0. {To evaluate the gradient of $E(\psi)$ with respect to the design parameters $a_{0k}$, $a_{jk}$ and $b_{jk}$, we use~\eqref{E':expr} with $\hat{\psi}$ taken as the basis functions of the adopted parametrization~\eqref{param:def}, i.e. $\hat{\psi}(s_0,t)=B_k(s_0)/2$, $\hat{\psi}(s_0,t)=B_k(s_0)\cos jt$ and $\hat{\psi}(s_0,t)=B_k(s_0)\sin jt$, respectively.} In terms of parametrization, local minima are multiple in the parameter space, since multiplying optimal parameters by a constant factor yields the same optimum for $\alpha$. \subsection{Spheroidal swimmers} By way of validation, we start with optimizing the ciliary motion of a spherical microswimmer. The efficiency $\epsilon$ as a function of iteration number for the unconstrained optimization~\eqref{opt:unc} is shown in Figure~\ref{fig:optimization_unc}(a) in blue. The maximum efficiency is about $35\%$. The ciliary motion of the optimal spherical microswimmer is shown in Figure~\ref{fig:optimization_unc}(b). Each curve follows the arclength coordinate of a cilium tip over one period. We observe, similar to the results of \citet{Michelin2010Efficiency}, clearly distinguished strokes within the beating period. In particular, cilia travel downward `{spread out}' during the effective stroke (corresponding to a stretching of the surface), but travel upward `bundled' together during the recovery stroke in a shock-like structure (corresponding to a compression of the surface). {This type of waveform is known as an {\em antiplectic metachronal wave}~\citep{Knight-jones1954relations, blake1972model}.} We note that this optimal ciliary motion produces an efficiency higher than the $23\%$ efficiency obtained numerically by \citet[Fig. 11]{Michelin2010Efficiency}. This is due to a larger maximum displacement $\Delta s_\text{max} \approx 0.45\ell$ in our optimizations (translated to a maximum angle of 81 degrees vs 53 degrees). Our optimization result aligns well with their results using the analytical {\em ansatz}~\citep[Fig. 14]{Michelin2010Efficiency}. Additionally, we found that increasing the number of Fourier mode $n$ increases the maximum displacement as well as the efficiency; the optimal ciliary motion of higher $n$ also exhibits a higher slope for the shock-like structures (results not shown here). This is again consistent with their analytical {\em ansatz}, which shows that the efficiency approaches $50\%$ in the limit of the maximum displacement approaches 90 degrees, and the corresponding `width' of the shock in this limit is infinitely small. The mean slip velocity of the Eulerian points within each period are almost identical to the optimal {\em time-independent} slip velocity scaled by the swim speed, as shown in Figure~\ref{fig:optimization_unc}(d). \begin{figure} \centerline{\includegraphics{./Fig2.pdf}} \caption[]{Unconstrained optimization history of a spherical swimmer and a prolate swimmer with a 2:1 aspect ratio. The optimal spherical swimmer has an efficiency $\epsilon\approx35\%$ and swim speed $\langle U\rangle\approx1.2$. The optimal prolate swimmer has an efficiency $\epsilon\approx69\%$ and swim speed $\langle U\rangle\approx1.5$. (a) The efficiency as a function of iterations number. (b) \& (c) The ciliary motions of the optimal swimmers. (d) \& (e) The time-averaged slip velocities (at Eulerian points) are shown in solid curves. Dashed curves are the time-independent optimal slip velocities of the given shape scaled by the swim speed \citep{guo2021optimal}. Parameters used in the optimization: $m = 25, n = 2$. Number of panels $N_p = 20$, number of sample points $N_s = 80$, number of time steps per period $N_t = 50$. Same below unless otherwise mentioned. {Note that the vertical axes of figures (b)\&(c) are flipped so that the north pole ($s=0$) appear on the top of the figure. The corresponding waveforms are known as antiplectic metachronal waves (tips are spread out during the effective stroke and close together during the recovery stroke).} The videos of the optimal ciliary motions can be found in the online supplementary material~(Movie 1~\&~2).} \label{fig:optimization_unc} \end{figure} The optimal unconstrained prolate spheroidal microswimmer with a 2:1 aspect ratio has an efficiency $\epsilon\approx 69\%$, about twice as high as the spherical microswimmer as shown in Figure~\ref{fig:optimization_unc}(a). This roughly two-fold increase in efficiency is also observed in the optimal time-independent microswimmers~\citep{guo2021optimal}. The optimal ciliary motion is very close to that of the spherical swimmer (Fig.~\ref{fig:optimization_unc}(b)\&(c)) , while the mean slip velocity of the Eulerian points are between the optimal time-independent slip velocity of the same shape and those of a spherical swimmer, as shown in Figure~\ref{fig:optimization_unc}(e). As a sanity check, swapping the ciliary motions obtained from optimizing the spherical swimmer and the prolate swimmer leads in both cases to lower swimming efficiencies. Specifically, a spherical swimmer with the ciliary motion shown in Figure~\ref{fig:optimization_unc}(c) has 34\% swimming efficiency and a prolate swimmer with the ciliary motion shown in Figure~\ref{fig:optimization_unc}(b) has 65\% swimming efficiency (compared to 35\% and 69\% using the `true' optimal ciliary motions, respectively). We then turn to the case in which the cilia length is constrained by prescribing a bound on the displacement variance \eqref{eq:variance}. We control the maximum variance by tuning $c$ in \eqref{eq:penalty}, and the efficiencies are plotted against the maximum displacement $\Delta s_\text{max}$ scaled by the total arclength $\ell$ in Figure~\ref{fig:optimization_spheroidal}. Three different random initial guesses are used for each $c$. {The unconstrained optimization results for the spherical and prolate spheroidal swimmers are also shown in the figure for reference. Notably, for both the unconstrained swimmers, the length of the cilia is roughly half the total arclength of the generating curve ($\Delta s_\text{max}\approx \ell/2$). In other words, a cilium rooted at the equator would be able to get very close to both poles during the beating cycle.} In general, a smaller variance (tighter constraint) leads to a lower efficiency, as expected. The efficiency results of spherical microswimmers closely match those reported by \citet{Michelin2010Efficiency}. The efficiencies of the prolate spheroidal microswimmer under constraints are also shown in Figure~\ref{fig:optimization_spheroidal}. Similar to the spherical microswimmer, the efficiency increases roughly linearly with the scaled cilia length $\Delta s_\text{max}/\ell$, and converges to the kinematically unconstrained optimal microswimmer as the maximum variance $c$ is increased. \begin{figure} \centerline{\includegraphics{./Fig3.pdf}} \caption[]{Efficiency as a function of maximum displacement of ciliary tips. Blue and green symbols represent spherical and prolate spheroidal swimmers (2:1 aspect ratio) respectively. Diamond symbols are the optimal unconstrained case. Open symbols are optimization results of spherical swimmers taken from \citet[Figure 11]{Michelin2010Efficiency}. } \label{fig:optimization_spheroidal} \end{figure} It is noteworthy that adding a constraint in the cilia length not only limits the wave amplitudes, but also breaks the single wave with larger amplitude into multiple waves with smaller amplitudes~(Fig.~\ref{fig:optimization_spheroidal_waves}(a)), which resemble the metachronal waves of typical ciliated microswimmers such as {\em Paramecium}. More interestingly, the mean slip velocity in the constrained case can be qualitatively different from the time-independent optimal slip velocity, as shown in Figure~\ref{fig:optimization_spheroidal_waves}(b). In particular, the mean slip velocity around the equator is significantly higher than the time-independent slip velocity, while the mean slip velocity near the poles are closer to zero. This can be inferred from the ciliary motions, as the cilia only move slightly near the poles, whereas multiple waves with significant amplitudes travel around the equator within one period. \begin{figure} \centerline{\includegraphics{./Fig4.pdf}} \caption[]{Ciliary motion (a) and mean slip velocity (b) for the optimal spherical swimmer with constraint ($\Delta s_\text{max}/\ell \approx 5.0\%$). The efficiency is $\epsilon\approx 6.9\%$, and the swim speed is $\langle U\rangle \approx 0.091$. The swimmer forms multiple waves in the equatorial region, leading to a high slip velocity at $s\approx 0.5\ell$. The motion close to the poles is nearly zero. The dashed curve in (b) is the time-independent optimal slip velocity of the spherical swimmer, scaled by the swim speed. The video of the optimal ciliary motion can be found in the online supplementary material~(Movie 3).} \label{fig:optimization_spheroidal_waves} \end{figure} \subsection{Non-spheroidal swimmers}\label{sec:concave} We then investigate the effects of shapes on the optimal ciliary motions and the swimming efficiencies. In particular, we examine whether a single wave travelling between north and south poles always maximizes the swimming efficiency, and whether adding a constraint in the cilia length is always detrimental to the swimming efficiency. We consider a family of shapes whose generating curves are given by: $(x, z) = (R(\theta)\sin\theta, R(\theta)\cos\theta)$, where $R(\theta) = (1+\delta\cos 2\theta)$ is a function that makes the radius non-constant, and $\theta\in[0,\pi]$ is the parametric coordinate. For $0<\delta<1$, the radius is the smallest at $\theta = \pi/2$, corresponding to a `neck' around the equator. In the limit $\delta=0$, the generating curve reduces to a semicircle and the swimmer reduces to the spherical swimmer. \begin{figure} \centerline{\includegraphics{./Fig5.pdf}} \caption[]{ Constrained optimizations could lead to more efficient ciliary motions for microswimmers with a thin `neck' on average. (a): Efficiencies of the microswimmers with various neck widths. The \textit{median} efficiencies of the time-dependent optimizations across 10 randomized initial conditions are shown for each shape in cross symbols `$\times$'. Unconstrained and constrained optimizations ($c=1$) are depicted in blue and green, respectively. Efficiencies of the microswimmers with time-independent slips are shown, using black circle symbols `$\circ$', as a reference. (b)\&(c): Ciliary motions of microswimmers with $\delta=0.8$ from unconstrained and constrained optimizations from the same initial guess. The swimming efficiencies are $20\%$ and $29\%$, respectively. (d)\&(e): Mean slip velocity corresponding to the ciliary motions in (b)\&(c). Blue dashed curves are the optimal time-independent slip velocities scaled by the swim speed. In these simulations, we increase the number of panels $N_p = 40$ to resolve the sharp shape change. The videos of the optimal ciliary motions can be found in the online supplementary material~(Movie 4~\&~5)} \label{fig:optimization_neck} \end{figure} The optimization results are depicted in Figure~\ref{fig:optimization_neck} for $0\le \delta \le 0.8$. Some corresponding shapes are shown as insets. The median efficiencies of ten Monte Carlo simulations are plotted for each $\delta$ value, and compared against the time-independent efficiencies. For all three cases (constrained, unconstrained, and time-independent), the efficiencies increase as $\delta$ increases from $0$ to $0.3$. This is because increasing $\delta$ in this regime makes the shape more elongated. Increasing $\delta$ further reduces the efficiencies as the `neck' at the equator becomes more and more pronounced. Additionally, the unconstrained microswimmers, on average, have better efficiencies than the microswimmers with kinematic-constraints for $0\le \delta\le 0.6$. Interestingly, unconstrained optimization may result in worse ciliary motions on average when the shape is highly curved, compared to its kinematically-constrained counterpart. Specifically, the constrained microswimmers have higher median efficiencies for $\delta \ge 0.7$. We note that the unconstrained optimizations are likely to be trapped in local optima where the ciliary motion forms a single wave (Fig.~\ref{fig:optimization_neck}(b)), whereas the constrained optimizations are `forced' to find the ciliary motion with multiple waves split at the equator (Fig.~\ref{fig:optimization_neck}(c)), because of the constrained cilia length. Additionally, our numerical results show that a single wave travelling between the north and south poles is not as efficient as two separate waves travelling within each hemisphere for this shape. Figures~\ref{fig:optimization_neck}(d)\&(e) show that the single wave generates a high mean slip velocity at the position where the generating curve bends inward (the equator), whereas the two separate waves generate a mean slip velocity similar to that obtained from the time-independent optimization. In a way, the constraint in cilia length is helping the optimizer to navigate the parameter space. To better understand the effects of constraints on the highly curved shapes, we present the statistical results of the thin neck microswimmer ($\delta = 0.8$) with various constraints in Figure~\ref{fig:optimization_neck_box}. In general, the highest efficiency from the Monte Carlo simulations increases with the constraint for $c\le0.8$, similar to the case of spheroidal swimmers (Figure~\ref{fig:optimization_spheroidal}). Keep increasing $c$ has limited effect on the highest efficiencies, indicating that the constraint is no longer limiting the optimal ciliary motion. The median efficiencies (red horizontal lines), on the other hand, decreases with the constraint if $c \ge 0.8$, consistent with the observation from Figure~\ref{fig:optimization_neck}. It is worth noting that the constrained optimization is more likely to get stuck in {\em very} low efficiencies (e.g., the lowest outlier for $c=0.8$), possibly due to the secondary bump of the penalty function $C$ mentioned earlier. \begin{figure} \centerline{\includegraphics{./Fig6.pdf}} \caption[]{ Statistical results of thin neck microswimmer of $\delta = 0.8$ with various constraint $c$ for 10 Monte-Carlo simulations. The unconstrained simulation is denoted by $c=\infty$. (a) Efficiencies grouped by the constraint $c$. For each box, the central mark indicates the median of the 10 random simulations, and the bottom and top edges of the box indicate the 25th and 75th percentiles, respectively. The outliers are denoted by red $+$ symbols. (b) Efficiencies plotted against the maximum displacement $\Delta s_\text{max}/\ell$. The numerical parameter $\Lambda_2$ is set to be $10^4$ by default. Occasionally the optimization might stop within merely a few iterations, making the ciliary motion stuck in a very inefficient local minimum. Setting $\Lambda_2$ to $10^3$ for these cases (most of the time) cures the problem. } \label{fig:optimization_neck_box} \end{figure} All data points from the optimization are plotted in Figure~\ref{fig:optimization_neck_box}(b) as function of the maximum displacement $\Delta s_\text{max}$. The efficiencies grow almost linearly until $\Delta s_\text{max} \approx 0.25 \ell$, as in the case of spheroidal swimmers, and decrease for larger $\Delta s_\text{max}$. This is another evidence that the optimal ciliary motion for this shape consists of two separate waves traveling within each hemisphere. We want to emphasize that unconstrained optimization can still reach the optimal ciliary motion, as shown in the box of $c=\infty$. However it is more likely to reach the sub-optimal ciliary motion compared to the constrained cases. \section{Conclusions and Discussions} \label{sc:conclusion} In this paper, we extended the work of \citet{Michelin2010Efficiency} and studied the optimal ciliary motion for a microswimmer with arbitrary axisymmetric shape. In particular, the forward problem is solved using a boundary integral method and the sensitivities are derived using an adjoint-based method. The auxiliary function $\psi$ is parametrized using high-order B-spline basis functions in space and a trigonometric polynomial in time. We studied the constrained and unconstrained optimal ciliary motions of microswimmers with a variety of shapes, including spherical, prolate spheroidal, and concave shapes which are narrow around the equator. In all cases, the optimal swimmer displays (one or multiple) traveling waves, reminiscent of the typical metachronal waves observed in ciliated microswimmers. {Specifically, for the spherical swimmer with limited cilia length (Fig.~\ref{fig:optimization_spheroidal_waves}(a)), the ratio between the metachronal wavelength close to the equator and the cilia length could be estimated as ${\lambda_{MW}}/{\Delta s_\text{max}}\approx{0.2\ell}/{0.05\ell} = 4$. This ratio lies in the higher end of the data collected in~\citet[Table 9]{rodrigues2021bank} for biological ciliates, which reports ratio ranging between $0.5$ to $4$. Our slightly high ratio estimate may not be surprising after all, as the envelope model prohibits the crossing between neighboring cilia.} We showed that the optimal ciliary motions of prolate microswimmer with a 2:1 aspect ratio are very close to the ones of spherical microswimmer, while the swimming efficiency can increase two-fold. The mean slip velocity of unconstrained microswimmers also tend to follow the optimal time-independent slip velocity, which can be easily computed using our recent work~\citep{guo2021optimal}. Most interestingly, we found that constraining the cilia length for some shapes may lead to a better efficiency on average, compared to the unconstrained optimization. It is our conjecture that this counter-intuitive result is because the constraint effectively reduces the size of the parameter space, hence lowering the probability of being trapped in local optima during the optimization. {Although the concave shapes studied in Section~\ref{sec:concave} are somewhat non-standard, they allows us to gain insights into the effect of local curvature on optimal waveform. Incidentally, these shapes are also observed for ciliates in nature (e.g. during the cell division process).} {It is worth pointing out that works on sublayer models (explicitly modeling individual cilia motions) have reported swimming or transport efficiencies in the orders of $0.1\sim1\%$ (see, e.g., \citet{elgeti2013emergence, ito2019swimming, omori2020swimming}), {\em much} lower than the optimal efficiency reported here and others using the envelope models. This large difference can possibly be attributed to the fact that the envelope model we adopted here considers only the energy dissipation {\em outside} the ciliary layer (into the ambient fluid), while sublayer models in general considers energy dissipation both inside and outside the ciliary layer. Research has shown that the energy dissipation inside the layer could be as high as $90\sim95\%$ of the total energy dissipation, due to the large shear rate inside the layer (see, e.g., \citet{keller1977porous, ito2019swimming}). We note that it is possible to incorporate energy dissipation {\em inside} the ciliary layer in the envelope model, as previously done in \citet{vilfan2012optimal}, albeit for a time-independent slip profile. Additionally, the difference could also be due to modeling assumptions on the cilia length and the number of cilia. In particular, the cilia length considered in sublayer models are usually below $1/10$ of the body length. \citet{omori2020swimming} showed that the swimming efficiency increases with the cilia length as fast as powers of 3 in the short cilia limit, and the number of cilia also has a significant positive effect on the swimming efficiency (the envelope model assumes a ciliary continuum). Factoring all three factors (energy inside/outside, cilia length, number of cilia) could bridge the gap between the results obtained from these two types of models.} It is without a doubt that maximizing the hydrodynamic swimming efficiency is not the sole objective for biological microswimmers. Other functions such as generating feeding currents~\citep{Riisgaard2010, Pepper2013} and creating flow environment to accelerate mixing for chemical sensing~\citep{Supatto2008, Shields2010, Ding2014, Nawroth2017} are also important factors to consider as a microswimmer. The effect of such multi-tasking on the ciliary dynamics is not well understood. Nevertheless, our work provides an efficient framework to investigate the hydrodynamically optimal ciliary motions for microswimmers of any axisymmetric shape, and could provide insights into designing artificial microswimmers. A straightforward extension of our work is to allow more general ciliary motions, e.g., including deformations normal to the surface. Such a swimmer will display time-periodic shape changes and the optimization will require the derivation of shape sensitivities. Additionally, the computational cost would also increase significantly because the matrix in~\eqref{eq:fullsys} needs to be updated at every time step. Our framework is also open to many generalizations and could for example help in accounting for the multiple factors mentioned above, such as mixing for chemical sensing, in the study of optimal ciliary dynamics. \vspace{.2in} \noindent {\bf Acknowledgments.} Authors gratefully acknowledge support from NSF under grants DMS-1719834, DMS-1454010 and DMS-2012424.
\section{Introduction} \begin{abstract} Any $C^d$ conservative map $f$ of the $d$-dimensional unit ball ${\mathbb B}^d$ can be realized by renormalized iteration of a $C^d$ perturbation of identity: there exists a conservative diffeomorphism of ${\mathbb B}^d$, arbitrarily close to identity in the $C^d$ topology, that has a periodic disc on which the return dynamics after a $C^d$ change of coordinates is exactly $f$. \end{abstract} \section*{} What kind of dynamics can be {\it realized by renormalized iteration} of some diffeomorphism $F$ of the unit ball that is close to identity? Given a $d$-dimensional $C^r$-diffeomorphism $F$, its {\it renormalized iteration} is an iteration of $F$, restricted to a certain $d$-dimensional ball and taken in some $C^r$-coordinates in which the ball acquires radius 1. This natural question can be traced back to a celebrated paper by Ruelle and Takens \cite{RT}, where it appeared in connection to the mathematical notion of turbulence. From a subsequent paper by Newhouse, Ruelle and Takens \cite{NRT} it can be seen that any dynamics of class $C^d$ on the $d$-dimensional torus ${\mathbb T}^d$ can be realized by renormalized iteration of a $C^d$-small perturbation of the identity map on ${\mathbb T}^d$.\footnote{ In \cite{T} the straightforward strategy of \cite{RT} that leads to the latter result is clearly explained. We will reproduce this sketch below".} This result is specific to tori. As D.Turaev points out in \cite{T}, it implies that on an arbitrary manifold $M$ of dimension $d\geq 2$, arbitrary $d$-dimensional dynamics can be implemented by iterations of $C^{d-1}$-close to identity maps of ${\mathbb B}^d$, but the construction gives no clue of whether the same can be said about the $C^{d}$-close to identity maps. The present note shows that the construction of \cite{NRT} can be enhanced by an application of a method in the spirit of Moser \cite{M} (or Anosov-Katok \cite{AK}), to get realization by renormalized iteration of $C^{d+\varepsilon}$-close to identity maps of ${\mathbb B}^d$. More precisely, let ${\mathbb B}^d= \{ x\in {\mathbb R}^d : \| x \| \leq 1\}$ denote the unit ball and $\mu$ stand for the Lebesgue measure on it; for $r \in {\mathbb N} \cup \{ \infty \}$ we denote by ${\rm Diff}^r_\mu({\mathbb B}^d)$ the set of diffeomorphisms of class $C^r$ of ${\mathbb B}^d$, preserving the boundary. \begin{theo} \label{theo.main} For any natural $d\geq 2$ there exists $\varepsilon_0>0$ (one can take $\varepsilon_0 = \frac{1}{(d+1)^4}$) such that the following holds. For any $0<\varepsilon <\varepsilon_0$, any $ \delta >0$, any $f\in {\rm Diff}^{d+\varepsilon}_\mu({\mathbb B}^d)$ there exists $F \in {\rm Diff}^{d+\varepsilon}_\mu({\mathbb B}^d)$ and a periodic sequence of balls $B,F(B),\ldots,F^M(B)=B\subset {\mathbb B}^d$ such that \begin{itemize} \item $\|F-{\rm Id}\|_{d+\varepsilon} \leq \delta $; \item $h \circ F^M \circ h^{-1}=f$, where $h$ is the similarity that sends $B$ to ${\mathbb B}^d$. \end{itemize} \end{theo} It should be mentioned that this theorem does not hold for $d=1$, see e.g., \cite{T}, Sec.1. We note that in \cite{NRT}, the restriction on smoothness is removed, to the price of realizing $d$-dimensional dynamics by renormalizing $(d+1)$-dimensional maps on some $d$-dimensional embedded manifold. Following up on \cite{RT,NRT} and his own work on universality, Turaev in \cite{T} asks whether an arbitrary $d$-dimensional dynamics can be realized by iterations of a $C^{r}$-close to identity map of $B^d$ and a large $r$? Theorem \ref{theo.main} does not say anything for $r>d+\varepsilon$. While a more careful application of the same tools of its proof may yield the same statement in $C^{d+1-\varepsilon}$ regularity, dealing with higher regularities will certainly require new ideas. \subsection*{Related results} Note that in this note we are concerned with {\it exactly realizing } and not just {\it approximating} any given map. Approximating any given dynamics by renormalization (on almost periodic discs) is a very interesting topic with a vast literature. For instance, D. Turaev in \cite{T}, shows that for any $r \geq 1$ the renormalized iterations of $C^r$-close to identity maps of an $n$-dimensional unit ball ${\mathbb B}^n$ ($n \geq 2$) form a residual set among all orientation-preserving $C^r$-diffeomorphisms ${\mathbb B}^n \to R^n$. As an application he shows that any generic $n$-dimensional dynamical phenomenon can be arbitrarily closely (in $C^r$) approximated by iterations of $C^r$-close to identity maps, with the same dimension of the phase space. We refer to Turaev's paper for an account and for references. We just mention that recently, a highlight of the universality approach was the construction by Berger and Turaev in \cite{BT} of smooth conservative disc diffeomorphisms that are arbitrarily close to identity in any regularity and that have positive metric entropy, thus solving a conjecture made by Herman in \cite{herman-ICM}. \subsection*{An application to universality in the neighborhood of an elliptic fixed point of a area preserving surface diffeomorphisms.} A. Katok (personal communication) observed, that any area preserving surface diffeomorphism that has an elliptic periodic point can be perturbed in $C^r$ topology (arbitrary $r$) so that the perturbed diffeomorphism is area preserving and has a periodic disc on which the return dynamic is identity. Hence, we obtain the following consequence of Theorem \ref{theo.main}. \begin{cor} \label{cor.main} Any $C^{2+\varepsilon}$ area preserving diffeomorphism $g$ of a surface that has an elliptic periodic point can be perturbed in the $C^{2+\varepsilon}$ topology into an area preserving diffeomorphism $\tilde{g}$ that has a periodic disc on which the renormalized dynamics is equal to any prescribed $F \in {\rm Diff}^{2+\varepsilon}_\mu({\mathbb B}^2)$. \end{cor} In other words, arbitrarily close (in the sense of $C^{2+\varepsilon}$) to any area preserving diffeomorphism with an elliptic periodic point one can find any prescribed dynamics. We do not know whether every area preserving surface diffeomorphism that is not uniformly hyperbolic can be perturbed in the $C^2$ topology into one that has elliptic periodic points (this is known to hold in $C^1$ topology). Would this be proved, Corollary \ref{cor.main} would imply that any area preserving surface diffeomorphism that is not uniformly hyperbolic can be perturbed in $C^2$ topology into one that contains any prescribed dynamics. \bigskip \section*{Proofs} Our construction follows in part the straightforward approach of \cite{RT,NRT} of fragmenting the target dynamics into a composition of a large number of close to identity maps that are then reproduced (up to rescaling) on a sequence of pairwise disjoint small balls. Thus, we start by presenting the constructions from \cite{RT,NRT}, and then introduce and explain the changes we had to make to carry out the construction in slightly higher regularity. \subsection*{1. Fragmentation} The first ingredient of the proof is the following proposition of \cite{RT}; see \cite{NRT} or Turaev \cite{T}, page 2, for a comprehensive illustration. \begin{prop} [Fragmentation] \label{prop.fragmentation} Given $r\in {\mathbb N}$, $f \in {\rm Diff}^r_\mu({\mathbb B})$, for any $M \in {\mathbb N}$ there exists $f_0,\ldots,f_{M-1} \in {\rm Diff}^r_\mu({\mathbb B})$ and a constant $C(r,f) >0$ such that \begin{itemize} \item $\|f_i-{\rm Id}\|_r \leq C(r,f) M^{-1}$, \item $f=f_0 \circ \ldots \circ f_{M-1}$. \end{itemize} \end{prop} \begin{proof} Consider a Lipschitz isotopy $\psi: [0,1] \to {\rm Diff}^r_\mu({\mathbb B})$ (Lipschitz in $t \in [0,1]$) such that $\psi_0={\rm Id}$ and $\psi_1=f$. Let $f_i=\psi_{i/M}\circ \psi_{(i-1)/M}^{-1}$, for $i=0,\ldots,M-1$. The estimate is straightforward. \end{proof} \subsection*{2. Idea of the proof by \cite{RT,NRT}.} On a torus ${\mathbb T}^{d-1}$ consider an $A^{d-2}$-periodic translation $$ S^t(X)=X+t(1,\frac{1}{A}, \dots ,\frac{1}{A^{d-2}}). $$ Let $\gamma$ be the closed invariant curve of $S^{t}$ passing through the origin. The turbular neighbourhood of $\gamma$ of radius $\frac{1}{3A}$ does not intersect itself. Let $B$ be the $(d-1)$-dimensional ball of radius $\rho := \frac{1}{4A}$ centred at the origin, and let $B_i=S^{\frac{i}{A}}(B)$ for $i=0,\dots, A^{d-1}-1$. Then $S^t$ is an isometry, $S^{A^{d-1}}(B)=B$, and all $B_i$ for $i=0,\dots, A^{d-1}-1$ are disjoint. In other words, $B$ is the base of a periodic tower of discs for the map $S^{\frac{1}{A}}$. The height of the tower is $M=A^{d-1}$. To prove the theorem of \cite{NRT}, given $\varepsilon>0$ and a map $f\in {\rm Diff}^{d-\varepsilon}_\mu({\mathbb T}^{d-1})$, one applies Proposition \ref{prop.fragmentation} with $M=A^{d-1}$ to obtain $f_0\dots ,f_{M-1}$ with $\|f_i-{\rm Id}\|_{d} \leq C(d,f) M^{-1}$ such that $f=f_0 \circ \ldots \circ f_{M-1}$. Let $h_i$ be a similarity sending $B_i$ into the unit ball ${\mathbb B}^{d-1}$ (i.e., $h_i$ expands linearly by $1/\rho$), and define the desired map by $F|_{B_i}=S^{\frac{1}{A}} h_i^{-1}\circ f_i\circ h_i$ for $i=0,\dots, M-1$; extend $F$ by identity to the whole ${\mathbb T}^{d-1}$. One easily estimates $$ \|F-{\rm Id}\|_{d-\varepsilon}\leq \rho^{-(d-1-\varepsilon)} \max_i\|f_i-{\rm Id}\|_{d-\varepsilon}\leq (4A)^{(d-1-\varepsilon)} M^{-1}=c_0 A^{-\varepsilon}, $$ which is small for large $A$. In order to use the same idea for $ {\mathbb B}^d$, one can embed the set $[0,1]\times {\mathbb T}^{d-1}$ into ${\mathbb B}^d$ and do the same construction (extending the balls to ${d}$-dimensional ones). Then on ${\mathbb B}^d$ one gets a realization $\tilde F$ such that $\|\tilde F-{\rm Id}\|_{d-\varepsilon}$ is small, exactly as for the torus ${\mathbb T}^{d-1}$. \subsection*{3. Permutation map} To increase the smoothness of the realization for ${\mathbb B}^d$, we will find a longer sequence of $d$-dimensional balls $B_i$, $i=0,\dots, M-1$, of radius $\rho$, with $$ \rho=\frac1{4A}, \quad M=qA^{d-1}, $$ where $q$ is of order $A^{\varepsilon_0}$ for a certain $\varepsilon_0=\varepsilon_0(d)$, and a transformation $T$ mapping each $B_i$ into $B_{i+1}$ with $T^M(B_0)=B_0$ (the transformation $T$ plays the role of $S^{\frac{1}{A}}$ in the argument above). The increase of $M$ together with a relatively tame estimate for the norm of $T$ permits us to estimate the closeness of approximation in the $C^{d+\varepsilon}$-norm. We are able to ensure that $T$ maps $B_i$ into $B_{i+1}$ isometrically not for all, but for {\it a large proportion} of the iterates $i=1,\dots M$, and this is enough for our purposes. \begin{definition} [Funny periodic tower of balls] For $z \in {\mathbb B}^d$, $\eta>0$ we denote by $B(z,\eta)$ the ball of radius $\eta$ around $z$. For $T \in {\rm Diff}^r_\mu({\mathbb B}^d)$, $N \in {\mathbb N}$, $\eta,\gamma>0$, we say that $B=B(z,\eta)$ is a base of an $(\eta,N,\gamma)$-funny periodic tower of discs for $T$ if \begin{itemize} \item All $B_i:= T^i B$, $i=1,\ldots,N-1$, are disjoint; \item $T^N B=B$, and $T^N : B \to B$ is the Identity map, \item at least $[\gamma N]$ integers $n_i \in [1,N]$ are isometry times for $T$ in the sense that $T^{n_i}$ is an isometry from $B$ to the disc $B_i:=T^{n_i}B$. \end{itemize} \end{definition} The terminology {\it funny} periodic towers is borrowed from the notion of funny rank one introduced by J.-P. Thouvenot to weaken the notion of rank one systems (see \cite{Ferenczi}). \begin{prop} [Permutation map] \label{prop.tower} For any $d\geq 2$, $r\geq 1$, $A ,q\in {\mathbb N}$ such that $q^{r^4} \ll A$, there exists $T \in {\rm Diff}^\infty_\mu({\mathbb B}^d)$ such that \begin{itemize} \item $\|T - {\rm Id}\|_r \leq \frac{q^{r^4} }{A}$, \item $T$ has a $(\frac1{4A}, \frac12 q A^{d-1}, 1/2)$-funny periodic tower of discs. \end{itemize} \end{prop} \begin{proof} \noindent {\sc Embedding a ``fat torus" $\mathbb F$ into ${\mathbb B}^d$.} For a fixed $d\geq 2$, denote by $\mathbb F$ a ``fat torus": $$ \mathbb F= [0,1]\times {\mathbb T}^{d-1}, $$ where ${\mathbb T}^{d-1}={\mathbb R}^{d-1}/{\mathbb Z}^{d-1}$. We will denote the natural Haar-Lebesgue measure on $\mathbb F$ by $\mu$, and the coordinates in $\mathbb F$ by $(x,y,z)\in [0,1]\times {\mathbb T} \times {\mathbb T}^{d-2}$. (In two dimensions a ``fat torus'' $\mathbb F^2$ is an annulus with coordinates $(x,y)$.) Given $q>1$, consider an open set $P \in {\mathbb B}^d$ such that \begin{itemize} \item $P$ contains a cube $Q_q:=(0,1-\frac1{q})^{d}$; \item $P$ is $C^{\infty}$-diffeomorphic to $\mathbb F$; \item $\mu(P) =1$. \end{itemize} Let $h: P \to \mathbb F$ be a $C^\infty$ diffeomorphism, transforming the Lebesgue measure on ${\mathbb B}^{d}$ to that on $\mathbb F$, and such that $h$ is an isometry on the cube $Q_q$. Such a volume-preserving map exists by \cite{M} or \cite{AK}. \medskip \noindent {\sc Partition of $\mathbb F$.} Let $$ \begin{aligned} R_q&=[0,1] \times \left [0,\frac{1}{q} \right] \times {\mathbb T}^{d-2} \subset \mathbb F,\\ \Delta_q &= \left[ 0.1\, ,0.9 \right] \times \left[\frac{1}{10q}\, , \frac{9}{10q} \right] \times{\mathbb T}^{d-2} \subset R_q. \end{aligned} $$ Extend this construction $\frac{1}{q}$-periodically in $y$ to the whole $\mathbb F$ to obtain a partition of $\mathbb F$ into thin rectangular blocks. \medskip \noindent {\sc Switching to a "longer" fat torus $ \tilde {\mathbb F}_q$.} Consider another fat torus $$ \tilde {\mathbb F}_q = \left[0,\frac{1}{q} \right] \times ({\mathbb R}/(q{\mathbb Z})) \times {\mathbb T}^{d-2} $$ with coordinates $(\tilde x,\tilde y ,\tilde z)$ corresponding to the above splitting. Let $$ \begin{aligned} \tilde R_q&= \left[0,\frac{1}{q} \right] \times [0,1] \times {\mathbb T}^{d-2} \subset \tilde {\mathbb F}_q, \\ \tilde \Delta_q&= \left[\frac{1}{10q}\, , \frac{9}{10q} \right] \times \left[ 0.1\, ,0.9 \right] \times {\mathbb T}^{d-2} \subset \tilde R_q . \end{aligned} $$ Notice that $\tilde \Delta_q$ can be mapped into $\Delta_q$ by an isometry. Extend this construction 1-periodically in $\tilde y$ to the whole $\tilde {\mathbb F}_q$. We define the circle actions on $\mathbb F$ and $\tilde {\mathbb F}_q$, respectively: $$ \begin{aligned} S_t (x ,y, z_1\dots z_{d-2}) &= (x ,y, z_1\dots z_{d-2})+ t\left(0,1, \frac{1}{A}, \dots , \frac{1}{A^{d-2}}\right),\\ \tilde S_t (\tilde x,\tilde y ,\tilde z_1\dots \tilde z_{d-2})&= (\tilde x,\tilde y ,\tilde z_1\dots \tilde z_{d-2}) +t \left(0,1, \frac{1}{qA}, \dots , \frac{1}{qA^{d-2}}\right). \end{aligned} $$ We now define $h_q$ to be a volume-preserving map from $\mathbb F$ to $\tilde {\mathbb F}_q$ such that \begin{itemize} \item $h_q$ maps the set $\mathbb F|_{y=0}$ to $\tilde {\mathbb F}_q|_{\tilde y=0}$; \item $h_q$ acts as identity on the last $d-2$ components; \item $h_q(R_q)=\tilde R_q$, \ $h_q \circ S_{\frac{1}{q}} = \tilde S_1 \circ h_q$; \item $h_q(\Delta_q)=\tilde \Delta_q$, and $h_q$ acts as an isometry in restriction to $\Delta_q$; \item $\|h_q\|_r \leq q^{2r}$. \end{itemize} \medskip \noindent {\sc Definition of the desired map $T$.} Let $\varphi : (0,q^{-1})\to {\mathbb R}$ of class $C^r$ be such that $$ \varphi(\tilde x)= \begin{cases} 1/A, & \text{ for } \tilde x\in [0.3q^{-1},0.7q^{-1}] \\ 0 & \text{ for } \tilde x \in (0,0.2q^{-1}] \cup [0.8q^{-1}, q^{-1}). \end{cases} $$ It is easy to construct such a function satisfying $\| \varphi \|_r\leq q^{2r}/A$. Define on $\tilde {\mathbb F}_q$ the shear map $$\tilde T_\varphi (\tilde x,\tilde y ,\tilde z_1\dots \tilde z_{d-2})= (\tilde x,\tilde y ,\tilde z_1\dots \tilde z_{d-2}) +\varphi(\tilde x)\cdot \left(0,1, \frac{1}{qA}, \dots , \frac{1}{qA^{d-2}}\right). $$ Finally, let $T:P \mapsto P$ be defined by $$ T=h^{-1}\circ h_q^{-1} \circ \tilde T_{\varphi} \circ h_q \circ h. $$ The fact that $\tilde T_{\varphi}$ equals identity close to the boundary of $\tilde {\mathbb F}_q$ implies that $T$ equals identity close to the boundary of $P$, and can thus be extended by identity to the whole ${\mathbb B}^{d}$. The obtained transformation $T:{\mathbb B}^{d} \mapsto {\mathbb B}^{d}$ satisfies the conclusion of Proposition \ref{prop.tower}. Indeed, we have that $$ \|T-{\rm Id}\|_r\leq \left( \|h_q\|_{r+1} \|h_q^{-1}\|_{r+1} \|h\|_{r+1}\|h^{-1}\|_{r+1}\right)^{r+1} \|\tilde T_\varphi-{\rm Id}\|_{r+1} \leq \frac{q^{r^4}}{A}. $$ As for the funny periodic tower, let $\tilde B$ be the disc of radius $\rho=\frac1{4A}$ centred at $(\tilde x,\tilde y,\tilde z)=(\frac1{2q},0,0)$. Take for the base of the tower of $T$ the ball $B:=h^{-1}\circ h_q^{-1}(\tilde B)$. Under $\tilde T_\varphi$, the center of $\tilde B$ is translated by $1/A$ along the trajectory of the shift $\tilde S$ passing through this point. It is easy to see that the tubular neighborhood of radius $1/(3A)$ of this trajectory does not intersect itself, and $\tilde S^{qA^{d-1}}=\text{\, Id}$. Moreover, $\tilde T_\varphi$ is an isometry on this neighborhood. Therefore, $\tilde B$ is the base of a tower by discs of height $qA^{d-1}$ for $\tilde T_\varphi$ on $\tilde {\mathbb F}$. Moreover the times $n_i \in [0, A^{d-1}q-1]$ such that $\tilde T_\varphi^{n_i}(\tilde {\mathbb F} ) \in \cup_{\ell=0}^{q-1} \tilde S_\ell \tilde \Delta_q$ represent a proportion of around $8/10$ of $A^{d-1}q$, hence clearly more than $1/2$ of $n \in [0,A^{d-1}q]$ are isometric times for $T$. For such times $T^{n_i}|_{B}=h^{-1}\circ h_q^{-1} \circ \tilde T_\varphi^{n_i} \circ h_q\circ h$ is a composition of several isometries and is thus an isometry. \end{proof} \subsection*{4. Proof of Theorem \ref{theo.main}} \begin{proof}[Proof of Theorem \ref{theo.main}] Given $d\geq 2$, let $\varepsilon_0=\frac{1}{(d+1)^{4}}$. Fix any $0<\varepsilon<\varepsilon_0$, let $r:=d+\varepsilon$, and assume that $f \in {\rm Diff}^r_\mu({\mathbb B})$. Choose a large $q\in {\mathbb N}$ and $A>q^{r^4} $, let $M=\frac12qA^{d-1}$ and apply Proposition \ref{prop.fragmentation} to get $f_0,\ldots, f_{M-1} \in \diff$ such that $\|f_i-{\rm Id}\|_r\leq C(d, r,f) M^{-1}$ and $f=f_0 \circ \ldots \circ f_{M-1}$. Let $T$ be as in Proposition \ref{prop.tower} with $d$, $r$, $A$ and $q$ as above. We let $B_i=T^{n_i} B$, where $B$ is the base of the $(1/(4A), 2M , 1/2)$-funny periodic tower of discs, and $0=n_0 ,\ldots,n_{M}=2M$ are isometric times for $T$. By Proposition \ref{prop.tower}, $T^{n_{M}}=T^{2M}$ is the Identity from $B$ to $B$, and \begin{equation} \label{eq.T} \|T-{\rm Id}\|_r \leq \frac{q^{r^{4}}}{A} . \end{equation} Let $h_{i} : B_i \to {\mathbb B}^{d}$ be similarities that send $B_i$ onto ${\mathbb B}^{d}$ such that for $i=0,\ldots,M-1$ we have \begin{equation} \label{eq.hii} h_{i} = h_0 \circ T^{-n_{i}}, \end{equation} or equivalently \begin{equation} \label{eq.hi} h_{i+1} = h_i \circ T^{-(n_{i+1}-n_i)}. \end{equation} Observe that since $T^{n_{M}} : B_0 \to B_0$ is the Identity map, then it follows that \begin{equation} \label{eq.hN} h_{n_M} =h_{0} \circ T^{-n_{M}}=h_0. \end{equation} We define $\bar{F} \in \diff$ such that \begin{itemize} \item $\bar{F}|_{B_i}= h_i^{-1} \circ f_i \circ h_i$, $\forall i=0,\ldots,M-1$; \item $\bar{F}$ equals Identity on the complementary of $B_0 \sqcup \ldots \sqcup B_{M-1}$. \end{itemize} Observe that since $h_i$ are similarities that expand by $1/\rho=4A$, we have that \begin{equation} \label{eq.norm} \begin{aligned} \|\bar{F} - {\rm Id}\|_{r} \leq & c_0 A^{r-1} \max_i \|f_i - {\rm Id}\|_{r} \leq A^{r-1}C(r,d,f) M^{-1} = \\ &C(r,d,f) q^{-1}A^{d-r} \end{aligned} \end{equation} Define finally ${F} \in \diff$ by $$ F=T \circ \bar{F}. $$ Since $$ F-{\rm Id}=(\bar{F} - {\rm Id} ) + (T - {\rm Id} )\circ \bar{F} , $$ estimates \eqref{eq.T} and \eqref{eq.norm} imply that for a constant $C _1(d,r) $ we have $$ \|F-{\rm Id}\|_r \leq \|\bar{F} - {\rm Id}\|_{r} + \| T - {\rm Id}\|_{r} \leq C(r,d,f) q^{-1} A^{r-d} + C _1(d,r) \frac{q^{r^{4}}}{A} . $$ Given $ \delta >0$, we need to identify those $\varepsilon$ for which the latter sum can be made smaller than $ \delta $ by a choice of $A$ and $q$. Notice that $q$ enters in the latter two terms both in the numerator and in the denominator. Let $c_1$, $c_2$ be positive constants such that $c_1+c_2=1$. We need $$ C(r,d,f) q^{-1} A^{\varepsilon }\leq c_1 \delta ,\quad C _1(d,r) \frac{q^{r^{4}}}{A} \leq c_2 \delta , $$ which gives \begin{equation}\label{est_q} C_2(r,d,f) A^{\varepsilon } (c_1 \delta )^{-1} < q < (c_2 \delta A )^{1/r^{4}}. \end{equation} Such a choice of $q$ is possible if $$ \varepsilon < \frac{1}{r^{4}} =\frac{1}{(d+\varepsilon)^{4}}:=\varepsilon_0 $$ and $A$ is sufficiently large. Let us summarise the above argument. Assume that $\varepsilon $ satisfies the above inequality, let $r=d+\varepsilon$. Given $\delta$, choose a sufficiently large $A$ and let $q$ satisfy \eqref{est_q}. Then we have $\| F - {\rm Id}\|_{d+\varepsilon} <\delta$, as desired. At the same time, $F^{n_{M}}(B_0)=B_0=B$ and by \eqref{eq.hi} and \eqref{eq.hN} we have $$ F^{n_{M}}|_{B}= h_0^{-1} \circ f \circ h_0, $$ which completes the proof of Theorem \ref{theo.main}. \end{proof}
\section{Supplementary material} \subsection{Implementation details} \label{sec:appendix-implementation-details} \paragraph{Dataset preparation} We infer object silhouettes using PointRend \cite{kirillov2020pointrend} with an X101-FPN backbone, using their pretrained model on COCO \cite{lin2014mscoco}. We set the object detection threshold to 0.9 to select only confident objects. As mentioned in \autoref{sec:method}, we discard object instances that are either \emph{(i)} too small (mask area $< 96^2$ pixels), \emph{(ii)} touch the borders of the image (indicator of possible truncation), or \emph{(iii)} collide with other detected objects (indicator of potential occlusion). For the object part segmentations, we use the semi-supervised object detector from \cite{hu2018segmenteverything}, which can segment all 3000 classes available in Visual Genome (VG) \cite{krishna2017visualgenome} while being supervised only on mask annotations from COCO. Although this model was not conceived for object part segmentation, we find that it can be used as a cost-effective way of obtaining meaningful part segmentations without collecting extra data or using co-part segmentation models that require class-specific hyperparameter tuning, such as \ \emph{SCOPS} \cite{hung2019scops}. Specifically, since VG presents a long tail of rare classes, as in \cite{pavllo2020stylesemantics} we found it beneficial to first pre-select a small number of representative classes that are widespread across categories (e.g.\ all land vehicles have wheels, all animals have legs). We set the detection threshold of this model to 0.2 and, for each image category, we only keep semantic classes that appear in at least 25\% of the images, which helps eliminate spurious detections. On our data, this leads to a number of semantic classes $K \approx 10$ per image category (33 across all categories). The full list of semantic classes can be seen in \autoref{fig:semantic-templates}. To deal with potentially overlapping part detections (e.g.\ the segmentation mask of the door of a car might overlap with a window), the output semantic maps represent probability distributions over classes, where we weight each semantic class proportionally to the object detection score. Additionally, we add an extra class for ``no class'' (depicted in gray in our figures). \paragraph{Mesh templates and remeshing} We borrow a selection of mesh templates from \cite{kulkarni2020acsm} as well as meshes freely available on the web. In the experiments where we adopt multiple mesh templates, we only use 2--4 meshes per category. An important preliminary step of our approach, which is performed even before the pose estimation step, consists in \emph{remeshing} these templates to align them to a common topology. This has the goal of reducing their complexity (which translates into a speed-up during optimization), removing potential invisible interiors, and enabling efficient batching by making sure that every mesh has the same number of vertices/faces. Additionally, as mentioned in \autoref{sec:generation-estimation}, remeshing is required for the semi-supervision loss term in the reconstruction model. We frame this task as an optimization problem where we deform a $32\times32$ UV sphere to match the mesh template. More specifically, we render each template from 64 random viewpoints at $256 \times 256$ resolution, and minimize the MSE loss between the rendered deformed sphere and the target template in pixel space ($\mathcal{L}_\text{MSE}$). Moreover, we regularize the mesh by adding \emph{(i)} a smoothness loss $\mathcal{L}_\text{flat}$, which encourages neighboring faces to have similar normals, \emph{(ii)} a Laplacian smoothing loss $\mathcal{L}_\text{lap}$ with quad connectivity (i.e.\ using the topology of the UV map as opposed to that of the triangle mesh), and \emph{(iii)} an edge length loss $\mathcal{L}_\text{len}$ with quad connectivity, which encourages edges to have similar lengths. $\mathcal{L}_\text{flat}$ and $\mathcal{L}_\text{len}$ are defined as follows: \setlength{\belowdisplayskip}{6pt} \setlength{\abovedisplayskip}{6pt} \begin{equation} \resizebox{0.50\linewidth}{!}{$\displaystyle\mathcal{L}_\text{flat} = \frac{1}{|E|} \sum_{i, j \in E} (1 - \cos\theta_{ij})^2$} \end{equation} \begin{equation} \resizebox{0.9\linewidth}{!}{$\displaystyle\mathcal{L}_\text{len} = \frac{1}{|UV|} \sum_{i \in U} \sum_{j \in V} \frac{\lVert \mathbf{v}_{i+1, j} - \mathbf{v}_{i, j} \rVert_1 + \lVert \mathbf{v}_{i, j+1} - \mathbf{v}_{i, j} \rVert_1}{6}$} \end{equation} where $E$ is the set of edges, $\cos\theta_{ij}$ is the cosine similarity between the normals of faces $i$ and $j$, and $\mathbf{v}_{i,j}$ represents the 3D vertex at the coordinates $i, j$ of the UV map.\\ Finally, we weight each term as follows: \begin{equation} \mathcal{L} = \mathcal{L}_\text{MSE} + 0.00001\,\mathcal{L}_\text{flat} + 0.003\,\mathcal{L}_\text{lap} + 0.01\,\mathcal{L}_\text{len} \end{equation} Additionally, in the experiments with multiple mesh templates, we add a pairwise similarity loss $\mathcal{L}_\text{align}$ which penalizes large variations of the vertex positions between different mesh templates (only within the same category): \begin{align} \mathcal{L}_\text{align} = \frac{1}{N_t^2} \sum_{i = 1}^{N_t} \sum_{j = 1}^{N_t} \lVert \mathbf{V_i} - \mathbf{V_j} \rVert_2 \end{align} where $\mathbf{V_i}$ is a matrix that contains the vertex positions of the $i$-th mesh template (of shape $3 \times N_v$), and $N_t$ is the number of mesh templates. This loss term is added to the total loss with weight $0.001$. Note that we use a non-squared L2 penalty for this term, which encourages a sparse set of vertices to change between mesh templates.\\ We optimize the final loss using SGD with momentum (initial learning rate $\alpha = 0.0001$ and momentum $\beta = 0.9$). We linearly increase $\alpha$ to $0.0005$ over the course of 500 iterations (warm-up) and then exponentially decay $\alpha$ with rate $0.9999$. We stop when the learning rate falls below $0.0001$. Additionally, we normalize the gradient before each update. \autoref{fig:appendix-remeshing} shows two qualitative examples of remeshing. \begin{figure}[ht] \begin{center} \includegraphics[width=\linewidth]{fig/appendix-remeshing.pdf} \end{center} \caption{Remeshing of the mesh templates. In this figure we show two demos (one template for \emph{car} and one for \emph{airplane}).} \label{fig:appendix-remeshing} \end{figure} \paragraph{Pose estimation} For the silhouette optimization step, we initialize $N_c = 40$ camera hypotheses per image by uniformly quantizing azimuth and elevation (8 quantization levels along azimuth and 5 levels along elevation). We optimize each camera hypothesis using Adam \cite{kingma2014adam} with full-matrix preconditioning, where we set $\beta_1 = 0.9$ and $\beta_2 = 0.95$. % The implementation of our variant of Adam as well its theoretical justification are described in the next paragraph. We optimize each hypothesis for 100 iterations, with an initial learning rate $\alpha = 0.1$ which is decayed to 0.01 after the 80th iteration. After each iteration, we reproject quaternions onto the unit ball. As a performance optimization, silhouettes are initially rendered at 128$\times$128 resolution, which is increased to 192$\times$192 after the 30th iteration and 256$\times$256 after the 60th iteration. Finally, in the settings where we prune camera hypotheses, we discard the worst 50\% hypotheses as measured by the intersection-over-union (IoU) between projected and target silhouettes. This is performed twice: after the 30th and 60th iteration. \renewcommand{\algorithmiccomment}[1]{\bgroup\hfill $\triangleright$ ~#1\egroup} \newcommand{\vc}[1]{\textit{\textbf{#1}}} \newcommand{\cb}[1]{\colorbox{ForestGreen}{#1}} \begin{algorithm}[ht] \small \caption{Adam with full-matrix preconditioning.\\Changes w.r.t. the original algorithm are \cb{highlighted}.} \label{alg:appendix-adam-full} \begin{algorithmic}[1] \STATE{\textbf{require} $\alpha$ (step size), $\beta_1, \beta_2, \epsilon$} \STATE{\textbf{initialize} time step $t \leftarrow 0$} \STATE{\textbf{initialize} parameters $\boldsymbol{\theta}_{0}$ ($d$-dimensional col.\ vector)} \STATE{\textbf{initialize} first moment $\vc{m}_{0} \leftarrow \vc{0}$ ($d$-dimensional col.\ vector)} \STATE{\textbf{initialize} second moment \cb{$\vc{V}_{0}$}$\leftarrow \vc{0}$ ($d \times d$ \cb{matrix})} \REPEAT \STATE{$t \leftarrow t + 1$} \STATE{$\vc{g}_t \leftarrow \nabla_{\boldsymbol{\theta}} f_t(\boldsymbol{\theta}_{t-1})$} \COMMENT{gradient} \STATE{$\vc{m}_t \leftarrow \beta_1 \vc{m}_{t-1} + (1 - \beta_1) \vc{g}_t $} \COMMENT{first moment} \STATE{$\vc{V}_t \leftarrow \beta_2 \vc{V}_{t-1} + (1 - \beta_2)$ \cb{$\vc{g}_t\vc{g}^T_t$}} \COMMENT{second moment} \STATE{$\hat{\vc{m}}_t \leftarrow \vc{m}_t/(1 - \beta_1^t) $} \COMMENT{bias correction} \STATE{$\hat{\vc{{V}}}_t \leftarrow \vc{V}_t/(1 - \beta_2^t) $} \COMMENT{bias correction} \STATE{$\boldsymbol{\theta}_t \leftarrow \boldsymbol{\theta}_{t-1} - \alpha $ \cb{$(\hat{\vc{V}}_t + \epsilon \mathbf{I}_d)^{-\frac{1}{2}}$}$\hat{\vc{m}}_t$} \COMMENT{update} \UNTIL{\textit{stopping criterion} } \RETURN{$\boldsymbol{\theta}_t$} \end{algorithmic} \end{algorithm} \paragraph{Full-matrix preconditioning} Adam \cite{kingma2014adam} is an established optimizer for training neural networks. Its use of diagonal preconditioning is an effective trick to avoid storing an $\mathcal{O}(d^2)$ matrix for the second moments (where $d$ is the number of learnable parameters), for which a matrix square root and inverse need to be subsequently computed (an extra $\mathcal{O}(d^3)$ cost for each of the two operations). However, since our goal is to optimize camera parameters, we observe that: \begin{enumerate}[leftmargin=*, itemsep=-2pt] \item Optimizers with diagonal preconditioning are not rotation invariant, i.e.\ they have some preferential directions that might bias the pose estimation result. \item Since each camera hypothesis comprises only 8 parameters, inverting an $8 \times 8$ matrix has a negligible cost. \end{enumerate} Using a rotation invariant optimizer such as SGD (with or without momentum) is a more principled choice as it addresses the first observation. However, based on our second observation, we take the best of both worlds and modify Adam to implement full-matrix preconditioning. This only requires a trivial modification to the original implementation, which we show in \autoref{alg:appendix-adam-full} (changes w.r.t. the original algorithm are highlighted in green). \paragraph{Semantic template inference} As mentioned in \autoref{sec:pose-estimation}, the goal of this step is to infer a 3D semantic template for each mesh template, given an initial (untextured) mesh template, the output of the silhouette optimization step, and a collection of 2D semantic maps. Recapitulating from \autoref{sec:pose-estimation}, we solve the following optimization problem: \begin{align} \mathcal{L}_i &= \left\lVert \mathcal{R}(\mathbf{V}_\text{tpl}, \mathbf{F}_\text{tpl}, \mathbf{C}_\text{tpl};\; \mathbf{q_i}, \mathbf{t_i}, s_i, {z_0}_i) - \mathbf{C_i} \right\rVert^2 \\ \mathbf{C}_\text{tpl}^* &= \min_{\mathbf{C}_\text{tpl}} \frac{1}{N_\text{top}} \sum_i \mathcal{L}_i \end{align} Conceptually, our goal is to learn a shared semantic template (parameterized using vertex colors) that averages all 2D semantic maps in vertex space. We propose the following closed-form solution which uses the gradients from the differentiable renderer and requires only a single pass through the dataset: \begin{align} \mathbf{A} &= \sum_i \nabla_{\mathbf{C}_\text{tpl}} (\mathcal{L}_i)\\ (\mathbf{C}_\text{tpl}^*)_{k} &= \frac{\epsilon +\mathbf{a_{k}} }{K\epsilon + \sum_j \mathbf{a_{j}}} \end{align} where $\mathbf{A}$ is an accumulator matrix that has the same shape as the $\mathbf{C}_\text{tpl}$ (the vertex colors), and $\epsilon$ is a small \emph{additive smoothing} constant that leads to a uniform distribution on vertices that are never rendered (and thus have no gradient). This operation can be regarded as projecting the 2D object-part semantics onto the mesh vertices and computing a color histogram on each vertex. We show a sample illustration in \autoref{fig:appendix-semantic-inference}. \begin{figure}[ht] \begin{center} \includegraphics[width=\linewidth]{fig/appendix-semantic-inference.pdf} \end{center} \caption{Semantic template inference, starting from an untextured 3D mesh template (left-to-right progression). In this figure we show a demo with two sample images, and the final result using the top 100 images as measured by the IoU.} \label{fig:appendix-semantic-inference} \end{figure} In section \autoref{sec:pose-estimation} we explained that we compute the semantic template using the top $N_\text{top} = 100$ images as measured by the IoU, among those that passed the ambiguity detection test ($v_\text{agr} < 0.3$). To further improve the quality of the inferred semantic templates, we found it beneficial to add an additional filter where we only select poses whose cosine distance is within 0.5 (i.e.\ 45 degrees) of the left/right side. Objects observed from the left/right side are intrinsically unambiguous, since there is no complementary pose that results in the same silhouette. Therefore, we favor views that are close to the left/right as opposed to the front/back or top/bottom, which are the most ambiguous views. Note that this filter is only used for the semantic template inference step. % \paragraph{Generative model} We train the single-category reconstruction networks (setting \textbf{A}) for 130k iterations, with a batch size of 32, and on a single GPU. The multi-category model (setting \textbf{B}) is trained for 1000 epochs, with a total batch size of 128 across 4 GPUs, using synchronized batch normalization. In both settings, we use Adam \cite{kingma2014adam} (the original one, not our variant with full-matrix preconditioning) with an initial learning rate of $0.0001$ which is halved at 1/4, 1/2, 3/4 of the training schedule. For the GAN, we use the same hyperparameters as \cite{pavllo2020convmesh}, except in the multi-category model (setting \textbf{B}), which is trained with a batch size of 64 instead of the default 32. Furthermore, in setting \textbf{B}, and for both models (reconstruction and GAN), we equalize classes during mini-batch sampling. This is motivated by the large variability in the amount of training images, as explained in \autoref{sec:datasets}, and as can also be seen in \autoref{tab:appendix-dataset-stats}. Finally, as in \cite{pavllo2020convmesh, kanazawa2018cmr, goel2020ucmr, li2020umr}, we force generated meshes to be left/right symmetric. \paragraph{Semantic mesh generation} In the setting where we generate a 3D mesh from a semantic layout in UV space, we modify the generator architecture of \cite{pavllo2020convmesh}. Specifically, we replace the input linear layer (the one that projects the latent code $\mathbf{z}$ onto the first $8 \times 8$ convolutional feature map) with four convolutional layers. These progressively downsample the semantic layout from $128 \times 128$ down to $8 \times 8$ (i.e.\ each layer has stride 2). The first layer takes as input a \emph{one-hot} semantic map (with $K$ semantic channels) and yields 64 output channels (128, 256, 512 in the following layers). In these 4 layers, we use Leaky ReLU activations (slope 0.2), spectral normalization, but no batch normalization. We leave the rest of the network unchanged. In this model, we also found it necessary to fine-tune the batch normalization statistics prior to evaluation, which we do by running a forward pass over the entire dataset on the \emph{running average} model. As for the discriminator, we simply resize the semantic map as required and concatenate it to the input. \subsection{Additional results} \label{sec:appendix-additional-results} \begin{figure}[ht] \begin{center} \includegraphics[width=0.49\linewidth]{fig/gd_distribution_filtered_car_multi.pdf} \includegraphics[width=0.49\linewidth]{fig/gd_distribution_filtered_car_single.pdf}\\ \vspace{2mm} \includegraphics[width=0.49\linewidth]{fig/gd_distribution_filtered_airplane_multi.pdf} \includegraphics[width=0.49\linewidth]{fig/gd_distribution_filtered_airplane_single.pdf}\\ \vspace{2mm} \includegraphics[width=0.49\linewidth]{fig/gd_distribution_filtered_bird_multi.pdf} \includegraphics[width=0.49\linewidth]{fig/gd_distribution_filtered_bird_single.pdf} \end{center} \caption{Distribution of pose estimation errors on \emph{car}, \emph{airplane}, and \emph{bird}. We compare settings where we use multiple mesh templates (left) and a single template (right).} \label{fig:appendix-pose-estimation} \end{figure} \paragraph{Pose estimation} In \autoref{fig:appendix-pose-estimation}, we provide more insight into the \emph{geodesic distance} metric, which measures the cosine distance between the rotations predicted by our approach (\autoref{sec:pose-estimation}) and SfM rotations. In particular, as opposed to the results presented in \autoref{tab:pose-estimation-results} (which shows only the average), here we show the full distribution of errors. A distance of $0$ means that the two rotations match exactly, whereas a distance of $1$ (maximum value) means that the rotations are rotated by 180 degrees from one another. On the analyzed classes (\emph{car}, \emph{airplane}, and \emph{bird}, for which we have SfM poses), we can generally observe a bimodal distribution: a majority of images where pose estimation is correct, i.e.\ the GD is close to zero, and a small cluster of images where the GD is close to one. This is often the case for ambiguities: for instance, in cars we sometimes observe a front/back confusion. As expected, exploiting semantics (step 2) mitigates this issue and increases the amount of available images (this is particularly visible on \emph{bird}). We also note that, for rigid objects such as \emph{car} and \emph{airplane}, the distribution is more peaky, whereas for \emph{bird} the tail of errors is longer, most likely because pose estimation is more ill-defined for articulated objects. \paragraph{Qualitative results} We show extra qualitative results in \autoref{fig:appendix-qualitative}. In particular, we render each generated mesh from two random viewpoints and showcase the associated texture and wireframe mesh. Additionally, in \autoref{fig:appendix-failure-cases} we show the most common failure cases across categories. We can identify some general patterns: for instance, in vehicles we sometimes observe incoherent textures (this is particularly visible in \emph{truck} due to the small size of this dataset). On animals, as mentioned, we observe occasional failures to model facial details, merged/distorted legs, and more rarely, mesh distortions. To some extent, these issues can be mitigated by sampling from the generator using a lower truncation threshold (we use $\sigma = 1.0$ in our experiments), at the expense of sample diversity. \begin{figure}[t] \begin{center} \includegraphics[width=\linewidth]{fig/appendix-failure-cases.jpg} \end{center} \caption{Failure cases for a variety of categories.} \label{fig:appendix-failure-cases} \end{figure} \begin{figure*}[t] \begin{center} \includegraphics[width=\textwidth]{fig/all_templates_full.pdf} \end{center} \caption{Visualization of \emph{all} the learned 3D semantic templates (2--4 per category). While most results are as expected, the figure highlights some failure cases, e.g.\ in \emph{truck} some templates have very few images assigned to them, which leads to incoherent semantics.} \label{fig:appendix-semantic-templates-full} \end{figure*} \begin{figure*}[p] \begin{center} \includegraphics[width=\textwidth]{fig/appendix-demos.jpg} \end{center} \caption{Additional qualitative results. We show three examples per category. Each example is rendered from two random views, and the corresponding texture/wireframe mesh is also shown.} \label{fig:appendix-qualitative} \end{figure*} \paragraph{Semantic templates} \autoref{fig:appendix-semantic-templates-full} shows the full set of learned semantic templates for every category. Most results are coherent, although we observe a small number of failure cases, e.g.\ in \emph{truck} one or two templates are mostly empty and are thus ineffective for properly resolving ambiguities. This generally happens when the templates have too few images assigned to them and explains why the multi-template setting does not consistently outperform the single-template setting. \paragraph{Demo video} The supplementary material includes a video where we show additional qualitative results. First, we showcase samples generated by our models in setting \textbf{A} and explore the latent space of the generator. Second, we analyze the latent space of the model trained to generate multiple classes (setting \textbf{B}), and discover interpretable directions in the latent space, which can be used to control shared aspects between classes (e.g.\ lighting, shadows). We also interpolate between different classes while keeping the latent space fixed, and highlight that style is preserved during interpolation. Finally, we showcase a setting where we generate a mesh from a hand-drawn semantic layout in UV space, similar to \autoref{fig:semantic-generation}. \subsection{Dataset information} \label{sec:appendix-dataset-information} For our experiments on ImageNet, we adopt the \emph{synsets} specified in \autoref{tab:appendix-dataset-stats}. Since some of our required synsets are not available in the more popular ImageNet1k, we draw all of our data from the larger ImageNet22k set. \begin{table}[t] \begin{center} \resizebox{\linewidth}{!}{ \begin{tabular}{l|l|l|l} Class & Synsets & Raw images & Valid instances \\ \hline\hline Motorbike & \begin{tabular}[c]{@{}l@{}}n03790512, n03791053, n04466871\end{tabular} & 4037 & 1351 \\ \hline Bus & \begin{tabular}[c]{@{}l@{}}n04146614, n02924116\end{tabular} & 2641 & 1190 \\ \hline Truck & \begin{tabular}[c]{@{}l@{}}n03345487, n03417042, n03796401\end{tabular} & 3187 & 1245 \\ \hline Car & \begin{tabular}[c]{@{}l@{}}n02814533, n02958343, n03498781,\\ n03770085, n03770679, n03930630,\\ n04037443, n04166281, n04285965\end{tabular} & 12819 & 4992 \\ \hline Airplane & \begin{tabular}[c]{@{}l@{}}n02690373, n02691156, n03335030,\\ n04012084\end{tabular} & 5208 & 2540 \\ \hline Sheep & \begin{tabular}[c]{@{}l@{}}n10588074, n02411705, n02413050,\\ n02412210\end{tabular} & 4682 & 864 \\ \hline Elephant & \begin{tabular}[c]{@{}l@{}}n02504013, n02504458\end{tabular} & 3927 & 1434 \\ \hline Zebra & \begin{tabular}[c]{@{}l@{}}n02391049, n02391234, n02391373,\\ n02391508\end{tabular} & 5536 & 1753 \\ \hline Horse & \begin{tabular}[c]{@{}l@{}}n02381460, n02374451\end{tabular} & 2589 & 664 \\ \hline Cow & \begin{tabular}[c]{@{}l@{}}n01887787, n02402425\end{tabular} & 2949 & 861 \\ \hline Bear & \begin{tabular}[c]{@{}l@{}}n02132136, n02133161, n02131653,\\ n02134084\end{tabular} & 6745 & 2688 \\ \hline Giraffe & n02439033 & 1256 & 349 \end{tabular} } \end{center} \caption{Synsets and summary statistics for our ImageNet data. For each category, we report the number of raw images in the dataset, and the number of extracted object instances that have passed our quality checks (size, truncation, occlusion).} \label{tab:appendix-dataset-stats} \end{table} \subsection{Negative results} \label{sec:appendix-negative-results} To guide potential future work in this area, we provide a list of ideas that we explored but did not work out. \paragraph{Silhouette optimization} For the silhouette optimization step with multiple templates, before reaching our current formulation, we explored a range of alternatives. In particular, we tried to smoothly interpolate between multiple meshes by optimizing a set of interpolation weights along with the camera parameters. This yielded inconsistent results across categories, which convinced us to work with a ``discrete'' approach as opposed to a smooth one. We then tried a reinforcement learning approach inspired by multi-armed bandits: we initialized each camera hypothesis with a random mesh template, and used a UCB (upper confidence bound) selection algorithm to select the optimal mesh template during optimization. This led to slightly worse results than interpolation. Finally, we reached our current formulation, where we simply replicate each camera hypothesis and optimize the different mesh templates separately. We adopt pruning to make up for the increase in computation time. \paragraph{Re-optimizing poses multiple times} In our current formulation, after the semantic template inference step, we use the semantic templates to resolve ambiguities, but there is no further optimization involved. Naturally, we explored the idea of repeating the silhouette optimization step using semantic information. However, we were unable to get this step to work reliably, even after attempting with multiple renderers (we tried both with DIB-R \cite{chen2019dibr} and SoftRas \cite{liu2019softras}). We generally observed that the color gradients are too uninformative for optimizing camera poses, even after trying to balance the different components of the gradient (silhouette and color). We believe this is a fundamental issue related to the non-convexity of the loss landspace, which future work needs to address. We also tried to smooth out the rendered images prior to computing the MSE loss, without success. \paragraph{Remeshing} Since target 3D vertices are known in this step, we initially tried to use a 3D chamfer loss to match the mesh template. This, however, led to artifacts and merged legs in animals, and was too sensitive to initialization. We found it more reliable to use a differentiable render with silhouette-based optimization. \section{Introduction} \label{sec:introduction} Most of the recent literature in the field of generative models focuses on 2D image generation \cite{miyato2018cgans, zhang2018sagan, karras2019stylegan, brock2018biggan, karras2020styleganv2}, which largely ignores the fact that real-world images depict 2D projections of 3D objects. Constructing 3D generative models presents multiple advantages, including a fully disentangled control over shape, appearance, pose, as well as an explicit representation of spatial phenomena such as occlusions. While the controllability aspect of 2D generative models can be improved to some extent by disentangling factors of variation during the generation process~\cite{yang2017lrgan, singh2018finegan, karras2017progressivegan, karras2019stylegan}, the assumptions made by these approaches have been shown to be unrealistic without an inductive bias \cite{locatello2018challenging}. It is thus unclear whether 2D architectures can reach the same degree of controllability as a native 3D representation.\looseness=-1 As a result, a growing line of research investigates learning textured 3D mesh generators in both GAN \cite{pavllo2020convmesh, chen2019dibr} and variational settings \cite{henderson2020leveraging}. These approaches are trained with 2D supervision from a collection of 2D images, but require camera poses to be known in advance as learning a joint distribution over shapes, textures, and cameras is particularly difficult. Usually, the required camera poses are estimated from keypoint annotations using a factorization algorithm such as \emph{structure-from-motion} (SfM) \cite{marques2009estimating}. These keypoint annotations are, however, very expensive to obtain and are usually only available on a few datasets. % In this work, we propose a new approach for learning generative models of textured triangle meshes with minimal data assumptions. Most notably, we do not require keypoint annotations, which are often not available in real-world datasets. Instead, we solely rely on: \emph{(i)} a single mesh template (optionally, a set of templates) for each image category, which is used to bootstrap the pose estimation process, and \emph{(ii)} a pretrained semi-supervised object detector, which we modify to infer semantic part segmentations on 2D images. These, in turn, are used to augment the initial mesh templates with a 3D semantic layout that allows us to refine pose estimates and resolve potential ambiguities. First, we evaluate our approach on benchmark datasets for this task (Pascal3D+ \cite{liu2018beyond} and CUB \cite{wah2011cub}), for which keypoints are available, and show that our approach is quantitatively on par with the state-of-the-art \cite{pavllo2020convmesh} as demonstrated by FID metrics \cite{heusel2017ttur}, even though we do not use keypoints. Secondly, we train a 3D generative model on a larger set of categories from ImageNet \cite{deng2009imagenet}, where we set new baselines without any class-specific hyperparameter tuning. To our knowledge, no prior works have so far succeeded in training textured mesh generators on real-world datasets, as they focus either on synthetic data or on simple datasets where poses/keypoints are available. % We also show that we can learn a \emph{single} generator for all classes (as opposed to different models for each class, as done in previous work \cite{pavllo2020convmesh, chen2019dibr, henderson2020leveraging}) and notice the emergence of interesting disentanglement properties (e.g.\ color, lighting, style), similar to what is observed on large-scale 2D image generators \cite{brock2018biggan}.% Finally, we quantitatively evaluate the pose estimation performance of our method under varying assumptions (one or more mesh templates; with or without semantic information), and showcase a proof-of-concept where 3D meshes are generated from sketches of semantic maps (\emph{semantic mesh generation}), following the paradigm of image-to-image translation. In summary, our main contributions are as follows: \begin{itemize}[leftmargin=*, itemsep=-2pt] \item We introduce a new approach to 3D mesh generation that does not require keypoint annotations, enabling its use on a wider range of datasets as well as new image categories. \item We showcase 3D generative models in novel settings, including learning a \emph{single} 3D generator for all categories, and \emph{conditional generation} from semantic mesh layouts. In addition, we provide a preliminary analysis of the disentanglement properties learned by these models. \item We propose a comprehensive 3D pose estimation framework that combines the merits of template-based approaches and semantic-based approaches. We further extend this framework by explicitly resolving pose ambiguities and by adding support to multiple templates. \end{itemize} \section{Related work} \label{sec:related-work} \paragraph{Differentiable 3D representations} Recent work in 3D deep learning has focused on a variety of 3D representations. Among \emph{reconstruction} approaches, where the goal is to reconstruct 3D meshes from various input representations, \cite{park2019deepsdf} predict signed distance fields from point clouds, \cite{choy20163d, hane2017hierarchical, yang20173d, girdhar2016learning, zhu2017rethinking, wu2017marrnet, tatarchenko2017octree} predict 3D meshes from images using a voxel representation, and \cite{fan2017point} predict point clouds from images. These approaches require some form of 3D supervision, which is only achievable through synthetic datasets. More recent efforts have therefore focused on reconstructing meshes using 2D supervision from multiple views, e.g. \cite{yan2016perspective, gwak2017weakly, tulsiani2017multi, BMVC2017_99, tulsiani2018multi, yang2018learning} in the voxel setting, and \cite{insafutdinov2018unsupervised} using point clouds. However, the multiple-viewpoint assumption is unrealistic on real-world collections of natural images, which has motivated a new class of methods that aim to reconstruct 3D meshes from single-view images. Among recent works, \cite{kato2018n3mr, liu2019softras, kanazawa2018cmr, chen2019dibr, goel2020ucmr, li2020umr} are all based on this setting and adopt a \emph{triangle mesh} representation. Our work also focuses on triangle meshes due to their convenient properties: \emph{(i)} their widespread use in computer graphics, movies, video games; \emph{(ii)} their support for UV texture mapping, which decouples shape and color; \emph{(iii)} the ability of efficiently manipulating and transforming vertices via linear algebra. The use of triangle meshes in deep learning was recently enabled by \emph{differentiable renderers} \cite{loper2014opendr, kato2018n3mr, liu2019softras, chen2019dibr}, i.e.\ renderers that provide gradients w.r.t.\ scene parameters. Motivated by its support for UV maps, we use \emph{DIB-R} \cite{chen2019dibr} as our renderer of choice throughout this work.% \paragraph{Keypoint-free pose estimation} The use of keypoints for pose estimation is limiting due to the lack of publicly available data and an expensive annotation process. Thus, a growing line of research focuses on inferring poses via semi-supervised objectives. To our knowledge, no approach has so far focused on \emph{generation}, but there have been some successful attempts in the \emph{reconstruction} literature. The initial pose estimation step of our framework is most closely related to \cite{goel2020ucmr, li2020umr}, which both propose approaches for 3D mesh \emph{reconstruction} without keypoints. In terms of assumptions, \cite{goel2020ucmr} require a canonical mesh template for each category. Object poses are estimated by fitting the mesh template to the silhouette of the object and by concurrently optimizing multiple camera hypotheses (which helps to deal with the large amount of bad local minima). \cite{li2020umr} do not require a mesh template, but instead use object part segmentations from a self-supervised model (\emph{SCOPS} \cite{hung2019scops}) to infer a 3D semantic template that is matched to the reference segmented image. Based on early experiments, we were unable to individually generalize these methods to \emph{generation} (our goal), which we found to have a lower tolerance to errors due to the intrinsic difficulty in training GANs. Instead, we here successfully combine both ideas (mesh templates \emph{and} semantics) and extend the overall framework with \emph{(i)} the optional support for multiple mesh templates, \emph{(ii)} a principled ambiguity resolution step that leverages part semantics to resolve conflicts among camera hypotheses with similar reprojection errors. We additionally adopt a more general object-part segmentation framework. Namely, we use a pre-trained semi-supervised object detector \cite{hu2018segmenteverything} modified to produce fine-grained semantic templates (\autoref{fig:dataset-demos}), as opposed to \emph{SCOPS} (used in \cite{li2020umr}), which we found to require class-specific hyperparameter tuning.% \paragraph{Mesh generation} In the \emph{generation} literature there has been work on voxel representations \cite{wu2016learning,girdhar2016learning, smith2017improved, xie2018learning, zhu2018visual, balashova2018structure} and point clouds \cite{achlioptas2018learning, gadelha2018multiresolution}. These approaches require 3D supervision from synthetic data and are thus subject to the same limitations mentioned earlier. To our knowledge, the only approaches that tackle this task on a \emph{triangle mesh} setting using exclusively 2D supervision are \cite{henderson2020leveraging}, which focuses on a VAE setting using face colors (as opposed to full texture mapping) and is thus complementary to our work, and \cite{chen2019dibr, pavllo2020convmesh}, which adopts a GAN setting. In particular, \cite{chen2019dibr} represents the earliest attempt in generating textured 3D meshes using GANs, but their approach cannot supervise textures directly from image pixels. By contrast, the more recent \cite{pavllo2020convmesh} proposes a more comprehensive framework that can model both meshes and UV-mapped textures, which allows for successful application to natural images (albeit with keypoint annotations). We build upon \cite{pavllo2020convmesh}, from which we borrow the GAN architecture but substantially rework the supervision strategy to relax the keypoint requirement.% \section{Method} \label{sec:method} \paragraph{Data requirements} As usual in both the \emph{reconstruction} \cite{kato2018n3mr, kanazawa2018cmr, goel2020ucmr, li2020umr} and \emph{generation} \cite{henderson2019learning, chen2019dibr, pavllo2020convmesh} literature, we require a dataset of segmented images. Segmentation masks (a.k.a.~\emph{silhouettes}) can easily be obtained through an off-the-shelf model (we use PointRend \cite{kirillov2020pointrend} pretrained on COCO \cite{lin2014mscoco}; details in Appendix \ref{sec:appendix-implementation-details}). Whereas prior approaches require keypoint annotations for every image, we only require an untextured mesh template for each image category, which can be downloaded freely from the web. Optionally, our framework supports multiple mesh templates per category, a choice we explicitly evaluate in \autoref{sec:results}. We note that pose estimation from silhouettes alone can in some cases be ambiguous, and therefore we rely on object part semantics to resolve these ambiguities wherever possible. To this end, we use the semi-supervised, large-vocabulary object detector from \cite{hu2018segmenteverything, pavllo2020stylesemantics} to infer part segmentations on all images. We adopt their pretrained model as-is, without further training or fine-tuning, but post-process its output as described in Appendix \ref{sec:appendix-implementation-details}.% \paragraph{Dataset preparation} Since our goal is to apply our method to real-world data that has not been manually cleaned or annotated -- unlike the commonly-used datasets CUB \cite{wah2011cub} and Pascal3D+ \cite{liu2018beyond} -- we attempt to automatically detect and remove images that do not satisfy some quality criteria. In particular, objects should not be \emph{(i)} too small, \emph{(ii)} truncated, or \emph{(iii)} occluded by other objects (implementation details in Appendix \ref{sec:appendix-implementation-details}). This filtering step is tuned for high precision and low recall, as we empirically found that it is beneficial to give more importance to the former. All our experiments and evaluations (\autoref{sec:experiments}) are performed on the dataset that results from this step. Finally, sample images and corresponding silhouettes/part segmentations can be seen in \autoref{fig:dataset-demos}, which also highlights how some semantic parts are shared across image categories. \begin{figure}[t] \begin{center} \includegraphics[width=\linewidth]{fig/dataset-demos.pdf} \end{center} \vspace{-3mm} \caption{The dataset is initially processed into a clean collection of images with associated object masks and semantic part segmentations. This is done via off-the-shelf models and does not involve any additional data collection. Semantic classes have a precise meaning and are shared between different categories (e.g.\ wheels appear in both cars and motorbikes).} \label{fig:dataset-demos} \vspace{-4mm} \end{figure} \begin{figure*}[t] \begin{center} \includegraphics[width=\textwidth]{fig/pipeline-overview.pdf} \end{center} \vspace{-4mm} \caption{\textbf{Left:} schematic overview of the proposed pose estimation pipeline. The left side shows our data requirements (a collection of 2D images and one or more untextured mesh templates). For clarity, we only show the optimization process for the circled airplane, although the \emph{semantic template inference} step involves multiple instances. \textbf{Right:} ambiguity arising from opposite poses. The two camera hypotheses produce almost-identical silhouettes which closely approximate the target, but describe opposite viewpoints. This particular example would initially be rejected by our ambiguity detection test, but it would then be resolved once semantics are available.} \label{fig:pipeline-overview} \vspace{-3mm} \end{figure*} \subsection{Pose estimation framework} \label{sec:pose-estimation} \paragraph{Overview} Most \emph{reconstruction} and \emph{generation} approaches require some form of pose estimation to initialize the learning process. Jointly learning a distribution over camera poses and shapes/textures is extremely challenging and might return a trivial solution that does not entail any 3D reasoning. Therefore, our approach also requires a pose estimation step in order to allow the learning process to converge to meaningful solutions. Our proposed pose estimation pipeline is summarized in \autoref{fig:pipeline-overview}: starting from a set of randomly-initialized camera hypotheses for each object instance, we render the mesh template(s) using a differentiable renderer and optimize the camera parameters so that the rendered silhouette matches the target silhouette of the object. At this point, no semantics, colors, or textures are involved, so the approach can lead to naturally ambiguous poses (see \autoref{fig:pipeline-overview} right, for an example). We then introduce a novel ambiguity detection step to select only images whose inferred pose is unambiguous, and use the most confident ones to infer a 3D \emph{semantic template}, effectively augmenting the initial mesh templates with semantic information (more examples of such templates can be seen in \autoref{fig:semantic-templates}). Afterwards, the process is repeated -- this time leveraging semantic information -- to resolve ambiguities and possibly reinstate images that were previously discarded. The final output is a camera pose for each object as well as a confidence score that can be used to trade off recall (number of available images) for precision (similarity to ground-truth poses). In the following, we describe each step in detail. \paragraph{Silhouette optimization} The first step is a fitting procedure applied separately to each image. Following \cite{goel2020ucmr}, who observe that optimizing multiple camera hypotheses with differing initializations is necessary to avoid local minima, we initialize a set of $N_c$ camera hypotheses for each image as described in Appendix \ref{sec:appendix-implementation-details}. Our camera projection model is the \emph{augmented} weak-perspective model of \cite{pavllo2020convmesh}, which comprises a rotation $\mathbf{q} \in \mathbb{R}^4$ (a unit quaternion), a scale $s \in \mathbb{R}$, a screen-space translation $\mathbf{t} \in \mathbb{R}^2$, and a perspective correction term $z_0 \in \mathbb{R}$ which is used to approximate perspective distortion for close objects. We minimize the mean squared error (MSE) in pixel space between the rendered silhouette $\mathcal{R(\cdot)}$ and the target silhouette $\mathbf{x}$: \setlength{\abovedisplayskip}{3pt} \setlength{\belowdisplayskip}{3pt} \begin{equation} \min_{\mathbf{q}, \mathbf{t}, s, {z0}} \left\lVert \mathcal{R}(\mathbf{V}_\text{tpl}, \mathbf{F}_\text{tpl};\; \mathbf{q}, \mathbf{t}, s, {z_0}) - \mathbf{x} \right\rVert^2, \end{equation} where $\mathcal{R}$ is the differentiable rendering operation, $\mathbf{V}_\text{tpl}$ represents the (fixed) mesh template vertices, and $\mathbf{F}_\text{tpl}$ represents the mesh faces. Each camera hypothesis is optimized using a variant of Adam \cite{kingma2014adam} that implements full-matrix preconditioning as opposed to a diagonal one. Given the small number of learnable parameters (8 for each hypothesis), the $\mathcal{O}(n^3)$ cost of inverting the preconditioning matrix is negligible compared to the convergence speed-up. We provide hyperparameters and more details about this choice in the Appendix \ref{sec:appendix-implementation-details}. In the settings where we use multiple mesh templates $N_t$, we simply replicate each initial camera hypothesis $N_t$ times so that the total number of hypotheses to optimize is $N_c \cdot N_t$. In this case, we compensate for the increase in optimization time by periodically pruning the worst camera hypotheses during optimization. Additionally, in all settings, we start by rendering at a low image resolution and progressively increase the resolution over time, which further speeds up the process. We describe how both strategies are implemented in the Appendix \ref{sec:appendix-implementation-details}. \paragraph{Scoring and ambiguity detection} All symmetric objects (i.e.\ many natural and man-made objects) present \emph{ambiguous poses}: opposite viewpoints that produce the same silhouette after 2D projection (\autoref{fig:pipeline-overview} right). % Similar ambiguities can also arise as a result of noisy segmentation masks, inappropriate mesh templates, or camera hypotheses that converge to bad local minima. Since wrong pose estimates have a significant negative impact on the rest of the pipeline, this motivates the design of an \emph{ambiguity detection} step. % Ideally, we would like to accept pose estimates that are both \emph{confident} -- using the \emph{intersection-over-union} (IoU) between the rendered/target silhouettes as a proxy measure -- and \emph{unambiguous}, i.e.\ no two camera hypotheses with high IoU should describe significantly different poses. We formalize this as follows: we first score each hypothesis $k$ as $(\mathbf{v}_\text{conf})_k = (\text{softmax}(\mathbf{v}_\text{IoU}\,/\,\tau))_k$, where $\tau = 0.01$ is a temperature coefficient that gives similar weights to IoU values that are close to the maximum, and low weights to IoU values that are significantly lower than the maximum. Next, we require that highly-confident poses (as measured by $\mathbf{v}_\text{conf}$) should describe similar rotations. We therefore construct a pairwise distance matrix $\mathbf{D}$ of shape $N_c \times N_c$, where each entry $d_{ij}$ describes the geodesic distance between the rotation of the $i$-th hypothesis and the rotation of the $j$-th hypothesis. Entries are then weighted by $\mathbf{v}_\text{conf}$ across both rows and columns, and are finally summed up, yielding a scalar agreement score $v_\text{agr}$ for each image: \setlength{\abovedisplayskip}{3pt} \setlength{\belowdisplayskip}{3pt} \begin{equation} \mathbf{D} = 1 - (\mathbf{Q}^T \mathbf{Q})^{\circ 2}, \quad v_\text{agr} = \left\lVert \mathbf{D} \odot (\mathbf{v}_\text{conf}\, \mathbf{v}_\text{conf}^T) \right\rVert_1 \end{equation} where $\mathbf{Q}$ is a $4 \times N_c$ matrix of unit quaternions (one per hypothesis), $\mathbf{M}^{\circ 2}$ denotes the element-wise square, and $\odot$ denotes the element-wise product. The agreement score $v_\text{agr}$ can be roughly interpreted as follows: a score of 0 (best) implies that all \emph{confident} camera hypotheses describe the same rotation (they agree with each other). A score of 0.5 describes two poses that are rotated by 180 degrees from one another\footnote{For example, consider a $\mathbf{D}$ matrix of size $2\times2$, where entries along the main diagonal are 0, and 1 elsewhere.}. Empirically, we established that images with $v_\text{agr} > 0.3$ should be rejected. \paragraph{Semantic template inference} Simply discarding ambiguous images might significantly reduce the size and diversity of the training set. Instead, we propose to resolve the ambiguous cases. While this is hardly possible when we only have access to silhouettes, it becomes almost trivial once \emph{semantics} are available (\autoref{fig:pipeline-overview} right). A similar idea was proposed in \cite{li2020umr}, who infer a 3D semantic template by averaging instances that are close to a predetermined exemplar (usually an object observed from the left or right side). Yet, our formulation does not require an exemplar but directly leverages samples that have passed the ambiguity detection test. Since our data requirements assume that mesh templates are untextured, our first step in this regard aims at augmenting each mesh template with part semantics. Among images that have passed the ambiguity test ($v_\text{agr} < 0.3$), we select the camera hypothesis with the highest IoU. For each mesh template, the semantic template is computed using the top $N_\text{top}=100$ images assigned to that template, as measured by the IoU. Then, we frame this step as an optimization problem where the goal is to learn vertex colors while keeping the camera poses fixed, minimizing the MSE between the rendered (colored) mesh template and the 2D image semantics, averaged among the top samples: \setlength{\abovedisplayskip}{3pt} \setlength{\belowdisplayskip}{3pt} \begin{equation} \resizebox{0.9\linewidth}{!}{$\displaystyle\min_{\mathbf{C}_\text{tpl}} \frac{1}{N_\text{top}} \sum_i \left\lVert \mathcal{R}(\mathbf{V}_\text{tpl}, \mathbf{F}_\text{tpl}, \mathbf{C}_\text{tpl};\; \mathbf{q_i}, \mathbf{t_i}, s_i, {z_0}_i) - \mathbf{C_i} \right\rVert^2 ,$} \end{equation} where $\mathbf{C}_\text{tpl}$ represents the vertex colors of the template and $\mathbf{C_i}$ denotes the 2D semantic image. For convenience, we represent $\mathbf{C}_\text{tpl}$ as a $K \times N_{v}$ matrix, where $N_{v}$ is the number of vertices and $K$ is the number of semantic classes (color channels, not necessarily limited to 3), and $\mathbf{C_i}$ is a $K \times N_{pix}$ matrix, where $N_{pix}$ is the number of image pixels. % In the Appendix \ref{sec:appendix-implementation-details}, we derive an efficient closed-form solution that requires only a single pass through the dataset. Examples of the resulting semantic templates are shown in \autoref{fig:semantic-templates}. \paragraph{Ambiguity resolution} In the last step of our pose estimation pipeline, we repeat the scoring process described in ``\emph{Scoring and ambiguity detection}" with the purpose of resolving ambiguities. Instead of evaluating the scores on the IoU, however, we use the mean intersection-over-union (mIoU) averaged across semantic classes. Since our inferred semantic templates are continuous, we adopt a smooth generalization of the mIoU (weighted Jaccard similarity) in place of the discrete version: \setlength{\abovedisplayskip}{3pt} \setlength{\belowdisplayskip}{3pt} \begin{equation} \resizebox{0.5\linewidth}{!}{$\displaystyle\text{mIoU} = \frac{1}{K}\sum_k \frac{\lVert \min(\mathbf{\hat{C}_k}, \mathbf{C_k}) \rVert_1}{\lVert \max(\mathbf{\hat{C}_k}, \mathbf{C_k}) \rVert_1}$} \end{equation} where $\mathbf{\hat{C}_k}$ is the rendered semantic class $k$ and $\min, \max$ (performed element-wise) represent the weighted intersection and union, respectively. We then recompute the confidence scores and agreement scores as before (using the mIoU as a target metric), discard the worst 10\% images in terms of mIoU as well as those whose $v_\text{agr} > 0.3$, and select the best hypothesis for each image as measured by the mIoU. We found no practical advantage in repeating the semantic template inference another time, nor in re-optimizing/fine-tuning the camera poses using semantics. We show this quantitatively in \autoref{sec:results} and discuss further details on various exploratory attempts in Appendix \ref{sec:appendix-negative-results}.\looseness=-1 \begin{figure}[t] \begin{center} \includegraphics[width=\linewidth]{fig/generation-framework.pdf} \end{center} \vspace{-3mm} \caption{Generation framework using the \emph{convolutional mesh} representation. Images are fed into a network trained to reconstruct meshes (parameterized as 2D displacement maps), given camera poses. The meshes are then used to project natural images onto the UV map. Finally, the resulting partial textures, displacement maps, and (optionally) predicted semantics are used to train a 2D convolutional GAN in UV space.} \label{fig:generation-framework} \vspace{-4mm} \end{figure} \subsection{Generation framework} \label{sec:generation-estimation} \begin{figure*}[t] \begin{center} \includegraphics[width=\textwidth]{fig/semantic-templates.pdf} \end{center} \vspace{-2mm} \caption{Learned 3D semantic templates. We show one template per category from two views (front/back). Colors are exaggerated for presentation purposes, but in practice the probability maps are smoother. We also highlight how semantic parts are shared among categories.} \label{fig:semantic-templates} \vspace{-4mm} \end{figure*} The camera poses obtained using the approach described in \autoref{sec:pose-estimation} can be used to train a generative model as shown in \autoref{fig:generation-framework}. For this component, we build upon \cite{pavllo2020convmesh}, from which we borrow the \emph{convolutional mesh} representation and the GAN architecture. Our generation approach mainly consists of three steps. \emph{(i)} Given a collection of images, segmentation masks, and their poses\footnote{In \cite{pavllo2020convmesh}, poses are estimated via structure-from-motion on ground-truth keypoints. In this work, we use our proposed approach (\autoref{sec:pose-estimation}).}, we train a reconstruction model to predict mesh, texture, and semantics given only the 2D image as input. Although predicted textures are not used in subsequent steps (the GAN learns directly from image pixels), \cite{pavllo2020convmesh} observe that predicting textures during training has a beneficial regularizing effect on the mesh, and therefore we also keep this reconstruction term. Unlike \cite{pavllo2020convmesh} (where semantics were not available), however, we also predict a 3D semantic part segmentation in UV space, which provides further regularization and enables interesting conditional generation settings (we showcase this in \autoref{sec:results}). As in \cite{pavllo2020convmesh}, we parameterize the mesh as a 2D displacement map that deforms a sphere template in its tangent space. \emph{(ii)} Through an inverse rendering approach, image pixels are projected onto the UV map of the mesh, yielding partially-occluded textures. Occlusions are represented as a binary mask in UV space. \emph{(iii)} Finally, displacement maps and textures are modeled in UV space using a standard 2D convolutional GAN, whose training strategy compensates for occlusions by masking inputs to the discriminator. \paragraph{Architecture} Our experiments (\autoref{sec:experiments}) analyze two different settings: \textbf{A} where we train a separate model for each category, and \textbf{B} where we train a single model for all categories. In setting \textbf{A}, we reuse similar reconstruction and GAN architectures to~\cite{pavllo2020convmesh} in order to establish a fair comparison with their approach. We only modify the output head of the reconstruction model, where we add $K$ extra output channels for the semantic class prediction ($K$ depends on the category). In setting \textbf{B}, we condition the model on the object category by modifying all Batch\-Norm layers and learning different gain and bias parameters for each category. Additionally, in the output head we share semantic classes among categories (for instance there is a unique output channel for \emph{wheel} that is shared for buses, trucks, \emph{etc.}; see \autoref{fig:semantic-templates}). We do not make any other change that would affect the model's capacity. As for the GAN, in both \textbf{A} and \textbf{B}, we use the same architecture as \cite{pavllo2020convmesh}. Further details regarding hyperparameters, implementation and optimizations to improve rendering speed can be found in Appendix \ref{sec:appendix-implementation-details}.% \paragraph{Loss} The reconstruction model is trained to jointly minimize the MSE between \emph{(i)} rendered and target silhouettes, \emph{(ii)} predicted RGB texture and target 2D image, \emph{(iii)} predicted semantic texture (with $K$ channels) and target 2D semantic image. As in \cite{pavllo2020convmesh}, we add a smoothness loss to encourage neighboring faces to have similar normals. Finally, the availability of mesh templates allows us to incorporate a strong shape prior into the model via a loss term that can be regarded as an extreme form of semi-supervision: on images with very confident poses (high IoU), we provide supervision directly on the predicted 3D vertices by adding a MSE loss between the latter and the vertices of the mesh template (i.e.\ our surrogate ground-truth), only on the top 10\% of images as measured by the IoU. This speeds up convergence and helps with modeling fine details such as wings of airplanes, where silhouettes alone provide a weak learning signal from certain views. This step requires \emph{remeshing} the templates to align them to a common topology, which we describe in Appendix \ref{sec:appendix-implementation-details}. \begin{figure*}[t] \begin{center} \includegraphics[width=\textwidth]{fig/qualitative.pdf} \end{center} \vspace{-4mm} \caption{Qualitative results for all 13 classes used in our work. For each class, we show one wireframe mesh on the left, the corresponding textured mesh on the right, and two additional textured meshes on the second row. Meshes are rendered from random viewpoints.} \label{fig:qualitative-results} \vspace{-4mm} \end{figure*} \vspace{-2mm} \section{Experiments} \label{sec:experiments} \vspace{-1mm} We quantitatively evaluate the aspects that are most central to our approach: pose estimation and generation quality. \paragraph{Pose estimation} On datasets where annotated keypoints are available, we compare the poses estimated by our approach to poses estimated from \emph{structure-from-motion} (SfM) on ground-truth keypoints. Since the robustness of SfM depends on the number of visible keypoints, we never refer to SfM poses as ``ground-truth poses", as these are not available in the real-world datasets we use. Nonetheless, we believe that SfM poses serve as a good approximation of ground-truth poses on most images. Our evaluation metrics comprise \emph{(i)} the \emph{geodesic distance} (GD) between the rotation $\mathbf{q}$ predicted by our approach and the SfM rotation $\mathbf{p}$, defined as $\text{GD} = 1 - (\mathbf{p} \cdot \mathbf{q})^2$ for quaternions, where $\text{GD} \in [0, 1]$ \footnote{More commonly known as \emph{cosine distance} when quaternions are used to describe orientations, as in our case.}; and \emph{(ii)} the \emph{recall}, which measures the fraction of usable images that have passed the ambiguity detection test. We evaluate pose estimation at different stages: after silhouette optimization (where no semantics are involved), and after the semantic template inference. Additionally, we compare settings where only one mesh template per category is available, and where multiple mesh templates are employed (we use 2--4 templates per category). \paragraph{Generative modeling} Following prior work on textured 3D mesh generation with GANs \cite{pavllo2020convmesh}, we evaluate the Fréchet Inception Distance (FID) \cite{heusel2017ttur} on meshes rendered from random viewpoints. For consistency, our implementation of this metric follows that of \cite{pavllo2020convmesh}. Since our pose estimation framework discards ambiguous images and the FID is sensitive to the number of evaluated images, we \emph{always} use the full dataset for computing reference statistics. As such, there is an incentive for optimizing both \emph{GD} and \emph{recall} metrics as opposed to trading one off for the other. Finally, consistently with \cite{pavllo2020convmesh}, we generate displacement maps at $32 \times 32$ resolution, textures at $512 \times 512$, and sample from the generator using a truncated Gaussian at $\sigma = 1.0$. \subsection{Datasets} \label{sec:datasets} We evaluate our approach on three datasets: CUB-200-2011 (CUB) \cite{wah2011cub}, Pascal3D+ (P3D) \cite{liu2018beyond}, and a variety of classes from ImageNet \cite{deng2009imagenet}. The first two provide keypoint annotations and serve as a comparison to previous work, whereas on the latter we set new baselines. Combining all datasets, we evaluate our approach on 13 categories. \paragraph{CUB (Birds)} For consistency with prior work, we adopt the split of \cite{pavllo2020convmesh, kanazawa2018cmr} ($\approx$6k training images). As we work in the unconditional setting, we do not use class labels. \paragraph{Pascal3D+ (P3D)} Again, we adopt the split of \cite{pavllo2020convmesh, kanazawa2018cmr}, and test our approach on both \emph{car} and \emph{airplane} categories. Since \cite{pavllo2020convmesh} has only tested on cars, we train the model of \cite{pavllo2020convmesh} on airplanes and provide a comparison here. P3D comprises a subset of images from ImageNet and \cite{pavllo2020convmesh} evaluates only on this subset; for consistency, we adopt the same strategy. \paragraph{ImageNet} Our final selection of classes comprises the vehicles and animals that can be seen in \autoref{fig:semantic-templates}/\ref{fig:qualitative-results}. The list of \emph{synsets} used in each class as well as summary statistics are provided in the Appendix \ref{sec:appendix-dataset-information}. The set of ImageNet classes includes \emph{car} and \emph{airplane}, which partially overlap with P3D. Therefore, when we mention these two classes, we always specify the subset we refer to (ImageNet or P3D). We also note that the dataset is heavily imbalanced, ranging from $\approx$300 usable images for \emph{giraffe} to thousands of images for \emph{car}. For this reason, in setting \textbf{B} we take measures to balance the dataset during training (Appendix \ref{sec:appendix-implementation-details}). \begin{table}[t] \begin{center} \resizebox{\linewidth}{!}{ \setlength{\tabcolsep}{2pt} \renewcommand{\arraystretch}{1.1} \begin{tabular}{cc||c|rl||c|rl||c|rl} \multicolumn{1}{l}{} & & \multicolumn{3}{c||}{Bird} & \multicolumn{3}{c||}{Car} & \multicolumn{3}{c}{Airplane} \\ \multicolumn{1}{c|}{Setting} & Step & GD(1) & \multicolumn{2}{c||}{GD (Recall)} & GD(1) & \multicolumn{2}{c||}{GD (Recall)} & GD(1) & \multicolumn{2}{c}{GD (Recall)} \\ \hline \multicolumn{1}{c|}{\multirow{3}{*}{\begin{tabular}[c]{@{}c@{}}Single\\ template\end{tabular}}} & Silhouette & 0.47 & 0.35 & (52\%) & 0.12 & {\ul 0.05} & (75\%) & 0.31 & 0.28 & (85\%) \\ \multicolumn{1}{c|}{} & Semantics & \textbf{0.29} & \textbf{0.24} & (74\%) & 0.11 & 0.06 & (84\%) & 0.25 & 0.18 & (78\%) \\ \multicolumn{1}{c|}{} & Repeat x2 & \textbf{0.29} & {\ul \textbf{0.24}} & (76\%) & 0.15 & 0.11 & (85\%) & 0.24 & 0.17 & (75\%) \\ \hline \multicolumn{1}{c|}{\multirow{3}{*}{\begin{tabular}[c]{@{}c@{}}Multiple\\ templates\end{tabular}}} & Silhouette & 0.47 & 0.33 & (44\%) & 0.10 & {\ul 0.05} & (78\%) & 0.28 & 0.22 & (81\%) \\ \multicolumn{1}{c|}{} & Semantics & {\ul 0.32} & {\ul 0.27} & (76\%) & \textbf{0.06} & \textbf{0.04} & (88\%) & {\ul 0.22} & \textbf{0.15} & (79\%) \\ \multicolumn{1}{c|}{} & Repeat x2 & {\ul 0.32} & {\ul 0.27} & (78\%) & {\ul 0.07} & {\ul 0.05} & (89\%) & \textbf{0.21} & {\ul 0.16} & (80\%) \end{tabular} } \end{center} \vspace{-2mm} \caption{Pose estimation results under different settings. Best in \textbf{bold}; second best {\ul underlined}. We report \emph{geodesic distance} (GD; lower = better) after each step and associated recall (higher = better) arising from ambiguity detection. For comparison, we also report GD w/o ambiguity detection, GD(1), assuming 100\% recall.\looseness=-1} \label{tab:pose-estimation-results} \vspace{-4mm} \end{table} \subsection{Results} \label{sec:results} \begin{figure}[b] \vspace{-6mm} \begin{center} \includegraphics[width=\linewidth]{fig/disentanglement.pdf} \end{center} \vspace{-4mm} \caption{Disentanglement and interpolation in the model trained to generate all classes (setting \textbf{B}). \textbf{Top:} directions in latent space that correlate with certain style factors, such as skin color and lighting. The effect is consistent across different classes. \textbf{Bottom:} interpolation between different classes with a fixed latent code.} \label{fig:disentanglement-interpolation} \end{figure} \begin{table*}[t] \begin{center} \setlength{\tabcolsep}{2pt} \renewcommand{\arraystretch}{1.1} \resizebox{0.66\textwidth}{!}{ \begin{tabular}{l|lllllllllllll|l} Setting & MBike & Bus & Truck & Car & Airplane & Bird & Sheep & Elephant & Zebra & Horse & Cow & Bear & Giraffe & All \\ \hline Single TPL (\textbf{A}) & 107.4 & 219.3 & \textbf{164.1} & \textbf{30.73} & 77.84 & \textbf{55.75} & 173.7 & \textbf{114.5} & 28.19 & 113.3 & 137.0 & {\ul 187.1} & {\ul 157.7} & -- \\ Multi TPL (\textbf{A}) & 107.0 & \textbf{160.7} & 206.1 & {\ul 32.19} & 102.2 & {\ul 56.54} & \textbf{155.1} & 135.9 & \textbf{22.10} & {\ul 107.1} & {\ul 133.0} & 195.5 & \textbf{126.0} & -- \\ \hline Single TPL (\textbf{B}) & {\ul 94.74} & 204.98 & {\ul 179.3} & 39.68 & \textbf{46.46} & 88.47 & 169.9 & {\ul 127.6} & {\ul 24.47} & \textbf{106.9} & 139.4 & \textbf{156.4} & 176.8 & \textbf{60.82} \\ Multi TPL (\textbf{B}) & \textbf{94.03} & {\ul 187.75} & 204.7 & 46.11 & {\ul 77.27} & 77.23 & {\ul 163.8} & 146.2 & 31.70 & 113.4 & \textbf{117.5} & 189.9 & 158.0 & {\ul 63.00} \end{tabular} } \resizebox{0.33\textwidth}{!}{ \renewcommand{\arraystretch}{1.1} \begin{tabular}{l|lll} Method & Bird (CUB) & Car (P3D) & Airplane (P3D) \\ \hline Keypoints+SfM \cite{pavllo2020convmesh} & \textbf{41.56} & 43.09 & 147.8* \\ \hline Silhouette (single TPL) & 73.67 & 38.16 & 100.5 \\ Silhouette (multi TPL) & 88.39 & \textbf{36.17} & 96.28 \\ \hline Semantics (single TPL) & {\ul 55.75} & {\ul 36.52} & \textbf{81.28} \\ Semantics (multi TPL) & 56.54 & 37.56 & {\ul 88.85} \end{tabular} } \end{center} \vspace{-2mm} \caption{\textbf{Left:} FID of our approach on ImageNet (except \emph{bird}, which refers to CUB). We report results for models trained separately on different classes (setting \textbf{A}) and a single model that generates all classes (setting \textbf{B}). \textbf{Right:} comparison of our FID w.r.t.\ prior work, using either silhouettes alone or our full pipeline. * = trained by us; TPL = mesh template(s); lower = better, best in \textbf{bold}, second best {\ul underlined}.} \label{tab:fid-scores-all} \vspace{-5mm} \end{table*} \paragraph{Pose estimation} We evaluate our pose estimation framework on \emph{bird}, \emph{car}, and \emph{airplane}, for which we have keypoint annotations. Reference poses are obtained using the SfM implementation of \cite{kanazawa2018cmr}. For birds (CUB), the scores are computed on all images, whereas for cars/airplanes they are computed on the overlapping images between P3D and our ImageNet subset. Results are summarized in \autoref{tab:pose-estimation-results}. Interestingly, using multiple mesh templates does not seem to yield substantially different results, suggesting that our approach can work effectively with as little as one template per class. Moreover, incorporating semantic information improves both GD and recall. Finally, we repeat the ambiguity detection and semantic template inference steps a second time, but observe no improvement. Therefore, in our following experiments we only perform these steps once. We further discuss these results in Appendix \ref{sec:appendix-additional-results}, where we aim to understand the most common failure modes by analyzing the full distribution of rotation errors. Qualitatively, the inferred 3D semantic templates can be found in \autoref{fig:semantic-templates}. \paragraph{Generative model} We report the FID on ImageNet in \autoref{tab:fid-scores-all}, left (\emph{bird} refers to CUB), where we set new baselines. As before, we compare settings where we adopt a single mesh template \emph{vs} multiple templates. We also showcase a conditional model that learns to synthesize all categories using a single generator (setting \textbf{B}). Although this model has the same capacity as the individual models (but was trained to generate all classes at once), we note that its scores are in line with those of setting \textbf{A}, and in some classes (e.g.\ \emph{airplane}) they are significantly better, most likely due to a beneficial regularizing effect. However, we also note that there is no clear winner on all categories. To our knowledge, no prior work has trained a single 3D generator on multiple categories without some form of supervision from synthetic data. % Therefore, in one of the following paragraphs we analyze this model from a disentanglement perspective. Next, in \autoref{tab:fid-scores-all} (right), we compare our results to the state-of-the-art \cite{pavllo2020convmesh} on the \emph{bird}, \emph{car}, and \emph{airplane} categories from CUB/P3D. We find that our approach outperforms \cite{pavllo2020convmesh} on \emph{car} and \emph{airplane} (P3D) -- even though we do not exploit ground-truth keypoints -- and performs slightly worse on \emph{bird} (CUB). We speculate this is mainly due to the fact that, on CUB, all keypoints are annotated (including occluded ones), whereas P3D only comprises annotations for visible keypoints, potentially reducing the effectiveness of SfM as a pose estimation method. Finally, we point out that although there is a large variability among the scores across classes, comparing FIDs only makes sense within the same class, since the metric is affected by the number of images. % \paragraph{Qualitative results} In addition to those presented in \autoref{fig:teaser}, we show further qualitative results in \autoref{fig:qualitative-results}. For animals, we observe that generated textures are generally accurate (e.g.\ the high-frequency details of zebra stripes are modeled correctly), with occasional failures to model facial details. With regards to shape, legs are sporadically merged but also appear correct on many examples. We believe these issues are mostly due to a pose misalignment, as animals are deformable but our mesh templates are rigid. As part of future work, we would like to add support for articulated mesh templates \cite{kulkarni2020acsm} to our method. As for vehicles, the generated shapes are overall faithful to what one would expect, especially on airplanes where modeling wings is very challenging. We also note, however, that the textures of rare classes (\emph{truck} above all) present some incoherent details. Since we generally observe that the categories with more data are also those with the best results, these issues could in principle be mitigated by adding more images. Finally, we show additional qualitative results in the Appendix \ref{sec:appendix-additional-results}. \paragraph{Disentanglement and interpolation} We attempt to interpret the latent space of the model trained to synthesize all classes (setting \textbf{B}), following \cite{harkonen2020ganspace}. We identify some directions in the latent space that correlate with characteristics of the 3D scene, including light intensity (\autoref{fig:teaser}, top-right), specular reflections and color (\autoref{fig:disentanglement-interpolation}). Importantly, these factors seem to be shared across different classes and are learned without explicit supervision. Although our analysis is preliminary, our findings suggest that 3D GANs disentangle high-level features in an interpretable fashion, similar to what is observed in 2D GANs to some extent (e.g.\ on pose and style). However, since 3D representations already disentangle appearance and pose, the focus of the disentangled features is on other aspects such as texture and lighting. \autoref{fig:disentanglement-interpolation} (bottom) illustrates interpolation between different classes while keeping the latent code fixed. Style is preserved and there are no observable artifacts, suggesting that the latent space is structured. \paragraph{Semantic mesh generation} Since our framework predicts a 3D semantic layout for each image, we can condition the generator on such a representation. In \autoref{fig:semantic-generation}, we propose a proof-of-concept where we train a conditional model on the \emph{car} class that takes as input a semantic layout in UV space and produces a textured mesh. % Such a setting can be used to manipulate fine details (e.g.\ the shape of the headlights) or the placement of semantic parts. \begin{figure}[t] \vspace{-2mm} \begin{center} \includegraphics[width=\linewidth]{fig/semantic-generation.pdf} \end{center} \vspace{-4mm} \caption{Conditional mesh generation from \emph{semantic layouts}. In this demo, we progressively build a car by sketching its parts, proposing an interesting way of controlling the generation process.} \label{fig:semantic-generation} \vspace{-4mm} \end{figure} \vspace{-1mm} \section{Conclusion} \label{sec:conclusion} \vspace{-1mm} We proposed a framework for learning generative models of textured 3D meshes. In contrast to prior work, our approach does not require keypoint annotations, enabling its use on real-world datasets. We demonstrated that our method matches the results of prior works that use ground-truth keypoints, without having to rely on such information. Furthermore, we set new baselines on a subset of categories from ImageNet \cite{deng2009imagenet}, where keypoints are \emph{not} available. We believe there are still many directions of interest to pursue as future work. In addition to further analyzing disentanglement and exploring more intuitive semantic generation techniques, it would be interesting to experiment with articulated meshes % and work with more data.% \paragraph{Acknowledgments} This work was partly supported by the Swiss National Science Foundation (SNF), grant \#176004. {\small \bibliographystyle{ieee_fullname}
\subsubsection{Submitted to: AI, Data Analytics and Automated Decision Making Track} \section{Introduction}\label{introduction} The rapid growth of Internet technologies, mobile communications, cloud infrastructures and distributed applications have brought an unprecedented impact to all spheres of the society and a great potential towards the establishment of novel eGovernance models \cite{WimmerVialePereiraRonzhynSpitzer2020}. These models should deploy core values such as improved public services and administrative efficiency, open government capabilities, improved ethical behavior and professionalism, improved trust and confidence in governmental transactions \cite{TWIZEYIMANA2019167}. Towards the modernization of their services and the reduction of the associated bureaucracy, public administrations need to transform their back-offices, upgrade their existing internal processes and services, and provide privacy-preserving and secure solutions. It is necessary to leverage key digital enablers, such as open services and technical building blocks (eID, eSignature, eProcurement, eDelivery and eInvoice), shared and reusable solutions based on agreed standards and specifications (Single Digital Gateway), as well as common interoperability practices (e.g. European Interoperability Framework). This leads to the upgrade of services that enable cross-border data sharing among public administrations, businesses and citizens. Governance models, in general, do not adopt a citizen-centric paradigm \cite{Ghareeb2019}; they do not take into account citizens’ needs and expectations of new services, often excluding them from operational and decision making processes. Moreover, documentation exchanges, processes and contact points do not function as a whole; they are rather dispersed and not sufficiently inter-connected among countries and organizations. Transparency and accountability are additional aspects of major importance towards building a good and fair governance model \cite{Bertot2010}. Admittedly, governments that employ models to make information sharing and decision-making processes transparent improve the principle of accountability and augment the participation of citizens and other stakeholders in related actions \cite{HARRISON2014513}. The corresponding digital transformation of public services can reduce administrative burdens, enhance productivity of governments, minimizing at the same time all the extra cost of traditional means to increase capacity, and ultimately improve the overall quality of interactions with and within public administrations \cite{Androutsopoulou2019}. Taking into account the above issues, this paper introduces a transparent, cross-border and citizen-centric eGovernance model for public administration services, which automates the processes and safeguards the integrity of interactions among citizens, businesses and public authorities. By taking advantage of emerging ICT technologies, such as Peer-to-Peer (P2P) networks, Distributed Ledger Technologies (DLTs) and smart data structures, we deploy a public distributed infrastructure, based on the InterPlanetary File System (IPFS) and a distributed ledger. This solution is based on a single sign-on Wallet mechanism that interconnects distinct decentralized applications (dApps) responsible for ID authentication, document sharing, information exchange and transactions validation, enabling a single point of access to information. The proposed solution is fully in line with the Government 3.0 paradigm, in that it meaningfully integrates a diverse set of disruptive and established ICTs \cite{unknownTerzi}. The remainder of this paper is organized as follows: \hyperref[section2]{Section 2} is devoted to the presentation of the underlying technologies employed in our approach. The proposed digital transformation model, enabled through an architecture incorporating a series of prominent technologies, is presented in \hyperref[section3]{Section 3}. Particular emphasis is given to the inclusion of data governance and knowledge management services to best facilitate and eventually reduce lengthy, cumbersome and repetitive bureaucratic eGovernment transactions. \hyperref[section4]{Section 4} validates the potential of our approach through a representative application scenario. Finally, \hyperref[section5]{Section 5} outlines concluding remarks and future research directions. \section{Underlying Technologies}\label{section2} \subsubsection{Interplanetary File System.}\label{subsection2.1} It is a P2P distributed file sharing system that seeks to connect all computing devices with the same file system by providing a high throughput content-addressing block storage model. IPFS distributes files across the network. Each file is addressed by its cryptographic hash based on its content, rather than its location as in traditional centralized systems where a single server hosts many files and information has to be fetched by accessing this server. This characteristic renders IPFS an ideal data storage solution for eGovernment services, where security and transparency are of utmost importance, since there is no single point of failure. One of the main content routing systems of the IPFS architecture is the Distributed Hash Table (DHT), which allows key-based lookup in a fully decentralized manner. IPFS leverages a DHT system, in that all IPFS nodes "advertise" content items stored in the DHT and this results in a distributed dictionary used for looking up content. Various applications integrating IPFS with ledger and blockchain technologies have already been reported in the literature for transactions recording \cite{10.1145/3409934.3409948} and secure file sharing with decentralized user authentication, access control and group key management mechanisms \cite{8540048,8835937}. In the approach described in the next section, we leverage IPFS to provide increased capacity for managing large datasets in a decentralized manner and complement the throughput limitations of distributed ledger technologies. \vspace{-3mm} \subsubsection{Distributed Ledger.} \label{subsection2.3} It is a distributed database architecture that records transactions on a P2P network and enables multiple members to maintain their own identical copy of a shared ledger without the need for validation from a central entity. Transaction data are scattered among multiple nodes using the P2P protocol principles, and are synchronized at the same time in all nodes. A public distributed ledger is characterized by an open unprotected environment with millions of participants, most of which have limited computational power and bandwidth, while most of the power is in the hands of a small fraction of the participating nodes. Thus, there is a significant risk of a "majority attack", in which a few nodes can dictate the choice of transactions. For eGovernance purposes, the design of a distributed ledger requires a comprehensive approach taking into account diverse aspects such as intermediate scale, high processing rate and low completion time with moderate energy consumption, unique attack model, and utilization of the underlying data structures. \vspace{-3mm} \subsubsection{Smart contracts.}\label{subsection2.5} They are decentralized, trusted computer programs stored on a blockchain that are automatically executed when predetermined terms and conditions are met. They facilitate, verify, or enforce documents and actions according to the terms of a contract or an agreement between two parties (i.e. agreements between eGovernance operators of two countries and end-users) that consist of a set of rules dictating a reaction when specific actions occur \cite{8500488}. This set of rules is deployed on blockchain to ensure decentralized, transparent and secure characteristics. Upon meeting predefined conditions, a smart contract is executed automatically, making it independent of any central entity. Shields et al. \cite{OShields2017SmartCL} discuss the use of smart contracts for legal agreements and conclude that smart contracts will benefit from the legal precedent established in the electronic marketplace. In our approach, smart contracts are employed to manage the automatic execution of policies for the proposed services. \vspace{-3mm} \subsubsection{Decentralized Applications.}\label{subsection2.4} They are composed of distributed entities that directly interact with each other and make local autonomous decisions in the absence of a centralized coordinating authority. According to Raval \cite{10.5555/3074145}, a dApp is characterized by four features: (i) open source, (ii) internal currency, (iii) decentralized consensus, and (iv) no central point of failure. Bittorrent \cite{cohen2003} was the initial dApp, enabling users to connect and exchange files. Soon afterwards, blockchain technology was introduced to manage the decentralization and enable the immutability of data. In the context of eGovernment 3.0, dApps can be leveraged to deliver diverse services such as ID authentication, document sharing, information exchange and transactions validation. \vspace{-3mm} \subsubsection{Smart data structures.}\label{subsection2.6} The incorporation of Machine Learning techniques to explore causal relations among Big Data \cite{somani2017} in eGovernment systems is often deterred by interoperability inefficiencies \cite{10.1145/3428502.3428536}. \textit{Smart data structures} \cite{Eastep2011} are a new class of parallel data structures that leverage online Machine Learning and self-aware computing principles to tune themselves automatically. They can replace existing index structures with other types of models, including deep learning models, referred to as learned indexes \cite{10.1145/3318464.3389711,10.1145/3183713.3196909,10.1145/3332466.3374547}. Recent works present preliminary outcomes of the conceptual and methodological aspects of semantic annotation of data and models, which enable a high standard of interoperability of information \cite{Villa2017} and showcase how multi-input deep neural networks can detect semantic types \cite{10.1145/3292500.3330993}. We utilize smart data structures to identify and effectively transform data schemas and interconnect existing centralized systems with our decentralized solution. \vspace{-3mm} \subsubsection{Single sign-on.}\label{subsection2.7} It is an authentication mechanism that enables the use of a unitary security credential to access related, but independent, software systems or applications \cite{koundinya2020review}. It enables simple username and password management, improved identity protection, increased speed and reduction of security risks. It also includes functionalities such as password grant (sign-in directly on the web), authorization code grant (user authorizes third-party), implicit grant (third-party web app sign-in), web services API that can effectively authenticate requests, and seamless user authorization experience on client-side technology. Various types of schemas exist based on (i) the type of infrastructure, (ii) the system architecture, (iii) the credential forms (token, certificate), and (iv) the protocols used. It is a critical part of complex environments, where multiple services from various providers are hosted. While single sign-on has been mainly used in mobile and Internet of Things applications, its integration with distributed file systems still remains a challenge. \section{The proposed solution}\label{section3} \subsection{Research methodology}\label{subsection3.1} For the development of the proposed open and cross-border eGovernance model, we have adopted the \textit{design science paradigm} \cite{10.5555/1859261}, which aims to extend the boundaries of human and organizational capabilities by creating new and innovative artifacts, especially for the information technologies domain. For our purposes, we have used the specific design science research methodology proposed by Peffers et al. \cite{peffers2008design} for the domain of Information Systems (IS) research, which includes the following stages: identify problem and motivation, define objectives of a solution, design and development, demonstration, evaluation and communication. Furthermore, we have combined the above paradigm with that of \textit{action research}, which aims to contribute both to the practical concerns of people in an immediate problematic situation and to the goals of social science by joint collaboration within a mutually acceptable ethical framework. It has been recognized that action research can be quite important in the IS domain, as it can contribute to improving its practical relevance \cite{Iivari2009ActionRA}. In particular, it enables the design, implementation and evaluation of ICT-based actions/changes in organizations, which address specific problems and needs that are of high interest for practitioners, and at the same time create scientific knowledge that is of high interest for the researchers. The complementarity between these two research paradigms, as well as the great potential of integrating them, have been extensively discussed in the literature; both paradigms aim to directly intervene in real-world domains and introduce meaningful changes in them. In particular, to address the issues elaborated in this work, we cooperated with two Greek government agencies (the Ministry of Digital Governance and a big local municipality) and two organisations with long experience in the development of novel software solutions for eGovernment. Involving their most experienced staff, we organized three workshops of 2 hours duration each. In these workshops, we followed a qualitative approach (in-depth discussions) to collect relevant information and accordingly shape the foreseen services. Based on the information collected, we designed the solution presented below. \subsection{Our approach}\label{subsection3.2} We propose a novel eGovernance model that creates new digital governance pathways through the integration of emerging technologies and breakthrough cross-sector services. We deploy decentralized applications (dApps) to deliver efficient, reliable and secure data sharing, auditing mechanisms and communication channels for the eGovernment sector. Our overall approach is digital by default, transparent and interoperable by design, and fully adheres to the once only priority. All the individual modules are designed to be built on top of the IPFS and a distributed ledger, as illustrated in \hyperref[fig1]{Fig. 1}. This extended combination of distributed technologies and infrastructures constitutes the backbone of our solution, which is capable of efficiently addressing the complexity of the processes, providing at the same time the security, trustworthiness, immutability and auditability required by contemporary public services. By combining functionalities enabled by \textit{DLTs} and \textit{IPFS}, our approach allows users to control their data without compromising security or limiting third-parties to provide personalized services. IPFS has specific features that remedy the performance issues of dApps, improving their performance through an ad-hoc engagement of existing computational and storage resources. These features include: (i) content indexing, (ii) hash lookup, (iii) distributed naming system (IPNS, similar to DNS), (iv) persistence and clustering of data that reduce latency, (v) decentralized archiving, and (vi) compliance with privacy regulations. \begin{figure} \centering \includegraphics[width=1\textwidth]{architecture.png} \caption{The architecture of the proposed solution.} \label{fig1} \end{figure} The public ledger stores the users' digital identities, access consent logs, and selected authentication transactions. It co-supports the public sharing resource infrastructure, providing the IPFS with advanced operational and technological capabilities, starting from security and privacy, up to immutability of transactions. It is located at the heart of the network to monitor and continuously record every approved interaction among the users' nodes. One of the major challenges is how to overcome the public nature of the ledger to ensure the security, privacy and anonymity of information. Towards this direction, we propose a combination of private and public keys to exchange information among end-users and services. In this way, a service does not observe raw data, but instead it runs its computations directly on the network and obtains the final results only after the consent of the user. We use DLTs since, from the data safety, authenticity and non-repudiation point of view, they provide an easily accessible and immutable history of all contract-related data, adequate for building applications with trust, accountability, and transparency. The \textit{dApps} are used to deliver dedicated services to users. They comprise smart contracts and are hosted in the nodes of the distributed network. The overall performance and storage capacity are increased through the participation of new nodes joining the network. Our approach renders legal and regulatory decisions simple, since law and regulations are programmed by smart contracts in the network and are enforced automatically, while the ledger acts as a legal evidence for storing such data. A \textit{single sign-on Wallet} is responsible for managing - with a common person registry - multiple services provided by various dApps, such as document sharing and information exchange, enabling a single sign-on user-centric document repository. This tool allows stakeholders to manage and share their personal and sensitive documents among different application environments in a single management kit, which can function in a fully distributed way, without a single point of failure. Hence, providing resilience and a continuum of service. In addition, a middleware layer includes the following modules: (i) a \textit{Secure Gateway Channel on-the-fly} to assure a secure intercommunication among systems, databases, apps, etc; (ii) an \textit{AI Data Schema Transformer}, which is based on well-defined libraries and AI models (i.e. GPT2 \cite{Radford2019}) and encompasses the EU interoperability standards to effectively identify and transform data schemas, models and structures, and enable machine-to-machine communication among different types of systems across the EU. Synthetic data collections that map and simulate real data types (i.e. citizens ID, passport, birth certificate, criminal record, etc.) for different EU countries provide the backbone of this module's perception; (iii) a \textit{Transactions-based Analytics Module} that runs as a back-end service on the network, gathering transaction histories and provide insights to users through a user interface developed and delivered as a dApp; and (iv) a \textit{Browser Service Module} that acts as a search engine and facilitator of the network and other modules (i.e. the dApp ecosystem), providing users with diverse functionalities (locate files, documentation, services, entities, etc.) through user-friendly interfaces. This extended digital service availability enables any physical and/or legal entity (such as public administration, business and citizens) to integrate their own external centralized system in the network, enabling interoperability between users, cross-border and cross-sector organizations. To effectively satisfy the desired interoperability by design principle, we deploy a machine learning based environment that automatically recognizes data structures in existing centralized systems. Specifically, we apply the notion of smart data structures by employing deep learning techniques to recognize and transform data schemas, data structures and data types. We apply data fusion techniques to meaningfully integrate heterogeneous information from multiple data sources that would otherwise remain uncorrelated and unexploited. To build a highly tuned system tailored to the specific needs of eGovernment services, we identify the data distributions and examine possible optimizations in the index structures to identify data patterns. The key idea is that a model can learn the sort order or structure of lookup keys and use this signal to effectively predict the position or existence of the associated records. This holistic framework creates a novel eGovernance mechanism for communication, data sharing and information retrieval among centralized systems and decentralized/distributed applications. Stakeholders are able to use the single sign-on Wallet and the individual modules running on the network, while also having unrestricted access to the dApp ecosystem. This ecosystem hosts different dApps for each distinct service supported by the network, which are custom designed and deployed to meet the needs of the end users. The functionalities and the interdependencies of the dApps are formulated and defined with the use of dedicated smart contracts and user interfaces, hosted under the ecosystem. The dApp ecosystem includes libraries of common deployed smart contracts, enabling their reuse and activating users/developers to build and deploy their own applications. Finally, the distributed file storage architecture gives the opportunity to stakeholders to host their own custom applications in the network, thus contributing to its expansion and scalability. \section{An application scenario}\label{section4} According to the Treaty on European Union and Community law, EU citizens have the right to work and live in any EU Member State. However, the process of moving abroad to a foreign country is quite complex in terms of bureaucratic processes. For instance, a Social Security Number (SSN) is required in many EU countries before signing a rental contract. In most cases, the burden of such actions rests solely with the citizens, not in terms of legislation but in terms of complexity of the processes that need to be carried out, let alone the multiple visits people have to make to the relevant public authorities. The following scenario showcases the application of our user-centric solution, which simplifies the bureaucratic processes for citizens, businesses and public administrations. \subsubsection{Overview.} Alice, a Greek citizen, finds a vacant job position in a private company in Portugal. She applies for the job and thankfully gets hired. In Portugal, she has to deal with a series of bureaucratic processes (issue an ID card and a SSN, open a bank account, provide evidence of her educational certificates etc.). To obtain a residence title, rent an apartment and open a bank account, she needs to present at least a validated ID documentation, a birth certificate, a nationality certification validated by a Greek Authority and a proof that she works in Portugal, along with the additional information that may be required by the employer. Adopting our solution, Alice is able to request from the Greek Authorities (Ministry of Digital Governance - MoDG) the proof of ID and the required data, validated. At the same time, Alice can remotely request from her formal educational institution (University of Patras - UoP) all the required certificates (diploma etc.). In turn, MoDG issues the document and Alice gives permission (using a distributed application) to forward it to the respective public authorities in Portugal (Ministry of Justice - MoJ). As soon as this transaction is completed, Alice obtains, has access and is able to securely share her Portuguese SSN through her Wallet. Now, her employer in Portugal can directly get the validated SSN from the Portuguese MoJ, after her approval to register her credentials to their internal payroll system. Furthermore, the HR representative of the company needs a series of legal documents to proceed with the hiring process, including the permanent visa permit. Through her Wallet, Alice is able to provide and/or revise all the required personal documents. \subsubsection{Added value.}\label{subsection4.3.2} The contribution of this approach stands on the simplification of the processes and the significant reduction of bureaucracy. According to the current legislation and official procedures, the process to move to a foreign country for a new job is complex. Opening a bank account, renting an apartment or proving educational certification and achievements can be highly demanding in terms of paperwork, since in many cases there are requests that necessitate cross-border exchange of information and associated documents. Through the proposed eGovernance solution, inconsistencies in bureaucratic procedures will be avoided, such as requiring a local bank account before being able to rent an apartment, while at the same time requiring a local address before being able to open a bank account. \begin{figure} \includegraphics[width=\textwidth]{application_scenario.png} \caption{Current practice compared to the proposed solution.} \label{fig2} \end{figure} Through a set of dApps from the distributed application ecosystem, which adopt a single sign-on Wallet approach and exploit the IPFS and distributed ledger infrastructure, Alice can use her validated digital identity to remotely request, obtain and share the required legal documents and certifications. Upon her permission, all these can be moved directly from the issuing authorities (MoDG, MoJ and UoP) to her new employer and any other potential entity (bank, utilities, etc.). These authorities digitally issue and validate the documentation and instantly push encrypted data into the distributed network, while the transactions among the users are being recorded. Any type of transactions, including requests, notifications and permissions, are monitored and safely stored to protect Alice’s privacy. All transactions are stored in a public ledger to enhance the security of information and eliminate any forgery attempts. Hence, enabling a secure-by-design eGovernment solution. This approach brings forward multiple advantages such as minimizing the chance of forged documentation, enhancing the transparency and security of information exchange in adherence with the relevant legislation, decreasing the overall effort of citizens and reducing significantly the waiting time to carry out the necessary transactions and issue the corresponding documents. \section{Conclusions}\label{section5} This paper has described a novel eGovernance model that aims to make public administrations and public institutions open, efficient and inclusive, providing border-less, digital, personalised and citizen-driven public services. This solution offers citizens and businesses efficient and secure mobile public services and co-creation mechanisms, enabling governments to be extroverted and to preserve trust among public and private entities. The services delivered to citizens contribute to the digital by default principle for government and local authorities. In addition, our approach enables beneficiaries to participate and operate in a by design efficient, cost-effective, secure and cross-border distributed network for data exchange and service delivery. The main contribution of this work is the meaningful integration and orchestration of a set of prominent tools and services, which build on state-of-the-art technologies from the areas of distributed computing and artificial intelligence, to address requirements concerning simplification of processes and reduction of bureaucracy in diverse eGovernment transactions. Our approach has been validated and elaborated in close co-operation with three government agencies (Portuguese Ministry of Justice, Greek Ministry of Digital Governance, and Istanbul Metropolitan Municipality), through which a series of rich application scenarios have been sketched and analyzed. While the feedback received from such a first-level validation was positive, and the proposed solution is open and inclusive by design, its application has to carefully consider the information capacity and available resources of each public sector organisation. Moreover, it has to be evaluated through diverse usefulness and ease-of-use indicators. The proposed approach has interesting research and practical implications. With respect to research, it leverages the existing knowledge in the utilization of distributed computing and AI technologies in the public sector, and advances the digital transformation of eGovernment transactions. With respect to practice, our solution deploys a novel digital channel of communication and collaboration between citizens, businesses and governments. It addresses fundamental weaknesses of the existing eGovernment transactions in terms of bureaucracy, complexity, and unnecessary data entry, while also leveraging existing resources and infrastructures. As a last note, we mention that our approach can be applied in several real-life scenarios, such as the identification control in airports, where passengers need to be checked before departing and after reaching their destination. This application can also incorporate the management of the currently elaborated COVID-19 vaccination certificates \cite{KoflerBaylis2020}; the proposed decentralized blockchain ledger enable an immutable and transparent solution, according to which entries can be publicly audited and anonymity is protected. \subsubsection{Acknowledgements:} This publication has been produced in the context of the EU H2020 Project “GLASS - SinGLe Sign-on eGovernAnce paradigm based on a distributed file exchange network for Security, transparency, cost effectiveness and truSt”, which is co-funded by the European Commission under the Grant agreement ID: 959879. This publication reflects only the authors’ views and the Community is not liable for any use that may be made of the information contained therein. \bibliographystyle{splncs04}
\section{Introduction} In this paper, we shall consider the quasi-periodic Schr\"odinger operator $H_{V,\alpha,\theta}$ with a finitely differentiable potential: \begin{equation}\label{1.1} (H_{V,\alpha,\theta}x)_n=x_{n+1}+x_{n-1}+V(\theta+n\alpha)x_{n}, n\in {\mathbb Z}, \end{equation} where $\theta\in {\mathbb T}^d={\mathbb R}^d/(2\pi{\mathbb Z})^d$ is called the phase, $\alpha \in {\mathbb R}^d$ is called the frequency satisfying $\langle m,\alpha\rangle \notin 2\pi {\mathbb Z}$ for any $m\in {\mathbb Z}^d$ different from zero, and $V\in C^k({\mathbb T}^d,{\mathbb R})$ is called the potential, $k,d\in {\mathbb N}^+$. A typical example is the almost Mathieu operator $H_{2\lambda \cos,\alpha,\theta}$: $$ (H_{2\lambda \cos,\alpha,\theta}x)_n=x_{n+1}+x_{n-1}+2\lambda \cos(\theta+n\alpha)x_{n}, n\in {\mathbb Z}, $$ where $\lambda$ is called the coupling constant. Quasi-periodic Schr\"odinger operators come from solid-state physics, showing the influence of an external magnetic field on the electrons of a crystal \cite{Da,MJ}. It is related to quasi-crystal which is between conductor and insulator. As is very well known, the absolutely continuous spectrum corresponds to conductor. That is, the absolutely continuous spectrum of a quasi-periodic Schr\"odinger operator is the set of energies at which the described physical system exhibits transport. Moreover, the absolutely continuous spectrum is the part of spectrum that has the best stability properties under small perturbation and its existence has strong implications, including an Oracle Theorem that predicts the potential, as shown by Remling \cite{rem}. It is thus an important question to ask whether the quasi-periodic Schr\"odinger operator has (even purely) absolutely continuous spectrum. Recall that $\alpha \in{\mathbb R}^d$ is called {\it Diophantine} if there are $\kappa>0$ and $\tau>d$ such that $\alpha \in {\rm DC}(\kappa,\tau)$, where \begin{equation}\label{dio} {\rm DC}(\kappa,\tau):=\left\{\alpha \in{\mathbb R}^d: \inf_{j \in {\mathbb Z}}\left|\langle n,\alpha \rangle - 2\pi j \right| > \frac{\kappa}{|n|^{\tau}},\quad \forall \, n\in{\mathbb Z}^d\backslash\{0\} \right\}. \end{equation} Here we denote $$ \lvert n\rvert=\lvert n_1\rvert+\lvert n_2\rvert+ \cdots + \lvert n_d\rvert, $$ and $$ \langle n,\alpha \rangle =n_1\alpha_1+n_2\alpha_2+\cdots+n_d\alpha_d. $$ Denote ${\rm DC}=\bigcup_{\kappa,\tau} {\rm DC}(\kappa,\tau)$, which is of full Lebesgue measure. Our main theorem is the following: \begin{Theorem}\label{main} Assume $\alpha\in {\rm DC}(\kappa, \tau)$, $V\in C^k({\mathbb T}^d, {\mathbb R})$ with $k>35\tau+2$. If $\lambda$ is sufficiently small, then $H_{\lambda V,\alpha,\theta}$ has purely absolutely continuous spectrum for all $\theta$. \end{Theorem} \begin{Remark} We do not claim the optimality of the lower bound of ``$k$'' but we point out that some kind of regularity is essential for the existence of $($purely$)$ absolutely continuous spectrum, as will be stated later. For some technical reason, we require ``$k$'' to be larger than $35\tau+2$ instead of $14\tau+2$. \end{Remark} It appears that the existence of (purely) absolutely continuous spectrum depends sensitively on the arithmetic properties of the frequency. Recently, Avila and Jitomirskaya \cite{AJ3} constructed super-Liouvillean $\alpha\in{\mathbb T}^2$ such that for typical analytic potential, the corresponding quasi-periodic Schr\"{o}dinger operator has no absolutely continuous spectrum. Relatively, Hou-Wang-Zhou \cite{HWZ} showed that there exists super-Liouvillean $\alpha\in{\mathbb T}^2$ such that for small analytic potential, the corresponding quasi-periodic Schr\"{o}dinger operator has absolutely continuous spectrum. Moreover, they proved that if $\alpha\in{\mathbb T}^d$ with $\alpha$ being weak-Liouvillean and the potential is small enough, the absolutely continuous spectrum exists. When $d=1$, things can be characterized much more explicitly thanks to Avila's fantastic global theory of analytic Schr\"{o}dinger operators \cite{avila}. He showed that typical one-frequency operators have only point spectrum in the supercritical region, and absolutely continuous spectrum in the subcritical region. It seems that the effect of $\alpha$'s arithmetic properties is weaker in one-frequency case, but we point out that the proofs of absolutely continuous spectrum are quite different according to the arithmetic assumptions on $\alpha$. Focusing on the almost Mathieu operator $H_{2\lambda \cos,\alpha,\theta}$, there is a famous conjecture: Simon \cite{simon2} (Problem $6$) asked whether AMO has purely absolutely continuous spectrum for all $0<\lvert \lambda\rvert<1$, all phases and all frequencies. This conjecture was first proved for Diophantine $\alpha$ and almost every $\theta$ by Jitomirskaya \cite{J}, whose approach follows Aubry duality and localization theory. About ten years later, two key advances happened. On one hand, Avila and Jitomirskaya \cite{AJ2} established so-called quantitative duality to prove Simon's conjecture for Diophantine $\alpha$ and all $\theta$. On the other hand, Avila and Damanik \cite{AD2} used periodic approximation and Kotani theory to prove the conjecture for Liouvillean $\alpha$ and almost every $\theta$. The complete solution to Simon's problem was given by Avila \cite{A01}. He distinguished the whole proof into two parts: when $\beta=0$ (the subexponential regime, see \cite{A01}), the proof relied on almost reducibility results developed in \cite{AJ2}; when $\beta>0$ (the exponential regime), he improved the periodic approximation method developed in \cite{AD2}. Another important factor which influences the existence of absolutely continuous spectrum is the regularity of the potential. In the analytic topology, Dinaburg and Sinai \cite{DS} proved that $H_{V,\alpha,\theta}$ has absolutely continuous spectrum component for all $\theta$ in the perturbative regime ($V$ being analytically small and the smallness depends on $\alpha$) by reducibility theory. Later, Eliasson \cite{Eli92} improved the KAM scheme and showed that $H_{V,\alpha,\theta}$ has purely absolutely continuous spectrum for all $\theta$ in the same setting. By ``non-perturbative reduction to perturbative regime'', Eliasson's result was extended to the non-perturbative regime by Avila-Jitomirskaya \cite{AJ2} and Hou-You \cite{houyou}. However, when it comes to the finitely differentiable topology, there are few results on this issue. In this sense, our theorem is constructive and it mainly extends Eliasson's \cite{Eli92} result to the finitely differentiable case. We emphasize that assuming some kind of continuity or higher regularity of the potential is necessary, not only for ``purely'' absolutely continuous spectrum, but also for the existence of an absolutely continuous spectrum component. In $C^0$ topology, Avila and Damanik \cite{AD} proved that for one-dimensional Schr\"{o}dinger operators with ergodic continuous potentials, there exists a generic set of such potentials such that the corresponding operators have no absolutely continuous spectrum. Moreover, by Gordon's Lemma, Boshernitzan and Damanik \cite{BD} proved that for generic ergodic continuous potentials, the corresponding operators have purely singular continuous spectrum. Now, let us show the main strategy of our paper in the following. As is known to all, Schr\"{o}dinger operator $H_{V,\alpha,\theta}$ is closely related to Schr\"{o}dinger cocycle $(\alpha,A)$ where $$ A(\theta)=S_E^{V}(\theta)=\begin{pmatrix} E- V(\theta) & -1 \\ 1 & 0 \end{pmatrix}, $$ since the solution of $H_{V,\alpha,\theta}x=Ex$ satisfies $$ A(\theta+n\alpha)\begin{pmatrix} x_{n} \\ x_{n-1} \end{pmatrix}=\begin{pmatrix} x_{n+1} \\ x_{n} \end{pmatrix}. $$ Therefore, we can use reducibility method to analyze the dynamics of $C^k$ quasi-periodic linear cocycle $(\alpha, A)\in {\mathbb T}^d \times C^k({\mathbb T}^d,SL(2,{\mathbb R}))$ and then study the spectral properties of the corresponding operator. This approach, which was first developed in \cite{Eli92}, has been proved to be very fruitful \cite{A01,AJ2,AYZ1,AYZ,LYZZ}. Readers are invited to consult You's 2018 ICM survey \cite{you} for more related achievements. In this paper, we acquire a finer quantitative $C^k$ almost reducible theorem by distinguishing resonances from non-resonances more precisely. For simplicity, let us introduce its qualitative version on the Schr\"{o}dinger cocycle (for the quantitative one which works for general $C^k$ $SL(2,{\mathbb R})$-valued cocycles, see Theorem \ref{thm3}). \begin{Theorem}\label{thm1.2} Let $\alpha \in {\rm DC}(\kappa,\tau)$, $V\in C^{k}({\mathbb T}^{d},{\mathbb R})$ with $k>14\tau+2$. If $\lambda$ is sufficiently small, then for any $E\in{\mathbb R}$, $(\alpha,S_E^{\lambda V})$ is $C^{k,k_0}$ almost reducible with $k_0\leq k-2\tau-2$. \end{Theorem} \begin{Remark} If we change the assumption into $k>17\tau+2$, we can further prove the $\frac{1}{2}$-H\"{o}lder continuity of the Lyapunov exponent and the integrated density of states $($see Theorem \ref{thm1} and Theorem \ref{cor1}$)$, which greatly reduces the initial regularity requirement of $k\geqslant 550\tau$ in \cite{CCYZ}. Moreover, compared with \cite{CCYZ}, we obtain a quite good upper bound of the remainder $k_0\leq k-2\tau-2$ instead of $k_0\leq k/6$ for $C^{k,k_0}$ almost reducibility. \end{Remark} Finally, we point out that our main idea of proving the purely absolutely continuous spectrum follows that of Avila \cite{A01} in the subexponential regime. There are two important aspects. One is that we need to obtain a modified quantitative $C^k$ almost reducibility theorem which was originally established by Cai-Chavaudret-You-Zhou \cite{CCYZ}. It will provide us with fine estimates on the conjugation map, the constant part and the perturbation in each KAM step. The other is, we need to stratify the spectrum of $H_{V,\alpha,\theta}$ by the rotation number of $(\alpha,A)$. Once they are done, we will be able to have a good control of the growth of the transfer matrix (see (\ref{transfer}) for definition) on each hierarchical spectrum part. The proofs left are standard by the theorems of Gilbert-Pearson \cite{GP} and Avila \cite{A01}. \section{Preliminaries} For a bounded analytic (possibly matrix valued) function $F(\theta)$ defined on $\mathcal{S}_h:= \{ \theta=(\theta_1,\dots, \theta_d)\in \mathbb{C}^d\ |\ \forall 1\leqslant i\leqslant d, \ | \Im \theta_i |< h \}$, let $ |F|_h= \sup_{\theta\in \mathcal{S}_h } \| F(\theta)\| $ and denote by $C^\omega_{h}({\mathbb T}^d,*)$ the set of all these $*$-valued functions ($*$ will usually denote ${\mathbb R}$, $sl(2,{\mathbb R})$, $SL(2,{\mathbb R})$). We denote $C^\omega({\mathbb T}^d,*)=\cup_{h>0}C^\omega_{h}({\mathbb T}^d,*)$, and set $C^{k}({\mathbb T}^{d},*)$ to be the space of $k$ times differentiable with continuous $k$-th derivatives functions. The norm is defined as $$ \lVert F \rVert _{k}=\sup_{\substack{ \lvert k^{'}\rvert\leqslant k, \theta \in {\mathbb T}^{d} }}\lVert \partial^{k^{'}}F(\theta) \rVert. $$ \subsection{Conjugation and reducibility} Given two cocycles $(\alpha,A_1)$, $(\alpha,A_2)\in {\mathbb T}^d \times C^{\ast}({\mathbb T}^d,SL(2,{\mathbb R}))$, ``$\ast$'' stands for ``$\omega$'' or ``$k$'', one says that they are $C^{\ast}$ conjugated if there exists $Z\in C^{\ast}(2{\mathbb T}^d, SL(2,{\mathbb R}))$, such that $$ Z(\theta+\alpha)A_1(\theta)Z^{-1}(\theta)=A_2(\theta). $$ Note that we need to define $Z$ on the $2{\mathbb T}^d={\mathbb R}^d/(4\pi{\mathbb Z})^d$ in order to make it still real-valued. An analytic cocycle $(\alpha, A)\in {\mathbb T}^d \times C^{\omega}_h({\mathbb T}^d,SL(2,{\mathbb R}))$ is said to be almost reducible if there exist a sequence of conjugations $Z_j\in C^{\omega}_{h_j}(2{\mathbb T}^d, SL(2,{\mathbb R}))$, a sequence of constant matrices $A_j\in SL(2,{\mathbb R})$ and a sequence of small perturbation $f_j \in C^{\omega}_{h_j}({\mathbb T}^d, sl(2,{\mathbb R}))$ such that $$ Z_j(\theta+\alpha)A(\theta)Z_j(\theta)^{-1}=A_j e^{f_j(\theta)} $$ with $$ \lvert f_j(\theta)\rvert_{h_j}\rightarrow 0, \ \ j\rightarrow \infty. $$ Furthermore, we call it weak $(C^{\omega})$ almost reducible if $h_j \rightarrow 0$ and we call it strong $(C^{\omega}_{h,h'})$ almost reducible if $h_j\rightarrow h'>0$. We say $(\alpha, A)$ is $C^{\omega}_{h,h'}$ reducible if there exist a conjugation map $\tilde{Z}\in C^{\omega}_{h'}(2{\mathbb T}^d, $ $SL(2,{\mathbb R}))$ and a constant matrix $\tilde{A} \in SL(2,{\mathbb R})$ such that $$ \tilde{Z}(\theta+\alpha)A(\theta)\tilde{Z}(\theta)^{-1}=\tilde{A}(\theta). $$ In order to avoid repetition, we give an equivalent definition of $C^k$ (almost) reducibility in the following. A finitely differentiable cocycle $(\alpha,A)$ is said to be $C^{k,k_1}$ almost reducible, if $A\in C^k({\mathbb T}^d,SL(2,{\mathbb R}))$ and the $C^{k_1}$-closure of its $C^{k_1}$ conjugacies contains a constant. Moreover, we say $(\alpha,A)$ is $C^{k,k_1}$ reducible, if $A\in C^k({\mathbb T}^d,SL(2,{\mathbb R}))$ and its $C^{k_1}$ conjugacies contain a constant. \subsection{Analytic approximation} Assume $f \in C^{k}({\mathbb T}^{d},sl(2,{\mathbb R}))$. By Zehnder \cite{zehnder}, there exists a sequence $\{f_{j}\}_{j\geqslant 1}$, $f_{j}\in C_{\frac{1}{j}}^{\omega}({\mathbb T}^{d},sl(2,{\mathbb R}))$ and a universal constant $C^{'}$, such that \begin{eqnarray} \nonumber \lVert f_{j}-f \rVert_{k} &\rightarrow& 0 , \quad j \rightarrow +\infty, \\ \label{2.1}\lvert f_{j}\rvert_{\frac{1}{j}} &\leqslant& C^{'}\lVert f \rVert_{k}, \\ \nonumber \lvert f_{j+1}-f_{j} \rvert_{\frac{1}{j+1}} &\leqslant& C^{'}(\frac{1}{j})^k\lVert f \rVert_{k}. \end{eqnarray} Moreover, if $k\leqslant \tilde{k}$ and $f\in C^{\tilde{k}}$, then properties $(\ref{2.1})$ hold with $\tilde{k}$ instead of $k$. That means this sequence is obtained from $f$ regardless of its regularity (since $f_{j}$ is the convolution of $f$ with a map which does not depend on $k$). \subsection{Rotation number and degree} Assume that $A\in C^0({\mathbb T}^d,SL(2,{\mathbb R}))$ is homotopic to identity. It introduces the projective skew-product $F_A:{\mathbb T}^d \times \mathbb{S}^1 \rightarrow {\mathbb T}^d \times \mathbb{S}^1$ with $$ F_A(x,\omega):=\big( x+\alpha, \frac{A(x)\cdot \omega}{\lvert A(x)\cdot \omega\rvert}\big), $$ which is also homotopic to identity. Thus we can lift $F_A$ to a map $\tilde{F}_A:{\mathbb T}^d\times {\mathbb R}\rightarrow {\mathbb T}^d\times {\mathbb R}$ of the form $\tilde{F}_A(x,y)=(x+\alpha,y+\psi(x,y))$, where for every $x \in {\mathbb T}^d$, $\psi(x,y)$ is $2\pi{\mathbb Z}$-periodic in $y$. The map $\psi:{\mathbb T}^d \times {\mathbb R} \rightarrow {\mathbb R}$ is called a lift of $A$. Let $\mu$ be any probability measure on ${\mathbb T}^d\times {\mathbb R}$ which is invariant by $\tilde{F}_A$, and whose projection on the first coordinate is given by Lebesgue measure. The number \begin{equation}\label{rho} \rho_{(\alpha,A)}:=\frac{1}{(2\pi)^d}\int_{{\mathbb T}^d\times {\mathbb R}} \psi(x,y)d\mu(x,y)\mbox{mod}\,2\pi{\mathbb Z} \end{equation} does not depend on the choices of the lift $\psi$ or the measure $\mu$. It is called the {\it fibered rotation number} of cocycle $(\alpha,A)$ (readers can consult \cite{JM} for more details). Let $$ R_{\phi}:=\begin{pmatrix} \cos\phi & -\sin\phi \\ \sin\phi & \cos\phi \end{pmatrix}, $$ if $A\in C^0({\mathbb T}^d,SL(2,{\mathbb R}))$ is homotopic to $\theta\rightarrow R_{\langle n,\theta\rangle}$ for some $n\in {\mathbb Z}^d$, then we call $n$ the {\it degree} of $A$ and denote it by deg$A$. Moreover, \begin{equation}\label{degree}\deg(AB)=\deg A+\deg B.\end{equation} Note that the fibered rotation number is invariant under real conjugacies which are homotopic to identity. More generally, if the cocycle $(\alpha,A_1)$ is conjugated to $(\alpha,A_2)$ by $B\in C^0(2{\mathbb T}^d, SL(2,{\mathbb R}))$, i.e. $B(\cdot +\alpha)A_1(\cdot)B^{-1}(\cdot)=A_2(\cdot)$, then \begin{equation}\label{degpro} \rho_{(\alpha,A_2)}=\rho_{(\alpha,A_1)}+\frac{\langle \deg B,\alpha\rangle}{2}. \end{equation} \section{Dynamical estimates: almost reducibility}\label{sec3} In this section, we establish the modified quantitative $C^{k,k_0}$ almost reducibility for finitely differentiable quasi-periodic $SL(2,{\mathbb R})$ cocycles, which will be applied to control the growth of corresponding Schr\"{o}dinger cocycles. Consider the $C^k$ quasi-periodic $SL(2,{\mathbb R})$ cocycle: $$ (\alpha,Ae^{f(\theta)}):{\mathbb T}^{d}\times{\mathbb R}^{2} \rightarrow {\mathbb T}^{d}\times{\mathbb R}^{2};(\theta,v)\mapsto (\theta+\alpha,Ae^{f(\theta)}\cdot v), $$ where $A\in SL(2,{\mathbb R}), \, f\in C^k({\mathbb T}^{d},sl(2,{\mathbb R})), \, d\in {\mathbb N}^+$ and $\alpha\in {\rm DC}(\kappa,\tau)$. We will first analyze the analytic approximating cocycles $\{(\alpha,Ae^{f_{j}(\theta)})\}_{j\geqslant 1}$ and then obtain the estimates of $(\alpha,Ae^{f(\theta)})$ by analytic approximation \cite{zehnder}. We would like to mention that we will carry out our proof in the framework of $SU(1,1)$ and $su(1,1)$ to make it more explicit. Recall that $sl(2,{\mathbb R})$ is isomorphic to $su(1,1)$, which consists of matrices of the form $$ \begin{pmatrix} it & v\\ \bar{v} & -it \end{pmatrix} $$ with $t\in {\mathbb R}$, $v\in{\mathbb C}$. The isomorphism between them is given by $A\rightarrow MAM^{-1}$, where $$ M=\frac{1}{1+i}\begin{pmatrix} 1 & -i\\ 1 & i \end{pmatrix} $$ and a simple calculation yields $$ M\begin{pmatrix} x & y+z\\ y-z & -x \end{pmatrix}M^{-1}=\begin{pmatrix} iz & x-iy\\ x+iy & -iz \end{pmatrix}, $$ where $x,y,z\in {\mathbb R}$. $SU(1,1)$ is the corresponding Lie group of $su(1,1)$. \subsection{Notations} In the following subsections, parameters $\rho,\epsilon,N,\sigma$ will be fixed; one will refer to the situation where there exists $n_\ast$ with $0<\lvert n_\ast\rvert \leqslant N$ such that $$ \inf_{j \in {\mathbb Z}}\lvert 2\rho- \langle n_\ast,\alpha\rangle - 2\pi j\rvert< \epsilon^{\sigma}, $$ as the ``resonant case'' (for simplicity, we just write ``$\lvert 2\rho - \langle n_\ast,\alpha\rangle \rvert$'' to represent the left side, same for $\lvert \langle n_\ast,\alpha\rangle \rvert$). The integer vector $n_\ast$ will be referred to as a ``resonant site''. Resonances are linked to a useful decomposition of the space $\mathcal{B}_r:=C^{\omega}_{r}({\mathbb T}^{d},su(1,1))$. Assume that for given $\eta>0$, $\alpha\in {\mathbb R}^{d}$ and $A\in SU(1,1)$, we have a decomposition $\mathcal{B}_r=\mathcal{B}_r^{nre}(\eta) \bigoplus\mathcal{B}_r^{re}(\eta)$ satisfying that for any $Y\in\mathcal{B}_r^{nre}(\eta)$, \begin{equation}\label{space} A^{-1}Y(\theta+\alpha)A\in\mathcal{B}_r^{nre}(\eta),\,\lvert A^{-1}Y(\theta+\alpha)A-Y(\theta)\rvert_r\geqslant\eta\lvert Y(\theta)\rvert_r. \end{equation} And let $\mathbb{P}_{nre}$, $\mathbb{P}_{re}$ denote the standard projections from $\mathcal{B}_r$ onto $\mathcal{B}_r^{nre}(\eta)$ and $\mathcal{B}_r^{re}(\eta)$ respectively. Then we have the following crucial lemma which helps us remove all the non-resonant terms: \begin{Lemma}\label{lem2}\cite{CCYZ}\cite{houyou} Assume that $A\in SU(1,1)$, $\epsilon\leqslant (4\lVert A\rVert)^{-4}$ and $\eta \geqslant 13\lVert A\rVert^2{\epsilon}^{\frac{1}{2}}$. For any $g\in \mathcal{B}_r$ with $|g|_r \leqslant \epsilon$, there exist $Y\in \mathcal{B}_r$ and $g^{re}\in \mathcal{B}_r^{re}(\eta)$ such that $$ e^{Y(\theta+\alpha)}(Ae^{g(\theta)})e^{-Y(\theta)}=Ae^{g^{re}(\theta)}, $$ with $\lvert Y \rvert_r\leqslant \epsilon^{\frac{1}{2}}$ and $\lvert g^{re}\rvert_r\leqslant 2\epsilon$. \end{Lemma} \begin{Remark}\label{rem2} In the inequality ``$\eta \geqslant 13\lVert A\rVert^2{\epsilon}^{\frac{1}{2}}$'', ``$\frac{1}{2}$'' is sharp due to the quantitative Implicit Function Theorem \cite{BerBia,deimling}. The proof only relies on the fact that $\mathcal{B}_r$ is a Banach space, thus it also applies to $C^k$ and $C^0$ topology. One can refer to the appendix of \cite{CCYZ} for details. \end{Remark} \subsection{Analytic KAM Theorem} In this part, we focus on the analytic quasi-periodic $SL(2,{\mathbb R})$ cocycle: $$ (\alpha,Ae^{f(\theta)}):{\mathbb T}^{d}\times{\mathbb R}^{2} \rightarrow {\mathbb T}^{d}\times{\mathbb R}^{2};(\theta,v)\mapsto (\theta+\alpha,Ae^{f(\theta)}\cdot v), $$ where $A\in SL(2,{\mathbb R}), \, f\in C^{\omega}_{r}({\mathbb T}^{d},sl(2,{\mathbb R}))$ with $r>0, d\in {\mathbb Z}^{+}$, and $\alpha\in {\rm DC}(\kappa,\tau)$. Note that $A$ has eigenvalues $\{e^{i\rho},e^{-i\rho}\}$ with $\rho \in {\mathbb R}\cup i{\mathbb R}$. We formulate our quantitative analytic KAM theorem as follows. \begin{Theorem}\label{prop1} Let $\alpha\in {\rm DC}(\kappa,\tau)$, $\kappa,r>0$, $\tau>d$, $\sigma<\frac{1}{6}$. Suppose that $A\in SL(2,{\mathbb R})$, $f\in C^{\omega}_{r}({\mathbb T}^{d},sl(2,{\mathbb R}))$. Then for any $r'\in (0,r)$, there exist constants $c=c(\kappa,\tau,d)$, $D> \frac{2}{\sigma}$ and $\tilde{D}=\tilde{D}(\sigma)$ such that if \begin{equation}\label{estf} \lvert f \rvert_r\leqslant\epsilon \leqslant \frac{c}{\lVert A\rVert^{\tilde{D}}}(r-r')^{D\tau}, \end{equation} then there exist $B\in C^{\omega}_{r'}(2{\mathbb T}^{d},SL(2,{\mathbb R}))$, $A_{+}\in SL(2,{\mathbb R})$ and $f_{+}\in C^{\omega}_{r'}({\mathbb T}^{d},$ $sl(2,{\mathbb R}))$ such that $$ B(\theta+\alpha)(Ae^{f(\theta)})B^{-1}(\theta)=A_{+}e^{f_+(\theta)}. $$ More precisely, let $N=\frac{2}{r-r'} \lvert \ln \epsilon \rvert$, then we can distinguish two cases: \begin{itemize} \item $($Non-resonant case$)$ if for any $n\in {\mathbb Z}^{d}$ with $0<\lvert n \rvert \leqslant N$, we have $$ \lvert 2\rho - \langle n,\alpha\rangle \rvert\geqslant \epsilon^{\sigma}, $$ then $$\lvert B-Id\rvert_{r'}\leqslant \epsilon^{\frac{1}{2}} ,\ \ \lvert f_{+}\rvert_{r'}\leqslant \epsilon^{3-\sigma}.$$ and $$\lVert A_+-A\rVert\leqslant 2\lVert A\rVert\epsilon.$$ \item $($Resonant case$)$ if there exists $n_\ast$ with $0<\lvert n_\ast\rvert \leqslant N$ such that $$ \lvert 2\rho- \langle n_\ast,\alpha\rangle \rvert< \epsilon^{\sigma}, $$ then \begin{flalign*} \lvert B \rvert_{r'} &\leqslant 8(\frac{\lVert A\rVert}{\kappa})^{\frac{1}{2}}(\frac{2}{r-r'} \lvert \ln \epsilon \rvert)^{\frac{\tau}{2}}\times\epsilon^{\frac{-r'}{r-r'}},\\ \lVert B\rVert_0 &\leqslant 8(\frac{\lVert A\rVert}{\kappa})^{\frac{1}{2}}(\frac{2}{r-r'} \lvert \ln \epsilon \rvert)^{\frac{\tau}{2}},\\ \lvert f_{+}\rvert_{r'}&\leqslant \frac{2^{5+\tau}\lVert A\rVert\lvert \ln\epsilon\rvert^{\tau}}{\kappa(r-r')^{\tau}}\epsilon e^{-N'(r-r')}(N')^de^{Nr'}\ll \epsilon^{100}, \, N'> 2N^2. \end{flalign*} Moreover, $A_+=e^{A''}$ with $\lVert A''\rVert \leqslant 2\epsilon^{\sigma}$, $A''\in sl(2,{\mathbb R})$. More accurately, we have $$ MA''M^{-1}=\begin{pmatrix} it & v\\ \bar{v} & -it \end{pmatrix} $$ with $\lvert t\rvert \leqslant \epsilon^{\sigma}$ and $$ \lvert v \rvert\leqslant \frac{2^{4+\tau}\lVert A\rVert\lvert \ln\epsilon\rvert^{\tau}}{\kappa(r-r')^{\tau}}\epsilon e^{-\lvert n_{\ast}\rvert r}. $$ \end{itemize} \end{Theorem} \begin{pf} For the readers who are quite familiar with the analytic KAM scheme, this proof can be skipped since the structure is similar to that in \cite{CCYZ}. But the estimates here are sharp compared with those in \cite{CCYZ} (see Remark \ref{rem3.3}), so we prefer to provide the detailed proof for self-containedness. Let us prove this theorem in $SL(2,{\mathbb R})$'s isomorphic group: $SU(1,1)$. We distinguish the proof into two cases: \textbf{Non-resonant case:} For $0<\lvert n \rvert \leqslant N=\frac{2}{r-r'} \lvert \ln \epsilon \rvert$, we have \begin{equation}\label{est1} \lvert 2\rho - \langle n,\alpha\rangle \rvert\geqslant \epsilon^{\sigma}; \end{equation} by $(\ref{estf})$ with $D>\frac{2}{\sigma}$, we have \begin{equation}\label{est2} \left \lvert \langle n,\alpha\rangle \right \rvert \geqslant \frac{\kappa}{\left \lvert n \right \rvert ^{\tau}}\geqslant \frac{\kappa}{\left \lvert N \right \rvert ^{\tau}}\geqslant \epsilon^{\frac{\sigma}{2}}\geqslant \epsilon^{\sigma}. \end{equation} It is well known that $(\ref{est1})$ and $(\ref{est2})$ are the conditions which are used to overcome the small denominator problem in KAM theory. Define \begin{equation}\label{lambdaN} \Lambda_N=\{f\in C^{\omega}_{r}({\mathbb T}^{d},su(1,1))\mid f(\theta)=\sum_{k\in {\mathbb Z}^{d},0<\lvert k \rvert<N}\hat{f}(k)e^{i\langle k,\theta\rangle}\}. \end{equation} Our goal is to solve the cohomological equation $$ Y(\theta+\alpha)A-AY(\theta)=A(-\mathcal{T}_Nf(\theta)+\hat{f}(0)), $$ i.e. \begin{equation}\label{coho} A^{-1}Y(\theta+\alpha)A-Y(\theta)=-\mathcal{T}_Nf(\theta)+\hat{f}(0). \end{equation} Take the Fourier transform for $(\ref{coho})$ and compare the corresponding Fourier coefficients of the two sides. By $(\ref{est1})$ (apply it twice to solve the off-diagonal) along with $(\ref{est2})$ (apply it once to solve the diagonal), we obtain that if $Y\in\Lambda_N$, then $$ \lvert Y(\theta)\rvert_r \leqslant \epsilon^{-3\sigma}\lvert \mathcal{T}_Nf(\theta)-\hat{f}(0)\rvert_r, $$ which gives \begin{equation}\label{crucial} \lvert A^{-1}Y(\theta+\alpha)A-Y(\theta)\rvert_r\geqslant\epsilon^{3\sigma}\lvert Y(\theta)\rvert_r. \end{equation} Moreover, we have $A^{-1}Y(\theta+\alpha)A \in \Lambda_N$ by $(\ref{lambdaN})$. For $\eta=\epsilon^{3\sigma}$, we define $\mathcal{B}_r^{nre}(\epsilon^{3\sigma})$ by $(\ref{space})$, then we have $\Lambda_N \subset \mathcal{B}_r^{nre}(\epsilon^{3\sigma})$. Since $\epsilon^{3\sigma}\geqslant 13\lVert A\rVert^2\epsilon^{\frac{1}{2}}$ (it holds by $\sigma$ being smaller than $\frac{1}{6}$ and $\tilde{D}$ depending on $\sigma$), by Lemma \ref{lem2} we have $Y\in \mathcal{B}_r$ and $f^{re}\in \mathcal{B}_r^{re}(\epsilon^{3\sigma})$ such that $$ e^{Y(\theta+\alpha)}(Ae^{f(\theta)})e^{-Y(\theta)}=Ae^{f^{re}(\theta)}, $$ with $\lvert Y \rvert_r\leqslant \epsilon^{\frac{1}{2}}$ and \begin{equation}\label{fre} \lvert f^{re}\rvert_r\leqslant 2\epsilon. \end{equation} By $(\ref{lambdaN})$ $$ (\mathcal{T}_N{f^{re}})(\theta)=\hat{f}^{re}(0), \ \ \lVert \hat{f}^{re}(0)\rVert \leqslant 2\epsilon, $$ and \begin{flalign}\label{ep} \lvert (\mathcal{R}_N{f^{re}})(\theta)\rvert_{r'}&= \lvert \sum_{\lvert n \rvert>N}\hat{f}^{re}(n)e^{i\langle n,\theta\rangle}\rvert_{r'}\\ \notag &\leqslant 2\epsilon e^{-N(r-r')}(N)^{d}\\ \notag &\leqslant 2\epsilon\cdot\epsilon^{2}\cdot \frac{1}{4}\epsilon^{-\sigma}\\ \notag &=\frac{1}{2}\epsilon^{3-\sigma}. \end{flalign} Moreover, we can compute that $$ e^{\hat{f}^{re}(0)+\mathcal{R}_N{f^{re}}(\theta)}=e^{\hat{f}^{re}(0)}(Id+e^{-\hat{f}^{re}(0)}\mathcal{O}(\mathcal{R}_N{f^{re}}))=e^{\hat{f}^{re}(0)}e^{f_+(\theta)}, $$ by $(\ref{ep})$, we have $$ \lvert f_+(\theta)\rvert_{r'}\leqslant 2\lvert \mathcal{R}_N{f^{re}(\theta)}\rvert_{r'} \leqslant \epsilon^{3-\sigma}. $$ Finally, if we denote $$ A_+=Ae^{\hat{f}^{re}(0)}, $$ then we have $$ \lVert A_+-A\rVert\leqslant \lVert A\rVert \lVert Id-e^{\hat{f}^{re}(0)} \rVert \leqslant 2\lVert A\rVert\epsilon. $$ \textbf{Resonant case:} In fact, we only need to consider the case in which $A$ is elliptic with eigenvalues $\{e^{i\rho},e^{-i\rho}\}$ for $\rho\in {\mathbb R}\backslash\{0\}$ since if $\rho\in i{\mathbb R}$, then the non-resonant condition is always satisfied due to the Diophantine condition on $\alpha$ and then it actually belongs to the non-resonant case. \begin{Claim} $n_\ast$ is the unique resonant site with $$ 0<\lvert n_\ast\rvert \leqslant N=\frac{2}{r-r'} \lvert \ln \epsilon \rvert. $$ \end{Claim} \begin{pf}Indeed, if there exists $n_{\ast}^{'}\neq n_\ast$ satisfying $|2\rho- \langle n_{\ast}^{'},\alpha\rangle|< \epsilon^{\sigma}$, then by the Diophantine condition of $\alpha$, we have $$ \frac{\kappa}{\lvert n_{\ast}^{'}-n_\ast\rvert^{\tau}}\leqslant \lvert \langle n_{\ast}^{'}-n_\ast,\alpha\rangle\rvert< 2\epsilon^{\sigma}, $$ which implies that $\lvert n_{\ast}^{'} \rvert>2^{-\frac{1}{\tau}}\kappa^{\frac{1}{\tau}}\epsilon^{-\frac{\sigma}{\tau}}-N> 2N^2.$\end{pf} Since we have \begin{equation}\label{reso} \lvert 2\rho- \langle n_\ast,\alpha\rangle \rvert< \epsilon^{\sigma}, \end{equation} the smallness condition on $\epsilon$ implies that $$\lvert \ln \epsilon\lvert ^\tau \epsilon^\sigma \leqslant \frac{\kappa (r-r')^\tau}{2^{\tau+1}}.$$ \noindent Thus $$\frac{\kappa}{\lvert n_\ast\lvert^\tau} \leqslant \lvert \langle n_\ast,\alpha\rangle \lvert\leqslant \epsilon^\sigma +2\lvert \rho\lvert \leqslant \frac{\kappa}{2\lvert n_\ast\lvert ^\tau}+2\lvert \rho\lvert ,$$ \noindent which implies that $$ \lvert \rho \rvert\geqslant \frac{\kappa}{4\lvert n_\ast\rvert^{\tau}}. $$ Then by Lemma 8.1 of Hou-You \cite{houyou}, one can find $P\in SU(1,1)$ with $$ \lVert P \rVert \leqslant 2(\frac{\lVert A \rVert}{\lvert \rho \rvert})^{\frac{1}{2}}\leqslant 4(\frac{\lVert A\rVert}{\kappa})^{\frac{1}{2}}\lvert n_\ast \rvert^{\frac{\tau}{2}}, $$ such that $$ PAP^{-1}=\begin{pmatrix} e^{i\rho} & 0\\ 0 & e^{-i\rho} \end{pmatrix}=A'. $$ Denote $g=PfP^{-1}$, by $(\ref{estf})$ we have: \begin{eqnarray} \label{esti-p}\lVert P \rVert &\leqslant& 4(\frac{\lVert A\rVert}{\kappa})^{\frac{1}{2}}\lvert N \rvert^{\frac{\tau}{2}}\leqslant 4(\frac{\lVert A\rVert}{\kappa})^{\frac{1}{2}}(\frac{2}{r-r'} \lvert \ln \epsilon \rvert)^{\frac{\tau}{2}},\\ \label{esti-g}\lvert g \rvert_r &\leqslant& \lVert P \rVert^2\lvert f\rvert_r \leqslant \frac{2^{4+\tau}\lVert A\rVert\lvert \ln\epsilon\rvert^{\tau}}{\kappa(r-r')^{\tau}}\times\epsilon:=\epsilon'. \end{eqnarray} Now we define \begin{flalign*} &\Lambda_1(\epsilon^{\sigma})=\{n\in{\mathbb Z}^{d}: \lvert \langle n,\alpha\rangle\rvert \geqslant \epsilon^{\sigma}\},\\ &\Lambda_2(\epsilon^{\sigma})=\{n\in{\mathbb Z}^{d}: \lvert 2\rho-\langle n,\alpha\rangle\rvert \geqslant \epsilon^{\sigma}\}. \end{flalign*} For $\eta=\epsilon^{\sigma}$, we define the decomposition $\mathcal{B}_r=\mathcal{B}_r^{nre}(\epsilon^{\sigma}) \bigoplus\mathcal{B}_r^{re}(\epsilon^{\sigma})$ as in $(\ref{space})$ with $A$ substituted by $A'$. Direct computation shows that any $Y\in \mathcal{B}_r^{nre}(\epsilon^{\sigma})$ takes the precise form: \begin{small} \begin{equation} \begin{split} Y(\theta)=&\sum_{n\in \Lambda_1(\epsilon^{\sigma})}\begin{pmatrix} i\hat{t}(n) & 0\\ 0 & -i\hat{t}(n) \end{pmatrix} e^{i\langle n,\theta\rangle}+\\ &\sum_{n\in \Lambda_2(\epsilon^{\sigma})}\begin{pmatrix} 0 & \hat{v}(n)e^{i\langle n,\theta\rangle}\\ \overline{\hat{v}(n)}e^{-i\langle n,\theta\rangle} & 0 \end{pmatrix}. \end{split} \end{equation} \end{small} Since $\epsilon^{\sigma}\geqslant 13\lVert A'\rVert^2 (\epsilon') ^{\frac{1}{2}}$, we can apply Lemma \ref{lem2} to remove all the non-resonant terms of $g$, which means there exist $Y\in \mathcal{B}_r$ and $g^{re}\in \mathcal{B}_r^{re}(\eta)$ such that $$ e^{Y(\theta+\alpha)}(A'e^{g(\theta)})e^{-Y(\theta)}=A'e^{g^{re}(\theta)}, $$ with $\lvert Y \rvert_r\leqslant (\epsilon')^{\frac{1}{2}}$ and $\lvert g^{re}\rvert_r\leqslant 2\epsilon'$. Combining with the Diophantine condition on the frequency $\alpha$ and the Claim, we have: \begin{flalign*} &\{{\mathbb Z}^{d}\backslash\Lambda_1(\epsilon^{\sigma})\}\cap\{n\in {\mathbb Z}^{d}:\lvert n \rvert\leqslant \kappa^{\frac{1}{\tau}}\epsilon^{-\frac{\sigma}{\tau}}\}=\{0\},\\ &\{{\mathbb Z}^{d}\backslash\Lambda_2(\epsilon^{\sigma})\}\cap\{n\in {\mathbb Z}^{d}:\lvert n \rvert\leqslant 2^{-\frac{1}{\tau}}\kappa^{\frac{1}{\tau}}\epsilon^{-\frac{\sigma}{\tau}}-N\}=\{n_\ast\}. \end{flalign*} Let $N':=2^{-\frac{1}{\tau}}\kappa^{\frac{1}{\tau}}\epsilon^{-\frac{\sigma}{\tau}}-N$, then we can rewrite $g^{re}(\theta)$ as \begin{flalign*} g^{re}(\theta)&=g^{re}_0+g^{re}_1(\theta)+g^{re}_2(\theta)\\ &=\begin{pmatrix} i\hat{t}(0) & 0 \\ 0 & -i\hat{t}(0) \end{pmatrix}+\begin{pmatrix} 0 & \hat{v}(n_\ast)e^{i\langle n_\ast,\theta\rangle} \\ \overline{\hat{v}(n_\ast)}e^{-i\langle n_\ast,\theta\rangle} & 0 \end{pmatrix}\\ &+\sum_{\lvert n \rvert>N'}\hat{g}^{re}(n)e^{i\langle n,\theta\rangle}. \end{flalign*} Define the $4\pi{\mathbb Z}^d$-periodic rotation $Q(\theta)$ as below: $$ Q(\theta)=\begin{pmatrix} e^{-\frac{\langle n_\ast,\theta\rangle}{2}i} & 0\\ 0 & e^{\frac{\langle n_\ast,\theta\rangle}{2}i} \end{pmatrix}. $$ So we have \begin{equation}\label{esti-Q}\lvert Q(\theta)\rvert_{r'}\leqslant e^{\frac{1}{2}Nr'}\leqslant \epsilon^{\frac{-r'}{r-r'}}.\end{equation} One can also show that $$ Q(\theta+\alpha)(A'e^{g^{re}(\theta)})Q^{-1}(\theta)=\tilde{A}e^{\tilde{g}(\theta)}, $$ where \begin{equation}\label{tildea} \tilde{A}=Q(\theta+\alpha)A'Q^{-1}(\theta)=\begin{pmatrix} e^{i(\rho-\frac{\langle n_\ast,\alpha\rangle}{2})} & 0\\ 0 & e^{-i(\rho-\frac{\langle n_\ast,\alpha\rangle}{2})} \end{pmatrix} \end{equation} and $$\tilde{g}(\theta)=Qg^{re}(\theta)Q^{-1}=Qg^{re}_0Q^{-1}+Qg^{re}_1(\theta)Q^{-1}+Qg^{re}_2(\theta)Q^{-1}.$$ Moreover, \begin{flalign} \label{ell1}Qg^{re}_0Q^{-1} &=g^{re}_0 = \begin{pmatrix} i\hat{t}(0) & 0 \\ 0 & -i\hat{t}(0) \end{pmatrix} \in su(1,1), \\ \label{ell2}Qg^{re}_1(\theta)Q^{-1}&=\begin{pmatrix} 0 & \hat{v}(n_\ast) \\ \overline{\hat{v}(n_\ast)} & 0 \end{pmatrix} \in su(1,1). \end{flalign} Now we return back from $su(1,1)$ to $sl(2,{\mathbb R})$. Denote \begin{flalign} \label{ell}L &=M^{-1}(Qg^{re}_0Q^{-1}+Qg^{re}_1(\theta)Q^{-1})M,\\ F &=M^{-1}Qg^{re}_2(\theta)Q^{-1}M,\\ B &=M^{-1}(Q\circ e^Y \circ P) M,\\ \label{tildeaa}\tilde{A}^{'} &=M^{-1}\tilde{A}M, \end{flalign} then we have: \begin{equation}\label{con1} B(\theta+\alpha)(Ae^{f(\theta)})B^{-1}(\theta)=\tilde{A}^{'}e^{L+F(\theta)}. \end{equation} By $(\ref{esti-p})$ and $(\ref{esti-Q})$, we have the following estimates: \small\begin{eqnarray} \lVert B\rVert_0 &\leqslant& |e^{Y}|_r \lVert P\rVert \leqslant 8(\frac{\lVert A\rVert}{\kappa})^{\frac{1}{2}}(\frac{2}{r-r'} \lvert \ln \epsilon \rvert)^{\frac{\tau}{2}},\\ \lvert B\rvert_{r'} &\leqslant& 8(\frac{\lVert A\rVert}{\kappa})^{\frac{1}{2}}(\frac{2}{r-r'} \lvert \ln \epsilon \rvert)^{\frac{\tau}{2}}\times\epsilon^{\frac{-r'}{r-r'}},\\ \label{D}\lVert L \rVert &\leqslant& \lVert Qg^{re}_0Q^{-1}\rVert + \lVert Qg^{re}_1(\theta)Q^{-1}\rVert \leqslant \epsilon'+\epsilon' e^{-\lvert n_{\ast}\rvert r},\\ \label{F}|F|_{r'} &\leqslant& \lvert Qg^{re}_2(\theta)Q^{-1}\rvert_{r'} \leqslant \frac{2^{4+\tau}\lVert A\rVert\lvert \ln\epsilon\rvert^{\tau}}{\kappa(r-r')^{\tau}}\epsilon e^{-N'(r-r')}(N')^de^{Nr'}. \end{eqnarray} By $(\ref{D})$ and $(\ref{F})$, direct computation shows that \begin{equation}\label{impl} e^{L+F(\theta)}=e^L+\mathcal{O}(F(\theta))=e^L(Id+e^{-L}\mathcal{O}(F(\theta)))=e^L e^{f_+{(\theta)}}. \end{equation} It immediately implies that $$ \lvert f_+{(\theta)}\rvert_{r'}\leqslant 2 |F(\theta)|_{r'}\leqslant \frac{2^{5+\tau}\lVert A\rVert\lvert \ln\epsilon\rvert^{\tau}}{\kappa(r-r')^{\tau}}\epsilon e^{-N'(r-r')}(N')^de^{Nr'}\ll \epsilon^{100}. $$ Thus we can rewrite $(\ref{con1})$ as $$ B(\theta+\alpha)(Ae^{f(\theta)})B^{-1}(\theta)=A_{+}e^{f_+(\theta)}, $$ with \begin{equation}\label{constm} A_+=\tilde{A}^{'}e^L=e^{A''}, \ \ A''\in sl(2,{\mathbb R}). \end{equation} Now recall that Baker-Campbell-Hausdorff Formula says that \begin{equation} \ln(e^X e^Y)=X+Y+\frac{1}{2}[X,Y]+\frac{1}{12}([X,[X,Y]+[Y,[Y,X]])+\cdots, \end{equation} where $[X,Y]=XY-YX$ denotes the Lie Bracket and $\cdots$ denotes the sum of higher order terms. Using this formula and by a simple calculation, $(\ref{constm})$ gives $$ MA''M^{-1}=\begin{pmatrix} it & v\\ \bar{v} & -it \end{pmatrix} $$ where $$ t=\rho-\frac{\langle n_\ast,\alpha\rangle}{2}+\hat{t}(0)+ {\rm higher\, order\, terms} $$ and $$ v=\hat{v}(n_\ast)+ {\rm higher\, order\, terms}. $$ By $(\ref{reso})$ and $(\ref{D})$, we obtain $\lvert t\rvert \leqslant \epsilon^{\sigma}$ and $$ \lvert v \rvert\leqslant \frac{2^{4+\tau}\lVert A\rVert\lvert \ln\epsilon\rvert^{\tau}}{\kappa(r-r')^{\tau}}\epsilon e^{-\lvert n_{\ast}\rvert r}. $$ Finally, the following estimate is straightforward: \begin{equation}\label{constant} \lVert A'' \rVert\leqslant 2(\lvert \rho-\frac{\langle n_\ast,\alpha\rangle}{2}\rvert+\lVert Qg^{re}_0Q^{-1}\rVert+\lVert Qg^{re}_1(\theta)Q^{-1}\rVert)\leqslant 2\epsilon^{\sigma}. \end{equation} This finishes the proof of Proposition $\ref{prop1}$. \end{pf} \begin{Remark} The special structure of $A_+$ can give us a precise estimate of the upper triangular element of the parabolic constant matrix when the rotation number of the initial system is rational with respect to $\alpha$, see \cite{LYZZ}. However, it does not work for general case. Instead, $A_+=e^{A''}$ with $\lVert A''\rVert \leqslant 2\epsilon^{\sigma}$ will help. \end{Remark} \begin{Remark}\label{rem3.3} The limitation $\sigma<\frac{1}{6}$ not only makes Lemma \ref{lem2} applicable but also ensures that our conjugation map $B$ takes value in $SL(2,{\mathbb R})$. The choice of $D$ being larger than $\frac{2}{\sigma}$ is necessary for us to guarantee the arbitrariness of $r'\in(0,r)$ and the separation of resonant steps $($see Claim \ref{cl2}$)$. \end{Remark} \subsection{$C^k$ Almost Reducibility} Let $(f_{j})_{j\geqslant 1}$, $f_{j}\in C_{\frac{1}{j}}^{\omega}({\mathbb T}^{d},sl(2,{\mathbb R}))$ be the analytic sequence approximating $f\in C^k({\mathbb T}^{d},sl(2,{\mathbb R}))$ which satisfies $(\ref{2.1})$. For $0<r'<r$, denote \begin{equation} \epsilon_0^{'}(r,r')=\frac{c}{(2\lVert A\rVert)^{\tilde{D}}}(r-r')^{D\tau}, \end{equation} where $c,D,\tilde{D},\tau$ are defined in Theorem \ref{prop1}. For $m\in{\mathbb Z}^+$, we define \begin{equation} \epsilon_m=\frac{c}{(2\lVert A\rVert)^{\tilde{D}}m^{D\tau+\frac{1}{2}}}. \end{equation} Then for any $0<s\leqslant\frac{1}{6D\tau+3}$ fixed, there exists $m_0$ such that for any $m\geqslant m_0$ we have both \begin{equation}\label{pickm0} \epsilon_m\leqslant \epsilon_0^{'}(\frac{1}{m},\frac{1}{m^{1+s}}), \end{equation} and $$ \frac{1}{m^s-1}\leqslant \frac{s}{4}. $$ We will start from $M> \max\{\frac{(2\lVert A\rVert)^{\tilde{D}}}{c},m_0\}$, $M\in{\mathbb N}^+$. Denote $l_j=M^{(1+s)^{j-1}}$, $j\in {\mathbb N}^+$. In case that $l_j$ is not an integer, we just pick $[l_j]+1$ instead of $l_j$. Now, denote by $\Omega=\{l_{n_1},l_{n_2},l_{n_3},\cdots\}$ the sequence of all resonant steps. That is, $l_{n_j}$-th step is obtained by resonant case. Using analytic approximation $(\ref{2.1})$ and Theorem \ref{prop1}, we have the following Proposition concerning each $(\alpha, Ae^{f_{l_j}(\theta)})$. \begin{Proposition}\label{pro33} Let $\alpha\in {\rm DC}(\kappa,\tau)$, $\sigma<\frac{1}{6}$. Assume that $A\in SL(2,{\mathbb R})$, $f\in C^k({\mathbb T}^d, sl(2,{\mathbb R}))$ with $k>(D+2)\tau+2$ and $\{f_j\}_{j\geqslant 1}$ are defined above. There exists $\epsilon_0=\epsilon_0(\kappa,\tau,d,k, \lVert A\rVert,\sigma)$ such that if $\lVert f\rVert_k \leqslant \epsilon_0$, then there exist $B_{l_j}\in C^{\omega}_{\frac{1}{l_{j+1}}}(2{\mathbb T}^d, SL(2,{\mathbb R}))$, $A_{l_j}\in SL(2,{\mathbb R})$ and $f^{'}_{l_j}\in C^{\omega}_{\frac{1}{l_{j+1}}}(2{\mathbb T}^d, sl(2,{\mathbb R}))$ such that $$ B_{l_j}(\theta+\alpha)(Ae^{f_{l_j}(\theta)})B^{-1}_{l_j}(\theta)=A_{l_j}e^{f_{l_j}^{'}(\theta)}, $$ with estimates \begin{flalign}\label{estimBlj}\lvert B_{l_j}(\theta)\rvert_{\frac{1}{l_{j+1}}}&\leqslant 64(\frac{\lVert A\rVert}{\kappa})(\frac{2}{\frac{1}{l_j}-\frac{1}{l_{j+1}}} \lvert \ln \epsilon_{l_j} \rvert)^{\tau}\times{\epsilon_{l_j}}^{-\frac{\frac{2}{l_{j+1}}}{\frac{1}{l_j}-\frac{1}{l_{j+1}}}} \leqslant \epsilon_{l_{j}}^{-\frac{\sigma}{2}-s},\\ \label{estimBlj2}\lVert B_{l_j}(\theta)\rVert_0&\leqslant 64(\frac{\lVert A\rVert}{\kappa})(\frac{2}{\frac{1}{l_j}-\frac{1}{l_{j+1}}} \lvert \ln \epsilon_{l_j} \rvert)^{\tau} \leqslant \epsilon_{l_{j}}^{-\frac{\sigma}{2}},\\ \label{estimflj}\lvert f_{l_j}^{'}(\theta)\rvert_{\frac{1}{l_{j+1}}}&\leqslant \epsilon_{l_{j}}^{3-\sigma},\ \ \lVert A_{l_j}\rVert\leqslant 2\lVert A\rVert. \end{flalign} Moreover, there exists unitary matrices $U_j\in SL(2,{\mathbb C})$ such that $$ U_jA_{l_j}U_j^{-1}=\begin{pmatrix} e^{\gamma_j} & c_j\\ 0 & e^{-\gamma_j} \end{pmatrix} $$ and \begin{equation} \label{estisharp}\lVert B_{l_j}(\theta)\rVert_0^2\lvert c_j\rvert \leqslant 8\lVert A\rVert, \end{equation} with $\gamma_j\in i{\mathbb R}\cup{\mathbb R}$ and $c_j\in {\mathbb C}$. \end{Proposition} \begin{pf} \textbf{First step:} Assume that $$ C'\lVert f(\theta) \rVert_k\leqslant \frac{c}{(2\lVert A\rVert)^{\tilde{D}}l_1^{D\tau+\frac{1}{2}}}, $$ then by $(\ref{2.1})$ and $(\ref{pickm0})$ we have $$ \lvert f_{l_{1}}(\theta)\rvert_{\frac{1}{l_{1}}}\leqslant \epsilon_{l_{1}}\leqslant \epsilon_0^{'}(\frac{1}{l_{1}},\frac{1}{l_{2}}). $$ Apply Theorem \ref{prop1}, we can find $B_{l_1}\in C^{\omega}_{\frac{1}{l_2}}(2{\mathbb T}^{d},SL(2,{\mathbb R}))$, $A_{l_1}\in SL(2,{\mathbb R})$ and $f_{l_1}^{'}\in C^{\omega}_{\frac{1}{l_2}}({\mathbb T}^{d},sl(2,{\mathbb R}))$ such that $$ B_{l_1}(\theta+\alpha)(Ae^{f_{l_1}(\theta)})B^{-1}_{l_1}(\theta)=A_{l_1}e^{f_{l_1}^{'}(\theta)}. $$ More precisely, we have two different cases: \begin{itemize} \item (Non-resonant case) $$ \lvert B_{l_1}\rvert_{\frac{1}{l_2}}\leqslant 1+\epsilon_{l_{1}}^{\frac{1}{2}}, \ \ \lvert f_{l_1}^{'}\rvert_{\frac{1}{l_2}}\leqslant \epsilon_{l_{1}}^{3-\sigma}, $$ and $$ \lVert A_{l_1}-A\rVert \leqslant 2\lVert A\rVert\epsilon_{l_{1}}. $$ \item (Resonant case) \begin{flalign*} \lvert B_{l_1}\rvert_{\frac{1}{l_2}} &\leqslant 8(\frac{\lVert A\rVert}{\kappa})^{\frac{1}{2}}(\frac{2}{\frac{1}{l_1}-\frac{1}{l_2}} \lvert \ln \epsilon_{l_1} \rvert)^{\frac{\tau}{2}}\times{\epsilon_{l_1}}^{-\frac{\frac{1}{l_2}}{\frac{1}{l_1}-\frac{1}{l_2}}},\\ \lvert B_{l_1}\rvert_0 &\leqslant 8(\frac{\lVert A\rVert}{\kappa})^{\frac{1}{2}}(\frac{2}{\frac{1}{l_1}-\frac{1}{l_2}} \lvert \ln \epsilon_{l_1} \rvert)^{\frac{\tau}{2}}, \ \ \lvert f_{l_1}^{'}\rvert_{\frac{1}{l_2}}\leqslant \epsilon_{l_{1}}^{100}. \end{flalign*} Moreover, $A_{l_1}=e^{A_{l_1}''}$ with $\lVert A_{l_1}''\rVert \leqslant 2\epsilon_{l_{1}}^{\sigma}$. \end{itemize} In both cases, it is clear that $(\ref{estimBlj})$, $(\ref{estimBlj2})$, $(\ref{estimflj})$ and $(\ref{estisharp})$ are fulfilled. Note that the first step is a little special as it does not involve the composition of conjugation maps. Therefore, in order to provide a more explicit iteration process, let us show one more step before induction. \textbf{Second step:} We have $$ B_{l_1}(\theta+\alpha)(Ae^{f_{l_{2}}})B^{-1}_{l_1}(\theta)=A_{l_1}e^{f_{l_1}^{'}}+B_{l_1}(\theta+\alpha)(Ae^{f_{l_{2}}}-Ae^{f_{l_{1}}})B^{-1}_{l_1}(\theta). $$ We can rewrite that $$ A_{l_1}e^{f_{l_1}^{'}(\theta)}+B_{l_1}(\theta+\alpha)(Ae^{f_{l_{2}}(\theta)}-Ae^{f_{l_{1}}(\theta)})B^{-1}_{l_1}(\theta)=A_{l_1}e^{\widetilde{f_{l_1}}(\theta)}. $$ We pick $k>(D+2)\tau+2\geqslant (1+3s)(D\tau+\frac{1}{2})+2\tau+1.$ If the previous step is non-resonant, \begin{flalign*} \lvert \widetilde{f_{l_1}}(\theta)\rvert_{\frac{1}{l_{2}}}\leqslant & \lvert f_{l_1}^{'}(\theta)\rvert_{\frac{1}{l_{2}}}+\lVert A_{l_1}^{-1}\rVert\lvert B_{l_1}(\theta+\alpha)(Ae^{f_{l_{2}}(\theta)}-Ae^{f_{l_{1}}(\theta)})B^{-1}_{l_1}(\theta)\rvert_{\frac{1}{l_{2}}}\\ \leqslant & 4\epsilon_{l_{1}}^{3-\sigma}+ 2\lVert A\rVert^2\times2\times\frac{c}{(2\lVert A\rVert)^{\tilde{D}}l_1^{D\tau+\frac{1}{2}}l_{1}^{k-1}}\\ \leqslant & \epsilon_{l_2}\\ \leqslant & \epsilon_0^{'}(\frac{1}{l_{2}},\frac{1}{l_{3}}). \end{flalign*} If the previous step is resonant, \begin{flalign*} \lvert \widetilde{f_{l_1}}(\theta)\rvert_{\frac{1}{l_{2}}}\leqslant & \lvert f_{l_1}^{'}(\theta)\rvert_{\frac{1}{l_{2}}}+\lVert A_{l_1}^{-1}\rVert\lvert B_{l_1}(\theta+\alpha)(Ae^{f_{l_{2}}(\theta)}-Ae^{f_{l_{1}}(\theta)})B^{-1}_{l_1}(\theta)\rvert_{\frac{1}{l_{2}}}\\ \leqslant & \epsilon_{l_{1}}^{100}+ 128(\frac{\lVert A\rVert^3}{\kappa})(\frac{2}{\frac{1}{l_1}-\frac{1}{l_2}}\lvert \ln \epsilon_{l_1} \rvert)^{\tau}{\epsilon_{l_1}}^{- \frac{\frac{2}{l_2}}{\frac{1}{l_1}-\frac{1}{l_2}}}\frac{c}{(2\lVert A\rVert)^{\tilde{D}}l_1^{D\tau+\frac{1}{2}}l_{1}^{k-1}}\\ \leqslant & \epsilon_{l_2}\\ \leqslant & \epsilon_0^{'}(\frac{1}{l_{2}},\frac{1}{l_{3}}). \end{flalign*} Now for $(\alpha,A_{l_1}e^{\widetilde{f_{l_1}}(\theta)})$, we can apply Proposition \ref{prop1} again to get $\tilde{B}_{l_1}\in C^{\omega}_{\frac{1}{l_{3}}}(2{\mathbb T}^{d},$ $SL(2,{\mathbb R}))$, $A_{l_{2}}\in SL(2,{\mathbb R})$ and $f_{l_{2}}^{'}\in C^{\omega}_{\frac{1}{l_{3}}}({\mathbb T}^{d},sl(2,{\mathbb R}))$ such that \begin{equation}\label{second} \tilde{B}_{l_1}(\theta+\alpha)(A_{l_1}e^{\widetilde{f_{l_1}}(\theta)})\tilde{B}_{l_1}^{-1}(\theta)=A_{l_{2}}e^{f_{l_{2}}^{'}(\theta)}, \end{equation} which gives \begin{equation} B_{l_2}(\theta+\alpha)(Ae^{f_{l_2}(\theta)})B^{-1}_{l_2}(\theta)=A_{l_2}e^{f_{l_2}^{'}(\theta)}. \end{equation} Here $B_{l_2}(\theta)=\tilde{B}_{l_1}(\theta)\circ B_{l_1}(\theta)$. Before giving the precise estimates of each term, let us first introduce a Claim showing that all the resonant steps are separated. \begin{Claim}\label{cl2} We have $\epsilon_{l_{n_{j+1}}}<\epsilon^2_{l_{n_{j}}}, \forall j\in {\mathbb Z}^+$. \end{Claim} \begin{pf} It is enough to prove for $j=1$. By definition, we have $l_{n_{1}}$-th step is obtained by resonant case. Thus Theorem \ref{prop1} implies $\rho(A_{l_{n_{1}}})\leqslant 2\epsilon_{l_{n_{1}}}^{\sigma}$ and $\rho(A_{l_{n_{2}-1}})\leqslant 4\epsilon_{l_{n_{1}}}^{\sigma}$ since every step between $l_{n_{1}}$ and $l_{n_{2}}$ is non-resonant. By the resonant condition of $l_{n_{2}}$-th step, there exists a unique $n$ with $0<\lvert n\rvert \leqslant N_{l_{n_{2}}}$ such that \begin{equation}\label{resonant} \lvert 2\rho(A_{l_{n_{2}-1}})- \langle n,\alpha \rangle\rvert\leqslant \epsilon_{l_{n_{2}}}^{\sigma}. \end{equation} However, by the Diophantine condition of $\alpha$ and condition $(\ref{estf})$, we have $$ \lvert \langle n,\alpha\rangle\rvert \geqslant \frac{\kappa}{\lvert N_{l_{n_{2}}}\rvert^{\tau}}\geqslant 10\epsilon_{l_{n_{2}}}^{\frac{\sigma}{2}}. $$ If $\epsilon_{l_{n_{2}}}\geqslant\epsilon^2_{l_{n_{1}}}$, then $(\ref{resonant})$ yields contradiction. \end{pf} Now by Claim \ref{cl2}, we have (in the worst situation) \begin{flalign*} \lvert B_{l_2}(\theta)\rvert_{\frac{1}{l_{3}}} & \leqslant 64(\frac{\lVert A\rVert}{\kappa})(\frac{2}{\frac{1}{l_2}-\frac{1}{l_{3}}} \lvert \ln \epsilon_{l_2} \rvert)^{\tau}\times{\epsilon_{l_2}}^{-\frac{\frac{2}{l_{3}}}{\frac{1}{l_2}-\frac{1}{l_{3}}}}\leqslant\epsilon_{l_2}^{-\frac{\sigma}{2}-s}\\ \lVert B_{l_2}(\theta)\rVert_0 & \leqslant 64(\frac{\lVert A\rVert}{\kappa})(\frac{2}{\frac{1}{l_2}-\frac{1}{l_{3}}} \lvert \ln \epsilon_{l_2} \rvert)^{\tau}\leqslant \epsilon_{l_2}^{-\frac{\sigma}{2}}\\ \lvert f_{l_{2}}^{'}(\theta)\rvert_{\frac{1}{l_{3}}} & \leqslant \epsilon_{l_2}^{3-\sigma}, \ \ \lVert A_{l_j}\rVert \leqslant 2\lVert A\rVert. \end{flalign*} Thus $(\ref{estimBlj})$, $(\ref{estimBlj2})$ and $(\ref{estimflj})$ are fulfilled again. For $(\ref{estisharp})$, all three cases (1. there is no resonance, 2. the first step is resonant, 3. the second step is resonant) satisfy it. The discussion is similar to that in the induction step below, so we omit it here for simplicity. \textbf{Induction step:} Assume that for $l_n,n\leqslant \tilde{n}$, we already have $(\ref{estisharp})$ and \begin{equation} \label{estiln}B_{l_n}(\theta+\alpha)(Ae^{f_{l_n}(\theta)})B^{-1}_{l_n}(\theta)=A_{l_n}e^{f_{l_n}^{'}(\theta)}, \end{equation} with \begin{equation} \label{estima}\lvert B_{l_n}(\theta)\rvert_{\frac{1}{l_{n+1}}} \leqslant 64(\frac{\lVert A\rVert}{\kappa})(\frac{2}{\frac{1}{l_n}-\frac{1}{l_{n+1}}} \lvert \ln \epsilon_{l_n} \rvert)^{\tau}{\epsilon_{l_n}}^{-\frac{\frac{2}{l_{n+1}}}{\frac{1}{l_n}-\frac{1}{l_{n+1}}}} \triangleq \zeta_n^2 \leqslant \epsilon_{l_n}^{-\frac{\sigma}{2}-s}, \end{equation} \begin{equation}\label{estimb} \lVert B_{l_n}(\theta)\rVert_0 \leqslant 64(\frac{\lVert A\rVert}{\kappa})(\frac{2}{\frac{1}{l_n}-\frac{1}{l_{n+1}}} \lvert \ln \epsilon_{l_n} \rvert)^{\tau} \leqslant \epsilon_{l_n}^{-\frac{\sigma}{2}},\ \ \lvert f_{l_n}^{'}(\theta)\rvert_{\frac{1}{l_{n+1}}} \leqslant \epsilon_{l_n}^{3-\sigma}, \end{equation} and \begin{equation} \label{esta}\lVert A_{l_n}\rVert \leqslant 2\lVert A\rVert. \end{equation} Moreover, if the $n$-th step is obtained by the resonant case, we have \begin{equation} \label{estres}A_{l_n}=e^{A_{l_n}''}, \ \ \lVert A_{l_n}''\rVert <2\epsilon_{l_{n}}^{\sigma}. \end{equation} If the $n$-th step is obtained by the non-resonant case, we have \begin{equation} \label{estnon}\lVert A_{l_n}-A_{l_{n-1}}\rVert\leqslant 2\lVert A_{l_{n-1}}\rVert \epsilon_{l_{n}}. \end{equation} and \begin{equation} \label{estb}\lVert B_{l_n}\rVert_{\frac{1}{l_{n+1}}}\leqslant (1+\epsilon_{l_{n}}^{\frac{1}{2}})\lVert B_{l_{n-1}}\rVert_{\frac{1}{l_{n}}},\ \ \lVert B_{l_n}\rVert_{0}\leqslant (1+\epsilon_{l_{n}}^{\frac{1}{2}})\lVert B_{l_{n-1}}\rVert_{0}. \end{equation} Now by $(\ref{estiln})$, for $l_{n+1}, n=\tilde{n}$, we have $$ B_{l_n}(\theta+\alpha)(Ae^{f_{l_{n+1}}})B^{-1}_{l_n}(\theta)=A_{l_n}e^{f_{l_n}^{'}}+B_{l_n}(\theta+\alpha)(Ae^{f_{l_{n+1}}}-Ae^{f_{l_{n}}})B^{-1}_{l_n}(\theta). $$ In $(\ref{2.1})$, a simple summation implies \begin{equation}\label{ov} \lvert f_{l_{n+1}}(\theta)-f_{l_{n}}(\theta)\rvert_{\frac{1}{l_{n+1}}}\leqslant \frac{c}{(2\lVert A\rVert)^{\tilde{D}} l_1^{D\tau+\frac{1}{2}}l_{n}^{k-1}}, \end{equation} Moreover, $(\ref{2.1})$ also gives us \begin{equation}\label{ok} \lvert f_{l_{n+1}}(\theta)\rvert_{\frac{1}{l_{n+1}}} +\lvert f_{l_{n}}(\theta)\rvert_{\frac{1}{l_{n+1}}}\leqslant \frac{2c}{(2\lVert A\rVert)^{\tilde{D}} M^{D\tau+\frac{1}{2}}}. \end{equation} Thus if we rewrite that $$A_{l_n}e^{f_{l_n}^{'}(\theta)}+B_{l_n}(\theta+\alpha)(Ae^{f_{l_{n+1}}(\theta)}-Ae^{f_{l_{n}}(\theta)})B^{-1}_{l_n}(\theta)=A_{l_n}e^{\widetilde{f_{l_n}}(\theta)},$$ by $(\ref{estima})$, $(\ref{estimb})$, $(\ref{esta})$, $(\ref{ov})$ and $(\ref{ok})$ we obtain \begin{small} \begin{flalign*} \lvert \widetilde{f_{l_n}}(\theta)\rvert_{\frac{1}{l_{n+1}}}\leqslant & \lvert f_{l_n}^{'}(\theta)\rvert_{\frac{1}{l_{n+1}}}+\lVert A_{l_n}^{-1}\rVert\lvert B_{l_n}(\theta+\alpha)(Ae^{f_{l_{n+1}}(\theta)}-Ae^{f_{l_{n}}(\theta)})B^{-1}_{l_n}(\theta)\rvert_{\frac{1}{l_{n+1}}}\\ \leqslant & \epsilon_{l_{n}}^{3-\sigma}+ (\frac{\lVert A\rVert^4}{\kappa^2})(\frac{2}{\frac{1}{l_n}-\frac{1}{l_{n+1}}}\lvert \ln \epsilon_{l_n} \rvert)^{2\tau}{\epsilon_{l_n}}^{- \frac{\frac{4}{l_{n+1}}}{\frac{1}{l_n}-\frac{1}{l_{n+1}}}}\frac{2\times 64\times 64 c}{(2\lVert A\rVert)^{\tilde{D}}l_1^{D\tau+\frac{1}{2}}l_{n}^{k-1}}\\ \leqslant & \epsilon_{l_{n+1}}\\ \leqslant & \epsilon_0^{'}(\frac{1}{l_{n+1}},\frac{1}{l_{n+2}}). \end{flalign*} \end{small} Now for $(\alpha,A_{l_n}e^{\widetilde{f_{l_n}}(\theta)})$, we can apply Proposition \ref{prop1} again to get $\tilde{B}_{l_n}\in C^{\omega}_{\frac{1}{l_{n+2}}}(2{\mathbb T}^{d},$ $SL(2,{\mathbb R}))$, $A_{l_{n+1}}\in SL(2,{\mathbb R})$ and $f_{l_{n+1}}^{'}\in C^{\omega}_{\frac{1}{l_{n+2}}}({\mathbb T}^{d},sl(2,{\mathbb R}))$ such that $$ \tilde{B}_{l_n}(\theta+\alpha)(A_{l_n}e^{\widetilde{f_{l_n}}(\theta)})\tilde{B}_{l_n}^{-1}(\theta)=A_{l_{n+1}}e^{f_{l_{n+1}}^{'}(\theta)}, $$ with $$\lvert f_{l_{n+1}}^{'}(\theta)\rvert_{\frac{1}{l_{n+2}}}\leqslant \epsilon_{l_{n+1}}^{3-\sigma}.$$ Denote $B_{l_{n+1}}:=\tilde{B}_{l_n}B_{l_{n}} \in C^{\omega}_{\frac{1}{l_{n+2}}}(2{\mathbb T}^{d},SL(2,{\mathbb R}))$, by Claim \ref{cl2}, we have (in the worst situation) \begin{flalign*} \lvert B_{l_{n+1}}(\theta)\rvert_{\frac{1}{l_{n+2}}}&\leqslant \zeta_{n+1}^{1+\frac{1}{2}+(\frac{1}{2})^2+(\frac{1}{2})^3+\cdots+(\frac{1}{2})^n+\cdots}\\ &\leqslant \zeta_{n+1}^2\\ &\leqslant 64(\frac{\lVert A\rVert}{\kappa})(\frac{2}{\frac{1}{l_{n+1}}-\frac{1}{l_{n+2}}} \lvert \ln \epsilon_{l_{n+1}} \rvert)^{\tau}\times{\epsilon_{l_{n+1}}}^{-\frac{\frac{2}{l_{n+2}}}{\frac{1}{l_{n+1}}-\frac{1}{l_{n+2}}}} \\ &\leqslant \epsilon_{l_{n+1}}^{-\frac{\sigma}{2}-s}. \end{flalign*} and $$ \lVert B_{l_{n+1}}(\theta) \rVert_0\leqslant 64(\frac{\lVert A\rVert}{\kappa})(\frac{2}{\frac{1}{l_{n+1}}-\frac{1}{l_{n+2}}} \lvert \ln \epsilon_{l_{n+1}} \rvert)^{\tau}\leqslant \epsilon_{l_{n+1}}^{-\frac{\sigma}{2}}. $$ For the remaining estimates, we distinguish two cases. If the $(n+1)$-th step is in the resonant case, we have $$ A_{l_{n+1}}=e^{A_{l_{n+1}}''}, \ \ \lVert A_{l_{n+1}}''\rVert < 2\epsilon_{l_{{n+1}}}^{\sigma}, \ \ \lVert A_{l_{n+1}}\rVert\leqslant 1+2\epsilon_{l_{{n+1}}}^{\sigma}\leqslant 2\lVert A\rVert. $$ Then there exists unitary $U\in SL(2,{\mathbb C})$ such that \begin{equation} \label{estt}UA_{l_{n+1}}U^{-1}=\begin{pmatrix} e^{\gamma_{n+1}} & c_{n+1}\\ 0 & e^{-\gamma_{n+1}} \end{pmatrix}, \end{equation} with $\lvert c_{n+1}\rvert\leqslant 2\lVert A_{l_{n+1}}''\rVert \leqslant 4\epsilon_{l_{{n+1}}}^{\sigma}$. Thus $(\ref{estisharp})$ is fulfilled because \begin{equation}\label{non1} \lVert B_{l_{n+1}}(\theta) \rVert_0^2\lvert c_{n+1}\rvert\leqslant 4. \end{equation} If it is in the non-resonant case, one traces back to the resonant step $j$ which is closest to $n+1$. If $j$ exists, by $(\ref{estima})$ and $(\ref{estres})$ we have $$ \lvert B_{l_j}(\theta)\rvert_{\frac{1}{l_{j+1}}}\leqslant \epsilon_{l_j}^{-\frac{\sigma}{2}-s},\ \ \lVert B_{l_j}(\theta)\rVert_0\leqslant \epsilon_{l_j}^{-\frac{\sigma}{2}}, $$ $$ A_{l_j}=e^{A_{l_j}''}, \ \ \lVert A_{l_j}''\rVert < 2\epsilon_{l_{j}}^{\sigma}, \ \ \lVert A_{l_j}\rVert \leqslant 1+2\epsilon_{l_{j}}^{\sigma}. $$ By our choice of $j$, from $j$ to $n+1$, every step is non-resonant. Thus by $(\ref{estnon})$ we obtain \begin{equation} \label{estnn}\lVert A_{l_{n+1}}- A_{l_j}\rVert\leqslant 2\epsilon_{l_j}^{\frac{1}{2}}, \end{equation} so $$ \lVert A_{l_{n+1}}\rVert \leqslant 1+2\epsilon_{l_{j}}^{\sigma}+ 2\epsilon_{l_j}^{\frac{1}{2}}\leqslant 2\lVert A\rVert. $$ Estimate $(\ref{estnn})$ implies that if we rewrite $A_{l_{n+1}}=e^{A_{l_{n+1}}''}$, then $$ \lVert A_{l_{n+1}}''\rVert \leqslant 4\epsilon_{l_{j}}^{\sigma}. $$ Moreover, by $(\ref{estb})$, we have $$ \lVert B_{l_{n+1}}(\theta)\rVert_0 \leqslant \sqrt{2}\lvert B_{l_j}(\theta)\rvert_0 \leqslant \sqrt{2}\epsilon_{l_j}^{-\frac{\sigma}{2}}. $$ Similarly to the process of $(\ref{estt})$, $(\ref{estisharp})$ is fulfilled because \begin{equation}\label{non2} \lVert B_{l_{n+1}}(\theta)\rVert_0^2 \lvert c_{n+1}\rvert\leqslant 8. \end{equation} If $j$ vanishes, it immediately implies that from $1$ to $n+1$, each step is non-resonant. In this case, $\lVert A_{l_{n+1}}\rVert \leqslant 2\lVert A\rVert$ and the estimate $(\ref{estisharp})$ is naturally satisfied as $$\lVert B_{l_{n+1}}(\theta)\rVert_{\frac{1}{l_{n+1}}}\leqslant 2.$$ \end{pf} Now, we are ready to show the quantitative almost reducibility theorem for $C^{k}$ quasi-periodic $SL(2,{\mathbb R})$ cocycles. \begin{Theorem}\label{thm3} Let $\alpha\in {\rm DC}(\kappa,\tau)$, $\sigma<\frac{1}{6}$, $A\in SL(2,{\mathbb R})$, $f\in C^k({\mathbb T}^{d},sl(2,{\mathbb R}))$ with $k>(D+2)\tau+2$, there exists $\epsilon_1=\epsilon_1(\kappa,\tau,d,k,\lVert A\rVert,\sigma)$ such that if $\lVert f\rVert_k\leqslant \epsilon_1$ then $(\alpha , Ae^{f(\theta)})$ is $C^{k,k_0}$ almost reducible with $k_0\in{\mathbb N}$, $k_0\leqslant \frac{k-2\tau-1.5}{1+s}$. Moreover, if we further assume $(\alpha , Ae^{f(\theta)})$ is not uniformly hyperbolic, then there exists $B_{l_j}\in C^{\omega}_{\frac{1}{l_{j+1}}}(2{\mathbb T}^{d}$, $SL(2,{\mathbb C}))$, $A_{l_j}\in SL(2,{\mathbb C})$, $\tilde{F}^{'}_{l_j}\in C^{k}({\mathbb T}^{d}$, $gl(2,{\mathbb C}))$, such that $$ B_{l_j}(\theta+\alpha)(Ae^{f(\theta)})B^{-1}_{l_j}(\theta)=A_{l_j}+\tilde{F}^{'}_{l_j}(\theta) $$ with $$\lVert B_{l_j}(\theta)\rVert_0\leqslant \epsilon_{l_j}^{-\frac{\sigma}{2}},\ \ \lVert \tilde{F}^{'}_{l_j}(\theta)\rVert_0\leqslant \epsilon_{l_j}^{\frac{1}{4}}$$ and $A_{l_j}=\begin{pmatrix} e^{\gamma_j} & c_j\\ 0 & e^{-\gamma_j} \end{pmatrix}$ with estimate \begin{equation}\label{ess} \lVert B_{l_j}(\theta)\rVert_0^2 \lvert c_j\rvert\leqslant 8\lVert A\rVert, \end{equation} where $\gamma_j\in i{\mathbb R}$ and $c_j \in {\mathbb C}$. \end{Theorem} \begin{pf} We first deal with the $C^0$ estimate. By Proposition $\ref{pro33}$, we have for any $l_j$, $j\in {\mathbb N}^+$: $$ B_{l_j}(\theta+\alpha)(Ae^{f_{l_j}(\theta)})B^{-1}_{l_j}(\theta)=A_{l_j}e^{f_{l_j}^{'}(\theta)}, $$ thus $$ B_{l_j}(\theta+\alpha)(Ae^{f(\theta)})B^{-1}_{l_j}(\theta)=A_{l_j}e^{f_{l_j}^{'}(\theta)}+B_{l_j}(\theta+\alpha)(Ae^{f(\theta)}-Ae^{f_{l_j}(\theta)})B^{-1}_{l_j}(\theta). $$ Denote \begin{equation}\label{quat1} A_{l_j}+\tilde{F}_{l_j}(\theta)=A_{l_j}e^{f_{l_j}^{'}(\theta)}+B_{l_j}(\theta+\alpha)(Ae^{f(\theta)}-Ae^{f_{l_j}(\theta)})B^{-1}_{l_j}(\theta). \end{equation} In $(\ref{2.1})$, by a simple summation we get \begin{equation}\label{quat2} \lVert f(\theta)-f_{l_j}(\theta)\rVert_0\leqslant \frac{c}{(2\lVert A\rVert)^{\tilde{D}}l_1^{D\tau+\frac{1}{2}}l_{j}^{k-1}}, \end{equation} and \begin{equation}\label{quat3} \lVert f(\theta)\rVert_0+\lVert f_{l_j}(\theta)\rVert_0\leqslant \frac{c}{(2\lVert A\rVert)^{\tilde{D}}M^{D\tau+\frac{1}{2}}}+\frac{c}{(2\lVert A\rVert)^{\tilde{D}}C'M^{D\tau+\frac{1}{2}}}. \end{equation} Proposition $\ref{pro33}$ also gives the estimates \begin{equation}\label{quat4} \lVert B_{l_j}(\theta)\rVert_0\leqslant 64(\frac{\lVert A\rVert}{\kappa})(\frac{2}{\frac{1}{l_j}-\frac{1}{l_{j+1}}} \lvert \ln \epsilon_{l_j} \rvert)^{\tau} \leqslant \epsilon_{l_{j}}^{-\frac{\sigma}{2}} \end{equation} \begin{equation}\label{quat5} \lvert f_{l_j}^{'}(\theta)\rvert_{\frac{1}{l_{j+1}}}\leqslant\epsilon_{l_j}^{3-\sigma}, \end{equation} and \begin{equation}\label{quat6} \lVert A_{l_j}\rVert\leqslant 2\lVert A\rVert. \end{equation} Thus by $(\ref{quat1})-(\ref{quat5})$, we have \begin{flalign}\label{Festi} \lVert \tilde{F}_{l_j}(\theta)\rVert_0 \leqslant & \lVert A_{l_j}f_{l_j}^{'}(\theta)\rVert_0+\lVert B_{l_j}(\theta+\alpha)(Ae^{f(\theta)}-Ae^{f_{l_j}(\theta)})B^{-1}_{l_j}(\theta)\rVert_0 \\ \leqslant &\lVert A\rVert\epsilon_{l_j}^{3-\sigma}+(\frac{\lVert A\rVert^3}{\kappa^2})(\frac{2}{\frac{1}{l_j}-\frac{1}{l_{j+1}}} \lvert \ln \epsilon_{l_j} \rvert)^{2\tau}\times\frac{64\times64c}{(2\lVert A\rVert)^{\tilde{D}}l_1^{D\tau+\frac{1}{2}}l_{j}^{k-1}}\nonumber\\ \leqslant & \epsilon_{l_j}^{1+s} \nonumber. \end{flalign} Now let us prove estimate $(\ref{ess})$. Note that Proposition \ref{pro33} implies that we only need to rule out the possibility that $\gamma_j\in {\mathbb R} \backslash \{0\}$. Assume that $spec(A_{l_j})=\{e^{\lambda_j},e^{-\lambda_j}\}, \lambda_j\in {\mathbb R} \backslash \{0\}$. If $\lvert\lambda_j\rvert>\epsilon_{l_j}^{\frac{1}{4}}$, Assume that $spec(A_{l_j})=\{e^{\lambda_j},e^{-\lambda_j}\}, \lambda_j\in {\mathbb R} \backslash \{0\}$, then there exists $P\in SO(2,{\mathbb R})$ such that $$ PA_{l_j}P^{-1}=\begin{pmatrix} e^{\lambda_j} & c_j \\ 0 & e^{-\lambda_j}\end{pmatrix}, $$ with $\lvert c_j \rvert \leqslant \lVert A_{l_j}\rVert\leqslant 2\lVert A\rVert$. If $\lvert\lambda_j\rvert>\epsilon_{l_j}^{\frac{1}{4}}$, Set $B=diag\{ \lVert 4A\rVert^{-3}\epsilon_{l_j}^{\frac{1}{4}}, \lVert 4A\rVert^{3} \epsilon_{l_j}^{-\frac{1}{4}} \}$, then \begin{equation}\label{123} BP(A_{l_j}+\tilde{F}_{l_j}(\theta))P^{-1}B^{-1}=\begin{pmatrix} e^{\lambda_j} & 0 \\ 0 & e^{-\lambda_j}\end{pmatrix}+ F(\theta), \end{equation} where $\lVert F(\theta)\rVert_0 \leqslant \frac{\epsilon_{l_j}^{\frac{1}{2}}}{C\lVert A\rVert^5}$. We rewrite $$ \begin{pmatrix} e^{\lambda_j} & 0 \\ 0 & e^{-\lambda_j}\end{pmatrix}+ F(\theta)=\begin{pmatrix} e^{\lambda_j} & 0 \\ 0 & e^{-\lambda_j}\end{pmatrix}e^{\tilde{f}(\theta)} $$ with $\lVert \tilde{f}(\theta)\rVert_0\leqslant \frac{\epsilon_{l_j}^{\frac{1}{2}}}{C\lVert A\rVert^4}$. Then by Remark $\ref{rem2}$ and Corollary 3.1 of \cite{houyou}, one can conjugate $(\ref{123})$ to \begin{equation}\label{uh} \begin{pmatrix} e^{\lambda_j} & 0 \\ 0 & e^{-\lambda_j}\end{pmatrix}\begin{pmatrix} e^{\tilde{f}^{re}(\theta)} & 0 \\ 0 & e^{-\tilde{f}^{re}(\theta)}\end{pmatrix}=\begin{pmatrix} e^{\lambda_j}e^{\tilde{f}^{re}(\theta)} & 0 \\ 0 & e^{-\lambda_j}e^{-\tilde{f}^{re}(\theta)}\end{pmatrix} \end{equation} with $\lVert \tilde{f}^{re}(\theta)\rVert_0 \leqslant \frac{\epsilon_{l_j}^{\frac{1}{2}}}{C\lVert A\rVert^2}$. Therefore $(\alpha , Ae^{f(\theta)})$ is uniformly hyperbolic, which contradicts our assumption. Now we only need to consider $\lvert\lambda_j\rvert \leqslant \epsilon_{l_j}^{\frac{1}{4}}$. In this case, we put $\lambda_j$ into the perturbation so that the new perturbation satisfies $\lVert \tilde{F}^{'}_{l_j} \rVert_0\leqslant \epsilon_{l_j}^{\frac{1}{4}}$ and $$ A_{l_j}=\begin{pmatrix} 1 & c_j \\ 0 & 1\end{pmatrix}. $$ Now let us deal with the differentiable almost reducibility. By Cauchy estimates, for $k_0 \in {\mathbb N}$ with $k_0\leqslant k $ and $n\in {\mathbb N}$ with $n\geqslant j$, we have \begin{flalign*} &\lVert B_{l_j}(\theta+\alpha)(Ae^{f_{{l_{n+1}}}(\theta)}-Ae^{f_{l_n}(\theta)})B^{-1}_{l_j}(\theta)\rVert_{k_0}\\ \leqslant &\sup_{\substack{ \lvert l\rvert \leqslant k_0, \theta \in {\mathbb T}^{d} }}\lVert (\partial_{\theta_1}^{l_1}\cdots\partial_{\theta_d}^{l_d})(B_{l_j}(\theta+\alpha)(Ae^{f_{l_{n+1}}(\theta)}-Ae^{f_{l_{n}}(\theta)})B^{-1}_{l_j}(\theta))\rVert \\ \leqslant & (k_0)!(l_{n+1})^{k_0}\lvert B_{l_j}(\theta+\alpha)(Ae^{f_{l_{n+1}}(\theta)}-Ae^{f_{l_{n}}(\theta)})B^{-1}_{l_j}(\theta)\rvert_{\frac{1}{l_{n+1}}}\\ \leqslant & (k_0)!(l_{n})^{(1+s)k_0}(\frac{\lVert A\rVert^3}{\kappa^2})(\frac{2}{\frac{1}{l_n}-\frac{1}{l_{n+1}}} \lvert \ln \epsilon_{l_n} \rvert)^{2\tau}{\epsilon_{l_n}}^{-\frac{\frac{4}{l_{n+1}}}{\frac{1}{l_n}-\frac{1}{l_{n+1}}}}\frac{64\times 64c}{(2\lVert A\rVert)^{\tilde{D}}l_1^{D\tau+\frac{1}{2}}l_{n}^{k-1}} \\ \leqslant & \frac{C_1}{l_n^{k-(1+s)k_0-2\tau-2s(D\tau+\frac{1}{2})-1}} \end{flalign*} where $C_1$ is independent of $j$. By a simple summation we get $$ \lVert B_{l_j}(\theta+\alpha)(Ae^{f(\theta)}-Ae^{f_{l_j}(\theta)})B^{-1}_{l_j}(\theta)\rVert_{k_0}\leqslant \frac{2C_1}{l_j^{k-(1+s)k_0-2\tau-2s(D\tau+\frac{1}{2})-1}}. $$ Similarly by Cauchy estimates, we have \begin{flalign*} \lVert f_{l_j}^{'}(\theta)\rVert_{k_0}& \leqslant (k_0)!(l_{j+1})^{k_0}\lvert f_{l_j}^{'}(\theta)\rvert_{\frac{1}{l_{j+1}}}\\ &\leqslant (k_0)!(l_{j})^{(1+s)k_0}\times \epsilon_{l_j}^{3-\sigma}\\ &\leqslant (k_0)!(l_{j})^{(1+s)k_0}\times (\frac{c}{(2\lVert A\rVert)^{\tilde{D}} {l_j}^{D\tau+\frac{1}{2}}})^{3-\sigma}\\ &\leqslant \frac{C_2}{l_j^{(D\tau+\frac{1}{2})(3-\sigma)-(1+s)k_0}} \end{flalign*} where $C_2$ is independent of $j$. Thus we have \begin{flalign}\label{festi} \lVert \tilde{F}_{l_j}(\theta)\rVert_{k_0} &\leqslant \lVert A_{l_j}f_{l_j}^{'}(\theta)\rVert_{k_0}+\lVert B_{l_j}(\theta+\alpha)(Ae^{f(\theta)}-Ae^{f_{l_j}(\theta)})B^{-1}_{l_j}(\theta)\rVert_{k_0}\\ &\leqslant \frac{C_3}{l_j^{(D\tau+\frac{1}{2})(3-\sigma)-(1+s)k_0}}+\frac{2C_1}{l_j^{k-(1+s)k_0-2\tau-2s(D\tau+\frac{1}{2})-1}}. \nonumber \end{flalign} Note that although we write $k>(D+2)\tau+2$ in the assumption, we simply choose $k=[(D+2)\tau+2]+1$ in the actual operation process. So the quantity of $k$ is totally determined by $D$. Here ``$[x]$'' stands for the integer part of $x$. So if $k_0\leqslant \frac{k-2\tau-\frac{3}{2}}{1+s}$, then $$ \lVert \tilde{F}_{l_j}(\theta)\rVert_{k_0}\leqslant \frac{C_4}{l_j^{\frac{1}{6}}}, $$ which immediately shows that $$\lim_{j \to +\infty}\lVert \tilde{F}_{l_j}(\theta)\rVert_{k_0}=0.$$ It means precisely that $(\alpha , Ae^{f(\theta)})$ is $C^{k,k_0}$ almost reducible. This finishes the proof of Theorem \ref{thm3}. \end{pf} \begin{Remark} In view of Corollary 3.1 in \cite{CCYZ}, we have $L(\alpha, Ae^{f(\theta)})=0$. \end{Remark} \begin{Remark}\label{re3.5} The norm of the conjugation map $B_{l_j}$ can be adjusted easily by the variation of the parameters. More precisely, if we assume $D>\frac{t}{\sigma}$ with $t\geqslant 2$, then by the proof of Claim \ref{cl2} we have $\epsilon_{l_{n_{j+1}}}<\epsilon^t_{l_{n_{j}}}, \forall j\in {\mathbb Z}^+$ and $$ \lVert B_{l_j}(\theta)\rVert_0\leqslant \epsilon_{l_j}^{-\frac{\sigma}{2t}\sum_{j=0}^{\infty}\frac{1}{t^j}}. $$ This is quite useful for spectral applications. In certain cases, we need to reduce $B_{l_j}$ at the cost of enlarging $D$, i.e. the initial regularity $k$ increases. \end{Remark} In order to obtain the $\frac{1}{2}$-H\"{o}lder continuity of the Lyapunov exponent, we have to assume $D>\frac{5}{2\sigma}$ so that $\lVert B_{l_j}(\theta)\rVert_0\leqslant \epsilon_{l_j}^{-\frac{\sigma}{3}}$. Recall that the restriction on $\sigma$ is ``$\sigma<\frac{1}{6}$''. In order to make the initial regularity $k$ small, we need to fix $\sigma$ sufficiently close to $\frac{1}{6}$ in the beginning. By Theorem \ref{thm3} and the Proof of Theorem 1.1 in \cite{CCYZ}, we have \begin{Theorem}\label{thm1} Let $\alpha \in {\rm DC}(\kappa,\tau)$, if $(\alpha, A)$ is $C^{k^{'},k}$ almost reducible with $k^{'}>k> 17\tau+2$, then for any continuous map $B:{\mathbb T}^{d} \rightarrow SL(2,{\mathbb C})$, we have \begin{equation}\label{holder} \lvert L(\alpha, A)-L(\alpha, B)\rvert \leqslant C\lVert B-A\rVert_0^{\frac{1}{2}}, \end{equation} where $C$ is a constant depending on $d,\kappa,\tau,A,k$. \end{Theorem} \begin{pf} The proof is almost the same as that in \cite{CCYZ}, with the only difference that the interval $I_j$ becomes: $C\epsilon_{l_j}^{\frac{1}{4}}\leqslant \epsilon \leqslant c{\epsilon_{l_j}^{\frac{2}{9}}}$. Here $C,c$ are two constants depending on $d,\kappa,\tau, A$. It is clear that all the small $\epsilon$ tending to zero can be covered by the interval $\{I_j\}_{j\geqslant 1}$ since $l_{j+1}=l_j^{1+s}$, $0<s\leqslant \frac{1}{6D\tau+3}$. \end{pf} Similarly, by Theorem \ref{thm3} and the Proof of Theorem 1.2 in \cite{CCYZ}, we have \begin{Theorem}\label{cor1} Let $\alpha \in {\rm DC}(\kappa,\tau)$, $V\in C^{k}({\mathbb T}^{d},{\mathbb R})$ with $k>17\tau+2$, then there exists $\lambda_{0}$ depending on $V,d,\kappa,\tau,k$ such that if $\lambda<\lambda_0$, then we have the following: \begin{enumerate} \item For any $E\in{\mathbb R}$, $(\alpha,S_E^{\lambda V})$ is $C^{k,k_0}$ almost reducible with $k_0\leq k-2\tau-2$. \item $N_{\lambda V,\alpha}$ is $1/2$-H\"older continuous: $$ N(E+\epsilon)-N(E-\epsilon)\leqslant C_0\epsilon^{\frac{1}{2}}, \, \forall\, \epsilon>0, \,\forall \,E\in {\mathbb R}, $$ where $C_0$ depends only on $d,\kappa,\tau,k$. \end{enumerate} \end{Theorem} \begin{Remark} In fact for $(1)$, by Theorem \ref{thm3} we only require $k$ to be larger than $14\tau+2$ since $D>\frac{2}{\sigma}$ is enough for almost reducibility, which gives Theorem \ref{thm1.2}. \end{Remark} \subsection{Applications to Schr\"{o}dinger cocycles} For our purpose, we will apply our $C^k$ almost reducibility theorem on a special type of $C^k$ quasi-periodic $SL(2,{\mathbb R})$ cocycles: Schr\"{o}dinger cocycle $(\alpha, S_E^{\lambda V})$, where \begin{equation} S_E^{\lambda V}(\theta)=\begin{pmatrix} E-\lambda V(\theta) & -1 \\ 1 & 0 \end{pmatrix}. \end{equation} For the sake of unification, let us rewrite $S_E^{\lambda V}(\theta)=Ae^{f(\theta)}$ where $$ A=\begin{pmatrix} E & -1 \\ 1 & 0 \end{pmatrix}. $$ In the following, the assumptions of Theorem \ref{thm3} are always fulfilled by assuming the small condition on $\lambda$ in Theorem \ref{main}. It gives that $(\alpha, S_E^{\lambda V})$ is $C^{k,k_0}$ almost reducible for all $E\in {\mathbb R}$, particularly for $E\in \Sigma$. Now let us divide $\Sigma$ into countable sets of energy $E$ in the following way. For $m\in {\mathbb Z}^+$, define \begin{equation}\label{def1} K_m=\{E\in\Sigma \mid (\alpha, S_E^{\lambda V}) \, \mbox{has a resonance at $m$-th step} \}. \end{equation} Moreover, define $$ K_0=\{E\in\Sigma \mid (\alpha, S_E^{\lambda V}) \, \mbox{is reducible} \}, $$ then we have $$ \Sigma=\displaystyle\bigcup_{m=0}^{\infty}K_m. $$ When the resonance occurs, we can depict each $K_m$ more precisely by the rotation number of $(\alpha, S_E^{\lambda V})$ and we denoted it by $\rho(E)$ for convenience. \begin{Lemma}\label{rotation} Assume $E\in K_m,\, m\geqslant 1$, there exists $n\in {\mathbb Z}^d$ with $0<\lvert n\rvert \leqslant N_m$ such that $$ \lvert 2\rho(E)-\langle n,\alpha \rangle\rvert_{{\mathbb T}} \leqslant 5\epsilon_{l_m}^{\sigma}. $$ where $N_m=5l_{m}\ln\frac{1}{\epsilon_{l_m}}$. \end{Lemma} \begin{pf} By Theorem \ref{prop1} and Theorem \ref{thm3}, if $E\in K_m$, then by the definition of the resonant case we have \begin{equation}\label{11} \lvert 2\rho(\alpha, A_{l_{m-1}})- \langle n',\alpha \rangle \rvert_{{\mathbb T}} \leqslant \epsilon_{l_m}^{\sigma}, \end{equation} for some $n'\in {\mathbb Z}^d$ satisfying $0<\lvert n'\rvert\leqslant N=\frac{2}{\frac{1}{l_m}-\frac{1}{l_{m+1}}} \lvert \ln \epsilon_{l_m} \rvert$ (note that $A_{l_0}=A$). In addition, after doing this resonant step, by $(\ref{constant})$ we have \begin{equation}\label{12} \lvert \rho(\alpha, A_{l_{m}})\rvert \leqslant \lVert A_{l_{m}}^{''}\rVert \leqslant 2\epsilon_{l_m}^{\sigma}. \end{equation} Moreover, formula $(\ref{degpro})$ gives \begin{equation}\label{13} \rho(E)+\frac{\langle \deg B_{l_m},\alpha \rangle}{2}=\rho(\alpha, A_{l_m}+\tilde{F}_{l_m}(\theta)). \end{equation} By the properties of rotation number and $(\ref{Festi})$, there exists a numerical constant $c$ such that \begin{equation}\label{14} \lvert \rho(\alpha, A_{l_m}+\tilde{F}_{l_m}(\theta))-\rho(\alpha, A_{l_m})\rvert \leqslant c \lVert\tilde{F}_{l_m}(\theta)\rVert_0^{\frac{1}{2}}\leqslant c \epsilon_{l_m}^{\frac{1+s}{2}}. \end{equation} Denote $\rho(E)+\frac{\langle \deg B_{l_m},\alpha \rangle}{2}-\rho(\alpha, A_{l_m})=\ast$, then by $(\ref{11})$-$(\ref{14})$, we have \begin{flalign*} &\lvert \rho(E)+\frac{\langle \deg B_{l_m},\alpha \rangle}{2}\rvert_{{\mathbb T}}\\ =&\lvert \rho(E)+\frac{\langle \deg B_{l_m},\alpha \rangle}{2}-\rho(\alpha, A_{l_m})+\rho(\alpha, A_{l_m})\rvert_{{\mathbb T}}\\ =&\lvert \ast+\rho(\alpha, A_{l_m})\rvert_{{\mathbb T}}\\ \leqslant & c \epsilon_{l_m}^{\frac{1+s}{2}}+2\epsilon_{l_m}^{\sigma}\\ \leqslant & \frac{5}{2}\epsilon_{l_m}^{\sigma}. \end{flalign*} By Claim \ref{cl2} and Remark \ref{re3.5}, for $t\geqslant 2$, we have $$ \lvert \deg B_{l_m}\rvert\leqslant N\times\sum_{j=0}^{\infty}\frac{1}{t^j}\leqslant 5l_{m}\ln\frac{1}{\epsilon_{l_m}}, $$ if we denote $N_m=5l_{m}\ln\frac{1}{\epsilon_{l_m}}$, the result follows immediately. \end{pf} In order to make more preparations, we denote the transfer matrices by \begin{equation}\label{transfer} A_n(E,\theta)=\prod\limits_{j=n-1}^0 S_E^{\lambda V}(\theta+j\alpha). \end{equation} We will show that nice quantitative almost reducibility indicates nice control on the growth of $A_n$ on each $K_m, \, m\geqslant 1$ (as will be shown in Section 4, we do not need to estimate things on $K_0$ since it is transcendentally excluded in the proof of purely absolutely continuous spectrum). \begin{Lemma}\label{chosen} Assume $k>35\tau+2$, then for every $E\in K_m, m\geqslant 1$, we have $\sup_{0\leqslant s\leqslant c\epsilon_{l_m}^{-1+\frac{\sigma}{2}}}\lVert A_s\rVert_0\leqslant \epsilon_{l_m}^{-\frac{2\sigma}{9}}$, where $c$ is a universal constant. \end{Lemma} \begin{pf} For $E\in K_m, m\geqslant 1$, $(\alpha, S_E^{\lambda V})$ has a resonance at $m$-th step. By the resonant estimates $(\ref{tildea})$-$(\ref{constm})$ of Theorem \ref{prop1}, Theorem \ref{thm3} and Remark \ref{re3.5}, if $D>\frac{11}{2\sigma}$ (thus we assume $k>35\tau+2$), then there exist $B_{l_{m}}\in C^{\omega}_{\frac{1}{l_{m+1}}}(2{\mathbb T}^{d},SL(2,{\mathbb C}))$, $A_{l_{m}}\in SL(2,{\mathbb C})$ and $\tilde{F}^{'}_{l_{m}}\in C^{k_0}({\mathbb T}^{d},sl(2,{\mathbb C}))$ such that $$ B_{l_{m}}(\theta+\alpha)(Ae^{f(\theta)})B^{-1}_{l_{m}}(\theta)=A_{l_{m}}+\tilde{F}^{'}_{l_{m}}(\theta), $$ with $$ \lVert B_{l_{m}}(\theta)\rVert_0\leqslant \epsilon_{l_{m}}^{-\frac{\sigma}{9}}, \, A_{l_{m}}=\begin{pmatrix} e^{\gamma_{m}} & 0\\ 0 & e^{-\gamma_{m}} \end{pmatrix}, \lVert \tilde{F}^{'}_{l_{m}}(\theta)\rVert_{0} \leqslant \epsilon_{l_{m}}^{1-\frac{\sigma}{2}}+\epsilon_{l_{m}}^{1+s}, $$ where ``$\epsilon_{l_{m}}^{1-\frac{\sigma}{2}}$'' is the upper bound of the off-diagonal's norm, see $(\ref{D})$ and ``$\epsilon_{l_{m}}^{1+s}$'' corresponds to the quantity of the perturbation, see $(\ref{Festi})$. Moreover, we have $\gamma_{m}\in i{\mathbb R}$. Then we easily conclude $$ \sup_{0\leqslant s\leqslant c\epsilon_{l_m}^{-1+\frac{\sigma}{2}}}\lVert A_s\rVert_0\leqslant \lVert B_{l_{m}}(\theta)\rVert_0^2 \leqslant \epsilon_{l_m}^{-\frac{2\sigma}{9}}. $$ \end{pf} \section{Spectral application: absolutely continuous spectrum} With the dynamical estimates in hand, we can prove our main theorem easily. Let us cite the well known result shown by Gilbert-Pearson \cite{GP}. \begin{Theorem}\label{gp}\cite{GP} Let $\mathcal{B}$ be the set of $E\in{\mathbb R}$ such that the cocycle $(\alpha,S_E^{V})$ is bounded. Then $\mu_{V,\alpha,\theta}\vert \mathcal{B}$ is absolutely continuous for all $\theta\in{\mathbb R}$. \end{Theorem} Besides, let us recall two convenient results proved by Avila \cite{A01}. \begin{Theorem}\label{avi}\cite{A01} We have $\mu(E-\epsilon, E+\epsilon)\leqslant C\epsilon\sup_{0\leqslant s\leqslant C\epsilon^{-1}}\lVert A_s\rVert_0^2$, where $C>0$ is a universal constant. \end{Theorem} \begin{Theorem}\label{avi2}\cite{A01} If $E\in \Sigma$ then for $0<\epsilon<1$, $N(E+\epsilon)-N(E-\epsilon)\geqslant c\epsilon^{\frac{3}{2}}$, where $c>0$ is a universal constant. \end{Theorem} \begin{Remark}\label{rm4.1} The proof of Theorem \ref{avi2} requires the $\frac{1}{2}$-H\"{o}lder continuity of the integrated density of states in our case, which is ensured by Theorem \ref{cor1}. \end{Remark} \subsection{Proof of Theorem \ref{main}} \begin{pf} Denote $\mathcal{B}$ the set of $E\in\Sigma$ such that $(\alpha,S_E^{\lambda V})$ is bounded. Denote $\mathcal{R}$ be the set of $E\in\Sigma$ such that $(\alpha,S_E^{\lambda V})$ is reducible. Then Theorem \ref{gp} ensure that we only need to prove $\mu(\Sigma\backslash \mathcal{B})=0$ for $\mu=\mu_{\lambda V,\alpha,\theta}$, $\theta\in {\mathbb R}$. Note that $\mathcal{R}\backslash \mathcal{B}$ has only $E$ such that $(\alpha,S_E^{\lambda V})$ is reducible to parabolic. By the Gap Labeling Theorem \cite{BLT,MP}, for any $E\in \mathcal{R}\backslash \mathcal{B}$, there exists a unique $m\in {\mathbb Z}^d$ such that $2\rho(\alpha, S_E^{\lambda V})\equiv{\langle m,\alpha\rangle} \mod 2\pi{\mathbb Z}$, which shows $\mathcal{R}\backslash \mathcal{B}$ is countable. Moreover, if $E\in \mathcal{R}$, then any non-zero solution $H_{\lambda V,\alpha,\theta}u=Eu$ satisfies $\inf_{n\in {\mathbb Z}}\lvert u_n\rvert^2+\lvert u_{n+1}\rvert^2>0$. So there are no eigenvalues in $\mathcal{R}$ and $\mu(\mathcal{R}\backslash\mathcal{B})=0$. Therefore, it is enough to prove $\mu(\Sigma\backslash \mathcal{R})=0$. Define $K_m, m\in {\mathbb Z}^+$ as in $(\ref{def1})$. Since $\Sigma\backslash \mathcal{R}\subset \lim \sup K_m$, we will show that $\sum\mu(\overline{K_m})<\infty$. Because by the famous Borel-Cantelli Lemma, $\sum\mu(\overline{K_m})<\infty$ implies $\mu(\Sigma\backslash \mathcal{R})=0$. For every $E\in K_m$, let $J_m(E)$ be an open $\epsilon_m=C\epsilon_{l_m}^{\frac{2\sigma}{3}}$ neighborhood of $E$. By Lemma \ref{chosen}, $$ \sup_{0\leqslant s\leqslant C\epsilon_m^{-1}}\lVert A_s\rVert_0^2\leqslant \epsilon_{l_m}^{-\frac{4\sigma}{9}}. $$ Moreover, by Theorem \ref{avi} $$ \mu(J_m(E))\leqslant C\epsilon_{l_m}^{-\frac{4\sigma}{9}}\lvert J_m(E)\rvert, $$ where ``$\lvert \cdot \rvert$'' stands for the Lebesgue measure. Now we take a finite subcover $\overline{K_m}\subset \bigcup_{j=0}^r J_m(E_j)$. By refining this subcover, we can assume that any $x\in {\mathbb R}$ is contained in at most 2 different $J_m(E_j)$. By Theorem \ref{avi2}, we have $$ \lvert N(J_m(E))\rvert\geqslant c\lvert J_m(E)\rvert^{\frac{3}{2}}. $$ By Lemma \ref{rotation}, if $E\in K_m$, then $$ \lvert 2\pi N(E)-\langle n,\alpha \rangle\rvert_{{\mathbb T}} \leqslant 5\epsilon_{l_m}^{\sigma} $$ for some $\lvert n\rvert\leqslant 5l_{m}\ln\frac{1}{\epsilon_{l_m}}$. This shows that $N(K_m)$ can be covered by $(10l_{m}\ln\frac{1}{\epsilon_{l_m}}+1)^d$ intervals $I_s$ of length $5\epsilon_{l_m}^{\sigma}$. Since $\lvert I_s\rvert\leqslant C\lvert N(J_m(E))\rvert$ for any $s$ and $E\in K_m$, there are at most $2C+4$ intervals $J_m(E_j)$ such that $N(J_m(E_j))$ intersects $I_s$. We conclude that there are at most $C(10l_{m}\ln\frac{1}{\epsilon_{l_m}}+1)^d$ intervals of $J_m(E_j)$. Then $$ \mu(\overline{K_m})\leqslant \sum_{j=0}^{r}\mu(J_m(E_j))\leqslant C(10l_{m}\ln\frac{1}{\epsilon_{l_m}}+1)^d \times C\epsilon_{l_m}^{-\frac{4\sigma}{9}}\times C\epsilon_{l_m}^{\frac{2\sigma}{3}}\leqslant l_m^{-\frac{\tau}{5}}, $$ which gives $$ \sum_{m}\mu(\overline{K_m})\leqslant C. $$ This finishes the proof. \end{pf} As we have seen, the technical requirement of ``$k>35\tau+2$'' is really due to the necessity for ensuring the slower growth of the conjugation maps as well as the faster decay of the perturbations. For ``$k>14\tau+2$'', although we have the almost reducibility, there is no nice quantitative control of the conjugacy and the perturbation. Indeed, understanding the competition between these two terms is essentially the core of using dynamical estimates to derive spectral results. Last but not least, it is worth mentioning that our absolutely continuous result is itself a nice theorem to apply. In a future joint work with Silvius Klein, we are going to discuss the coexistence of spectral types in non-analytic classes. \section{Acknowledgements} The author would like to thank Jiangong You and Qi Zhou for useful discussions at Chern Institute of Mathematics, and is grateful to Pedro Duarte for his persistent support at University of Lisbon as well as to Silvius Klein for his consistent support from PUC-Rio. This work is supported by PTDC/MAT-PUR/29126/2017, Nankai Zhide Fundation and NSFC grant (11671192).
\section{Introduction} \label{S:1} Soft biological tissue, such as arteries, skin, ligaments, and tendons, has the ability to grow and change through the formation of new constituents and the removal of old constituents \cite{rao2011modeling}. Understanding the underlying mechanisms of the healing of damaged soft tissue has important applications, for instance, the accurate prediction of the rupture risk of an aortic aneurysm is critical to improve clinical treatment planning \cite{Gasser2017}, the understanding of short-term and long-term damage evolution in the interaction with medical devices for soft tissue is essential for the optimization of these devices \cite{Gasser2017}, and the modeling of wound healing in the skin can improve wound and scar treatment \cite{valero2015modeling,comellas2016homeostatic}. The healing of soft biological tissue is a complex biochemical and biomechanical process of self-recovering or self-repairing the injured or damaged extracellular matrix (ECM), and is usually divided into four stages: haemostasis, inflammation, proliferation, and remodeling. These four stages were described in great detail by Comellas et al. \cite{comellas2016homeostatic} and Cumming et al. \cite{cumming2009mathematical}. It was reported that the first three stages (from haemostasis to proliferation) may last several weeks and that the final stage of remodeling may last from weeks to years. This last stage consists of continuous turnover (synthesis and degradation) of the ECM simultaneously with the production of scar tissue. The mechanical loading is to be proved to have a significant impact on the speed and efficiency of healing, although the underlying detailed mechanobiological mechanisms involved are not fully clear \cite{comellas2016homeostatic}. Computational modeling can provide insight into the healing of soft tissues from both short-term and long-term perspectives, and has become more popular for intense research, since experimental research is very time consuming and always involves ethical issues arising from the use of living samples. Generally, there are two types of approaches \cite{valero2015modeling,buganza2016computational}: The first type focuses on the underlying cellular and biochemical mechanisms based on continuum or hybrid discrete/continuum approaches, including the simulation of wound contraction \cite{buganza2016computational,javierre2009numerical} and angiogenesis \cite{schugart2008wound}, providing means to reveal the underlying mechanism, usually from a microscopic view. The other type, more phenomenological, focuses on the change in the material properties of tissue during the remodeling phase. For instance, Comellas et al. developed a homeostasis-driven turnover remodeling model for healing in soft tissues based on continuum damage mechanics \cite{comellas2016homeostatic}. Moreover, some studies focus on modeling the specified remodeling process, e.g., the collagen fiber reorientation \cite{kuhl2005remodeling}, {continuous turnover of constituents} \cite{kuhl2005remodeling} and constrained mixture computational method \cite{humphrey2002constrained,latorre2018critical,dimitrijevic2008method}. Despite the existing works introduced above, the computational modeling of healing is still challenging, a main drawback of the current healing models being that some \textit{ad hoc} equations, based on different assumptions, have to be employed to describe the change in variables, resulting in a significant increase in modeling complexity. Continuum damage mechanics (CDM), which is consistent with an open-system thermodynamics framework, provides a powerful approach to capture the continuous turnover of tissue. In our previous work \cite{he2019gradient,zuo2020threedimensional}, a nonlocal continuum healing model was presented by combining a gradient-enhanced damage model and a temporally homogenized G\&R model. Instead of introducing a mechanobiological model to describe the G\&R process, e.g., the temporally homogenized {growth and remodeling (G\&R)} model, a more general and unified approach is newly presented in this paper. The core idea is that, from the viewpoint of CDM, the parameters related to the healing process can be regarded as internal variables, in the same way as the damage variable. Therefore, it is possible to establish a more rigorous and concise unified model without any \textit{ad hoc} equations, including the evolution equations for the growth and remodeling based on strict thermodynamic considerations. To the best of the authors' knowledge, there appears to be no work related to the model proposed in this paper to date. Based on the above considerations, a new unified continuum damage model is first established in this paper. The proposed theoretical framework provides a more convenient computational model without any \textit{ad hoc} equations. A numerical simulation based on the newly established damage models will result in a powerful tool for predicting and understanding the mechanism of the self-healing behavior in soft biological tissues, particularly in regard to diseases or wounds such as aneurysms or skin wounds, and will help to improve related treatment methods. The paper is organized as follows: \cref{S:2} introduces the framework of the unified damage model for healing, including the basic kinematics in \cref{S:2.1}, thermodynamic modeling of growth in \cref{S:2.2}, coupling to remodeling in \cref{S:2.3}, coupling to damage in \cref{S:2.4}, summary of the evolution equations of healing in \cref{S:2.51}, gradient-enhanced nonlocal damage model in \cref{S:2.6}, total potential energy and variational form in \cref{S:2.5}, and constitutive model in \cref{S:2.8}. \cref{S:3} provides numerical examples to demonstrate the effectiveness of the proposed model. Finally, discussions and conclusions are given in \cref{S:4}. \section{The thermodynamic framework of the unified damage model for healing} \label{S:2} \subsection{Basic kinematics} \label{S:2.1} Let $\bm x=\bm \varphi(\bm X,t)$ describe the motion of the. This equation transforms referential placements $\bm x\in \kappa(0)$ into their spatial counterparts $\bm x\in \kappa(t)$, where $\kappa(0)$ and $\kappa(t)$ are the initial reference configuration and current configuration, respectively. The deformation gradient and the Jacobian, which maps the referential volume $dV$ onto the current volume $dv$, are defined as \begin{equation} \label{equ:1} {\bm {F}} = {\nabla _{\bm{X}}}{\bm{\varphi }}, \end{equation} \begin{equation} \label{equ.2} J=\frac{dv}{dV}=\det(\bm F). \end{equation} We introduce a variational approach for the description of inelastic processes that rests on thermodynamic extremal principles. For this purpose, let us consider a physical system described by (sets of) external, i.e., controllable, state variables, in our case given by the deformation gradient $\bm{F}$, and internal state variables $\bm{z}$. We assume that the system behavior may be defined using only two scalar potentials: free energy $\psi(\bm{F},\bm{z})$ and dissipation potential $\Delta(\bm{z},\dot{\bm{z}})$. The deformation $\bm{x}$ is given by the minimization of energy as \begin{equation} \label{eq2} \inf_{\bm{x}}\left\{{\int_\Omega \psi(\bm{F},\bm{z}) {\rm d} V + f_\mathrm{ext}(\bm{x})} | {\bm{x}=\bm{x}_0 \;\mbox{on}\; \partial\Omega}\right\}, \end{equation} where $f_\mathrm{ext}(\bm{x})$ denotes the potential of external driving forces. The evolution of the internal variables is described by the Biot equation. \begin{equation} \label{eq3} \frac{\partial \psi}{\partial {\bm{z}}}+\frac{\partial \Delta}{\partial \dot{\bm{z}}} = {\bf 0}. \end{equation} Note that \cref{eq3} may be written as a stationarity condition of the minimization problem \begin{equation} \label{eq4} \inf_{\dot{\bm{z}}}\left\{{\dot{\Psi} + \Delta}\right\}. \end{equation} \subsection{Thermodynamic modeling of growth} \label{S:2.2} Let us assume that the local state of tissue growth is given by an internal variable of an inelastic deformation gradient $\bm{z}=\bm{F}_\mathrm{g}$, such that the total deformation gradient is given as \begin{equation} \label{eq5} \bm{F}=\bm{F}_\mathrm{e} \cdot \bm{F}_\mathrm{g}, \end{equation} where $\bm{F}_\mathrm{e}$ denotes the part of the deformation gradient given by elastic straining. The elastic free energy depends on $\bm{F}_\mathrm{e}$ only. Hence we have \begin{equation} \label{eq6} \psi_\mathrm{el}(\bm{F}_\mathrm{e}) = \psi_\mathrm{el}(\bm{F} \cdot \bm{F}_\mathrm{g}^{-1}). \end{equation} In a material that has already undergone growth, the free energy must be related to the volume of the grown tissue, i.e., premultiplied by $J_\mathrm{g} = \det (\bm{F}_\mathrm{g}$). Moreover, we introduce a constant term $\Delta\psi_\mathrm{ph}$ contained in the free energy, which we denote as the physiological potential. We assume that $\Delta\psi_\mathrm{ph}$ can be influenced by physiological processes to stimulate growth where necessary. With this notion, the free energy takes the form \begin{equation} \label{eq7} \psi(\bm{F},\bm{F}_\mathrm{g}) = J_\mathrm{g} \, \left( \psi_\mathrm{el}(\bm{F} \cdot \bm{F}_\mathrm{g}^{-1}) + \Delta\psi_\mathrm{ph} \right). \end{equation} We obtain the first Piola-Kirchhoff stress tensor as \begin{equation} \label{eq8} \bm{P} = \frac{\partial \psi}{\partial \bm{F}} = J_\mathrm{g} \, \frac{\partial \psi_\mathrm{el}}{\partial \bm{F}_\mathrm{e}} \cdot \bm{F}_\mathrm{g}^{-\mathrm{T}}, \end{equation} and the Cauchy stress tensor as \begin{equation} \label{eq9} \bm\sigma = \frac{1}{J} \, \bm{P} \cdot \bm{F}^\mathrm{T} = \frac{1}{J_\mathrm{e}} \, \frac{\partial \psi_\mathrm{el}}{\partial \bm{F}_\mathrm{e}} \cdot \bm{F}_\mathrm{e}^\mathrm{T}, \end{equation} where $J = \det (\bm{F}$) and $J_\mathrm{e} = \det (\bm{F}_\mathrm{e}$). Material frame indifference requires that $\psi_\mathrm{el}$ factors through the right Cauchy-Green tensor $\bm{C}_\mathrm{e} = \bm{F}_\mathrm{e}^\mathrm{T} \cdot \bm{F}_\mathrm{e}$. Employing the relation \begin{equation} \label{eq9a} \frac{\partial \psi_\mathrm{el}}{\partial \bm{F}_\mathrm{e}} = 2 \, \bm{F}_\mathrm{e} \cdot \frac{\partial \psi_\mathrm{el}}{\partial \bm{C}_\mathrm{e}}, \end{equation} we obtain \begin{equation} \label{eq9b} \bm\sigma = \frac{1}{J_\mathrm{e}} \, 2 \, \bm{F}_\mathrm{e} \cdot \frac{\partial \psi_\mathrm{el}}{\partial \bm{C}_\mathrm{e}} \cdot \bm{F}_\mathrm{e}^\mathrm{T}, \end{equation} where $\bm\sigma$ is indeed symmetric. Note that $\bm\sigma$ depends on $\bm{F}_\mathrm{e}$ only. We introduce a thermodynamic driving force associated with growth by \begin{equation} \label{eq10} \bm{q}_\mathrm{g} = - \frac{\partial \psi}{\partial \bm{F}_\mathrm{g}}. \end{equation} Employing \cref{eq8} and the fact, that $\frac{\partial J_\mathrm{g}}{\partial \bm{F}_\mathrm{g}} = J_\mathrm{g} \bm{F}_\mathrm{g}^{-\mathrm{T}}$, we obtain \begin{equation} \label{eq11} \bm{q}_\mathrm{g} = - \bm{F}_\mathrm{g}^{-\mathrm{T}} \cdot \left( \psi \, \bm{I} - \bm{F}^\mathrm{T} \cdot \bm{P} \right). \end{equation} Note that $\bm{b} = \psi \, \bm{I} - \bm{F}^\mathrm{T} \cdot \bm{P}$ is the Eshelby stress tensor known to be associated with the configuration change. To close our model, we still have to introduce a dissipation potential. Because we have to respect the material frame indifference once again, we have to formulate this by employing an objective rate. A straightforward choice is the velocity gradient $\bm{L}_\mathrm{g} = \dot{\bm{F}}_\mathrm{g} \cdot \bm{F}_\mathrm{g}^{-1}$. With this notion, we define the dissipation potential as \begin{equation} \label{eq12} \Delta_\mathrm{g}(\bm{L}_\mathrm{g}) = J_\mathrm{g} \, \left( r_\mathrm{g} \, \| \bm{L}_\mathrm{g} \| + \frac{1}{2 M_\mathrm{g}} \, \| \bm{L}_\mathrm{g} \|^2 \right). \end{equation} Note that, similar to the free energy, the dissipation potential has to be premultiplied by $J_\mathrm{g}$. Because of the non-differentiability of $\Delta$ at $\bm{L}_\mathrm{g}=\bm{0}$, \cref{eq3} becomes a differential inclusion and takes the form \begin{equation} \label{eq13} \bm{q}_\mathrm{g} \in J_\mathrm{g} \, \left( r_\mathrm{g} \, \mathrm{sign} \, \bm{L}_\mathrm{g} + \frac{1}{M_\mathrm{g}} \, \bm{L}_\mathrm{g} \right) \cdot \bm{F}_\mathrm{g}^{-\mathrm{T}}, \end{equation} which has the solution \begin{equation} \label{eq14} \bm{L}_\mathrm{g} = M_\mathrm{g} \left(\frac{1}{J_\mathrm{g}} \, \| \bm{q}_\mathrm{g} \cdot \bm{F}_\mathrm{g}^\mathrm{T} \| - r_\mathrm{g} \right) _+ \, \mathrm{sign}\left( \bm{q}_\mathrm{g} \cdot \bm{F}_\mathrm{g}^\mathrm{T} \right) , \end{equation} where $(\cdot)_+$ denotes the positive part of the argument. The set-valued sign function of a tensor $\bm{T}$ is defined as \begin{equation} \label{eq14a} \mathrm{sign} (\bm{T}) = \left\lbrace \begin{array}{ll} \left\lbrace \bm{S}, \, \|\bm{S}\| \leq 1 \right\rbrace & \text{for} \; \bm{T}=\bm{0} \\ \left\lbrace \frac{1}{\|\bm{T}|} \,\bm{T} \right\rbrace & \text{for} \; \bm{T}\not=\bm{0} \end{array} \right. . \end{equation} We see that $M_\mathrm{g}$ plays the role of a mobility controlling the velocity of the growth process, and $r_\mathrm{g}$ corresponds to a growth limit that is related to a homeostatic state. A brief calculation gives \begin{equation} \label{eq15} \bar{\bm{q}}_\mathrm{g} := \frac{1}{J_\mathrm{g}} \, \bm{q}_\mathrm{g} \cdot \bm{F}_\mathrm{g}^\mathrm{T} = - \left( \psi_\mathrm{el} + \Delta\psi_\mathrm{ph} \right) \bm{I} + \bm{F}_\mathrm{e}^\mathrm{T} \cdot \frac{\partial \psi_\mathrm{el}}{\partial \bm{F}_\mathrm{e}}, \end{equation} and \cref{eq14} becomes \begin{equation} \label{eq16} \bm{L}_\mathrm{g} = M_\mathrm{g} \left( \| \bar{\bm{q}}_\mathrm{g} \| - r_\mathrm{g} \right)_+ \, \mathrm{sign}\left( \bar{\bm{q}}_\mathrm{g} \right) . \end{equation} Note that $\bar{\bm{q}}_\mathrm{g}$ depends on $\bm{F}_\mathrm{e}$ only. Using \cref{eq9a,eq9b}, we obtain \begin{equation} \label{eq17} \bar{\bm{q}}_\mathrm{g} = - J_\mathrm{e} \, \bm{I} + 2 \, \bm{C}_\mathrm{e} \cdot \frac{\partial \psi_\mathrm{el}}{\partial \bm{C}_\mathrm{e}} = - \left( \psi_\mathrm{el} + \Delta\psi_\mathrm{ph} \right) \bm{I} + J_\mathrm{e} \, \bm{F}_\mathrm{e}^\mathrm{T} \cdot \bm \sigma \cdot \bm{F}_\mathrm{e}^{-\mathrm{T}}. \end{equation} For deformations large enough in order to hold $\| \bar{\bm{q}}_\mathrm{g} \| > r_\mathrm{g}$, the driving forces tend to converge to the hypersurface given by \begin{equation} \label{eq18} \| \bar{\bm{q}}_\mathrm{g} \| = r_\mathrm{g}, \end{equation} defining a yield condition for growth. Let us investigate this hypersurface closer. A straightforward calculation gives \begin{equation} \label{eq18a} \| \bar{\bm{q}}_\mathrm{g} \|^2 = 3 \left( \psi_\mathrm{el} + \Delta\psi_\mathrm{ph} \right)^2 - 2 J_\mathrm{e} \, \left( \psi_\mathrm{el} + \Delta\psi_\mathrm{ph} \right) \, \, \bm + J_\mathrm{e}^2 \, \| \bm{F}_\mathrm{e}^{-1} \cdot \bm \sigma \cdot \bm{F}_\mathrm{e} \|^2. \end{equation} We see that \cref{eq18} involves the Cauchy stress $\bm \sigma$ but in general also the elastic deformation gradient $\bm{F}_\mathrm{e}$. Note that the physiological potential $\Delta\psi_\mathrm{ph}$ shifts the growth to higher volumetric stresses. \subsubsection{The isotropic case} In this paper, only the case of isotropic growth is considered. For an isotropic tissue, the growth will be volumetric only, i.e., we have \begin{equation} \label{eq19} \bm{F}_\mathrm{g} = J_\mathrm{g}^{1/3} \, \bm{I}. \end{equation} We assume a split of the free energy into a volumetric and an isochoric part as \begin{equation} \label{eq20} \psi_\mathrm{el}(\bm{F}_\mathrm{e}) = U(J_\mathrm{e}) + \psi_\mathrm{iso}(\bar{\bm{F}}_\mathrm{e}), \end{equation} where $\bar{\bm{F}}_\mathrm{e}=J_\mathrm{e}^{-1/3}\, \bm{F}_\mathrm{e}$. Employing \cref{eq19}, we obtain \begin{equation} \label{eq21} \bar{\bm{F}}_\mathrm{e} = \bar{\bm{F}} = J^{-1/3}\, \bm{F}. \end{equation} A brief calculation using \cref{eq20} gives \begin{equation} \label{eq22} \bm{P} = J_\mathrm{g} \, \left( J_\mathrm{e} \, U^\prime(J_\mathrm{e}) \, \bm{I} + J^{-1/3} \, {\rm dev} \left( \frac{\partial \psi_\mathrm{iso}}{\partial \bar{\bm{F}}} \cdot \bar{\bm{F}}^\mathrm{T} \right) \right) \cdot \bm{F}^{-\mathrm{T}}, \end{equation} \begin{equation} \label{eq23} \bm \sigma = U^\prime(J_\mathrm{e}) \, \bm{I} + J_\mathrm{g} \, J^{-4/3} \, {\rm dev} \left( \frac{\partial \psi_\mathrm{iso}}{\partial \bar{\bm{F}}} \cdot \bar{\bm{F}}^\mathrm{T} \right) , \end{equation} \begin{equation} \label{eq24} \bar{\bm{q}}_\mathrm{g} = - \left( \psi_\mathrm{el} + \Delta\psi_\mathrm{ph} + J_\mathrm{e} \, U^\prime(J_\mathrm{e}) \right) \bm{I} = - \left( \psi_\mathrm{el} + \Delta\psi_\mathrm{ph} + \frac{J_\mathrm{e}}{3} \, {\rm tr} \bm\sigma \right) \bm{I}, \end{equation} with ${\rm dev} ( \bm{T}) = \bm{T}- \frac{1}{3} \, {\rm tr}(\bm{T}) \, \bm{I}$. For an isotropic material, $\psi_\mathrm{el}$ can be expressed as a function of the principal invariants of $\bm \sigma$. Hence, the yield condition given by \cref{eq18} can now be formally formulated in $\bm \sigma$ only. \subsection{Coupling to remodeling} \label{S:2.3} By remodeling, we understand the physiological replacement of one tissue by a different one. This effect can be described via our thermodynamic concept as well. For this purpose, two materials are labeled by the index $i \in {1,2}$ are considered, which having total deformation gradients $\bm{F}_i$, inelastic deformation gradients $\bm{F}_{\mathrm{g}i}$, elastic energies $\psi_{\mathrm{el}i}$, physiological potentials $\Delta\psi_{\mathrm{ph}i}$ and dissipation potentials $\Delta_{\mathrm{g}i}$, as defined in the previous section. The formulation can be extended to an arbitrary number of tissues in a straightforward manner. Assume, that the first tissue exists with the volume ratio $(1-\lambda)$ and the second one with the volume ratio $\lambda$. Moreover, suppose that both tissues have the same deformation gradient, i.e., $\bm{F}_1=\bm{F}_2=:\bm{F}$. This Taylor assumption is justified for tissues that are woven into each other and thus kinematically constrained - a situation typical for biological tissues. We obtain the total free energy \begin{multline} \label{eq25} \psi(\bm{F},\bm{F}_{\mathrm{g}1},\bm{F}_{\mathrm{g}2},\lambda) = (1-\lambda) \, J_{\mathrm{g}1} \, \left( \psi_{\mathrm{el}1}(\bm{F} \cdot \bm{F}_{\mathrm{g}1}^{-1}) + \Delta\psi_{\mathrm{ph}1} \right) \\ + \lambda \, J_{\mathrm{g}2} \, \left( \psi_{\mathrm{el}2}(\bm{F} \cdot \bm{F}_{\mathrm{g}2}^{-1}) + \Delta\psi_{\mathrm{ph}2} \right). \end{multline} This allows us to define a thermodynamic driving force associated with remodeling as \begin{equation} \label{eq26} q_\mathrm{rm} = - \frac{\partial \psi}{\partial \lambda} = J_{\mathrm{g}1} \, \left( \psi_{\mathrm{el}1}(\bm{F} \cdot \bm{F}_{\mathrm{g}1}^{-1}) + \Delta\psi_{\mathrm{ph}1} \right) - J_{\mathrm{g}2} \, \left( \psi_{\mathrm{el}2}(\bm{F} \cdot \bm{F}_{\mathrm{g}2}^{-1}) + \Delta\psi_{\mathrm{ph}2} \right). \end{equation} We see that without the presence of the physiological potentials stronger tissue with higher free energy would always be replaced by weaker tissue with lower free energy. Specifically, undamaged tissue would be replaced by damaged tissue. This would be contra-intuitive and contradict experimental observation in many cases. To describe the evolution of the volume ration $\lambda$, we once again introduce a dissipation potential \begin{equation} \label{eq27} \Delta_\mathrm{rm}(\dot{\lambda}) = r_\mathrm{rm} \, | \dot{\lambda} | + \frac{1}{2 {M^0_\mathrm{rm}}} \, \dot{\lambda}^2, \end{equation} allowing us to define a total dissipation potential {of the tissue} as \begin{equation} \label{eq28} \Delta(\bm{L}_{\mathrm{g}1},\bm{L}_{\mathrm{g}2},\dot{\lambda}) = (1-\lambda) \, \Delta_{\mathrm{g}1}(\bm{L}_{\mathrm{g}1}) + \lambda \, \Delta_{\mathrm{g}2}(\bm{L}_{\mathrm{g}2}) + \Delta_\mathrm{rm}(\dot{\lambda}). \end{equation} Application of the {thermodynamic extremal} principle given in \cref{eq3} will return the evolution equation \cref{eq16} unchanged for $\bm{L}_{\mathrm{g}1}$ and $\bm{L}_{\mathrm{g}2}$, respectively. For the evolution of $\lambda$, we obtain \begin{equation} \label{eq29} \dot{\lambda} ={M^0_\mathrm{rm}} \left( | q_\mathrm{rm} | - r_\mathrm{rm} \right)_+ \, \mathrm{sign}\left( q_\mathrm{rm} \right) . \end{equation} In most cases, we assume no threshold for the initiation of remodeling by setting $r_\mathrm{rm}=0$. Then \cref{eq29} takes the simple form \begin{equation} \label{eq30} \dot{\lambda} = {M^0_\mathrm{rm}} \, q_\mathrm{rm}. \end{equation} In addition, in many cases, the mechanical properties of the completely healed tissue remain inferior to those of uninjured tissue \cite{frank1999optimisation,frank1999molecular}. Based on this experimental evidence, an irreversible stiffness loss parameter {$\eta$} is introduced, and the remodeling mobility is redefined as \begin{equation} \label{eq30b} {M^0_\mathrm{rm} = M_\mathrm{rm} \left(\eta -\lambda\right)_+,} \end{equation} yielding the evolution equation \begin{equation} \label{eq30a} {\dot{\lambda} = M_\mathrm{rm} \, q_\mathrm{rm}\, \left(\eta -\lambda\right)_+.} \end{equation} Here, $\eta=0$ means that no damaged part can be healed and $\eta=1.0$ means that the material can be totally healed. \subsection{Coupling to damage} \label{S:2.4} The inclusion of material damage can now be easily accomplished. Let us assume material 1 to be the original tissue undergoing damage. Subsequently, it will be replaced by material 2 via remodeling during the healing process. Hence, material 2 represents ``scar tissue'' and is supposed to experience no further damage. We introduce a constitutive function $f(d)$ describing the reduction in material stiffness, where $d$ is a damage parameter and {$f$} is at least twice differentiable, {monotonically decreasing} and satisfies the following conditions \begin{equation} \label{equ:5} {f(0) = 1, \quad \mathop {\lim f(d) = 0}\limits_{d \to \infty }.} \end{equation} The elastic energy of material 1 is then premultiplied by $f(d)$, giving the new total energy \begin{multline} \label{eq31} \psi(\bm{F},\bm{F}_{\mathrm{g}1},\bm{F}_{\mathrm{g}2},\lambda,d) = (1-\lambda) \, J_{\mathrm{g}1} \, \left( f(d) \, \psi_{\mathrm{el}1}(\bm{F} \cdot \bm{F}_{\mathrm{g}1}^{-1}) + \Delta\psi_{\mathrm{ph}1} \right) \\ + \lambda \, J_{\mathrm{g}2} \, \left( \psi_{\mathrm{el}2}(\bm{F} \cdot \bm{F}_{\mathrm{g}2}^{-1}) + \Delta\psi_{\mathrm{ph}2} \right). \end{multline} Let us study the energy in \cref{eq31} for a moment. With no physiological potentials present, the damaged material is the weaker one. Hence, thermodynamics would require undamaged material to be replaced with damaged material. To prevent this, we have to set $\Delta\psi_{\mathrm{ph}1}>0$. Since only the difference in the physiological potentials is relevant, we set $\Delta\psi_{\mathrm{ph}2}=0$. However, with this setting, material 1 is replaced with material 2 even when no damage has occurred. For this reason, the physiological potential has to become a time-dependent variable $\Delta\psi_{\mathrm{ph}1}:=\Delta\psi_\mathrm{ph}(t)$ and be connected to the evolution of $d$. This is possible only in a consistent way with respect to thermodynamics by declaring this variable to be an external one that can be influenced directly by the living body, for example, by sending messenger chemicals to the damaged tissue. We mimic this by introducing a dependence \begin{equation} \label{eq33a} \Delta\psi_\mathrm{ph} = g(d), \end{equation} where $g(d)$ is a positive, monotonically increasing function with $g(0)=0$. We obtain the thermodynamic driving force associated with damage as \begin{equation} \label{eq32a} q_\mathrm{d} = - \frac{\partial \psi}{\partial d} = - (1-\lambda) \, J_{\mathrm{g}1} \, f^\prime(d) \, \psi_{\mathrm{el}1}(\bm{F} \cdot \bm{F}_{\mathrm{g}1}^{-1}). \end{equation} The dissipation potential associated with damage is introduced as \begin{equation} \label{eq34} \Delta_\mathrm{d}(\dot{d}) = r_\mathrm{d} \, \dot{d} + \frac{1}{2 M_\mathrm{d}} \, \dot{d}^2, \qquad \dot{d}\geq 0. \end{equation} Note the constraint $\dot{d}\geq 0$ in \cref{eq34} prohibiting any reversal of damage. We obtain a new total dissipation potential of the form \begin{equation} \label{eq36} \Delta(\bm{L}_{\mathrm{g}1},\bm{L}_{\mathrm{g}2},\dot{\lambda},\dot{d}) = (1-\lambda) \, \left( \Delta_{\mathrm{g}1}(\bm{L}_{\mathrm{g}1}) + J_{\mathrm{g}1} \, \Delta_\mathrm{d}(\dot{d}) \right) + \lambda \, \Delta_{\mathrm{g}2}(\bm{L}_{\mathrm{g}2}) + \Delta_\mathrm{rm}(\dot{\lambda}). \end{equation} We obtain the evolution equation of damage as \begin{equation} \label{eq37} \dot{d} = M_\mathrm{d} \left( - f^\prime(d) \, \psi_{\mathrm{el}1}(\bm{F} \cdot \bm{F}_{\mathrm{g}1}^{-1}) - r_\mathrm{d} \right)_+. \end{equation} Note that $- f^\prime(d) \, \psi_{\mathrm{el}1}(\bm{F} \cdot \bm{F}_{\mathrm{g}1}^{-1}) \geq 0$. \subsection{Summary of evolution equations in healing} \label{S:2.51} We summarize the obtained model in the following. Given ${\bm F}(t)$ we have evolution equations for the variables ${\bm F}_{\mathrm{g}1}(t)$, ${\bm F}_{\mathrm{g}2}(t)$, $\lambda(t)$ and $d(t)$ in the fully explicit form \begin{tcolorbox}[ams gather] \label{eq39} \dot{\bm{F}}_{\mathrm{g}1} \cdot \bm{F}_{\mathrm{g}1}^{-1} = M_{\mathrm{g}1} \left( \| \tilde{\bm{q}}_{\mathrm{g}1} \| - r_{\mathrm{g}1} \right)_+ \, \mathrm{sign}\left( \tilde{\bm{q}}_{\mathrm{g}1} \right), \\ \label{eq40} \dot{\bm{F}}_{\mathrm{g}2} \cdot \bm{F}_{\mathrm{g}2}^{-1} = M_{\mathrm{g}2} \left( \| \tilde{\bm{q}}_{\mathrm{g}2} \| - r_{\mathrm{g}2} \right)_+ \, \mathrm{sign}\left( \tilde{\bm{q}}_{\mathrm{g}2} \right), \\ \label{eq41} \dot{\lambda} = M_\mathrm{rm} \left( | \tilde{q}_\mathrm{rm} | - r_\mathrm{rm} \right)_+ \, \mathrm{sign}\left( \tilde{q}_\mathrm{rm} \right), \\ \label{eq42} \dot{d} = M_\mathrm{d} \left( \tilde{q}_\mathrm{d} - r_\mathrm{d} \right)_+. \end{tcolorbox} To account for the influence of damage, we introduce modified driving forces as follows: \begin{tcolorbox}[ams gather] \label{eq44} \tilde{\bm{q}}_{\mathrm{g}1} = - \left( f(d) \, \psi_{\mathrm{el}1} + g(d) \right) \bm{I} + f(d) \, \bm{F}_{\mathrm{e}1}^\mathrm{T} \cdot \frac{\partial \psi_{\mathrm{el}1}}{\partial \bm{F}_{\mathrm{e}1}}, \\ \label{eq45} \tilde{\bm{q}}_{\mathrm{g}2} = - \psi_{\mathrm{el}2} \, \bm{I} + \bm{F}_{\mathrm{e}2}^\mathrm{T} \cdot \frac{\partial \psi_{\mathrm{el}2}}{\partial \bm{F}_{\mathrm{e}2}}, \\ \label{eq46} \tilde{q}_\mathrm{rm} = J_{\mathrm{g}1} \, \left( f(d) \, \psi_{\mathrm{el}1}(\bm{F} \cdot \bm{F}_{\mathrm{g}1}^{-1}) + g(d) \right) - J_{\mathrm{g}2} \, \psi_{\mathrm{el}2}(\bm{F} \cdot \bm{F}_{\mathrm{g}2}^{-1}), \\ \label{eq47} \tilde{q}_\mathrm{d} = - f^\prime(d) \, \psi_{\mathrm{el}1}(\bm{F} \cdot \bm{F}_{\mathrm{g}1}^{-1}). \end{tcolorbox} \section{Nonlocal enhancement by gradient terms} \label{S:2.6} A nonlocal damage model is usually required because of the need to remove the pathological mesh dependence. Therefore, following the work of Dimitrijevic and Hackl \cite{dimitrijevic2008method,dimitrijevic2011regularization}, a gradient-enhanced nonlocal free energy term is added to the strain energy given in \cref{eq31}: \begin{equation} \label{eq32} \begin{split} \psi(\bm{F},\bm{F}_{\mathrm{g}1},\bm{F}_{\mathrm{g}2},\lambda,d) =& (1-\lambda) J_{\mathrm{g}1} ( f(d) \psi_{\mathrm{el}1}(\bm{F} \cdot \bm{F}_{\mathrm{g}1}^{-1}) +\frac{c_d}{2}{\| {{\nabla _{\bm{X}}}\phi } \|^2} + \frac{{{\beta _d}}}{2}{[ \phi - {\gamma _d}d ]^2}+\\ &\Delta\psi_{\mathrm{ph}1}) + \lambda J_{\mathrm{g}2} ( \psi_{\mathrm{el}2}(\bm{F} \cdot \bm{F}_{\mathrm{g}2}^{-1}) + \Delta\psi_{\mathrm{ph}2} ). \end{split} \end{equation} In \cref{eq32}, $c_d$ represents the gradient parameter that defines the degree of gradient regularization and the internal length scale. Three other variables are introduced as well: - the field variable $\phi$, which {introduces an internal length scale via its gradient occurring in the expression for the energy}, - the energy-related penalty parameter $\beta_d$, which approximately enforces the local damage field and the nonlocal field to coincide, - parameter $\gamma_d$, which is used as a switch between the local and enhanced models. In order to better monitor the damage and G\&R process, we introduce a healing parameter $H(d,t)$ as \begin{equation} \label{equ:5a} H(d,t)=(1-\lambda)f(d)+\lambda. \end{equation} The healing parameter $H(d,t)$ takes values between 0 and 1. When $H(d,t)=0$, the tissue is completely damaged and its local stiffness is null, whereas when $H(d,t)=1$, the tissue is completely healed with newly produced tissue replacing the previously damaged one. \section{Numerical implementation} \subsection{Constitutive model} \label{S:2.8} For the undamaged part $\psi_0$, a neo-Hookean hyperelastic constitutive model \cite{nolan2014robust} is used. It is written as \begin{equation} \label{equ.15} \begin{split} {\psi_0}=\rm \frac 1 2 \mu_{0} \emph{J}_{\mathrm{e}}^{-2/3}(\emph I_{1{\mathrm{e}}}-3)+\rm \frac 1 2 \kappa_{0}(\emph{J}_{\mathrm{e}}-1)^2, \end{split} \end{equation} where $\mu_{0}$ and $\kappa_{0}$ are the shear and bulk moduli of the soft isotropic matrix, respectively. $\emph I_{1{\mathrm{e}}}=tr(\bm C_\mathrm{e})$ is the first invariant of right Cauchy-Green tensor $\bm C_\mathrm{e}$. \subsection{Total potential energy and variational form} \label{S:2.5} The general total potential energy of the nonlocal damage model is \begin{equation} \label{equ.6} \Pi = \int\limits_\Omega \psi \, \mathrm{d} V - \int\limits_\Omega {\bar {\bm B}} \cdot {\bm{\varphi}} \, \mathrm{d} V - \int\limits_{\partial \Omega } {\bar {\bm T}} \cdot {\bm{\varphi}} \, \mathrm{d} S, \end{equation} where $\bar {\bm B}$ is the body force vector per unit reference volume of $\Omega$ and $\bar {\bm T}$ is the traction on the boundary $\partial \Omega$. Minimization of the potential energy with respect to the primal variables $\bm \varphi$ and $\phi$ results in a coupled nonlinear system of equations that may be written as \begin{equation} \label{equ.7} \int\limits_\Omega {{\bm{P}}:{\nabla _{\bm{X}}}\delta {\bm{\varphi }}} \, \mathrm{d} V - \int\limits_\Omega {\bar {\bm B}} \cdot \delta {\bm{\varphi }} \, \mathrm{d} V - \int\limits_{\partial \Omega } {\bar {\bm T} \cdot \delta {\bm{\varphi}}} \, \mathrm{d} S = 0, \end{equation} \begin{equation} \label{equ.8} \int\limits_\Omega {{\bm{Y}}:{\nabla _{\bm{X}}}\delta \phi } \, \mathrm{d} V - \int\limits_\Omega {Y\delta \phi } \, \mathrm{d} V = 0, \end{equation} where $\bm P$ is the first Piola-Kirchhoff stress, $\bm Y$ is vectorial damage quantity related to flux terms and $Y$ is the scalar damage quantity associated to source terms. They are defined as \begin{equation} \label{equ.9} {\bm{P}} = {\partial _{{\bm F}}}\varPsi ,\quad \quad \bm{Y} = {\partial _{{\nabla _{\bm X}}\phi }}\varPsi ,\quad \quad Y =- {\partial _\phi }\varPsi . \end{equation} The corresponding spatial quantities in \cref{equ.9} are given by \begin{equation} \label{equ.11} {\bm{\sigma }} = {\bm{P}} \cdot {\rm{cof(}}{{\bm{F}}^{ - 1}}{\rm{)}},\quad \quad \ \ {\bar {\bm b}}=J^{-1}{\bar {\bm B}}, \end{equation} \begin{equation} \label{equ.12} \bm y = {\bm{Y}} \cdot {\rm{cof(}}{{\bm{F}}^{ - 1}}{\rm{)}},\quad \quad \ \ y = {J^{ - 1}}Y, \end{equation} where ${\rm {cof}} ({\bm F})=J{\bm F}^{\rm -T}$. Substituting \cref{equ.2,equ.9} into \cref{equ.7,equ.8}, the variational forms in the spatial description are \begin{equation} \label{equ.13} \int\limits_\Omega {{\bm{\sigma}}:{\nabla _{\bm{x}}}\delta {\bm{\varphi }}} \, \mathrm{d} v - \int\limits_\Omega {\bar {\bm b}} \cdot \delta {\bm{\varphi }} \, \mathrm{d} v - \int\limits_{\partial \Omega } {\bar {\bm t} \cdot \delta {\bm{\varphi}}} \, \mathrm{d} s, \end{equation} \begin{equation} \label{equ.14} \int\limits_\Omega {{\bm{y}}:{\nabla _{\bm{x}}}\delta \phi } \, \mathrm{d} v - \int\limits_\Omega {y\delta \phi } \, \mathrm{d} v = 0. \end{equation} \subsubsection{Finite element discretization} \label{S:2.3.1} Isoparametric interpolations of the geometry variables $\bm X$, field variables $\bm \varphi$ and nonlocal field $\phi$ are respectively written as \begin{equation} \label{equ:33} {{\bm{X}}^h} = \sum\limits_{I = 1}^{n_{en}^{\bm{\varphi}} } {{N_I}\left( \xi \right)} {{\bm{X}}_I},\quad {{\bm{\varphi }}^h} = \sum\limits_{I = 1}^{n_{en}^{\bm{\varphi}}} {{N_I}\left( \xi \right)} {{\bm{\varphi }}_I},\quad {\phi ^h} = \sum\limits_{I = 1}^{n_{en}^\phi } {{N_I}\left( \xi \right)} {\phi _I}, \end{equation} where $\xi$ denotes the coordinates in the reference element, ${n_{en}^{\bm{\varphi}}}$ and ${n_{en}^{\phi}}$ are the nodal displacements and nodal nonlocal damage variables, respectively. The FE interpolations of \cref{equ:33} are introduced int the coupled nonlinear system of \cref{equ.13,equ.14}. To solve the coupled non-linear system of equations, an increment-iterative Newton-Raphson-type scheme is adopted: \begin{equation} \label{equ:34} {\left[ {\begin{array}{*{20}{c}} {{{\bm{R}}_{\bm{\varphi }}}}\\ {{{\bm{R}}_\phi }} \end{array}} \right]^{i}}{ + }{\left[ {\begin{array}{*{20}{c}} {{{\bm{K}}_{{\bm{\varphi \varphi }}}}}\quad & {{{\bm{K}}_{{\bm{\varphi }}\phi }}}\\ {{{\bm{K}}_{\phi {\bm{\varphi }}}}}\quad & {{{\bm{K}}_{\phi \phi }}} \end{array}} \right]^{i}} \cdot {\left[ {\begin{array}{*{20}{c}} {\Delta {\bm{\varphi }}}\\ {\Delta \phi } \end{array}} \right]^{{i + 1}}}{ = }\left[ {\begin{array}{*{20}{c}} {\bf{0}}\\ {\bf{0}} \end{array}} \right],, \end{equation} where \begin{equation} \label{equ:35} {{\bm{K}}_{{\bm{\varphi \varphi }}}}=\int_\Omega {\nabla _{\bm {x}}^T N \cdot [ {{{\bm{C}}_h}({d},{t})} ] \cdot } {\nabla _{\bm x}}N {\rm{d}}v + \int_\Omega {\left[ {\nabla _{\bm x}^T N \cdot {\bm{\sigma }}\cdot {\nabla _{\bm x}}N} \right] {\bm{I}}{\rm{d}}v}, \end{equation} \begin{equation} \label{equ:36} {{\bm{K}}_{{\bm{\varphi }}\phi }}=\int_\Omega {\nabla _{\bm x}^T N \cdot \frac{{{\rm d}{\bm{\sigma }}}}{{{\rm d}\phi }} \cdot N{\rm{d}}v} , \end{equation} \begin{equation} \label{equ:37} {{\bm{K}}_{\phi {\bm{\varphi}}}}=\int_\Omega {N_{}^T \cdot 2\frac{{{\rm d}y}}{{{\rm d}{\bf{g}}}} \cdot \nabla _{\bm x}^T N{\rm{d}}v} , \end{equation} \begin{equation} \label{equ:38} {{\bm{K}}_{\phi \phi }}=\int_\Omega {N_{}^T \cdot \frac{{{\rm d}y}}{{{\rm d}\phi }} \cdot N {\rm{d}}v} +\int_\Omega {\nabla _{\bm x}^T N \cdot \frac{{{\rm d}{\bm{y}}}}{{{\rm d}\phi }} \cdot \nabla _{\bm x}^T N{\rm{d}}v} . \end{equation} In the above equations the tangent terms ${{\rm d} {\bm{{\sigma}}}/{{\rm d} {\phi}}}$, $2{{\rm d} y}/{{\rm d} {\bf g}}$, ${{\rm d} y}/{{\rm d} {\phi}}$ and ${{\rm d} {\bm{y}}/{{\rm d} {\phi}}}$ are similar to the ones derived by Waffenschmidt et al. \cite{waffenschmidt2014gradient} and Polindara et al. \cite{polindara2017computational}, and ${{\bm{C}}_h}({d},{t})$ is a new time-dependent tangent stress-strain matrix in the damage and healing process given by \begin{equation} \label{equ:39} {{\bm{C}}_h}({d},{t})=4f(d)(1-\lambda)\frac{\partial ^2 \psi_{\mathrm{el}1}(\bm C_e) }{\partial\bm C_e \partial \bm C_e}+ 4\lambda \frac{\partial ^2 \psi_{\mathrm{el}2}(\bm C_e) }{\partial\bm C_e \partial \bm C_e}, \end{equation} where the detailed expressions of $\frac{\partial ^2 \psi_{\mathrm{el}1}(\bm C_e) }{\partial\bm C_e \partial \bm C_e}$ and $\frac{\partial ^2 \psi_{\mathrm{el}2}(\bm C_e) }{\partial\bm C_e \partial \bm C_e}$ can be found in Nolan et al. \cite{nolan2014robust}. \section{Numerical examples} \label{S:3} The model proposed in this paper is implemented within the commercial FE software Abaqus/Standard by means of a user subroutine UEL. Three numerical examples are shown onwards to illustrate the damage and healing effects in soft tissues with this model. In each example, an exponential damage function $f(d)=e^{-d}$ is adopted, but any other damage function satisfying \cref{equ:5} could be used. In both examples, the subscript 1 indicates the damaged tissues and 2 denotes the newly deposited part. Moreover, only the assumptions that the material properties of the newly deposited part are the same as the original tissues are considered in the following simulations. \subsection{Uniaxial tension} \label{S:5.1} The first example is shown in \cref{fig:ex.1}. A square plate with a $10 \ \rm mm$ edge length is subjected to uniaxial tensile loading. As shown in \cref{fig:2b}, the displacement increases continuously from 0-100 days and is kept constant after the 100th day. The G\&R process is assumed to start from time t=100 days, and only one finite element is used in this example. The detailed material parameters are shown in \cref{tab:1-material}. The physiological potential of original tissues is set as $\Delta\psi_\mathrm{ph1}=0.001\ J$ in this example. Firstly, we check the the performance of the proposed model in simulating growth. Three values of growth limit $r_{g1}$ are set: $r_{g1}=\|\bm q_{g1}\|_ {t=10\ { \rm days}}$, $r_{g1}=\|\bm q_{g1}\| _ {t=20\ { \rm days}}$ and $r_{g1}=\|\bm q_{g1}\| _ {t=50\ { \rm days}}$. The growth rate is $M_{g1}=0.01\ { \rm day^{-1}}$ and no remodeling is assumed to occur by setting $M_{rm}=0$. The variations of the Cauchy stress $\sigma_x$ and the displacement $u_y$ with time in \cref{fig:1-1-stress-different-rg,fig:1-1-displacement-different-rg} demonstrate that different homeostatic states can be reached by changing the growth limit $r_{g1}$, and a larger value of the $r_{g1}$ (in three values introduced above) leads to a larger homeostatic stress (see from \cref{fig:1-1-stress-different-rg}) and a smaller displacement (see $u_y$ from \cref{fig:1-1-displacement-different-rg}), it can be explained that a smaller gap between homeostatic and current state is produced by a larger $r_{g1}$, therefore, a smaller growth deformation is required in the healing process. \cref{fig:1-1-stress-different-mg,fig:1-1-displacement-different-mg} show the influence of the growth rate $M_{g1}$ and it shows that a larger growth rate leads to a faster convergence of the homeostatic state. Secondly, the performance of the proposed model in simulating remodeling without growth are shown in \cref{fig:1-2-1,fig:1-2-2}. Three different values of the rate of remodeling $M_{rm}$ are tested to check the influence of the remodeling rate $M_{rm}$ with the irreversible stiffness loss $\eta=0$. The results of the variations of $\sigma_x$ and $H(d,t)$ with time shown in \cref{fig:1-2-stress-different-rm,fig:1-2-stress-different-lambda} illustrate that a higher value of the remodeling rate $M_{rm}$ induces a faster remodeling speed, which means a shorter time is needed in the process of replacement of the damaged tissues by the newly deposited part. The influence of the irreversible stiffness loss $\eta$ on the variations of $\sigma_x$ and $H(d,t)$ with time are shown in \cref{fig:1-2-fd-different-rm,fig:1-2-fd-different-lambda} by setting four different values, i.e., $\eta=0$, $\eta=0.2$, $\eta=0.5$ and $\eta=1.0$, when $M_{rm}=0.01 \ \rm days^{-1}$, it is seen that the converged healing parameter $H(d,t)$ gradually increases with the decrease of $\eta$, and $H(d,t)$ converges to 1 when $\eta=0$ indicating a complete healing for soft tissue, while $H(d,t)$ converges to 0 meaning no healing occurs when $\eta=1$. Thirdly, the combined effects of growth and remodeling are shown in \cref{fig:1-3}. The G\&R parameters are set as follows: $r_{gi}=\|(\bm q_{gi})\|_ {t=10\ { \rm days}}$, $M_{g1}=M_{g2}=0.03\ \rm days^{-1}$, $M_{rm}=0.01 \ \rm days^{-1}$ and $\eta=0$. In \cref{fig:1-3-stress,fig:1-3-displacement}, the variations in $\sigma_x$ and $u_y$ with time are shown by comparing three cases: (1) Only growth occurs; (2) only remodeling occurs; and (3) growth and remodeling occur at the same time. The result in \cref{fig:1-3-stress} illustrating that, when growth and remodeling combined occur, the stress decreases firstly due to the change in the configuration caused by growth and with the remodeling of the damaged tissues, and the stress increases until all damaged tissues are changed into the newly deposited part, and finally, the stress converges to a different homeostatic stress compared to the situation where only growth occurs. Although remodeling does not change the homeostatic stress much (see from \cref{fig:1-3-stress}), a larger $u_y$ can be found in \cref{fig:1-3-displacement} by comparing with case (1) and (3), and that can be illustrated by the combined effects of G\&R such that a larger deformation is needed for the newly deposited part to converge to the homeostatic state than for the damaged part. \subsection{Open-hole plate} The second numerical example is an open-hole plate subjected to displacement loading. The geometry and the loading curve are shown in \cref{fig:ex.2}. The detailed material parameters are reported in \cref{tab:2-material}. Due to the symmetry, only 1/4 of the plate at the top right corner is analyzed. For all simulations, the irreversible stiffness loss parameter $\eta=0$. Firstly, the mesh dependence of the proposed method is investigated by simulating three different mesh sizes (79 elements, 286 elements, and 793 elements), and the average Cauchy stress $\sigma_x$ of the right side and the contours for the healing parameter $H(d,t)$ at different time are shown in \cref{fig:2-different-mesh} and \cref{fig:2-fd-contours-different-mesh}, respectively. The G\&R parameters are set as $M_{gi}=0.03 \ \rm days^{-1}$, $M_{rm}=0.1 \ \rm days^{-1}$ and $r_{gi}=\| (\bm q_{gi})\|_ {t=50\ { \rm days}}$, respectively. Both the stress curves and contours of the healing parameter illustrate that the results are rather similar for all different elements used, and a good mesh-independence is achieved by the proposed model. Secondly, the influence of different G\&R parameters are analyzed. The sensitivity of parameters of G\&R $M_{rm}$, $M_{g1}$ and $M_{g2}$ are set as four different values with the growth limit $r_{gi}=\| (\bm q_{gi})\|_ {t=50\ { \rm days}}$. It can be seen from \cref{fig:2-stress-different-parameter} that the Cauchy stress $\sigma_x$ can converge to the homeostatic state for all four cases, and a larger remodeling rate $M_{rm}$ induces a higher stress in the healing process when the growth rate $M_{gi}$ is same. Although the remodeling rate $M_{rm}$ has relatively less influence on the homeostatic stress (see from \cref{fig:2-stress-different-parameter}), the long-term evolution of the deformation is still depended on the remodeling rate $M_{rm}$, which can bee seen from \cref{fig:2-displacement-different-parameter} that the displacement at node A (the location is shown in \cref{fig:2-geo}) is shown. It is seen in \cref{fig:2-displacement-different-parameter} that, at the beginning of G\&R, a faster decrease of the displacement is caused by a higher growth rate, and as for the homeostatic state, a higher remodeling rate $M_{rm}$ leads to a larger deformation $u_y$ with the same $M_{gi}$, while a larger deformation $u_y$ is produced with a smaller $M_{gi}$ when $M_{rm}$ is the same. The influence of growth limit is also investigated under three different values, i.e., $r_{gi}=\| (\bm q_{gi})\|_ {t=30\ { \rm days}}$, $r_{gi}=\| (\bm q_{gi})\|_ {t=40\ { \rm days}}$ and $r_{gi}=\| (\bm q_{gi})\|_ {t=50\ { \rm days}}$, and the average Cauchy stress $\sigma_x$ of the right side and the displacement $u_y$ at node A (the location is shown in \cref{fig:2-geo}) are shown in \cref{fig:2-stress-different-rg} and \cref{fig:2-displacement-different-rg}, respectively. The G\&R rate are set as $M_{gi}=0.03 \ \rm days^{-1}$ and $M_{rm}=1.0 \ \rm days^{-1}$, respectively. All three different $r_{gi}$ can converge to the homeostatic state, and the homeostatic stress increases with increasing the growth limit. Combining \cref{fig:2-stress-different-rg,fig:2-displacement-different-rg}, it can be found that a smaller displacement is produced when there exists a smaller gap between the current state and the homeostatic state to recover. Thirdly, the evolution of the contours of the healing parameter $H(d,t)$, the volume ratio of the newly deposited part $\lambda$, and the component of the growth deformation for the damaged part $F_{g1}(1,1)$ and the newly deposited part $F_{g2}(1,1)$ through the healing process are shown in Fig. 12(a)-(d), respectively, when $M_{gi}=0.03 \ \rm days^{-1}$, $M_{rm}=0.1 \ \rm days^{-1}$ and $r_{gi}=\| (\bm q_{gi})\|_ {t=50\ { \rm days}}$. It can be observed that growth mainly occurs before the 500th day in this example, while remodeling occours for a relatively longer time, which is similar to the results shown in \cref{fig:2-different-parameter}. The contours shown in \cref{fig:2-different-parameter-contour} exhibit the ability of our proposed model in predicting the evolution of G\&R over the long-term time again. \subsection{Balloon angioplasty in atherosclerotic artery} The third example is associated with intraoperative injury and the long-term healing of atherosclerotic patients. The idealized two-dimensional cross-sectional model shown in \cref{fig:ex.3} was established by Loree et al. \cite{loree1992effects}. The artery is modeled as a thick-walled cylinder with an inner radius of $1.8$ mm and an outer radius of $2.0$ mm. The lumen is modeled as a circular hole of radius $1.0$ mm with an eccentricity of $0.5$ mm with respect to the artery center. Fibrous plaque occupies the region between the luminal wall and the inner wall of the artery. The fibrous cap is assumed as continuous with the fibrous plaque and has the same material properties as the fibrous plaque. A subintimal lipid pool exists as a $140^o$ crescent with an inner radius of $1.25$ mm and outer radius of $1.75$ mm with respect to the lumen center. The detailed material parameters reported in \cref{tab:3-material} are taken from Gasser et al. \cite{gasser2007modeling}. Due to the symmetry, only half of the model is analyzed. The only boundary conditions are the nodal displacements of the inner luminal nodes. A radial displacement loading is imposed on each node from its initial position, $r_i=1.0$ mm, to give a final deformed radius, $r_f=1.4$ mm, and to maintain the deformation in the healing process. The displacement loading is applied within 100 steps and G\&R is assumed to be started after displacement loading. The growth limit is set to the value of the determinant of the driven force of growth when the radius of lumen is $r_l=1.2$ mm, as $r_{gi}=\| (\bm q_{gi})\|_ {r_l=1.2\ \rm{mm}}$. The performance of the proposed model is tested by simulating the variations in four healing related parameters, $H(d,t)$, $\lambda$, $F_{g1}(1,1)$ and $F_{g2}(1,1)$, as shown in \cref{fig:3-different-parameter-contour}. The results of $H(d,t)$ in Fig. 14(a) show that the damage initially mainly occurs at the fiber cap in the shoulder of the plaque, the results agree with the review report of Holzapfel et al. \cite{2014Computational}. The variation of $H(d,t)$ from 0 day to 400 day shown in Fig. 14(a) demonstrates that the damage in balloon angioplasty can be partly healed over a long-term time, for instance, the minimum value of the healing parameter $H(d,t)$ in the entire domain is increasing from 0.46 to 0.83 in this example. Moreover, it is interesting that our proposed model provides the variations of more parameters during the healing process at the same time, for instance, the results of $\lambda$ shown Fig. 14(b) indicates that the position where the new tissue is produced is almost the same with the position where the damage occurred. The component of the growth deformation for the original $F_{g1}(1,1)$ and the newly deposited tissues $F_{g2}(1,1)$ are also shown in Fig. 14(c) and Fig. 14(d), respectively, which illustrate the influence of growth on deformation in the healing process. To further investigate the evolution of G\&R at specific positions, four nodes (the locations shown in \cref{fig:ex.3}) are selected, and the Von Mises stress $\sigma_m$ and the magnitude of displacement $u_m=\sqrt{u_x^2+u_y^2}$ are calculated as shown in \cref{fig:3-stress-displacement}. The curves of the variations of $\sigma_m$ and $u_m$ with time shown in \cref{fig:3-stress-displacement} illustrate that the proposed model works well and can converge to the homeostatic state. As the inflation size is the critical indicator in balloon angioplasty \cite{tenaglia1997intravascular}, two inflation sizes are tested to investigate the influence of the inflation size on G\&R, as the contours of the healing parameter $H(d,t)$ and the the volume ratio of the newly deposited part $\lambda$ are shown in \cref{fig:3-different-fd}. The minimum value of the healing parameter $H(d,t)$ at $[0,100,200,400]$ days is $[0.46,0.82,0.83,0.83]$ when $r_f=1.40\ \rm mm$ compared with the corresponding results of $H(d,t)$ is $[0.17,0.74,0.77,0.79]$ when $r_f=1.48\ \rm mm$. Although a faster healing speed can be observed at the beginning of the healing process when $r_f=1.48\ \rm mm$, a larger area of unrecoverable damage remains when healing is completed. Therefore, the long-term evolution of the damage is also important and must be considered. \cref{fig:3-displacement-different-r} shows the evolution of the normalized outer artery radius $R(t)$ in the healing process, obtained by calculating the time-dependent ratio of the outer radius of the artery $R(t)=\frac{r_{oa}(t)}{r_{oa}(t=0)}$, where $r_{oa}$ is the outer radius of the artery. The variations of $R(t)$ shown in \cref{fig:3-displacement-different-r} demonstrates that the artery wall gradually changes to be thicker during the healing process and finally converges to a stable thickness at homeostatic state, this phenomenon is similar to the computational results by Braeu et al. in simulating of the thickening of arterial wall in hypertension \cite{braeu2017homogenized}. It can be explained that thickening of the wall helps restore a homeostatic state, as it decreases the wall stress back to the initial level \cite{braeu2017homogenized}. A smaller deformation for $r_f=1.48\ \rm mm$ can be illustrated by a larger unrecoverable damage, which means that litter displacement is needed to recover to the homeostatic stress state, similar to the results in Example 2. \section{Conclusions} \label{S:4} Based on the framework of thermodynamics, a new unified continuum damage model of the healing of soft biological tissues is proposed for the first time in this paper. Different from the existing damage models of soft tissue healing, all the parameters related to the healing process can be regarded as the internal variables, in the same way as the damage variable. Therefore, the evolution of these healing parameters can be strictly derived based on the theory of thermodynamics, and thus, no \textit{ad hoc} equations are required as in the existing healing models. By virtue of the proposed unified damage models, the difficultly caused by the models available in the literature, for example, their disregard of continuum mechanical requirements such as that material frame indifference, explicit time dependence of material parameters, or unclear meaning of parameters, can be well overcome. The proposed unified continuum damage model is validated by three representative numerical examples. The basic performance of the proposed model is shown through a uniaxial tension scenario, the results of which show that the proposed model can well simulate the healing process, including the occurrence of damage and the recovery process. In addition, the evolution of the volume ratio of the newly deposited tissue and the growth deformation can be well illustrated. The nonlocal healing of the proposed model is achieved by a combination of the gradient terms, good mesh independence is shown in the open-hole plate scenario, and the evolution of the volume ratios and growth deformations for both the original part and the newly deposited part for soft tissue is illustrated. The good potential of the method is demonstrated by a case of balloon angioplasty in the atherosclerotic artery with a fiber cap, where the long-term healing process in soft biological tissues after damage is simulated. The numerical results of the proposed model agree well with the existing works in indicating the occurring position of damage for artery \cite{2014Computational} and predicting the trend of variation for arterial thickness in healing process \cite{braeu2017homogenized}. The presented model is limited to 2D cases and to isotropic hyperelastic models. As collagen fibers are essential in the healing of soft tissue, the development of a 3D anisotropic model is currently in progress to address more realistic applications. The identification of newly defined healing parameters in the proposed unified model is also critical for applications to practical problems and is currently underway. In summary, a new unified continuum damage model for the healing of soft biological tissues is presented in this paper. The evolution equations of healing parameters are derived based on the theory of thermodynamics. The proposed model provides a concise and rigorous framework for the establishment of a constitutive relationship and an \textit{in silico} simulation of the healing of soft biological tissues with newly derived parameters having clear physical interpretations. The proposed model will be useful in simulating the entire surgery and recovery process of individual patients based on CT or MRI data, particularly in evaluating the risks and probability of carrying out surgical intervention. \section*{Declaration of Competing Interest} The authors declare no competing interests. \section*{CRediT author statement} {\bf Di Zuo:} Software; Validation; Writing-Original Draft. {\bf Yiqian He:} Supervision; Conceptualization; Writing-Review \& Editing. {\bf Stéphane Avril:} Writing-Review \& Editing. {\bf Haitian Yang:} Writing-Review \& Editing. {\bf Klaus Hackl:} Conceptualization; Methodology; Writing-Review \& Editing. \section*{Acknowledgments} The research leading to this paper was funded by the NSFC Grant [12072063], ERC-2014-CoG-BIOLOCHANICS [647067], grants from the State Key Laboratory of Structural Analysis for Industrial Equipment [GZ19105, S18402], the Liaoning Provincial Natural Science Foundation [2020-MS-110]. Klaus Hackl gratefully acknowledges financial support by Dalian University of Technology via a Haitian Scholarship. \clearpage \bibliographystyle{model1-num-names.bst}
\section{Introduction}\label{sec:section_1}} \input{section_1} \section{Related works}\label{sec:section_2} \input{section_2} \section{Problem definition}\label{sec:section_3} \input{section_3} \subsection{Kaleidoscopic projection constraint}\label{sec:section_4} \input{section_4} \section{Chamber assignment}\label{sec:section_5} \input{section_5} \section{Estimation of mirror parameters}\label{sec:section_6} \input{section_6} \section{Experiments}\label{sec:section_7} \input{section_7} \section{Discussion}\label{sec:section_8} \input{section_8} \section{Conclusion}\label{sec:section_9} \input{section_9} \ifCLASSOPTIONcompsoc \section*{Acknowledgments} This research is partially supported by JSPS Kakenhi Grant Number 26240023 and 18K19815. \else \section*{Acknowledgment} \fi \ifCLASSOPTIONcaptionsoff \newpage \fi \bibliographystyle{IEEEtran} \subsection{Mirrors as supplemental devices for calibration}\label{sec:related_work_1} The first group utilizes mirrors for extrinsic calibration of a camera and a reference object which is located out of its field-of-view and can be categorized into two subgroups: with planar mirrors and with non-planar mirrors. Sturm \textit{et al}. \cite{sturm06how} and Rodrigues \textit{et al}. \cite{rodorigues10camera} propose a planar-mirror based method of computing the pose of a reference object without a direct view. Hesch \textit{et al}.\cite{hesch08mirror, Hesch2010extrinsic} assume a camera-based robot in which no body parts are visible from the camera and propose a linear method of estimating their relative pose and positions with a planar mirror in a perspective-three-point (P3P) problem scenario. Takahashi \textit{et al}. \cite{takahashi12new} propose a planar mirror-based method with a minimal configuration using three mirror poses and three reference points based on orthogonality constraints. Delaunoy \textit{et al}. \cite{delaunoy2014two} calibrate a mobile device that has one display and two cameras on its front and back side by using planar mirror reflections and reconstructed scenes. Kumar \textit{et al}. \cite{kumar08simple} and Bunshnevskiy \textit{et al}. \cite{Bushnevskiy_2016_CVPR} calibrate a camera network and omnidirectional camera consisting of multiple perspective cameras with planar mirrors. Agrawal \cite{agrawal13extrinsic} calibrates by utilizing a coplanarity constraint satisfied by the reflections of eight reference points with a single spherical mirror pose. Instead of using a spherical mirror, Nitschke \textit{et al}. \cite{nitschke2011display} and Takahashi \textit{et al}. \cite{takahashi2016extrinsic} recognize the human eyeball as a spherical mirror and proposed a cornea-reflection based calibration method in a display-camera system. \subsection{Mirrors as imaging components} The second group utilizes non-planar or planar mirrors as a component of their imaging systems. Non-planar mirrors are commonly employed for widening field-of-view. One of the most common usages of non-planar mirrors in an imaging system is for capturing omnidirectional images. Scaramuzza \textit{et al}.\cite{scaramuzza2006flexible} proposes a single viewpoint omnidirectional camera with a hyperbolic mirror. In this camera system\cite{scaramuzza2006flexible}, the extrinsic parameters are estimated by solving a two-step least-squares linear minimization problem from the observations of a calibration pattern. On the other hand, planar mirrors are used for capturing multi-view images. The virtual cameras generated by planar mirrors have identical intrinsic parameters and are time-synchronized to the original camera. These can be a strong advantage for multi-view applications, such as reflectance analysis and 3D shape reconstruction. Mukaigawa \textit{et al}.\cite{mukaigawa2011hemispherical} introduce a hemispherical confocal imaging using a turtleback reflector, and Inoshita \textit{et al}.\cite{inoshita13full} use it to measure full-dimensional (8-D) BSSRDF (bidirectional scattering-surface reflectance distribution function). Nane and Nayer\cite{nane98stereo} propose a computational stereo system using a single camera and various types of mirrors, such as planar, ellipsoidal, hyperboloidal, and paraboloidal ones. In the case of a planar mirror, they calibrate this stereo system by computing a fundamental matrix from point correspondences. Gluckman and Nayer\cite{gluckman2001catadioptric} discuss the case of two planar mirrors and propose an efficient calibration method based on the ideas that the relative orientations of virtual cameras are restricted to the class of planar motion. In the context of kaleidoscopic imaging exploiting high-order multiple reflections, Ihrke \textit{et al}.\cite{ihrke2012kaleidoscopic} and Reshetouski and Ihrke\cite{reshetouski2013mirrors,reshetouski13discovering,reshetouski11three} have proposed a theory on modeling the chamber detection, segmentation, bounce tracing, shape-from-silhouette, etc.. As introduced in the previous section, the essential problems in this context are {\it chamber assignment} and {\it mirror parameters estimation}. Reshetouski and Ihrke\cite{reshetouski13discovering} solve the chamber assignment problem by utilizing constraints on an apparent 2D distances between 2D projections for the specific mirror configurations, that is, all mirrors are perpendicular to the ground plane. For automatically assigning chambers in general mirror configurations, our paper introduces the kaleidoscopic projection constraint that provides 3D information of the mirror system and proposed the efficient chamber assignment algorithm using the geometric constraints inspired by Reshetouski and Ihrke \cite{reshetouski13discovering}. Regarding the mirror parameters estimation, a per-mirror basis approach is utilized in some conventional approaches\cite{ihrke2012kaleidoscopic,reshetouski2013mirrors} without considering their kaleidoscopic, \textit{i}.\textit{e}. , multiple reflections, relationships. That is they detect a chessboard first\cite{zhang2000flexible} in each of the chambers and then estimate the mirror normals and the distances from the 3D chessboard positions in the camera frame. This per-mirror calibration can be also done by applying the algorithms in Section \ref{sec:related_work_1}. Ying \textit{et al}. \cite{ying10geometric} realized a calibration algorithm using a geometric relationship of multiple reflections that lie in a 3D circle. Ying \textit{et al}.'s approach can estimate the mirror normals and distances per mirror-pair basis without any reference object whose 3D geometry is known. However, it does not handle reflections by multiple mirrors or fully utilize kaleidoscopic relationships on multiple reflections. Compared with these approaches, the proposed method has two main advantages: \begin{itemize} \item our chamber assignment can be applied to general mirror poses, and \item our mirror parameters calibration can estimate parameters satisfying kaleidoscopic projection constraints with explicitly considering multiple reflections by multiple mirrors. \end{itemize} Furthermore, our method does not require a reference object of known geometry. That is, our method requires a single 3D point whose 3D position is not given beforehand. These advantages are realized by introducing a {\it kaleidoscopic projection constraint}. The following sections first define the geometric model of the kaleidoscopic imaging system and then introduce the kaleidoscopic projection constraint. \endinput \subsection{Notation and goals} As illustrated by Figure \ref{fig:mirror_model}, consider a 3D point $\VEC{p}$ and its reflection $\VEC{p}'$ by a mirror $\pi$. Their projections $\VEC{q}$ and $\VEC{q}'$ are given by the perspective projection: \begin{equation} \lambda \VEC{q} = A \VEC{p}, \quad \lambda' \VEC{q}' = A \VEC{p}', \label{eq:projection} \end{equation} where $A$ is the intrinsic matrix of the camera, and $\lambda$ and $\lambda'$ are the depths from the camera. Note that we assume that the intrinsic matrix is known and we use the camera coordinate system as the world coordinate system throughout the paper. Let $\VEC{n}$ and $d > 0$ denote the normal and the distance of the mirror $\pi$ satisfying \begin{equation} \VEC{n}^\top \VEC{x} + d = 0, \label{eq:planar_constraint} \end{equation} where $\VEC{x}$ is a 3D position in the scene. Here the normal vector is oriented to the camera center. As illustrated in Figure \ref{fig:mirror_model}, the distance $t$ from $\VEC{p}$ and $\VEC{p}'$ to the mirror $\pi$ satisfies: \begin{equation} \VEC{p} = \VEC{p}' + 2 t \VEC{n}. \end{equation} The projection of $\VEC{p}'$ to $\VEC{n}$ gives \begin{equation} t + d = - \VEC{n}^\top \VEC{p}'. \end{equation} By eliminating $t$ from these two equations, we have \begin{align} & \VEC{p} =-2(\VEC{n}^\top \VEC{p}'+d)\VEC{n}+\VEC{p}', \\ \Leftrightarrow & \tilde{\VEC{p}} = S \tilde{\VEC{p}}' = \begin{bmatrix} H & -2d\VEC{n}\\ \VEC{0}_{1\times 3} & 1 \end{bmatrix} \tilde{\VEC{p}}', \label{eq:householder} \end{align} where $H$ is a $3 \times 3$ Householder matrix given by $H = I_{3{\times}3} - 2 \VEC{n} \VEC{n}^\top$. $\tilde{\VEC{x}}$ denotes the homogeneous coordinate of $\VEC{x}$, and $\VEC{0}_{m{\times}n}$ denotes the $m{\times}n$ zero matrix. $I_{n\times n}$ denotes the $n \times n$ identity matrix. Note that this $S$ also satisfies inverse transformation, that is $\tilde{\VEC{p}}' = S \tilde{\VEC{p}}$. Suppose the camera observes the target 3D point directly and indirectly via $N_{\pi}$ mirrors as shown in Figure \ref{fig:multi_mirror_system}. Let $\VEC{p}_0$ denote the original 3D point and $\VEC{p}_{i}$ denote the first reflection of $\VEC{p}_0$ by the mirror $\pi_i \: (i=1,\cdots, N_{\pi})$ (Figure \ref{fig:kaleidoscopic_image}). The reflection $\VEC{p}_{i}$ satisfies \begin{align} \tilde{\VEC{p}}_{0} = S_i \tilde{\VEC{p}}_{i} = \begin{bmatrix} H_i & -2d_i\VEC{n}_i\\ \VEC{0}_{1\times 3} & 1 \end{bmatrix} \tilde{\VEC{p}}_{i}, \end{align} where $\VEC{n}_i$ and $d_i$ denote the mirror normal and its distance respectively and $H_i$ is given by $H_i = I_{3{\times}3} - 2\VEC{n}_i\VEC{n}_i^{\top}$. \begin{figure}[t] \centering \includegraphics[width=0.9\linewidth]{fig/mirror_model.pdf} \caption{The mirror geometry. A mirror $\pi$ of normal $\VEC{n}$ and distance $d$ reflects a 3D point $\VEC{p}$ to $\VEC{p}'$, and they are projected to $\VEC{q}$ and $\VEC{q}'$, respectively.} \label{fig:mirror_model} \end{figure} \begin{figure}[t] \centering \includegraphics[width=0.9\linewidth]{fig/kaleidoscopic_image.pdf} \caption{Chamber assignment. The magenta region indicates the base chamber. The red, green, and blue regions indicate the chambers corresponding to the first, second, and third reflections, respectively.} \label{fig:kaleidoscopic_image} \end{figure} Furthermore, such mirrors define virtual mirrors as a result of multiple reflections. Let $\pi_{ij} \: (i,j = 1,\cdots, N_{\pi}, \: i \neq j)$ denote the virtual mirror defined as a mirror of $\pi_j$ by $\pi_i$, $\VEC{p}_{ij}$ denote the reflection of $\VEC{p}_i$ by $\pi_{ij}$. As detailed in Hesch \textit{et al}.\cite{Hesch2010extrinsic}, the multiple reflections matrices $S_{ij}$ and $H_{ij}$ for $\pi_{ij}$ are given by \begin{equation} \begin{split} S_{ij} & = S_i S_j, \\ H_{ij} & = H_i H_j. \label{eq:hijhihj} \end{split} \end{equation} The third and further reflections, virtual mirrors, and chambers are defined in the same manner: \begin{equation} \Pi_{k=1}^{N_k} S_{i_k} \: (i_k = 1,2,3, \: i_{k} \neq i_{k+1}), \end{equation} where $N_k$ is the number of reflections. Obviously, the 3D subspaces where $\VEC{p}_0$ and $\VEC{p}_{i}$ can exist are mutually exclusive, and the captured image can be subdivided into regions called \textit{chambers} corresponding to such subspaces. Suppose the perspective projections of $\VEC{p}_x$ are denoted by $\VEC{q}_x \in Q \: (x = 0, 1,\dots, N_{\pi}, 12, 13, \dots)$ in general. In this paper, we denote the 2D region where $\VEC{q}_0$ exists as the \textit{base chamber} $L_0$\cite{reshetouski11three,reshetouski2013mirrors}, and we use $L_x$ to denote the chamber where $\VEC{q}_x$ exists. Consider a 2D point set $R = \{\VEC{r}_i\}$ detected from the captured image as candidates of $\VEC{q}_x$. To calibrate the kaleidoscopic imaging system extrinsically, two problems need to be solved: \begin{itemize} \item to assign the chamber label $L_x$ to $\VEC{r}_i \in R$ to identify to which the chamber each of the projections $\VEC{q}_x$ belongs and, \item to estimate the parameters of the real mirrors $\pi_i (i=1,\cdots,N_{\pi})$, \textit{i}.\textit{e}. , normals $\VEC{n}_i$ and distances $d_i$ of them, from kaleidoscopic projections $\VEC{q}_x$. \end{itemize} For solving these problems, we utilize a kaleidoscopic projection constraint introduced in \cite{gluckman2001catadioptric, ying10geometric, mariottini2010catadioptric}. \subsection{Base structure}\label{sec:base_structure} Suppose $2N_{\pi}$ points of the observed points $R$ are selected and could be hypothesized as $\VEC{q}_0, \VEC{q}_1, \dots$ correctly. The mirror normal $\VEC{n}_i$ has two degrees of freedom and can be linearly estimated by collecting two or more linear constraints on it. In the case of $N_{\pi}=2$, the mirror normal $\VEC{n}_1$ can be estimated as the null space of the coefficient matrix of the following system defined by the kaleidoscopic projection constraint (Eq. \eqref{eq:kaleidoscopic_projection_constraint}) using $\{\PAIR{\VEC{q}_0}{\VEC{q}_1}, \PAIR{\VEC{q}_2}{\VEC{q}_{12}}\}$ in Figure \ref{fig:base_structure} (a): \begin{equation} \begin{bmatrix} y_0 - y_1 & x_0 - x_1 & x_0 y_1 - x_1 y_0 \\ y_2 - y_{12} & x_{12} - x_2 & x_0 y_{12} - x_{12}y_0 \\ \end{bmatrix} \VEC{n}_1 = \VEC{0}_{3{\times}1}, \label{eq:kpc_use} \end{equation} where $\PAIR{\VEC{q}}{\VEC{q}'}$ denotes a \textit{doublet}\cite{reshetouski13discovering}, \textit{i}.\textit{e}. , the pair of projections $\VEC{q}$ and $\VEC{q}'$ for Eq. \eqref{eq:kaleidoscopic_projection_constraint}. \begin{figure}[t] \centering \includegraphics[width=0.9\linewidth]{fig/base_structure2.pdf} \caption{The red boxes show examples of base structures in the case of (a) $N_{\pi} = 2$ and (b) $N_{\pi} = 3$. The red point indicates the point assumed as the base chamber and the dotted boxes indicate doublets. The red dotted lines indicate the reflection pairs, and the blue lines indicate the discovered mirrors.} \label{fig:base_structure} \end{figure} \begin{figure}[t] \centering \includegraphics[width=0.8\linewidth]{fig/sign_ambiguity.pdf} \caption{Sign ambiguity of $\VEC{n}$ and corresponding triangulations. $\VEC{p}_i (i=0,1)$ and $\VEC{p}'_i$ are estimated from possible mirror parameters of $\pi_1$ and $\pi_1'$, \textit{i}.\textit{e}. , $(\VEC{n}_1, d_1)$ and $(-\VEC{n}_1, d_1)$, respectively. Both of these mirror parameters satisfy Eq. \eqref{eq:planar_constraint}, and $\VEC{p}'_i$ appears as $- \VEC{p}_i$.} \label{fig:sign_ambiguity} \end{figure} By using the estimated $\VEC{n}_1$ and assuming $d_1=1$ without loss of generality, the 3D point $\VEC{p}_1$ can be described as $\tilde{\VEC{p}}_1 = S_1\tilde{\VEC{p}}_0$ by Eq. \eqref{eq:householder}. By substituting $\VEC{p}_0$ and $\VEC{p}_1$ in this equation by using $\VEC{q}_0$ and $\VEC{q}_1$ as expressed in Eq. \eqref{eq:projection}, the 3D point $\VEC{p}_0$ and $\VEC{p}_1$ can be triangulated by solving the following linear system for $\lambda_0$ and $\lambda_1$: \begin{align} & \tilde{\VEC{p}}_0 = S_1\tilde{\VEC{p}}_1, \\ \Leftrightarrow & \lambda_0 A^{-1} \VEC{q}_0 = H_1 \lambda_1 A^{-1} \VEC{q}_1 -2\VEC{n}_1, \\ \Leftrightarrow & \begin{bmatrix} H_1 A^{-1}\VEC{q}_0 & -A^{-1}\VEC{q}_1 \\ \end{bmatrix} \begin{bmatrix} \lambda_0\\ \lambda_1 \end{bmatrix} = 2\VEC{n}_1. \label{eq:triangulation} \end{align} Note that $\VEC{n}_1$ can be determined up to sign from Eq. \eqref{eq:kpc_use}. As illustrated in Figure \ref{fig:sign_ambiguity}, both mirror parameters, $(\VEC{n}_1, d_1)$ and $(-\VEC{n}_1, d_1)$, are possible configurations in terms of Eq. \eqref{eq:planar_constraint}, but one of them triangulates $\VEC{p}_i (i=0,1)$ behind the camera. As a result, by rejecting this configuration, we obtain a unique mirror parameter. Similarly the 3D points $\VEC{p}_2$ and $\VEC{p}_{12}$ can be triangulated by solving the linear system for $\lambda_2$ and $\lambda_{12}$. Because $\VEC{p}_2$ is the reflection of $\VEC{p}_0$ by the mirror $\pi_2$, the mirror normal $\VEC{n}_2$ as well as the distance $d_2$ can be estimated as \begin{equation} \VEC{n}_2 = \frac{\VEC{p}_0 - \VEC{p}_2}{|\VEC{p}_0 - \VEC{p}_2|}, \quad\quad d_2 = - \VEC{n}_2^{\top}\frac{\VEC{p}_0 + \VEC{p}_2}{2}. \label{eq:mirror_parameters_from_3D_points} \end{equation} This doublets pair $\{\PAIR{\VEC{q}_0}{\VEC{q}_1}, \PAIR{\VEC{q}_2}{\VEC{q}_{12}}\}$ is a minimal configuration for linear estimation of the real mirror parameters in the $N_{\pi}=2$ case, and we call this minimal configuration a {\it base structure} of our chamber assignment. Note that the above doublet pair is not the unique base structure. That is, $\{\PAIR{\VEC{q}_0}{\VEC{q}_2}, \PAIR{\VEC{q}_1}{\VEC{q}_{21}}\}$ is also a base structure for $N_{\pi}=2$ case. This procedure can be generalized intuitively as an $N_{\pi} (N_{\pi} > 2)$ pair method for the $N_{\pi}$ mirror system as follows. In the case of $N_{\pi}$ mirrors, we can observe a base structure that consists of $N_{\pi}$-tuple of doublets between a 3D point and its reflection by a mirror $\pi_j$ up to the second reflections as $\PAIR{\VEC{q}_0}{\VEC{q}_j}$ and $\PAIR{\VEC{q}_i}{\VEC{q}_{ji}} \: (1 \le j \le N_{\pi} \: i=1,\dots,j-1,j+1,\dots,N_{\pi})$. By using this base structure, $\VEC{n}_j$ can be estimated first, and then $\VEC{p}_i \: (i=0,\dots,N_{\pi})$ as described for the two-mirror case. As a result, all the mirror normals and the distances can be estimated by assuming $d_1=1$. For example, a base structure of the $N_{\pi} = 3$ system illustrated in Figure \ref{fig:base_structure}(b) is 3-tuple of doublets \{$\PAIR{\VEC{q}_0}{\VEC{q}_1}$, $\PAIR{\VEC{q}_2}{\VEC{q}_{12}}$, $\PAIR{\VEC{q}_3}{\VEC{q}_{13}}$\}. This can be seen as a 6-point algorithm by considering up to the second reflections. \subsection{Geometric constraints on kaleidoscopic projections} \begin{figure}[t] \centering \includegraphics[width=0.7\linewidth]{fig/lemma_distance.pdf} \caption{The 3D point $\VEC{p}$ is closer to the camera than its reflection $\VEC{p}'$ from triangle inequality.} \label{fig:lemma_distance} \end{figure} \begin{figure}[t] \centering \includegraphics[width=0.9\linewidth]{fig/lemma_inverse_reflection.pdf} \caption{To obtain second reflections, the mirrors should be facing each other, $\VEC{n}_i^{\top}\VEC{n}_j < 0$ as in (b). In $\VEC{n}_i^{\top}\VEC{n}_j \ge 0$ cases as in (a), the first reflection $\VEC{p}_2$ on $\pi_2$ is reflected behind mirror $\pi_1$ and cannot be reflected by $\pi_1$ as the second reflection.} \label{fig:lemma_inverse_reflection} \end{figure} The procedure in Section \ref{sec:base_structure} assumes the selected points are correctly labeled as $\VEC{q}_0, \VEC{q}_1, \dots$. This section provides geometric constraints that evaluate the correctness of the hypothesized labeling. In the mirror parameter estimation in Section \ref{sec:base_structure}, the smallest singular value computed on solving Eq. \eqref{eq:kpc_use} for $\VEC{n}_1$ indicates the feasibility of interpreting the set of $N_{\pi}$ doublets as a base structure: \begin{equation} E = \frac{|e_{N_m}|}{\sum_{i=1,\cdot,N_m} |e_i|},\label{eq:pruning} \end{equation} where $e_i$ is the $i$th largest singular value of the coefficient matrix in Eq. \eqref{eq:kpc_use}. That is, once we select $2N_{\pi}$ projections in the image and hypothesize $N_{\pi}$ doublets correctly as a base structure, this should be zero in ideal conditions without noise. If the hypothesis of doublets is not appropriate, this should not be zero. This can be utilized as a geometric condition for removing inadequate hypotheses. However, $E = 0$ is not a sufficient constraint to conclude the hypothesized base structure is physically feasible in terms of a kaleidoscopic projection. In addition to this condition, the hypothesized base structure should satisfy the following two propositions inspired by Reshetouski and Ihrke \cite{reshetouski13discovering}. \begin{prop} The 3D point $\VEC{p}_0$ projected to $\VEC{q}_0$ in the base chamber is the closest point to the camera among its reflections. \end{prop} \begin{proof} As illustrated in Figure \ref{fig:lemma_distance}, the distance to the reflection $\VEC{p}'$ of $\VEC{p}$ is identical to the distance to the point of reflection $\VEC{m}'$ and the distance from $\VEC{m}'$ to $\VEC{p}$. From triangle inequality, $\VEC{p}$ is closer to the camera than $\VEC{p}'$, \textit{i}.\textit{e}. , $|\VEC{p}| < |\VEC{p}_i|$. By considering this single reflection for the case of $\VEC{p}_0$ and $\VEC{p}_i$ with the original camera, the case of $\VEC{p}_i$ and $\VEC{p}_{ji}$ with the virtual camera reflected by the mirror $\pi_j$, and so forth, we have $|\VEC{p}_0| < |\VEC{p}_i| < |\VEC{p}_{ji}| < \cdots$. \end{proof} \begin{prop} The mirror normals should satisfy $\VEC{n}_i^{\top}\VEC{n}_j < 0 \: (i \neq j)$. \end{prop} \begin{proof} The mirror parameters estimated in Section \ref{sec:base_structure} require a projection of a second reflection. As illustrated in Figure \ref{fig:lemma_inverse_reflection}, this is identical to guarantee that the mirrors are facing each other: \begin{equation} \VEC{n}_i^{\top}\VEC{n}_j < 0. \end{equation} \end{proof} These propositions are based on the same ideas described in Reshetouski and Ihrke \cite{reshetouski13discovering} and can be recognized as the extended version of them. Proposition 1 rejects configurations as illustrated in Figure \ref{fig:error_example_Nm_2_2D}(a) where $\VEC{q}_1$ is wrongly interpreted as the base chamber. Note that proposition 1 is only true for points that are not on the mirror. Proposition 2 rejects configurations as illustrated in Figure \ref{fig:error_example_Nm_2_2D}(b) where $\VEC{q}_0$ is correctly interpreted as the base chamber but $\pi_2$ reflects $\VEC{p}_{212}$ behind $\pi_1$. One of the key contributions of this paper in the chamber assignment problem is to implement such geometric constraints in a 3D space by utilizing the kaleidoscopic projection constraint, while Reshetouski \textit{et al}. \cite{reshetouski13discovering} implement them in a 2D space. As a result, their 2D formulation requires the mirrors to be orthogonal to a ground plane, while our 3D formulation does not. \begin{figure}[t] \centering \includegraphics[width=0.9\linewidth]{fig/error_example_Nm_2_2D.pdf} \caption{Configurations satisfying Eq. \eqref{eq:kpc_use} but not (a) Proposition 1 or (b) Proposition 2. The color codes are identical to Figure \ref{fig:kaleidoscopic_image}.} \label{fig:error_example_Nm_2_2D} \end{figure} \begin{algorithm*}[t] \caption{Chamber assignment algorithm} \label{alg:overview} \begin{algorithmic} \REQUIRE $\VEC{r}_i (i = 0, 1, \cdots, |R|)$ \ENSURE $\mathrm{\Lambda}_\mathrm{out} = \{ L_{\VEC{r}_0}, L_{\VEC{r}_1}, \dots, L_{\VEC{r}_{|R|}} \}$ \FORALL{base structure candidates} \STATE{compute mirror parameters $\VEC{n}_j, d_j (j = 1, \cdots, N_{\pi})$ by solving Eq \eqref{eq:kpc_use} and Eq \eqref{eq:mirror_parameters_from_3D_points}.} \IF{Eq. \eqref{eq:pruning} $\neq$ 0} \STATE{continue;} \ENDIF \IF{${}^\exists i, |\VEC{p}_0| > |\VEC{p}_{i}|$} \STATE{continue; \# Proposition 1} \ENDIF \IF{$\VEC{n}^{\top}_i\VEC{n}_j > 0$} \STATE{continue; \# Proposition 2} \ENDIF \STATE{assign chamber labels for each $\VEC{r}_i$ as described in Section \ref{sec:assignment} and obtain label set $\mathrm{\Lambda}_r$.} \STATE{compute the recall score $\mathcal{R}$ of $\mathrm{\Lambda}_r$ by Eq. \eqref{eq:recall}.} \ENDFOR \STATE{select the label set with a highest recall score as $\mathrm{\Lambda}_\mathrm{out}$.} \end{algorithmic} \end{algorithm*} \subsection{Discontinuity-aware label propagation}\label{sec:assignment_algorithm} Suppose a hypothesized base structure satisfies the above two propositions. This section introduces an algorithm that propagates the labeling to the projections not involved in the hypothesized base structure by synthesizing projections of all possible reflected points. Given the mirror parameters $\VEC{n}_i, d_i \: (i = 1,\dots,N_{\pi})$ and the triangulated 3D point $\VEC{p}_0$, the $k$th reflection and its projection can be computed by Eqs. \eqref{eq:householder} and \eqref{eq:projection}. However, if such reflection is projected outside of the corresponding chamber, it is not observable from the camera and cannot generate further reflections. This is called \textit{discontinuity}\cite{reshetouski11three}. Such discontinuity can simply be intuitively detected by examining the chamber label at the projected pixel, but this requires knowing the pixel-wise chamber labeling that is not available up to this point. Instead, we introduce another detection approach based on 3D geometry. \subsubsection{Discontinuity detection} Consider a multiply-reflected 3D point $\tilde{\VEC{p}}_{i_{k} \dots i_1} = \Pi_{j=i_1, \dots, i_k} S_j \tilde{\VEC{p}}_0$. As pointed out in Reshetouski \textit{et al}. \cite{reshetouski11three}, if this is visible from the camera, the ray from the camera center to $\VEC{p}_{i_{k} \dots i_1}$ should intersect with the mirror of the first reflection $\pi_{i_1}$ as illustrated in Figure \ref{fig:discontinuity}. Let $\ell$ denote the ray to the target point. Since the system has $N_{\pi}$ mirror planes, the above condition can be evaluated by computing the $N_{\pi}$ intersections between each of the planes and $\ell$, and by testing, if the intersection with the mirror $\pi_{i_1}$ in question is the closest among the intersections in front of the camera. \subsubsection{Label propagation for a hypothesized base structure}\label{sec:assignment} Suppose projections of the visible reflections by considering the discontinuity are synthesized as $\hat{Q} = \{ \hat{\VEC{q}}_{i_k \dots i_1} \} \: (k \ge 1, 1 \le i_x \le N_{\pi})$. The goal of the label propagation is to find correspondences between the synthesized point set $\hat{Q}$ and the observed point set $R = \{\VEC{r}_i\}$ as a sort of bipartite matching. Suppose the matching cost to associate $\hat{\VEC{q}}_{i_k \dots i_1}$ and $\VEC{r}_i$ is modeled by the 2D distance between them. The matching should minimize the total matching cost \begin{equation} \mathcal{E} = \sum_{\hat{\VEC{q}}_{i_k \dots i_1} \in \hat{Q}} ||\hat{\VEC{q}}_{i_k \dots i_1} - \hat{\VEC{r}}_{i_k \dots i_1}||,\label{eq:label_propagation} \end{equation} where $\hat{\VEC{r}}_{i_k \dots i_1} \in R$ is the point selected as the corresponding point of $\hat{\VEC{q}}_{i_k \dots i_1}$ by assigning label $L_{i_k \dots i_1}$. Since solving this combination optimization for each of the trials in our analysis-by-synthesis is computationally expensive, we approximated this process by the nearest neighbor search that simply assigns the nearest candidate. Note that we ignored the assignment of $\hat{\VEC{q}}_{i_k \dots i_1}$ whose distance is larger than a threshold in computing Eq. \eqref{eq:label_propagation}. As a result, doublets can share a candidate point in $R$ by multiple synthesized points in $\hat{Q}$, but we found this approximation is acceptable to some extent because of the sparse distribution of the points in $R$ and $\hat{Q}$. This point is discussed later in Section \ref{sec:discussion_chamber_assignment}. On the basis of this assignment, we can introduce a recall ratio $\mathcal{R}$ that measures how many of the synthesized projections that are supposed to be visible have been assigned detected points: \begin{equation} \mathcal{R} = \frac{|R_c|}{|\hat{Q}|}, \label{eq:recall} \end{equation} where $R_c \subseteq R$ is the set of detected points assigned labels, $|\hat{Q}|$ and $|R_c|$ are the sizes of the set $\hat{Q}$ and $R_c$, respectively. \begin{figure}[t] \centering \includegraphics[width=\linewidth]{fig/discontinuity.pdf} \caption{Discontinuity. The third reflection $\VEC{p}_{121}$ is not visible from the camera since the viewing ray (the green dotted line in the left image) intersects with not the mirror $\pi_1$ but $\pi_2$. The boundary of such visibility appears as the discontinuity boundary in the image (the magenta lines in the right image)\cite{reshetouski11three}.} \label{fig:discontinuity} \end{figure} \subsection{Chamber assignment algorithm}\label{sec:algrithm} Algorithm \ref{alg:overview} shows the flow of the proposed chamber assignment algorithm. For each possible base structure, it examines if it satisfies the kaleidoscopic projection constraint expressed by Eq. \eqref{eq:kpc_use}, the base chamber constraint by Proposition 1, and the mirror angle constraint by Proposition 2. Once the base structure passes these verifications, its recall ratio $\mathcal{R}$ is computed by Eq. \eqref{eq:recall}. Finally, the best estimate of the chamber assignment is returned by finding the base structure of the highest recall ratio. Note that this algorithm evaluates all possible combinations to thoroughly check the behavior of the proposed geometric constraints in Section \ref{sec:base_structure}. This approach is inspired by Reshetouski and Ihrke \cite{reshetouski13discovering}. Possible efficient implementations and effects of the above pruning are discussed in Sections \ref{sec:discussion_ransac} and \ref{sec:discussion_pruning}, respectively. \subsection{Mirror normals}\label{sec:normal} As illustrated in Figure \ref{fig:corr_proposed} (a), suppose a 3D point $\VEC{p}_0$ is projected to $\VEC{q}_0$ in the base chamber, and its mirror $\VEC{p}_i$ by $\pi_i$ is projected to $\VEC{q}_i$ in the chamber $L_i$. Likewise, the second mirror $\VEC{p}_{ij}$ by $\pi_{ij}$ is projected to $\VEC{q}_{ij}$ in the chamber $L_{ij}$, and so forth. Here, kaleidoscopic projection constraints are satisfied by two pairs of projections on each mirror $\pi_1$ and $\pi_2$. From these constraints, $\VEC{n}_1$ and $\VEC{n}_2$ can be estimated by solving \begin{equation} \begin{bmatrix} y_0 - y_1 & x_1 - x_0 & x_0 y_1 - x_1 y_0 \\ y_2 - y_{12} & x_{12} - x_2 & x_2 y_{12} - x_{12} y_2 \\ \end{bmatrix} \VEC{n}_1 = \VEC{0}_{3{\times}1}. \label{eq:n1} \end{equation} and \begin{equation} \begin{bmatrix} y_0 - y_2 & x_2 - x_0 & x_0 y_2 - x_2 y_0 \\ y_2 - y_{21} & x_{21} - x_1 & x_1 y_{21} - x_{21} y_1 \\ \end{bmatrix} \VEC{n}_2 = \VEC{0}_{3{\times}1}. \label{eq:n2} \end{equation} An important observation in this simple algorithm is the fact that (1) this is a linear algorithm even though it utilizes multiple reflections, and (2) the estimated normals $\VEC{n}_1$ and $\VEC{n}_2$ are considered to be consistent with each other even though they are computed on a per-mirror basis apparently. The first point is realized by using not the multiple reflections of a 3D position but their 2D projections. Intuitively, a reasonable formalization of kaleidoscopic projection is to define a real 3D point in the scene, and then to express that each of the projections of its reflections by Eq. \eqref{eq:householder} coincides with the observed 2D position as introduced in Section \ref{sec:ba} later. This expression, however, is nonlinear in the normals $\VEC{n}_i \: (i=1,2)$ (\textit{e}.\textit{g}. , $\VEC{p}_{12} = S_1 S_2 \VEC{p}_0$). On the other hand, projections of such multiple reflections can be associated as a result of a single reflection by Eq. \eqref{eq:kaleidoscopic_projection_constraint_high_order} directly (\textit{e}.\textit{g}. , $\VEC{n}_1$ with $\VEC{q}_{12}$ and $\VEC{q}_2$ as the projections of $\VEC{p}_{12}$ and $S_2\VEC{p}_0$, respectively). As a result, we can utilize 2D projections of multiple reflections in the linear systems above. This explains the second point as well. The above constraint on $\VEC{q}_{12}$, $\VEC{q}_2$ and $\VEC{n}_1$ in Eq. \eqref{eq:n1} assumes $\VEC{p}_2 = S_2\VEC{p}_0$ being satisfied, and this assumption on the independent mirror normals $\VEC{n}_2$ appears in the second row of \eqref{eq:n1}. Similarly, on estimating $\VEC{n}_2$ by Eq. \eqref{eq:n2}, the assumption $\VEC{p}_1 = S_1\VEC{p}_0$ is implicitly considered in the second row of Eq. \eqref{eq:n2}. Note that this algorithm can be extended to third or further reflections intuitively. For example, if $\VEC{p}_{21}$ and its reflection by $\pi_1$ is observable as $\lambda_{121}\VEC{q}_{121} = A \VEC{p}_{121} = A S_1 \VEC{p}_{21}$, then it provides \begin{equation} \left( y_{21} - y_{121}, x_{121} - x_{21}, x_{21} y_{121} - x_{121} y_{21} \right) \VEC{n}_1 = 0, \end{equation} and can be integrated with Eq. \eqref{eq:n1}. Also, this algorithm can be extended to $N_{\pi} \ge 3$ cases. In case of $N_{\pi}=3$, for example, we solve \begin{equation} \begin{bmatrix} y_0 - y_1 & x_1 - x_0 & x_0 y_1 - x_1 y_0 \\ y_2 - y_{12} & x_{12} - x_2 & x_2 y_{12} - x_{12} y_2 \\ y_3 - y_{13} & x_{13} - x_3 & x_3 y_{13} - x_{13} y_3 \\ \end{bmatrix} \VEC{n}_1 = \VEC{0}_{3{\times}1}, \end{equation} \begin{equation} \begin{bmatrix} y_0 - y_2 & x_2 - x_0 & x_0 y_2 - x_2 y_0 \\ y_3 - y_{23} & x_{23} - x_3 & x_3 y_{23} - x_{23} y_3 \\ y_2 - y_{21} & x_{21} - x_1 & x_1 y_{21} - x_{21} y_1 \\ \end{bmatrix} \VEC{n}_2 = \VEC{0}_{3{\times}1}, \end{equation} and \begin{equation} \begin{bmatrix} y_0 - y_3 & x_3 - x_0 & x_0 y_3 - x_3 y_0 \\ y_1 - y_{31} & x_{31} - x_1 & x_1 y_{31} - x_{31} y_1 \\ y_2 - y_{32} & x_{32} - x_2 & x_2 y_{32} - x_{32} y_2 \end{bmatrix} \VEC{n}_3 = \VEC{0}_{3{\times}1}, \label{eq:n3} \end{equation} instead of Eqs. \eqref{eq:n1} and \eqref{eq:n2} from point correspondences in Figure \ref{fig:corr_proposed} (b). \subsection{Mirror distances} Once the mirror normals $\VEC{n}_1$ and $\VEC{n}_2$ are given linearly, the mirror distances $d_1$ and $d_2$ can also be estimated linearly as follows. \begin{figure}[t] \centering \includegraphics[width=0.9\linewidth]{fig/correspondence_proposed.pdf} \caption{Corresponding points in (a) $N_{\pi} = 2$ and (b) $N_{\pi} = 3$ case. (a) Two pairs $\langle\VEC{q}_0,\VEC{q}_1\rangle$ and $\langle\VEC{q}_2,\VEC{q}_{12}\rangle$ (red) are available on mirror $\pi_1$ (blue). (b) Three pairs $\langle\VEC{q}_0,\VEC{q}_1\rangle$,$\langle\VEC{q}_2,\VEC{q}_{12}\rangle$ and $\langle\VEC{q}_3,\VEC{q}_{13}\rangle$(red) are available on mirror $\pi_1$ (blue)} \label{fig:corr_proposed} \end{figure} \subsubsection{Kaleidoscopic re-projection constraint} The perspective projection Eq. \eqref{eq:projection} indicates that a 3D point $\VEC{p}_i$ and its projection $\VEC{q}_i$ should satisfy the collinearity constraint: \begin{equation} (A^{-1} \VEC{q}_i) \times \VEC{p}_i = \VEC{x}_i \times \VEC{p}_i = \VEC{0}_{3{\times}1}, \label{eq:cross_i} \end{equation} where $\VEC{x}_i = \begin{pmatrix} x_i & y_i & 1 \end{pmatrix}^\top$ is the normalized camera coordinate of $\VEC{q}_i$ as defined in Section \ref{sec:section_4}. Since the mirrored points $\VEC{p}_i \: (i=1,2)$ are then given by Eq. \eqref{eq:householder} as \begin{equation} \begin{split} \VEC{p}_i & = H_i \VEC{p}_0 - 2 d_i \VEC{n}_i , \label{eq:pi} \end{split} \end{equation} we obtain \begin{equation} \begin{split} \VEC{x}_i \times \VEC{p}_i & = \VEC{x}_i \times (H_i \VEC{p}_0 - 2 d_i \VEC{n}_i), \\ & = [ \VEC{x}_i ]_\times \begin{bmatrix} H_i & -2 \VEC{n}_i \end{bmatrix} \begin{bmatrix} \VEC{p}_0 \\ d_i \end{bmatrix},\\ & = \VEC{0}_{3{\times}1}. \end{split} \end{equation} Similarly, the second reflection $\VEC{p}_{ij}$ is also collinear with its projection $\VEC{q}_{ij}$: \begin{equation} \begin{split} & (A^{-1}\VEC{q}_{ij}) \times \VEC{p}_{ij}, \\ = & [ \VEC{x}_{ij} ]_\times (H_i \VEC{p}_{j} - 2 d_i \VEC{n}_i), \\ = & [ \VEC{x}_{ij} ]_\times \left(H_i \left( H_j \VEC{p}_0 - 2 d_j \VEC{n}_j \right) -2 d_i \VEC{n}_i\right), \\ = & [ \VEC{x}_{ij} ]_\times \begin{bmatrix} H_i H_j & - 2 \VEC{n}_i & - 2 H_i \VEC{n}_j \end{bmatrix} \begin{bmatrix} \VEC{p}_0 \\ d_i \\ d_j \end{bmatrix}, \\ = & \VEC{0}_{3{\times}1}. \label{eq:cross_ij} \end{split} \end{equation} By using these constraints, we obtain a linear system of $\VEC{p}_0$, $d_1$ and $d_2$: \begin{equation} \begin{split} & \begin{bmatrix} [\VEC{x}_0]_\times & \VEC{0}_{3{\times}1} & \VEC{0}_{3{\times}1} \\ h_{1} & -2 [ \VEC{x}_{1} ]_\times \VEC{n}_1 & \VEC{0}_{3{\times}1} \\ h_{2} & \VEC{0}_{3{\times}1} & -2 [ \VEC{x}_{2} ]_\times \VEC{n}_2\\ h'_{1,2} & -2 [ \VEC{x}_{12} ]_\times \VEC{n}_1 & -2 h''_{1,2}\\ h'_{2,1} & -2 h''_{2,1} & -2 [ \VEC{x}_{21} ]_\times \VEC{n}_2\\ \end{bmatrix} \begin{bmatrix} \VEC{p}_0 \\ d_1 \\ d_2 \end{bmatrix}, \\ = & K \begin{bmatrix} \VEC{p}_0 \\ d_1 \\ d_2 \end{bmatrix} = \VEC{0}_{15{\times}1}, \label{eq:reproj} \end{split} \end{equation} where $h_{i} = [ \VEC{x}_{i} ]_\times H_i$, $h'_{i,j} = [ \VEC{x}_{ij} ]_\times H_i H_j$, $h''_{i,j} = [ \VEC{x}_{ij} ]_\times H_i \VEC{n}_j$. By computing the eigenvector corresponding to the smallest eigenvalue of $K^\top K$, $(\VEC{p}_0, d_1, d_2)^\top$ can be determined up to a scale factor. In this paper, we choose the scale that normalizes $d_1 = 1$. Note that Eq. \eqref{eq:reproj} apparently has 15 equations, but only 10 of them are linearly independent. This is simply because each cross product by Eqs. \eqref{eq:cross_i} and \eqref{eq:cross_ij} has only two independent constraints by definition. Also, as discussed in Section \ref{sec:normal}, the above algorithm can be extended to third or further reflections and $N_{\pi} \ge 3$ cases as well. In $N_{\pi}=3$, considering the reflection of $\VEC{p}_{23}$ by $\pi_1$ as $\lambda_{123}\VEC{q}_{123} = A \VEC{p}_{123} = A S_1 \VEC{p}_{23}$, we have \begin{equation} [\VEC{x}_{123}]_\times \begin{bmatrix} (H_1 H_2 H_3)^\top \\ -2\VEC{n}_1^\top \\ -2 (H_1 \VEC{n}_2)^\top \\ -2 (H_1 H_2 \VEC{n}_3)^\top \end{bmatrix}^\top \begin{bmatrix} \VEC{p}_0 \\ d_1 \\ d_2 \\ d_3 \end{bmatrix} = \VEC{0}_{3{\times}1}. \end{equation} \subsection{Kaleidoscopic bundle adjustment}\label{sec:ba} The 3D position of $\VEC{p}_0$ can be estimated by solving Eq. \eqref{eq:reproj}. By reprojecting this $\VEC{p}_0$ to each of the chambers as \begin{equation} \begin{split} \lambda \hat{\VEC{q}}_0 & = A \VEC{p}_0, \\ \lambda \hat{\VEC{q}}_{i} & = A S_i \VEC{p}_0 \: (i=1,2), \\ \lambda \hat{\VEC{q}}_{i,j} & = A S_i S_j \VEC{p}_0 \: (i,j=1,2, \: i \neq j), \end{split} \end{equation} we obtain a reprojection error as \begin{equation} \VEC{E}(\VEC{p}_0, \VEC{n}_1, \VEC{n}_2, d_1, d_2) = \begin{bmatrix} \VEC{q}_0 - \hat{\VEC{q}}_0, \VEC{e}_1, \VEC{e}_2, \VEC{e}'_{1,2}, \VEC{e}'_{2,1}, \end{bmatrix}^\top, \label{eq:reproj_error_vec} \end{equation} where $\VEC{e}_i = \VEC{q}_i - \hat{\VEC{q}}_i$ and $\VEC{e}'_{i,j} = \VEC{q}'_{i,j} - \hat{\VEC{q}}'_{i,j}$. By minimizing $|| \VEC{E}(\cdot) ||^2$ nonlinearly over $\VEC{p}_0, \VEC{n}_1, \VEC{n}_2, d_1, d_2$, we obtain a best estimate of the mirror normals and the distances. Compared with the earlier version of this work \cite{takahashi17linear}, we parameterize the $\VEC{p}_0$ and minimize their reprojection errors explicitly by following the bundle adjustment manner presented in \cite{hartley00multiple}. \subsection{Chamber assignment}\label{sec:eval_chamber_assignment} \subsubsection{Experimental environment} The performance of the chamber labeling is evaluated in the following $N_{\pi} = 2$ and $N_{\pi} = 3$ scenarios (Figure \ref{fig:multi_mirror_system}). \begin{enumerate} \item two-mirror system using up to third reflections $\VEC{r}_i (i = 0, \cdots, 6)$ (Figure \ref{fig:simulation_setup}(a)) \item three-mirror system using up to second reflections $\VEC{r}_i (i = 0, \cdots, 9)$ (Figure \ref{fig:simulation_setup}(b)) \end{enumerate} In the latter case with three mirrors, the mirrors are tilted at 5 degrees approximately in order to evaluate the performance with mirrors non-orthogonal to each other. In both scenarios, we used a camera of $1600\times1200$ resolution whose intrinsic matrix $A = [1000, 0, 800; 0, 1000, 600; 0, 0, 1]$. The performance is evaluated by the accuracy of labeling defined by \begin{equation} E_m = N_{m:\mathrm{correct}} / N_{m}, \end{equation} where $N_{m}$ is the number of $m$th reflections and $N_{m:\mathrm{correct}}$ is the number of projections labeled correctly. \begin{figure}[t] \centering \includegraphics[width=0.95\linewidth]{fig/simulation_setup.pdf} \caption{Mirror configurations. The red, green and blue regions indicate the chambers corresponding to the first, second, and third reflections, respectively. The bold blue lines indicate the real mirror positions.} \label{fig:simulation_setup} \end{figure} \subsubsection{Quantitative evaluations with synthesized data} Figures \ref{fig:simulation_Nm_2} and \ref{fig:simulation_Nm_3} report the average accuracy of our labeling in cases of $N_{\pi} = 2$ and $N_{\pi} = 3$, respectively, under different conditions: (a) with Proposition 1 only, (b) with Proposition 2 only, and (c) with Propositions 1 and 2. In these figures, the magenta, red, green, and blue plots indicate the accuracy of labeling 0th, 1st, 2nd, and 3rd reflections, respectively. $\sigma_{\VEC{r}}$ denotes the standard deviation of zero-mean Gaussian pixel noise injected to the positions of the input points $\VEC{r} \in R$, and the average accuracy is computed from the results of 50 trials at each noise level. \begin{figure*}[t] \centering \includegraphics[width=0.9\linewidth]{fig/simulation_Nm_2.pdf} \caption{The average accuracy of labeling in $N_{\pi}=2$ scenario. (a) with Proposition 1, (b) with Proposition 2, and (c) with Propositions 1 and 2} \label{fig:simulation_Nm_2} \end{figure*} \begin{figure*}[t] \centering \includegraphics[width=0.9\linewidth]{fig/simulation_Nm_3_3_2.pdf} \caption{The average accuracy of labeling in $N_{\pi}=3$ scenario. (a) with Proposition 1, (b) with Proposition 2, and (c) with Propositions 1 and 2} \label{fig:simulation_Nm_3} \end{figure*} Figure \ref{fig:error_example_Nm_2} shows failure cases in Figures \ref{fig:simulation_Nm_2}(a) and \ref{fig:simulation_Nm_2}(b). In Figure \ref{fig:error_example_Nm_2}(a), the mirror $\pi_1$ is reconstructed between $\VEC{r}_2$ and $\VEC{r}_4$, and $\pi_2$ is reconstructed between $\VEC{r}_0$ and $\VEC{r}_2$. These mirrors correspond to $\pi_{21}$ and $\pi_{2}$ in the original configuration (Figure \ref{fig:simulation_setup}(a)), and such chamber assignment can result in a good reprojection error and a good recall ratio (Eq. \eqref{eq:recall}) but violating Proposition 2. In case of Figure \ref{fig:error_example_Nm_2}(b), the labeling is valid in terms of the reprojection error and the mirror angle but not in terms of Proposition 1. \begin{figure}[t] \centering \includegraphics[width=0.9\linewidth]{fig/error_example_Nm_2.pdf} \caption{Failure cases. (a): The mirror $\pi_1'$ is reconstructed between $\VEC{r}_2$ and $\VEC{r}_4$, and $\pi_2'$ is reconstructed between $\VEC{r}_0$ and $\VEC{r}_2$. (b): The labeling is not valid in terms of the base chamber selection.} \label{fig:error_example_Nm_2} \end{figure} \begin{figure}[htbp] \centering \includegraphics[width=0.9\linewidth]{fig/real_data_setup_ca.pdf} \caption{A illustration of a capture system (left) and a captured image (right). It consists of planar first surface mirrors and a camera.} \label{fig:real_data_setup} \end{figure} These results show that (1) our method can estimate the correct labeling in the ideal case without noise, and (2) the two propositions can improve the accuracy. In addition, these results prove experimentally that our method can work with non-orthogonal mirrors whereas the state-of-the-art algorithm\cite{reshetouski13discovering} assumes mirrors to be orthogonal to a common ground plane. \begin{figure*}[t] \centering \includegraphics[width=0.9\linewidth]{fig/real_data_results_ca.pdf} \caption{Chamber assignment results. The labels denote the assigned chambers, and the magenta, red, green, and blue are superimposed on the direct, the first, the second, and the third reflections.} \label{fig:real_data_results} \end{figure*} One of the main reasons for the degraded accuracy in the noisy condition is the performance of the mirror parameter estimation defined in Section \ref{sec:base_structure}. Since it minimizes the number of input points, the accuracy of the estimated mirror parameters can be sensitive to noise, and hence the projections of the reflections computed using such mirror parameters can fall far from the expected candidate points. \begin{figure}[t] \centering \includegraphics[width=0.6\linewidth]{fig/chessboard.pdf} \caption{A capture of a chessboard used as the reference object for conventional methods.} \label{fig:chessboard} \end{figure} \subsubsection{Qualitative evaluations with real data} Figure \ref{fig:real_data_setup} shows our mirror-based imaging system. We used planar first surface mirrors and captured images with Nikon D600 (resolution $6016{\times}4016$). The intrinsic parameter $A$ of the camera is calibrated by Zhang's method \cite{zhang2000flexible} in advance. Note that we used a chessboard in order to obtain the precise corner points and gave them to the proposed method as input after removing the label information. Figure \ref{fig:real_data_results} shows the chamber assignment results by our method for different mirror numbers and different numbers of reflections. We used projections of a single corner point in the images. The labels $L_0, L_1, \dots$ indicate the assigned chambers, and the target objects are superimposed by colors in accordance with the number of reflections. In the case of $N_{\pi} = 3$, each of the mirrors is tilted at about 5 degrees. In the two mirrors cases ((a) and (b)), we can see that the proposed method estimates up to the third reflections correctly. While it fails to estimate the third reflections due to the observation noise in the three mirror cases ((c) and (d)), it estimates up to the second reflections correctly, which is needed for the calibration step. From these results, we can observe that our method can successfully estimate the mirror system structure automatically in practice. \subsection{Mirror parameter estimation} This section provides evaluations of the performance of the proposed method in terms of mirror parameter estimation. In this evaluation, we used the same camera used in Section \ref{sec:eval_chamber_assignment}. The proposed method was compared with the following conventional algorithms. The baseline and orthogonality constraint-based method utilize a reference object of known geometry as shown in Figure \ref{fig:chessboard}. Since the orthogonality constraint-based approach \textit{et al}.\cite{takahashi12new} require more than two mirrors, we evaluate in $N_{\pi}=3$ configuration. \begin{figure}[t] \centering \includegraphics[width=0.5\linewidth]{fig/correspondence_takahashi.pdf} \caption{Corresponding points for the orthogonality constraint\cite{takahashi12new}. Four pairs $\langle\VEC{p}_{1}, \VEC{p}_{2}\rangle$, $\langle\VEC{p}_{0}, \VEC{p}_{21}\rangle$, $\langle\VEC{p}_{12}, \VEC{p}_{0}\rangle$, and $\langle\VEC{p}_{13}, \VEC{p}_{23}\rangle$ are available for the intersection $\VEC{m}_{12} = \VEC{n}_1 \times \VEC{n}_2$.} \label{fig:corr_takahashi} \end{figure} {\bf[Baseline]} This baseline method is based on the simple bundle adjustment approach with the checkerboard as described in \cite{reshetouski11three}. Since the 3D geometry of the reference object is known, the 3D positions of the real image $\VEC{p}_0^{(l)}$ and their reflections $\VEC{p}_i^{(l)}$ and $\VEC{p}_{i,j}^{(l)}$ can be estimated by solving perspective-n-point (PnP)\cite{lepetit08epnp}. Here the superscript ${}^{(l)}$ indicates the $l$th landmark in the reference object. Once $N_l$ such landmark 3D positions are given, then the mirror normals can be computed simply by \begin{equation} \begin{split} \VEC{n}_1 = \sum_l^{N_l} \VEC{l}_{1,2,3}^{(l)} / \left\|\sum_l^{N_l} \VEC{l}_{1,2,3}^{(l)}\right\|, \\ \VEC{n}_2 = \sum_l^{N_l} \VEC{l}_{2,3,1}^{(l)} / \left\|\sum_l^{N_l} \VEC{l}_{2,3,1}^{(l)}\right\|, \\ \VEC{n}_3 = \sum_l^{N_l} \VEC{l}_{3,1,2}^{(l)} / \left\|\sum_l^{N_l} \VEC{l}_{3,1,2}^{(l)}\right\|, \\ \end{split} \end{equation} where $\VEC{l}_{i,j,k}^{(l)} = \VEC{p}_{i}^{(l)} - \VEC{p}_{0}^{(l)} + \VEC{p}_{ij}^{(l)} - \VEC{p}_{j}^{(l)} + \VEC{p}_{ik}^{(l)} - \VEC{p}_{k}^{(l)}$, and then the mirror distances can be computed by \begin{equation} \begin{split} d_1 = \frac{1}{6{N_l}}\VEC{n}_1^\top\sum_l^{N_l}\left( \sum_{i=0}^3 \left( \VEC{p}_{i}^{(l)} \right) + \VEC{p}_{12}^{(l)} + \VEC{p}_{13}^{(l)}\right),\\ d_2 = \frac{1}{6{N_l}}\VEC{n}_2^\top\sum_l^{N_l}\left( \sum_{i=0}^3 \left( \VEC{p}_{i}^{(l)} \right) + \VEC{p}_{23}^{(l)} + \VEC{p}_{21}^{(l)}\right),\\ d_3 = \frac{1}{6{N_l}}\VEC{n}_3^\top\sum_l^{N_l}\left( \sum_{i=0}^3 \left( \VEC{p}_{i}^{(l)} \right) + \VEC{p}_{31}^{(l)} + \VEC{p}_{32}^{(l)}\right).\\ \end{split} \end{equation} Note that the above PnP procedure requires a non-linear reprojection error minimization process in practice. \begin{figure*}[t] \centering \includegraphics[width=1\linewidth]{./fig/simulation_noise_calib.pdf} \caption{Estimation errors at different noise levels $\sigma_{\VEC{q}}$. Since the reprojection errors $E_{rep}$ after bundle adjustment are close to each other, $E_{rep}$ at $\sigma_{\VEC{q}}=1.0$ are also reported in Fig.~\ref{fig:label} with legends.} \label{fig:simulation_noise} \end{figure*} \begin{figure*}[t] \centering \includegraphics[width=1\linewidth]{./fig/simulation_point_calib.pdf} \caption{Estimation errors at different numbers of reference points $N_p$. Legends are provided in Figure \ref{fig:label}. The results after bundle adjustment are almost the same.} \label{fig:simulation_point} \end{figure*} {\bf[Absolute conic based approach]} Ying \textit{et al}.\cite{ying10geometric,ying13self} provided some important insights on mirror reflections, such as the multi-reflections of a 3D point lie in a 3D circle $\Omega_{3D}$ that is imaged into a conic $\Omega$. The circular points can be determined by the intersection of this projected conic and the absolute conic computed from the intrinsic parameters. These circular points provide a rectification matrix that transform the projected conic to a 3D circle $\Omega'_{3D}$. By solving the conventional PnP problem between the 3D points on $\Omega'_{3D}$ and the 2D points on $\Omega$, the coordinates of the 3D points on $\Omega'_{3D}$ in camera coordinate system can be computed. On the basis of this procedure, for example, the mirror normal $\VEC{n}_1$ and $\VEC{n}_2$ can be estimated from mirror reflections of a single 3D point consisting of a 3D circle, $\VEC{p}_0, \VEC{p}_{1}, \VEC{p}_{2}, \VEC{p}_{12}, \VEC{p}_{21}$, as follows, \begin{equation} \begin{split} \VEC{n}_0 &= (\VEC{p}_1 - \VEC{p}_0) / ||\VEC{p}_1 - \VEC{p}_0||, \\ \VEC{n}_1 &= (\VEC{p}_2 - \VEC{p}_0) / ||\VEC{p}_2 - \VEC{p}_0||. \end{split} \end{equation} In the case of $N_m = 3$, the two candidates of each mirror parameter can be obtained, for example $\VEC{n}_1$ from two point sets ($\VEC{p}_0, \VEC{p}_1, \VEC{p}_{2}, \VEC{p}_{12}, \VEC{p}_{21}$) and ($\VEC{p}_0, \VEC{p}_1, \VEC{p}_3, \VEC{p}_{13}, \VEC{p}_{31}$). In addition, the $N_p$ 3D points produce $N_p$ variations of the mirror parameters on the basis of this procedure. Here, we utilized the average of each parameter as the output of this approach in these evaluations. {\bf[Orthogonality constraint based approach]} As pointed out by Takahashi\textit{et al}.\cite{takahashi12new}, two 3D points $\VEC{p}_i$ and $\VEC{p}_j$ defined as reflections of a 3D point by different mirrors of normal $\VEC{n}_i$ and $\VEC{n}_j$ respectively satisfy an orthogonality constraint: \begin{equation} \left( \VEC{p}_i - \VEC{p}_j \right)^\top \left( \VEC{n}_i \times \VEC{n}_j \right) = \left( \VEC{p}_i - \VEC{p}_j \right)^\top \VEC{m}_{ij} = 0. \label{eq:orthogonality} \end{equation} As illustrated by Figure \ref{fig:corr_takahashi}, this constraint on $\VEC{m}_{12}$ holds for four pairs $\langle\VEC{p}_{1}, \VEC{p}_{2}\rangle$, $\langle\VEC{p}_{0}, \VEC{p}_{21}\rangle$, $\langle\VEC{p}_{12}, \VEC{p}_{0}\rangle$, and $\langle\VEC{p}_{13}, \VEC{p}_{23}\rangle$ as the reflections of $\VEC{p}_0$, $\VEC{p}_1$, $\VEC{p}_2$, and $\VEC{p}_3$, respectively. Similarly, $\langle\VEC{p}_{2}, \VEC{p}_{3}\rangle$, $\langle\VEC{p}_{21}, \VEC{p}_{31}\rangle$, $\langle\VEC{p}_{0}, \VEC{p}_{32}\rangle$, and $\langle\VEC{p}_{23}, \VEC{p}_{0}\rangle$ can be used for computing $\VEC{m}_{23} = \VEC{n}_2 \times \VEC{n}_3$, and $\langle\VEC{p}_{3}, \VEC{p}_{1}\rangle$, $\langle\VEC{p}_{31}, \VEC{p}_{0}\rangle$, $\langle\VEC{p}_{32}, \VEC{p}_{12}\rangle$, and $\langle\VEC{p}_{0}, \VEC{p}_{13}\rangle$ can be used for $\VEC{m}_{31} = \VEC{n}_3 \times \VEC{n}_1$. Once the intersection vectors $\VEC{m}_{12}$, $\VEC{m}_{23}$, and $\VEC{m}_{31}$ are obtained, the mirror normals and the distances can be estimated linearly as described in Takahashi\textit{et al}. \cite{takahashi12new}. In addition to the above methods, we also compared the proposed method with its earlier version\cite{takahashi17linear} in which the 3D points were restricted to be on the line through its 2D observations in the base chamber, while the proposed method does not have this limitation as described in Section \ref{sec:ba}. \begin{figure}[t] \centering \includegraphics[width=1\linewidth]{./fig/simulation_iter_calib.pdf} \caption{Number of iterations until convergence at different $\sigma_{\VEC{q}}$ with $N_p=5$ (left) and at different $N_p$ with $\sigma_{\VEC{q}}=1$ (right). Legends are provided in Figure \ref{fig:label}.} \label{fig:simulation_iteration} \end{figure} \begin{figure}[t] \centering \centering \includegraphics[width=\linewidth]{./fig/simulation_legend_calib.pdf} \caption{Legends and $E_{rep}$ at $\sigma_{\VEC{q}}=1$ in Figure \ref{fig:simulation_noise} for each configurations.} \label{fig:label} \end{figure} The following three error metrics are used in this section to evaluate the performance of the proposed method in comparison with the above-mentioned conventional approaches quantitatively. The average estimation error of normal $E_{\VEC{n}}$ measures the average angular difference from the ground truth by \begin{equation} E_{\VEC{n}} = \frac{1}{3} \sum_{i=1}^3 \left|\cos^{-1}(\VEC{n}_i^\top \check{\VEC{n}}_{i}) \right|, \end{equation} where $\check{\VEC{n}}_i \: (i=1,2,3)$ denotes the ground truth of the normal $\VEC{n}_{i}$. The average estimation error of distance $E_{d}$ is defined as the average $L_1$-norm to the ground truth: \begin{equation} E_{d} = \frac{1}{3} \sum_{i=1}^{3} |d_i - \check{d}_{i}|, \end{equation} where $\check{d}_{i} \: (i=1,2,3)$ denotes the ground truth of the distance $d_{i}$. Also, the average reprojection error $E_\mathrm{rep}$ is defined as: \begin{equation} E_\mathrm{rep} = \frac{1}{10{N_l}} \sum_{l=1}^{{N_l}} \left| \VEC{E}^{(l)}(\VEC{p}_0, \VEC{n}_1, \VEC{n}_2, \VEC{n}_3, d_1, d_2, d_3) \right|, \end{equation} where $\VEC{E}^{(l)}(\cdot)$ denotes the reprojection error $\VEC{E}(\cdot)$ defined by Eq. \eqref{eq:reproj_error_vec} at $l$th point. \subsubsection{Quantitative evaluations with synthesized data} This section provides a quantitative performance evaluation using a synthesized dataset. A virtual camera and three mirrors are arranged in accordance with the real setup (Figure \ref{fig:setup}). By virtually capturing 3D points simulating a reference object, the corresponding 2D kaleidoscopic projections used as the ground truth are generated first, and then random pixel noise is injected to them at each trial of calibration. Figures \ref{fig:simulation_noise} and \ref{fig:simulation_point} report average estimation errors $E_{\VEC{n}}$, $E_d$, $E_\mathrm{rep}$ over 100 trials at different noise levels and different numbers of reference points. In these figures $\sigma_{\VEC{q}}$ denotes the standard deviation of zero-mean Gaussian pixel noise and $N_p$ denotes the number of 3D points used in the calibration. In Figure \ref{fig:simulation_iteration}, $N_\mathrm{iter}$ denotes the number of iterations required by the kaleidoscopic bundle adjustment in each evaluation. Figure \ref{fig:label} shows the legends of lines in Figures \ref{fig:simulation_noise} - \ref{fig:simulation_iteration} and reprojection errors $E_{rep}$ of each method at $\sigma_{\VEC{q}} = 1$. \begin{figure}[t] \centering \includegraphics[width=\linewidth]{./fig/configuration.pdf} \caption{A kaleidoscopic capture setup for 3D reconstruction. It consists of three first surface mirrors, a camera, and a laser projector.} \label{fig:setup} \end{figure} \begin{figure}[t] \centering \includegraphics[width=0.6\linewidth]{./fig/image_real_data_calib.pdf} \caption{Calibration results. The colored lines in the bottom illustrate $d \VEC{n}$ (\textit{i}.\textit{e}. , the foot of perpendicular from the camera center) of each mirror. Here magenta, gray, cyan, yellow lines represents the results by proposed method, ying \textit{et al}.\cite{ying10geometric,ying13self}, takahashi\textit{et al}.\cite{takahashi12new}, and baseline respectively. Their results were almost the same. The 10 patterns in the top illustrate the 3D points estimated by PnP.} \label{fig:real_chess} \end{figure} \begin{figure}[t] \centering \includegraphics[width=0.7\linewidth]{./fig/cat.png} \caption{Reconstructed 3D shape of {\it cat} object.} \label{fig:ststereo} \end{figure} As shown in Figure \ref{fig:label}, the magenta and red lines denote the results by the proposed method with and without the kaleidoscopic bundle adjustment (Section \ref{sec:ba}). The proposed method uses kaleidoscopic projections of five random non-planar 3D points, while the dashed red and magenta lines are the results with planar five points simulating the chessboard (Figure \ref{fig:chessboard}). The light and dark green lines are the results with a single 3D point generated randomly followed by the kaleidoscopic bundle adjustment or not. Besides, the blue line is the result of the kaleidoscopic bundle adjustment with five points to the linear solutions from a single point. The black line is the result of the absolute conic based approach \cite{ying10geometric,ying13self} with five input points, and the gray line is the result by applying our kaleidoscopic bundle adjustment to it. The yellow and cyan dashed lines are the results by the orthogonality constraint-based approach \cite{takahashi12new} and the baseline with the same five points for the red and magenta dashed lines. The orange line shows the result of the earlier version of this work \cite{takahashi17linear} with five input points. Note that the baseline and the orthogonality constraint-based approach \cite{takahashi12new} without the final non-linear optimization could not achieve comparable results (typically $E_\mathrm{rep} \gg 10$ pixels). Also, these methods using 3D reference positions without applying non-linear refinement after a linear PnP\cite{lepetit08epnp} could not estimate valid initial parameters for the final non-linear optimization. Therefore, they are omitted in these figures. From both Figs. \ref{fig:simulation_noise} and \ref{fig:simulation_point}, we can observe the linear solutions by the proposed method outperform those by the absolute conic based approach\cite{ying10geometric,ying13self}. This is because each mirror parameter is implicitly constrained by the other mirrors in the proposed method, such as in Eqs. \eqref{eq:n1} and \eqref{eq:n2}, whereas they are estimated on an apparently per-mirror basis in the absolute conic based approach. This improvement of linear solutions can contribute to reduce the computational cost as shown in Figure \ref{fig:simulation_iteration}. Additionally, increasing the number of reference points improves the estimation accuracy of all methods as shown in Figure \ref{fig:simulation_point}. These figures also show that the optimized results are close to each other, but as reported in Figure \ref{fig:label}, the proposed method with non-planar points and kaleidoscopic bundle adjustment approach outperforms the other methods in terms of reprojection error. Besides, the non-planar based methods are slightly better than the planar based method in Figure \ref{fig:simulation_point}. This is because the randomly scattered non-planar points in a 3D space give stronger constraints for 3D analysis than the points on a single plane. Whereas the Baseline method and Orthogonality constraint-based method require a reference object of known geometry, such as a chessboard, the proposed method does not. Using this feature, the proposed method can simultaneously estimate the camera parameters and 3D structure of a 3D object. From these results, we can conclude that the proposed method is precise, effective, and practical. \subsection{Qualitative evaluations with real data} Figure \ref{fig:setup} shows our kaleidoscopic capture setup. The intrinsic parameter $A$ of the camera (Nikon D600, $6016{\times}4016$ resolution) is calibrated beforehand\cite{zhang2000flexible}, and the camera observes the target object \textit{cat} (about $4\times5\times1$ cm) with three planar first surface mirrors. The projector (MicroVision SHOWWX+ Laser Pico Projector, $848{\times}480$ resolution) is used to cast line patterns to the object for simplifying the correspondence search problem in a light-sectioning fashion (Figure \ref{fig:setup} left), and the projector itself is not involved in the calibration \textit{w}.\textit{r}.\textit{t}. the camera and the mirrors. \begin{table}[tb] \centering \caption{The reprojection errors of linear solutions and optimized solutions by each method. The $E_{rep}$ (all) column reports the average reprojection error of all the points. The 0th, 1st, and 2nd ref columns report the average error of the direct observations, that of the first and second reflections respectively.}\label{tb:real_data_reps} \begin{tabular}{ccccc} Method & $E_{rep}$ (all) & 0th ref & 1st ref & 2nd ref\\ \hline\hline Proposed (linear) & 5.49 & 2.84 & 3.42 & 6.97\\ Proposed (BA) & 3.85 & 4.24 & 3.55 & 3.94\\ Ying \textit{et al}. \cite{ying10geometric,ying13self} (linear) & 317.91 & 273.31 & 302.38 & 333.11 \\ Ying \textit{et al}. \cite{ying10geometric,ying13self} (BA) & 3.88 & 4.18 & 3.61 & 3.96\\ Takahashi \textit{et al}. \cite{takahashi12new} (linear) & 433.43 & 330.52 & 420.98 & 456.80\\ Takahashi \textit{et al}. \cite{takahashi12new} (BA) & 3.88 & 3.83 & 3.67 & 4.00\\ Baseline (linear) & 618.21 & 351.60& 495.74 & 723.88\\ Baseline (BA) & 3.84 & 3.88 & 3.98 & 3.76\\ \end{tabular} \end{table} Figure \ref{fig:chessboard} shows a captured image of a chessboard, and Figure \ref{fig:real_chess} shows the mirror normals and distances calibrated by the proposed and conventional methods. In addition, Table \ref{tb:real_data_reps} reports the reprojection errors of linear solutions and optimized solutions by each method. The results show that the performance of each method after applying the kaleidoscopic bundle adjustment has the same tendency reported in the simulation results. The optimized reprojection errors are higher than those in the simulation results. This is because of the localization accuracy of corresponding points and nonplanarity of mirrors. Figure \ref{fig:ststereo} shows a 3D rendering of the estimated 3D shape using the mirror parameters calibrated by the proposed method, while the residual reprojection error indicates the parameters can be further improved for example through the 3D shape reconstruction process itself\cite{furukawa2009accurate}. From these results, we can conclude that the proposed method performs reasonably and provides sufficiently accurate calibration for 3D shape reconstruction. \subsection{Ambiguity of chamber assignment} In the case of the 8-point algorithm for the regular two-view extrinsic calibration\cite{hartley00multiple}, the linear algorithm returns four possible combinations of the rotation and the translation, and we can choose the right combination by examining if triangulated 3D points appear in front of the cameras. The mirror normal estimation in Section \ref{sec:base_structure} is a special case of the 8-point algorithm, and this has such sign ambiguity on the mirror normal as described in Section \ref{sec:base_structure}. This ambiguity is also solved by considering the result of triangulation. In other words, estimating the essential matrix is identical to estimating the mirror normal. In addition to the sign ambiguity, the normal estimation for the kaleidoscopic system has another family of ambiguity due to multiple reflections. As introduced in Section \ref{sec:base_structure}, particular combinations of kaleidoscopic projections can return physically infeasible solutions, and they can be rejected by additional geometric constraints as done for the 8-point algorithm. However, there exists another class of solutions due to a \textit{sparse sampling} of the observations. Consider a base structure by the pairs $\PAIR{\VEC{q}_0}{\VEC{q}_{12}}$ and $\PAIR{\VEC{q}_2}{\VEC{q}_{121}}$ in Figure \ref{fig:kaleidoscopic_image}. This configuration can estimate the mirror parameters successfully, one between $\VEC{p}_0$ and $\VEC{p}_2$, and the other between $\VEC{p}_0$ and $\VEC{p}_{12}$. Although the latter is a virtual mirror, this interpretation satisfies all the constraints in Section \ref{sec:base_structure}. In other words, we can assemble a mirror system of this configuration in practice. To solve this problem, Section \ref{sec:assignment} utilizes the recall ratio (Eq. \eqref{eq:recall}) so that our algorithm returns the solution that reproduces as many as possible candidates points $\VEC{r}$ observed in the image. \subsection{Approximation in label propagation}\label{sec:discussion_chamber_assignment} As described in Section \ref{sec:section_5}, we approximated the original chamber assignment algorithm by the nearest neighbor search. The evaluations experimentally prove that this approximation can substitute the original algorithm since the proposed algorithm worked correctly in most of the cases, particularly for the direct and the first reflections. For multiple reflections with noisy inputs, the assignment accuracy is degraded. This can be attributed to the accuracy of the mirror normal estimation itself being degraded and the projections of multiple reflections being able to be synthesized with large reprojection errors. \subsection{RANSAC or PROSAC approach for chamber assignment}\label{sec:discussion_ransac} Although the proposed algorithm examines all possible base structures as introduced in Algorithm \ref{alg:overview} to evaluate the performance thoroughly, we can also consider a RANSAC (random sample consensus) or PROSAC (progressive sample consensus) approach\cite{chum2005matching}. For example, we can first hypothesize the base chamber from $N_r$ candidates and then can consider only $N_{\pi} + 1$ nearest points around it for estimating the mirror parameters. The other idea is to hypothesize the base chamber and to add some geometric procedures such as flipping the point pairs for finding the correct labeling efficiently. Designing and evaluating such an approach is one of our future works. \subsection{Pruning of base structure candidates}\label{sec:discussion_pruning} As described in Section \ref{sec:section_5}, our chamber assignment algorithm firstly lists all candidates of labeling of the base structure and prunes inappropriate candidates by using three geometric constraints, \textit{i}.\textit{e}. , Eq. \eqref{eq:pruning}, Proposition 1, and Proposition 2. This section demonstrates how many candidates are removed by these constraints experimentally. \begin{table}[tb] \centering \caption{The number and percentage of candidates that passed each pruning constraint in case of $\sigma_{\VEC{q}}=0$ and $\sigma_{\VEC{q}}=2$. Note that the total number of candidates is $151,200$.}\label{tb:pruning_noise_0} \begin{tabular}{ccc} Constraints & $\sigma_{\VEC{q}} = 0$ & $\sigma_{\VEC{q}} = 2$\\ \hline\hline Eq. \eqref{eq:pruning} & 3,552 (2.33 \%) & 4,608 (3.05 \%)\\ Proposition 1 & 25,200 (16.67 \%) & 25,200 (16.67 \%)\\ Proposition 2 & 3,386 (2.24 \%)& 2,996 (1.98 \%)\\ Proposition 1 and 2 & 796 (0.53 \%)& 492 (0.33 \%)\\ All & 36 (0.023 \%) & 54 (0.036 \%)\\ \end{tabular} \end{table} Here, we assume a case of three mirrors and second reflection as in Figure \ref{fig:base_structure} (b). Since the base structure consists of three doublets that consist of six points, the number of candidates of labeling is ${}_{10}\mathrm{P}_6 = 152100$ for six appropriate labeling candidates. Table \ref{tb:pruning_noise_0} reports the results of pruning in case of noise $\sigma_{\VEC{q}} = 0$ and $\sigma_{\VEC{q}} = 2$. These results show that using each constraint contributes to remove many of the labeling candidates. Whereas the performance of using Eq. \eqref{eq:pruning} depends on an experimentally defined threshold that should be almost zero, Proposition 1 and 2 work with clearer conditions. We can see that using both these propositions (``Proposition 1 and 2'') and using these all geometric constraints (``All'') outperform the results of using each constraint. They show that all constraints are complementary. Note that we found that the appropriate labeling candidates were included in the filtered results in all cases. These results show that using the proposed pruning rules can reduce the computational cost significantly. \subsection{Degenerate cases} Both proposed algorithms of chamber assignment and mirror parameter estimation are based on the kaleidoscopic projection constraint (Eq. \eqref{eq:kaleidoscopic_projection_constraint}) satisfied by second or further reflections. Therefore, these algorithms do not work in two cases. (1) If the two mirror are parallel, the mirror normals are not computable by solving Eq. \eqref{eq:kpc_use}, Eq. \eqref{eq:n1}, and Eq. \eqref{eq:n2} because the constraints are linearly dependent. (2) If the second reflections are not observable due to the angle of view or discontinuities, the mirror normals are not computable. Especially, in case of using more than three mirrors, discontinuities are more likely to happen in general, and the second reflections themselves become difficult to find (Figure \ref{fig:various_configurations}). \begin{figure}[t] \centering \includegraphics[width=1\linewidth]{fig/various_configurations.pdf} \caption{Kaleidoscopic imaging system using (a) three, (b) four, and (c) five mirrors. Discontinuities (red lines) appear on the boundaries of overlapping chambers.} \label{fig:various_configurations} \end{figure}
\section{Introduction} Many growth processes, such as crystal growth from solution, electrochemical deposition, solidification, or viscous fingering in Hele-Shaw cells share similar mechanisms controlling pattern formation. In particular, the surface tension (or line tension in 2D systems) and the stiffness are important control parameters in the selection of growth patterns \cite{Ben-Jacob1990,Saito1987,Saito1989,Saito1994,Uwaha1992,Plapp1997}. Furthermore, surface tension anisotropy controls equilibrium shapes via classical Wulff construction \cite{Einstein2015,Saito1996}, and equilibrium fluctuations\cite{Misbah2010}. Over the past decades, several strategies have been developed in order to model the non-equilibrium dynamics of interfaces during growth processes. In continuum models such as phase-field models or sharp interface models, the surface tension with its full orientation-dependence is given as an input parameter. As a consequence, continuum models can model any anisotropy. However, the consistent inclusion of thermal fluctuations in these models (see, e.g. \cite{Gouyet2003}) leads to several difficulties, both in the quantitative validation of noise terms constrained by the fluctuation-dissipation theorem in non-equilibrium processes \cite{Misbah2010}, and in the design of efficient numerical schemes. This is an important issue since thermal fluctuations play a major role for instance in the formation of side branches in dendrites \cite{Gouyet2003,Saito1987}. Microscopic lattice-based approaches such as in kinetic Monte Carlo (KMC) simulations overcome this difficulty since they incorporate statistical fluctuations in a self-consistent way, which is constrained by detailed balance at equilibrium, and which is still well defined far from equilibrium. However, the anisotropy of macroscopic quantities such as surface tension cannot be set arbitrarily in lattice models, they emerge from the choice of microscopic model parameters, such as the bond energy. Achieving a fine control of isotropy in lattice models is important for comparison to continuum growth models, where anisotropy acts as a singular perturbation~\cite{Saito1996}. In the literature, the introduction of next-nearest-neighbor interactions in lattice models has been proposed as a route towards an increased control of interface anisotropy \cite{Plapp1997,Pierre-Louis2000,Einstein2007,Chame2020,Einstein2004}. In this article, we aim at a quantitative description of the anisotropy of the surface tension and stiffness of one-dimensional interfaces in two-dimensional square-lattice models with nearest and next-nearest-neighbor interactions. An analytical expression for the orientation dependent line tension and stiffness was first derived in Ref.~\cite{Einstein2004}. However, a quantitative measure of the global degree of anisotropy of surface (or line) tension and stiffness as a function of such microscopic interactions and temperature, has not been achieved yet. Our strategy is based on a quantitative comparison between analytical predictions and kinetic Monte Carlo simulations. Our analytical results provide an expression of the surface tension and stiffness for arbitrary orientations as a function of the nearest and next-nearest-neighbor interactions and of the temperature. In parallel, we present a KMC model based on the coupled dynamics of a dense ordered phase and a diffusing cloud of adatoms. Simulations support our analytical results at equilibrium and allow one to study efficiently nonequilibrium growth patterns. We also show how to account for the finite resolution of experimental apparatus when measuring interface fluctuations. We mimic the finite resolution of experiments in our lattice simulations by performing a Gaussian convolution with a given smoothing parameter. Finally, contrary to intuition, within the solid-on-solid description of the interface, the highest level of stiffness isotropy is obtained at finite temperatures. However the question of the existence of this isotropy optimum beyond the solid-on-solid approximation is still open. The paper is organized in the following way. We start with a presentation of the kinetic Monte Carlo model and its numerical implementation. We then report the analytical calculation of the line tension and stiffness as functions of the step orientation in the presence of nearest-neighbor and next-nearest-neighbor interactions. Then, we discuss the comparison at equilibrium between the analytic predictions and the KMC simulations. To conclude, we summarize our results and provide examples of nonequilibrium growth regimes. \section{Kinetic Monte Carlo model} We use a standard kinetic Monte Carlo algorithm \cite{Kotrla1996} with two types of atoms. This model accounts for a two-phase system, where a dense ordered phase, for example a monolayer cluster of atoms or molecules on a flat substrate is in contact with a phase of non-interacting mobile units, that accounts for a concentration of diffusing atoms or molecules on the substrate. At equilibrium, and at low enough temperatures, this system is equivalent to a 2D Ising square lattice \cite{Saito1996,Zandvliet2006}. The deviations from low-temperature and low-density approximations that can be observed in lattice models due to the interactions between mobile atoms in the low-density phase (see, e.g.\cite{Krishnamachari1996}) are avoided here due to the absence of mutual interactions. A similar two-phase KMC model, but with nearest-neighbors only, has already been reported in Ref.~\cite{Saito1989}. In the following, we call the mobile units adatoms. Given the lattice constant $a$, each lattice site $x = i\times a $, $i=1, \dots, N$ with $N=L/a$, can be occupied by a solid atom, by an adatom, or can be empty. Multiple occupancy of the same lattice site is allowed only for adatoms, which do not interact among themselves nor with the solid bulk (i.e.~away from the interface). Adatoms diffuse in an isotropic way performing a random walk via hops to nearest-neighbors. Diffusion anisotropy was not considered in this work but can have important effects on the type of growth patterns observed \cite{Curiotto2019,Plapp1997,Danker2004} and would be a further source of shape selection in addition to interface energy effects which are the main focus of this paper. The ordered phase is characterized by atoms with bonds along first and second-nearest-neighbor directions. The bond energy to first-nearest-neighbors (NN) and second-nearest-neighbors (NNN) are $J_1$ and $J_2$ respectively. These energies are around $1$eV or a fraction of eV in atomic solids \cite{Steimer2001,Einstein2004,Misbah2010}. We define the dimensionless bond energy ratio $\zeta = J_2/J_1$. The value of $\zeta$ controls the anisotropy of the interface between the two phases. We do not consider the inclusion of trio (three atoms non pairwise) interactions. However in general, trio interactions account for only a small correction to the stiffness measured in experiments \cite{Einstein2004}. The solid can grow or shrink at the expense of the adatom gas. Attachment and detachment processes occur at the edge of the solid phase. Adatoms can attach to the solid (i.e.~can be transformed into a solid atom) when they have at least one NN or NNN in contact with the solid. Atoms of the solid that have at least one NN or NNN that is not in contact with the other atoms of the solid can detach and are then transformed into adatoms. The kinetic Monte Carlo model is characterized by the rates of the possible microscopic events. We use standard Arrhenius activation laws with an attempt frequency $\nu_0$. The adatom hopping rate is \begin{align} \label{eq:d_def} d =\nu_0 \exp [ -E_D/(k_BT) ], \end{align} where $k_BT$ is the thermal energy and $E_D$ is the diffusion activation energy. The attachment rate reads \begin{align} \label{eq:q_def} q = \nu_0 \exp [ -E_Q/(k_BT) ], \end{align} with $E_Q$ the attachment/detachment activation energy. Finally, the detachment rate at a given lattice site $i$ is \begin{align} \label{eq:r_def} r = \nu_0 \exp [-(J_1 (nn_i + \zeta nn'_i) + E_Q - E_S)/(k_BT)], \end{align} where $nn_i$ and $nn'_i$ are the number of nearest and next-nearest neighbors around the site $i$. The additional energy $E_S$ is an independent parameter that reduces the difference of energy between solid atoms and adatoms so as to increase the adatom concentration when $E_S>0$. \subsection{Equilibrium concentration} Since the adatom diffusion rate from one site to its neighbor is equal to the rate of the reverse move, detailed balance implies that equilibrium within the adatom phase corresponds to a constant concentration. In global equilibrium of the system, composed of the adatom phase and the solid phase, the adatom concentration reaches its equilibrium value. This equilibrium concentration can be inferred from detailed balance at the interface between the two phases. In equilibrium, the probability of a given configuration of the interface, denoted as $h$, is \hbox{$\pi(h) = \exp [-E(h)/(k_BT)]/Z$,} where $Z$ is the partition function. In the presence of an equilibrium concentration $c_{eq}$, the probability for an adatom to be in a given site is $a^2c_{eq}$, and the attachment rate reads $qa^2c_{eq}$. Detailed balance \cite{Kotrla1996,Saito1996,Barabasi1995} implies that the attachment rate and the detachment rate $r$ are related via \begin{equation} \label{eq:detailed_b} \frac{qa^2c_{eq}}{r} = \frac{\pi(h)}{\pi(h-1)}= {\mathrm e}^{-\frac{E(h)-E(h-1)}{k_BT}}\, , \end{equation} where $(h-1)$ is a notation that indicates an interface configuration that differs only by the detachment of one atom from the previous configuration. The energy of the edge of the solid phase can be determined from the evaluation of the number of broken bonds along the edge. Since the breaking of one bond creates two broken bonds, each broken bond to NN or NNN costs an energy $J_1/2$ or $J_2/2$ respectively. The variation of the interface energy when removing one atom from the interface is evaluated from the change of the number of broken bonds as \begin{equation} \label{eq:Delta_E_detach} \begin{split} E(h) -E(h-1) &= J_1[2-nn_i + \zeta (2-nn'_i) ] \\ &= E_k -J_1(nn_i + \zeta nn'_i) \, , \end{split} \end{equation} with $E_k = 2J_1(1+ \zeta)$ the bond-breaking energy for the detachment of a solid atom from a kink site. Using \cref{eq:detailed_b} the equilibrium concentration therefore reads \begin{equation} \label{eq:eq_conc} c_{eq} = a^{-2}\frac{r}{q}{\mathrm e}^{-\frac{E(h) -E(h-1)}{k_BT}} = a^{-2}{\mathrm e}^{-\frac{E_k-E_S}{k_BT}}\, . \end{equation} Two remarks are in order. First, the possibility of obtaining a constant equilibrium concentration (that does not depend on NN and NNN) results from the fact that the dependence of the activation energy of $r$, in \cref{eq:r_def}, and of $E(h)-E(h-1)$, in \cref{eq:Delta_E_detach}, on $nn_i$ and $nn'_i$ are identical. This is actually a constraint that motivates the specific dependence on $nn_i$ and $nn'_i$ of the activation energy of $r$ in \cref{eq:r_def}. As a second remark, the expression \cref{eq:eq_conc} confirms the role of the parameter $E_S$, which tunes the equilibrium adatom concentration without affecting the energy of the interface itself. \subsection{Implementation details } Our simulations are performed in a square lattice of size $L\times L$ with lattice constant $a$ and periodic boundary conditions. We employ a rejection-free BKL algorithm where events are grouped into classes \cite{Maksym1988,Kotrla1996}. The concentration of adatoms is set at the beginning of the integration and the total number of atoms is therefore fixed during the dynamics. Instead of the usual individual adatom diffusion events, we use collective diffusion events. In each collective diffusion event, all adatoms diffuse simultaneously. Such collective diffusion event provides a speed-up of a factor seven with respect to the standard randomized single adatom move\footnote{The speed-up is not only due to avoiding the generation of $(n-1)$ random numbers, with $n$ the number of adatoms (in the standard implementation to move all adatoms we would need $2\times n$ random numbers to select the diffusion event class \emph{and} the diffusion direction), but also to a more efficient memory access. Since lists are used to store events and random access is not possible in lists, looping through all lists elements at once is more efficient than accessing a given element.}. Moreover, this move can be shared-memory parallelized, leading to a further performance increase, of approximately $10\%$ (for simulation box sizes larger than about $400\times 400$ or large concentrations). Note that the possibility to simply cast diffusion in a simultaneous event is allowed by the absence of interactions between adatoms. We choose to normalize time with the inverse of the adatom hopping rate $d^{-1}$, length scales with the lattice spacing $a$, and energies with the NN bond energy $J_1$. Normalized quantities are denoted with an overline. Our simulations are therefore controlled by 4 dimensionless parameters: $\overline{k_BT} = k_BT/J_1$, $\zeta = J_{2}/J_1$, $\bar{A} = (E_Q-E_D)/J_1$ and $\bar{E}_S = E_S/J_1$. All simulation results below are reported in these normalized units. \section{Orientation-dependence of line tension and stiffness We here derive general analytic expressions at equilibrium for the line tension, $\gamma(\theta)$, and stiffness, $\tilde{\gamma}(\theta) = \gamma(\theta) + \gamma''(\theta)$, where $\theta$ is the angle between the (10) direction and the average interface orientation. Our main goal in the following is to provide a detailed picture of the anisotropy of line tension and stiffness at finite temperatures. As a preamble, we start with a short discussion of the zero-temperature case. \subsection{A simple picture at zero temperature} At zero temperature the free energy reduces to the energy, and it is sufficient to resort to a bond-counting strategy, where each nearest-neighbor or next-nearest neighbor broken bond contributes with an energy $J_1/2$ or $J_2/2$, respectively. Assuming a one-dimensional interface with regularly-spaced kinks separated by $m\geq 1$ sites along the (10) direction, we may count the number of broken bonds. Each atom on a straight (10) edge exhibits one NN broken bond and two NNN broken bonds. Each kink leads to an additional NN in the energy per unit length. Dividing the broken bond energy between two kinks by the distance between two kinks, we obtain the broken bond energy per unit length of the interface \begin{align} \bar\epsilon_m= \frac{m(\frac{1}{2}+\zeta)+\frac{1}{2}}{(m^2+1)^{1/2}}\,. \end{align} The integer $m$ can be related to the orientation of the interface via the relation $m=\mathrm{cot}|\theta|$, where $\theta$ is the angle of the interface with the (10) orientation, with $0\leq|\theta|\leq\pi/4$. The minimum of $\bar\epsilon_m$ is reached for $m\rightarrow +\infty$ corresponding to the (10) orientation with $\theta=0$ for $\zeta<2^{-1/2}$, and for $m=1$ corresponding to the (11) orientation with $\theta=\pi/4$ when $\zeta>2^{-1/2}$. As a consequence, the two limits of small $\zeta$ and large $\zeta$ lead to square low temperatures equilibrium shapes with sides along the (10) or (11) orientation, respectively. When $\zeta=2^{-1/2}$, these two orientations have the same energy at low temperature. However, since $\bar\epsilon_m$ still depends on $m$, the interface is not isotropic when $\zeta=2^{-1/2}$ (actually when $m$ increases $\bar\epsilon_m$ increases and reaches a maximum value $\bar\epsilon_2=\bar\epsilon_3=(2^{1/2}+2/3)5^{-1/5}$ for $m=2,3$, and then decreases). This simple picture at zero temperature suggests that the most isotropic line tension is obtained for $\zeta=2^{-1/2}$. However, we also see that the line-tension is $\bar\epsilon_m\approx (1/2+\zeta)+|\theta|/2$ for $\theta\rightarrow 0$. Hence, the stiffness, which involves second order derivatives with respect to $\theta$, diverges for $\theta=0$. As a consequence, the interface is always strongly anisotropic at zero temperature around the (10) orientation in terms of stiffness. \subsection{Finite temperature calculation} \begin{figure} \centering \caption{Normalized line tension derived from the 2D Ising model. The normalized lattice constant is $\bar{a}=1$, and the normalized nearest-neighbor bond energies are $\bar{J}_x = \bar{J}_y = 1$. The different color map (yellow is $\bar{\gamma}\approx 0$, darker for negative values) highlights where the line tension is negative, i.e.~for temperatures above the roughening temperature, $T_c$. The red line on the contour plot corresponds to $\bar{\gamma}\approx 0$. Top panel: $\zeta=0$, $\overline{k_BT_c}(\theta=0)\approx 0.567$. Bottom panel: $\zeta = 1$, $\overline{k_BT_c}(\theta=0)\approx 1.345$; The inset c) shows small $T$ behavior ($\overline{k_BT}\leq 0.65$) for $\zeta= 1.5$. \label{fig:analitic_LT}} \begin{subfigure}{\linewidth} \includegraphics[width=\linewidth]{figure1_a} \end{subfigure} \begin{subfigure}{\linewidth} \includegraphics[width=\linewidth]{figure1_b} \end{subfigure} \end{figure} We account for the orientation $\theta$ by including a tilting field $H_t$. This is a standard approach which is discussed for instance in Ref.~\cite{Saito1996}. Calculations similar to ours have been reported in the literature but only in the absence of next-nearest-neighbors or without accounting for arbitrary orientations \cite{Saito1996,Zandvliet2006,Ignacio2014,Zandvliet2015}. However, a relation for the interface free energy with next-nearest-neighbors was first derived in Ref.~\cite{Einstein2004} within the same SOS approximation but employing a different procedure based on a constrained partition function. Our result is equivalent to this previous result in the limit where the nearest-neighbor bonds in all directions are identical. We briefly present the derivations in the main text. Further details are given in \cref{appendix:Ising}. Instead of a single value $J_1$, we consider two distinct first-nearest-neighbor bond energies $J_x$ and $J_y$ along the $x$ and $y$ direction, respectively. The case $J_x\neq J_y$ allows one in principle to generalize the description to 2-fold anisotropy. This type of symmetry is relevant to some systems of technological importance such as Si(100) \cite{Ramstad1995}. Once again, we use the notation $a$ for the lattice constant. We use a coordinate system where $x$ is along the (10) direction, while $y$ is along (01). The interface is represented as a function $y(i)$ along $y$, at position $x = i\times a$, $i=1,\dots, N$. With this definition, the interface exhibits no overhang along $x$ (solid-on-solid approximation). Using these notations, the Hamiltonian of the system is \begin{subequations} \begin{align} \label{eq:Hamiltonian} \mathcal{H} =& \mathcal{H}_{nn} + \mathcal{H}_{nn'} + \mathcal{T}\, , \\ \mathcal{H}_{nn} =& \frac{J_y}{2} N + \frac{J_x}{2}\sum_{i=1}^{N}\frac{|y(i)-y(i-1)|}{a}\, , \\ \begin{split} \mathcal{H}_{nn'} = &J_2 N + J_2 \sum_{i=1}^{N} (\frac{|y(i)-y(i-1)|}{a}-1)\\ &\hspace{1.5 cm} \times (1-\delta_{y(i)-y(i-1)})\, , \end{split}\\ \mathcal{T} =& - H_t\frac{y(N) - y(0)}{a}\, , \end{align} \end{subequations} where the different terms appearing in \cref{eq:Hamiltonian} are the contribution of first-nearest-neighbor interactions $\mathcal{H}_{nn}$, the contribution of second-nearest-neighbor interactions $\mathcal{H}_{nn'}$ and the contribution of the tilting field $\mathcal{T}$, which selects the average interface slope. Defining the height difference between neighboring sites $n_i = y(i)-y(i-1)$, the energy per site reads \begin{equation} \label{eq:E_Ising} E(n_i) = J_y/2 + |n_i| J_x/2 + (|n_i| +\delta_{n_i}) J_2 - H_t n_i \, , \end{equation} where we have used that $y(N) - y(0) = a\sum_{i=1}^{N} \left(y(i) - y(i-1)\right) $. Note that the above is equivalent to the formation energy of a boundary of a 2D Ising lattice. In the following, we consider $J_2>0$, corresponding to ferromagnetic interactions \cite{Zandvliet2006}. The partition function of the system is given by \begin{equation} \mathcal{Z} = \sum_{\{ n_i\}}e^{-E(n_i)/(k_BT)}\, . \end{equation} Since all sites are independent, we can drop the index $i$ and write $\mathcal{Z}$ in term of the partition function per site $z_0$ \begin{equation} \label{eq:partitionFunc} \mathcal{Z} = z_0^N\, , \end{equation} with \begin{equation} \label{eq:z0_implicit} z_0 =\sum_{n=-\infty}^\infty e^{-E(n)/(k_BT)}\, . \end{equation} Let us introduce the equilibrium slope of the interface $p=\tan\theta$ (with respect to the (10) reference direction) defined as \begin{align} p & = \frac{1}{L}\langle\sum_{i=1}^{N} a n_i\rangle_{eq}= \frac{N}{L} a\langle n \rangle_{eq} = \langle n \rangle_{eq} \nonumber \\ &= \frac{1}{z_0}\sum_{n=-\infty}^\infty n e^{-E(n)/(k_BT)} \, , \end{align} where $L=Na$ is the interface length along $x$. Observing that $n$ is proportional to the tilting field $H_t$ in \cref{eq:E_Ising}, the above expression is equivalent to \begin{equation} \label{eq:p_implicit} p=k_BT\partial_{H_t}\ln z_0\,. \end{equation} Let us now consider the step or interface free energy per unit length along $x$ which, assuming the other parameters fixed, is a function of the tilting field: \begin{align} \hat{f}(H_t) = -\frac{k_BT}{L}\ln \mathcal{Z}=-\frac{k_BT}{a}\ln z_0\, . \label{eq:def_fhat} \end{align} Combining \cref{eq:p_implicit,eq:def_fhat}, we obtain \begin{align} \hat{f}'(H_t) = -\frac{p}{a}\,. \label{eq:dfdHt_p} \end{align} It is convenient to rewrite the interface free energy as a function of $p$ using the Legendre transformation \cite{Saito1996}: \begin{equation} \label{eq:Legendre} f(p) = \hat{f}(H_t) - H_t\hat{f}'(H_t) = \hat{f}(H_t) + \frac{p}{a}H_t\, . \end{equation} From \cref{eq:dfdHt_p,eq:Legendre} we obtain an expression of the free energy density: \begin{equation} \label{eq:freeEn_Ht} \begin{split} \hat{f}(H_t) &= \frac{1}{a}(\frac{J_y}{2} + J_2) - \\ & \frac{k_BT}{a}\ln \left[1+ e^{-J_x/(2k_BT)}\frac{2\cosh(H_t/k_BT) - 2\alpha}{1-2\alpha\cosh(H_t/k_BT) + \alpha^2}\right]\, , \end{split} \end{equation} where $p$ and $H_t$ are related via \begin{equation} \label{eq:p} \begin{split} p = &\frac{2\sinh(H_t/k_BT)(1-\alpha^2)}{1-2\alpha\cosh(H_t/k_BT) + \alpha^2} \times\\ &\Bigl[ e^{J_x/(2k_BT)} \bigl(1 - 2 \alpha \cosh (H_t/k_BT)+\alpha^2\bigr)\\ & + 2\cosh(H_t/k_BT) -2\alpha \Bigr ]^{-1}\, , \end{split} \end{equation} with $\alpha = \exp [-(J_x/2 + J_2)/k_BT]$. The detailed derivation of these equations is reported in \cref{appendix:Ising}. Finally, as discussed in \cref{appendix:LT}, the angle dependent line tension and stiffness can be found from the following relations: \begin{subequations} \label{eq:LT_all} \begin{align} \label{eq:LT} \gamma(\theta) &= f(p)\cos\theta\, , \\ \label{eq:stiff} \tilde{\gamma}(\theta) &=\frac{ f''(p)}{\cos^3\theta} = \frac{\partial_p H_t}{a\cos^3\theta}\, , \end{align} \end{subequations} where $\theta = \arctan(p)$. The last equality of \cref{eq:stiff} was obtained from the derivative of \cref{eq:Legendre} and using \cref{eq:dfdHt_p}. In the limit where $J_x=J_y=J_1$, \cref{eq:LT_all,eq:freeEn_Ht,eq:p} are equivalent to the expressions found in Ref.~\cite{Einstein2004} \footnote{When comparing to the literature, care should be taken for possible integer factors in the bond energies, which are also sometimes indicated by $\epsilon$. Our notation is mainly inspired by Yukio Saito's book \cite{Saito1996}.}. The relation \cref{eq:p} linking $p$ to $H_t$ cannot be inverted analytically.\footnote{ It is possible to derive explicit analytic expressions for the line tension and stiffness, under some approximations \cite{Einstein2007}. However, these are valid only up to $T\approx T_c/5$, where $T_c$ is the roughening temperature.} We thus resort to a numerical root finding method to obtain $H_t$ at a given slope $p$ and then compute $f(p)$ from \cref{eq:Legendre} to determine $\gamma(\theta)$. We also compute numerically $\partial_p H_t$ using finite differences to obtain the stiffness $\tilde{\gamma}(\theta)$. The results for the normalized line tension and stiffness are plotted in \cref{fig:analitic_LT,fig:analitic_stiff} with $J_x=J_y=J_1$ and $J_2 = \zeta J_1$. Let us focus first on the limit of sole first-nearest-neighbor interactions, $\zeta = 0$, represented in the top panels of \cref{fig:analitic_LT,fig:analitic_stiff}. For the line tension we recover the known limit of the classical 2D first-nearest-neighbor Ising model and equilibrium Wulff construction \cite{Rottman1981}: the zero temperature limit presents a characteristic cusp in correspondence of the (10) facet which flattens as the temperature increases. As temperature increases we approach the roughening transition where the interface free energy vanishes. For $\zeta = 0$ (nearest-neighbor interactions only) and $\theta=0$ (corresponding to (10) orientation) we recover the standard result $k_BT_c = J_1 /[2\ln (1+\sqrt{2})] \approx0.567 J_1$ \cite{Saito1996,Einstein2007}. More generally, the roughening (critical) temperature at different orientations corresponds to the points where $\gamma(\theta) = 0$ in \cref{fig:analitic_LT}. In our model, the roughening temperature slightly increases as $\theta$ increases. This variation is unphysical, and results from the approximation of an interface without overhangs along $x$. This description is not valid close to the roughening temperature where statistical fluctuations are very large. Our results at low temperatures (i.e.~far from the roughening transition) and for $\zeta = 0$ are also in qualitative agreement with the mean field approach reported in Ref.~\cite{Plapp1997}. However, quantitative comparison is difficult given the scaling used in \cite{Plapp1997} which is based on a critical temperature relying on the mean-field approximation adopted. When second-nearest-neighbor bonds do not vanish ($\zeta\neq 0$), the critical temperature $T_c$ increases linearly with $\zeta$, as reported previously in \cite{Zandvliet2006}. The results for $\zeta\neq 0 $ are reported in the bottom panels of \cref{fig:analitic_LT,fig:analitic_stiff}. As expected, when the temperature vanishes, the stiffness exhibits divergence both at (10) and (11) orientations \cite{Saito1996,Misbah2010,Rottman1981,Einstein2007,Einstein2015}. In contrast, as the temperature increases, the stiffness anisotropy decreases. \begin{figure} \centering \caption{ Normalized stiffness derived from the 2D Ising model. The normalized lattice constant is $\bar{a}=1$, and the normalized nearest-neighbor bond energies are $\bar{J}_x = \bar{J}_y = 1$. Top panel: $\zeta=0$. Bottom panel: $\zeta = 1$. The color map is in log scale. \label{fig:analitic_stiff}} \begin{subfigure}{\linewidth} \includegraphics[width=\linewidth]{figure2_a} \end{subfigure} \begin{subfigure}{\linewidth} \includegraphics[width=\linewidth]{figure2_b} \end{subfigure} \end{figure} \section{Comparison to simulations: equilibrium fluctuations and stiffness} \begin{table*}[t] \centering \caption Stiffness as obtained by KMC simulations, with $\bar{J}_1 =1$, $\overline{k_BT}=0.5$, and $\bar{L}=200$, compared to the analytic results obtained by solving and combining \cref{eq:freeEn_Ht,eq:p,eq:stiff} with the same parameters used in simulations. The simulations profile were convoluted by a Gaussian kernel with normalized standard-deviation $\bar{\sigma}$. Results are averaged over $\bar{\sigma} \in[ 4,6,8]$. \label{tab:summary}} \resizebox{\textwidth}{!}{% \begin{tabular}{@{}l|llll@{}} \toprule \diagbox{Orientation}{Bond ratio} & $\zeta = 0.7$ simulations & $\zeta = 0.7$ analytic & $\zeta = 1.4$ simulations & $\zeta = 1.4$ analytic \\ \midrule (10) & $0.184\pm 0.003$ & $0.170$ & $0.238\pm 0.009$ & $0.218$ \\%$0.19\pm 0.01$ & $0.17$ & $0.24\pm 0.02$ & $0.22$ \\ (11) & $0.256\pm0.013$ & $0.242$ & $0.475\pm0.028$ & $0.532$ \\ \bottomrul \end{tabular}% } \end{table*} We compare the analytic results to KMC simulations focusing on a quantitative analysis of the stiffness. The stiffness is related to the equilibrium roughness, a quantity that can be extracted from simulations. The coordinate along the average direction of the step is denoted as $\xi$. The interface position $h(\xi)$ is measured along the direction orthogonal to the $\xi$ direction. The roughness $W$ is defined as the standard deviation of the interface position \begin{equation} \label{eq:roughness_cont} W^2 (t) =\frac{1}{l}\int \mathrm{d}\xi\, h^2(\xi,t) - \frac{1}{l^2}\left (\int\mathrm{d}\xi \,h(\xi,t)\right) ^2\, , \end{equation} with $l$ the length of the interface along $\xi$. In the continuum limit, the equilibrium roughness is related to the stiffness via the well known formula \cite{Saito1994,Uwaha1992,Saito1996,Misbah2010} \begin{equation} \label{eq:rough_stiff} \langle W^2\rangle_{eq} = \frac{ l k_BT}{12\tilde{\gamma}}\, . \end{equation} The above result is derived for periodic boundary conditions. A continuum profile is obtained from our discrete lattice simulations as follows. First, we define the solid phase characteristic function to be equal to $1$ in a square of size $a\times a$ around each lattice site occupied by a solid atom, and $0$ elsewhere. We then perform a 2D Gaussian convolution of the solid phase characteristic function with a length scale $\sigma$. Finally, we define the continuum interface profile as the line of height $1/2$ from the convoluted characteristic function. The length scale $\sigma$ therefore plays the same role as the resolution of an experimental apparatus. This resolution ranges from sub-atomic lengthcales in Scanning Tunneling Microscopy to tens of nanometers in Low Energy Electron Microscopy, and up to hundreds of nanometers in optical techniques \cite{Misbah2010}. Since the roughness is dominated by long-wavelength modes, we expect the expression of the roughness, \cref{eq:rough_stiff}, to be accurate in the limit where we have a good scale separation $\sigma \ll l$. Nevertheless, $\sigma$ is finite in simulations or experiments and its influence on our estimation of the roughness must be accounted for. In order to do so, let us consider the convolution of the continuum profile along the $x$ direction (discarding the transversal direction): \begin{equation} \bar{h}^\sigma(x,t) = \int \mathrm{d}x' \frac{1}{\sqrt{2\pi\sigma^2}}e^{-(x-x')^2/(2\sigma^2)} h(x',t)\, . \end{equation} In Fourier space, we have \begin{equation} \bar{h}^\sigma_q = e^{-q^2\sigma^2/2}h_q \, , \end{equation} with $q = 2\pi x/l$. The static spectrum of the convoluted conitnuum profile is therefore \begin{equation} \langle |\bar{h}^\sigma_q|^2 \rangle_{eq} =e^{-q^2\sigma^2} \langle |h_q|^2 \rangle_{eq}\, . \end{equation} From the equipartition of energy , one finds \cite{Saito1996,Misbah2010} \begin{equation} \langle |h_q|^2 \rangle_{eq} =\frac{k_BT}{\tilde{\gamma}q^2} l\, . \end{equation} The roughness of the convoluted profile is therefore calculated as \begin{equation} \label{eq:roughness_fourier_corr} \begin{split} \langle W_\sigma^2 \rangle_{eq} &= \langle\frac{1}{l^2}\sum_n |h_q|^2 - \frac{1}{l^2}|h_{q=0}|^2\rangle_{eq}\\ &= l \frac{k_BT}{4\pi^2 \tilde{\gamma}}\, 2\sum_{n=1}^\infty\frac{e^{-4\pi^2\sigma^2 n^2/l^2}}{n^2} \,. \\ \end{split} \end{equation} Defining \begin{equation} \label{eq:S} S(\sigma/l) = \frac{6}{\pi ^2}\sum_{n=1}^\infty\frac{e^{-4\pi^2\sigma^2 n^2/l^2}}{n^2}\, , \end{equation} we obtain \begin{equation} \label{eq:rough_stiff_corr} \langle W_\sigma^2\rangle_{eq} = \frac{ l k_BT}{12\tilde{\gamma}} S(\sigma/l)\, . \end{equation} In the absence of convolution, $\sigma/l\rightarrow 0$ and $S(0) = 1$. We therefore recover the previous expression of the roughness \cref{eq:rough_stiff}. When $\sigma/\ell \neq 0$, then $S(\sigma/\ell)<1$ and the roughness of the convoluted continuum profile is decreased due to the elimination of the contribution of short wavelength modes. The convolution length scale therefore plays the role of a short-wavelength cutoff. As a consequence, the microscopic details of the models that appear at the length scale $a$ will be irrelevant for the convoluted roughness when $\sigma\gg a$. Hence, the convoluted continuum profile and the convoluted simulation profile should be similar when $\sigma\gg a$, and we should be able to use safely \cref{eq:rough_stiff_corr} to any microscopic model when $\sigma\gg a$. We therefore use \cref{eq:rough_stiff_corr} to extract the stiffness from the measurement of the roughness of convoluted profiles. In order to check this strategy, we have performed KMC simulations at equilibrium for two arbitrary chosen values of the bond energy ratio, $\zeta = 0.7$ and $\zeta= 1.4$. We use a $200\times200$ square simulation box with periodic boundary conditions comprising bands along $(10)$ or $(11)$. We average the roughness over all interfaces in the simulation box, and over time at equilibrium. In \cref{app:roughness} we show simulation images and profile extractions together with the averaged roughness as a function of time (\cref{fig:bands,fig:roughness}). A direct extraction of the stiffness using \cref{eq:rough_stiff} on the convoluted profile provides an inconsistent value of $\tilde\gamma$ that depends on $\sigma$, as shown in \cref{fig:deviation,fig:stiffSigma} in \cref{app:roughness}. However, the roughness extracted from \cref{eq:rough_stiff_corr} is independent of $\sigma$ and is also in fair agreement with the predictions of the previous section both for $(10)$ and $(11)$ interfaces. The use of \cref{eq:rough_stiff_corr} then allows for a quantitative determination of the stiffness as summarized in \cref{tab:summary}. We therefore propose that this strategy should be relevant in experiments to determine the stiffness discarding the shortest scales, that could exhibit short-wavelength deviations from the continuum formula \cref{eq:rough_stiff}. These deviations could either originate in system-dependent microscopic details of the physics of the interface, or on unavoidable distortions at the finest resolution scale in experimental images. For illustrative purposes, in \cref{fig:instabilities}b we show the effect of convolution, applied both on the solid island and the adatom cloud, on a general simulation frame. This allows to obtain a continuous density of adatoms which could be used for direct comparison with continuum models such as phase-field models \cite{Misbah2010,Karma1998}. \section{Optimal bond ratio for isotropy} \begin{figure} \centering \caption{Line tension anisotropy, measure by the relative standard deviation. Black dot: eye catcher showing the minimum at $\overline{k_BT}\approx 0.32$ and $\zeta\approx 0.54$. The color map is in log scale. \label{fig:minLT}} \includegraphics[width=\linewidth]{figure3 \end{figure} \begin{figure} \centering \caption{Stiffness anisotropy, measure by the relative standard deviation. Black dot: eye catcher showing the minimum at $\overline{k_BT}\approx 0.35$ and $\zeta\approx 0.43$. The color map is in log scale. \label{fig:minStiff}} \includegraphics[width=\linewidth]{figure4 \end{figure} Let us introduce the averaged line tension\label{key} $\langle\gamma\rangle$ with respect to the orientation $\theta$: \begin{equation} \left\langle\gamma(T,\zeta)\right\rangle = \frac{4}{\pi} \int_0^{\pi/4} \mathrm{d}\theta\, \gamma(\theta)\, . \end{equation} and its variance \begin{equation} \label{eq:variance} v^2 (T,\zeta) = \frac{4}{\pi} \int_0^{\pi/4} \mathrm{d}\theta\, \left (\gamma(\theta)-\langle\gamma\rangle\right )^2 , \end{equation} The averages are taken up to $\theta = \pi/4$ due to symmetry. We use the relative standard deviation of the line tension $g(T,\zeta) = v/\langle\gamma\rangle$ to provide a measure of the anisotropy of the interface as a function of the temperature $T$ and bond energy ratio $\zeta$. Similarly, we define $\tilde{g}(T,\zeta)$ for the relative standard deviation of the stiffness. In \cref{fig:minLT,fig:minStiff} we show $g$ and $\tilde g$ as a function of $\zeta$ and the normalized thermal energy $\overline{k_BT}$. In \cref{fig:minLT}, we observe that $g(\zeta_{\min})$ is of the order of $1\%$ in the range of (normalized) temperatures that we have explored. The highest level of isotropy is reached at $\overline{k_BT} \approx 0.32$ where $g \approx 0.016\%$ at $\zeta_{\min} \approx 0.54$. The situation for the stiffness is different, with a more pronounced anisotropy. The most isotropic stiffness is reached again at a finite temperature $\overline{k_BT}\approx 0.35$ and $\zeta_{\min} \approx 0.43$ where $\tilde{g}\approx 1.56\%$. \Cref{fig:comparison} shows the value $\zeta_{\min}$ of the bond ratio that realizes the best degree of isotropy at a given temperature. The inset shows that the stiffness can exhibit a small anisotropy only in a narrow temperature range between $\overline{k_BT}\approx 0.3$ and $\overline{k_BT}\approx 0.4$. The line tension, instead, can have small anisotropy in the whole temperature range explored (the relative variance at minimum is always below $1\%$). However, its highest isotropy is reached in a similar range of temperatures than the one observed for the stiffness. Note that our model fails to describe the anisotropy at high temperatures close to the critical temperature. As discussed above, the smallest critical temperature is reached for $\zeta=0$ at $\overline{k_BT_c} (\zeta=0)\approx0.567$, while the critical temperature increases significantly for larger $\zeta$ (see for instance \cref{fig:analitic_LT}b). Close to the critical temperature, a spurious sharp increase of the line tension anisotropy is seen in \cref{fig:minLT}. This increase is due to the fact that the line tension vanishes for some orientation before others in our model. Since our observed minima of the tension and stiffness anisotropy are far enough from the transition, these minima might not be a consequence of the spurious increase of the anisotropy at high temperature close to the transition. The accuracy of our results despite the SOS approximation is further supported by the good comparison to KMC simulations. Indeed, these simulations admit overhangs along the interface and are realized at a temperature closer to the transition (at $\overline{k_BT}=0.5$) than the minima (at $\overline{k_BT}\approx0.3$). \begin{figure} \centering \caption{Bond energy ratios realizing the highest isotropy levels ($\zeta_{\min}$) for line tension and stiffness, compared. The inset shows the correspondent relative standard deviation in log scale. The dip observed in the relative deviation associated to the stiffness at minimum (blue line) is around $2\%$ and corresponds to the violet area in \cref{fig:minStiff}. The relative standard deviation at minimum for the line tension is always below $1\%$. \label{fig:comparison}} \includegraphics[width=\linewidth]{figure5} \end{figure} \section{Discussion} \begin{figure*}[h] \centering \caption{ Panel a): Initial condition (circular island). Panel b): Example of the convolution of a simulation frame. Left: unprocessed image, yellow: monolayer, red: adatoms. Right: Same image convoluted using smoothing parameter $\bar{\sigma}=2$ for the solid, and $\bar{\sigma}=6$ for the adatoms. Panels c) and d): Growth patterns obtained at $\overline{k_BT}=0.3$ with nearest-neighbor bond energy $\bar{J}_1=1$ in a regime of fast attachment (kinetic constant $\bar{A}=-3.5$). The simulations are started with a circular seed (panel a)). The initial concentration of adatoms is $c = 0.15$ and the simulation box is $400\times 400$. Time flows from left to right. Top: Bond ratio realizing best degree of stiffness isotropy, $\zeta_{\min} (\overline{k_BT} = 0.3 ) = 0.51$. Bottom: Higher bond ratio, $\zeta = 2$. Other simulations parameters are: c) $\bar{E}_s = 1$; d) $\bar{E}_s = 3.5$; the images were convoluted with smoothing parameter $\bar{\sigma}=2$. \label{fig:instabilities}} \begin{subfigure}{0.9\linewidth} \includegraphics[width=\linewidth]{figure6_ab} \end{subfigure} \vspace{2mm} \begin{subfigure}{0.9\linewidth} \includegraphics[width=\linewidth]{figure6_c} \end{subfigure} \vspace{2mm} \begin{subfigure}{0.9\linewidth} \includegraphics[width=\linewidth]{figure6_d} \end{subfigure} \end{figure*} The role of crystal anisotropy in the selection of growth patterns has been extensively studied in the literature \cite{Ben-Jacob1990,Saito1987,Gouyet2003}. A detailed analysis of the effect of stiffness and line tension on the nonequilibrium patterns is beyond the scope of this work. However, it is interesting to show at least qualitatively the effect of anisotropy on nonequilibrium patterns obtained within our KMC framework. In particular, in a diffusion driven regime ($\bar{A}<0$) we expect that isotropic stiffness should produce seaweed structures (tip splitting regime) whilst anisotropy could select specific dendritic patterns \cite{Ben-Jacob1990,Plapp1997,Saito1989}. While growth studies are usually performed with a constant supply of atoms far from the crystal, we consider here the case where an initial concentration larger from the equilibrium one is fixed in the initial conditions, leading to a transient growth. On the one hand, since all atoms that contribute to the growth process must be present in the initial configuration, a large simulation box with many atoms is needed. These conditions are computationally more demanding than the constant growth scenario. Moreover, a high initial number of adatoms must be present in the system in order to observe instabilities. On the other hand, this growth mode could be well suited to describe some systems of technological relevance such as segregation of graphene on Ni substrate, which is based on temperature driven growth from a given concentration of carbon atoms \cite{Yu2008,Wu2014}. We show in \cref{fig:instabilities}c and \cref{fig:instabilities}d growth patterns obtained by the KMC simulations at $\overline{k_BT}=0.3$. In the top panel we use the value $\zeta=\zeta_{\min} (\overline{k_BT}=0.3)=0.51$, which leads to the best degree of isotropy of the stiffness . In the bottom panel a higher value, $\zeta = 2>\zeta_{\min}$, was taken. As expected, the isotropic scenario produce seaweed patterns with the typical tip-splitting (see for instance fig.~2a in Ref.~\cite{Ben-Jacob1990}), while an anisotropic stiffness leads to anisotropic dendrite-like patterns. The dendrite tips are oriented in the (10) direction, which corresponds to the direction of minimum stiffness \cite{Saito1994,Plapp1997}. Videos of the full KMC simulations from which the frames used in \cref{fig:instabilities} were extracted are shown in the supplementary materials. We chose to analyse 4-fold symmetry $J_x=J_y$ in this paper. In perspective, the KMC model here introduced is well suited to include the case $J_x\neq J_y$. This would allow one to address problems related to surface reconstruction where different rectangular-type lattice symmetries are adopted (e.g. Si(001) \cite{Ramstad1995}). In addition, other type of lattice symmetries can be relevant for certain systems such as doped graphene \cite{Deretzis2014}. \section{Conclusions} Relating microscopic models to the macroscopic parameters of continuum models is a longstanding challenge for equilibrium and non-equilibrium interface dynamics. In this paper, we have established a quantitative relation between 2D monolayer islands with nearest and next-nearest-neighbor bonds, and the orientation dependent line tension and stiffness. This relation was checked by means of kinetic Monte Carlo simulations. In addition, we have proposed a method to extract the interface stiffness from simulations based on the convolution of the interface profile by a Gaussian kernel. This method could also be useful in the analysis of experimental data. Furthermore, we provide a quantitative estimate of the degree of anisotropy of line tension and stiffness as a function of temperature and second-nearest-neighbor to nearest-neighbor bond strength. Reaching a good isotropy is an important condition in order to test the predictions of continuum growth models, where anisotropy acts as a singular perturbation~\cite{Saito1996}. Remarkably, within a SOS description of a solid interface (no overhangs along the step), an optimum of isotropy is obtained at a finite temperature. As the system approaches the roughening temperature, large statistical fluctuations hinder the validity of the model. Further theoretical and experimental evidence would be needed to support this non intuitive result. We hope this work will contribute to partially fill the gap between the microscopic realm and continuous macroscopic theories and help to devise novel computer simulations approaches to the growth problem. \clearpage
\section{Introduction and Motivation}\label{introduction-and-motivation} Dynamical systems and processes in critical application areas such as control engineering require trustworthy, robust and reliable models that strictly conform to behavioral expectations according to domain-specific knowledge, as well as safety and performance criteria. However, such models cannot always be derived from first principles and theoretical considerations alone. Thus, they must be determined empirically. From this perspective, models used in system identification can be categorized as: \begin{itemize} \item \emph{White-box}. Derived from first principles, explicitly include domain knowledge, can be valid for a wide range of inputs even beyond available observations and allow to make far-reaching predictions (extrapolation). \item \emph{Gray-box}. Derived from data, with known internals, open for further inspection. Can be validated against domain knowledge. Only valid for inputs which are similar to observations that are used for model fitting. \item \emph{Black-box}. Derived from data, with unknown internals (e.g., neural networks), difficult or impossible to inspect and/or validate. \end{itemize} In-between the two extremes there is a whole spectrum of gray-box models which combine aspects of both extremes \citep{Ljung2010}. The proponents of ``explainable AI'' propose to apply models on the white end of this spectrum either directly \citep{Rudin2019} or as an approximation of black-box models in AI technologies. Empirical, data-driven models are required in scenarios where first principles models are infeasible due to engineering or financial considerations. Ensuring that empirical models conform to expected system behavior, correctly reflect physical principles, and can extrapolate well on unseen data remains an open challenge in this area. Symbolic regression (SR) is especially interesting in this context because SR models are closed-form expressions which are structurally similar to white-box models derived from first principles. The aim in SR is to identify the best function form and parameters for a given data set using common mathematical operators and functions which serve as building blocks for the function form \citep{koza1992genetic}. This is in contrast to other forms of regression analysis where the function form is pre-specified and only the numerical coefficients are optimized through model fitting. It should be noted however that SR is fundamentally a purely data-driven approach. It does not require prior information about the modelled process or system and leads to gray-box models which can be hard to understand. SR algorithms therefore favor shorter expressions and use simplification to facilitate detailed analysis of their models. The most well-known solution methods for SR includes tree-based genetic programming (GP) variants~\citep{koza1992genetic}, linear GP~\citep{oltean2003comparison} including Pareto-GP~\citep{smits2005pareto}, Cartesian GP~\citep{miller2008cartesian}, grammatical evolution (GE)~\citep{o2001grammatical}, and gene expression programming (GEP)~\citep{ferreira2001gene}. More recent developments of SR include Geometric Semantic GP~\citep{Moraglio2012, Pawlak2018, Ruberto2020}, Multiple-regression GP~\citep{Arnaldo2014}, and a memetic evolutionary algorithm using a novel fractional representation for SR~\citep{Sun2019}. There are also several non-evolutionary algorithms for SR including fast function extraction (FFX)~\citep{mcconaghy2011ffx}, SymTree~\citep{de2018greedy}, prioritized grammar enumeration (PGE)~\citep{worm2013prioritized}. Recently several neural network architectures have been used for symbolic regression ~\citep{sahoo2018learning, Kim2019IntegrationON, petersen2019deep, udrescu2020ai}. This contribution introduces an extension of SR, which allows to include vague prior knowledge via constraints on the shape of SR model image and derivatives. We therefore call this approach shape-constrained SR as it is a specific form of shape-constrained regression. The main motivation is, that even in data-based modelling tasks, partial knowledge about the modelled system or process is often available, and can be helpful to produce better models which conform to expected behaviour and might improve extrapolation. Such information could be used for: \begin{enumerate} \def\arabic{enumi}.{\arabic{enumi}.} \item data augmentation to decrease the effects of noisy measurements or for detecting implausible outliers \item fitting the model in input space regions where observations are scarce or unavailable \item distinguishing between correlations in observation data and causal dependencies \item increasing the efficiency of the statistical modelling technique. \end{enumerate} \subsection{Problem Statement}\label{problem-statement} We focus on the integration of prior knowledge in SR solvers in order to find expressions compatible with the expected behavior of the system. Our assumptions are that we have data in the form of measurements as well as side information about the general behaviour of the modelled system or process that however is insufficient to formulate an explicit closed-form expression for the model. We additionally assume that the information can be expressed in the form of constraints on the function output as well as its partial derivatives. The task is therefore to find a closed-form expression which fits the data, possibly with a small error, and conforms to our expectation of the general behaviour of the system. In particular, the model must not violate shape constraints when interpolating and extrapolating within a bounded input space. We investigate the hypotheses that (i) interval arithmetic can be used to approximate bounds for the image of SR models and their partial derivatives and therefore reject non-conforming models within SR solvers, and (ii) that the predictive accuracy of SR models can be improved by using side information in the form of shape constraints. \section{Related Work}\label{prior-work} The issue of knowledge integration into machine learning methods including genetic programming has been discussed before. Closely related to this work is the work of \cite{Bladek} who have discussed using formal constraints in combination with symbolic regression to include domain knowledge about the monotonicity, convexity or symmetry of functions. Their approach called Counterexample-Driven GP utilizes satisfiability modulo theories (SMT) solvers to check whether candidate SR models satisfy the constraints and to extend the training set with counter examples. \cite{Bladek} observe that is very unlikely for GP to synthesize models which conform to constraints. The difference to this work is that we do not support symmetry constraints and instead of a SAT solver we use interval arithmetic to calculate bounds for the function image and its partial derivatives. We test our approach on a larger set of harder benchmark problems. \cite{Versino2017data} have specifically studied the generation of flow stress models for copper using GP with and without knowledge integration. They have investigated four different scenarios: i) a canonical GP solver that returns a Pareto front of model quality and complexity, ii) knowledge integration by means of transformed variables, samples weighting, introduction of artificial points, introduction of seed solutions, iii) search for the derivative of the expression and then reconstructing the original equation by integration, iv) search derivatives but with additional artificial data points. This work emphasized the importance of integrating prior knowledge in the model fitting process. The authors observed that the canonical GP solver presented unpredictable behavior w.r.t. the physical constraints, thus the sampled data set alone was insufficient to guide the solver into a model with both low error and physical feasibility. In contrast to our approach which guarantees that solutions conform to prior knowledge, all techniques tried in \citep{Versino2017data} are optimistic and might produce infeasible solutions. Additionally, adding artificial data points is subjective and does not scale to high-dimensional problems. \cite{schmidt2009incorporating} studied the influence of integrating expert knowledge into the evolutionary search process through a process called seeding. First the authors generated approximation solutions by either solving a simpler problem or finding an approximate solution to a more complex problem. These solutions are then used during the seeding procedure by inserting approximations into the initial population, shuffled expressions and building blocks. The authors found that seeding significantly improves the convergence and fitness average performance when compared to no seeding. Among the seeding procedures, the seeding of building blocks was the most successful allowing faster convergence even in more complex problems. Again, seeding is an optimistic approach and does not guarantee that the final SR solution conforms to prior knowledge. \cite{stewart2017label} investigated how to use prior knowledge in artificial neural networks. Specifically, they incorporate physical knowledge into motion detection and tracking and causal relationships in object detection. Even though the experiments were all small scaled, they showed promising results and opened up the possibility of teaching an artificial neural network by only describing the properties of the approximation function. This idea is similar to the idea of shape-constraints. Recently an approach for knowledge integration for symbolic regression with a similar motivation to this work has been described in~\citep{li2019neural}. Instead of shape constraints the authors make use of semantic priors in the form of leading powers for symbolic expressions. They describe a Neural-Guided Monte Carlo Tree Search (MCTS) algorithm to search of SR models which conform to prior knowledge. The authors use a context-free grammar for generating symbolic expressions and use MCTS for generating solutions whereby a neural network predicts the next production rule given a sequence of already applied rules and the leading power constraints. The algorithm was compared against variations of MCTS and a GP implementation using the DEAP framework~\citep{fortin2012deap} The results show a superior performance of neural-guided MCTS with a high success rate for easier instances but much lower rates on harder instances which were however still higher than the success rate of GP. One aim of our work is improving extrapolation of SR solutions. Similarly to polynomial regression, SR models might produce extreme outputs values when extrapolating. Interestingly, extrapolation behaviour of SR models has been largely ignored in the literature with only a few exceptions. \cite{castillo2013symbolic} investigated the difference in the response variation of different models generated by GP to three different data sets. They have shown that in some situations a GP algorithm can generate models with different behavior while presenting a similar $R^2$ value. These results motivate the need of a post analysis of the validity of the model w.r.t. the system being studied and a verification of how well such models extrapolate. The extrapolation capability of GP is also studied in~\citep{castillo2003methodology}. In this work, the authors evaluate and compare the best solution obtained by a GP algorithm to a linear model which uses the transformed variables found by the GP model. The experiments suggest that the GP models have good interpolation capabilities but with a moderate extrapolation error. The proposed approach presented good interpolation and extrapolation capabilities, suggesting that at the very least, the GP models can guide the process of building a new transformed space of variables. Another relevant result was obtained by~\cite{kurse2012extrapolatable} who used Eureqa (a commercial SR solver) to find analytical functions that correctly modelled complex neuromuscular systems. The experiments showed that the GP solver was capable of extrapolating the data set much better than the traditional polynomial regression, used to model such systems. \cite{stewart2017label} trained a neural network by introducing prior knowledge through a penalty term of the loss function such that the generated model is consistent to a physics behavior. Different from our work, this generates a black box model of the data. Finally, \cite{zhu2019physics} incorporate the appropriate partial differential equations into the loss functions of a neural network and, by doing so, they can train their model on unlabeled data, this approach requires more information than usually available when modelling studied observations. \section{Methods}\label{methods} In this section we describe in detail the methods proposed in this paper to integrate prior knowledge into SR solvers using interval arithmetic and shape constraints. In summary, we extend two GP variants to support shape-constrained SR: a tree-based GP approach with optional memetic improvement of models parameters and the Interaction-Transformation Evolutionary Algorithm (ITEA)~\citep{de2019interaction}. The extended algorithms are compared against the original versions on a set of benchmark problems. For the comparison we calculate the number of constraint violations and the training as well as the test errors and qualitatively assess the extrapolation behaviour. \subsection{Shape-constrained Regression}\label{shape-constrained-regression} Shape-constrained regression allows to fit a model whereby certain characteristics of the model can be constrained. It is a general concept, that encompasses a diverse set of methods including parametric and non-parametric, as well as uni-variate and multi-variate methods. Examples include isotonic regression~\citep{wright1980isotonic,Tibshirani2011}, monotonic lattice regression~\citep{Gupta2016}, nonparametric shape-restricted regression~\citep{guntuboyina2018nonparametric}, non-negative splines~\citep{papp2014shape}, and shape-constrained polynomial regression~\citep{Hall2018}. In shape-constrained regression, the model is a function mapping real-valued inputs to a real-valued output and the constraints refer to the shape of the function. For instance if the function $f(\mathbf{x})$ should be monotonically increasing over a given input variable $x_1$ then we would introduce the monotonicity constraint \begin{equation*} \frac{\partial f}{\partial x_1}(\mathbf{x}) \geq 0, \mathbf{x} \in \mathcal{S} \subseteq \mathbb{R}^d \end{equation*} Similarly, we could enforce concavity/convexity of a function by constraining second order derivatives. Usually the input space for the model is limited for example to a $d$-dimensional box $\mathcal{S} = [\inf_1, \sup_1] \times [\inf_2, \sup_2] \times \dots \times [\inf_d, \sup_d] \subseteq \mathbb{R}^d$. In general it is possible to include constraints for the model and its partial derivatives of any order. However, in practice first and second order partial derivatives are most relevant. The set of constraints $C$ contains expressions that are derived from the model via one of the operators Op and linearly transformed using a sign $s$ and threshold $c$. We use this representation of shape constraints to simplify checking of constraints. All constraint expressions $c_i\in C$ must not be positive for feasible solutions. \begin{equation*} C = \left\{ \operatorname{s}\cdot \operatorname{Op}(f)(\mathbf{x}) - c \leq 0 \middle| \operatorname{Op} \in \left\{\operatorname{id}(f), \frac{\partial^n f}{\partial^n x_1}, \dots \frac{\partial^n f}{\partial^n x_d}\right\}, c \in \mathbb{R}, \operatorname{s} \in \{1, -1\}, n>0\right\} \end{equation*} It is important to mention that shape constraints limit the function outputs and partial derivatives, but the optimal function which fits the observed data still needs to be identified by the algorithm. Shape-constrained regression is a general concept which is applicable to different forms of regression analysis. For specific models like multi-variate linear regression or tree-based methods (e.g., XGBoost), it is easy to integrate shape constraints. For other models, for instance, polynomial regression, it is harder to incorporate shape constraints \citep{Hall2018, Ahmadi2019}. Generally, one can distinguish optimistic and pessimistic approaches to shape-constrained regression \citep{Gupta2016}. Optimistic approaches check the constraints only for a finite set of points from the input space and accept that the identified model might violate the constraints for certain elements from the input space. Pessimistic approaches calculate bounds for the outputs of the model and its partial derivatives to guarantee that identified solutions are in fact feasible. However, pessimistic approaches might reject optimal models as a consequence of overly wide bounds. In this paper, we decided to study a pessimistic approach and calculate bounds for SR models and their derivatives using interval arithmetic. \subsection{Interval Arithmetic}\label{interval-arithmetic} Interval Arithmetic (IA) is a method for calculating output ranges for mathematical expressions~\citep{hickey2001interval}. It has many uses such as dealing with uncertainties stemming from inaccurate representations and verifying boundary conditions. An interval is represented as $[a, b]$ with $a \leq b$, named lower and upper endpoints, respectively. If we have a function $f(x_1, x_2) = x_1 + x_2$, for example, and knowing the intervals for each variable to be $x_1 \in [a, b], x_2 \in [c, d]$, we can say that the image of function $f$ will be in the interval $[a+c, b+d]$. IA defines the common mathematical operations and functions for such intervals. It is easy to see that IA can only give bounds for the expression instead of an accurate range because it does not track dependencies between arguments of operators. For instance, the IA result for the expression $x_1 - x_1$ with $x_1 \in [a, b]$ is the interval $[a - b, b - a]$ instead of $[0, 0]$. IA has previously been used for SR for improving model quality as it allows to detect and reject partially defined functions resulting e.g. from division by zero or taking the logarithm of a non-positive number. The use of IA for SR was first proposed in~\citep{keijzer2003improving} where IA was used to verify that a given expression is defined within the domain spanned by the variable values in the data set. The author showed that this indeed helps avoiding partially defined functions even when using standard division instead of the commonly used protected division operator. \cite{pennachin2010robust} used Affine Arithmetic, an extension to IA, for finding robust solutions. The authors observed that the models generated by their algorithm were robust w.r.t. extrapolation error. In ~\citep{dick2017revisiting} the approach of~\citep{keijzer2003improving} was extended by introducing crossover and mutation operators that make use of IA to generate feasible expressions. The experiments showed a faster convergence rate with interval-aware operators. We also include IA into SR. Our work is in fact a generalization of the idea discussed in~\citep{keijzer2003improving} and~\citep{pennachin2010robust}, but instead of limiting the use of IA to detect only whether a function is partial or not, we also expand it to test for other properties such as monotonicity. Another difference is that we assume that the considered intervals are derived from prior knowledge, instead of being inferred from the data. \subsection{Genetic Programming for Shape-constrained Symbolic Regression} We integrate IA into two solvers for SR. In this section we describe the integration into tree-based GP \citep{koza1992genetic} and in the next section we describe the integration into ITEA. We use a tree-based GP variation with optional memetic local optimization of SR model parameters which has produced good results for a diverse set of regression benchmark problems \citep{KommendaGPEM2020}. The pseudo-code for our GP algorithm for shape-constrained symbolic regression is shown in Algorithm \ref{alg:GP}. Solution candidates are symbolic expressions encoded as expression trees. Parameters of the algorithm are the function set $\mathcal{F}$, the terminal set $\mathcal{T}$, the maximum length (number of nodes) $L_{\max}$ and maximum depth $D_{\max}$ of expression trees, the number of generations $G_{\max}$, the population size $N$, the mutation rate $m$, the tournament group size $p$, and the number of iterations for memetic parameter optimization $n_{\operatorname{Opt}}$. The algorithm uses tournament selection, generational replacement and elitism. New solution candidates are produced via sub-tree crossover and optional mutation. The initial population is generated with the PTC2 algorithm~\citep{Luke2000}. All evolutionary operators respect the length and depth limits for trees. Shape constraints are handled during fitness evaluation. First we calculate intervals for the function output as well as the necessary partial derivatives using the known intervals for each of the input variables and check the output intervals against the constraint bounds. If a solution candidate violates any of the shape constraints the solution candidate is assigned the worst possible fitness value. In a second step, the prediction error is calculated only for the remaining feasible solution candidates. The solution candidate with the smallest error within a group is selected as the winner in tournament selection. We assume that the constraints are provided via a set $C$ as given in Section \ref{shape-constrained-regression}. \subsubsection{Fitness Evaluation} Function \emph{\ref{alg:gp-eval}} calculates the vector of residuals from the predictions for inputs $X$ and the observed target values $y$. We use the normalized mean of squared errors (NMSE) as the fitness indicator. NMSE is the mean of squared residuals scaled with the inverse variance of $y$. As described in~\citep{keijzer2003improving} we implicitly scale all symbolic regression solutions to match the mean and variance of $y$. Therefore, we know that the worst possible prediction (i.e. a constant value) has an NMSE of one and we use this value for infeasible solution candidates. \begin{algorithm}[t!] \SetKwFunction{Evaluate}{Evaluate} \SetKwFunction{InitRandomPopulation}{InitRandomPopulation} \SetKwFunction{SelectTournament}{SelectTournament} \SetKwFunction{Crossover}{Crossover} \SetKwFunction{Mutate}{Mutate} \SetKwFunction{Optimize}{Optimize} \SetKwFunction{FindElite}{FindElite} \SetKwFunction{rand}{rand} \SetKwData{X}{X} \SetKwData{y}{$\mathbf{y}$} \SetKwData{C}{C} \SetKwData{Intervals}{Intervals} \SetKwArray{pop}{pop} \SetKwArray{err}{err} \SetKwArray{nextPop}{nextPop} \SetKwArray{nextErr}{nextErr} \SetKwData{parent}{parent} \SetKwData{child}{child} \SetKwData{best}{best} \SetKwData{expr} \KwData{\textbf{X} and \textbf{y} are input and target variable values, \textbf{C} is the vector of constraints (operators and thresholds), \Intervals are intervals for all input variables, \pop and \nextPop are solution candidate vectors, and \err and \nextErr are error vectors of solution candidates}\\ \pop $\leftarrow$ \InitRandomPopulation{$\mathcal{F}, \mathcal{T}, L_{\max}, D_{\max}$}\; \For{i $\leftarrow 1$ \KwTo N \do}{ \err{i} $\leftarrow$ \Evaluate{\pop{i}, \X, \y, \C, \Intervals} } \For{g $\leftarrow 1$ \KwTo $G_{\max}$ \do}{ \nextPop{1}, \nextErr{1} $\leftarrow$ \FindElite{\pop, \err}\; \For{i $\leftarrow 2$ \KwTo N \do} { \parent$_1 \leftarrow$ \SelectTournament{\pop, \err, $p$}\; \parent$_2 \leftarrow$ \SelectTournament{\pop, \err, $p$}\; \child $\leftarrow$ \Crossover{\parent$_1$, \parent$_2$, $L_{\max}, D_{\max}$}\; \If{\rand{} $< m$}{ \Mutate{\child, $\mathcal{F}, \mathcal{T}, L_{\max}, D_{\max}$} } \If{$n_{\operatorname{Opt}}> 0$}{ \Optimize{\child, $n_{\operatorname{Opt}}$, \X, \y, \C, \Intervals} } \nextPop{i} $\leftarrow$ \child\; \nextErr{i} $\leftarrow$ \Evaluate{\child, \X, \y, \C, \Intervals} } \pop $\leftarrow$ \nextPop\; \err $\leftarrow$ \nextErr\; } \best $\leftarrow$ \pop{1}\; \Return{\best} \caption{GP($\mathcal{F}, \mathcal{T}, L_{\max}, D_{\max}, G_{\max}, N, m, p, n_{\operatorname{Opt}}$)} \label{alg:GP} \end{algorithm} \subsubsection{Optional Local Optimization}\label{sec:local-opt} Procedure \emph{\ref{alg:gp-optimize}} locally improves the vector of numerical coefficients $\theta \in \mathbb{R}^{\text{dim}}$ of each model using non-linear least-squares fitting using the Levenberg-Marquardt algorithm. It has been demonstrated that gradient-based local improvement improves symbolic regression performance \citep{Topchy2001, KommendaGPEM2020}. Here we want to investigate whether it can also be used in combination with shape constraints. To test the algorithms with and without local optimization we have included the number of local improvement iterations $n_\text{Opt}$ as a parameter for the GP algorithm. \begin{function}[t!] \SetKwData{nmse}{nmse} $V \leftarrow \{ c \in C \mid \text{evalConstraint}(c, \text{Intervals}) > 0\} $\; \eIf(\tcc*[f]{return worst nmse for expr with violations}){V $\neq \varnothing$}{ \nmse $\leftarrow 1$ }{ s $\leftarrow \|y - \operatorname{mean}(y)\|^2$ \tcc*[r]{normalization factor} \nmse $\leftarrow \min( s^{-1} \|\text{eval}(\text{expr}, X) - \mathbf{y}\|^2, 1)$ \tcc*[r]{worst nmse is 1} } \Return{\nmse} \caption{Evaluate(expr, $X, \mathbf{y}$, C, Intervals)} \label{alg:gp-eval} \end{function} The local improvement operator extracts the initial parameter values $\theta_{\text{init}}$ from the solution candidates and updates the values after optimization. Therefore, improved parameter values $\theta^\star$ become part of the genome and can be inherited to new solution candidates (Lamarckian learning~\citep{Houck1997}). \begin{procedure} \SetKwData{expr}{expr} \SetKwFunction{ExtractParam}{ExtractParam} \SetKwFunction{UpdateParam}{UpdateParam} $\mathbf{\theta}_{\text{init}} \leftarrow$ \ExtractParam{\expr} \tcc*[r]{use initial params from expr} fx $\leftarrow (\mathbf{\theta}_i) \Rightarrow$ \Begin( \tcc*[f]{eval expression for $\theta_i$}){\UpdateParam{\expr,$\mathbf{\theta}_i$}\; $\operatorname{eval}(\expr, X)$ } $\mathbf{\theta}^\star \leftarrow \operatorname{LevenbergMarquardt}(\mathbf{\theta}_{\text{init}}, n_{\operatorname{Opt}}, \mathbf{y}, \text{fx})$\; \UpdateParam{\expr, $\theta^\star$}\; \caption{Optimize(expr, $n_{\operatorname{Opt}}, X, \mathbf{y}$ C, Intervals)} \label{alg:gp-optimize} \end{procedure} \subsection{Interaction-Transformation Evolutionary Algorithm}\label{interaction-transformation-evolutionary-algorithm} The second SR method that we have extended for shape-constrained SR is the Interaction-Transformation Evolutionary Algorithm (ITEA). ITEA is an evolutionary algorithm that relies on mutation to search for an optimal Interaction-Transformation expression~\citep{de2018greedy} that fits a provided data set. The Interaction-Transformation (IT) representation restricts the search space to simple expressions following a common pattern that greatly simplifies optimization of model parameters and handling shape constraints. The IT representation specifies a pattern of function forms: \begin{equation*} \hat{f}(x) = \sum_{i}{w_i \cdot t_i(\prod_{j=1}^{d}{x_j^{k_{ij}}})}, \end{equation*} \noindent where $w_i$ is the weight of the $i$-th term of the linear combination, $t_i$ is called a transformation function and can be any univariate function that is reasonable for the studied system and $k_{ij}$ is the strength of interaction for the $j$-th variable on the $i$-th term. The algorithm is a simple mutation-based evolutionary algorithm depicted in Algorithm ~\ref{alg:itea}. It starts with a random population of expressions and repeats mutation and selection until convergence. \begin{algorithm}[tb!] \SetKwData{P}{pop}\SetKwData{F}{children}\SetKwData{f}{child} \SetKwFunction{GenRandomPopulation}{GenRandomPopulation}\SetKwFunction{Mutate}{Mutate}\SetKwFunction{Select}{Select} \SetKwInOut{Input}{input}\SetKwInOut{Output}{output} \Input{data points $X$ and corresponding set of target variable $\mathbf{y}$.} \Output{symbolic function $f$} \BlankLine \P $\leftarrow$ \GenRandomPopulation{}\; \While{stopping criteria not met}{ \F $\leftarrow$ \Mutate{\P}\; \P $\leftarrow$ \Select{\P, \F}\; } \Return $\operatorname{arg} \max_{p.fit} $ \P\; \caption{ITEA~\citep{de2019interaction}.} \label{alg:itea} \end{algorithm} The mutation procedure chooses one of the following actions at random: \begin{itemize} \item Remove one random term of the expression. \item Add a new random term to the expression. \item Replace the interaction strengths of a random term of the expression. \item Replace a random term of the expression with the positive interaction of another random term. \item Replace a random term of the expression with the negative interaction of another random term. \end{itemize} The positive and negative interactions of terms is the sum or subtraction of the strengths of the variables. For example, if we have two terms $x_1^2x_2^3$ and $x_1^{-1}x_2^1$, and we want to apply the positive interaction to them, we would perform the operation $x_1^2 \cdot x_1^{-1} \cdot x_2^3 \cdot x_2^1$ that results in $x_1x_2^4$, similarly with the negative interactions we divide the first polynomial by the other, so performing the operation $x_1^2 \cdot x_1^1 \cdot x_2^3 \cdot x_2^{-1}$, resulting in $x_1^3x_2^2$. Weights within IT expressions can be efficiently optimized using ordinary least squares (OLS) after the mutation step. This algorithm was reported to surpass different variants of GP and stay on par with nonlinear regression algorithms~\citep{de2019interaction}. \subsection{Feasible-Infeasible Two-population with Interaction-Transformation}\label{feasible-infeasible-two-population-with-interaction-transformation} In order introduce the shape-constraints into ITEA, we will use the approach called Feasible-Infeasible Two-population (FI-2POP)~\citep{kimbrough2008feasible} that works with two populations: one for feasible models and another for infeasible models. Despite its simplicity, it has been reported to work well on different problems~\citep{liapis2015procedural,scirea2016metacompose,covoes2018classification}. We have chosen this approach to deal with constraints for the ITEA algorithm since it does not demand fine tuning of a penalty function and a penalty coefficient, does not require any change to the original algorithm (as the repairing and constraint-aware operators), and does not introduce a high computational cost (i.e., multi-objective optimization). Specifically for ITEA, the adaptation (named FI-2POP-IT) is depicted in Algorithm~\ref{alg:fi2pop}. The main difference from Algorithm~\ref{alg:itea} is that in FI-2POP-IT every function now produces two distinct populations, one for feasible solutions and another for the infeasible solutions. For example, the mutation operator when applied to an individual can produce either a feasible solution or an infeasible one, this new individual will be assigned to its corresponding population. The fitness evaluation differs for each population, the feasible population minimizes the error function while the infeasible population minimizes the constraint violations. \begin{algorithm}[tb!] \SetKwData{F}{feas}\SetKwData{I}{infeas}\SetKwData{Fp}{child-feas}\SetKwData{Ip}{child-infeas} \SetKwData{f}{f}\SetKwData{i}{i} \SetKwFunction{GenRandom}{GenRandomPopulation}\SetKwFunction{Mutate}{Mutate}\SetKwFunction{Select}{Select} \SetKwInOut{Input}{input}\SetKwInOut{Output}{output} \Input{data points $X$ and corresponding set of target variable $\mathbf{y}$.} \KwData{\F is the feasible population, \I is the infeasible population, \Fp and \Ip are the feasible and infeasible child population, respectively.} \Output{symbolic function $f$} \BlankLine \F, \I $\leftarrow$ \GenRandom{}\; \While{stopping criteria not met}{ \Fp, \Ip $\leftarrow$ \Mutate{\F $\cup$ \I}\; \F, \I $\leftarrow$ \Select{\F $\cup$ \Fp $\cup$ \I $\cup$ \Ip}\; } \Return $\operatorname{arg} \max_{s \in \F} $ fitness($s$)\; \caption{FI-2POP-IT: Interaction-Transformation Evolutionary Algorithm with Feasible-Infeasible Two-Population.} \label{alg:fi2pop} \end{algorithm} \subsubsection{Defining Constraints with Interval Arithmetic}\label{defining-constraints-with-interval-arithmetic} The IT representation allows for a simple algorithm to calculate the $n$-th order partial derivatives of the expression and to perform IA. Additionally, only linear real-valued parameters are allowed for IT expressions. Therefore parameters can be optimized efficiently using ordinary least squares (OLS) and all shape constraints can be transformed to functions which are linear in the parameters. Given an IT expression and the set of domains for each of the input variables, it is possible to calculate the image of the expression as the sum of the images of each term multiplied by their corresponding weight. The image of an interaction term $Im(.)$ is the product of the exponential of each variable interval $D(.)$ with the corresponding strength: \begin{equation*} Im(p(x)) = \prod_{i=1}^{d}{D(x_i)^{k_i}}, \end{equation*} \noindent Arithmetic operators are well defined in interval arithmetic and the images of univariate non-linear functions can be easily determined. The derivative of an IT expression can be calculated by the chain rule as follows ($g_i = t_i \circ p_i$): \begin{align*} \frac{\partial IT(x)}{\partial x_j} &= w_1 \cdot g'_1(x) + \ldots + w_n \cdot g'_n(x) \\ \frac{\partial g_i(x)}{\partial x_j} &= t'_i(p_i(x)) \cdot k_j\frac{p_i(x)}{x_j} \end{align*} All of the aforementioned transformation functions have derivatives representable by the provided functions. Following the same rationale the second order derivatives can be calculated as well. \section{Experimental Setup}\label{experimental-setup} For testing the effectiveness of the proposed approach we have created some artificial data sets generated from fluid dynamics engineering (FDE) taken from~\citep{chen2018multilevel} and some selected physics models from the \emph{Feynman Symbolic Regression Database}\footnote{\url{https://space.mit.edu/home/tegmark/aifeynman.html}}~\citep{udrescu2020ai} (FEY). Additionally, we have used data sets built upon real-world measurements from physical systems and engineering (RW). We have chosen these data sets because they are prototypical examples of non-trivial non-linear models which are relevant in practical applications. For each of the problem instances we have defined a set of shape constraints that must be fulfilled by the SR solutions. For the FDE and FEY data sets, we have used constraints that can be derived from the known expressions over the given input space. For the physical systems we have defined the shape constraints based on expert knowledge. The input space and monotonicity constraints for all problem instances are given in the supplementary material. In the following subsections we give more details on the problem instances including the constraint definitions and describe the methods to test the modified algorithms. \subsection{Problem Instances}\label{problem-instances} All the data sets are described by the input variables names, the target variable, the true expression if it is known, domains of the variables for the training and test data, expected image of the function and monotonic constraints. All data set specifications are provided as a supplementary material. Details for \emph{Aircraft Lift}, \emph{Flow Psi}, \emph{Fuel Flow} models can be found in ~\citep{anderson2010fundamentals, anderson1982modern}. Additionally, we have selected a subset of the FEY problem instances \citep{udrescu2020ai}. The selection criteria was those problem instances which have been reported as unsolved without dimensional analysis or for which a required runtime of more than five minutes was reported by \cite{udrescu2020ai}. We have not included the three benchmark problems from the closely related work of \cite{Bladek}, because we could easily solve them in preliminary experiments and additionally, the results would not be directly comparable because we do not support symmetry constraints. All constraints for FDE and FYE have been determined by analysing the known expression and its partial derivatives. The formulas for the FDE and FYE problem instances are shown in Table \ref{tab:problem-instances}. For all these problem instances we have generated data sets from the known formula by randomly sampling the input space using $100$ data points for training and $100$ data points for testing. For each of the data sets we generated two versions: one without noise and one where we have added normally distributed noise to the target variable $y' = y + N(0, 0.05 \sigma_y)$. Accordingly, the optimally achievable NMSE for the noisy problem instances is $0.25\%$. We have included three real-world data sets (RW). The dataset for \emph{Friction $\mu_{\operatorname{stat}}$} and \emph{Friction $\mu_{\operatorname{dyn}}$} has been collected in a standardized testing procedure for friction plates and has two target variables that we model independently. The \emph{Flow Stress} data set stems from hot compression tests of aluminium cylinders \citep{Kabliman2019}. The constraints for these data sets where set by specialists in the field. The \emph{Cars} data set has values for displacement, horsepower, weight, acceleration time and fuel efficiency of almost 400 different car models. This set was first used by~\cite{mammen2001general} and then evaluated by~\cite{shah2016soft} to assess the performance of Support Vector Regression with soft constraints. \begin{table}[t] \begin{tabular}{p{5cm}>{$}c<{$}} Name & \text{Formula} \\ \hline Aircraft lift & C_L = C_{L\alpha}(\alpha + \alpha_0) + C_{L\delta_e}\delta_e\frac{S_{\operatorname{HT}}}{S_{\operatorname{ref}}} \\ Flow psi & \Psi = V_\infty r \sin (\frac{\theta}{2\pi})\left(1 - \left(\frac{R}{r}\right)^2 \right) + \frac{\Gamma}{2\pi}\log\frac{r}{R} \\ Fuel flow & \dot m = \frac{p_0 A\star}{\sqrt{T_0}}\sqrt{\frac{\gamma}{R}\left(\frac{2}{1+\gamma} \right)^{(\gamma + 1)/(\gamma - 1)}} \\ Jackson 2.11 & \frac{q}{4 \pi \epsilon {{y}^{2}}}\, \left( 4 \pi \epsilon \mathit{Volt}\, d-\frac{q d\, {{y}^{3}}}{{{\left( {{y}^{2}}-{{d}^{2}}\right) }^{2}}}\right) \\ Wave power & \frac{-32}{5}\frac{G^4}{c^5} \frac{{{\left( \mathit{m1}\, \mathit{m2}\right) }^{2}}\, \left( \mathit{m1}+\mathit{m2}\right)}{r^5} \\ I.6.20 & \operatorname{exp}\left( \frac{-{{\left( \frac{\theta}{\sigma}\right) }^{2}}}{2}\right) \frac{1}{\sqrt{2 \pi} \sigma} \\ I.9.18 & \frac{G\, \mathit{m1}\, \mathit{m2}}{{{\left( \mathit{x2}-\mathit{x1}\right) }^{2}}+{{\left( \mathit{y2}-\mathit{y1}\right) }^{2}}+{{\left( \mathit{z2}-\mathit{z1}\right) }^{2}}} \\ I.15.3x & \frac{x-u t}{\sqrt{1-\frac{{{u}^{2}}}{{{c}^{2}}}}} \\ I.15.3t & \left(t-\frac{u x}{{{c}^{2}}}\right)\frac{1}{\sqrt{1-\frac{{{u}^{2}}}{{{c}^{2}}}}} \\ I.30.5 & \operatorname{asin}\left( \frac{\mathit{lambd}}{n d}\right) \\ I.32.17 & \frac{1}{2} \epsilon c\, {{\mathit{Ef}}^{2}}\, \frac{8 \pi {{r}^{2}}}{3}\, \frac{{{\omega}^{4}}}{{{\left( {{\omega}^{2}}-{{{{\omega}_0}}^{2}}\right) }^{2}}} \\ I.41.16 & \frac{h\, {{\omega}^{3}}}{{{\pi}^{2}}\, {{c}^{2}}\, \left( \operatorname{exp}\left( \frac{h \omega}{\mathit{kb} T}\right) -1\right) } \\ I.48.20 & \frac{m\, {{c}^{2}}}{\sqrt{1-\frac{{{v}^{2}}}{{{c}^{2}}}}} \\ II.6.15a & \frac{\frac{{p_d}}{4 \pi \epsilon} 3 z}{{{r}^{5}}} \sqrt{{{x}^{2}}+{{y}^{2}}} \\ II.11.27 & \frac{n \alpha}{1-\frac{n \alpha}{3}} \epsilon \mathit{Ef} \\ II.11.28 & 1+\frac{n \alpha}{1-\frac{n \alpha}{3}} \\ II.35.21 & {n_{\mathit{rho}}} \mathit{mom} \operatorname{tanh}\left( \frac{\mathit{mom} B}{\mathit{kb} T}\right) \\ III.9.52 & \frac{{p_d} \mathit{Ef} t}{h} {{\sin{\left( \frac{\left( \omega-{{\omega}_0}\right) t}{2}\right) }}^{2}} \frac{1}{{{\left( \frac{\left( \omega-{{\omega}_0}\right) t}{2}\right) }^{2}}} \\ III.10.19 & \mathit{mom}\, \sqrt{{{\mathit{Bx}}^{2}}+{{\mathit{By}}^{2}}+{{\mathit{Bz}}^{2}}} \\ \end{tabular} \caption{\label{tab:problem-instances}Synthetic problem instances used for testing. The first three functions are from the FDE data sets, the rest from the FEY data sets.} \end{table} \subsection{Testing Methodology} Each one of the following experiments has been repeated $30$ times and, for every repetition, we have measured the NMSE in percent for both training and test data. The algorithms receive only the training set as the input and only the best found model is applied to the test set. Runs with and without shape constraints have been executed on the same hardware. The first experiment tests the performance of the unmodified algorithms, i.e., without shape constraints. This test verifies whether unmodified SR algorithms identify conforming models solely from the observed data. If this result turns out negative, it means that constraint handling mechanisms are required for finding conforming models. In the second experiment, we test the performance of the two modified algorithms. This will verify whether the algorithms are able to identify models conforming to prior knowledge encoded as shape constraints. This testing approach allows us to compare the prediction errors (NMSE) of models produced with and without shape constraints to assess whether the prediction error improves or deteriorates. We perform the same analysis for the two groups of instances with and without noise separately. \subsection{Algorithms Configurations} In the following, the abbreviation GP refers to tree-based GP without local optimization and GPC refers to tree-based GP with local optimization. Both algorithms can be used with and without shape constraints. Table \ref{tab:algorithm-configuration} shows the parameter values that have been used for the experiments with GP and GPC. ITEA refers to the Interaction-Transformation Evolutionary Algorithm and FI-2POP-IT (short form: FIIT) refers to the two-population version of ITEA which supports shape constraints. Table~\ref{tab:itea-configuration} shows the parameters values for ITEA and FI-2POP-IT. \begin{table}[t!] \centering \begin{tabular}{lp{8cm}} Parameter & Value \\ \toprule Population size & 1000 \\ Generations & $200$ \\ & $20$ (for GPC with memetic optimization)\\ Initialization & PTC2 \\ $L_{max}$, $D_{max}$ & 50, 20 \\ Fitness evaluation & NMSE with linear scaling \\ Selection & Tournament (group size = 5)\\ Crossover & Subtree crossover \\ Mutation (one of) & Replace subtree with random branch \newline Add $x\sim N(0, 1)$ to all numeric parameters \newline Add $x\sim N(0, 1)$ to a single numeric parameter\newline Change a single function symbol \\ Crossover rate & 100\% \\ Mutation rate & 15\%\\ Replacement & Generational with a single elite\\ Terminal set & real-valued parameters and input variables\\ Function set & $+, *, \%, \log, \exp, \sin, \cos, \tanh, x^2, \sqrt{x} $\\ GPC & max. 10 iterations of Levenberg-Marquardt (LM)\\ \bottomrule \end{tabular} \caption{\label{tab:algorithm-configuration}GP parameter configuration used for the experiments (\% refers to protected division). For the GPC runs we need fewer generations because of the faster convergence with local optimization.} \end{table} \begin{table}[t!] \centering \begin{tabular}{lp{8cm}} Parameter & Value \\ \toprule Population size & $200$ \\ Number of Iterations & $500$ \\ Function set & $\sin, \cos, \tanh, \sqrt, \log, \log1p, \exp$ \\ Fitness evaluation & RMSE \\ Maximum number of terms (init. pop.) & $4$ \\ Range of strength values (init. pop.) & $[-4, 4]$ \\ Min. and max. term length & $2, 6$ \\ Regression model & OLS \\ \bottomrule \end{tabular} \caption{\label{tab:itea-configuration}Parameter values for the ITEA algorithm that have been used for all experiments.} \end{table} For comparison we have used auto-sklearn \citep{FeurerAutoSklearn} (AML) and an implementation of shape-constrained polynomial regression (SCPR) \citep{curmei2020shapeconstrained}\footnote{We have initially also used XGboost, a popular implementation of gradient boosted trees, because it has previously been found that it compares well with symbolic regression methods \citep{PennML:WhereAreWeNow} and it supports monotonicity constraints. However, the results were much worse compared to the symbolic regression results which indicates that the method is not particularly well-suited for the problem instances in the benchmark set which are smooth and of low dimensionality.}. Auto-sklearn does not allow to set monotonicity constraints. Therefore, we can only use it as a comparison for symbolic regression models without constraints. We execute 30 independent repetitions for each problem with each run limited to one hour. The degree for SCPR has been determined for each problem instance using 10-fold cross-validation and using the best CV-RMSE as the selection criteria. We tested homogeneous polynomials up to degree eight (except for I.9.18 where we used a maximum degree of five because of runtime limits). The runtime for the grid search was limited to one hour for each problem instance. The final model is then trained with the selected degree on the full training set. SCPR is a deterministic algorithm therefore only a single run was required for each problem instance. \section{Results}\label{results} In this section we report the obtained results in tabular and graphical forms focusing on the violations of the shape constraints, goodness of fit, computational overhead, and extrapolation capabilities with and without shape constraints. \subsection{Constraint Violations}\label{const_viol} The procedure for checking of constraint violations is as follows: for each problem instance we sample a million points uniformly from the full input space to produce a data set for checking constraint violations. The final SR solutions as well as their partial derivatives are then evaluated on this data set. If there is at least one point for which the shape constraints are violated then we count the SR solution as infeasible. Figures~\ref{fig:aircraft_violations}~to~\ref{fig:fuelflow_violations} show exemplarily the number of infeasible SR models for each algorithm and constraint, over the $30$ runs for the FDE data sets. The picture is similar for all problem instances. We observe that without shape constraints none of the algorithms produce feasible solutions in every run. Only for the easiest data sets (e.g. \emph{Fuel Flow}) we re-discovered the data-generating functions -- which necessarily conform to the constraints -- in multiple runs. Over all data sets, ITEA has the highest probability of producing infeasible models. We observe that even a small amount of noise increases the likelihood to produce infeasible models. In short, we can see that we cannot hope to find feasible solutions using SR algorithms without shape constraints for noisy data sets. This is consistent with the observation in~\citep{Bladek}. The results for the extended algorithms show, that with few exceptions, all three SR algorithms are capable of finding feasible solutions most of the time \begin{figure}[t!] \centering \begin{subfigure}[b]{0.3\textwidth} \includegraphics[width=\textwidth]{figs/aircraft_violations-eps-converted-to} \caption{} \label{fig:aircraft_violations} \end{subfigure} \begin{subfigure}[b]{0.3\textwidth} \includegraphics[width=\textwidth]{figs/flowpsi_violations-eps-converted-to} \caption{} \label{fig:flowpsi_violations} \end{subfigure} \begin{subfigure}[b]{0.3\textwidth} \includegraphics[width=\textwidth]{figs/fuelflow_violations-eps-converted-to} \caption{} \label{fig:fuelflow_violations} \end{subfigure} \vspace{0.5em} \label{fig:const_viols} \caption{Constraint violation frequency for the solutions of every algorithm over the $30$ executions for the FDE data sets. Only for the \emph{Fuel Flow} problem a feasible solution can be identified even without shape constraints. FI-2POP always produces feasible solutions due to the nature of its constraint handling mechanism.} \end{figure} \subsection{Interpolation and Extrapolation} The difference between SR models and shape-constrained SR models becomes clearer when we visualize their outputs. Figures~\ref{fig:gpe-noinfo}~to~\ref{fig:iteae-info} show the predictions of every SR model identified for the \emph{Friction} $\mu_\text{stat}$ data set. The partial dependence plots show the predictions for $\mu_\text{stat}$ for all 30 models over the complete range of values allowed for the two variables $p$ and $T$. The plot of $\mu_\text{stat}$ over $p$ shows the predictions when $v$ and $T$ are fixed to their median values and the plot of $\mu_\text{stat}$ over $T$ shows the predictions when $p$ and $v$ are fixed. The dashed vertical lines mark the subspace from which we have sampled points for the training and test data sets. The algorithms without shape constraints produce extreme predictions when extrapolating (Figures \ref{fig:gpe-noinfo}, \ref{fig:gpce-noinfo}, \ref{fig:iteae-noinfo}). For instance many of the functions have poles at a temperature $T$ close to zero which are visible in the plots as vertical lines. GP and GPC without shape constraints produced a few solutions which are wildly fluctuating over $p$ even within the interpolation range. Within the interpolation range ITEA produced the best SR solutions for the \emph{Friction} data sets (see Figure~\ref{fig:iteae-noinfo} as well as Table~\ref{tab:nmse-test}). However, the models do not conform to prior knowledge as we would expect that $\mu_\text{stat}$ decreases with increasing pressure and temperature and the models show a slight increase in $\mu_{\operatorname{stat}}$ when increasing $p$. The model predictions for shape-constrained SR are shown in Figures~\ref{fig:gpe-info},~\ref{fig:gpce-info}, and \ref{fig:iteae-info}. The visualization clearly shows that there is higher variance and that all algorithms produced a few bad or even constant solutions. This invalidates our hypothesis that shape-constrained SR leads to improved predictive accuracy and instead indicates that there are convergence issues with our approach of including shape constraints. We will discuss this in more detail in the following sections. The visualization also shows that the solutions with shape constraints have better extrapolation behaviour and conform to shape constraints. \begin{figure} \begin{subfigure}[b]{0.5\textwidth} \includegraphics[width=\textwidth]{figs/F05128_mu_stat_extrapolation_GP.pdf} \caption{GP} \label{fig:gpe-noinfo} \end{subfigure} \begin{subfigure}[b]{0.5\textwidth} \includegraphics[width=\textwidth]{figs/F05128_mu_stat_extrapolation_GP_with_constraints.pdf} \caption{GP (info)} \label{fig:gpe-info} \end{subfigure} \vspace{0.3em} \begin{subfigure}[b]{0.5\textwidth} \includegraphics[width=\textwidth]{figs/F05128_mu_stat_extrapolation_GPC.pdf} \caption{GPC} \label{fig:gpce-noinfo} \end{subfigure} \begin{subfigure}[b]{0.5\textwidth} \includegraphics[width=\textwidth]{figs/F05128_mu_stat_extrapolation_GPC_with_constraints.pdf} \caption{GPC (info)} \label{fig:gpce-info} \end{subfigure} \vspace{0.3em} \begin{subfigure}[b]{0.5\textwidth} \includegraphics[width=\textwidth]{figs/F05128_mu_stat_extrapolation_ITEA.pdf} \caption{ITEA} \label{fig:iteae-noinfo} \end{subfigure} \begin{subfigure}[b]{0.5\textwidth} \includegraphics[width=\textwidth]{figs/F05128_mu_stat_extrapolation_FI-2POP.pdf} \caption{FI-2POP-IT} \label{fig:iteae-info} \end{subfigure} \label{fig:flowpsi-extrapolation} \caption{Partial dependence plots for the Friction $\mu_{\operatorname{stat}}$ models found by each algorithm over the $30$ runs. Dashed lines mark the subspace from which training and test points were sampled. Algorithms with shape constraints (b, d, f) produce SR solutions which conform to prior knowledge and have better extrapolation behaviour but increased prediction error (cf. Table \ref{tab:nmse-test}).} \end{figure} \subsection{Goodness-of-fit}\label{numerical-results} Table \ref{tab:nmse-test} shows the median NMSE of best solutions over 30 runs obtained by each algorithm, with and without shape constraints, on the test sets. The training results can be found in the supplementary material. The table has $6$ quadrants: the left block shows the results without side information, the right block shows the results with shape constraints; the top panel shows results for RW instances, the middle panel the results for the FDE and FYE instances, and the bottom panel the results for the same instances including $0.25$\% noise. \begin{table}[!htbp] \caption{Median NMSE values for the test data. Values are multiplied by $100$ (percentage) and truncated at the second decimal place.} \label{tab:nmse-test} \begin{tabular}[]{c@{}l>{$}r<{$}>{$}r<{$}>{$}r<{$}>{$}r<{$}|>{$}r<{$}>{$}r<{$}>{$}r<{$}>{$}r<{$}@{}} \toprule & & \multicolumn{4}{c|}{w/o. info} & \multicolumn{4}{c}{w. info} \tabularnewline & & \text{GP} & \text{GPC} & \text{ITEA} & \text{AML} & \text{GP} & \text{GPC} & \text{FIIT} & \text{SCPR} \tabularnewline \hline & Friction $\mu_{\operatorname{dyn}}$ & 8.28 & 7.73 & \textBF{4.35} & 12.99& 12.53 & 16.30& 35.90 & \textBF{8.07} \tabularnewline & Friction $\mu_{\operatorname{stat}}$ & 7.22 & 5.44 & \textBF{4.46} & 6.82& 9.98 & 7.76 & 11.83 & \textBF{1.77} \tabularnewline & Flow stress & 8.36 & 4.66 & -- & \textBF{0.15} & 34.05& 26.04 & 68.16 & \textBF{19.46} \tabularnewline & Cars & 75.18 & 76.23 & 75.06 & \textBF{74.72}& 76.86 & 77.67 & 76.64 & \textBF{73.83} \tabularnewline \hline \parbox[t]{1.5em}{\multirow{19}{*}{\rotatebox[origin=c]{90}{without noise}}} & Aircraft lift & 0.63 & 0.15 & 0.22 & \textBF{0.00}& 0.80 & 1.01 & 0.14 & \textBF{0.00} \tabularnewline & Flow psi & 0.75 & 0.13 & 0.05 & \textBF{0.00}& 4.80 & 5.36 & 2.91 & \textBF{0.00} \tabularnewline & Fuel flow & \textBF{0.00} & \textBF{0.00} & \textBF{0.00} & \textBF{0.00}& \textBF{0.00} & \textBF{0.00} & \textBF{0.00} & \textBF{0.00} \tabularnewline & Jackson 2.11 & \textBF{0.00} & \textBF{0.00} & \textBF{0.00} & 0.62& \textBF{0.00} & \textBF{0.00} & \textBF{0.00} & 0.90 \tabularnewline & Wave Power & 14.55 &30.82 & \textBF{2.26} & 2.74& 18.71 & 80.34 &21.31 & \textBF{13.50} \tabularnewline & I.6.20 & 0.46 & \textBF{0.00} & 0.31 & \textBF{0.00}& 1.61 & 0.42 & 3.20 & \textBF{0.01} \tabularnewline & I.9.18 & 2.88 & 2.49 & \textBF{0.91}& 4.98& 4.03 & 16.16 & \textBF{0.74} & 1.20 \tabularnewline & I.15.3x & 0.34 & \textBF{0.01} & \textBF{0.01} & 0.02& 0.36 & 0.04 & \textBF{0.01} & \textBF{0.01} \tabularnewline & I.15.3t & 0.21 & 0.01 & \textBF{0.00}& \textBF{0.00}& 0.15 & 0.03 & \textBF{0.00} & \textBF{0.00} \tabularnewline & I.30.5 & \textBF{0.00} & \textBF{0.00} & \textBF{0.00} &0.18 & \textBF{0.00} & \textBF{0.00} & \textBF{0.00} & \textBF{0.00} \tabularnewline & I.32.17 & \textBF{0.76} & 1.13 & 8.07 & 42.36& \textBF{2.07} & 12.76 & 2.42 & 7.79 \tabularnewline & I.41.16 & 2.78 & 2.29 & \textBF{1.08} &15.14 & 8.99 & 17.72 & 5.15 & \textBF{1.56} \tabularnewline & I.48.20 & \textBF{0.00} & \textBF{0.00} & \textBF{0.00} & \textBF{0.00}& \textBF{0.00} & \textBF{0.00} & \textBF{0.00} & \textBF{0.00} \tabularnewline & II.6.15a & 3.55 & \textBF{2.50} & 4.66 & 16.17& 4.67 & 7.30 & 32.12 & \textBF{1.01} \tabularnewline & II.11.27 & \textBF{0.00} & \textBF{0.00} & \textBF{0.00} & \textBF{0.00}& \textBF{0.00} & 0.07 & \textBF{0.00} & \textBF{0.00} \tabularnewline & II.11.28 & \textBF{0.00} & \textBF{0.00} & \textBF{0.00} & \textBF{0.00}& \textBF{0.00} & \textBF{0.00} & \textBF{0.00} & \textBF{0.00} \tabularnewline & II.35.21 & 3.29 & \textBF{1.18} & 2.61 & 1.40& 3.67 & 6.10 & 3.22 & \textBF{1.34} \tabularnewline & III.9.52 &116.25 &20.44 &66.16 & \textBF{19.88}&104.56 &106.48 & 71.93 & \textBF{33.41} \tabularnewline & III.10.19 & 0.41 & 0.04 & 0.17 & \textBF{0.01}& 0.55 & 0.33 & 0.31 & \textBF{0.00} \tabularnewline \hline \parbox[t]{1.5em}{\multirow{21}{*}{\rotatebox[origin=c]{90}{with noise}}} & Aircraft lift & 0.45 & 0.26 & \textBF{0.25} & 0.32 & 1.24 & 1.30 & \textBF{0.28} & 0.46\tabularnewline & Flow psi & 0.75 & 0.29 & \textBF{0.21} & 0.37& 5.90 & 6.02 & 4.65 & \textBF{0.57} \tabularnewline & Fuel flow & 0.21 & 0.24 & \textBF{0.18} & 0.34 & 0.30 & 0.30 & \textBF{0.25} & \textBF{0.25} \tabularnewline & Jackson 2.11 & \textBF{0.28} & 0.31 & 0.38 & 3.18& \textBF{0.24} & 0.25 & 0.30 & 0.83 \tabularnewline & Wave Power & \textBF{21.23} &51.36 &99.88 &44.83 & 22.36 &68.96 & 21.39 & \textBF{11.88} \tabularnewline & I.6.20 & 1.09 & \textBF{0.40} & 0.56 &0.45 & 2.14 & 0.78 & 3.61 & \textBF{0.55} \tabularnewline & I.9.18 & 3.77 & 3.55 & \textBF{1.56} &4.02 & 5.25 &15.70 & \textBF{1.33} & 1.62 \tabularnewline & I.15.3x & 0.55 & \textBF{0.36} & 0.38 & 0.37& 0.56 & \textBF{0.35} & 0.36 & 0.42 \tabularnewline & I.15.3t & 0.65 & \textBF{0.48} & 0.58 &0.53 & 0.59 & 0.51 & 0.48 & \textBF{0.45} \tabularnewline & I.30.5 & \textBF{0.34} & 0.35 & 0.62 & 0.81 & \textBF{0.32} & 0.33 & 0.34 & 0.39 \tabularnewline & I.32.17 & \textBF{0.78} & 3.14 & 8.50 & 47.60& 3.95 &14.02 & \textBF{2.53} & 6.22 \tabularnewline & I.41.16 & 3.13 & \textBF{2.32} & 3.47 &15.19 & 6.68 &19.72 & 5.05 & \textBF{2.93} \tabularnewline & I.48.20 & 0.37 & 0.36 & 0.51 & \textBF{0.35}& \textBF{0.32} & \textBF{0.32} & 0.34 & \textBF{0.32} \tabularnewline & II.6.15a & 3.08 & \textBF{2.88} & 7.56 & 19.29& 3.87 & 6.05 &45.32 & \textBF{1.76} \tabularnewline & II.11.27 & \textBF{0.35} & 0.39 & 1.06 & 0.62& \textBF{0.37} & 0.61 & 0.41 & 0.47 \tabularnewline & II.11.28 & \textBF{0.38} & 0.44 & 0.39 & 0.51& \textBF{0.27} & 0.29 & 0.38 & 0.30 \tabularnewline & II.35.21 & 3.88 & \textBF{1.33} & 2.43 & 2.10& 4.38 & 7.49 & 4.27 & \textBF{1.34} \tabularnewline & III.9.52 &126.84 &\textBF{18.91} &74.08 & 24.81& 106.56 &90.18 & 73.44 & \textBF{32.69} \tabularnewline & III.10.19 & 0.85 & \textBF{0.38} & 0.70 & 0.64& 0.91 & 0.64 & 0.70 & \textBF{0.46} \tabularnewline \bottomrule \end{tabular} \end{table} Analysing the detailed results we observe that the best result of all models with information is better for 18 of 42 instances (RW: 2, no noise: 6, noisy: 10). While the best result of models without information is better for 14 of 42 instances (RW: 2, no noise: 3, noisy: 9). Within both groups there are algorithms with significantly different test errors (without info: p-value: $0.0103$, with info: p-value: $6.467\cdot 10 ^{-6}$, Friedman's rank sum test with Davenport correction). Pairwise comparison of results without info shows that GPC is better than GP (p-value: 0.011) and AML (p-value: 0.043) using Friedman's rank sum test with Bergman correction. For the problem instances with noise AML produced the best result for only 1 out of 19 instances. For the instances without noise the results of AML are similar to results of GP, GPC, and ITEA. Pairwise comparison of results with info shows that SCPR is better than the other algorithms and no statistically significant difference was found between GP, GPC and FIIT. The p-values for all pairwise tests are shown in Table \ref{tab:statistics}. Comparing the results with and without constraints for each algorithm individually, we find that the results are in general worse when using constraints. GP is better than GP (info) for 27 instances. GPC is better than GPC (info) for 32 instances. ITEA is better than FIIT for 19 instances. For the RW data sets, ITEA managed to find the best models on two out of the four instances. For \emph{Flow Stress}, ITEA returned a solution that produced numerical errors for the test set. This is not the case when we include the shape-constraints, as we can see on the top-right quadrant. In this situation, FI-2POP-IT was capable of finding expressions that did not return invalid results for the test set. \begin{table} \centering \begin{tabular}{llll} \multicolumn{4}{c}{without info} \\ GP & GPC & ITEA & AML \\ \hline n/a & \textBF{0.011} & 0.325 & 0.499 \\ \textBF{0.011} & n/a & 0.325 & \textBF{0.043} \\ 0.325 & 0.325 & n/a & 0.353 \\ 0.499 & \textBF{0.043} & 0.353 & n/a \\ \end{tabular} \begin{tabular}{llll} \multicolumn{4}{c}{with info} \\ GP & GPC & FIIT & SCPR \\ \hline n/a & 0.151 & 0.353 & \textBF{0.002} \\ 0.151 & n/a & 0.054 & \textBF{0.000} \\ 0.353 & 0.054 & n/a & \textBF{0.028} \\ \textBF{0.002} & \textBF{0.000} & \textBF{0.028} & n/a \\ \end{tabular} \caption{\label{tab:statistics}p-values for pairwise comparison of algorithms in both groups (Friedman's rank sum test with Bergman correction)} \end{table} \subsection{Computational Overhead} Another important impact of introducing constraints that should be considered is the computational overhead introduced to each approach. For ITEA the execution time is approximately doubled when using the constraint handling. The reason being that parameter optimization is much easier for the ITEA representation and the calculation of the partial derivatives is a simple mechanical process as shown in Section~\ref{defining-constraints-with-interval-arithmetic}. For GP and GPC the execution time factor is approximately $5$ when including shape constraints. The increased execution time for GP results from the additional effort for building the partial derivatives for each solution candidate and for the interval evaluation. We observed that the increase in execution time is less extreme for problem instances with a large number of rows where the relative effort for symbolic derivation of solution candidates becomes smaller. \section{Discussion}\label{discussion} The results presented on the previous section largely corroborate our initial assumptions for shape-constrained symbolic regression. First of all, when we do not explicitly consider shape constraints within SR algorithms we are unlikely to find solutions which conform to expected behaviour. We showed that the results produced by the two newly-introduced algorithms in fact conform to shape constraints. Our assessment of the extrapolation and interpolation behaviour of SR models highlighted the bad extrapolation behaviour as well as occasional problems even for interpolation. The improved results when including shape constraints support the argument to include interval arithmetic to improve the robustness of SR solutions~\citep{keijzer2003improving,pennachin2010robust}. However, our results also show that including shape-constraints via interval arithmetic leads to SR solutions with higher prediction errors on training and test sets. While the increased error on the training set is expected, we hoped we would be able to improve prediction errors on the test set. Assuming that the constraints are correct, this should hypothetically be possible because the shape constraints provide additional information for improving the fit on noisy data sets. In fact, we observed that the results got worse when using information for tree-based GP with and without local optimization (GPC). There are several possible explanations such as slower convergence, more rapid loss of diversity, or rejection of feasible solutions because of the pessimistic bounds produced by interval arithmetic. Another hypothesis is that the positive effect of shape constraints becomes more relevant with higher noise levels. We are not able to give a conclusive answer for the main cause of the higher prediction errors with side information and leave this question open for future research. Comparison with AutoML as implemented by auto-sklearn showed that GP with parameter optimization (GPC) produced better test results than AutoML (p-value: $0.011$) over the benchmark set without shape-constraints. However, AutoML does not support monotonicity constraints and, because of that, we cannot use it to compare with the results using side information. Therefore, we compared the results of our proposed algorithms with shape-constrained polynomial regression (SCPR). The results show that SCPR performs better than the evolutionary algorithms for this benchmark set, which indicates that we can find a good approximation of many of our benchmark instances using polynomials. An advantage of SCPR is that it is formulated as a convex optimization problem that can be solved efficiently and deterministically by highly-tuned solvers. A drawback of SCPR is the potentially large model size. The number of terms of a homogeneous $n$-variate polynomial of degree $d$ is $\binom{n+d}{n}$. Our experiments found that polynomial degrees of up to eight were required to find a good fit. The studied problems had five variables on average, which led to more than a thousand terms in our polynomial models. The models produced by the evolutionary algorithms were, on average, much smaller as we used a limit of $50$ nodes for GP expression trees and $6$ terms for ITEA/FI-2POP-IT. \section{Conclusions}\label{conclusions} In this paper we have introduced shape-constrained symbolic regression which allows to include prior knowledge into SR. Shape-constrained symbolic regression allows to enforce that the model output must be within given bounds, or that outputs must be monotonically increasing or decreasing over selected inputs. The structure and the parameters of the symbolic regression model are however still identified by the algorithm. We have described two algorithms for shape-constrained symbolic regression which are extensions of tree-based genetic programming with optional local optimization and the Interaction-Transformation Evolutionary Algorithm that uses a more restrictive representation with the goal of returning simpler expressions. The extensions add the ability to calculate partial derivatives for any expression generated by the algorithms and use interval arithmetic to determine bounds and determine if models conform to shape constrains. Two approaches for handling constraint violations have been tested. The first approach simply adjusts fitness for infeasible solutions while the second approach splits the population into feasible and infeasible solutions. The results showed the importance of treating the shape constraints inside the algorithms. First of all, we have collected more evidence that without any feasibility control, is unlikely to find feasible solutions for most of the problems. Following, we verified the efficacy of our approach by measuring the frequency of infeasible solutions and reporting the median numerical error of our models. The modified algorithms were all capable of finding models conforming to the shape constraints. This shows that the introduction of shape constraints can help us finding more realistic models. However, we have also found that the extended algorithms with shape constraints produce worse solutions on the test set on average. For the next steps we intend to analyse in detail the causes for the worse solutions with shape-constrained SR. The bounds determined via interval arithmetic are very wide and might lead to rejection of feasible solutions as well as premature convergence. This is an issue that could potentially be solved by using more elaborate bound estimation schemes such as affine arithmetic or recursive splitting. Other possibilities for the constraint-handling include multi-objective optimization and penalty functions. Alternatively, optimistic approaches (e.g. using sampling) or a hybridization of pessimistic and optimistic approaches for shape-constrained regression can be used to potentially improve the results. Additionally, it would be worthwhile to study the effects of constraint-handling mechanisms on population diversity in more detail. \section{Acknowledgments}\label{acknowledgments} This project is partially funded by Funda\c{c}\~{a}o de Amparo \`{a} Pesquisa do Estado de S\~{a}o Paulo (FAPESP), grant number 2018/14173-8. And some of the experiments (ITEA) made use of the Intel\textregistered AI DevCloud, which Intel\textregistered provided free access. The authors gratefully acknowledge support by the Christian Doppler Research Association and the Federal Ministry of Digital and Economic Affairs within the Josef Ressel Centre for Symbolic Regression. \bibliographystyle{apalike}